diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-21 21:33:17 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-21 21:33:17 -0400 |
| commit | 1aaaa9acaea1dd2878d6c92b45e4c117ef425baf (patch) | |
| tree | f1fe5948a6da8850862ae751da0b62dac351517f /drivers/usb/misc | |
| parent | 73577d61799e8d8bb7d69a9acdc54923e5998138 (diff) | |
| parent | fa8410b355251fd30341662a40ac6b22d3e38468 (diff) | |
Merge 4.8-rc3 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
| -rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 10 | ||||
| -rw-r--r-- | drivers/usb/misc/usbtest.c | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 4eb1e2e3f039..16765b3e0b1b 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
| @@ -662,7 +662,7 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer, | |||
| 662 | { | 662 | { |
| 663 | char data[30 *3 + 4]; | 663 | char data[30 *3 + 4]; |
| 664 | char *d = data; | 664 | char *d = data; |
| 665 | int m = (sizeof(data) - 1) / 3; | 665 | int m = (sizeof(data) - 1) / 3 - 1; |
| 666 | int bytes_read = 0; | 666 | int bytes_read = 0; |
| 667 | int retry_on_empty = 10; | 667 | int retry_on_empty = 10; |
| 668 | int retry_on_timeout = 5; | 668 | int retry_on_timeout = 5; |
| @@ -1678,7 +1678,7 @@ wait:if (ftdi->disconnected > 0) { | |||
| 1678 | int i = 0; | 1678 | int i = 0; |
| 1679 | char data[30 *3 + 4]; | 1679 | char data[30 *3 + 4]; |
| 1680 | char *d = data; | 1680 | char *d = data; |
| 1681 | int m = (sizeof(data) - 1) / 3; | 1681 | int m = (sizeof(data) - 1) / 3 - 1; |
| 1682 | int l = 0; | 1682 | int l = 0; |
| 1683 | struct u132_target *target = &ftdi->target[ed]; | 1683 | struct u132_target *target = &ftdi->target[ed]; |
| 1684 | struct u132_command *command = &ftdi->command[ | 1684 | struct u132_command *command = &ftdi->command[ |
| @@ -1870,7 +1870,7 @@ more:{ | |||
| 1870 | if (packet_bytes > 2) { | 1870 | if (packet_bytes > 2) { |
| 1871 | char diag[30 *3 + 4]; | 1871 | char diag[30 *3 + 4]; |
| 1872 | char *d = diag; | 1872 | char *d = diag; |
| 1873 | int m = (sizeof(diag) - 1) / 3; | 1873 | int m = (sizeof(diag) - 1) / 3 - 1; |
| 1874 | char *b = ftdi->bulk_in_buffer; | 1874 | char *b = ftdi->bulk_in_buffer; |
| 1875 | int bytes_read = 0; | 1875 | int bytes_read = 0; |
| 1876 | diag[0] = 0; | 1876 | diag[0] = 0; |
| @@ -2043,7 +2043,7 @@ static int ftdi_elan_synchronize(struct usb_ftdi *ftdi) | |||
| 2043 | if (packet_bytes > 2) { | 2043 | if (packet_bytes > 2) { |
| 2044 | char diag[30 *3 + 4]; | 2044 | char diag[30 *3 + 4]; |
| 2045 | char *d = diag; | 2045 | char *d = diag; |
| 2046 | int m = (sizeof(diag) - 1) / 3; | 2046 | int m = (sizeof(diag) - 1) / 3 - 1; |
| 2047 | char *b = ftdi->bulk_in_buffer; | 2047 | char *b = ftdi->bulk_in_buffer; |
| 2048 | int bytes_read = 0; | 2048 | int bytes_read = 0; |
| 2049 | unsigned char c = 0; | 2049 | unsigned char c = 0; |
| @@ -2145,7 +2145,7 @@ more:{ | |||
| 2145 | if (packet_bytes > 2) { | 2145 | if (packet_bytes > 2) { |
| 2146 | char diag[30 *3 + 4]; | 2146 | char diag[30 *3 + 4]; |
| 2147 | char *d = diag; | 2147 | char *d = diag; |
| 2148 | int m = (sizeof(diag) - 1) / 3; | 2148 | int m = (sizeof(diag) - 1) / 3 - 1; |
| 2149 | char *b = ftdi->bulk_in_buffer; | 2149 | char *b = ftdi->bulk_in_buffer; |
| 2150 | int bytes_read = 0; | 2150 | int bytes_read = 0; |
| 2151 | diag[0] = 0; | 2151 | diag[0] = 0; |
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 6b978f04b8d7..5c8210dc6fd9 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
| @@ -585,7 +585,6 @@ static void sg_timeout(unsigned long _req) | |||
| 585 | { | 585 | { |
| 586 | struct usb_sg_request *req = (struct usb_sg_request *) _req; | 586 | struct usb_sg_request *req = (struct usb_sg_request *) _req; |
| 587 | 587 | ||
| 588 | req->status = -ETIMEDOUT; | ||
| 589 | usb_sg_cancel(req); | 588 | usb_sg_cancel(req); |
| 590 | } | 589 | } |
| 591 | 590 | ||
| @@ -616,8 +615,10 @@ static int perform_sglist( | |||
| 616 | mod_timer(&sg_timer, jiffies + | 615 | mod_timer(&sg_timer, jiffies + |
| 617 | msecs_to_jiffies(SIMPLE_IO_TIMEOUT)); | 616 | msecs_to_jiffies(SIMPLE_IO_TIMEOUT)); |
| 618 | usb_sg_wait(req); | 617 | usb_sg_wait(req); |
| 619 | del_timer_sync(&sg_timer); | 618 | if (!del_timer_sync(&sg_timer)) |
| 620 | retval = req->status; | 619 | retval = -ETIMEDOUT; |
| 620 | else | ||
| 621 | retval = req->status; | ||
| 621 | 622 | ||
| 622 | /* FIXME check resulting data pattern */ | 623 | /* FIXME check resulting data pattern */ |
| 623 | 624 | ||
| @@ -2602,7 +2603,7 @@ usbtest_ioctl(struct usb_interface *intf, unsigned int code, void *buf) | |||
| 2602 | ktime_get_ts64(&start); | 2603 | ktime_get_ts64(&start); |
| 2603 | 2604 | ||
| 2604 | retval = usbtest_do_ioctl(intf, param_32); | 2605 | retval = usbtest_do_ioctl(intf, param_32); |
| 2605 | if (retval) | 2606 | if (retval < 0) |
| 2606 | goto free_mutex; | 2607 | goto free_mutex; |
| 2607 | 2608 | ||
| 2608 | ktime_get_ts64(&end); | 2609 | ktime_get_ts64(&end); |
