summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2010-08-13USB: serial: fix stalled writesJohan Hovold
commit b58af4066d240b18b43f202e07b9ec7461d90b17 upstream. As David VomLehn points out, it was possible to receive an interrupt before clearing the free-urb flag which could lead to the urb being incorrectly marked as busy. For the same reason, move tx_bytes accounting so that it will never be negative. Note that the free-flags set and clear operations do not need any additional locking as they are manipulated while USB_SERIAL_WRITE_BUSY is set. Reported-by: David VomLehn <dvomlehn@cisco.com> Tested-by: David VomLehn <dvomlehn@cisco.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: fix thread-unsafe anchor utiliy routinesChristian Lamparter
commit b3e670443b7fb8a2d29831b62b44a039c283e351 upstream. This patch fixes a race condition in two utility routines related to the removal/unlinking of urbs from an anchor. If two threads are concurrently accessing the same anchor, both could end up with the same urb - thinking they are the exclusive owner. Alan Stern pointed out a related issue in usb_unlink_anchored_urbs: "The URB isn't removed from the anchor until it completes (as a by-product of completion, in fact), which might not be for quite some time after the unlink call returns. In the meantime, the subroutine will keep trying to unlink it, over and over again." Cc: Oliver Neukum <oneukum@suse.de> Cc: Greg Kroah-Hartman <greg@kroah.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: usbtest: avoid to free coherent buffer in atomic contextMing Lei
commit e10e1bec8e6654de4591ef45ddd6a6d1e5b2591c upstream. This patch fixes the warning below: [30753.755998] ------------[ cut here ]------------ [30753.755998] WARNING: at /home/tom/git/linux-2.6/linux-2.6-next/arch/x86/include/asm/dma-mapping.h:155 hcd_buffer_free+0xb1/0xd4 [usbcore]() [30753.755998] Hardware name: 6475EK2 [30753.755998] Modules linked in: uvcvideo ehci_hcd usbtest cdc_ether usbnet vfat fat usb_storage nfsd lockd nfs_acl auth_rpcgss exportfs mii tun videodev v4l1_compat v4l2_compat_ioctl32 fuse bridge stp llc sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table mperf kvm_intel kvm arc4 ecb ath5k usbhid mac80211 snd_hda_codec_conexant ch341 usbserial ath cfg80211 thinkpad_acpi snd_hda_intel pcspkr wmi hwmon yenta_socket iTCO_wdt iTCO_vendor_support i2c_i801 e1000e snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore snd_page_alloc pata_acpi uhci_hcd ohci_hcd usbcore i915 drm_kms_helper drm i2c_algo_bit i2c_core video output [last unloaded: uvcvideo] [30753.755998] Pid: 0, comm: swapper Tainted: G W 2.6.35-rc6-gkh-wl+ #49 [30753.755998] Call Trace: [30753.755998] <IRQ> [<ffffffff8104478a>] warn_slowpath_common+0x80/0x98 [30753.755998] [<ffffffff810447b7>] warn_slowpath_null+0x15/0x17 [30753.755998] [<ffffffffa00ce02d>] hcd_buffer_free+0xb1/0xd4 [usbcore] [30753.755998] [<ffffffffa00c1345>] usb_free_coherent+0x1c/0x1e [usbcore] [30753.755998] [<ffffffffa00b13e4>] simple_free_urb+0x23/0x2f [usbtest] [30753.755998] [<ffffffffa00b210b>] iso_callback+0xbb/0x10f [usbtest] [30753.755998] [<ffffffffa00c7390>] usb_hcd_giveback_urb+0x8c/0xc0 [usbcore] [30753.755998] [<ffffffffa0449b35>] ehci_urb_done+0x84/0x95 [ehci_hcd] [30753.755998] [<ffffffffa044b5a5>] ehci_work+0x41a/0x7dd [ehci_hcd] [30753.755998] [<ffffffffa044e298>] ehci_irq+0x33b/0x370 [ehci_hcd] [30753.755998] [<ffffffff8100fb05>] ? sched_clock+0x9/0xd [30753.755998] [<ffffffff8105e641>] ? sched_clock_local+0x1c/0x82 [30753.755998] [<ffffffff8105e76a>] ? sched_clock_cpu+0xc3/0xce [30753.755998] [<ffffffff81067c7e>] ? trace_hardirqs_off+0xd/0xf [30753.755998] [<ffffffff8105e7b8>] ? cpu_clock+0x43/0x5e [30753.755998] [<ffffffffa00c6999>] usb_hcd_irq+0x45/0xa1 [usbcore] [30753.755998] [<ffffffff81092e02>] handle_IRQ_event+0x20/0xa5 [30753.755998] [<ffffffff81094cea>] handle_fasteoi_irq+0x92/0xd2 [30753.755998] [<ffffffff8100c0ed>] handle_irq+0x1f/0x2a [30753.755998] [<ffffffff8100b75d>] do_IRQ+0x57/0xbe [30753.755998] [<ffffffff8136a693>] ret_from_intr+0x0/0x16 [30753.755998] <EOI> [<ffffffff81223baa>] ? acpi_idle_enter_bm+0x231/0x269 [30753.755998] [<ffffffff81223ba3>] ? acpi_idle_enter_bm+0x22a/0x269 [30753.755998] [<ffffffff812c4b6b>] cpuidle_idle_call+0x99/0xce [30753.755998] [<ffffffff81008dd5>] cpu_idle+0x61/0xaa [30753.755998] [<ffffffff8136374b>] start_secondary+0x1c2/0x1c6 [30753.755998] ---[ end trace 904cfaf7ab4cb1a2 ]--- Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: cp210x: Add four new device IDsAlessio Igor Bogani
commit 356c5a4834a74c621715f7a7f16ded914eecbd3c upstream. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: ftdi_sio: device id for Navitatordranch@trinnet.net
commit b6180ef7c99574c3350bbffa2a3a9d675321543d upstream. This patch is to add a US Interface, Inc. "Navigator" USB device. Specifically, it's a HAM Radio USB sound modem that also incorporates three pairs of unique FTDI serial ports. The standard Linux FTDI serial driver will only recognize the first two serial ports of an unknown FDTI derived device and this patch adds in recognition to these specific new IDs. Signed-off-by: David A. Ranch <dranch@trinnet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: option: add huawei k3765 k4505 devices to work properlyAndrew Bird
commit 0372a754be9aa43e19fd86c9bc04796d43b55e38 upstream. This patch adds the product IDs of Huawei's K3765 and K4505 mobile broadband usb modems to option.c. It also adds a quirk to the option probe function so that binding to the device's network interface(class 0xff) is avoided. This is necessary to allow another driver to bind to that, and to avoid programs like wvdial opening a nonfunctioning tty during modem discovery. Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: option: Huawei ETS 1220 support addedPavel Kazlou
commit b972302b0a13aaddc9e90da2b4b52722e5d0e776 upstream. The patch adds Huawei ETS 1220 product id into the list of supported devices in 'option' usb serial driver. Signed-off-by: Pavel Kazlou <p.i.kazlou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: serial: enabling support for Segway RMP in ftdi_sioJohn G. Rogers
commit afad19648f70c6493193e0a774bd754b7790b4a0 upstream. I have added the ProductID=0xe729 VendorID=FTDI_VID=0x0403 which will enable support for the Segway Robotic Mobility Platform (RMP200) in the ftdi_sio kernel module. Currently, users of the Segway RMP200 must use a RUN+="/sbin/modprobe -q ftdi-sio product=0xe729 vendor=0x0403 in a udev rule to get the ftdi_sio module to handle the usb interface and mount it on /dev/ttyXXX. This is not a good solution because some users will have multiple USB to Serial converters which will use the ftdi_sio module. Signed-off-by: John Rogers <jgrogers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB delay init quirk for logitech Harmony 700-series devicesPhil Dibowitz
commit 93362a875fc69881ae69299efaf19a55a1f57db0 upstream. The Logitech Harmony 700 series needs an extra delay during initialization. This patch adds a USB quirk which enables such a delay and adds the device to the quirks list. Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: resizing usbmon binary interface buffer causes protection faultsSteven Robertson
commit 33d973ad88ceb83ed1449592b7574b5b5bb33ac6 upstream. Enlarging the buffer size via the MON_IOCT_RING_SIZE ioctl causes general protection faults. It appears the culprit is an incorrect argument to mon_free_buff: instead of passing the size of the current buffer being freed, the size of the new buffer is passed. Use the correct size argument to mon_free_buff when changing the size of the buffer. Signed-off-by: Steven Robertson <steven@strobe.cc> Acked-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: EHCI: remove PCI assumptionAlan Stern
commit ae68a83bdc1971cb02fefc7a686ba6d077065e71 upstream. This patch (as1405) fixes a small bug in ehci-hcd's isochronous scheduler. Not all EHCI controllers are PCI, and the code shouldn't assume that they are. Instead, introduce a special flag for controllers which need to delay iso scheduling for full-speed devices beyond the scheduling threshold. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Sarah Sharp <sarah.a.sharp@linux.intel.com> CC: David Brownell <david-b@pacbell.net> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-13USB: musb: use correct register widths in register dumpsAnand Gadiyar
commit 0936fb5e92a90476959447ad8ae5d780afbbd930 upstream. DMA_ADDR and DMA_COUNT are 32-bit registers, not 16-bit. Marking them as 16-bit in the table causes only the lower 16-bits to be dumped and this is misleading. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: musb: tusb6010: fix compile error with n8x0_defconfig USB: FTDI: Add support for the RT System VX-7 radio programming cable USB: add quirk for Broadcom BT dongle USB: usb-storage: fix initializations of urb fields USB: xhci: Set Mult field in endpoint context correctly. USB: sisusbvga: Fix for USB 3.0 USB: adds Artisman USB dongle to list of quirky devices USB: xhci: Set EP0 dequeue ptr after reset of configured device. USB: Fix USB3.0 Port Speed Downgrade after port reset USB: xHCI: Fix another bug in link TRB activation change. USB: option: Add support for AMOI Skypephone S2 USB: New PIDs for Qualcomm gobi 2000 (qcserial) USB: ftdi_sio: support for Signalyzer tools based on FTDI chips USB: s3c2410_udc: be aware of connected gadget driver USB: Expose vendor-specific ACM channel on Nokia 5230 USB: Add PID for Sierra 250U to drivers/usb/serial/sierra.c USB: option: add support for 1da5:4518
2010-07-26USB: musb: tusb6010: fix compile error with n8x0_defconfigFelipe Balbi
Drop the unnecessary empty stubs in tusb6010.c and avoid a compile error when building kernel for n8x0. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: FTDI: Add support for the RT System VX-7 radio programming cableCorey Minyard
RT Systems has put out bunch of ham radio cables based on the FT232RL chip. Each cable type has a unique PID, this adds one for the Yaesu VX-7 radios. Signed-off-by: Corey Minyard <minyard@acm.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: add quirk for Broadcom BT dongleOliver Neukum
This device needs to be reset when resuming Signed-off-by: Oliver Neukum <oneukum@suse.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: usb-storage: fix initializations of urb fieldsBob Copeland
Commit 0ede76fcec5415ef82a423a95120286895822e2d, "USB: remove uses of URB_NO_SETUP_DMA_MAP" introduced a regression by inadvertantly removing initialization of the transfer flags. This caused initialization failures in the ums-karma driver. Fix the regression by zeroing it. While at it, as Alan Stern points out, the initializers for actual_length and status are handled by the core and error_count only matters for isochronous urbs, so they don't need to be set here. Remove them. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: xhci: Set Mult field in endpoint context correctly.Sarah Sharp
The bmAttributes field of the SuperSpeed Endpoint Companion Descriptor has different meanings, depending on the endpoint type. If the endpoint is isochronous, the bmAttributes field is the maximum number of packets within a service interval that this endpoint supports. If the endpoint is bulk, it's the number of stream IDs this endpoint supports. Only set the Mult field of the xHCI endpoint context using the bmAttributes field if the endpoint is isochronous, and the device is a SuperSpeed device. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: sisusbvga: Fix for USB 3.0Oliver Neukum
Super speed is also fast enough to let sisusbvga operate. Therefor expand the checks. Signed-off-by: Oliver Neukum <oneukum@suse.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: adds Artisman USB dongle to list of quirky devicesPaul Mortier
When an attempt is made to read the interface strings of the Artisman Watchdog USB dongle (idVendor:idProduct 04b4:0526) an error is written to the dmesg log (uhci_result_common: failed with status 440000) and the dongle resets itself, resulting in a disconnect/reconnect loop. Adding the dongle to the list of devices in quirks.c, with the same quirk Alan Stern's previous patch for the Saitek Cyborg Gold 3D joystick, stops the device from resetting and allows it to be used with no problems. Signed-off-by: Paul Mortier <mortier@btinternet.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: xhci: Set EP0 dequeue ptr after reset of configured device.Sarah Sharp
When a configured device is reset, the control endpoint's ring is reused. If control transfers to the device were issued before the device is reset, the dequeue pointer will be somewhere in the middle of the ring. If the device is then issued an address with the set address command, the xHCI driver must provide a valid input context for control endpoint zero. The original code would give the hardware the original input context, which had a dequeue pointer set to the top of the ring. This would cause the host to re-execute any control transfers until it reached the ring's enqueue pointer. When issuing a set address command for a device that has just been configured and then reset, use the control endpoint's enqueue pointer as the hardware's dequeue pointer. Assumption: All control transfers will be completed or cancelled before the set address command is issued to the device. If there are any outstanding control transfers, this code will not work. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: Fix USB3.0 Port Speed Downgrade after port resetSarah Sharp
Without this fix, a USB 3.0 port is downgraded to full speed after a port reset of a configured device. The USB 3.0 terminations will be disabled permanently, and USB 3.0 devices will always enumerate as full speed devices, until the host controller is unplugged (if it is an ExpressCard) or the computer is rebooted. Fajun Chen traced this traced the speed downgrade issue to the port reset and the interpretation of port status in USB hub driver code. The hub code was not testing for the port being a SuperSpeed port, and it fell through to the else case of Full Speed. The following patch adds SuperSpeed mapping from the port status, and fixes the speed downgrade issue. Reported-by: Fajun Chen <fajun.chen@seagate.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: xHCI: Fix another bug in link TRB activation change.Sarah Sharp
Commit 6c12db90f19727c76990e7f4801c67a148b30111 also seems to have introduced a bug that is triggered when the command ring is about to wrap. The inc_enq() function will not have moved the enqueue pointer past the link TRB. It is supposed to be moved past the link TRB in prepare_ring(), which should be called before a TD is enqueued. However, the queue_command() function never calls the prepare_ring() function because prepare_ring() is only supposed to be used for endpoint rings. That means the enqueue pointer will not be moved past the link TRB, and will get overwritten. The fix is to make queue_command() call prepare_ring() with a fake endpoint status (set to running). Then the enqueue pointer will get moved past the link TRB. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: option: Add support for AMOI Skypephone S2Dennis Jansen
usbserial: Add AMOI Skypephone S2 support. This patch adds support for the AMOI Skypephone S2 to the usbserial module. Tested-by: Dennis Jansen <Dennis.Jansen@web.de> Signed-off-by: Dennis Jansen <Dennis.Jansen@web.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: New PIDs for Qualcomm gobi 2000 (qcserial)Andrew Bird
Adds support for the Generic Qualcomm Gobi 2000 WWAN UMTS/CDMA modem Signed-off-by: Andrew Bird <ajb@spheresytems.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: ftdi_sio: support for Signalyzer tools based on FTDI chipsColin Leitner
ftdi_sio: support for Signalyzer tools based on FTDI chips This patch adds support for the Xverve Signalyzers. Signed-off-by: Colin Leitner <colin.leitner@googlemail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: s3c2410_udc: be aware of connected gadget driverVladimir Zapolskiy
To escape from data abort in interrupt handler, it is required to check for a connected gadget before delivering control requests. The change fixes the following panic, which occurs with no loaded gadget driver and input USB_REQ_GET_DESCRIPTOR request: Kernel panic - not syncing: Fatal exception in interrupt [<c0025874>] (unwind_backtrace+0x0/0xd8) from [<c0253f14>] (panic+0x40/0x110) [<c0253f14>] (panic+0x40/0x110) from [<c002470c>] (die+0x154/0x180) [<c002470c>] (die+0x154/0x180) from [<c0026448>] (__do_kernel_fault+0x64/0x74) [<c0026448>] (__do_kernel_fault+0x64/0x74) from [<c0026610>] (do_page_fault+0x1b8/0x1cc) [<c0026610>] (do_page_fault+0x1b8/0x1cc) from [<c00202d4>] (do_DataAbort+0x34/0x94) [<c00202d4>] (do_DataAbort+0x34/0x94) from [<c0020a60>] (__dabt_svc+0x40/0x60) Exception stack(0xc0327ea8 to 0xc0327ef0) 7ea0: bf0026b0 c0327ef0 c0327ee4 00000000 bf002590 00000093 7ec0: 00000001 bf0026b0 bf002990 00000000 00000008 0000143d 00003f00 c0327ef0 7ee0: bf001364 bf001360 20000093 ffffffff [<c0020a60>] (__dabt_svc+0x40/0x60) from [<bf001360>] (s3c2410_udc_irq+0x5b8/0x778 [s3c2410_udc]) [<bf001360>] (s3c2410_udc_irq+0x5b8/0x778 [s3c2410_udc]) from [<c0058aa0>] (handle_IRQ_event+0x3c/0x104) [<c0058aa0>] (handle_IRQ_event+0x3c/0x104) from [<c005a428>] (handle_edge_irq+0x12c/0x164) [<c005a428>] (handle_edge_irq+0x12c/0x164) from [<c0020068>] (asm_do_IRQ+0x68/0x88) [<c0020068>] (asm_do_IRQ+0x68/0x88) from [<c0020aa4>] (__irq_svc+0x24/0xa0) Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: Expose vendor-specific ACM channel on Nokia 5230Przemo Firszt
Nokia S60 phones expose two ACM channels. The first is a modem, the second is 'vendor-specific' but is treated as a serial device at the S60 end, so we want to expose it on Linux too. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: Add PID for Sierra 250U to drivers/usb/serial/sierra.caugust huber
Add VID/PID for Sierra Wireless 250U USB dongle to sierra.c Allows use of 3G radio only Signed-off-by: August Huber <gus@pbx.org> Cc: Elina Pasheva <epasheva@sierrawireless.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26USB: option: add support for 1da5:4518Ă–mer Sezgin Ugurlu
Signed-off-by: Omer Sezgin Ugurlu <omer.ugurlu@a-kent.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6265/1: kirkwood: move qnap_tsx1x_register_flash() to .init.text ARM: 6263/1: ns9xxx: fix FTBFS for zImage ARM: 6262/1: arm/clps711x: fix debug macro compilation failure ARM: 6261/1: arm/shark: fix debug macro compilation failure ARM: 6260/1: arm/plat-spear: fix debug macro compilation failure ARM: 6259/1: arm/ns9xxx: fix debug macro compilation failure ARM: 6258/1: arm/h720x: fix debug macro compilation failure ARM: 6233/1: Delete a wrong redundant right parenthesis ARM: 6230/1: fix nuc900 touchscreen clk definition bug [ARM] pxa: fix incorrect CONFIG_CPU_PXA27x to CONFIG_PXA27x [ARM] pxa/colibri-pxa300: fix AC97 init [ARM] pxa: fix incorrect order of AC97 reset pin configs [ARM] pxa: fix frequency scaling for pcmcia/pxa2xx_base [ARM] pxa: cpufreq-pxa2xx: fix DRI recomputation routine [ARM] pxa/corgi: fix MMC/SD card detection failure
2010-07-21Fix up trivial spelling errors ('taht' -> 'that')Linus Torvalds
Pointed out by Lucas who found the new one in a comment in setup_percpu.c. And then I fixed the others that I grepped for. Reported-by: Lucas <canolucas@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-15[ARM] pxa: fix incorrect CONFIG_CPU_PXA27x to CONFIG_PXA27xEric Miao
Reported-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-07-11V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host driversLaurent Pinchart
The UVC gadget driver borrowed code from the UVC host driver without changing the symbol names. This results in a namespace clash with multiple definitions of several symbols when compiling both drivers in the kernel. Make all generic UVC functions and variables static in the UVC gadget driver, as the symbols are not referenced outside of the gadget driver. Rename the uvc_trace_param global variable to uvc_gadget_trace_param. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-30USB: gadget: f_mass_storage: stale common->fsg value bug fixMichal Nazarewicz
On fsg_unbind the common->fsg pointer was not NULLed if the unbound fsg_dev instance was the current one. As an effect, the incorrect pointer was preserved in all further operations which caused do_set_interface to reference an invalid region. This commit fixes this by raising an exception in fsg_bind which will change the common->fsg pointer. This also requires an wait queue so that the thread in fsg_bind can wait till the worker thread handles the exception. This commit removes also a config and new_config fields of fsg_common as they are no longer needed since fsg can be used to determine whether function is active or not. Moreover, this commit removes possible race condition where the fsg field was modified in both the worker thread and form various other contexts. This is fixed by replacing prev_fsg with new_fsg. At this point, fsg is assigned only in worker thread. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: gadget: f_mass_storage: fixed fs descriptors not being updatedMichal Nazarewicz
The full speed descriptors were copied to the usb_function structure in the fsg_bind_config function before call to the usb_ep_autoconfig. The usb_ep_autoconfig was called in fsg_bind using the original descriptors. In effect copied descriptors were not updated. This patch changes the copy full speed descriptors after the call to usb_op_autoconfig is performed. This way, copied full speed descriptors have updated values. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Reported-by: Dries Van Puymbroeck <Dries.VanPuymbroeck@dekimo.com> Tested-by: Dries Van Puymbroeck <Dries.VanPuymbroeck@dekimo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: musb: Enable the maximum supported burst mode for DMAHema HK
Setting MUSB Burst Mode 3 automatically enables support for lower burst modes (BURST4, BURST8, BURST16 or bursts of unspecified length). There is no need to set these burst modes based on the packet size. Also enable the burst mode for both mode1 and mode0. This is a fix for buggy hardware - having the lower burst modes enabled can potentially cause lockups of the DMA engine used in OMAP2/3/4 chips. Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: musb: fix Blackfin ulpi stubsMike Frysinger
The new ulpi code defines fallback stubs for the Blackfin arch, but does so incorrectly leading to a build failure: drivers/usb/musb/musb_core.c:227: error: 'musb_ulpi_read' undeclared here (not in a function) drivers/usb/musb/musb_core.c:228: error: 'musb_ulpi_write' undeclared here (not in a function) Tweak the fallback stubs so that they do work as intended. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: MUSB: make non-OMAP platforms build with CONFIG_PM=ySergei Shtylyov
Attempt to build MUSB driver with CONFIG_PM=y (e.g. in the OTG mode) on DaVinci results in these link errors: drivers/built-in.o: In function `musb_restore_context': led-triggers.c:(.text+0x714d8): undefined reference to `musb_platform_restore_context' drivers/built-in.o: In function `musb_save_context': led-triggers.c:(.text+0x71788): undefined reference to `musb_platform_save_context' This turned out to be caused by commit 9957dd97ec5e98dd334f87ade1d9a0b24d1f86eb (usb: musb: Fix compile error for omaps for musb_hdrc). Revert it, taking into account the rename of CONFIG_ARCH_OMAP34XX into CONFIG_ARCH_OMAP3 (which that commit fixed in a completely inappropriate way) and the recent addition of OMAP4 support. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: musb_core: make disconnect and suspend interrupts work againSergei Shtylyov
Commit 1c25fda4a09e8229800979986ef399401053b46e (usb: musb: handle irqs in the order dictated by programming guide) forgot to get rid of the old 'STAGE0_MASK' filter for calling musb_stage0_irq(), so now disconnect and suspend interrupts are effectively ignored... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: stable <stable@kernel.org> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: obey the sysfs power/wakeup settingAlan Stern
This patch (as1403) is a partial reversion of an earlier change (commit 5f677f1d45b2bf08085bbba7394392dfa586fa8e "USB: fix remote wakeup settings during system sleep"). After hearing from a user, I realized that remote wakeup should be enabled during system sleep whenever userspace allows it, and not only if a driver requests it too. Indeed, there could be a device with no driver, that does nothing but generate a wakeup request when the user presses a button. Such a device should be allowed to do its job. The problem fixed by the earlier patch -- device generating a wakeup request for no reason, causing system suspend to abort -- was also addressed by a later patch ("USB: don't enable remote wakeup by default", accepted but not yet merged into mainline). The device won't be able to generate the bogus wakeup requests because it will be disabled for remote wakeup by default. Hence this reversion will not re-introduce any old problems. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> [.34] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: gadget eth: Fix calculate CRC32 in EEMJiri Pinkava
CRC should be calculated for Ethernet frame, not for whole recievede EEM data. This bug shows rarely, because in many times len == skb->len. Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: qcserial: fix a memory leak in qcprobe error pathAxel Lin
This patch adds missing kfree(data) before return -ENODEV. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: gadget/printer, fix sleep inside atomicJiri Slaby
Stanse found that sleep is called inside atomic context created by lock_printer_io spinlock in several functions. It's used in process context only and some functions sleep inside its critical section. As this is not allowed for spinlocks, switch it to mutex. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Craig W. Nadler <craig@nadler.us> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: isp1362-hcd, fix double lockJiri Slaby
Stanse found that isp1362_sw_reset tries to take a isp1362_hcd->lock, but it is already held in isp1362_hc_stop. Avoid that by introducing __isp1362_sw_reset which doesn't take the lock and call it from isp1362_hc_stop. isp1362_sw_reset is then as simple as lock -- __isp1362_sw_reset -- unlock. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Lothar Wassmann <LW@KARO-electronics.de> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Bryan Wu <cooloney@kernel.org> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: serial: ftdi: correct merge conflict with CONTEC idDaniel Sangorrin
This patch corrects a problem with the merge of a previous patch to add the CONTEC identifier. I believe the merge problem occurred with the commit: dee5658b482e9e2ac7d6205dc876fc11d4008138 Originally I submitted a patch and then they asked me to order the IDs and resubmit, so did I. But unfortunately in the end somehow both patches were merged. Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: fix oops in usb_sg_init()Alan Stern
This patch (as1401) fixes a bug in usb_sg_init() that can cause an invalid pointer dereference. An inner loop reuses some local variables in an unsafe manner, so new variables are introduced. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: s3c2410: deactivate endpoints before gadget unbindingVladimir Zapolskiy
Gadget disconnect must be called before unbinding to avoid races. The change fixes an oops on g_ether module unregistering. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: ehci-mxc: bail out on transceiver problemsWolfram Sang
The old code registered the hcd even if there were no transceivers detected, leading to oopses like this if we try to probe a non-existant ULPI: [ 2.730000] mxc-ehci mxc-ehci.0: unable to init transceiver [ 2.740000] timeout polling for ULPI device [ 2.740000] timeout polling for ULPI device [ 2.750000] mxc-ehci mxc-ehci.0: unable to enable vbus on transceiver [ 2.750000] mxc-ehci mxc-ehci.0: Freescale On-Chip EHCI Host Controller [ 2.760000] mxc-ehci mxc-ehci.0: new USB bus registered, assigned bus number 2 [ 2.770000] Unhandled fault: external abort on non-linefetch (0x808) at 0xc4876184 [ 2.770000] Internal error: : 808 [#1] PREEMPT [ 2.770000] last sysfs file: [ 2.770000] Modules linked in: [ 2.770000] CPU: 0 Not tainted (2.6.33.5 #5) [ 2.770000] PC is at ehci_hub_control+0x4d4/0x8f8 [ 2.770000] LR is at ehci_mxc_setup+0xbc/0xdc [ 2.770000] pc : [<c0196dfc>] lr : [<c019bc8c>] psr: 00000093 [ 2.770000] sp : c3815e40 ip : 00000001 fp : 60000013 [ 2.770000] r10: c4876184 r9 : 00000000 r8 : c3814000 [ 2.770000] r7 : c391d2cc r6 : 00000001 r5 : 00000001 r4 : 00000000 [ 2.770000] r3 : 80000000 r2 : 00000007 r1 : 80000000 r0 : c4876184 [ 2.770000] Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 2.770000] Control: 0005317f Table: a0004000 DAC: 00000017 [ 2.770000] Process swapper (pid: 1, stack limit = 0xc3814270) ... Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: stable <stable@kernel.org> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30USB: otg/ulpi: bail out on read errorsWolfram Sang
otg_read may return errnos, so bail out correctly to prevent bogus ID-numbers. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Daniel Mack <daniel@caiaq.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>