1. 09 12月, 2017 1 次提交
  2. 01 12月, 2017 1 次提交
    • Y
      usb: xhci: fix panic in xhci_free_virt_devices_depth_first · 80e45769
      Yu Chen 提交于
      Check vdev->real_port 0 to avoid panic
      [    9.261347] [<ffffff800884a390>] xhci_free_virt_devices_depth_first+0x58/0x108
      [    9.261352] [<ffffff800884a814>] xhci_mem_cleanup+0x1bc/0x570
      [    9.261355] [<ffffff8008842de8>] xhci_stop+0x140/0x1c8
      [    9.261365] [<ffffff80087ed304>] usb_remove_hcd+0xfc/0x1d0
      [    9.261369] [<ffffff80088551c4>] xhci_plat_remove+0x6c/0xa8
      [    9.261377] [<ffffff80086e928c>] platform_drv_remove+0x2c/0x70
      [    9.261384] [<ffffff80086e6ea0>] __device_release_driver+0x80/0x108
      [    9.261387] [<ffffff80086e7a1c>] device_release_driver+0x2c/0x40
      [    9.261392] [<ffffff80086e5f28>] bus_remove_device+0xe0/0x120
      [    9.261396] [<ffffff80086e2e34>] device_del+0x114/0x210
      [    9.261399] [<ffffff80086e9e00>] platform_device_del+0x30/0xa0
      [    9.261403] [<ffffff8008810bdc>] dwc3_otg_work+0x204/0x488
      [    9.261407] [<ffffff80088133fc>] event_work+0x304/0x5b8
      [    9.261414] [<ffffff80080e31b0>] process_one_work+0x148/0x490
      [    9.261417] [<ffffff80080e3548>] worker_thread+0x50/0x4a0
      [    9.261421] [<ffffff80080e9ea0>] kthread+0xe8/0x100
      [    9.261427] [<ffffff8008083680>] ret_from_fork+0x10/0x50
      
      The problem can occur if xhci_plat_remove() is called shortly after
      xhci_plat_probe(). While xhci_free_virt_devices_depth_first been
      called before the device has been setup and get real_port initialized.
      The problem occurred on Hikey960 and was reproduced by Guenter Roeck
      on Kevin with chromeos-4.4.
      
      Fixes: ee8665e2 ("xhci: free xhci virtual devices with leaf nodes first")
      Cc: Guenter Roeck <groeck@google.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      Reviewed-by: NGuenter Roeck <groeck@chromium.org>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NFan Ning <fanning4@hisilicon.com>
      Signed-off-by: NLi Rui <lirui39@hisilicon.com>
      Signed-off-by: Nyangdi <yangdi10@hisilicon.com>
      Signed-off-by: NYu Chen <chenyu56@huawei.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      80e45769
  3. 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
  4. 04 11月, 2017 1 次提交
  5. 02 11月, 2017 1 次提交
  6. 17 10月, 2017 1 次提交
  7. 05 10月, 2017 1 次提交
    • 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
  8. 16 6月, 2017 1 次提交
  9. 12 6月, 2017 1 次提交
    • Y
      usb: xhci: Fix USB 3.1 supported protocol parsing · b72eb843
      YD Tseng 提交于
      xHCI host controllers can have both USB 3.1 and 3.0 extended speed
      protocol lists. If the USB3.1 speed is parsed first and 3.0 second then
      the minor revision supported will be overwritten by the 3.0 speeds and
      the USB3 roothub will only show support for USB 3.0 speeds.
      
      This was the case with a xhci controller with the supported protocol
      capability listed below.
      In xhci-mem.c, the USB 3.1 speed is parsed first, the min_rev of usb3_rhub
      is set as 0x10.  And then USB 3.0 is parsed.  However, the min_rev of
      usb3_rhub will be changed to 0x00. If USB 3.1 device is connected behind
      this host controller, the speed of USB 3.1 device just reports 5G speed
      using lsusb.
      
           00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
        00 01 08 00 00 00 00 00 40 00 00 00 00 00 00 00 00
        10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        20 02 08 10 03 55 53 42 20 01 02 00 00 00 00 00 00     //USB 3.1
        30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        40 02 08 00 03 55 53 42 20 03 06 00 00 00 00 00 00     //USB 3.0
        50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
        60 02 08 00 02 55 53 42 20 09 0E 19 00 00 00 00 00     //USB 2.0
        70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      
      This patch fixes the issue by only owerwriting the minor revision if
      it is higher than the existing one.
      
      [reword commit message -Mathias]
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NYD Tseng <yd_tseng@asmedia.com.tw>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b72eb843
  10. 18 5月, 2017 2 次提交
  11. 17 5月, 2017 1 次提交
  12. 20 4月, 2017 3 次提交
  13. 08 4月, 2017 4 次提交
  14. 23 3月, 2017 1 次提交
  15. 25 1月, 2017 4 次提交
  16. 04 1月, 2017 3 次提交
  17. 14 11月, 2016 3 次提交
  18. 03 11月, 2016 2 次提交
  19. 27 6月, 2016 1 次提交
    • M
      xhci: TD-fragment, align the unsplittable case with a bounce buffer · f9c589e1
      Mathias Nyman 提交于
      If the last trb before a link is not packet size aligned, and is not
      splittable then use a bounce buffer for that chunk of max packet size
      unalignable data.
      
      Allocate a max packet size bounce buffer for every segment of a bulk
      endpoint ring at the same time as allocating the ring.
      If we need to align the data before the link trb in that segment then
      copy the data to the segment bounce buffer, dma map it, and enqueue it.
      Once the td finishes, or is cancelled, unmap it.
      
      For in transfers we need to first map the bounce buffer, then queue it,
      after it finishes, copy the bounce buffer to the original sg list, and
      finally unmap it
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f9c589e1
  20. 14 4月, 2016 1 次提交
  21. 15 2月, 2016 2 次提交
  22. 04 2月, 2016 2 次提交
  23. 02 12月, 2015 2 次提交