summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Li <git@thegavinli.com>2016-08-12 00:52:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-07 08:30:00 +0200
commit8713d9cf42146793d84bf221ecff85e1dfa7e1fd (patch)
tree132154ff6a2d600dc649cad3dd2abda89ef134c5
parent67d4aa44188d0da7f661972a88f9ac448e4fd2fe (diff)
downloadlinux-stable-8713d9cf42146793d84bf221ecff85e1dfa7e1fd.tar.gz
linux-stable-8713d9cf42146793d84bf221ecff85e1dfa7e1fd.tar.bz2
linux-stable-8713d9cf42146793d84bf221ecff85e1dfa7e1fd.zip
cdc-acm: fix wrong pipe type on rx interrupt xfers
commit add125054b8727103631dce116361668436ef6a7 upstream. This fixes the "BOGUS urb xfer" warning logged by usb_submit_urb(). Signed-off-by: Gavin Li <git@thegavinli.com> Acked-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/class/cdc-acm.c5
-rw-r--r--drivers/usb/class/cdc-acm.h1
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index b6f5c7d3737b..18cb44d9cbd8 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1296,7 +1296,6 @@ made_compressed_probe:
spin_lock_init(&acm->write_lock);
spin_lock_init(&acm->read_lock);
mutex_init(&acm->mutex);
- acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress);
acm->is_int_ep = usb_endpoint_xfer_int(epread);
if (acm->is_int_ep)
acm->bInterval = epread->bInterval;
@@ -1345,14 +1344,14 @@ made_compressed_probe:
urb->transfer_dma = rb->dma;
if (acm->is_int_ep) {
usb_fill_int_urb(urb, acm->dev,
- acm->rx_endpoint,
+ usb_rcvintpipe(usb_dev, epread->bEndpointAddress),
rb->base,
acm->readsize,
acm_read_bulk_callback, rb,
acm->bInterval);
} else {
usb_fill_bulk_urb(urb, acm->dev,
- acm->rx_endpoint,
+ usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress),
rb->base,
acm->readsize,
acm_read_bulk_callback, rb);
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 80826f843e04..82db3387ac6e 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -95,7 +95,6 @@ struct acm {
struct urb *read_urbs[ACM_NR];
struct acm_rb read_buffers[ACM_NR];
int rx_buflimit;
- int rx_endpoint;
spinlock_t read_lock;
int write_used; /* number of non-empty write buffers */
int transmitting;