[PATCH] UAS: fallback to storage if no streams are available

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

 



From: Oliver Neukum <oneukum@xxxxxxx>

uas_probe() calls usb_alloc_streams(). That can fail on XHCI
with -ENOSYS if the controller doesn't support streams. In that
case devices should be handed over to storage. Thus the driver
needs to return -ENODEV so that the driver core will give other
drivers a chance.

Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
---
 drivers/usb/storage/uas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index a7ac97c..4dc1aa5 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -1110,7 +1110,7 @@ set_alt0:
 	usb_set_interface(udev, intf->altsetting[0].desc.bInterfaceNumber, 0);
 	if (shost)
 		scsi_host_put(shost);
-	return result;
+	return result == -ENOSYS ? -ENODEV : result;
 }
 
 static int uas_pre_reset(struct usb_interface *intf)
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux