1. 29 11月, 2010 1 次提交
  2. 18 11月, 2010 1 次提交
  3. 17 11月, 2010 1 次提交
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  4. 12 11月, 2010 1 次提交
  5. 11 11月, 2010 10 次提交
  6. 10 11月, 2010 1 次提交
    • C
      block: remove REQ_HARDBARRIER · 02e031cb
      Christoph Hellwig 提交于
      REQ_HARDBARRIER is dead now, so remove the leftovers.  What's left
      at this point is:
      
       - various checks inside the block layer.
       - sanity checks in bio based drivers.
       - now unused bio_empty_barrier helper.
       - Xen blockfront use of BLKIF_OP_WRITE_BARRIER - it's dead for a while,
         but Xen really needs to sort out it's barrier situaton.
       - setting of ordered tags in uas - dead code copied from old scsi
         drivers.
       - scsi different retry for barriers - it's dead and should have been
         removed when flushes were converted to FS requests.
       - blktrace handling of barriers - removed.  Someone who knows blktrace
         better should add support for REQ_FLUSH and REQ_FUA, though.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      02e031cb
  7. 09 11月, 2010 2 次提交
  8. 08 11月, 2010 1 次提交
  9. 05 11月, 2010 11 次提交
    • H
      usb: musb: Fix handling of spurious SESSREQ · 19aab56c
      Heikki Krogerus 提交于
      Rely on VBUS being valid on top off B device.
      Signed-off-by: NHeikki Krogerus <heikki.krogerus@nokia.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      19aab56c
    • M
      usb: musb: fix kernel oops when loading musb_hdrc module for the 2nd time · b2120914
      Ming Lei 提交于
      musb driver still may write MUSB_DEVCTL register after clock is disabled
      in musb_platform_exit, which may cause the kernel oops[1] when musb_hdrc
      module is loaded for the 2nd time.
      
      The patch fixes the kernel oops in this case.
      
      [1] kernel oops when loading musb_hdrc module for the 2nd time
      
      [   93.380279] musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=5
      [   93.387847] bus: 'platform': add driver musb_hdrc
      [   93.388153] bus: 'platform': driver_probe_device: matched device musb_hdrc with driver musb_hdrc
      [   93.388183] bus: 'platform': really_probe: probing driver musb_hdrc with device musb_hdrc
      [   93.405090] HS USB OTG: revision 0x33, sysconfig 0x2010, sysstatus 0x1, intrfsel 0x1, simenable  0x0
      [   93.405364] musb_hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
      [   93.405395] musb_hdrc: MHDRC RTL version 1.400
      [   93.405426] musb_hdrc: setup fifo_mode 3
      [   93.405456] musb_hdrc: 7/31 max ep, 3648/16384 memory
      [   93.405487] musb_core_init 1524: musb_hdrc: hw_ep 0shared, max 64
      [   93.405487] musb_core_init 1524: musb_hdrc: hw_ep 1tx, doublebuffer, max 512
      [   93.405517] musb_core_init 1533: musb_hdrc: hw_ep 1rx, doublebuffer, max 512
      [   93.405548] musb_core_init 1524: musb_hdrc: hw_ep 2tx, max 512
      [   93.405578] musb_core_init 1533: musb_hdrc: hw_ep 2rx, max 512
      [   93.405578] musb_core_init 1524: musb_hdrc: hw_ep 3shared, max 256
      [   93.405609] musb_core_init 1524: musb_hdrc: hw_ep 4shared, max 256
      [   93.405853] musb_platform_try_idle 133: b_idle inactive, for idle timer for 7 ms
      [   93.405944] device: 'gadget': device_add
      [   93.406921] PM: Adding info for No Bus:gadget
      [   93.406951] musb_init_controller 2136: OTG mode, status 0, dev80
      [   93.407379] musb_do_idle 51: musb_do_idle: state=1
      [   93.408233] musb_hdrc musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
      [   93.416656] driver: 'musb_hdrc': driver_bound: bound to device 'musb_hdrc'
      [   93.416687] bus: 'platform': really_probe: bound device musb_hdrc to driver musb_hdrc
      [  124.486938] bus: 'platform': remove driver musb_hdrc
      [  124.490509] twl4030_usb twl4030_usb: twl4030_phy_suspend
      [  124.491424] device: 'gadget': device_unregister
      [  124.491424] PM: Removing info for No Bus:gadget
      [  124.495269]  gadget: musb_gadget_release
      [  124.498992] driver: 'musb_hdrc': driver_release
      [  129.569366] musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=5
      [  129.576934] bus: 'platform': add driver musb_hdrc
      [  129.577209] bus: 'platform': driver_probe_device: matched device musb_hdrc with driver musb_hdrc
      [  129.577239] bus: 'platform': really_probe: probing driver musb_hdrc with device musb_hdrc
      [  129.592651] twl4030_usb twl4030_usb: twl4030_phy_resume
      [  129.592681] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab404
      [  129.600830] Internal error: : 1028 [#1]
      [  129.604858] last sysfs file: /sys/devices/platform/i2c_omap.3/i2c-3/i2c-dev/i2c-3/dev
      [  129.613067] Modules linked in: musb_hdrc(+) [last unloaded: musb_hdrc]
      [  129.619964] CPU: 0    Not tainted  (2.6.36-next-20101021+ #372)
      [  129.626281] PC is at musb_platform_init+0xb0/0x1c8 [musb_hdrc]
      [  129.632415] LR is at mark_held_locks+0x64/0x94
      [  129.637084] pc : [<bf032198>]    lr : [<c00ad7c4>]    psr: 20000013
      [  129.637084] sp : c6d5fcb0  ip : c6d5fc38  fp : c6d5fcd4
      [  129.649139] r10: c6e72180  r9 : fa0ab000  r8 : c05612e8
      [  129.654602] r7 : 0000005c  r6 : c0559cc8  r5 : c6e72180  r4 : c0561548
      [  129.661468] r3 : 04d60047  r2 : fa0ab000  r1 : c07169d8  r0 : 00000000
      [  129.668304] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      [  129.675811] Control: 10c5387d  Table: 86e4c019  DAC: 00000015
      [  129.681823] Process insmod (pid: 554, stack limit = 0xc6d5e2f0)
      [  129.688049] Stack: (0xc6d5fcb0 to 0xc6d60000)
      [  129.692626] fca0:                                     fa0ab000 c0555c54 c6d5fcd4 c0561548
      [  129.701202] fcc0: 00000003 c05612e0 c6d5fe04 c6d5fcd8 bf03140c bf0320f4 c6d5fd9c c6d5fce8
      [  129.709808] fce0: c015cb94 c041448c c06d9d10 ffffffff c6d5fd14 c6d5fd00 c00adbec c6d5fd40
      [  129.718383] fd00: c015d478 c6d5fdb0 c6d5fd24 c00a9d18 c6d5e000 60000013 bf02a4ac c05612bc
      [  129.726989] fd20: c0414fb4 c00a9cf0 c6d5fd54 c6d5fd38 c015bbdc c0244280 c6e8b7b0 c7929330
      [  129.735565] fd40: c6d5fdb0 c6d5fdb0 c6d5fd7c c6e7227c c015c010 c015bb90 c015c2ac c6d5fdb0
      [  129.744171] fd60: c7929330 c6d5fdb0 c7929330 c6e8b7b0 c6d5fd9c 00000000 c7929330 c6e8b7b0
      [  129.752746] fd80: c6d5fdb0 00000000 00000001 00000000 c6d5fde4 c6d5fda0 c015d478 c015cb74
      [  129.761322] fda0: c056138c 00000000 c6d5fdcc c6d5fdb8 c7929330 00000000 c056138c c05612e8
      [  129.769927] fdc0: 00000000 c05612f0 c0c5d62c c06f6e00 c73217c0 00000000 c6d5fdf4 c05612e8
      [  129.778503] fde0: c05612e8 bf02a2e4 c0c5d62c c06f6e00 c73217c0 00000000 c6d5fe14 c6d5fe08
      [  129.787109] fe00: c029a398 bf0311c8 c6d5fe4c c6d5fe18 c0299120 c029a384 c7919140 22222222
      [  129.795684] fe20: c6d5fe4c c05612e8 c056131c bf02a2e4 c0299278 c06f6e00 c73217c0 00000000
      [  129.804290] fe40: c6d5fe6c c6d5fe50 c0299314 c0299020 00000000 c6d5fe70 bf02a2e4 c0299278
      [  129.812866] fe60: c6d5fe94 c6d5fe70 c02987d4 c0299284 c7825060 c78c6618 00000000 bf02a2e4
      [  129.821441] fe80: c06e4c98 00000000 c6d5fea4 c6d5fe98 c0298ea4 c0298778 c6d5fedc c6d5fea8
      [  129.830047] fea0: c0297f84 c0298e8c bf02716c 000b9008 bf02a2e4 bf02a2d0 000b9008 bf02a2e4
      [  129.838623] fec0: 00000000 c06f6e00 bf031000 00000000 c6d5fefc c6d5fee0 c0299614 c0297ec0
      [  129.847229] fee0: bf02a2d0 000b9008 bf02a388 00000000 c6d5ff0c c6d5ff00 c029a868 c02995a8
      [  129.855804] ff00: c6d5ff24 c6d5ff10 c029a88c c029a818 0010281c 000b9008 c6d5ff34 c6d5ff28
      [  129.864410] ff20: bf03104c c029a878 c6d5ff7c c6d5ff38 c00463dc bf03100c 00000000 00000000
      [  129.872985] ff40: 00000000 0010281c 000b9008 bf02a388 00000000 0010281c 000b9008 bf02a388
      [  129.881591] ff60: 00000000 c00521c8 c6d5e000 00000000 c6d5ffa4 c6d5ff80 c00bb9b8 c00463ac
      [  129.890167] ff80: c00adc88 c00ada68 00097e8e bebbfcf4 0010281c 00000080 00000000 c6d5ffa8
      [  129.898742] ffa0: c0052000 c00bb908 00097e8e bebbfcf4 402c9008 0010281c 000b9008 bebbfe5a
      [  129.907348] ffc0: 00097e8e bebbfcf4 0010281c 00000080 00000014 bebbfcf4 bebbfe06 0000005b
      [  129.915924] ffe0: bebbf9a0 bebbf990 0001a108 40263ec0 60000010 402c9008 011b0000 0000007c
      [  129.924499] Backtrace:
      [  129.927185] [<bf0320e8>] (musb_platform_init+0x0/0x1c8 [musb_hdrc]) from [<bf03140c>] (musb_probe+0x250/0xf2c [musb_hdrc])
      [  129.938781]  r6:c05612e0 r5:00000003 r4:c0561548
      [  129.943695] [<bf0311bc>] (musb_probe+0x0/0xf2c [musb_hdrc]) from [<c029a398>] (platform_drv_probe+0x20/0x24)
      [  129.954040] [<c029a378>] (platform_drv_probe+0x0/0x24) from [<c0299120>] (driver_probe_device+0x10c/0x264)
      [  129.964172] [<c0299014>] (driver_probe_device+0x0/0x264) from [<c0299314>] (__driver_attach+0x9c/0xa0)
      [  129.973968] [<c0299278>] (__driver_attach+0x0/0xa0) from [<c02987d4>] (bus_for_each_dev+0x68/0x94)
      [  129.983367]  r7:c0299278 r6:bf02a2e4 r5:c6d5fe70 r4:00000000
      [  129.989349] [<c029876c>] (bus_for_each_dev+0x0/0x94) from [<c0298ea4>] (driver_attach+0x24/0x28)
      [  129.998565]  r7:00000000 r6:c06e4c98 r5:bf02a2e4 r4:00000000
      [  130.004547] [<c0298e80>] (driver_attach+0x0/0x28) from [<c0297f84>] (bus_add_driver+0xd0/0x274)
      [  130.013671] [<c0297eb4>] (bus_add_driver+0x0/0x274) from [<c0299614>] (driver_register+0x78/0x158)
      [  130.023101] [<c029959c>] (driver_register+0x0/0x158) from [<c029a868>] (platform_driver_register+0x5c/0x60)
      [  130.033325]  r7:00000000 r6:bf02a388 r5:000b9008 r4:bf02a2d0
      [  130.039276] [<c029a80c>] (platform_driver_register+0x0/0x60) from [<c029a88c>] (platform_driver_probe+0x20/0xa8)
      [  130.050018] [<c029a86c>] (platform_driver_probe+0x0/0xa8) from [<bf03104c>] (musb_init+0x4c/0x54 [musb_hdrc])
      [  130.060424]  r5:000b9008 r4:0010281c
      [  130.064239] [<bf031000>] (musb_init+0x0/0x54 [musb_hdrc]) from [<c00463dc>] (do_one_initcall+0x3c/0x1c0)
      [  130.074218] [<c00463a0>] (do_one_initcall+0x0/0x1c0) from [<c00bb9b8>] (sys_init_module+0xbc/0x1d0)
      [  130.083709] [<c00bb8fc>] (sys_init_module+0x0/0x1d0) from [<c0052000>] (ret_fast_syscall+0x0/0x3c)
      [  130.093109]  r7:00000080 r6:0010281c r5:bebbfcf4 r4:00097e8e
      [  130.099090] Code: 0a000046 e3a01001 e12fff33 e59520e4 (e5923404)
      [  130.105621] ---[ end trace 1d0bd69deb79164d ]---
      
      Cc: Ajay Kumar Gupta <ajay.gupta@ti.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: stable@kernel.org
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      b2120914
    • B
      USB: musb: blackfin: push clkin value to platform resources · 9c756462
      Bob Liu 提交于
      In order to not touch the driver file for different xtal usage,
      push the clkin value to board file and calculate the register
      value instead of hardcoding it.
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9c756462
    • B
      USB: musb: blackfin: fix dynamic device<->host changing · 68f64714
      Bob Liu 提交于
      We need to restart the timer in order to recognize USB devices in
      host-only mode.
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      68f64714
    • B
      USB: musb: blackfin: pm: make it work · 1e393c6e
      Bob Liu 提交于
      Split the USB MMR init steps out into a helper func that both the platform
      init and the resume code may call.
      
      Then while suspending, the gpio_vrsel will change from high to low which
      will generate a wakeup event and resume the system immediately, so we need
      to manually drive it low before we sleep.
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1e393c6e
    • B
      USB: musb: pm: don't rely fully on clock support · 32d5dc95
      Bob Liu 提交于
      Since clock support is optional across processors, don't make the whole
      musb pm paths depend upon it.  Just conditionalize the clock accesses.
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      32d5dc95
    • I
      USB: musb: blackfin: fix musb_read_txhubport() definition · 5d726f5a
      Ian Jeffray 提交于
      The new MUSB power code needs musb_read_txhubport() to
      return a value (so stub it as 0 like the other Blackfin
      hub funcs).
      Signed-off-by: NIan Jeffray <ian@jeffray.co.uk>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5d726f5a
    • M
      USB: musb: gadget: fix MUSB_TXMAXP and MUSB_RXMAXP configuration · 31c9909b
      Ming Lei 提交于
      Commit 9f445cb2[USB: musb: disable
      double buffering for older RTL versions] tries to disable double
      buffer mode by writing endpoint hw max packet size to TXMAP/RXMAP.
      
      First the approach can break full speed and cause overflow problems.
      We should always set those registers with the actual max packet size
      from endpoint descriptor.
      
      Second, the problem describe by commit 9f445cb2
      was caused by musb gadget driver; nothing to do with RTL revision as
      originaly suspected.
      
      The real fix to the problem is to always use actual max packet
      size from endpoint descriptor to config TXMAP/RXMAP registers.
      
      Cc: Cliff Cai <cliff.cai@analog.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: stable@kernel.org
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      31c9909b
    • G
      usb: musb: don't leave PHY enabled on shutdown() · 120d074c
      Grazvydas Ignotas 提交于
      Some actions like musb_platform_exit are only performed on module
      removal and not on shutdown, which results in PHY being left enabled
      on reboot at least. This is sometimes causing strange failures after
      reboot (observed on OMAP3 pandora board), when DEVCTL does not report
      VBUS state correctly due to unknown reasons (possibly because of
      communication issues between musb IP and PHY). Running
      musb_platform_exit before reset seems to resolve that issue.
      
      Move some exit code from musb_remove() to musb_shutdown() so that it
      is performed on both module removal and shutdown/reset. Also convert
      the host check so that it doesn't need #ifdef.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      120d074c
    • R
      usb: musb: musb_gadget: fix resource leakage in error path · e2c34045
      Rahul Ruikar 提交于
      In function musb_gadget_setup() call put_device()
      when device_register() fails.
      Signed-off-by: NRahul Ruikar <rahul.ruikar@gmail.com>
      Acked-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e2c34045
    • M
      usb: musb: gadget: fix dma mode 0 in double buffer Rx case · 9001d80d
      Ming Lei 提交于
      1, In Rx double buffer case, FIFO may have two packets, so
      rxstate should be called to unload fifo if RXPKTRDY is set
      even the current request has not been completed.
      
      2, Commit 633ba7876b96ec339ef685357e2f7c60b5a8ce85
      introduces autoclear to support double buffer in dma mode 0,
      so remove clearing RXPKTRDY manually for dma mode 0.
      
      3, Commit c7af6b29ffeffbeb28caf39e5b2ce29b11807c7d may break
      dma mode 1 for non-doublebuffer endpoint, fix it.
      
      With this patch, either usbtest #5 or g_file_storage(writing
      file to device in usb host) or g_ether have been tested OK in
      double buffer case(using fifo mode 3). Also, this patch has
      been verified that single buffer case can't be broken.
      
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9001d80d
  10. 02 11月, 2010 1 次提交
  11. 30 10月, 2010 1 次提交
    • D
      USB: Add EHCI and OHCH glue for OCTEON II SOCs. · 1643accd
      David Daney 提交于
      The OCTEON II SOC has USB EHCI and OHCI controllers connected directly
      to the internal I/O bus.  This patch adds the necessary 'glue' logic
      to allow ehci-hcd and ohci-hcd drivers to work on OCTEON II.
      
      The OCTEON normally runs big-endian, and the ehci/ohci internal
      registers have host endianness, so we need to select
      USB_EHCI_BIG_ENDIAN_MMIO.
      
      The ehci and ohci blocks share a common clocking and PHY
      infrastructure.  Initialization of the host controller and PHY clocks
      is common between the two and is factored out into the
      octeon2-common.c file.
      
      Setting of USB_ARCH_HAS_OHCI and USB_ARCH_HAS_EHCI is done in
      arch/mips/Kconfig in a following patch.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      To: linux-usb@vger.kernel.org
      To: dbrownell@users.sourceforge.net
      Patchwork: http://patchwork.linux-mips.org/patch/1675/Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1643accd
  12. 29 10月, 2010 3 次提交
  13. 27 10月, 2010 1 次提交
  14. 26 10月, 2010 1 次提交
    • C
      fs: do not assign default i_ino in new_inode · 85fe4025
      Christoph Hellwig 提交于
      Instead of always assigning an increasing inode number in new_inode
      move the call to assign it into those callers that actually need it.
      For now callers that need it is estimated conservatively, that is
      the call is added to all filesystems that do not assign an i_ino
      by themselves.  For a few more filesystems we can avoid assigning
      any inode number given that they aren't user visible, and for others
      it could be done lazily when an inode number is actually needed,
      but that's left for later patches.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      85fe4025
  15. 23 10月, 2010 4 次提交