On Fri, Nov 15, 2019 at 09:05:52AM +0100, Hannes Reinecke wrote: static bool fail_posted_scbs_iter(struct request *rq, void *data, bool reserved) > { > + struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); > > + cmd->result = (DID_OK << 16) | SAM_STAT_TASK_SET_FULL; Not new in this patch, but SAM_STAT_TASK_SET_FULL seems like an odd error code for bouncing all commands to the mid layer after an reset. > + cmd->scsi_done(cmd); > + > + return true; > +} > + > +static void adpt_fail_posted_scbs(adpt_hba* pHba) > +{ > + blk_mq_tagset_busy_iter(&pHba->host->tag_set, > + fail_posted_scbs_iter, NULL); Should this be a scsi layer helper? In the future it also sounds like we migh want to move something like this to be called from common code, as letting the other command posted to the hardware just time out after a host reset is rather silly.