1. 09 7月, 2020 3 次提交
    • L
      usb: chipidea: udc: Fix a few kerneldoc issues · f2926dd5
      Lee Jones 提交于
      Descriptions were missing for 'ci' almost throughout.  There was
      one instance of over-documenting.  Finally one function argument
      was incorrectly documented (probably down to bitrot).
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/usb/chipidea/udc.c:245: warning: Function parameter or member 'ci' not described in 'hw_port_is_high_speed'
       drivers/usb/chipidea/udc.c:271: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_intr_active'
       drivers/usb/chipidea/udc.c:285: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_setup_guard'
       drivers/usb/chipidea/udc.c:296: warning: Function parameter or member 'ci' not described in 'hw_test_and_set_setup_guard'
       drivers/usb/chipidea/udc.c:321: warning: Function parameter or member 'ci' not described in 'hw_usb_reset'
       drivers/usb/chipidea/udc.c:628: warning: Excess function parameter 'ci' description in 'free_pending_td'
       drivers/usb/chipidea/udc.c:655: warning: Function parameter or member 'hwep' not described in '_hardware_dequeue'
       drivers/usb/chipidea/udc.c:655: warning: Excess function parameter 'gadget' description in '_hardware_dequeue'
      
      Cc: Peter Chen <Peter.Chen@nxp.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Link: https://lore.kernel.org/r/20200703174148.2749969-18-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f2926dd5
    • L
      usb: chipidea: udc: Help out kerneldoc headers that have tried, demote the others · 92d08e07
      Lee Jones 提交于
      Help with adding the odd description where they have been omitted or
      where the format isn't quite right.  Demote all function headers which
      are lacking any attempt of describing their arguments.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/usb/chipidea/udc.c:645: warning: Function parameter or member 'hwreq' not described in '_hardware_dequeue'
       drivers/usb/chipidea/udc.c:645: warning: Excess function parameter 'gadget' description in '_hardware_dequeue'
       drivers/usb/chipidea/udc.c:1326: warning: Function parameter or member 'ep' not described in 'ep_enable'
       drivers/usb/chipidea/udc.c:1326: warning: Function parameter or member 'desc' not described in 'ep_enable'
       drivers/usb/chipidea/udc.c:1393: warning: Function parameter or member 'ep' not described in 'ep_disable'
       drivers/usb/chipidea/udc.c:1433: warning: Function parameter or member 'ep' not described in 'ep_alloc_request'
       drivers/usb/chipidea/udc.c:1433: warning: Function parameter or member 'gfp_flags' not described in 'ep_alloc_request'
       drivers/usb/chipidea/udc.c:1454: warning: Function parameter or member 'ep' not described in 'ep_free_request'
       drivers/usb/chipidea/udc.c:1454: warning: Function parameter or member 'req' not described in 'ep_free_request'
       drivers/usb/chipidea/udc.c:1488: warning: Function parameter or member 'ep' not described in 'ep_queue'
       drivers/usb/chipidea/udc.c:1488: warning: Function parameter or member 'req' not described in 'ep_queue'
       drivers/usb/chipidea/udc.c:1488: warning: Function parameter or member 'gfp_flags' not described in 'ep_queue'
       drivers/usb/chipidea/udc.c:1512: warning: Function parameter or member 'ep' not described in 'ep_dequeue'
       drivers/usb/chipidea/udc.c:1512: warning: Function parameter or member 'req' not described in 'ep_dequeue'
       drivers/usb/chipidea/udc.c:1556: warning: Function parameter or member 'ep' not described in 'ep_set_halt'
       drivers/usb/chipidea/udc.c:1556: warning: Function parameter or member 'value' not described in 'ep_set_halt'
       drivers/usb/chipidea/udc.c:1566: warning: Function parameter or member 'ep' not described in 'ep_set_wedge'
       drivers/usb/chipidea/udc.c:1586: warning: Function parameter or member 'ep' not described in 'ep_fifo_flush'
       drivers/usb/chipidea/udc.c:1610: warning: cannot understand function prototype: 'const struct usb_ep_ops usb_ep_ops = '
       drivers/usb/chipidea/udc.c:1629: warning: Function parameter or member '_gadget' not described in 'ci_hdrc_gadget_connect'
       drivers/usb/chipidea/udc.c:1629: warning: Function parameter or member 'is_active' not described in 'ci_hdrc_gadget_connect'
       drivers/usb/chipidea/udc.c:1780: warning: cannot understand function prototype: 'const struct usb_gadget_ops usb_gadget_ops = '
       drivers/usb/chipidea/udc.c:1931: warning: Function parameter or member 'gadget' not described in 'ci_udc_stop'
       drivers/usb/chipidea/udc.c:1965: warning: Function parameter or member 'ci' not described in 'udc_irq'
       drivers/usb/chipidea/udc.c:2095: warning: Function parameter or member 'ci' not described in 'ci_hdrc_gadget_destroy'
       drivers/usb/chipidea/udc.c:2144: warning: Function parameter or member 'ci' not described in 'ci_hdrc_gadget_init'
      
      Cc: Peter Chen <Peter.Chen@nxp.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Link: https://lore.kernel.org/r/20200703174148.2749969-13-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92d08e07
    • L
      usb: chipidea: udc: Add missing descriptions for function arg 'ci' · 22dfe657
      Lee Jones 提交于
      Looks like a very popular argument to omit descriptions for.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/usb/chipidea/udc.c:80: warning: Function parameter or member 'ci' not described in 'hw_device_state'
       drivers/usb/chipidea/udc.c:100: warning: Function parameter or member 'ci' not described in 'hw_ep_flush'
       drivers/usb/chipidea/udc.c:121: warning: Function parameter or member 'ci' not described in 'hw_ep_disable'
       drivers/usb/chipidea/udc.c:136: warning: Function parameter or member 'ci' not described in 'hw_ep_enable'
       drivers/usb/chipidea/udc.c:170: warning: Function parameter or member 'ci' not described in 'hw_ep_get_halt'
       drivers/usb/chipidea/udc.c:185: warning: Function parameter or member 'ci' not described in 'hw_ep_prime'
       drivers/usb/chipidea/udc.c:215: warning: Function parameter or member 'ci' not described in 'hw_ep_set_halt'
       drivers/usb/chipidea/udc.c:238: warning: Function parameter or member 'ci' not described in 'hw_port_is_high_speed'
       drivers/usb/chipidea/udc.c:251: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_complete'
       drivers/usb/chipidea/udc.c:263: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_intr_active'
       drivers/usb/chipidea/udc.c:277: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_setup_guard'
       drivers/usb/chipidea/udc.c:288: warning: Function parameter or member 'ci' not described in 'hw_test_and_set_setup_guard'
       drivers/usb/chipidea/udc.c:300: warning: Function parameter or member 'ci' not described in 'hw_usb_set_address'
       drivers/usb/chipidea/udc.c:312: warning: Function parameter or member 'ci' not described in 'hw_usb_reset'
      
      Cc: Peter Chen <Peter.Chen@nxp.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Link: https://lore.kernel.org/r/20200703174148.2749969-12-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      22dfe657
  2. 24 6月, 2020 1 次提交
  3. 10 6月, 2020 1 次提交
  4. 06 5月, 2020 2 次提交
    • P
      usb: chipidea: udc: add software sg list support · e48aa1eb
      Peter Chen 提交于
      The chipidea controller doesn't support short transfer for sg list,
      so we still keep setting IOC per TD, otherwise, there will be no interrupt
      for short transfer. Each TD has five entries for data buffer, each data
      buffer could be non-countinuous 4KB buffer, so it could handle
      up to 5 sg buffers one time. The benefit of this patch is avoiding
      OOM for low memory system(eg, 256MB) during large USB transfers, see
      below for detail. The non-sg handling has not changed.
      
      ufb: page allocation failure: order:4, mode:0x40cc0(GFP_KERNEL|__GFP_COMP),
      nodemask=(null),cpuset=/,mems_allowed=0
      CPU: 2 PID: 370 Comm: ufb Not tainted 5.4.3-1.1.0+g54b3750d61fd #1
      Hardware name: NXP i.MX8MNano DDR4 EVK board (DT)
      Call trace:
       dump_backtrace+0x0/0x140
       show_stack+0x14/0x20
       dump_stack+0xb4/0xf8
       warn_alloc+0xec/0x158
       __alloc_pages_slowpath+0x9cc/0x9f8
       __alloc_pages_nodemask+0x21c/0x280
       alloc_pages_current+0x7c/0xe8
       kmalloc_order+0x1c/0x88
       __kmalloc+0x25c/0x298
       ffs_epfile_io.isra.0+0x20c/0x7d0
       ffs_epfile_read_iter+0xa8/0x188
       new_sync_read+0xe4/0x170
       __vfs_read+0x2c/0x40
       vfs_read+0xc8/0x1a0
       ksys_read+0x68/0xf0
       __arm64_sys_read+0x18/0x20
       el0_svc_common.constprop.0+0x68/0x160
       el0_svc_handler+0x20/0x80
       el0_svc+0x8/0xc
      Mem-Info:
      active_anon:2856 inactive_anon:5269 isolated_anon:12
       active_file:5238 inactive_file:18803 isolated_file:0
       unevictable:0 dirty:22 writeback:416 unstable:0
       slab_reclaimable:4073 slab_unreclaimable:3408
       mapped:727 shmem:7393 pagetables:37 bounce:0
       free:4104 free_pcp:118 free_cma:0
      Node 0 active_anon:11436kB inactive_anon:21076kB active_file:20988kB inactive_file:75216kB unevictable:0kB isolated(ano
      Node 0 DMA32 free:16820kB min:1808kB low:2260kB high:2712kB active_anon:11436kB inactive_anon:21076kB active_file:2098B
      lowmem_reserve[]: 0 0 0
      Node 0 DMA32: 508*4kB (UME) 242*8kB (UME) 730*16kB (UM) 21*32kB (UME) 5*64kB (UME) 2*128kB (M) 0*256kB 0*512kB 0*1024kB
      Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
      Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=32768kB
      Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
      Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB
      31455 total pagecache pages
      0 pages in swap cache
      Swap cache stats: add 0, delete 0, find 0/0
      Free swap  = 0kB
      Total swap = 0kB
      65536 pages RAM
      0 pages HighMem/MovableOnly
      10766 pages reserved
      0 pages cma reserved
      0 pages hwpoisoned
      Reviewed-by: NJun Li <jun.li@nxp.com>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      e48aa1eb
    • P
      usb: chipidea: introduce CI_HDRC_CONTROLLER_VBUS_EVENT glue layer use · d755cdb1
      Peter Chen 提交于
      Some vendors glue layer need to handle some events for vbus, eg,
      some i.mx platforms (imx7d, imx8mm, imx8mn, etc) needs vbus event
      to handle charger detection, its charger detection is finished at
      glue layer code, but not at USB PHY driver.
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      d755cdb1
  5. 18 3月, 2020 1 次提交
    • P
      usb: chipidea: udc: fix sleeping function called from invalid context · 7368760d
      Peter Chen 提交于
      The code calls pm_runtime_get_sync with irq disabled, it causes below
      warning:
      
      BUG: sleeping function called from invalid context at
      wer/runtime.c:1075
      in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid:
      er/u8:1
      CPU: 1 PID: 37 Comm: kworker/u8:1 Not tainted
      20200304-00181-gbebfd2a5be98 #1588
      Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
      Workqueue: ci_otg ci_otg_work
      [<c010e8bd>] (unwind_backtrace) from [<c010a315>]
      1/0x14)
      [<c010a315>] (show_stack) from [<c0987d29>]
      5/0x94)
      [<c0987d29>] (dump_stack) from [<c013e77f>]
      +0xeb/0x118)
      [<c013e77f>] (___might_sleep) from [<c052fa1d>]
      esume+0x75/0x78)
      [<c052fa1d>] (__pm_runtime_resume) from [<c0627a33>]
      0x23/0x74)
      [<c0627a33>] (ci_udc_pullup) from [<c062fb93>]
      nect+0x2b/0xcc)
      [<c062fb93>] (usb_gadget_connect) from [<c062769d>]
      _connect+0x59/0x104)
      [<c062769d>] (ci_hdrc_gadget_connect) from [<c062778b>]
      ssion+0x43/0x48)
      [<c062778b>] (ci_udc_vbus_session) from [<c062f997>]
      s_connect+0x17/0x9c)
      [<c062f997>] (usb_gadget_vbus_connect) from [<c062634d>]
      bd/0x128)
      [<c062634d>] (ci_otg_work) from [<c0134719>]
      rk+0x149/0x404)
      [<c0134719>] (process_one_work) from [<c0134acb>]
      0xf7/0x3bc)
      [<c0134acb>] (worker_thread) from [<c0139433>]
      x118)
      [<c0139433>] (kthread) from [<c01010bd>]
      (ret_from_fork+0x11/0x34)
      Tested-by: NDmitry Osipenko <digetx@gmail.com>
      Cc: <stable@vger.kernel.org> #v5.5
      Fixes: 72dc8df7 ("usb: chipidea: udc: protect usb interrupt enable")
      Reported-by: NDmitry Osipenko <digetx@gmail.com>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Link: https://lore.kernel.org/r/20200316031034.17847-2-peter.chen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7368760d
  6. 16 3月, 2020 1 次提交
  7. 18 11月, 2019 2 次提交
    • J
      usb: chipidea: udc: protect usb interrupt enable · 72dc8df7
      Jun Li 提交于
      We hit the problem with below sequence:
      - ci_udc_vbus_session() update vbus_active flag and ci->driver
      is valid,
      - before calling the ci_hdrc_gadget_connect(),
      usb_gadget_udc_stop() is called by application remove gadget
      driver,
      - ci_udc_vbus_session() will contine do ci_hdrc_gadget_connect() as
      gadget_ready is 1, so udc interrupt is enabled, but ci->driver is
      NULL.
      - USB connection irq generated but ci->driver is NULL.
      
      As udc irq only should be enabled when gadget driver is binded, so
      add spinlock to protect the usb irq enable for vbus session handling.
      Signed-off-by: NJun Li <jun.li@nxp.com>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      72dc8df7
    • P
      usb: chipidea: udc: add new API ci_hdrc_gadget_connect · d16ab536
      Peter Chen 提交于
      This API is used enable device function, it is called at below
      situations:
      - VBUS is connected during boots up
      - Hot plug occurs during runtime
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Signed-off-by: NJun Li <jun.li@nxp.com>
      d16ab536
  8. 04 11月, 2019 1 次提交
  9. 22 8月, 2019 1 次提交
  10. 25 7月, 2019 1 次提交
  11. 17 6月, 2019 1 次提交
    • P
      usb: chipidea: udc: workaround for endpoint conflict issue · c19dffc0
      Peter Chen 提交于
      An endpoint conflict occurs when the USB is working in device mode
      during an isochronous communication. When the endpointA IN direction
      is an isochronous IN endpoint, and the host sends an IN token to
      endpointA on another device, then the OUT transaction may be missed
      regardless the OUT endpoint number. Generally, this occurs when the
      device is connected to the host through a hub and other devices are
      connected to the same hub.
      
      The affected OUT endpoint can be either control, bulk, isochronous, or
      an interrupt endpoint. After the OUT endpoint is primed, if an IN token
      to the same endpoint number on another device is received, then the OUT
      endpoint may be unprimed (cannot be detected by software), which causes
      this endpoint to no longer respond to the host OUT token, and thus, no
      corresponding interrupt occurs.
      
      There is no good workaround for this issue, the only thing the software
      could do is numbering isochronous IN from the highest endpoint since we
      have observed most of device number endpoint from the lowest.
      
      Cc: <stable@vger.kernel.org> #v3.14+
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: Greg KH <gregkh@linuxfoundation.org>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: Jun Li <jun.li@nxp.com>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c19dffc0
  12. 20 9月, 2018 1 次提交
    • L
      usb: chipidea: Add dynamic pinctrl selection · 16caf1fa
      Loic Poulain 提交于
      Some hardware implementations require to configure pins differently
      according to the USB role (host/device), this can be an update of the
      pins routing or a simple GPIO value change.
      
      This patch introduces new optional "host" and "device" pinctrls.
      If these pinctrls are defined by the device, they are respectively
      selected on host/device role start.
      
      If a default pinctrl exist, it is restored on host/device role stop.
      Signed-off-by: NLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      16caf1fa
  13. 07 11月, 2017 1 次提交
    • G
      USB: chipidea: Remove redundant license text · 51b751f1
      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: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Acked-by: NPeter Chen <peter.chen@nxp.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      51b751f1
  14. 04 11月, 2017 1 次提交
  15. 21 9月, 2017 1 次提交
  16. 24 8月, 2017 1 次提交
  17. 19 7月, 2017 1 次提交
  18. 18 5月, 2017 1 次提交
    • J
      usb: chipidea: udc: fix NULL pointer dereference if udc_start failed · aa1f058d
      Jisheng Zhang 提交于
      Fix below NULL pointer dereference. we set ci->roles[CI_ROLE_GADGET]
      too early in ci_hdrc_gadget_init(), if udc_start() fails due to some
      reason, the ci->roles[CI_ROLE_GADGET] check in  ci_hdrc_gadget_destroy
      can't protect us.
      
      We fix this issue by only setting ci->roles[CI_ROLE_GADGET] if
      udc_start() succeed.
      
      [    1.398550] Unable to handle kernel NULL pointer dereference at
      virtual address 00000000
      ...
      [    1.448600] PC is at dma_pool_free+0xb8/0xf0
      [    1.453012] LR is at dma_pool_free+0x28/0xf0
      [    2.113369] [<ffffff80081817d8>] dma_pool_free+0xb8/0xf0
      [    2.118857] [<ffffff800841209c>] destroy_eps+0x4c/0x68
      [    2.124165] [<ffffff8008413770>] ci_hdrc_gadget_destroy+0x28/0x50
      [    2.130461] [<ffffff800840fa30>] ci_hdrc_probe+0x588/0x7e8
      [    2.136129] [<ffffff8008380fb8>] platform_drv_probe+0x50/0xb8
      [    2.142066] [<ffffff800837f494>] driver_probe_device+0x1fc/0x2a8
      [    2.148270] [<ffffff800837f68c>] __device_attach_driver+0x9c/0xf8
      [    2.154563] [<ffffff800837d570>] bus_for_each_drv+0x58/0x98
      [    2.160317] [<ffffff800837f174>] __device_attach+0xc4/0x138
      [    2.166072] [<ffffff800837f738>] device_initial_probe+0x10/0x18
      [    2.172185] [<ffffff800837e58c>] bus_probe_device+0x94/0xa0
      [    2.177940] [<ffffff800837c560>] device_add+0x3f0/0x560
      [    2.183337] [<ffffff8008380d20>] platform_device_add+0x180/0x240
      [    2.189541] [<ffffff800840f0e8>] ci_hdrc_add_device+0x440/0x4f8
      [    2.195654] [<ffffff8008414194>] ci_hdrc_usb2_probe+0x13c/0x2d8
      [    2.201769] [<ffffff8008380fb8>] platform_drv_probe+0x50/0xb8
      [    2.207705] [<ffffff800837f494>] driver_probe_device+0x1fc/0x2a8
      [    2.213910] [<ffffff800837f5ec>] __driver_attach+0xac/0xb0
      [    2.219575] [<ffffff800837d4b0>] bus_for_each_dev+0x60/0xa0
      [    2.225329] [<ffffff800837ec80>] driver_attach+0x20/0x28
      [    2.230816] [<ffffff800837e880>] bus_add_driver+0x1d0/0x238
      [    2.236571] [<ffffff800837fdb0>] driver_register+0x60/0xf8
      [    2.242237] [<ffffff8008380ef4>] __platform_driver_register+0x44/0x50
      [    2.248891] [<ffffff80086fd440>] ci_hdrc_usb2_driver_init+0x18/0x20
      [    2.255365] [<ffffff8008082950>] do_one_initcall+0x38/0x128
      [    2.261121] [<ffffff80086e0d00>] kernel_init_freeable+0x1ac/0x250
      [    2.267414] [<ffffff800852f0b8>] kernel_init+0x10/0x100
      [    2.272810] [<ffffff8008082680>] ret_from_fork+0x10/0x50
      
      Cc: stable <stable@vger.kernel.org>
      Fixes: 3f124d23 ("usb: chipidea: add role init and destroy APIs")
      Signed-off-by: NJisheng Zhang <jszhang@marvell.com>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      aa1f058d
  19. 14 4月, 2017 1 次提交
    • P
      usb: chipidea: core: add sysfs group · a932a804
      Peter Chen 提交于
      Sometimes, the user needs to adjust some properties for controllers, eg
      the role for controller, we add sysfs group for them.
      
      The attribute 'role' is used to switch host/gadget role dynamically, the
      uewr can read the current role, and write the other role compare to
      current one to finish the switch.
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      a932a804
  20. 23 3月, 2017 1 次提交
  21. 15 3月, 2017 1 次提交
  22. 20 1月, 2017 2 次提交
  23. 16 11月, 2016 1 次提交
    • P
      usb: chipidea: move the lock initialization to core file · a5d906bb
      Peter Chen 提交于
      This can fix below dump when the lock is accessed at host
      mode due to it is not initialized.
      
      [   46.119638] INFO: trying to register non-static key.
      [   46.124643] the code is fine but needs lockdep annotation.
      [   46.130144] turning off the locking correctness validator.
      [   46.135659] CPU: 0 PID: 690 Comm: cat Not tainted 4.9.0-rc3-00079-g4b75f1d #1210
      [   46.143075] Hardware name: Freescale i.MX6 SoloX (Device Tree)
      [   46.148923] Backtrace:
      [   46.151448] [<c010c460>] (dump_backtrace) from [<c010c658>] (show_stack+0x18/0x1c)
      [   46.159038]  r7:edf52000
      [   46.161412]  r6:60000193
      [   46.163967]  r5:00000000
      [   46.165035]  r4:c0e25c2c
      
      [   46.169109] [<c010c640>] (show_stack) from [<c03f58a4>] (dump_stack+0xb4/0xe8)
      [   46.176362] [<c03f57f0>] (dump_stack) from [<c016d690>] (register_lock_class+0x4fc/0x56c)
      [   46.184554]  r10:c0e25d24
      [   46.187014]  r9:edf53e70
      [   46.189569]  r8:c1642444
      [   46.190637]  r7:ee9da024
      [   46.193191]  r6:00000000
      [   46.194258]  r5:00000000
      [   46.196812]  r4:00000000
      [   46.199185]  r3:00000001
      
      [   46.203259] [<c016d194>] (register_lock_class) from [<c0171294>] (__lock_acquire+0x80/0x10f0)
      [   46.211797]  r10:c0e25d24
      [   46.214257]  r9:edf53e70
      [   46.216813]  r8:ee9da024
      [   46.217880]  r7:c1642444
      [   46.220435]  r6:edcd1800
      [   46.221502]  r5:60000193
      [   46.224057]  r4:00000000
      
      [   46.227953] [<c0171214>] (__lock_acquire) from [<c01726c0>] (lock_acquire+0x74/0x94)
      [   46.235710]  r10:00000001
      [   46.238169]  r9:edf53e70
      [   46.240723]  r8:edf53f80
      [   46.241790]  r7:00000001
      [   46.244344]  r6:00000001
      [   46.245412]  r5:60000193
      [   46.247966]  r4:00000000
      
      [   46.251866] [<c017264c>] (lock_acquire) from [<c096c8fc>] (_raw_spin_lock_irqsave+0x40/0x54)
      [   46.260319]  r7:ee1c6a00
      [   46.262691]  r6:c062a570
      [   46.265247]  r5:20000113
      [   46.266314]  r4:ee9da014
      
      [   46.270393] [<c096c8bc>] (_raw_spin_lock_irqsave) from [<c062a570>] (ci_port_test_show+0x2c/0x70)
      [   46.279280]  r6:eebd2000
      [   46.281652]  r5:ee9da010
      [   46.284207]  r4:ee9da014
      
      [   46.286810] [<c062a544>] (ci_port_test_show) from [<c0248d04>] (seq_read+0x1ac/0x4f8)
      [   46.294655]  r9:edf53e70
      [   46.297028]  r8:edf53f80
      [   46.299583]  r7:ee1c6a00
      [   46.300650]  r6:00000001
      [   46.303205]  r5:00000000
      [   46.304273]  r4:eebd2000
      [   46.306850] [<c0248b58>] (seq_read) from [<c039e864>] (full_proxy_read+0x54/0x6c)
      [   46.314348]  r10:00000000
      [   46.316808]  r9:c0a6ad30
      [   46.319363]  r8:edf53f80
      [   46.320430]  r7:00020000
      [   46.322986]  r6:b6de3000
      [   46.324053]  r5:ee1c6a00
      [   46.326607]  r4:c0248b58
      
      [   46.330505] [<c039e810>] (full_proxy_read) from [<c021ec98>] (__vfs_read+0x34/0x118)
      [   46.338262]  r9:edf52000
      [   46.340635]  r8:c0107fc4
      [   46.343190]  r7:00020000
      [   46.344257]  r6:edf53f80
      [   46.346812]  r5:c039e810
      [   46.347879]  r4:ee1c6a00
      [   46.350447] [<c021ec64>] (__vfs_read) from [<c021fbd0>] (vfs_read+0x8c/0x11c)
      [   46.357597]  r9:edf52000
      [   46.359969]  r8:c0107fc4
      [   46.362524]  r7:edf53f80
      [   46.363592]  r6:b6de3000
      [   46.366147]  r5:ee1c6a00
      [   46.367214]  r4:00020000
      [   46.369782] [<c021fb44>] (vfs_read) from [<c0220a4c>] (SyS_read+0x4c/0xa8)
      [   46.376672]  r8:c0107fc4
      [   46.379045]  r7:00020000
      [   46.381600]  r6:b6de3000
      [   46.382667]  r5:ee1c6a00
      [   46.385222]  r4:ee1c6a00
      
      [   46.387817] [<c0220a00>] (SyS_read) from [<c0107e20>] (ret_fast_syscall+0x0/0x1c)
      [   46.395314]  r7:00000003
      [   46.397687]  r6:b6de3000
      [   46.400243]  r5:00020000
      [   46.401310]  r4:00020000
      
      Cc: <stable@vger.kernel.org>
      Fixes: 26c696c6 ("USB: Chipidea: rename struct
      	       	ci13xxx variables from udc to ci")
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a5d906bb
  24. 14 11月, 2016 1 次提交
  25. 03 11月, 2016 2 次提交
  26. 14 9月, 2016 6 次提交
  27. 09 9月, 2016 1 次提交
    • C
      usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase · 6f3c4fb6
      Clemens Gruber 提交于
      Problems with the signal integrity of the high speed USB data lines or
      noise on reference ground lines can cause the i.MX6 USB controller to
      violate USB specs and exhibit unexpected behavior.
      
      It was observed that USBi_UI interrupts were triggered first and when
      isr_setup_status_phase was called, ci->status was NULL, which lead to a
      NULL pointer dereference kernel panic.
      
      This patch fixes the kernel panic, emits a warning once and returns
      -EPIPE to halt the device and let the host get stalled.
      It also adds a comment to point people, who are experiencing this issue,
      to their USB hardware design.
      
      Cc: <stable@vger.kernel.org> #4.1+
      Signed-off-by: NClemens Gruber <clemens.gruber@pqgruber.com>
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      6f3c4fb6
  28. 19 8月, 2016 1 次提交
  29. 04 3月, 2016 1 次提交