diff options
Diffstat (limited to 'drivers/usb/storage/uas.c')
-rw-r--r-- | drivers/usb/storage/uas.c | 13 |
1 files changed, 7 insertions, 6 deletions
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) |