aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-20USB: serial: allow custom multi-urb write bulk callbacksJohan Hovold1-1/+1
Allow drivers to implement their own multi-urb write bulk callbacks as we do for single urb writes. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: usb_debug: use the generic kfifo-based write implementationJohan Hovold1-2/+0
Use the generic kfifo-based write implementation rather than allowing up to 4000 8 byte urbs in the host stack queues. Cc: Jason Wessel <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: pl2303: use generic closeJohan Hovold1-12/+1
Use usb_serial_generic_close to kill the read and write urbs and to reset the write fifo. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: pl2303: switch to generic write implementationJohan Hovold1-326/+4
Replace custom fifo-based write implementation with the generic kfifo-based one. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: clean up generic write start busy testJohan Hovold1-11/+4
Submit write urb if it is not already in use and we have buffered data. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: clean up some error and debug messages in generic driverJohan Hovold1-9/+4
Clean up error messages on usb_submit_urb failure. Remove debug message on zero-length writes. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ftdi_sio: switch to generic read implementationJohan Hovold1-92/+7
Switch to generic read implementation and use process_read_urb to do device specific processing (handle line status). Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: export generic throttle and unthrottleJohan Hovold1-0/+2
Allow drivers to use the generic throttle and unthrottle implementation. This makes sense for drivers using the generic read functionality. Note that drivers need to set these explicitly in order to enable them (i.e., we do not set them at port probe if not defined). Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: pl2303: switch to generic read implementationJohan Hovold1-59/+25
Use generic read implementation and use process_read_urb to do device specific processing (handle line status). Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: generalise generic read implementationJohan Hovold3-2/+7
Add process_read_urb to usb_serial_driver so that a driver can rely on the generic read (and throttle) mechanism but still do device specific processing of incoming data (such as adding tty_flags before pushing to line discipline). The default generic implementation handles sysrq for consoles but otherwise simply pushes to tty. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: clean up read processing in generic driverJohan Hovold1-16/+11
Always process and flush read urb, but only resubmit when not throttled. The new tty-layer supply plenty of slack so there is really no need to cache and delay processing of a single urb while throttled. Note that unthrottle now submits using GFP_KERNEL as we are not in atomic context (so there is no need to save irq state either). Note also that the process_read_urb function could be added to usb_serial_driver should any driver need to do any device specific processing. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: cp210x: use generic submit_read_urb at openJohan Hovold1-14/+2
There is no need to initialise the read urb as this is done at port probe. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: remove unnecessary re-initialisation of generic urbsJohan Hovold1-23/+2
The generic read and write bulk urbs are initialised when allocated in usb_serial_probe. The only field that needs to be updated after that is the transfer_buffer_length of the write urb. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: refactor read urb submission in generic driverJohan Hovold3-26/+10
Use the already exported function for submitting the read urb associated with a usb_serial_port. Make sure it returns the result of usb_submit_urb and rename to the more descriptive usb_serial_generic_submit_read_urb. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: refactor generic closeJohan Hovold6-21/+8
Export usb_serial_generic_close so that drivers can easily kill the read and write urb and make sure that the write fifo is reset. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: clear fifo on closeJohan Hovold1-1/+7
Make sure fifo is emptied on close. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: fix missing locking on fifo in write callbackJohan Hovold1-2/+5
On errors the fifo was reset without any locking. This could race with write which do kfifo_put and perhaps also chars_in_buffer and write_room. Every other access to the fifo is protected using the port lock so better add it to the error path as well. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: fix generic chars_in_bufferJohan Hovold1-4/+11
Make sure chars_in_buffer accounts also for data in host stack queues. This fixes the problem with tty_wait_until_sent returning too soon at close which could cause the final write urb to be cancelled. Reported-by: Pete Zaitcev <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: pl2303: increase bulk-in buffer size to 256 byteJohan Hovold1-0/+1
The pl2303 requires a bulk-in buffer larger than endpoint size to keep up at high baudrates without loosing data. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: pl2303: increase the bulk-out buffer size to 256 byteJohan Hovold1-0/+1
Increase the bulk-out buffer size from 64 to 256 byte. This gives a significant increase in throughput already at 1Mbaud as well as lowered CPU usage. The buffer is big enough to keep up also at 3Mbaud (128b would not suffice). 64b 256b 921k: 640 KB/s 870 KB/s 3M: 640 KB/s 2520 KB/s Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: cp210x: increase bulk-in buffer size to 256 byteJohan Hovold1-0/+1
The cp210x requires a bulk-in buffer larger than endpoint size to keep up at high baudrates without loosing data. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: cp210x: increase the bulk-out buffer size to 256 byteJohan Hovold1-0/+1
Increase the bulk-out buffer size from 64 to 256 byte. This gives a significant increase in throughput already at 1Mbaud (e.g. 710 instead of 640 KB/s) as well as lowered CPU usage. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: allow drivers to define bulk buffer sizesJohan Hovold5-71/+16
Allow drivers to define custom bulk in/out buffer sizes in struct usb_serial_driver. If not set, fall back to the default buffer size which matches the endpoint size. Three drivers are currently freeing the pre-allocated buffers and allocating larger ones to achieve this at port probe (ftdi_sio) or even at port open (ipaq and iuu_phoenix), which needless to say is suboptimal. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Add a new quirk: USB_QUIRK_HONOR_BNUMINTERFACESHans de Goede3-2/+22
Add a new quirk USB_QUIRK_HONOR_BNUMINTERFACES, when this quirk is set and a device has more interface descriptors in a configuration then it claims to have in config->bNumInterfaces, ignore all additional interfaces. This is needed for devices which try to hide unused interfaces by only lowering config->bNumInterfaces, and which can't handle if you try to talk to the "hidden" interfaces. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: fix serial build when SYSRQ is disabledRandy Dunlap1-0/+9
Fix build error when CONFIG_MAGIC_SYSRQ is not enabled: drivers/usb/serial/generic.c:566: error: implicit declaration of function 'handle_sysrq' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB Serial Driver: ZIO MotherboardVijay Kumar3-0/+73
Add ZIO Motherboard USB serial interface driver. Signed-off-by: Vijay Kumar B. <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb-console: pass baud from console to the initial tty openJason Wessel1-12/+10
The usb console code has had a long standing problem of not being able to pass the baud rate from the kernel argument console=ttyUSB0,BAUD down to the initial tty open, unless you were willing to settle for 9600 baud. The solution is to directly use tty_init_termios() in usb_console_setup() as this will preserve any changes to the initial termios setting on future opens. CC: Alan Cox <[email protected]> CC: Alan Stern <[email protected]> Signed-off-by: Jason Wessel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: f_mass_storage: dynamic buffers for better alignmentMichal Nazarewicz1-5/+18
"Static" buffers in fsg_buffhd structure (ie. fields which are arrays rather then pointers to dynamically allocated memory) are not aligned to any "big" power of two which may lead to poor DMA performance (copying "by hand" of head or tail) or no DMA at all even if otherwise hardware supports it. Therefore, this patch makes mass storage function use kmalloc()ed buffers which are (because of their size) page aligned (which should be enough for any hardware). Signed-off-by: Michal Nazarewicz <[email protected]> Cc: Kyungmin Park <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: musb: hsdma: use musb_read/writelFelipe Balbi1-13/+3
... and simplify the was we read/write from/to DMA COUNT register. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: musb: gadget: support musb-specific test modesFelipe Balbi1-0/+25
we can support the musb-specific test modes on the vendor specific range of test selector as stated on USB Specification Table 9-7 Test Mode Selectors. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: musb: add debugfs supportFelipe Balbi4-0/+317
for now only a simple register dump entry (which can be rather useful on debugging) and a way to start test modes. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: musb: allow the Blackfin vrsel gpio to be active lowCliff Cai2-4/+5
Rather than hardcoding the gpio levels for vrsel, allow the platform resources to handle this so boards can be active high or low. Signed-off-by: Cliff Cai <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: MUSB: Add OMAP4 support in MUSB driverMaulik Mankad2-4/+8
This patch adds CONFIG_ARCH_OMAP4 macro within MUSB driver. Signed-off-by: Maulik Mankad <[email protected]> Cc: David Brownell <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: Olof Johansson <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: MUSB: Build MUSB driver for OMAP4Maulik Mankad2-1/+9
This patch updates the Makefile to build the MUSB driver for OMAP4. It also sets the Kconfig options for OMAP4. Signed-off-by: Maulik Mankad <[email protected]> Cc: David Brownell <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: Olof Johansson <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: musb: Set transceiver interface typeMaulik Mankad6-7/+16
Program the OTG_INTERFSEL register based on transcevier type passed from board file. Adapt signature of musb_platform_init() function for davinci, blackfin and tusb6010. Signed-off-by: Maulik Mankad <[email protected]> Cc: David Brownell <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: Olof Johansson <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: musb: allow board to pass down fifo modeFelipe Balbi2-20/+51
boards might want to optimize their fifo configuration to the particular needs of that specific board. Allow that by moving all related data structures to <linux/usb/musb.h> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb-serial: Use tty_port version console instead of usb_serial_portJason Wessel6-11/+8
Replace all instances of using the console variable in struct usb_serial_port with the struct tty_port version. CC: Alan Cox <[email protected]> CC: Alan Stern <[email protected]> CC: Oliver Neukum <[email protected]> CC: Andrew Morton <[email protected]> CC: [email protected] CC: [email protected] Signed-off-by: Jason Wessel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ehci-au1xxx does not need EHCI IO watchdogManuel Lauss1-1/+10
I've been running variations of this patch for well over a year now; my usual zoo of test devices didn't trigger any ill effects even under heavy load. As a nice sideeffect idle-wakeups are reduced from 20/s to about 2/s (EHCI hub with mouse and kbd). Signed-off-by: Manuel Lauss <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: remove uses of URB_NO_SETUP_DMA_MAPAlan Stern13-75/+27
This patch (as1350) removes all usages of coherent buffers for USB control-request setup-packet buffers. There's no good reason to reserve coherent memory for these things; control requests are hardly ever used in large quantity (the major exception is firmware transfers, and they aren't time-critical). Furthermore, only seven drivers used it. We might as well always use streaming DMA mappings for setup-packet buffers, and remove some extra complexity from usbcore. The DMA-mapping portion of hcd.c is currently in flux. A separate patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP after everything else settles down. The removal should go smoothly, as by then nobody will be using it. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: straighten out port feature vs. port status usageAlan Stern10-90/+89
This patch (as1349b) clears up the confusion in many USB host controller drivers between port features and port statuses. In mosty cases it's true that the status bit is in the position given by the corresponding feature value, but that's not always true and it's not guaranteed in the USB spec. There's no functional change, just replacing expressions of the form (1 << USB_PORT_FEAT_x) with USB_PORT_STAT_x, which has the same value. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: remove bogus USB_PORT_FEAT_*_SPEED symbolsAlan Stern8-27/+23
This patch (as1348) removes the bogus USB_PORT_FEAT_{HIGHSPEED,SUPERSPEED} symbols from ch11.h. No such features are defined by the USB spec. (There is a PORT_LOWSPEED feature, but the spec doesn't mention it except to say that host software should never use it.) The speed indicators are port statuses, not port features. As a temporary workaround for the xhci-hcd driver, a fictional USB_PORT_STAT_SUPER_SPEED symbol is added. Signed-off-by: Alan Stern <[email protected]> CC: Sarah Sharp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: remove duplicated #includeHuang Weiyi1-1/+0
Remove duplicated #include('s) in drivers/usb/core/hcd.c Signed-off-by: Huang Weiyi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Remove large struct from the stack in USB storage isd200 driverIan Munsie1-2/+2
The compiler throws the following warning when compiling for a PowerPC 64 bit machine: drivers/usb/storage/isd200.c:580: warning: the frame size of 2208 bytes is larger than 2048 bytes There is a struct scsi_device which is placed on the stack and is largely responsible for such wastage. The struct is just a dummy struct filled with NULLs and set as the scsi_cmnd->device to make the usb_stor_Bulk_transport function happy. This patch makes the struct static, so that it is never placed onto the stack and silences the compiler warning. Signed-off-by: Ian Munsie <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: cdc-acm: make bitfields unsignedRandy Dunlap1-2/+2
Fix usb/class sparse warnings: drivers/usb/class/cdc-acm.h:128:34: error: dubious one-bit signed bitfield drivers/usb/class/cdc-acm.h:129:24: error: dubious one-bit signed bitfield Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: sisusbvga: Remove the BKL from ioctlAlessio Igor Bogani1-3/+1
Seems to me that BKL is not needed here because necessary locking is already provided by mutex sisusb->lock. Also change the returned value to long. Signed-off-by: Alessio Igor Bogani <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: split hub.h into ch11.h and merge-in hcd.hEric Lescouet2-41/+43
Base on inputs from Alan Stern, split the hub.h header into: - new ch11.h header (most of it) containing constants and structures from chapter 11 of the USB 2.0 spec. - a small remaining part being merged into hcd.h. Signed-of-by: Eric Lescouet <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: make hub.h public (drivers dependency)Eric Lescouet2-1/+1
The usbcore headers: hcd.h and hub.h are shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. This patch moves hub.h from drivers/usb/core into include/linux/usb/ Signed-of-by: Eric Lescouet <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: make hcd.h public (drivers dependency)Eric Lescouet43-52/+46
The usbcore headers: hcd.h and hub.h are shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. This patch moves hcd.h from drivers/usb/core into include/linux/usb/ Signed-of-by: Eric Lescouet <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: xhci: Fix check for room on the ring.Sarah Sharp1-1/+18
The length of the scatter gather list a driver can enqueue is limited by the bus' sg_tablesize to 62 entries. Each entry will be described by at least one transfer request block (TRB). If the entry's buffer crosses a 64KB boundary, then that entry will have to be described by two or more TRBs. So even if the USB device driver respects sg_tablesize, the whole scatter list may take more than 62 TRBs to describe, and won't fit on the ring. Don't assume that an empty ring means there is enough room on the transfer ring. The old code would unconditionally queue this too-large transfer, and over write the beginning of the transfer. This would mean the cycle bit was unchanged in those overwritten transfers, causing the hardware to think it didn't own the TRBs, and the host would seem to hang. Now drivers may see submit_urb() fail with -ENOMEM if the transfers are too big to fit on the ring. Signed-off-by: Sarah Sharp <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: xhci: Limit bus sg_tablesize to 62 TRBs.Sarah Sharp1-1/+1
When a scatter-gather list is enqueued to the xHCI driver, it translates each entry into a transfer request block (TRB). Only 63 TRBs can be used per ring segment, and there must be one additional TRB reserved to make sure the hardware does not think the ring is empty (so the enqueue pointer doesn't equal the dequeue pointer). Limit the bus sg_tablesize to 62 TRBs. Signed-off-by: Sarah Sharp <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>