[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9263b77e-9ebe-4987-bf7f-8f9fafcf06b3@suse.com>
Date: Thu, 29 Feb 2024 09:08:59 +0100
From: Oliver Neukum <oneukum@...e.com>
To: "WeitaoWang-oc@...oxin.com" <WeitaoWang-oc@...oxin.com>,
Oliver Neukum <oneukum@...e.com>, stern@...land.harvard.edu,
gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
usb-storage@...ts.one-eyed-alien.net
Cc: WeitaoWang@...oxin.com, stable@...r.kernel.org
Subject: Re: [PATCH v2] USB:UAS:return ENODEV when submit urbs fail with
device not attached.
On 29.02.24 12:19, WeitaoWang-oc@...oxin.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
Powered by blists - more mailing lists