1. 17 7月, 2012 9 次提交
  2. 10 7月, 2012 11 次提交
  3. 09 7月, 2012 2 次提交
    • A
      EHCI: centralize controller suspend/resume · c5cf9212
      Alan Stern 提交于
      This patch (as1563) removes a lot of duplicated code by moving the
      EHCI controller suspend/resume routines into the core driver, where
      the various platform drivers can invoke them as needed.
      
      Not only does this simplify these platform drivers, this also makes it
      easier for other platform drivers to add suspend/resume support in the
      future.
      
      Note: The patch does not touch the ehci-fsl.c file, because its
      approach to suspend and resume is so different from all the others.
      It will have to be handled specially by its maintainer.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5cf9212
    • R
      mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues. · c05995c3
      Russ Dill 提交于
      'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' (1fcb57d0) fixes
      an issue where the ULPI PHYs were not held in reset while initializing
      the EHCI controller. However, it also changes behavior in
      omap-usb-host.c omap_usbhs_init by releasing reset while the
      configuration in that function was done.
      
      This change caused a regression on BB-xM where USB would not function
      if 'usb start' had been run from u-boot before booting. A change was
      made to release reset a little bit earlier which fixed the issue on
      BB-xM and did not cause any regressions on 3430 sdp, the board for
      which the fix was originally made.
      
      This new fix, 'USB: EHCI: OMAP: Finish ehci omap phy reset cycle
      before adding hcd.', (3aa2ae74) caused a regression on OMAP5.
      
      The original fix to hold the EHCI controller in reset during
      initialization was correct, however it appears that changing
      omap_usbhs_init to not hold the PHYs in reset during it's
      configuration was incorrect. This patch first reverts both fixes, and
      then changes ehci_hcd_omap_probe in ehci-omap.c to hold the PHYs in
      reset as the original patch had done. It also is sure to incorporate
      the _cansleep change that has been made in the meantime.
      
      I've tested this on Beagleboard xM, I'd really like to get an ack from
      the 3430 sdp and OMAP5 guys before getting this merged.
      
      v3 - Brown paper bag its too early in the morning actually run
           git commit amend fix
      v2 - Put cansleep gpiolib call outside of spinlock
      Acked-by: NMantesh Sarashetti <mantesh@ti.com>
      Tested-by: NMantesh Sarashetti <mantesh@ti.com>
      Acked-by: NKeshava Munegowda <keshava_mgowda@ti.com>
      Tested-by: NKeshava Munegowda <keshava_mgowda@ti.com>
      Signed-off-by: NRuss Dill <Russ.Dill@gmail.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      c05995c3
  4. 07 7月, 2012 13 次提交
  5. 06 7月, 2012 4 次提交
    • B
      USB: cdc-wdm: fix lockup on error in wdm_read · b086b6b1
      Bjørn Mork 提交于
      Clear the WDM_READ flag on empty reads to avoid running
      forever in an infinite tight loop, causing lockups:
      
      Jul  1 21:58:11 nemi kernel: [ 3658.898647] qmi_wwan 2-1:1.2: Unexpected error -71
      Jul  1 21:58:36 nemi kernel: [ 3684.072021] BUG: soft lockup - CPU#0 stuck for 23s! [qmi.pl:12235]
      Jul  1 21:58:36 nemi kernel: [ 3684.072212] CPU 0
      Jul  1 21:58:36 nemi kernel: [ 3684.072355]
      Jul  1 21:58:36 nemi kernel: [ 3684.072367] Pid: 12235, comm: qmi.pl Tainted: P           O 3.5.0-rc2+ #13 LENOVO 2776LEG/2776LEG
      Jul  1 21:58:36 nemi kernel: [ 3684.072383] RIP: 0010:[<ffffffffa0635008>]  [<ffffffffa0635008>] spin_unlock_irq+0x8/0xc [cdc_wdm]
      Jul  1 21:58:36 nemi kernel: [ 3684.072388] RSP: 0018:ffff88022dca1e70  EFLAGS: 00000282
      Jul  1 21:58:36 nemi kernel: [ 3684.072393] RAX: ffff88022fc3f650 RBX: ffffffff811c56f7 RCX: 00000001000ce8c1
      Jul  1 21:58:36 nemi kernel: [ 3684.072398] RDX: 0000000000000010 RSI: 000000000267d810 RDI: ffff88022fc3f650
      Jul  1 21:58:36 nemi kernel: [ 3684.072403] RBP: ffff88022dca1eb0 R08: ffffffffa063578e R09: 0000000000000000
      Jul  1 21:58:36 nemi kernel: [ 3684.072407] R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000002
      Jul  1 21:58:36 nemi kernel: [ 3684.072412] R13: 0000000000000246 R14: ffffffff00000002 R15: ffff8802281d8c88
      Jul  1 21:58:36 nemi kernel: [ 3684.072418] FS:  00007f666a260700(0000) GS:ffff88023bc00000(0000) knlGS:0000000000000000
      Jul  1 21:58:36 nemi kernel: [ 3684.072423] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      Jul  1 21:58:36 nemi kernel: [ 3684.072428] CR2: 000000000270d9d8 CR3: 000000022e865000 CR4: 00000000000007f0
      Jul  1 21:58:36 nemi kernel: [ 3684.072433] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      Jul  1 21:58:36 nemi kernel: [ 3684.072438] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Jul  1 21:58:36 nemi kernel: [ 3684.072444] Process qmi.pl (pid: 12235, threadinfo ffff88022dca0000, task ffff88022ff76380)
      Jul  1 21:58:36 nemi kernel: [ 3684.072448] Stack:
      Jul  1 21:58:36 nemi kernel: [ 3684.072458]  ffffffffa063592e 0000000100020000 ffff88022fc3f650 ffff88022fc3f6a8
      Jul  1 21:58:36 nemi kernel: [ 3684.072466]  0000000000000200 0000000100000000 000000000267d810 0000000000000000
      Jul  1 21:58:36 nemi kernel: [ 3684.072475]  0000000000000000 ffff880212cfb6d0 0000000000000200 ffff880212cfb6c0
      Jul  1 21:58:36 nemi kernel: [ 3684.072479] Call Trace:
      Jul  1 21:58:36 nemi kernel: [ 3684.072489]  [<ffffffffa063592e>] ? wdm_read+0x1a0/0x263 [cdc_wdm]
      Jul  1 21:58:36 nemi kernel: [ 3684.072500]  [<ffffffff8110adb7>] ? vfs_read+0xa1/0xfb
      Jul  1 21:58:36 nemi kernel: [ 3684.072509]  [<ffffffff81040589>] ? alarm_setitimer+0x35/0x64
      Jul  1 21:58:36 nemi kernel: [ 3684.072517]  [<ffffffff8110aec7>] ? sys_read+0x45/0x6e
      Jul  1 21:58:36 nemi kernel: [ 3684.072525]  [<ffffffff813725f9>] ? system_call_fastpath+0x16/0x1b
      Jul  1 21:58:36 nemi kernel: [ 3684.072557] Code: <66> 66 90 c3 83 ff ed 89 f8 74 16 7f 06 83 ff a1 75 0a c3 83 ff f4
      
      The WDM_READ flag is normally cleared by wdm_int_callback
      before resubmitting the read urb, and set by wdm_in_callback
      when this urb returns with data or an error.  But a crashing
      device may cause both a read error and cancelling all urbs.
      Make sure that the flag is cleared by wdm_read if the buffer
      is empty.
      
      We don't clear the flag on errors, as there may be pending
      data in the buffer which should be processed.  The flag will
      instead be cleared on the next wdm_read call.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Acked-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b086b6b1
    • J
      USB: metro-usb: fix tty_flip_buffer_push use · b7d28e32
      Johan Hovold 提交于
      Do not set low_latency flag at open as tty_flip_buffer_push must not be
      called in IRQ context with low_latency set.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b7d28e32
    • G
      USB: option: Add MEDIATEK product ids · aacef9c5
      Gaosen Zhang 提交于
      Signed-off-by: NGaosen Zhang <gaosen.zhang@mediatek.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aacef9c5
    • B
      USB: option: add ZTE MF60 · 8e16e33c
      Bjørn Mork 提交于
      Switches into a composite device by ejecting the initial
      driver CD.  The four interfaces are: QCDM, AT, QMI/wwan
      and mass storage.  Let this driver manage the two serial
      interfaces:
      
      T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 28 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=19d2 ProdID=1402 Rev= 0.00
      S:  Manufacturer=ZTE,Incorporated
      S:  Product=ZTE WCDMA Technologies MSM
      S:  SerialNumber=xxxxx
      C:* #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
      E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8e16e33c
  6. 03 7月, 2012 1 次提交
    • S
      xhci: Fix hang on back-to-back Set TR Deq Ptr commands. · 0d9f78a9
      Sarah Sharp 提交于
      The Microsoft LifeChat 3000 USB headset was causing a very reproducible
      hang whenever it was plugged in.  At first, I thought the host
      controller was producing bad transfer events, because the log was filled
      with errors like:
      
      xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD
      
      However, it turned out to be an xHCI driver bug in the ring expansion
      patches.  The bug is triggered When there are two ring segments, and a
      TD that ends just before a link TRB, like so:
      
       ______________                     _____________
      |              |              ---> | setup TRB B |
       ______________               |     _____________
      |              |              |    |  data TRB B |
       ______________               |     _____________
      | setup TRB A  | <-- deq      |    |  data TRB B |
       ______________               |     _____________
      | data TRB A   |              |    |             | <-- enq, deq''
       ______________               |     _____________
      | status TRB A |              |    |             |
       ______________               |     _____________
      |  link TRB    |---------------    |  link TRB   |
       _____________  <--- deq'           _____________
      
      TD A (the first control transfer) stalls on the data phase.  That halts
      the ring.  The xHCI driver moves the hardware dequeue pointer to the
      first TRB after the stalled transfer, which happens to be the link TRB.
      
      Once the Set TR dequeue pointer command completes, the function
      update_ring_for_set_deq_completion runs.  That function is supposed to
      update the xHCI driver's dequeue pointer to match the internal hardware
      dequeue pointer.  On the first call this would work fine, and the
      software dequeue pointer would move to deq'.
      
      However, if the transfer immediately after that stalled (TD B in this
      case), another Set TR Dequeue command would be issued.  That would move
      the hardware dequeue pointer to deq''.  Once that command completed,
      update_ring_for_set_deq_completion would run again.
      
      The original code would unconditionally increment the software dequeue
      pointer, which moved the pointer off the ring segment into la-la-land.
      The while loop would happy increment the dequeue pointer (possibly
      wrapping it) until it matched the hardware pointer value.
      
      The while loop would also access all the memory in between the first
      ring segment and the second ring segment to determine if it was a link
      TRB.  This could cause general protection faults, although it was
      unlikely because the ring segments came from a DMA pool, and would often
      have consecutive memory addresses.
      
      If nothing in that space looked like a link TRB, the deq_seg pointer for
      the ring would remain on the first segment.  Thus, the deq_seg and the
      software dequeue pointer would get out of sync.
      
      When the next transfer event came in after the stalled transfer, the
      xHCI driver code would attempt to convert the software dequeue pointer
      into a DMA address in order to compare the DMA address for the completed
      transfer.  Since the deq_seg and the dequeue pointer were out of sync,
      xhci_trb_virt_to_dma would return NULL.
      
      The transfer event would get ignored, the transfer would eventually
      timeout, and we would mistakenly convert the finished transfer to no-op
      TRBs.  Some kernel driver (maybe xHCI?) would then get stuck in an
      infinite loop in interrupt context, and the whole machine would hang.
      
      This patch should be backported to kernels as old as 3.4, that contain
      the commit b008df60 "xHCI: count free
      TRBs on transfer ring"
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Andiry Xu <andiry.xu@amd.com>
      Cc: stable@vger.kernel.org
      0d9f78a9