1. 11 12月, 2017 2 次提交
  2. 07 11月, 2017 1 次提交
    • G
      USB: dwc3: Remove redundant license text · b5ea4757
      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: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Acked-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b5ea4757
  3. 04 11月, 2017 1 次提交
  4. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  5. 24 10月, 2017 3 次提交
  6. 19 10月, 2017 7 次提交
  7. 28 9月, 2017 1 次提交
  8. 18 9月, 2017 1 次提交
  9. 15 8月, 2017 1 次提交
  10. 11 8月, 2017 1 次提交
  11. 09 8月, 2017 3 次提交
  12. 03 8月, 2017 1 次提交
    • M
      usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets · 40d829fb
      Manu Gautam 提交于
      The PIDs for Isochronous data transfers are incorrect
      for high bandwidth IN endpoints when the request length
      is less than EP wMaxPacketSize.
      
      As per spec correct PIDs for ISOC data transfers are:
      
      1) For request length <= maxpacket
      	- DATA0,
      
      2) For maxpacket < length <= (2 * maxpacket)
      	- DATA1, DATA0
      
      3) For (2 * maxpacket) <  length <= (3 * maxpacket)
      	- DATA2, DATA1, DATA0.
      
      But driver always sets PCM fields based on wMaxPacketSize
      due to which DATA2 happens even for small requests.
      
      Fix this by setting the PCM field of trb->size depending
      on request length rather than fixing it to the value
      depending on wMaxPacketSize.
      
      Ideally it shouldn't give any issues as dwc3 will send
      0-length packet for next IN token if host sends (even
      after receiving a short packet). Windows seems to ignore
      this but with MacOS frame loss observed when using f_uvc.
      Signed-off-by: NManu Gautam <mgautam@codeaurora.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      40d829fb
  13. 17 7月, 2017 3 次提交
    • J
      usb: dwc3: gadget: only unmap requests from DMA if mapped · 4a71fcb8
      Jack Pham 提交于
      A recent optimization was made so that a request put on the
      pending_list wouldn't get mapped for DMA until just before
      preparing a TRB for it. However, this poses a problem in case
      the request is dequeued or the endpoint is disabled before the
      mapping is done as that would lead to dwc3_gadget_giveback()
      unconditionally calling usb_gadget_unmap_request_for_dev() with
      an invalid request->dma handle. Depending on the platform's DMA
      implementation the unmap operation could result in a panic.
      
      Since we know a successful mapping is a prerequisite for getting
      a TRB, the unmap can be conditionally called only when req->trb
      is non-NULL.
      
      Fixes: cdb55b39 ("usb: dwc3: gadget: lazily map requests for DMA")
      Signed-off-by: NJack Pham <jackp@codeaurora.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      4a71fcb8
    • V
      usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq · ee249b45
      Vignesh R 提交于
      IRQ_NOAUTOEN cannot be used with shared IRQs, since commit 04c848d3
      ("genirq: Warn when IRQ_NOAUTOEN is used with shared interrupts") and
      kernel now throws a warn dump. But OMAP DWC3 driver uses this flag. As
      per commit 12a7f17f ("usb: dwc3: omap: fix race of pm runtime with
      irq handler in probe") that introduced this flag, PM runtime can race
      with IRQ handler when deferred probing happens due to extcon,
      therefore IRQ_NOAUTOEN needs to be set so that irq is not enabled until
      extcon is registered.
      
      Remove setting of IRQ_NOAUTOEN and move the registration of
      shared irq to a point after dwc3_omap_extcon_register() and
      of_platform_populate(). This avoids possibility of probe deferring and
      above said race condition.
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NVignesh R <vigneshr@ti.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      ee249b45
    • V
      usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys · 541768b0
      Vignesh R 提交于
      commit f54edb53 ("usb: dwc3: core: initialize ULPI before trying to
      get the PHY") moved call to dwc3_core_get_phy() from dwc3_probe() to
      dwc3_core_init() after dwc3_core_soft_reset(). But
      dwc3_core_soft_reset() calls phy_init(), therefore dwc3_core_get_phy()
      needs to be called before dwc3_core_soft_reset().
      
      Fix this by moving call to dwc3_core_get_phy() before
      dwc3_core_soft_reset().
      
      This fixes the following abort seen on DRA7xx platforms
      [   24.769118] usb usb2: SerialNumber: xhci-hcd.1.auto
      [   24.781144] hub 2-0:1.0: USB hub found
      [   24.787836] hub 2-0:1.0: 1 port detected
      [   24.809939] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
      Reported-by: NCarlos Hernandez <ceh@ti.com>
      Signed-off-by: NVignesh R <vigneshr@ti.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      541768b0
  14. 28 6月, 2017 1 次提交
  15. 15 6月, 2017 1 次提交
  16. 13 6月, 2017 6 次提交
  17. 07 6月, 2017 1 次提交
  18. 02 6月, 2017 5 次提交
    • F
      usb: dwc3: trace: decode ctrl request · af32423a
      Felipe Balbi 提交于
      Instead of *always* dumping raw ctrl bytes, let's decode standard
      requests which will make the lives of those debugging DWC3 quite a bit
      easier.
      
      Output will now look like so:
      
      irq/34-dwc3-1594  [000] d..1   107.573081: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   107.573694: dwc3_ctrl_req: Set Address(Addr = 01)
      irq/34-dwc3-1594  [000] d..1   107.588319: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   107.588816: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9)
      irq/34-dwc3-1594  [000] d..1   107.589191: dwc3_ctrl_req: Set Configuration(Config = 3)
      irq/34-dwc3-1594  [000] d..1   107.589846: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 5)
      irq/34-dwc3-1594  [000] d..1   107.590146: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 22)
      irq/34-dwc3-1594  [000] d..1   107.590546: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9)
      irq/34-dwc3-1594  [000] d..1   107.590840: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 69)
      irq/34-dwc3-1594  [000] d..1   107.591138: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 9)
      irq/34-dwc3-1594  [000] d..1   107.591541: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 32)
      irq/34-dwc3-1594  [000] d..1   107.591834: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.701005: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.721080: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.722709: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.728979: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.730544: dwc3_ctrl_req: Get Device Qualifier Descriptor(Index = 0, Length = 10)
      irq/34-dwc3-1594  [000] d..1   115.776018: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9)
      irq/34-dwc3-1594  [000] d..1   115.776760: dwc3_ctrl_req: Set Configuration(Config = 0)
      irq/34-dwc3-1594  [000] d..1   115.777676: dwc3_ctrl_req: Get Configuration(Length = 1)
      irq/34-dwc3-1594  [000] d..1   115.924797: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   115.929025: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.929566: dwc3_ctrl_req: Get String Descriptor(Index = 1, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.930911: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.931528: dwc3_ctrl_req: Get String Descriptor(Index = 2, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.932950: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.933533: dwc3_ctrl_req: Get String Descriptor(Index = 3, Length = 500)
      
      Note that Class and Vendor requests won't be decoded for obvious
      reasons. Those will be printed as a raw sequence of bytes.
      
      This patch has been tested against a normal host (both Linux and
      Windows) and USB30CV Chapter 9 tests.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      af32423a
    • F
      usb: dwc3: debug: remove static char buffer from dwc3_decode_event() · 3587f36a
      Felipe Balbi 提交于
      Instead, we can require caller to pass a buffer for the function to
      use. This cleans things quite a bit.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      3587f36a
    • F
      usb: dwc3: trace: rely on __string() and __assign_str() · e42f09b8
      Felipe Balbi 提交于
      Instead of going for a 512 byte buffer and using snprintf(), let's
      rely on helps __string() and __assign_str() where possible.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      e42f09b8
    • F
      usb: dwc3: gadget: slight cleanup to dwc3_process_event_entry() · dfc5e805
      Felipe Balbi 提交于
      No functional changes, just a slight readability improvement.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      dfc5e805
    • F
      usb: dwc3: debugfs: slightly improve output of trb_ring · 436841d5
      Felipe Balbi 提交于
      Instead of printing out enqueue and dequeue pointer value as a header
      to the output, let's mark the TRBs in question with 'E' and 'D'. The
      output looks slightly easier to read.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      436841d5