Commit 87de1db1 authored by Gavin Li's avatar Gavin Li Committed by Ben Hutchings

cdc-acm: fix wrong pipe type on rx interrupt xfers

commit add12505 upstream.

This fixes the "BOGUS urb xfer" warning logged by usb_submit_urb().
Signed-off-by: default avatarGavin Li <git@thegavinli.com>
Acked-by: default avatarOliver Neukum <oneukum@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent d6bc81fc
...@@ -1336,7 +1336,6 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1336,7 +1336,6 @@ static int acm_probe(struct usb_interface *intf,
spin_lock_init(&acm->write_lock); spin_lock_init(&acm->write_lock);
spin_lock_init(&acm->read_lock); spin_lock_init(&acm->read_lock);
mutex_init(&acm->mutex); mutex_init(&acm->mutex);
acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress);
acm->is_int_ep = usb_endpoint_xfer_int(epread); acm->is_int_ep = usb_endpoint_xfer_int(epread);
if (acm->is_int_ep) if (acm->is_int_ep)
acm->bInterval = epread->bInterval; acm->bInterval = epread->bInterval;
...@@ -1386,14 +1385,14 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1386,14 +1385,14 @@ static int acm_probe(struct usb_interface *intf,
urb->transfer_dma = rb->dma; urb->transfer_dma = rb->dma;
if (acm->is_int_ep) { if (acm->is_int_ep) {
usb_fill_int_urb(urb, acm->dev, usb_fill_int_urb(urb, acm->dev,
acm->rx_endpoint, usb_rcvintpipe(usb_dev, epread->bEndpointAddress),
rb->base, rb->base,
acm->readsize, acm->readsize,
acm_read_bulk_callback, rb, acm_read_bulk_callback, rb,
acm->bInterval); acm->bInterval);
} else { } else {
usb_fill_bulk_urb(urb, acm->dev, usb_fill_bulk_urb(urb, acm->dev,
acm->rx_endpoint, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress),
rb->base, rb->base,
acm->readsize, acm->readsize,
acm_read_bulk_callback, rb); acm_read_bulk_callback, rb);
......
...@@ -95,7 +95,6 @@ struct acm { ...@@ -95,7 +95,6 @@ struct acm {
struct urb *read_urbs[ACM_NR]; struct urb *read_urbs[ACM_NR];
struct acm_rb read_buffers[ACM_NR]; struct acm_rb read_buffers[ACM_NR];
int rx_buflimit; int rx_buflimit;
int rx_endpoint;
spinlock_t read_lock; spinlock_t read_lock;
int write_used; /* number of non-empty write buffers */ int write_used; /* number of non-empty write buffers */
int transmitting; int transmitting;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment