1. 13 Apr, 2011 13 commits
    • 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 13 commits
  4. 10 Apr, 2011 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 4263a2f1
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        ALSA: hda - Don't query connections for widgets have no connections
        ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
        ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
        ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
        ALSA: HDA: Fix dock mic for Lenovo X220-tablet
        ASoC: format_register_str: Don't clip register values
        ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare
        ASoC: zylonite: set .codec_dai_name in initializer
      4263a2f1
    • J. Bruce Fields's avatar
      nfsd4: fix oops on lock failure · 23fcf2ec
      J. Bruce Fields authored
      Lock stateid's can have access_bmap 0 if they were only partially
      initialized (due to a failed lock request); handle that case in
      free_generic_stateid.
      
      ------------[ cut here ]------------
      kernel BUG at fs/nfsd/nfs4state.c:380!
      invalid opcode: 0000 [#1] SMP
      last sysfs file: /sys/kernel/mm/ksm/run
      Modules linked in: nfs fscache md4 nls_utf8 cifs ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat bridge stp llc nfsd lockd nfs_acl auth_rpcgss sunrpc ipv6 ppdev parport_pc parport pcnet32 mii pcspkr microcode i2c_piix4 BusLogic floppy [last unloaded: mperf]
      
      Pid: 1468, comm: nfsd Not tainted 2.6.38+ #120 VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
      EIP: 0060:[<e24f180d>] EFLAGS: 00010297 CPU: 0
      EIP is at nfs4_access_to_omode+0x1c/0x29 [nfsd]
      EAX: ffffffff EBX: dd758120 ECX: 00000000 EDX: 00000004
      ESI: dd758120 EDI: ddfe657c EBP: dd54dde0 ESP: dd54dde0
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process nfsd (pid: 1468, ti=dd54c000 task=ddc92580 task.ti=dd54c000)
      Stack:
       dd54ddf0 e24f19ca 00000000 ddfe6560 dd54de08 e24f1a5d dd758130 deee3a20
       ddfe6560 31270000 dd54df1c e24f52fd 0000000f dd758090 e2505dd0 0be304cf
       dbb51d68 0000000e ddfe657c ddcd8020 dd758130 dd758128 dd7580d8 dd54de68
      Call Trace:
       [<e24f19ca>] free_generic_stateid+0x1c/0x3e [nfsd]
       [<e24f1a5d>] release_lockowner+0x71/0x8a [nfsd]
       [<e24f52fd>] nfsd4_lock+0x617/0x66c [nfsd]
       [<e24e57b6>] ? nfsd_setuser+0x199/0x1bb [nfsd]
       [<e24e056c>] ? nfsd_setuser_and_check_port+0x65/0x81 [nfsd]
       [<c07a0052>] ? _cond_resched+0x8/0x1c
       [<c04ca61f>] ? slab_pre_alloc_hook.clone.33+0x23/0x27
       [<c04cac01>] ? kmem_cache_alloc+0x1a/0xd2
       [<c04835a0>] ? __call_rcu+0xd7/0xdd
       [<e24e0dfb>] ? fh_verify+0x401/0x452 [nfsd]
       [<e24f0b61>] ? nfsd4_encode_operation+0x52/0x117 [nfsd]
       [<e24ea0d7>] ? nfsd4_putfh+0x33/0x3b [nfsd]
       [<e24f4ce6>] ? nfsd4_delegreturn+0xd4/0xd4 [nfsd]
       [<e24ea2c9>] nfsd4_proc_compound+0x1ea/0x33e [nfsd]
       [<e24de6ee>] nfsd_dispatch+0xd1/0x1a5 [nfsd]
       [<e1d6e1c7>] svc_process_common+0x282/0x46f [sunrpc]
       [<e1d6e578>] svc_process+0xdc/0xfa [sunrpc]
       [<e24de0fa>] nfsd+0xd6/0x115 [nfsd]
       [<e24de024>] ? nfsd_shutdown+0x24/0x24 [nfsd]
       [<c0454322>] kthread+0x62/0x67
       [<c04542c0>] ? kthread_worker_fn+0x114/0x114
       [<c07a6ebe>] kernel_thread_helper+0x6/0x10
      Code: eb 05 b8 00 00 27 4f 8d 65 f4 5b 5e 5f 5d c3 83 e0 03 55 83 f8 02 89 e5 74 17 83 f8 03 74 05 48 75 09 eb 09 b8 02 00 00 00 eb 0b <0f> 0b 31 c0 eb 05 b8 01 00 00 00 5d c3 55 89 e5 57 56 89 d6 8d
      EIP: [<e24f180d>] nfs4_access_to_omode+0x1c/0x29 [nfsd] SS:ESP 0068:dd54dde0
      ---[ end trace 2b0bf6c6557cb284 ]---
      
      The trace route is:
      
       -> nfsd4_lock()
         -> if (lock->lk_is_new) {
           -> alloc_init_lock_stateid()
      
              3739: stp->st_access_bmap = 0;
      
         ->if (status && lock->lk_is_new && lock_sop)
           -> release_lockowner()
            -> free_generic_stateid()
             -> nfs4_access_bmap_to_omode()
                -> nfs4_access_to_omode()
      
              380: BUG();   *****
      
      This problem was introduced by 0997b173.
      Reported-by: default avatarMi Jinlong <mijinlong@cn.fujitsu.com>
      Tested-by: default avatarMi Jinlong <mijinlong@cn.fujitsu.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      23fcf2ec
  5. 09 Apr, 2011 3 commits
  6. 08 Apr, 2011 8 commits