1. 25 5月, 2018 1 次提交
    • M
      xhci: Create new structures to store xhci port information · bcaa9d5c
      Mathias Nyman 提交于
      Current way of having one array telling only the port speed,
      and then two separate arrays with mmio addresses for usb2 and usb3 ports
      requeres helper functions to transate  hw to hcd, and hcd to hw port
      numbers, and is hard to expand.
      
      Instead create a structure describing a port, including the mmio address,
      the port hardware index, hcd port index, and a pointer to the roothub
      it belongs to.
      
      Create one array containing all port structures in the same order the
      hardware controller sees them. Then add an array of port pointers to
      each xhci hub structure pointing to the ports that belonging to the
      roothub.
      
      This way we can easily convert hw indexed port events to usb core
      hcd port numbers, and vice versa usb core hub hcd port numbers
      to hw index and mmio address.
      
      Other benefit is that we can easily find the parent hcd and xhci
      structure of a port structure. This is useful in debugfs where
      we can give one port structure pointer as parameter and get both
      the correct mmio address and xhci lock needed to set some port
      parameter.
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bcaa9d5c
  2. 22 4月, 2018 1 次提交
  3. 20 4月, 2018 1 次提交
  4. 22 3月, 2018 1 次提交
  5. 16 3月, 2018 1 次提交
  6. 10 3月, 2018 1 次提交
  7. 09 3月, 2018 1 次提交
  8. 16 2月, 2018 1 次提交
  9. 09 12月, 2017 7 次提交
  10. 07 11月, 2017 1 次提交
    • G
      USB: host: xhci: Remove redundant license text · 9ed64195
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all USB files, that identifies the license
      in a specific and legally-defined manner.  So the extra GPL text wording
      can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Acked-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9ed64195
  11. 04 11月, 2017 1 次提交
  12. 17 10月, 2017 1 次提交
  13. 05 10月, 2017 4 次提交
    • L
      usb: xhci: Fix potential memory leak in xhci_disable_slot() · cd3f1790
      Lu Baolu 提交于
      xhci_disable_slot() allows the invoker to pass a command pointer
      as paramenter. Otherwise, it will allocate one. This will cause
      memory leak when a command structure was allocated inside of this
      function while queuing command trb fails. Another problem comes up
      when the invoker passed a command pointer, but xhci_disable_slot()
      frees it when it detects a dead host.
      
      This patch fixes these two problems by removing the command parameter
      from xhci_disable_slot().
      
      Fixes: f9e609b8 ("usb: xhci: Add helper function xhci_disable_slot().")
      Cc: Guoqing Zhang <guoqing.zhang@intel.com>
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd3f1790
    • L
      usb: xhci: Add debugfs interface for xHCI driver · 02b6fdc2
      Lu Baolu 提交于
      This adds debugfs consumer for xHCI driver. The debugfs entries
      read all host registers, device/endpoint contexts, command ring,
      event ring and various endpoint rings. With these entries, users
      can check the registers and memory spaces used by a host during
      run time, or save all the information with a simple 'cp -r' for
      post-mortem programs.
      
      The file hierarchy looks like this.
      
      [root of debugfs]
      |__usb
      |____[e,u,o]hci                 <---------[root for other HCIs]
      |____xhci                       <---------------[root for xHCI]
      |______0000:00:14.0             <--------------[xHCI host name]
      |________reg-cap                <--------[capability registers]
      |________reg-op                 <-------[operational registers]
      |________reg-runtime            <-----------[runtime registers]
      |________reg-ext-#cap_name      <----[extended capability regs]
      |________command-ring           <-------[root for command ring]
      |__________cycle                <------------------[ring cycle]
      |__________dequeue              <--------[ring dequeue pointer]
      |__________enqueue              <--------[ring enqueue pointer]
      |__________trbs                 <-------------------[ring trbs]
      |________event-ring             <---------[root for event ring]
      |__________cycle                <------------------[ring cycle]
      |__________dequeue              <--------[ring dequeue pointer]
      |__________enqueue              <--------[ring enqueue pointer]
      |__________trbs                 <-------------------[ring trbs]
      |________devices                <------------[root for devices]
      |__________#slot_id             <-----------[root for a device]
      |____________name               <-----------------[device name]
      |____________slot-context       <----------------[slot context]
      |____________ep-context         <-----------[endpoint contexts]
      |____________ep#ep_index        <--------[root for an endpoint]
      |______________cycle            <------------------[ring cycle]
      |______________dequeue          <--------[ring dequeue pointer]
      |______________enqueue          <--------[ring enqueue pointer]
      |______________trbs             <-------------------[ring trbs]
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      02b6fdc2
    • M
      xhci: add port speed ID to portsc tracing · 8f114877
      Mathias Nyman 提交于
      Shows the port speed protocol speed ID (PSID) in use.
      speed ID may map to custom speeds, but in most cases it uses default
      
      1 = Full-Speed        12 MB/s
      2 = Low-Speed         1.5 Mb/s
      3 = High-speed        480 Mb/s
      4 = SuperSpeed        5 Gb/s
      5 = SuperSpeedPlus    10 Gb/s
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8f114877
    • T
      usb: host: xhci support option to disable the xHCI USB2 HW LPM · 4750bc78
      Thang Q. Nguyen 提交于
      XHCI specification 1.1 does not require xHCI-compliant controllers
      to always enable hardware USB2 LPM. However, the current xHCI
      driver always enable it when seeing HLC=1.
      This patch supports an option for users to control disabling
      USB2 Hardware LPM via DT/ACPI attribute.
      This option is needed in case user would like to disable this
      feature. For example, their xHCI controller has its USB2 HW LPM
      broken.
      Signed-off-by: NTung Nguyen <tunguyen@apm.com>
      Signed-off-by: NThang Q. Nguyen <tqnguyen@apm.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4750bc78
  14. 18 9月, 2017 3 次提交
  15. 17 8月, 2017 2 次提交
  16. 20 7月, 2017 1 次提交
  17. 20 6月, 2017 1 次提交
  18. 16 6月, 2017 3 次提交
  19. 03 6月, 2017 2 次提交
  20. 27 4月, 2017 1 次提交
    • A
      usb: host: xhci: remove #ifdef around PM functions · d852ed98
      Arnd Bergmann 提交于
      The #ifdef is slightly wrong as it doesn't cover the xhci_priv_resume_quirk()
      function, causing a harmless warning:
      
      drivers/usb/host/xhci-plat.c:58:12: error: 'xhci_priv_resume_quirk' defined but not used [-Werror=unused-function]
       static int xhci_priv_resume_quirk(struct usb_hcd *hcd)
      
      A simpler way to do this correctly is to use __maybe_unused annotations
      that let the compiler silently drop the functions when there is no
      reference.
      
      Fixes: b0c69b4b ("usb: host: plat: Enable xHCI plat runtime PM")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d852ed98
  21. 20 4月, 2017 2 次提交
  22. 08 4月, 2017 3 次提交