aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-05-20USB: cypress_m8: use kfifo to implement write bufferingJohan Hovold1-222/+17
Kill custom fifo implementation. Note that cypress_m8 has no port write fifo as it has no bulk-out endpoint. Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: cypress_m8: remove unused drain defineJohan Hovold1-1/+0
Driver uses tty-port drain these days. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: usb_debug: set bulk out size at probeJohan Hovold1-7/+1
Use bulk_out_size in usb_serial_driver to set urb buffer size. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: gadget: Use kmemdupJulia Lawall1-2/+1
Use kmemdup when some other buffer is immediately copied into the allocated region. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; statement S; @@ - to = \(kmalloc\|kzalloc\)(size,flag); + to = kmemdup(from,size,flag); if (to==NULL || ...) S - memcpy(to, from, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: CP210x New Device IDs 11 New device IDsCraig Shelley1-0/+11
Signed-off-by: Craig Shelley <craig@microtron.org.uk> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: visor: increase bulk-out buffer sizeJohan Hovold1-0/+3
Increase the bulk-out buffer size to avoid any regression in throughput after replacing the old writing scheme which used dynamic buffers (e.g. up to 2k). 256b has been determined to be a good choice for several drivers including ftdi_sio which used to have a more or less identical write implementation. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: belkin_sa: implement line status handlingJohan Hovold1-26/+51
Use process_read_urb to implement line status handling. Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: belkin_sa: clean up openJohan Hovold1-15/+6
Use generic open to submit read urb. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: belkin_sa: minor clean-upsJohan Hovold1-21/+7
Remove some whitepace and comments. Clean up close. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: cp210x: use generic open to start reading from deviceJohan Hovold1-1/+1
Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: visor: reimplement using generic frameworkJohan Hovold1-329/+13
Kill custom read and write implementations (dynamically allocated write urbs). Note that I chose to remove the stat module parameter which was supposed to keep count of the amount of data sent and received, but which has been broken for three years (since b308e74d9c708ee2a9af14fbe235e0a41216f4ed "USB: visor driver adapted to new tty buffering" -- bytes_in was incorrectly updated and was thus always reported as 0). Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: visor: fix memory leakJohan Hovold1-0/+1
Fix memory leak for some devices (Sony Clie 3.5) due to port private data not being freed on release. Cc: stable <stable@kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: spcp8x5: reimplement using generic frameworkJohan Hovold1-378/+29
Kill custom fifo, read, and single-urb write implementations. Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ipaq: reimplement using generic frameworkJohan Hovold2-377/+10
Kill custom fifo, read and write implementations (single-urb and fifo, but still maintained list of 256*256b urb buffers per port). Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: empeg: reimplement using generic frameworkJohan Hovold1-388/+13
Kill custom read and write implementations (static 16*4k write-urb pool shared among all ports in system). Also remove old changelog entries in header (code is now gone, and these entries can still be retrieved through git). Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: serial: add special case for processing of empty read urbsJohan Hovold1-0/+3
Return immediately from generic process_read_urb if urb is empty. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: kobil: fix memory leakJohan Hovold1-1/+2
An urb transfer buffer is allocated at every open but was never freed. This driver is a bit of a mess... Cc: stable <stable@kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: option.c: OLIVETTI OLICARD100 supportNils Radtke1-0/+6
This patch adds support for an olivetti olicard100 HЅDPA usb-stick. This device is a zeroCD one with ID 0b3c:c700 that needs switching via eject or usb-modeswitch with MessageContent="5553424312345678000000000000061b000000030000000000000000000000". After switching it has ID 0b3c:c000 and provides 5 serial ports ttyUSB[0-4]. Port 0 (modem) and 4 are interrupt ports. Signed-off-by: Nils Radtke <lkml@Think-Future.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: xhci: fix compiler warning.Greg Kroah-Hartman1-1/+0
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: remove match_deviceMing Lei1-33/+0
usb_find_device was the only one user of match_device, now it is removed, so remove match_device to fix the compile warning below reported by Stephen Rothwell: drivers/usb/core/usb.c:596: warning: 'match_device' defined but not used Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: include/usb/*.h checkpatch cleanupGreg Kroah-Hartman14-88/+92
Lots of minor formatting cleanups in includes/usb/ to make checkpatch happier. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: usb.h: checkpatch cleanupsGreg Kroah-Hartman1-16/+16
Minor formatting changes to clean up the file. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: visor.h: checkpatch cleanupsGreg Kroah-Hartman1-4/+5
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: pl2303.h: checkpatch cleanupsGreg Kroah-Hartman1-3/+3
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: kobil_sct.h: checkpatch cleanupsGreg Kroah-Hartman1-29/+46
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: kl5kusb105.h: checkpatch cleanupsGreg Kroah-Hartman1-24/+23
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: io_edgeport: checkpatch cleanupsGreg Kroah-Hartman4-147/+143
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ftdi_sio: checkpatch cleanupsGreg Kroah-Hartman3-82/+88
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: cypress_m8.h: checkpatch cleanupsGreg Kroah-Hartman1-24/+29
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: belkin_sa.h: checkpatch cleanupsGreg Kroah-Hartman1-5/+5
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: mct_u232.h: checkpatch cleanupsGreg Kroah-Hartman1-121/+133
Minor whitespace cleanups to make checkpatch happy. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: FHCI: cq_get() should check kfifo_out()'s return valueAnton Vorontsov1-2/+7
Since commit 7acd72eb85f1c7a15e8b5eb554994949241737f1 ("kfifo: rename kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out..."), kfifo_out() is marked __must_check, and that causes gcc to produce lots of warnings like this: CC drivers/usb/host/fhci-mem.o In file included from drivers/usb/host/fhci-hcd.c:34: drivers/usb/host/fhci.h: In function 'cq_get': drivers/usb/host/fhci.h:520: warning: ignoring return value of 'kfifo_out', declared with attribute warn_unused_result ... This patch fixes the issue by properly checking the return value. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: stable <stable@kernel.org> [.33 and .34] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: cp210x: remove redundant disconnect()Johan Hovold1-29/+0
Remove cp210x_disconnect which is used to kill traffic although this is already handled by the generic framework. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: io_edgeport: Use kzallocJulia Lawall1-2/+1
Use kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,size,flags; statement S; @@ -x = kmalloc(size,flags); +x = kzalloc(size,flags); if (x == NULL) S -memset(x, 0, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ipw: reimplement using generic frameworkJohan Hovold1-124/+4
Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ipw: remove dummy port_probe and port_removeJohan Hovold1-13/+0
Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ipw: clean up dtr-rts handlingJohan Hovold1-37/+6
No need to raise dtr/rts in open as this is taken care of by tty layer. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ir-usb: reimplement using generic frameworkJohan Hovold1-159/+38
Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ir-usb: fix set_termios raceJohan Hovold1-16/+47
Use dynamically allocated urb for baudrate changes rather than unconditionally submitting the port write urb which may already be in use. Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ir-usb: allow custom bulk buffer size without reallocationJohan Hovold1-25/+5
Use usb_serial_driver bulk_in_size and bulk_out_size to make sure buffers of appropriate sizes are allocated in the first place rather than reallocating them at every open. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ir-usb: fix double freeJohan Hovold1-0/+2
If the user specifies a custom bulk buffer size we get a double free at port release. Cc: stable <stable@kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: EHCI: fix controller wakeup flag settings during suspendAlan Stern5-71/+145
This patch (as1380) fixes a bug in the wakeup settings for EHCI host controllers. When the controller is suspended, if it isn't enabled for remote wakeup then we have to turn off all the port wakeup flags. Disabling PCI PME# isn't good enough, because some systems (Intel) evidently use alternate wakeup signalling paths. In addition, the patch improves the handling of the Intel Moorestown hardware by performing various power-up and power-down delays just once instead of once for each port (i.e., the delays are moved outside of the port loops). This requires extra code, but the total delay time is reduced. There are also a few additional minor cleanups. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Ondrej Zary <linux@rainbow-software.org> CC: Alek Du <alek.du@intel.com> CC: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: EHCI: clear PHCD before resumingAlek Du1-0/+17
This is a bug fix for PHCD (phy clock disable) low power feature: After PHCD is set, any write to PORTSC register is illegal, so when resume ports, clear PHCD bit first. Signed-off-by: Alek Du <alek.du@intel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: fix functionfs for CONFIG_NET disabledRandy Dunlap1-2/+2
Fix functionfs build to handle CONFIG_NET not enabled, to prevent these build errors: ERROR: "netif_carrier_on" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "netif_carrier_off" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "skb_realloc_headroom" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "skb_trim" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "netif_rx" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "alloc_etherdev_mq" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "ethtool_op_get_link" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "free_netdev" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "register_netdev" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "skb_push" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "skb_pull" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "dev_kfree_skb_any" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "skb_queue_tail" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "__alloc_skb" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "eth_type_trans" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "eth_validate_addr" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "skb_dequeue" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "unregister_netdev" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "__netif_schedule" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "skb_put" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "eth_mac_addr" [drivers/usb/gadget/g_ffs.ko] undefined! ERROR: "dev_get_stats" [drivers/usb/gadget/g_ffs.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: xhci: Remove the arbitrary limit of 15 xHCI portsWilliam Gulland1-12/+3
Our virtual xHCI device can have as many ports as we like - I've tested this patch with 31. Signed-off-by: William Gulland <wgulland@vmware.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: remove usb_find_deviceMing Lei2-38/+0
Now on one uses this function and it seems useless, so remove usb_find_device. [tom@tom linux-2.6-next]$ grep -r -n -I usb_find_device ./ drivers/media/dvb/dvb-usb/dvb-usb-init.c:160:static struct dvb_usb_device_description * dvb_usb_find_device(struct usb_device *udev,struct dvb_usb_device_properties *props, int *cold) drivers/media/dvb/dvb-usb/dvb-usb-init.c:230: if ((desc = dvb_usb_find_device(udev,props,&cold)) == NULL) { drivers/usb/core/usb.c:630: * usb_find_device - find a specific usb device in the system drivers/usb/core/usb.c:642:struct usb_device *usb_find_device(u16 vendor_id, u16 product_id) Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: gadget: f_mass_storage: fix in error recoveryMichal Nazarewicz1-26/+25
In to places in fsg_common_init() an unconditional call to kfree() on common was performed in error recovery which is not a valid behaviour since fsg_common structure is not always allocated by fsg_common_init(). To fix, the calls has been replaced with a goto to a proper error recovery which does the correct thing. Also, refactored fsg_common_release() function. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Reviewed-by: Viral Mehta <viral.mehta@lntinfotech.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: add missing "{}" in map_urb_for_dmaMing Lei1-1/+2
Obviously, {} is needed in the branch of "else if (hcd->driver->flags & HCD_LOCAL_MEM)" for handling of setup packet mapping. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: ehci-omap: Fix resume failures after bus suspendAnand Gadiyar1-0/+14
An undocumented "feature" in the OMAP3 EHCI controller causes suspended ports to be taken out of suspend when the USBCMD.Run/Stop bit is cleared (this bit is normally cleared when ehci_bus_suspend is called). This "feature" breaks suspend-resume if the root-hub is allowed to suspend. (The controller thinks it is in resume, and the PHY thinks it is still in suspend). There is an undocumented register bit that can be used to disable this feature and restore normal behavior. Set this bit so suspend-resume can work normally. Tested on OMAP3 SDPs with the NXP ISP1504 and NXP ISP1703 PHYs. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20USB: fix interface runtime-PM settingsAlan Stern1-6/+11
This patch (as1379) reworks the logic for handling USB interface runtime-PM settings -- hopefully it's right this time! The problem is that when a driver is unbound or binding fails, runtime PM for the interface always gets disabled. But pm_runtime_disable() nests, so it shouldn't be called unless the interface was previously enabled for runtime PM. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Rob Duncan <Robert.Duncan@exar.com> Tested-by: Rob Duncan <Robert.Duncan@exar.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>