summaryrefslogtreecommitdiff
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-10-29 10:10:36 +0100
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2014-03-04 15:38:18 -0800
commit74d71aec619f33ec1ff5b2090792ab96d840bd3b (patch)
tree5e855910bbcbe6d1aaf9c2eff73c07ed4f05406f /drivers/usb/storage
parentd77adc0284beea5783c52b2af49217a37c2114cd (diff)
uas: Drop fixed endpoint config handling
The fixed endpoint config code was only necessary to deal with an early uas prototype which has never been released, so lets drop it and enforce proper uas endpoint descriptors. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/uas.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 5cedc7f034b6..754468bbbfdc 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -908,31 +908,17 @@ static void uas_configure_endpoints(struct uas_dev_info *devinfo)
devinfo->cmnd = NULL;
r = uas_find_endpoints(devinfo->intf->cur_altsetting, eps);
-
- /*
- * Assume that if we didn't find a proper set of descriptors, we're
- * using a device with old firmware that happens to be set up like
- * this.
- */
- if (r != 0) {
- devinfo->cmd_pipe = usb_sndbulkpipe(udev, 1);
- devinfo->status_pipe = usb_rcvbulkpipe(udev, 1);
- devinfo->data_in_pipe = usb_rcvbulkpipe(udev, 2);
- devinfo->data_out_pipe = usb_sndbulkpipe(udev, 2);
-
- eps[1] = usb_pipe_endpoint(udev, devinfo->status_pipe);
- eps[2] = usb_pipe_endpoint(udev, devinfo->data_in_pipe);
- eps[3] = usb_pipe_endpoint(udev, devinfo->data_out_pipe);
- } else {
- devinfo->cmd_pipe = usb_sndbulkpipe(udev,
- usb_endpoint_num(&eps[0]->desc));
- devinfo->status_pipe = usb_rcvbulkpipe(udev,
- usb_endpoint_num(&eps[1]->desc));
- devinfo->data_in_pipe = usb_rcvbulkpipe(udev,
- usb_endpoint_num(&eps[2]->desc));
- devinfo->data_out_pipe = usb_sndbulkpipe(udev,
- usb_endpoint_num(&eps[3]->desc));
- }
+ if (r)
+ return r;
+
+ devinfo->cmd_pipe = usb_sndbulkpipe(udev,
+ usb_endpoint_num(&eps[0]->desc));
+ devinfo->status_pipe = usb_rcvbulkpipe(udev,
+ usb_endpoint_num(&eps[1]->desc));
+ devinfo->data_in_pipe = usb_rcvbulkpipe(udev,
+ usb_endpoint_num(&eps[2]->desc));
+ devinfo->data_out_pipe = usb_sndbulkpipe(udev,
+ usb_endpoint_num(&eps[3]->desc));
devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1, 3, 256,
GFP_KERNEL);