Re: [PATCH v4 2/2] scsi: libsas: terminate deferred commands on time out
Damien Le Moal <[email protected]> Thu, 16 Jul 2026 16:16:43 +0900
| Newsgroups | gmane.linux.scsi,gmane.linux.ide |
|---|---|
| Organization | Western Digital Research |
| Message-ID | <[email protected]> |
On 7/16/26 02:37, John Garry wrote:
>> +/*
>> + * Handle deferred QCs in case of a command timeout.
>> + * See ata_scsi_eh_timed_out() for details.
>> + */
>> +enum scsi_timeout_action sas_eh_timed_out(struct scsi_cmnd *cmd)
>> +{
>> + struct domain_device *dev = NULL;
>> +
>> + if (cmd)
>
> Can cmd ever be NULL? AFAICS, the only caller is scsi_timeout() and cmd
> can never be NULL there.
>
>> + dev = cmd_to_domain_dev(cmd);
>> + if (dev && dev_is_sata(dev))
>
> furthermore, I don't think that dev can ever be NULL (even from
> cmd_to_domain_dev())
Good point. Will simplify this.
--
Damien Le Moal
Western Digital Research