} SCCBSCAM_INFO;
 
-#define  SCSI_REQUEST_SENSE      0x03
-#define  SCSI_READ               0x08
-#define  SCSI_WRITE              0x0A
-#define  SCSI_START_STOP_UNIT    0x1B
-#define  SCSI_READ_EXTENDED      0x28
-#define  SCSI_WRITE_EXTENDED     0x2A
-#define  SCSI_WRITE_AND_VERIFY   0x2E
-
-#define  SSGOOD                  0x00
-#define  SSCHECK                 0x02
-#define  SSQ_FULL                0x28
-
-#define  SMCMD_COMP              0x00
-#define  SMEXT                   0x01
-#define  SMSAVE_DATA_PTR         0x02
-#define  SMREST_DATA_PTR         0x03
-#define  SMDISC                  0x04
-#define  SMABORT                 0x06
-#define  SMREJECT                0x07
-#define  SMNO_OP                 0x08
-#define  SMPARITY                0x09
-#define  SMDEV_RESET             0x0C
-#define        SMABORT_TAG                                     0x0D
-#define        SMINIT_RECOVERY                 0x0F
-#define        SMREL_RECOVERY                          0x10
 
 #define  SMIDENT                 0x80
 #define  DISC_PRIV               0x40
 
-#define  SMSYNC                  0x01
-#define  SMWDTR                  0x03
 #define  SM8BIT                  0x00
 #define  SM16BIT                 0x01
-#define  SMIGNORWR               0x23  /* Ignore Wide Residue */
 
 #define  SIX_BYTE_CMD            0x06
 #define  TWELVE_BYTE_CMD         0x0C
                                                p_Sccb->Sccb_scsistat =
                                                    ABORT_ST;
                                                p_Sccb->Sccb_scsimsg =
