All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: John Garry <john.g.garry@oracle.com>,
	linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>,
	linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Igor Pylypiv <ipylypiv@google.com>, Jason Yan <yanaijie@huawei.com>
Subject: Re: [PATCH v4 2/2] scsi: libsas: terminate deferred commands on time out
Date: Thu, 16 Jul 2026 16:16:43 +0900	[thread overview]
Message-ID: <593bac89-9e1f-459f-8e08-2cb9a2dad528@kernel.org> (raw)
In-Reply-To: <b2300bba-73dc-4555-ad99-4e440b918a91@oracle.com>

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

      reply	other threads:[~2026-07-16  7:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  8:58 [PATCH v4 0/2] fixup handling of timeouts with deferred QCs Damien Le Moal
2026-07-15  8:58 ` [PATCH v4 1/2] ata: libata-scsi: terminate deferred commands on time out Damien Le Moal
2026-07-15  9:20   ` sashiko-bot
2026-07-16 11:15     ` Niklas Cassel
2026-07-16 11:26       ` Damien Le Moal
2026-07-15  8:58 ` [PATCH v4 2/2] scsi: libsas: " Damien Le Moal
2026-07-15 17:37   ` John Garry
2026-07-16  7:16     ` Damien Le Moal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=593bac89-9e1f-459f-8e08-2cb9a2dad528@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=ipylypiv@google.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yanaijie@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.