* do not try to be smart about what to do with this deferred command
* and simply retry it by completing it with DID_SOFT_ERROR.
*/
- if (!qc)
- return;
-
- scmd = qc->scsicmd;
- ap->deferred_qc = NULL;
- cancel_work(&ap->deferred_qc_work);
- ata_qc_free(qc);
- scmd->result = (DID_SOFT_ERROR << 16);
- scsi_done(scmd);
+ if (qc) {
+ ap->deferred_qc = NULL;
++ cancel_work(&ap->deferred_qc_work);
+ ata_scsi_qc_done(qc, true, DID_SOFT_ERROR << 16);
+ }
}
static void ata_scsi_schedule_deferred_qc(struct ata_port *ap)