Re: [PATCH v2] USB:UAS:return ENODEV when submit urbs fail with device not attached.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29.02.24 12:19, WeitaoWang-oc@xxxxxxxxxxx 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





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux