diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 11:48:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-03 11:48:58 -0500 |
commit | 7f5b09c15ab989ed5ce4adda0be42c1302df70b7 (patch) | |
tree | 9695b00983d1bd077ff91c463abcb136330cf344 /drivers/usb/musb/musb_gadget.c | |
parent | 94468080220162f74dc6ce5c3e95e5fec8022902 (diff) | |
parent | cedf8a78421943441b9011ce7bcdab55f07d2ea6 (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: (220 commits)
USB: backlight, appledisplay: fix incomplete registration failure handling
USB: pl2303: remove unnecessary reset of usb_device in urbs
USB: ftdi_sio: remove obsolete check in unthrottle
USB: ftdi_sio: remove unused tx_bytes counter
USB: qcaux: driver for auxiliary serial ports on Qualcomm devices
USB: pl2303: initial TIOCGSERIAL support
USB: option: add Longcheer/Longsung vendor ID
USB: fix I2C API usage in ohci-pnx4008.
USB: usbmon: mask seconds properly in text API
USB: sisusbvga: no unnecessary GFP_ATOMIC
USB: storage: onetouch: unnecessary GFP_ATOMIC
USB: serial: ftdi: add CONTEC vendor and product id
USB: remove references to port->port.count from the serial drivers
USB: tty: Prune uses of tty_request_room in the USB layer
USB: tty: Add a function to insert a string of characters with the same flag
USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration()
USB: tty: kill request_room for USB ACM class
USB: tty: sort out the request_room handling for whiteheat
USB: storage: fix misplaced parenthesis
USB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., devices and spectrometers
...
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index cbcf14a236e6..a9f288cd70ed 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -895,7 +895,14 @@ static int musb_gadget_enable(struct usb_ep *ep, | |||
895 | /* REVISIT if can_bulk_split(), use by updating "tmp"; | 895 | /* REVISIT if can_bulk_split(), use by updating "tmp"; |
896 | * likewise high bandwidth periodic tx | 896 | * likewise high bandwidth periodic tx |
897 | */ | 897 | */ |
898 | musb_writew(regs, MUSB_TXMAXP, tmp); | 898 | /* Set TXMAXP with the FIFO size of the endpoint |
899 | * to disable double buffering mode. Currently, It seems that double | ||
900 | * buffering has problem if musb RTL revision number < 2.0. | ||
901 | */ | ||
902 | if (musb->hwvers < MUSB_HWVERS_2000) | ||
903 | musb_writew(regs, MUSB_TXMAXP, hw_ep->max_packet_sz_tx); | ||
904 | else | ||
905 | musb_writew(regs, MUSB_TXMAXP, tmp); | ||
899 | 906 | ||
900 | csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG; | 907 | csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG; |
901 | if (musb_readw(regs, MUSB_TXCSR) | 908 | if (musb_readw(regs, MUSB_TXCSR) |
@@ -925,7 +932,13 @@ static int musb_gadget_enable(struct usb_ep *ep, | |||
925 | /* REVISIT if can_bulk_combine() use by updating "tmp" | 932 | /* REVISIT if can_bulk_combine() use by updating "tmp" |
926 | * likewise high bandwidth periodic rx | 933 | * likewise high bandwidth periodic rx |
927 | */ | 934 | */ |
928 | musb_writew(regs, MUSB_RXMAXP, tmp); | 935 | /* Set RXMAXP with the FIFO size of the endpoint |
936 | * to disable double buffering mode. | ||
937 | */ | ||
938 | if (musb->hwvers < MUSB_HWVERS_2000) | ||
939 | musb_writew(regs, MUSB_RXMAXP, hw_ep->max_packet_sz_rx); | ||
940 | else | ||
941 | musb_writew(regs, MUSB_RXMAXP, tmp); | ||
929 | 942 | ||
930 | /* force shared fifo to OUT-only mode */ | 943 | /* force shared fifo to OUT-only mode */ |
931 | if (hw_ep->is_shared_fifo) { | 944 | if (hw_ep->is_shared_fifo) { |
@@ -1697,8 +1710,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) | |||
1697 | return -EINVAL; | 1710 | return -EINVAL; |
1698 | 1711 | ||
1699 | /* driver must be initialized to support peripheral mode */ | 1712 | /* driver must be initialized to support peripheral mode */ |
1700 | if (!musb || !(musb->board_mode == MUSB_OTG | 1713 | if (!musb) { |
1701 | || musb->board_mode != MUSB_OTG)) { | ||
1702 | DBG(1, "%s, no dev??\n", __func__); | 1714 | DBG(1, "%s, no dev??\n", __func__); |
1703 | return -ENODEV; | 1715 | return -ENODEV; |
1704 | } | 1716 | } |