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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux