1. 05 10月, 2017 2 次提交
  2. 04 10月, 2017 5 次提交
  3. 01 9月, 2017 4 次提交
  4. 28 8月, 2017 2 次提交
    • J
      usb: xhci: Support enabling of compliance mode for xhci 1.1 · 4b562bd2
      Jack Pham 提交于
      To perform SuperSpeed compliance testing the port should first
      be placed into compliance mode. For xHCI 1.0 and prior this
      transition happens automatically when the port is in Training
      and encounters an LFPS timeout. Thus running compliance tests
      against a test appliance may simply just work by simply plugging
      in to the downstream port.
      
      However starting with xHCI 1.1 the transition from Polling.LFPS
      to compliance mode may be disabled by default and needs to be
      explicitly enabled by writing to the PLS field of the PORTSC
      register, which sets an internal 'CTE' (Compliance Transition
      Enabled) flag so that the port will perform the transition the
      next time it encounters LFPS timeout. Whether this is disabled or
      not is determined by the 'CTC' (Compliance Transition Capability)
      bit in the HCCPARAMS2 capability register.
      
      In order to allow a test operator to change this if needed, allow
      a test driver (such as drivers/usb/misc/lvstest.c) to send a
      SET_FEATURE(PORT_LINK_STATE) control message to the root hub to
      update the link state prior to connecting to the port. Subsequently,
      placing the port in warm reset would then disable the flag.
      Signed-off-by: NJack Pham <jackp@codeaurora.org>
      Acked-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4b562bd2
    • S
      usb:xhci:Fix regression when ATI chipsets detected · e6b422b8
      Sandeep Singh 提交于
      The following commit cause a regression on ATI chipsets.
      'commit e788787e ("usb:xhci:Add quirk for Certain
      failing HP keyboard on reset after resume")'
      
      This causes pinfo->smbus_dev to be wrongly set to NULL on
      systems with the ATI chipset that this function checks for first.
      
      Added conditional check for AMD chipsets to avoid the overwriting
      pinfo->smbus_dev.
      Reported-by: NBen Hutchings <ben@decadent.org.uk>
      Fixes: e788787e ("usb:xhci:Add quirk for Certain
      failing HP keyboard on reset after resume")
      cc: Nehal Shah <Nehal-bakulchandra.Shah@amd.com>
      cc: <stable@vger.kernel.org>
      Signed-off-by: NSandeep Singh <Sandeep.Singh@amd.com>
      Signed-off-by: NShyam Sundar S K <Shyam-sundar.S-k@amd.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e6b422b8
  5. 17 8月, 2017 8 次提交
  6. 15 8月, 2017 1 次提交
  7. 11 8月, 2017 4 次提交
  8. 03 8月, 2017 1 次提交
  9. 30 7月, 2017 8 次提交
  10. 22 7月, 2017 1 次提交
  11. 20 7月, 2017 4 次提交
    • S
      xhci: fix memleak in xhci_run() · d6f5f071
      Shu Wang 提交于
      Found this issue by kmemleak.
      xhci_run() did not check return val and free command for
      xhci_queue_vendor_command()
      
      unreferenced object 0xffff88011c0be500 (size 64):
        comm "kworker/0:1", pid 58, jiffies 4294670908 (age 50.420s)
        hex dump (first 32 bytes):
        backtrace:
          [<ffffffff8176166a>] kmemleak_alloc+0x4a/0xa0
          [<ffffffff8121801a>] kmem_cache_alloc_trace+0xca/0x1d0
          [<ffffffff81576bf4>] xhci_alloc_command+0x44/0x130
          [<ffffffff8156f1cc>] xhci_run+0x4cc/0x630
          [<ffffffff8153b84b>] usb_add_hcd+0x3bb/0x950
          [<ffffffff8154eac8>] usb_hcd_pci_probe+0x188/0x500
          [<ffffffff815851ac>] xhci_pci_probe+0x2c/0x220
          [<ffffffff813d2ca5>] local_pci_probe+0x45/0xa0
          [<ffffffff810a54e4>] work_for_cpu_fn+0x14/0x20
          [<ffffffff810a8409>] process_one_work+0x149/0x360
          [<ffffffff810a8d08>] worker_thread+0x1d8/0x3c0
          [<ffffffff810ae7d9>] kthread+0x109/0x140
          [<ffffffff8176d585>] ret_from_fork+0x25/0x30
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NShu Wang <shuwang@redhat.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d6f5f071
    • P
      usb: xhci: fix spinlock recursion for USB2 test mode · 576d5546
      Peter Chen 提交于
      Both xhci_hub_control and xhci_disable_slot tries to hold spinlock, the
      spinlock recursion occurs when enters USB2 test mode. Fix it by unlock
      spinlock before calling xhci_disable_slot.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 0f1d832e ("usb: xhci: Add port test modes support for usb2")
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      576d5546
    • M
      xhci: fix 20000ms port resume timeout · a54408d0
      Mathias Nyman 提交于
      A uncleared PLC (port link change) bit will prevent furuther port event
      interrupts for that port. Leaving it uncleared caused get_port_status()
      to timeout after 20000ms while waiting to get the final port event
      interrupt for resume -> U0 state change.
      
      This is a targeted fix for a specific case where we get a port resume event
      racing with xhci resume. The port event interrupt handler notices xHC is
      not yet running and bails out early, leaving PLC uncleared.
      
      The whole xhci port resuming needs more attention, but while working on it
      it anyways makes sense to always ensure PLC is cleared in get_port_status
      before setting a new link state and waiting for its completion.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a54408d0
    • S
      usb: xhci: Issue stop EP command only when the EP state is running · 28a2369f
      Shyam Sundar S K 提交于
      on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is
      issued the controller does not respond, when the EP is not in running
      state. HW completes the command execution and reports
      "Context State Error" completion code. This is as per the spec. However
      HW on receiving the second command additionally marks EP to Flow control
      state in HW which is RTL bug. This bug causes the HW not to respond
      to any further doorbells that are rung by the driver. This makes the EP
      to not functional anymore and causes gross functional failures.
      
      As a workaround, not to hit this problem, it's better to check the EP state
      and issue a stop EP command only when the EP is in running state.
      
      As a sidenote, even with this patch there is still a possibility of
      triggering the RTL bug if the context state races with the stop endpoint
      command as described in xHCI spec 4.6.9
      
      [code simplification and reworded sidenote in commit message -Mathias]
      Signed-off-by: NShyam Sundar S K <Shyam-sundar.S-k@amd.com>
      Signed-off-by: NNehal Shah <Nehal-bakulchandra.Shah@amd.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      28a2369f