-                                                   SMABORT_TAG;
+                                                   ABORT_TASK;
 
                                                if (((struct sccb_card *)
                                                     pCurrCard)->currentSCCB ==
                                FPT_phaseChkFifo(ioport, thisCard);
 
                        if (RD_HARPOON(ioport + hp_gp_reg_1) ==
-                                       SMSAVE_DATA_PTR) {
+                                       SAVE_POINTERS) {
 
                                WR_HARPOON(ioport + hp_gp_reg_1, 0x00);
                                currSCCB->Sccb_XferState |= F_NO_DATA_YET;
                                        FPT_phaseChkFifo(ioport, thisCard);
 
                                if (RD_HARPOON(ioport + hp_gp_reg_1) ==
-                                   SMSAVE_DATA_PTR) {
+                                   SAVE_POINTERS) {
                                        WR_HARPOON(ioport + hp_gp_reg_1, 0x00);
                                        currSCCB->Sccb_XferState |=
                                            F_NO_DATA_YET;
                WR_HARPOON(port + hp_fiforead, 0);
                WR_HARPOON(port + hp_fifowrite, 0);
                if (pCurrSCCB != NULL) {
-                       pCurrSCCB->Sccb_scsimsg = SMPARITY;
+                       pCurrSCCB->Sccb_scsimsg = MSG_PARITY_ERROR;
                }
                message = 0x00;
                do {
 
                WRW_HARPOON((port + ID_MSG_STRT + 2), BRH_OP + ALWAYS + NP);
 
-               currSCCB->Sccb_scsimsg = SMDEV_RESET;
+               currSCCB->Sccb_scsimsg = TARGET_RESET;
 
                WR_HARPOON(port + hp_autostart_3, (SELECT + SELCHK_STRT));
                auto_loaded = 1;
                if (message == 0) {
                        msgRetryCount++;
                        if (msgRetryCount == 1) {
-                               FPT_SendMsg(port, SMPARITY);
+                               FPT_SendMsg(port, MSG_PARITY_ERROR);
                        } else {
-                               FPT_SendMsg(port, SMDEV_RESET);
+                               FPT_SendMsg(port, TARGET_RESET);
 
                                FPT_sssyncv(port, our_target, NARROW_SCSI,
                                            currTar_Info);
 
                WR_HARPOON(port + hp_portctrl_0, 0x00);
 
-               if ((message == SMABORT) || (message == SMDEV_RESET) ||
-                   (message == SMABORT_TAG)) {
+               if ((message == ABORT_TASK_SET) || (message == TARGET_RESET) ||
+                   (message == ABORT_TASK)) {
                        while (!
                               (RDW_HARPOON((port + hp_intstat)) &
                                (BUS_FREE | PHASE))) {
 
        currTar_Info = &FPT_sccbMgrTbl[p_card][currSCCB->TargID];
 
-       if (message == SMREST_DATA_PTR) {
+       if (message == RESTORE_POINTERS) {
                if (!(currSCCB->Sccb_XferState & F_NO_DATA_YET)) {
                        currSCCB->Sccb_ATC = currSCCB->Sccb_savedATC;
 
                           (AUTO_IMMED + DISCONNECT_START));
        }
 
-       else if (message == SMCMD_COMP) {
+       else if (message == COMMAND_COMPLETE) {
 
                if (currSCCB->Sccb_scsistat == SELECT_Q_ST) {
                        currTar_Info->TarStatus &=
 
        }
 
-       else if ((message == SMNO_OP) || (message >= SMIDENT)
-                || (message == SMINIT_RECOVERY) || (message == SMREL_RECOVERY)) {
+       else if ((message == NOP) || (message >= IDENTIFY_BASE) ||
+                (message == INITIATE_RECOVERY) ||
+                (message == RELEASE_RECOVERY)) {
 
                ACCEPT_MSG(port);
                WR_HARPOON(port + hp_autostart_1,
                           (AUTO_IMMED + DISCONNECT_START));
        }
 
-       else if (message == SMREJECT) {
+       else if (message == MESSAGE_REJECT) {
 
                if ((currSCCB->Sccb_scsistat == SELECT_SN_ST) ||
                    (currSCCB->Sccb_scsistat == SELECT_WN_ST) ||
                }
        }
 
-       else if (message == SMEXT) {
+       else if (message == EXTENDED_MESSAGE) {
 
                ACCEPT_MSG(port);
                FPT_shandem(port, p_card, currSCCB);
        }
 
-       else if (message == SMIGNORWR) {
+       else if (message == IGNORE_WIDE_RESIDUE) {
 
                ACCEPT_MSG(port);       /* ACK the RESIDUE MSG */
 
                message = FPT_sfm(port, currSCCB);
 
-               if (currSCCB->Sccb_scsimsg != SMPARITY)
+               if (currSCCB->Sccb_scsimsg != MSG_PARITY_ERROR)
                        ACCEPT_MSG(port);
                WR_HARPOON(port + hp_autostart_1,
                           (AUTO_IMMED + DISCONNECT_START));
        else {
 
                currSCCB->HostStatus = SCCB_PHASE_SEQUENCE_FAIL;
-               currSCCB->Sccb_scsimsg = SMREJECT;
+               currSCCB->Sccb_scsimsg = MESSAGE_REJECT;
 
                ACCEPT_MSG_ATN(port);
                WR_HARPOON(port + hp_autostart_1,
                message = FPT_sfm(port, pCurrSCCB);
                if (message) {
 
-                       if (message == SMSYNC) {
+                       if (message == EXTENDED_SDTR) {
 
                                if (length == 0x03) {
 
                                        FPT_stsyncn(port, p_card);
                                } else {
 
-                                       pCurrSCCB->Sccb_scsimsg = SMREJECT;
+                                       pCurrSCCB->Sccb_scsimsg = MESSAGE_REJECT;
                                        ACCEPT_MSG_ATN(port);
                                }
-                       } else if (message == SMWDTR) {
+                       } else if (message == EXTENDED_WDTR) {
 
                                if (length == 0x02) {
 
                                        FPT_stwidn(port, p_card);
                                } else {
 
-                                       pCurrSCCB->Sccb_scsimsg = SMREJECT;
+                                       pCurrSCCB->Sccb_scsimsg = MESSAGE_REJECT;
                                        ACCEPT_MSG_ATN(port);
 
                                        WR_HARPOON(port + hp_autostart_1,
                                }
                        } else {
 
-                               pCurrSCCB->Sccb_scsimsg = SMREJECT;
+                               pCurrSCCB->Sccb_scsimsg = MESSAGE_REJECT;
                                ACCEPT_MSG_ATN(port);
 
                                WR_HARPOON(port + hp_autostart_1,
                                           (AUTO_IMMED + DISCONNECT_START));
                        }
                } else {
-                       if (pCurrSCCB->Sccb_scsimsg != SMPARITY)
+                       if (pCurrSCCB->Sccb_scsimsg != MSG_PARITY_ERROR)
                                ACCEPT_MSG(port);
                        WR_HARPOON(port + hp_autostart_1,
                                   (AUTO_IMMED + DISCONNECT_START));
                }
        } else {
-               if (pCurrSCCB->Sccb_scsimsg == SMPARITY)
+               if (pCurrSCCB->Sccb_scsimsg == MSG_PARITY_ERROR)
                        WR_HARPOON(port + hp_autostart_1,
                                   (AUTO_IMMED + DISCONNECT_START));
        }
                WRW_HARPOON((port + ID_MSG_STRT + 2), BRH_OP + ALWAYS + CMDPZ);
 
                WRW_HARPOON((port + SYNC_MSGS + 0),
-                           (MPM_OP + AMSG_OUT + SMEXT));
+                           (MPM_OP + AMSG_OUT + EXTENDED_MESSAGE));
                WRW_HARPOON((port + SYNC_MSGS + 2), (MPM_OP + AMSG_OUT + 0x03));
                WRW_HARPOON((port + SYNC_MSGS + 4),
-                           (MPM_OP + AMSG_OUT + SMSYNC));
+                           (MPM_OP + AMSG_OUT + EXTENDED_SDTR));
 
                if ((currTar_Info->TarEEValue & EE_SYNC_MASK) == EE_SYNC_20MB)
 
 
        sync_msg = FPT_sfm(port, currSCCB);
 
-       if ((sync_msg == 0x00) && (currSCCB->Sccb_scsimsg == SMPARITY)) {
+       if ((sync_msg == 0x00) && (currSCCB->Sccb_scsimsg == MSG_PARITY_ERROR)) {
                WR_HARPOON(port + hp_autostart_1,
                           (AUTO_IMMED + DISCONNECT_START));
                return;
 
        offset = FPT_sfm(port, currSCCB);
 
-       if ((offset == 0x00) && (currSCCB->Sccb_scsimsg == SMPARITY)) {
+       if ((offset == 0x00) && (currSCCB->Sccb_scsimsg == MSG_PARITY_ERROR)) {
                WR_HARPOON(port + hp_autostart_1,
                           (AUTO_IMMED + DISCONNECT_START));
                return;
                        unsigned char offset)
 {
        ARAM_ACCESS(port);
-       WRW_HARPOON((port + SYNC_MSGS + 0), (MPM_OP + AMSG_OUT + SMEXT));
+       WRW_HARPOON((port + SYNC_MSGS + 0),
+                   (MPM_OP + AMSG_OUT + EXTENDED_MESSAGE));
        WRW_HARPOON((port + SYNC_MSGS + 2), (MPM_OP + AMSG_OUT + 0x03));
-       WRW_HARPOON((port + SYNC_MSGS + 4), (MPM_OP + AMSG_OUT + SMSYNC));
+       WRW_HARPOON((port + SYNC_MSGS + 4),
+                   (MPM_OP + AMSG_OUT + EXTENDED_SDTR));
        WRW_HARPOON((port + SYNC_MSGS + 6), (MPM_OP + AMSG_OUT + sync_pulse));
        WRW_HARPOON((port + SYNC_MSGS + 8), (RAT_OP));
        WRW_HARPOON((port + SYNC_MSGS + 10), (MPM_OP + AMSG_OUT + offset));
                WRW_HARPOON((port + ID_MSG_STRT + 2), BRH_OP + ALWAYS + CMDPZ);
 
                WRW_HARPOON((port + SYNC_MSGS + 0),
-                           (MPM_OP + AMSG_OUT + SMEXT));
+                           (MPM_OP + AMSG_OUT + EXTENDED_MESSAGE));
                WRW_HARPOON((port + SYNC_MSGS + 2), (MPM_OP + AMSG_OUT + 0x02));
                WRW_HARPOON((port + SYNC_MSGS + 4),
-                           (MPM_OP + AMSG_OUT + SMWDTR));
+                           (MPM_OP + AMSG_OUT + EXTENDED_WDTR));
                WRW_HARPOON((port + SYNC_MSGS + 6), (RAT_OP));
                WRW_HARPOON((port + SYNC_MSGS + 8),
                            (MPM_OP + AMSG_OUT + SM16BIT));
 
        width = FPT_sfm(port, currSCCB);
 
-       if ((width == 0x00) && (currSCCB->Sccb_scsimsg == SMPARITY)) {
+       if ((width == 0x00) && (currSCCB->Sccb_scsimsg == MSG_PARITY_ERROR)) {
                WR_HARPOON(port + hp_autostart_1,
                           (AUTO_IMMED + DISCONNECT_START));
                return;
 static void FPT_siwidr(u32 port, unsigned char width)
 {
        ARAM_ACCESS(port);
-       WRW_HARPOON((port + SYNC_MSGS + 0), (MPM_OP + AMSG_OUT + SMEXT));
+       WRW_HARPOON((port + SYNC_MSGS + 0),
+                   (MPM_OP + AMSG_OUT + EXTENDED_MESSAGE));
        WRW_HARPOON((port + SYNC_MSGS + 2), (MPM_OP + AMSG_OUT + 0x02));
-       WRW_HARPOON((port + SYNC_MSGS + 4), (MPM_OP + AMSG_OUT + SMWDTR));
+       WRW_HARPOON((port + SYNC_MSGS + 4),
+                   (MPM_OP + AMSG_OUT + EXTENDED_WDTR));
        WRW_HARPOON((port + SYNC_MSGS + 6), (RAT_OP));
        WRW_HARPOON((port + SYNC_MSGS + 8), (MPM_OP + AMSG_OUT + width));
        WRW_HARPOON((port + SYNC_MSGS + 10), (BRH_OP + ALWAYS + NP));
        }
 
        currSCCB->CdbLength = SIX_BYTE_CMD;
-       currSCCB->Cdb[0] = SCSI_REQUEST_SENSE;
+       currSCCB->Cdb[0] = REQUEST_SENSE;
        currSCCB->Cdb[1] = currSCCB->Cdb[1] & (unsigned char)0xE0;      /*Keep LUN. */
        currSCCB->Cdb[2] = 0x00;
        currSCCB->Cdb[3] = 0x00;
 */
        if ((currTar_Info->TarStatus & TAR_ALLOW_DISC) ||
            (currTar_Info->TarStatus & TAG_Q_TRYING)) {
-               p_sccb->Sccb_idmsg =
-                   (unsigned char)(SMIDENT | DISC_PRIV) | p_sccb->Lun;
-       }
-
-       else {
-
-               p_sccb->Sccb_idmsg = (unsigned char)SMIDENT | p_sccb->Lun;
+               p_sccb->Sccb_idmsg = IDENTIFY(true, p_sccb->Lun);
+       } else {
+               p_sccb->Sccb_idmsg = IDENTIFY(false, p_sccb->Lun);
        }
 
        p_sccb->HostStatus = 0x00;
  */
        p_sccb->Sccb_scsistat = BUS_FREE_ST;
        p_sccb->SccbStatus = SCCB_IN_PROCESS;
-       p_sccb->Sccb_scsimsg = SMNO_OP;
+       p_sccb->Sccb_scsimsg = NOP;
 
 }
 
                message = currSCCB->Sccb_scsimsg;
                scsiID = currSCCB->TargID;
 
-               if (message == SMDEV_RESET) {
+               if (message == TARGET_RESET) {
 
                        currTar_Info = &FPT_sccbMgrTbl[p_card][scsiID];
                        currTar_Info->TarSyncCtrl = 0;
 
                else if (currSCCB->Sccb_scsistat < COMMAND_ST) {
 
-                       if (message == SMNO_OP) {
+                       if (message == NOP) {
                                currSCCB->Sccb_MGRFlags |= F_DEV_SELECTED;
 
                                FPT_ssel(port, p_card);
                        }
                } else {
 
-                       if (message == SMABORT)
+                       if (message == ABORT_TASK_SET)
 
                                FPT_queueFlushSccb(p_card, SCCB_COMPLETE);
                }
 
        } else {
-               message = SMABORT;
+               message = ABORT_TASK_SET;
        }
 
        WRW_HARPOON((port + hp_intstat), (BUS_FREE | PHASE | XFER_CNT_0));
 
        WR_HARPOON(port + hp_portctrl_0, 0x00);
 
-       if ((message == SMABORT) || (message == SMDEV_RESET) ||
-           (message == SMABORT_TAG)) {
+       if ((message == ABORT_TASK_SET) || (message == TARGET_RESET) ||
+           (message == ABORT_TASK)) {
 
                while (!(RDW_HARPOON((port + hp_intstat)) & (BUS_FREE | PHASE))) {
                }
 
        else {
 
-               if (message == SMPARITY) {
-                       currSCCB->Sccb_scsimsg = SMNO_OP;
+               if (message == MSG_PARITY_ERROR) {
+                       currSCCB->Sccb_scsimsg = NOP;
                        WR_HARPOON(port + hp_autostart_1,
                                   (AUTO_IMMED + DISCONNECT_START));
                } else {
        }
 
        message = RD_HARPOON(port + hp_scsidata_0);
-       if ((message == SMDISC) || (message == SMSAVE_DATA_PTR)) {
+       if ((message == DISCONNECT) || (message == SAVE_POINTERS)) {
 
                WR_HARPOON(port + hp_autostart_1,
                           (AUTO_IMMED + END_DATA_START));
                        FPT_sdecm(message, port, p_card);
 
                } else {
-                       if (currSCCB->Sccb_scsimsg != SMPARITY)
+                       if (currSCCB->Sccb_scsimsg != MSG_PARITY_ERROR)
                                ACCEPT_MSG(port);
                        WR_HARPOON(port + hp_autostart_1,
                                   (AUTO_IMMED + DISCONNECT_START));
 
                currSCCB->HostStatus = SCCB_PHASE_SEQUENCE_FAIL;
                currSCCB->Sccb_scsistat = ABORT_ST;
-               currSCCB->Sccb_scsimsg = SMABORT;
+               currSCCB->Sccb_scsimsg = ABORT_TASK_SET;
        }
 
        ACCEPT_MSG_ATN(port);
 
        FPT_sccbMgrTbl[p_card][currSCCB->TargID].TarLUN_CA = 0;
 
-       if (status_byte != SSGOOD) {
+       if (status_byte != SAM_STAT_GOOD) {
 
-               if (status_byte == SSQ_FULL) {
+               if (status_byte == SAM_STAT_TASK_SET_FULL) {
 
                        if (((FPT_BL_Card[p_card].globalFlags & F_CONLUN_IO) &&
                             ((FPT_sccbMgrTbl[p_card][currSCCB->TargID].
 
                }
 
-               if (status_byte == SSCHECK) {
+               if (status_byte == SAM_STAT_CHECK_CONDITION) {
                        if (FPT_BL_Card[p_card].globalFlags & F_DO_RENEGO) {
                                if (FPT_sccbMgrTbl[p_card][currSCCB->TargID].
                                    TarEEValue & EE_SYNC_MASK) {
                        currSCCB->SccbStatus = SCCB_ERROR;
                        currSCCB->TargetStatus = status_byte;
 
-                       if (status_byte == SSCHECK) {
+                       if (status_byte == SAM_STAT_CHECK_CONDITION) {
 
                                FPT_sccbMgrTbl[p_card][currSCCB->TargID].
                                    TarLUN_CA = 1;
                if ((p_sccb->
                     ControlByte & (SCCB_DATA_XFER_OUT | SCCB_DATA_XFER_IN))
                    && (p_sccb->HostStatus == SCCB_COMPLETE)
-                   && (p_sccb->TargetStatus != SSCHECK))
-
-                       if ((SCSIcmd == SCSI_READ) ||
-                           (SCSIcmd == SCSI_WRITE) ||
-                           (SCSIcmd == SCSI_READ_EXTENDED) ||
-                           (SCSIcmd == SCSI_WRITE_EXTENDED) ||
-                           (SCSIcmd == SCSI_WRITE_AND_VERIFY) ||
-                           (SCSIcmd == SCSI_START_STOP_UNIT) ||
+                   && (p_sccb->TargetStatus != SAM_STAT_CHECK_CONDITION))
+
+                       if ((SCSIcmd == READ_6) ||
+                           (SCSIcmd == WRITE_6) ||
+                           (SCSIcmd == READ_10) ||
+                           (SCSIcmd == WRITE_10) ||
+                           (SCSIcmd == WRITE_VERIFY) ||
+                           (SCSIcmd == START_STOP) ||
                            (pCurrCard->globalFlags & F_NO_FILTER)
                            )
                                p_sccb->HostStatus = SCCB_DATA_UNDER_RUN;