From: Oliver Neukum <oneukum@suse.com>
To: "WeitaoWang-oc@zhaoxin.com" <WeitaoWang-oc@zhaoxin.com>,
Oliver Neukum <oneukum@suse.com>,
stern@rowland.harvard.edu, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, usb-storage@lists.one-eyed-alien.net
Cc: WeitaoWang@zhaoxin.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] USB:UAS:return ENODEV when submit urbs fail with device not attached.
Date: Thu, 29 Feb 2024 09:08:59 +0100 [thread overview]
Message-ID: <9263b77e-9ebe-4987-bf7f-8f9fafcf06b3@suse.com> (raw)
In-Reply-To: <0b0eefa5-71b6-dc08-d103-72b9aebd9237@zhaoxin.com>
On 29.02.24 12:19, WeitaoWang-oc@zhaoxin.com wrote:
> When alloc urb fail in the same function uas_submit_urbs,
> whether we should replace SCSI_MLQUEUE_DEVICE_BUSY with generic
> error code -ENOMEM? Such like this:
>
> @@ -572,7 +571,7 @@ static int uas_submit_urbs(struct scsi_cmnd *cmnd,
> cmdinfo->data_in_urb = uas_alloc_data_urb(devinfo, GFP_ATOMIC,
> cmnd, DMA_FROM_DEVICE);
> if (!cmdinfo->data_in_urb)
> - return SCSI_MLQUEUE_DEVICE_BUSY;
> + return -ENOMEM;
> cmdinfo->state &= ~ALLOC_DATA_IN_URB;
> }
Hi,
yes, and then you translate in one central place for the SCSI layer
into DID_ERROR or DID_NO_CONNECT.
Regards
Oliver
next prev parent reply other threads:[~2024-02-29 8:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 11:15 [PATCH v2] USB:UAS:return ENODEV when submit urbs fail with device not attached Weitao Wang
2024-02-28 8:00 ` Oliver Neukum
2024-02-28 22:32 ` WeitaoWang-oc
2024-02-28 14:47 ` Oliver Neukum
2024-02-29 11:19 ` WeitaoWang-oc
2024-02-29 8:08 ` Oliver Neukum [this message]
2024-02-29 16:40 ` WeitaoWang-oc
2024-02-29 10:14 ` Oliver Neukum
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=9263b77e-9ebe-4987-bf7f-8f9fafcf06b3@suse.com \
--to=oneukum@suse.com \
--cc=WeitaoWang-oc@zhaoxin.com \
--cc=WeitaoWang@zhaoxin.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox