/* kref: INIT */
        kref_put(&sp->cmd_kref, qla2x00_sp_release);
        cmd->result = res;
-       CMD_SP(cmd) = NULL;
+       sp->type = 0;
        scsi_done(cmd);
        if (comp)
                complete(comp);
        /* ref: INIT */
        kref_put(&sp->cmd_kref, qla2x00_sp_release);
        cmd->result = res;
-       CMD_SP(cmd) = NULL;
+       sp->type = 0;
        scsi_done(cmd);
        if (comp)
                complete(comp);
 
        sp->u.scmd.cmd = cmd;
        sp->type = SRB_SCSI_CMD;
-
-       CMD_SP(cmd) = (void *)sp;
        sp->free = qla2x00_sp_free_dma;
        sp->done = qla2x00_sp_compl;
 
 
        sp->u.scmd.cmd = cmd;
        sp->type = SRB_SCSI_CMD;
-       CMD_SP(cmd) = (void *)sp;
        sp->free = qla2xxx_qpair_sp_free_dma;
        sp->done = qla2xxx_qpair_sp_compl;
 
        unsigned long wait_iter = ABORT_WAIT_ITER;
        scsi_qla_host_t *vha = shost_priv(cmd->device->host);
        struct qla_hw_data *ha = vha->hw;
+       srb_t *sp = scsi_cmd_priv(cmd);
        int ret = QLA_SUCCESS;
 
        if (unlikely(pci_channel_offline(ha->pdev)) || ha->flags.eeh_busy) {
                return ret;
        }
 
-       while (CMD_SP(cmd) && wait_iter--) {
+       while (sp->type && wait_iter--)
                msleep(ABORT_POLLING_PERIOD);
-       }
-       if (CMD_SP(cmd))
+       if (sp->type)
                ret = QLA_FUNCTION_FAILED;
 
        return ret;