> > > When sending a reset fib we shouldn't rely on the scsi command, but rather set > the TMF status in the map_info->reset_state variable. > That allows us to send a TMF independent on a scsi command. > > Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> > --- <snip> > /* > * aac_eh_dev_reset - Device reset command handling > * @scsi_cmd: SCSI command block causing the reset > +921,19 @@ static int aac_eh_dev_reset(struct scsi_cmnd *cmd) <snip> > > /* Wait up to 15 seconds for completion */ > for (count = 0; count < 15; ++count) { > - if (cmd->SCp.sent_command) { > - ret = SUCCESS; > + if (info->reset_state == 0) { Should this be <= 0, as in target reset? Otherwise it will always be success ... -Dave > + ret = info->reset_state == 0 ? SUCCESS : FAILED; > break;