diff options
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/shuttle_usbat.c | 2 | ||||
-rw-r--r-- | drivers/usb/storage/uas.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_devs.h | 14 |
3 files changed, 22 insertions, 7 deletions
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index 4ef2a80728f7..008d805c3d21 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c | |||
@@ -1851,7 +1851,7 @@ static int usbat_probe(struct usb_interface *intf, | |||
1851 | us->transport_name = "Shuttle USBAT"; | 1851 | us->transport_name = "Shuttle USBAT"; |
1852 | us->transport = usbat_flash_transport; | 1852 | us->transport = usbat_flash_transport; |
1853 | us->transport_reset = usb_stor_CB_reset; | 1853 | us->transport_reset = usb_stor_CB_reset; |
1854 | us->max_lun = 1; | 1854 | us->max_lun = 0; |
1855 | 1855 | ||
1856 | result = usb_stor_probe2(us); | 1856 | result = usb_stor_probe2(us); |
1857 | return result; | 1857 | return result; |
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index a7ac97cc5949..511b22953167 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c | |||
@@ -137,7 +137,7 @@ static void uas_do_work(struct work_struct *work) | |||
137 | if (!(cmdinfo->state & IS_IN_WORK_LIST)) | 137 | if (!(cmdinfo->state & IS_IN_WORK_LIST)) |
138 | continue; | 138 | continue; |
139 | 139 | ||
140 | err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_NOIO); | 140 | err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC); |
141 | if (!err) | 141 | if (!err) |
142 | cmdinfo->state &= ~IS_IN_WORK_LIST; | 142 | cmdinfo->state &= ~IS_IN_WORK_LIST; |
143 | else | 143 | else |
@@ -803,7 +803,7 @@ static int uas_eh_task_mgmt(struct scsi_cmnd *cmnd, | |||
803 | 803 | ||
804 | devinfo->running_task = 1; | 804 | devinfo->running_task = 1; |
805 | memset(&devinfo->response, 0, sizeof(devinfo->response)); | 805 | memset(&devinfo->response, 0, sizeof(devinfo->response)); |
806 | sense_urb = uas_submit_sense_urb(cmnd, GFP_NOIO, | 806 | sense_urb = uas_submit_sense_urb(cmnd, GFP_ATOMIC, |
807 | devinfo->use_streams ? tag : 0); | 807 | devinfo->use_streams ? tag : 0); |
808 | if (!sense_urb) { | 808 | if (!sense_urb) { |
809 | shost_printk(KERN_INFO, shost, | 809 | shost_printk(KERN_INFO, shost, |
@@ -813,7 +813,7 @@ static int uas_eh_task_mgmt(struct scsi_cmnd *cmnd, | |||
813 | spin_unlock_irqrestore(&devinfo->lock, flags); | 813 | spin_unlock_irqrestore(&devinfo->lock, flags); |
814 | return FAILED; | 814 | return FAILED; |
815 | } | 815 | } |
816 | if (uas_submit_task_urb(cmnd, GFP_NOIO, function, tag)) { | 816 | if (uas_submit_task_urb(cmnd, GFP_ATOMIC, function, tag)) { |
817 | shost_printk(KERN_INFO, shost, | 817 | shost_printk(KERN_INFO, shost, |
818 | "%s: %s: submit task mgmt urb failed\n", | 818 | "%s: %s: submit task mgmt urb failed\n", |
819 | __func__, fname); | 819 | __func__, fname); |
@@ -1030,7 +1030,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo) | |||
1030 | devinfo->use_streams = 0; | 1030 | devinfo->use_streams = 0; |
1031 | } else { | 1031 | } else { |
1032 | devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1, | 1032 | devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1, |
1033 | 3, 256, GFP_KERNEL); | 1033 | 3, 256, GFP_NOIO); |
1034 | if (devinfo->qdepth < 0) | 1034 | if (devinfo->qdepth < 0) |
1035 | return devinfo->qdepth; | 1035 | return devinfo->qdepth; |
1036 | devinfo->use_streams = 1; | 1036 | devinfo->use_streams = 1; |
@@ -1047,7 +1047,7 @@ static void uas_free_streams(struct uas_dev_info *devinfo) | |||
1047 | eps[0] = usb_pipe_endpoint(udev, devinfo->status_pipe); | 1047 | eps[0] = usb_pipe_endpoint(udev, devinfo->status_pipe); |
1048 | eps[1] = usb_pipe_endpoint(udev, devinfo->data_in_pipe); | 1048 | eps[1] = usb_pipe_endpoint(udev, devinfo->data_in_pipe); |
1049 | eps[2] = usb_pipe_endpoint(udev, devinfo->data_out_pipe); | 1049 | eps[2] = usb_pipe_endpoint(udev, devinfo->data_out_pipe); |
1050 | usb_free_streams(devinfo->intf, eps, 3, GFP_KERNEL); | 1050 | usb_free_streams(devinfo->intf, eps, 3, GFP_NOIO); |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id) | 1053 | static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id) |
@@ -1096,16 +1096,17 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1096 | if (result) | 1096 | if (result) |
1097 | goto free_streams; | 1097 | goto free_streams; |
1098 | 1098 | ||
1099 | usb_set_intfdata(intf, shost); | ||
1099 | result = scsi_add_host(shost, &intf->dev); | 1100 | result = scsi_add_host(shost, &intf->dev); |
1100 | if (result) | 1101 | if (result) |
1101 | goto free_streams; | 1102 | goto free_streams; |
1102 | 1103 | ||
1103 | scsi_scan_host(shost); | 1104 | scsi_scan_host(shost); |
1104 | usb_set_intfdata(intf, shost); | ||
1105 | return result; | 1105 | return result; |
1106 | 1106 | ||
1107 | free_streams: | 1107 | free_streams: |
1108 | uas_free_streams(devinfo); | 1108 | uas_free_streams(devinfo); |
1109 | usb_set_intfdata(intf, NULL); | ||
1109 | set_alt0: | 1110 | set_alt0: |
1110 | usb_set_interface(udev, intf->altsetting[0].desc.bInterfaceNumber, 0); | 1111 | usb_set_interface(udev, intf->altsetting[0].desc.bInterfaceNumber, 0); |
1111 | if (shost) | 1112 | if (shost) |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index f4a82291894a..174a447868cd 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -234,6 +234,20 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x0370, | |||
234 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 234 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
235 | US_FL_MAX_SECTORS_64 ), | 235 | US_FL_MAX_SECTORS_64 ), |
236 | 236 | ||
237 | /* Reported by Daniele Forsi <dforsi@gmail.com> */ | ||
238 | UNUSUAL_DEV( 0x0421, 0x04b9, 0x0350, 0x0350, | ||
239 | "Nokia", | ||
240 | "5300", | ||
241 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
242 | US_FL_MAX_SECTORS_64 ), | ||
243 | |||
244 | /* Patch submitted by Victor A. Santos <victoraur.santos@gmail.com> */ | ||
245 | UNUSUAL_DEV( 0x0421, 0x05af, 0x0742, 0x0742, | ||
246 | "Nokia", | ||
247 | "305", | ||
248 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
249 | US_FL_MAX_SECTORS_64), | ||
250 | |||
237 | /* Patch submitted by Mikhail Zolotaryov <lebon@lebon.org.ua> */ | 251 | /* Patch submitted by Mikhail Zolotaryov <lebon@lebon.org.ua> */ |
238 | UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110, | 252 | UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110, |
239 | "Nokia", | 253 | "Nokia", |