aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-20USB: serial: remove multi-urb write from generic driverJohan Hovold4-176/+48
Remove multi-urb write from the generic driver and simplify the prepare_write_buffer prototype: int (*prepare_write_buffer)(struct usb_serial_port *port, void *dest, size_t size); The default implementation simply fills dest with data from port write fifo but drivers can override it if they need to process the outgoing data (e.g. add headers). Turn ftdi_sio into a generic fifo-based driver, which lowers CPU usage significantly for small writes while retaining maximum throughput. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: reimplement generic fifo-based writesJohan Hovold3-20/+84
Reimplement fifo-based writes in the generic driver using a multiple pre-allocated urb scheme. In contrast to multi-urb writes, no allocations (of urbs or buffers) are made during run-time and there is less pressure on the host stack queues as currently only two urbs are used (implementation is generic and can handle more than two urbs as well, though). Initial tests using ftdi_sio show that the implementation achieves the same (maximum) throughput at high baudrates as multi-urb writes. The CPU usage is much lower than for multi-urb writes for small write requests and only slightly higher for large (e.g. 2k) requests (due to extra copy via fifo?). Also outperforms multi-urb writes for small write requests on an embedded arm-9 system, where multi-urb writes are CPU-bound at high baudrates (perf reveals that a lot of time is spent in the host stack enqueue function -- could perhaps be a bug as well). Keeping the original write_urb, buffer and flag for now as there are other drivers depending on them. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: aircable: rewrite using generic read and write implementationsJohan Hovold1-453/+47
Kill circular buffers for tx and rx as well as read work thread, and switch to generic kfifo-based write implementation. This is an example of how prepare_write_buffer and process_read_urb can be used to handle protocols with packet headers. Please note the diffstat which shows that the same functionality is now provided using only a tenth of the code (including whitespace and comments, though). Tested-by: Naranjo, Manuel Francisco <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ftdi_sio: clean up SIO write supportJohan Hovold1-40/+13
The original SIO devices require a control byte for every packet written. Clean up the unnecessarily messy implementation of this. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ftdi_sio: switch to generic write implementationJohan Hovold1-172/+19
Switch to the generic, multi-urb, write implementation. Note that this will also make it fairly easy to use the generic fifo-based write implementation: simply unset the multi_urb_write flag and modify prepare_write_buffer (or unset if not using a legacy SIO device). This may be desirable for instance on an embedded system where optimal throughput at high baudrates may not be as important as other factors (e.g. no allocations during runtime and less pressure on host stack). Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: isp1760: Use resource_sizeTobias Klauser1-6/+5
Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one errors. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: simplify usb_sg_init()Alan Stern2-57/+38
This patch (as1377) simplifies the code in usb_sg_init(), without changing its functionality. It also removes a couple of unused fields from the usb_sg_request structure. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB gadget: Webcam deviceLaurent Pinchart3-1/+409
This webcam gadget instantiates a UVC camera (360p and 720p resolutions in YUYV and MJPEG). Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB gadget: video class function driverLaurent Pinchart7-0/+2710
This USB video class function driver implements a video capture device from the host's point of view. It creates a V4L2 output device on the gadget's side to transfer data from a userspace application over USB. The UVC-specific descriptors are passed by the gadget driver to the UVC function driver, making them completely configurable without any modification to the function's driver code. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Change the scatterlist type in struct urbMatthew Wilcox8-15/+13
Change the type of the URB's 'sg' pointer from a usb_sg_request to a scatterlist. This allows drivers to submit scatter-gather lists without using the usb_sg_wait() interface. It has the added benefit of removing the typecasts that were added as part of patch as1368 (and slightly decreasing the number of pointer dereferences). Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Alan Stern <[email protected]> Tested-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Turn interface_to_usbdev into an inline functionMatthew Wilcox1-2/+5
The stronger type-checking would have prevented a bug I had. Signed-off-by: Matthew Wilcox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Add a usb_pipe_endpoint() convenience functionMatthew Wilcox3-4/+10
Converting a pipe number to a struct usb_host_endpoint pointer is a little messy. Introduce a new convenience function to hide the mess. Signed-off-by: Matthew Wilcox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Add definition for the Pipe Usage descriptorMatthew Wilcox1-0/+2
The Pipe Usage descriptor is needed for USB Attached SCSI Signed-off-by: Matthew Wilcox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: u132-hcd.c: fix shadows sparse warningBill Pemberton1-2/+2
Signed-off-by: Bill Pemberton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: sisusb_con.c: fix shadows sparse warningBill Pemberton1-4/+4
Signed-off-by: Bill Pemberton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: oti6858: declare send_data() as staticBill Pemberton1-1/+1
Signed-off-by: Bill Pemberton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: whci: declare functions as staticBill Pemberton1-1/+1
qset_print() was not declared static although it is not used outside of debug.c Signed-off-by: Bill Pemberton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: unusual-dev: Add bad sense flag for Appotech ax203 based picture framesHans de Goede1-0/+15
These Appotech controllers are found in Picture Frames, they provide a (buggy) emulation of a cdrom drive which contains the windows software Uploading of pictures happens over the corresponding /dev/sg device. Signed-off-by: Hans de Goede <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: mxc: gadget: Fix bitfield for calculating maximum packet sizeDinh Nguyen1-1/+1
The max packet length bit mask used for isochronous endpoints should be 0x7FF instead of 0x8FF. 0x8FF will actually clear higher-order bits in the max packet length field. This patch applies to 2.6.34-rc6. Signed-off-by: Dinh Nguyen <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ehci-omap: fix Si version related programmingAjay Kumar Gupta1-2/+2
AM3517 is based on ES3.1 thus ES2.x related programming is invalid for it so updating ES2.x programming. Also fixed below checkpatch warning: WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Ajay Kumar Gupta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: ehci-omap: fix compilation warningAjay Kumar Gupta1-0/+3
Fixes below compilation warning: drivers/usb/host/ehci-hcd.c:425: warning: 'ehci_port_power' defined but not used Signed-off-by: Ajay Kumar Gupta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: qcaux: add Samsung U520 device IDDan Williams1-0/+5
Another CDC-ACM + vendor specific interface layout. Signed-off-by: Dan Williams <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: option: add PID for ZTE productzhao1980ming1-0/+174
this patch adds ZTE modem devices Signed-off-by: Joey <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: xhci: Avoid double free after streams are disabled.Sarah Sharp1-0/+2
When a device is disconnected, xhci_free_virt_device() is called. Ramya found that if the device had streams enabled, and then the driver freed the streams with a call to usb_free_streams(), then about a minute after he had called this, his machine crashed with a Bad DMA error. It turns out that xhci_free_virt_device() would attempt to free the endpoint's stream_info data structure if it wasn't NULL, and the free streams function was not setting it to NULL after freeing it. Signed-off-by: Sarah Sharp <[email protected]> Tested-by: Ramya Desai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: remove URB_NO_SETUP_DMA_MAPAlan Stern4-32/+19
Now that URB_NO_SETUP_DMA_MAP is no longer in use, this patch (as1376) removes all references to it. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: remove the usb_host_ss_ep_comp structureAlan Stern4-171/+68
This patch (as1375) eliminates the usb_host_ss_ep_comp structure used for storing a dynamically-allocated copy of the SuperSpeed endpoint companion descriptor. The SuperSpeed descriptor is placed directly in the usb_host_endpoint structure, alongside the standard endpoint descriptor. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: export the new ch11.h file to userspceAlan Stern2-6/+5
This patch (as1374) cleans up a few loose ends in the include/linux/usb/ch11.h header file and exports it to userspace. Signed-off-by: Alan Stern <[email protected]> Cc: Eric Lescouet <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: remove leftover references to udev->autosuspend_disabledAlan Stern2-2/+2
This patch (as1373) fixes a couple of drivers outside the USB subtree. Devices are now disabled or enabled for autosuspend by calling a core function instead of setting a flag. Signed-off-by: Alan Stern <[email protected]> Cc: Stephen Rothwell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: g_hid: unregister platform driver on probe/usb_composite_register errorsPeter Korsgaard1-2/+12
Otherwise reloads will fail. Signed-off-by: Peter Korsgaard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: mos7840: Cleanup useless headerAlessio Igor Bogani1-1/+0
BKL isn't anymore present into this file thus it is no necessary still include smp_lock.h. Signed-off-by: Alessio Igor Bogani <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: sisusbvga: Remove the BKL from openAlessio Igor Bogani1-9/+0
BKL is not needed here because necessary locking is already provided by mutex sisusb->lock. Signed-off-by: Alessio Igor Bogani <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Mass storage gadget: Handle eject requestFabien Chouteau1-3/+45
This patch adds handling of the "Start/Stop Unit" SCSI request to simulate media ejection. Signed-off-by: Fabien Chouteau <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Composite framework: Add suspended sysfs entryFabien Chouteau4-0/+35
This patch adds a sysfs entry (/sys/devices/platform/_UDC_/gadget/suspended) to show the suspend state of an USB composite gadget. Signed-off-by: Fabien Chouteau <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: clean up some host controller sparse warningsRandy Dunlap4-18/+18
Fix usb sparse warnings: drivers/usb/host/isp1362-hcd.c:2220:50: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-mem.c:43:24: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-mem.c:49:24: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-mem.c:161:24: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-mem.c:198:16: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-mem.c:319:31: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-mem.c:1231:33: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-pci.c:177:23: warning: non-ANSI function declaration of function 'xhci_register_pci' drivers/usb/host/xhci-pci.c:182:26: warning: non-ANSI function declaration of function 'xhci_unregister_pci' drivers/usb/host/xhci-ring.c:342:32: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-ring.c:525:34: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-ring.c:1009:32: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-ring.c:1031:32: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-ring.c:1041:16: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-ring.c:1096:30: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-ring.c:1100:27: warning: Using plain integer as NULL pointer drivers/usb/host/xhci-mem.c:224:27: warning: symbol 'xhci_alloc_container_ctx' was not declared. Should it be static? drivers/usb/host/xhci-mem.c:242:6: warning: symbol 'xhci_free_container_ctx' was not declared. Should it be static? Signed-off-by: Randy Dunlap <[email protected]> Cc: Lothar Wassmann <[email protected]> Signed-off By: Sarah Sharp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: core: config.c: usb_get_configuration() simplifiedMichal Nazarewicz1-6/+4
usb_gat_configuratio() used two pointers to point to the same memory. Code simplified, by removing one of them. Signed-off-by: Michal Nazarewicz <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ncm: added ncm.h with auxiliary definitionsYauheni Kaliuta1-0/+114
Signed-off-by: Yauheni Kaliuta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: cdc: ncm constants and structures addedYauheni Kaliuta1-0/+94
Signed-off-by: Yauheni Kaliuta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: usbserial: fix mos7720 dependenciesRandy Dunlap1-3/+2
Fix mos7720 Kconfig dependencies. When an enabled bool selects a tristate, the tristate becomes =y, even if it should be limited to modular, so limit the bool kconfig option to configs that will build cleanly. Also change the if-block to a simple depends on. drivers/built-in.o: In function `mos7720_release': mos7720.c:(.text+0xad432): undefined reference to `parport_remove_port' drivers/built-in.o: In function `mos7715_parport_init': mos7720.c:(.text+0xae197): undefined reference to `parport_register_port' mos7720.c:(.text+0xae210): undefined reference to `parport_announce_port' drivers/built-in.o:(.data+0x201c8): undefined reference to `parport_ieee1284_read_nibble' drivers/built-in.o:(.data+0x201d0): undefined reference to `parport_ieee1284_read_byte' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: usbserial: mos7720: cleanup, consolidation, replace send_mos_cmd with ↵Mike Dunn1-266/+122
{read,write}_mos_reg No functionality added or bugs fixed, just improved code consistency and (hopefully) readability by replacing send_mos_cmd with the register read & write functions that were used for parallel port registers. Also shortens overall file length. Thoroughly tested, with emphasis on regression testing the serial port. Signed-off-by: Mike Dunn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: usbserial: mos7720: add support for parallel port on moschip 7715Mike Dunn3-86/+747
Add support for the parallel port on the moschip MCS7715 device. The port registers itself with the parport subsystem as a low-level driver. A separate entry to the kernel configuration is added beneath that for the mos7720, to avoid the need to link with the parport subsystem code for users who don't have or don't want the parallel port. Only compatibility mode is currently supported (no ECP/EPP). Tested with both moschip devices (7720 and 7715) on UP and SMP hosts, including regression testing of serial port, concurrent operation of serial and parallel ports, and various connect / disconnect scenarios. Signed-off-by: Mike Dunn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: staging: fix up usb_buffer_alloc calls in the staging treeGreg Kroah-Hartman2-6/+6
This renames the functions usb_buffer_alloc and usb_buffer_free to the correct ones for the drivers in the staging tree. Cc: Daniel Mack <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack51-291/+286
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <[email protected]> Cc: Alan Stern <[email protected]> Cc: Pedro Ribeiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Short new 'graph for usb-serial.txtEric Raymond1-4/+9
Documentation update Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: devices: fix Coding StylesCarlos Sánchez Acosta1-7/+10
Fixed coding styles in the config usb driver. Signed-off-by: Carlos Sánchez Acosta <[email protected]> Signed-off-by: Alejandro Sánchez Acosta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ueagle: fix Coding StylesJavier Blanco de Torres (Neurowork)1-140/+207
Fixed coding styles in the ueagle usb driver. Signed-off-by: Javier Blanco de Torres <[email protected]> Signed-off-by: Alejandro Sánchez Acosta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: omap: switch to subsys_initcall for isp1301 transceiverViral Mehta1-1/+1
isp1301 transceiver driver init should be done before we do ohci omap init Signed-off-by: Viral Mehta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: ehci: Elide I/O watchdog on NEC partsDavid Miller1-0/+3
I've been running with this patch on my Niagara2 boxes for some time and have not seen any ill effects yet. Maybe we can stash this into the USB tree to get exposure for some time in -next and if anything crops up we can simply revert? Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: storage: Remove unneeded SL11R unusual_devs entryPhil Dibowitz1-9/+0
It seems unlikely that this entry is needed anymore since the kernel has logic to handle devices that poorly respond to INQUIRY. Since we now have another entry with the same VID/PID but different flags, it's a good time to attempt to clean this up. The original submitter's email no longer works, so we'll keep an eye out for any regression reports. Signed-off-by: Phil Dibowitz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: Support for allocating USB 3.0 streams.Sarah Sharp5-0/+169
Bulk endpoint streams were added in the USB 3.0 specification. Streams allow a device driver to overload a bulk endpoint so that multiple transfers can be queued at once. The device then decides which transfer it wants to work on first, and can queue part of a transfer before it switches to a new stream. All this switching is invisible to the device driver, which just gets a completion for the URB. Drivers that use streams must be able to handle URBs completing in a different order than they were submitted to the endpoint. This requires adding new API to set up xHCI data structures to support multiple queues ("stream rings") per endpoint. Drivers will allocate a number of stream IDs before enqueueing URBs to the bulk endpoints of the device, and free the stream IDs in their disconnect function. See Documentation/usb/bulk-streams.txt for details. The new mass storage device class, USB Attached SCSI Protocol (UASP), uses these streams API. Signed-off-by: Sarah Sharp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: xhci: Correct assumptions about number of rings per endpoint.Sarah Sharp5-55/+280
Much of the xHCI driver code assumes that endpoints only have one ring. Now an endpoint can have one ring per enabled stream ID, so correct that assumption. Use functions that translate the stream_id field in the URB or the DMA address of a TRB into the correct stream ring. Correct the polling loop to print out all enabled stream rings. Make the URB cancellation routine find the correct stream ring if the URB has stream_id set. Make sure the URB enqueueing routine does the same. Also correct the code that handles stalled/halted endpoints. Check that commands and registers that can take stream IDs handle them properly. That includes ringing an endpoint doorbell, resetting a stalled/halted endpoint, and setting a transfer ring dequeue pointer (since that command can set the dequeue pointer in a stream context or an endpoint context). Correct the transfer event handler to translate a TRB DMA address into the stream ring it was enqueued to. Make the code to allocate and prepare TD structures adds the TD to the right td_list for the stream ring. Make sure the code to give the first TRB in a TD to the hardware manipulates the correct stream ring. When an endpoint stalls, store the stream ID of the stream ring that stalled in the xhci_virt_ep structure. Use that instead of the stream ID in the URB, since an URB may be re-used after it is given back after a non-control endpoint stall. Signed-off-by: Sarah Sharp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>