1. 13 Apr, 2011 27 commits
    • Steven Hardy's avatar
      usb: Fix qcserial memory leak on rmmod · 10c9ab15
      Steven Hardy authored
      qcprobe function allocates serial->private but this is never freed, this
      patch adds a new function qc_release() which frees serial->private, after
      calling usb_wwan_release
      Signed-off-by: default avatarSteven Hardy <shardy@redhat.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      10c9ab15
    • Paul Friedrich's avatar
      USB: ftdi_sio: add ids for Hameg HO720 and HO730 · c53c2fab
      Paul Friedrich authored
      usb serial: ftdi_sio: add two missing USB ID's for Hameg interfaces HO720
      and HO730
      
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c53c2fab
    • Marius B. Kotsbak's avatar
      USB: option: Added support for Samsung GT-B3730/GT-B3710 LTE USB modem. · 80f9df3e
      Marius B. Kotsbak authored
      Bind only modem AT command endpoint to option.
      Signed-off-by: default avatarMarius B. Kotsbak <marius@kotsbak.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      80f9df3e
    • Dan Carpenter's avatar
      usb: pch_udc: unlock on allocation failure · 48570711
      Dan Carpenter authored
      There was an unlock missing on the error path.
      
      Also I did a small cleanup by changing ep->dev->lock for just dev->lock.
      They're the same lock, but dev->lock is shorter and that's how it is
      used for the spin_unlock_irqrestore() call.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      48570711
    • Joerg Roedel's avatar
      USB host: Fix lockdep warning in AMD PLL quirk · 9ab7927b
      Joerg Roedel authored
      Booting latest kernel on my test machine produces a lockdep
      warning from the usb_amd_find_chipset_info() function:
      
       WARNING: at /data/lemmy/linux.trees.git/kernel/lockdep.c:2465 lockdep_trace_alloc+0x95/0xc2()
       Hardware name: Snook
       Modules linked in:
       Pid: 959, comm: work_for_cpu Not tainted 2.6.39-rc2+ #22
       Call Trace:
        [<ffffffff8103c0d4>] warn_slowpath_common+0x80/0x98
        [<ffffffff812387e6>] ? T.492+0x24/0x26
        [<ffffffff8103c101>] warn_slowpath_null+0x15/0x17
        [<ffffffff81068667>] lockdep_trace_alloc+0x95/0xc2
        [<ffffffff810ed9ac>] slab_pre_alloc_hook+0x18/0x3b
        [<ffffffff810ef227>] kmem_cache_alloc_trace+0x25/0xba
        [<ffffffff812387e6>] T.492+0x24/0x26
        [<ffffffff81238816>] pci_get_subsys+0x2e/0x73
        [<ffffffff8123886c>] pci_get_device+0x11/0x13
        [<ffffffff814082a9>] usb_amd_find_chipset_info+0x3f/0x18a
      ...
      
      It turns out that this function calls pci_get_device under a spin_lock
      with irqs disabled, but the pci_get_device function is only allowed in
      preemptible context.
      
      This patch fixes the warning by making all data-structure
      modifications on temporal storage and commiting this back
      into the visible structure at the end. While at it, this
      patch also moves the pci_dev_put calls out of the spinlocks
      because this function might sleep too.
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9ab7927b
    • Sebastian Andrzej Siewior's avatar
      usb/gadget: don't leak hs_descriptors · 16a2f970
      Sebastian Andrzej Siewior authored
      We should free both descriptors.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      16a2f970
    • Yoichi Yuasa's avatar
      USB: ohci-au1xxx: fix warning "__BIG_ENDIAN" is not defined · 0fdf65c3
      Yoichi Yuasa authored
      In file included from drivers/usb/host/ohci-hcd.c:1028:0:
      drivers/usb/host/ohci-au1xxx.c:36:7: warning: "__BIG_ENDIAN" is not defined
      Signed-off-by: default avatarYoichi Yuasa <yuasa@linux-mips.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0fdf65c3
    • Johan Hovold's avatar
      USB: ftdi_sio: add PID for OCT DK201 docking station · 11a31d84
      Johan Hovold authored
      Add PID 0x0103 for serial port of the OCT DK201 docking station.
      Reported-by: default avatarJan Hoogenraad <jan@hoogenraad.net>
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      11a31d84
    • Johan Hovold's avatar
      usb: musb: omap2430: fix build failure · 36a52c00
      Johan Hovold authored
      Fix build failure introduced by commit
      7acc6197 (usb: musb: Idle path retention
      and offmode support for OMAP3) when building without gadget
      support.
      
        CC      drivers/usb/musb/omap2430.o
      drivers/usb/musb/omap2430.c: In function ‘musb_otg_notifications’:
      drivers/usb/musb/omap2430.c:262: error: ‘struct musb’ has no member named ‘gadget_driver’
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      36a52c00
    • Alan Stern's avatar
      USB: EHCI: unlink unused QHs when the controller is stopped · 94ae4976
      Alan Stern authored
      This patch (as1458) fixes a problem affecting ultra-reliable systems:
      When hardware failover of an EHCI controller occurs, the data
      structures do not get released correctly.  This is because the routine
      responsible for removing unused QHs from the async schedule assumes
      the controller is running properly (the frame counter is used in
      determining how long the QH has been idle) -- but when a failover
      causes the controller to be electronically disconnected from the PCI
      bus, obviously it stops running.
      
      The solution is simple: Allow scan_async() to remove a QH from the
      async schedule if it has been idle for long enough _or_ if the
      controller is stopped.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-and-Tested-by: default avatarDan Duval <dan.duval@stratus.com>
      CC: <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      94ae4976
    • Yauheni Kaliuta's avatar
      usb: gadget: eem: fix echo command processing · 505d1f69
      Yauheni Kaliuta authored
      During processing of bunch of eem frames if "echo" command is found
      skb is cloned and the cloned version should be used to send reply.
      Unfortunately, the data of the original skb were actually used and
      the cloned skb is never freed.
      
      Using the cloned skb and freeing the skb in the completion callback
      for usb request.
      Signed-off-by: default avatarYauheni Kaliuta <yauheni.kaliuta@nokia.com>
      Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      505d1f69
    • Christian Simon's avatar
      USB: ftdi_sio: Added IDs for CTI USB Serial Devices · 5a9443f0
      Christian Simon authored
      I added new ProdutIds for two devices from CTI GmbH Leipzig.
      Signed-off-by: default avatarChristian Simon <simon@swine.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5a9443f0
    • Yoshihiro Shimoda's avatar
      usb: r8a66597-udc: fix spinlock usage · 2c2da179
      Yoshihiro Shimoda authored
      Because the disconnect function in the composite driver will call spin_lock,
      this driver has to call spin_unlock before calling driver->disconnet().
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2c2da179
    • Michal Simek's avatar
      usb: Fix Kconfig unmet dependencies for Microblaze EHCI · 0291303d
      Michal Simek authored
      Disable USB_ARCH_HAS_EHCI in arch Kconfig and enable it in usb Kconfig
      
      Warning log:
      warning: (MICROBLAZE) selects USB_ARCH_HAS_EHCI which has unmet
      direct dependencies (USB_SUPPORT)
      Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0291303d
    • Alexey Khoroshilov's avatar
      USB: usb-gadget: unlock data->lock mutex on error path in ep_read() · 00cc7a5f
      Alexey Khoroshilov authored
      ep_read() acquires data->lock mutex in get_ready_ep() and releases it on
      all paths except for one: when usb_endpoint_xfer_isoc() failed. The
      patch adds mutex_unlock(&data->lock) at that path.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      00cc7a5f
    • Randy Dunlap's avatar
      usb: fix ips1760-hcd printk format warning · d06847fe
      Randy Dunlap authored
      Fix printk format build warning and grammar typo on same line.
      
      drivers/usb/host/isp1760-hcd.c:300: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'size_t'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d06847fe
    • Greg Kroah-Hartman's avatar
      Merge branch 'for-greg' of git://gitorious.org/usb/usb into usb-linus · 86a45a02
      Greg Kroah-Hartman authored
      * 'for-greg' of git://gitorious.org/usb/usb:
        USB: musb: blackfin: work around anomaly 05000450
        usb: musb: Fix the crash issue during reboot
        usb: musb: gadget: check the correct list_head
        usb: musb: temporarily make it bool
        USB: musb: dereferencing an iomem pointer
        USB: musb: silence printk format warning
        USB: musb: using 0 instead of NULL
        USB: musb: add missing unlock in cppi_interrupt()
        usb: musb: ux500: copy dma mask from platform device to musb device
        usb: musb: clear AUTOSET while clearing DMAENAB
      86a45a02
    • Mike Frysinger's avatar
      USB: musb: blackfin: work around anomaly 05000450 · 13254307
      Mike Frysinger authored
      DMA mode 1 data corruption anomaly on Blackfin systems.  This issue is
      specific to the Blackfin silicon as the bug appears to be related to the
      connection of the musb ip to the bus/dma fabric.
      
      Data corruption when using USB DMA mode 1. (Issue manager 17-01-0105)
      DMA mode 1 allows large size transfers to generate a single interrupt
      at the end of the entire transfer.  The transfer is split up in packets
      of length specified in the Maximum Packet Size field for that endpoint.
      If the transfer size is not an integer multiple of the Maximum Packet
      Size, a short packet will be present at the end of the transfer.
      
      Under certain conditions this packet may be corrupted in the USB FIFO.
      
      Workaround:
      Use DMA mode 1 to transfer (n* Maximum Packet Size) and schedule DMA
      mode 0 to transfer the short packet.
      
      As an example if your transfer size is 33168 bytes and Maximum Packet
      Size equals 512, schedule [33168 - (33168 mod 512)] in DMA mode 1 and
      the remainder (33168 mod 512) in DMA mode 0.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      13254307
    • Hema HK's avatar
      usb: musb: Fix the crash issue during reboot · 4f9edd2d
      Hema HK authored
      Below crash observed with commit 7acc6197
      (usb: musb: Idle path retention and offmode support for OMAP3)
      during board reboot.
      
      The musb clock was disabled when musb_shutdown() was called by
      platform_drv_shutdown in which there are register accesses.
      call pm_runtime_get_sync() and pm_runtime_put_sync() in the
      musb_shutdown function.
      
      / # [  172.368774] Unhandled fault: imprecise external abort (0x1406) at 0x400f0000
      [  172.376190] Internal error: : 1406 [#1] SMP
      [  172.380554] last sysfs file: /sys/devices/platform/omap/omap_i2c.4/i2c-4/i2c-dev/i2c-4/dev
      [  172.389221] Modules linked in:
      [  172.392456] CPU: 0    Tainted: G        W    (2.6.38-06671-geddecbb6 #33)
      [  172.399475] PC is at do_raw_spin_unlock+0x50/0xc0
      [  172.404418] LR is at _raw_spin_unlock_irqrestore+0x24/0x44
      [  172.410186] pc : [<c069bfdc>]    lr : [<c085a7f8>]    psr: 60000093
      [  172.410186] sp : ee993e40  ip : c0d00240  fp : bea9cf14
      [  172.422241] r10: 00000000  r9 : ee992000  r8 : c04b2fa8
      [  172.427703] r7 : 00000000  r6 : c0fa46c0  r5 : ef966124  r4 : ef966124
      [  172.434539] r3 : ef92cbc0  r2 : ef92cbc0  r1 : 00000000  r0 : ef966124
      [  172.441406] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
      [  172.448974] Control: 10c5387d  Table: ae8d804a  DAC: 00000015
      [  172.454986] Process init (pid: 1094, stack limit = 0xee9922f8)
      [  172.461120] Stack: (0xee993e40 to 0xee994000)
      [  172.465667] 3e40: a0000013 c085a7f8 ef966124 a0000013 c0fa46c0 c0761ab4 c0761a70 ef95c008
      [  172.474273] 3e60: ef95c014 c06e2fd0 c06e2fbc c06dea90 00000000 01234567 28121969 c04fccb4
      [  172.482849] 3e80: 00000000 c04fcd04 c0a302bc c04fce44 c0a02600 00000001 00000000 c085cd04
      [  172.491424] 3ea0: 00000000 00000002 c09ea000 c085afc0 ee993f24 00000000 00040001 00000445
      [  172.499999] 3ec0: a8eb9d34 00000027 00000000 00000000 00000000 c0a56a4c 00000000 00000000
      [  172.508575] 3ee0: 00000002 60000093 00000000 c0519aac 00000002 00000080 00000000 c0550420
      [  172.517150] 3f00: 00000000 00000002 ee970000 c0a56a3c c0a56a20 00000002 c0a56a3c 00000000
      [  172.525726] 3f20: c0a56a3c 0000000a c1580e00 c0a56a20 00000002 c0a56a3c c1580e00 c0a56a20
      [  172.534301] 3f40: ef92cbc0 c05173a0 00000001 ef92cbc0 c0576190 c04e3174 20000013 c0517324
      [  172.542877] 3f60: ef815c00 ee90b720 c04e3174 c0576190 00000001 ef92cbc0 c04b2f00 ffffffff
      [  172.551483] 3f80: 00000058 c0517324 00000000 00000000 ffffffff 00000000 00000000 ffffffff
      [  172.560058] 3fa0: 00000058 c04b2de0 00000000 00000000 fee1dead 28121969 01234567 00000000
      [  172.568634] 3fc0: 00000000 00000000 ffffffff 00000058 00000000 00000001 400aa000 bea9cf14
      [  172.577209] 3fe0: 000ea148 bea9c958 000aa750 40225728 60000010 fee1dead 00000000 00000000
      [  172.585784] [<c069bfdc>] (do_raw_spin_unlock+0x50/0xc0) from [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44)
      [  172.596588] [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44) from [<c0761ab4>] (musb_shutdown+0x44/0x88)
      [  172.606933] [<c0761ab4>] (musb_shutdown+0x44/0x88) from [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18)
      [  172.616699] [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18) from [<c06dea90>] (device_shutdown+0x74/0xb4)
      [  172.626647] [<c06dea90>] (device_shutdown+0x74/0xb4) from [<c04fccb4>] (kernel_restart_prepare+0x24/0x38)
      [  172.636688] [<c04fccb4>] (kernel_restart_prepare+0x24/0x38) from [<c04fcd04>] (kernel_restart+0xc/0x48)
      [  172.646545] [<c04fcd04>] (kernel_restart+0xc/0x48) from [<c04fce44>] (sys_reboot+0xfc/0x1d8)
      [  172.655426] [<c04fce44>] (sys_reboot+0xfc/0x1d8) from [<c04b2de0>] (ret_fast_syscall+0x0/0x3c)
      [  172.664459] Code: e3c3303f e594200c e593300c e1520003 (0a000002)
      [  172.670867] ------------[ cut here ]------------
      Signed-off-by: default avatarHema HK <hemahk@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      4f9edd2d
    • Felipe Balbi's avatar
      usb: musb: gadget: check the correct list_head · 3d5ad13e
      Felipe Balbi authored
      We are now using our own list_head, so we should
      be checking against that, not the gadget driver's
      list_head.
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      3d5ad13e
    • Felipe Balbi's avatar
      usb: musb: temporarily make it bool · 7a180e70
      Felipe Balbi authored
      Due to the recent changes to musb's glue layers,
      we can't compile musb-hdrc as a module - compilation
      will break due to undefined symbol musb_debug. In
      order to fix that, we need a big re-work of the
      debug support on the MUSB driver.
      
      Because that would mean a lot of new code coming
      into the -rc series, it's best to defer that to
      next merge window and for now just disable module
      support for MUSB.
      
      Once we get the refactor of the debugging support
      done, we can simply revert this patch and things
      will go back to normal again.
      
      Cc: stable@kernel.org # v2.6.38
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      7a180e70
    • Dan Carpenter's avatar
      USB: musb: dereferencing an iomem pointer · 2e10f5e7
      Dan Carpenter authored
      "tx_ram" points to io memory.  We can't dereference it directly.  Sparse
      complains about this: "drivers/usb/musb/cppi_dma.c:1205:25: warning:
      dereference of noderef expression"
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      2e10f5e7
    • Dan Carpenter's avatar
      USB: musb: silence printk format warning · 2fbcf3fa
      Dan Carpenter authored
      Gcc gives the following warnings:
      
      drivers/usb/musb/cppi_dma.c: In function ‘cppi_next_tx_segment’:
      drivers/usb/musb/cppi_dma.c:600: warning: format ‘%x’ expects type ‘unsigned int’, but argument 8 has type ‘dma_addr_t’
      drivers/usb/musb/cppi_dma.c: In function ‘cppi_next_rx_segment’:
      drivers/usb/musb/cppi_dma.c:822: warning: format ‘%x’ expects type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’
      drivers/usb/musb/cppi_dma.c: In function ‘cppi_rx_scan’:
      drivers/usb/musb/cppi_dma.c:1042: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’
      drivers/usb/musb/cppi_dma.c:1114: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’
      
      dma_addr_t is sometimes 32 bit and sometimes 64.  We normally cast them
      to unsigned long long for printk().
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      2fbcf3fa
    • Dan Carpenter's avatar
      USB: musb: using 0 instead of NULL · aca7f353
      Dan Carpenter authored
      Sparse complains (and rightly so):
      drivers/usb/musb/cppi_dma.c:1458:33:
      	warning: Using plain integer as NULL pointer
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      aca7f353
    • Dan Carpenter's avatar
      USB: musb: add missing unlock in cppi_interrupt() · ec63bf6c
      Dan Carpenter authored
      We should unlock before returning here.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      ec63bf6c
    • Mian Yousaf Kaukab's avatar
      usb: musb: ux500: copy dma mask from platform device to musb device · 87266064
      Mian Yousaf Kaukab authored
      musb code checks dma mask before calling dma hooks.
      Signed-off-by: default avatarMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      87266064
    • Mian Yousaf Kaukab's avatar
      usb: musb: clear AUTOSET while clearing DMAENAB · 100d4a9d
      Mian Yousaf Kaukab authored
      On the completion of tx dma, dma is disabled by clearing MUSB_TXCSR_DMAENAB in
      TXCSR. If MUSB_TXCSR_AUTOSET was set in txstate() it will remain set although
      it is not needed in PIO mode. Clear it as soon as it is not needed.
      Signed-off-by: default avatarMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      100d4a9d
  2. 12 Apr, 2011 1 commit
  3. 11 Apr, 2011 12 commits