diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-13 13:23:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-13 13:23:03 -0400 |
commit | 51feb98d2547a389be2f666514f5bcd658f79eab (patch) | |
tree | bd3d3eb486a0008340afd5807d9d2db12ec3b7b3 /drivers/usb/class | |
parent | 8f8f013478133eb98e35e1d669c98c5e39d769c7 (diff) | |
parent | dc7520c17982ca4232233d2781e5cde29e58fbad (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (48 commits)
USB: otg: fix module reinsert issue
USB: handle zero-length usbfs submissions correctly
USB: EHCI: report actual_length for iso transfers
USB: option: remove unnecessary and erroneous code
USB: cypress_m8: remove invalid Clear-Halt
USB: musb_host: undo incorrect change in musb_advance_schedule()
USB: fix LANGID=0 regression
USB: serial: sierra driver id_table additions
USB serial: Add ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter.
USB: fix race leading to a write after kfree in usbfs
USB: Sierra: fix oops upon device close
USB: option.c: add A-Link 3GU device id
USB: Serial: Add support for Arkham Technology adapters
USB: Fix option_ms regression in 2.6.31-rc2
USB: gadget audio: select SND_PCM
USB: ftdi: support NDI devices
Revert USB: usbfs: deprecate and hide option for !embedded
USB: usb.h: fix kernel-doc notation
USB: RNDIS gadget, fix issues talking from PXA
USB: serial: FTDI with product code FB80 and vendor id 0403
...
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 31 | ||||
-rw-r--r-- | drivers/usb/class/usbtmc.c | 10 |
2 files changed, 29 insertions, 12 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 3f1045993474..5b15d9d8896b 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -387,6 +387,7 @@ static void acm_rx_tasklet(unsigned long _acm) | |||
387 | struct acm_ru *rcv; | 387 | struct acm_ru *rcv; |
388 | unsigned long flags; | 388 | unsigned long flags; |
389 | unsigned char throttled; | 389 | unsigned char throttled; |
390 | struct usb_host_endpoint *ep; | ||
390 | 391 | ||
391 | dbg("Entering acm_rx_tasklet"); | 392 | dbg("Entering acm_rx_tasklet"); |
392 | 393 | ||
@@ -462,11 +463,20 @@ urbs: | |||
462 | 463 | ||
463 | rcv->buffer = buf; | 464 | rcv->buffer = buf; |
464 | 465 | ||
465 | usb_fill_bulk_urb(rcv->urb, acm->dev, | 466 | ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out) |
466 | acm->rx_endpoint, | 467 | [usb_pipeendpoint(acm->rx_endpoint)]; |
467 | buf->base, | 468 | if (usb_endpoint_xfer_int(&ep->desc)) |
468 | acm->readsize, | 469 | usb_fill_int_urb(rcv->urb, acm->dev, |
469 | acm_read_bulk, rcv); | 470 | acm->rx_endpoint, |
471 | buf->base, | ||
472 | acm->readsize, | ||
473 | acm_read_bulk, rcv, ep->desc.bInterval); | ||
474 | else | ||
475 | usb_fill_bulk_urb(rcv->urb, acm->dev, | ||
476 | acm->rx_endpoint, | ||
477 | buf->base, | ||
478 | acm->readsize, | ||
479 | acm_read_bulk, rcv); | ||
470 | rcv->urb->transfer_dma = buf->dma; | 480 | rcv->urb->transfer_dma = buf->dma; |
471 | rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | 481 | rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; |
472 | 482 | ||
@@ -1227,9 +1237,14 @@ made_compressed_probe: | |||
1227 | goto alloc_fail7; | 1237 | goto alloc_fail7; |
1228 | } | 1238 | } |
1229 | 1239 | ||
1230 | usb_fill_bulk_urb(snd->urb, usb_dev, | 1240 | if (usb_endpoint_xfer_int(epwrite)) |
1231 | usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress), | 1241 | usb_fill_int_urb(snd->urb, usb_dev, |
1232 | NULL, acm->writesize, acm_write_bulk, snd); | 1242 | usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress), |
1243 | NULL, acm->writesize, acm_write_bulk, snd, epwrite->bInterval); | ||
1244 | else | ||
1245 | usb_fill_bulk_urb(snd->urb, usb_dev, | ||
1246 | usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress), | ||
1247 | NULL, acm->writesize, acm_write_bulk, snd); | ||
1233 | snd->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | 1248 | snd->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; |
1234 | snd->instance = acm; | 1249 | snd->instance = acm; |
1235 | } | 1250 | } |
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 3703789d0d2a..b09a527f7341 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
@@ -751,7 +751,7 @@ static int get_capabilities(struct usbtmc_device_data *data) | |||
751 | { | 751 | { |
752 | struct device *dev = &data->usb_dev->dev; | 752 | struct device *dev = &data->usb_dev->dev; |
753 | char *buffer; | 753 | char *buffer; |
754 | int rv; | 754 | int rv = 0; |
755 | 755 | ||
756 | buffer = kmalloc(0x18, GFP_KERNEL); | 756 | buffer = kmalloc(0x18, GFP_KERNEL); |
757 | if (!buffer) | 757 | if (!buffer) |
@@ -763,7 +763,7 @@ static int get_capabilities(struct usbtmc_device_data *data) | |||
763 | 0, 0, buffer, 0x18, USBTMC_TIMEOUT); | 763 | 0, 0, buffer, 0x18, USBTMC_TIMEOUT); |
764 | if (rv < 0) { | 764 | if (rv < 0) { |
765 | dev_err(dev, "usb_control_msg returned %d\n", rv); | 765 | dev_err(dev, "usb_control_msg returned %d\n", rv); |
766 | return rv; | 766 | goto err_out; |
767 | } | 767 | } |
768 | 768 | ||
769 | dev_dbg(dev, "GET_CAPABILITIES returned %x\n", buffer[0]); | 769 | dev_dbg(dev, "GET_CAPABILITIES returned %x\n", buffer[0]); |
@@ -773,7 +773,8 @@ static int get_capabilities(struct usbtmc_device_data *data) | |||
773 | dev_dbg(dev, "USB488 device capabilities are %x\n", buffer[15]); | 773 | dev_dbg(dev, "USB488 device capabilities are %x\n", buffer[15]); |
774 | if (buffer[0] != USBTMC_STATUS_SUCCESS) { | 774 | if (buffer[0] != USBTMC_STATUS_SUCCESS) { |
775 | dev_err(dev, "GET_CAPABILITIES returned %x\n", buffer[0]); | 775 | dev_err(dev, "GET_CAPABILITIES returned %x\n", buffer[0]); |
776 | return -EPERM; | 776 | rv = -EPERM; |
777 | goto err_out; | ||
777 | } | 778 | } |
778 | 779 | ||
779 | data->capabilities.interface_capabilities = buffer[4]; | 780 | data->capabilities.interface_capabilities = buffer[4]; |
@@ -781,8 +782,9 @@ static int get_capabilities(struct usbtmc_device_data *data) | |||
781 | data->capabilities.usb488_interface_capabilities = buffer[14]; | 782 | data->capabilities.usb488_interface_capabilities = buffer[14]; |
782 | data->capabilities.usb488_device_capabilities = buffer[15]; | 783 | data->capabilities.usb488_device_capabilities = buffer[15]; |
783 | 784 | ||
785 | err_out: | ||
784 | kfree(buffer); | 786 | kfree(buffer); |
785 | return 0; | 787 | return rv; |
786 | } | 788 | } |
787 | 789 | ||
788 | #define capability_attribute(name) \ | 790 | #define capability_attribute(name) \ |