diff options
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/uas-detect.h | 6 | ||||
-rw-r--r-- | drivers/usb/storage/uas.c | 6 | ||||
-rw-r--r-- | drivers/usb/storage/usb.c | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h index 9893d696fc97..63ae1619fdb8 100644 --- a/drivers/usb/storage/uas-detect.h +++ b/drivers/usb/storage/uas-detect.h | |||
@@ -51,7 +51,8 @@ static int uas_find_endpoints(struct usb_host_interface *alt, | |||
51 | } | 51 | } |
52 | 52 | ||
53 | static int uas_use_uas_driver(struct usb_interface *intf, | 53 | static int uas_use_uas_driver(struct usb_interface *intf, |
54 | const struct usb_device_id *id) | 54 | const struct usb_device_id *id, |
55 | unsigned long *flags_ret) | ||
55 | { | 56 | { |
56 | struct usb_host_endpoint *eps[4] = { }; | 57 | struct usb_host_endpoint *eps[4] = { }; |
57 | struct usb_device *udev = interface_to_usbdev(intf); | 58 | struct usb_device *udev = interface_to_usbdev(intf); |
@@ -132,5 +133,8 @@ static int uas_use_uas_driver(struct usb_interface *intf, | |||
132 | return 0; | 133 | return 0; |
133 | } | 134 | } |
134 | 135 | ||
136 | if (flags_ret) | ||
137 | *flags_ret = flags; | ||
138 | |||
135 | return 1; | 139 | return 1; |
136 | } | 140 | } |
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 6cdabdc119a7..c6109c111aab 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c | |||
@@ -887,8 +887,9 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
887 | struct Scsi_Host *shost = NULL; | 887 | struct Scsi_Host *shost = NULL; |
888 | struct uas_dev_info *devinfo; | 888 | struct uas_dev_info *devinfo; |
889 | struct usb_device *udev = interface_to_usbdev(intf); | 889 | struct usb_device *udev = interface_to_usbdev(intf); |
890 | unsigned long dev_flags; | ||
890 | 891 | ||
891 | if (!uas_use_uas_driver(intf, id)) | 892 | if (!uas_use_uas_driver(intf, id, &dev_flags)) |
892 | return -ENODEV; | 893 | return -ENODEV; |
893 | 894 | ||
894 | if (uas_switch_interface(udev, intf)) | 895 | if (uas_switch_interface(udev, intf)) |
@@ -910,8 +911,7 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
910 | devinfo->udev = udev; | 911 | devinfo->udev = udev; |
911 | devinfo->resetting = 0; | 912 | devinfo->resetting = 0; |
912 | devinfo->shutdown = 0; | 913 | devinfo->shutdown = 0; |
913 | devinfo->flags = id->driver_info; | 914 | devinfo->flags = dev_flags; |
914 | usb_stor_adjust_quirks(udev, &devinfo->flags); | ||
915 | init_usb_anchor(&devinfo->cmd_urbs); | 915 | init_usb_anchor(&devinfo->cmd_urbs); |
916 | init_usb_anchor(&devinfo->sense_urbs); | 916 | init_usb_anchor(&devinfo->sense_urbs); |
917 | init_usb_anchor(&devinfo->data_urbs); | 917 | init_usb_anchor(&devinfo->data_urbs); |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 5600c33fcadb..db6f6b5ec745 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -1080,7 +1080,7 @@ static int storage_probe(struct usb_interface *intf, | |||
1080 | 1080 | ||
1081 | /* If uas is enabled and this device can do uas then ignore it. */ | 1081 | /* If uas is enabled and this device can do uas then ignore it. */ |
1082 | #if IS_ENABLED(CONFIG_USB_UAS) | 1082 | #if IS_ENABLED(CONFIG_USB_UAS) |
1083 | if (uas_use_uas_driver(intf, id)) | 1083 | if (uas_use_uas_driver(intf, id, NULL)) |
1084 | return -ENXIO; | 1084 | return -ENXIO; |
1085 | #endif | 1085 | #endif |
1086 | 1086 | ||