An error occurred fetching the project authors.
  1. 25 Feb, 2014 1 commit
  2. 21 Feb, 2014 1 commit
  3. 13 Jan, 2014 1 commit
    • Peter Chen's avatar
      usb: chipidea: udc: using MultO at TD as real mult value for ISO-TX · 2fc5a7da
      Peter Chen authored
      We have met a bug that the high bandwidth ISO-TX transfer has failed
      at the last packet if it is less than 1024, the TD status shows it
      is "Transaction Error".
      
      The root cause of this problem is: the mult value at qh is not correct
      for current TD's transfer length. We use TD list to queue un-transfer
      TDs, and change mult for new adding TDs. If new adding TDs transfer length
      less than 1024, but the queued un-transfer TDs transfer length is larger
      than 1024, the transfer error will occur, and vice versa.
      Usually, this problem occurs at the last packet, and the first packet for
      new frame.
      
      We fixed this problem by setting Mult at QH as the largest value (3), and
      set MultO (Multiplier Override) at TD according to every transfer length.
      It can cover both hardware version less than 2.3 (the real mult is MultO
      if it is not 0) and 2.3+ (the real mult is min(qh.mult, td.multo)).
      
      Since the MultO bits are only existed at TX TD, we keep the ISO-RX behavior
      unchanged.
      
      For stable tree: 3.11+.
      
      Cc: stable <stable@vger.kernel.org>
      Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
      Reported-by: default avatarMatthieu Vanin <b47495@freescale.com>
      Tested-by: default avatarMatthieu Vanin <b47495@freescale.com>
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2fc5a7da
  4. 17 Dec, 2013 1 commit
    • Robert Baldyga's avatar
      usb: gadget: add "maxpacket_limit" field to struct usb_ep · e117e742
      Robert Baldyga authored
      This patch adds "maxpacket_limit" to struct usb_ep. This field contains
      maximum value of maxpacket supported by driver, and is set in driver probe.
      This value should be used by autoconfig() function, because value of field
      "maxpacket" is set to value from endpoint descriptor when endpoint becomes
      enabled. So when autoconfig() function will be called again for this endpoint,
      "maxpacket" value will contain wMaxPacketSize from descriptior instead of
      maximum packet size for this endpoint.
      
      For this reason this patch adds new field "maxpacket_limit" which contains
      value of maximum packet size (which defines maximum endpoint capabilities).
      This value is used in ep_matches() function used by autoconfig().
      
      Value of "maxpacket_limit" should be set in UDC driver probe function, using
      usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function
      set choosen value to both "maxpacket_limit" and "maxpacket" fields.
      
      This patch modifies UDC drivers by adding support for maxpacket_limit.
      Signed-off-by: default avatarRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      e117e742
  5. 09 Dec, 2013 1 commit
  6. 11 Oct, 2013 2 commits
    • Peter Chen's avatar
      usb: chipidea: udc: Fix calling spin_lock_irqsave at sleep context · 65b2fb32
      Peter Chen authored
      Fixing the below dump:
      
      root@freescale ~$ modprobe g_serial
      g_serial gadget: Gadget Serial v2.4
      g_serial gadget: g_serial ready
      BUG: sleeping function called from invalid context at /home/b29397/work/projects/upstream/usb/usb/drivers/base/power/runtime.c:952
      in_atomic(): 1, irqs_disabled(): 128, pid: 805, name: modprobe
      2 locks held by modprobe/805:
       #0:  (udc_lock){+.+.+.}, at: [<7f000a74>] usb_gadget_probe_driver+0x44/0xb4 [udc_core]
       #1:  (&(&ci->lock)->rlock){......}, at: [<7f033488>] ci_udc_start+0x94/0x110 [ci_hdrc]
      irq event stamp: 3878
      hardirqs last  enabled at (3877): [<806b6720>] _raw_spin_unlock_irqrestore+0x40/0x6c
      hardirqs last disabled at (3878): [<806b6474>] _raw_spin_lock_irqsave+0x2c/0xa8
      softirqs last  enabled at (3872): [<8002ec0c>] __do_softirq+0x1c8/0x2e8
      softirqs last disabled at (3857): [<8002f180>] irq_exit+0xbc/0x110
      CPU: 0 PID: 805 Comm: modprobe Not tainted 3.11.0-next-20130910+ #85
      [<80016b94>] (unwind_backtrace+0x0/0xf8) from [<80012e0c>] (show_stack+0x20/0x24)
      [<80012e0c>] (show_stack+0x20/0x24) from [<806af554>] (dump_stack+0x9c/0xc4)
      [<806af554>] (dump_stack+0x9c/0xc4) from [<8005940c>] (__might_sleep+0xf4/0x134)
      [<8005940c>] (__might_sleep+0xf4/0x134) from [<803a04a4>] (__pm_runtime_resume+0x94/0xa0)
      [<803a04a4>] (__pm_runtime_resume+0x94/0xa0) from [<7f0334a4>] (ci_udc_start+0xb0/0x110 [ci_hdrc])
      [<7f0334a4>] (ci_udc_start+0xb0/0x110 [ci_hdrc]) from [<7f0009b4>] (udc_bind_to_driver+0x5c/0xd8 [udc_core])
      [<7f0009b4>] (udc_bind_to_driver+0x5c/0xd8 [udc_core]) from [<7f000ab0>] (usb_gadget_probe_driver+0x80/0xb4 [udc_core])
      [<7f000ab0>] (usb_gadget_probe_driver+0x80/0xb4 [udc_core]) from [<7f008618>] (usb_composite_probe+0xac/0xd8 [libcomposite])
      [<7f008618>] (usb_composite_probe+0xac/0xd8 [libcomposite]) from [<7f04b168>] (init+0x8c/0xb4 [g_serial])
      [<7f04b168>] (init+0x8c/0xb4 [g_serial]) from [<800088e8>] (do_one_initcall+0x108/0x16c)
      [<800088e8>] (do_one_initcall+0x108/0x16c) from [<8008e518>] (load_module+0x1b00/0x20a4)
      [<8008e518>] (load_module+0x1b00/0x20a4) from [<8008eba8>] (SyS_init_module+0xec/0x100)
      [<8008eba8>] (SyS_init_module+0xec/0x100) from [<8000ec40>] (ret_fast_syscall+0x0/0x48)
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      65b2fb32
    • Peter Chen's avatar
      usb: chipidea: udc: Fix spinlock recursion during bus reset · a3aee368
      Peter Chen authored
      After configuration, the host also possible sends bus reset
      at any time, at such situation, it will trigger below spinlock
      recursion dump. This commit unlocks the spinlock before calling
      gadget's disconnect.
      
      BUG: spinlock recursion on CPU#0, swapper/0/0
       lock: 0xbf128014, .magic: dead4ead, .owner: swapper/0/0, .owner_cpu: 0
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.11.0-next-20130910+ #106
      [<80014e20>] (unwind_backtrace+0x0/0xec) from [<80011a6c>] (show_stack+0x10/0x14)
      [<80011a6c>] (show_stack+0x10/0x14) from [<805c143c>] (dump_stack+0x94/0xbc)
      [<805c143c>] (dump_stack+0x94/0xbc) from [<80282cf8>] (do_raw_spin_lock+0x16c/0x18c)
      [<80282cf8>] (do_raw_spin_lock+0x16c/0x18c) from [<805c77e0>] (_raw_spin_lock_irqsave+0x50/0x5c)
      [<805c77e0>] (_raw_spin_lock_irqsave+0x50/0x5c) from [<803cff88>] (ep_disable+0x24/0x110)
      [<803cff88>] (ep_disable+0x24/0x110) from [<7f015d50>] (gserial_disconnect+0xa0/0x15c [u_serial])
      [<7f015d50>] (gserial_disconnect+0xa0/0x15c [u_serial]) from [<7f01c06c>] (acm_disable+0xc/0x30 [usb_f_acm])
      [<7f01c06c>] (acm_disable+0xc/0x30 [usb_f_acm]) from [<7f001478>] (reset_config.isra.10+0x34/0x5c [libcomposite])
      [<7f001478>] (reset_config.isra.10+0x34/0x5c [libcomposite]) from [<7f0014d4>] (composite_disconnect+0x34/0x5c [libcomposite])
      [<7f0014d4>] (composite_disconnect+0x34/0x5c [libcomposite]) from [<803d1024>] (udc_irq+0x770/0xce4)
      [<803d1024>] (udc_irq+0x770/0xce4) from [<803cdcc0>] (ci_irq+0x98/0x164)
      [<803cdcc0>] (ci_irq+0x98/0x164) from [<8007edfc>] (handle_irq_event_percpu+0x50/0x17c)
      [<8007edfc>] (handle_irq_event_percpu+0x50/0x17c) from [<8007ef64>] (handle_irq_event+0x3c/0x5c)
      [<8007ef64>] (handle_irq_event+0x3c/0x5c) from [<80081e98>] (handle_fasteoi_irq+0x98/0x168)
      [<80081e98>] (handle_fasteoi_irq+0x98/0x168) from [<8007e598>] (generic_handle_irq+0x28/0x3c)
      [<8007e598>] (generic_handle_irq+0x28/0x3c) from [<8000edf4>] (handle_IRQ+0x4c/0xb4)
      [<8000edf4>] (handle_IRQ+0x4c/0xb4) from [<800085bc>] (gic_handle_irq+0x28/0x5c)
      [<800085bc>] (gic_handle_irq+0x28/0x5c) from [<800125c0>] (__irq_svc+0x40/0x54)
      Exception stack(0x8083bf68 to 0x8083bfb0)
      bf60:                   81533b80 00000000 00096234 8001d760 8088e12c 00000000
      bf80: 8083a000 8083a000 8084290c 805cb414 808428ac 8083a000 00000001 8083bfb0
      bfa0: 8000f138 8000f13c 60000013 ffffffff
      [<800125c0>] (__irq_svc+0x40/0x54) from [<8000f13c>] (arch_cpu_idle+0x30/0x3c)
      [<8000f13c>] (arch_cpu_idle+0x30/0x3c) from [<8005eb94>] (cpu_startup_entry+0xf4/0x148)
      [<8005eb94>] (cpu_startup_entry+0xf4/0x148) from [<807f1a2c>] (start_kernel+0x2c4/0x318)
      BUG: spinlock lockup suspected on CPU#0, swapper/0/0
       lock: 0xbf128014, .magic: dead4ead, .owner: swapper/0/0, .owner_cpu: 0
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.11.0-next-20130910+ #106
      [<80014e20>] (unwind_backtrace+0x0/0xec) from [<80011a6c>] (show_stack+0x10/0x14)
      [<80011a6c>] (show_stack+0x10/0x14) from [<805c143c>] (dump_stack+0x94/0xbc)
      [<805c143c>] (dump_stack+0x94/0xbc) from [<80282c94>] (do_raw_spin_lock+0x108/0x18c)
      [<80282c94>] (do_raw_spin_lock+0x108/0x18c) from [<805c77e0>] (_raw_spin_lock_irqsave+0x50/0x5c)
      [<805c77e0>] (_raw_spin_lock_irqsave+0x50/0x5c) from [<803cff88>] (ep_disable+0x24/0x110)
      [<803cff88>] (ep_disable+0x24/0x110) from [<7f015d50>] (gserial_disconnect+0xa0/0x15c [u_serial])
      [<7f015d50>] (gserial_disconnect+0xa0/0x15c [u_serial]) from [<7f01c06c>] (acm_disable+0xc/0x30 [usb_f_acm])
      [<7f01c06c>] (acm_disable+0xc/0x30 [usb_f_acm]) from [<7f001478>] (reset_config.isra.10+0x34/0x5c [libcomposite])
      [<7f001478>] (reset_config.isra.10+0x34/0x5c [libcomposite]) from [<7f0014d4>] (composite_disconnect+0x34/0x5c [libcomposite])
      [<7f0014d4>] (composite_disconnect+0x34/0x5c [libcomposite]) from [<803d1024>] (udc_irq+0x770/0xce4)
      [<803d1024>] (udc_irq+0x770/0xce4) from [<803cdcc0>] (ci_irq+0x98/0x164)
      [<803cdcc0>] (ci_irq+0x98/0x164) from [<8007edfc>] (handle_irq_event_percpu+0x50/0x17c)
      [<8007edfc>] (handle_irq_event_percpu+0x50/0x17c) from [<8007ef64>] (handle_irq_event+0x3c/0x5c)
      [<8007ef64>] (handle_irq_event+0x3c/0x5c) from [<80081e98>] (handle_fasteoi_irq+0x98/0x168)
      [<80081e98>] (handle_fasteoi_irq+0x98/0x168) from [<8007e598>] (generic_handle_irq+0x28/0x3c)
      [<8007e598>] (generic_handle_irq+0x28/0x3c) from [<8000edf4>] (handle_IRQ+0x4c/0xb4)
      [<8000edf4>] (handle_IRQ+0x4c/0xb4) from [<800085bc>] (gic_handle_irq+0x28/0x5c)
      [<800085bc>] (gic_handle_irq+0x28/0x5c) from [<800125c0>] (__irq_svc+0x40/0x54)
      Exception stack(0x8083bf68 to 0x8083bfb0)
      bf60:                   81533b80 00000000 00096234 8001d760 8088e12c 00000000
      bf80: 8083a000 8083a000 8084290c 805cb414 808428ac 8083a000 00000001 8083bfb0
      bfa0: 8000f138 8000f13c 60000013 ffffffff
      [<800125c0>] (__irq_svc+0x40/0x54) from [<8000f13c>] (arch_cpu_idle+0x30/0x3c)
      [<8000f13c>] (arch_cpu_idle+0x30/0x3c) from [<8005eb94>] (cpu_startup_entry+0xf4/0x148)
      [<8005eb94>] (cpu_startup_entry+0xf4/0x148) from [<807f1a2c>] (start_kernel+0x2c4/0x318)
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a3aee368
  7. 01 Oct, 2013 1 commit
  8. 26 Sep, 2013 4 commits
    • Peter Chen's avatar
      usb: chipidea: udc: free pending TD at removal procedure · e7ef5265
      Peter Chen authored
      There is a pending TD which is not freed after request finishes,
      we do this due to a controller bug. This TD needs to be freed when
      the driver is removed. It prints below error message when unload
      chipidea driver at current code:
      "ci_hdrc ci_hdrc.0: dma_pool_destroy ci_hw_td, b0001000 busy"
      It indicates the buffer at dma pool are still in use.
      
      This commit will free the pending TD at driver's removal procedure,
      it can fix the problem described above.
      Acked-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7ef5265
    • Peter Chen's avatar
      usb: chipidea: udc: fix the oops after rmmod gadget · f84839da
      Peter Chen authored
      When we rmmod gadget, the ci->driver needs to be cleared.
      Otherwise, when we plug in usb cable again, the driver will
      consider gadget is there, and go to enumeration procedure,
      but in fact, it was removed.
      
      ci_hdrc ci_hdrc.0: Connected to host
      Unable to handle kernel paging request at virtual address 7f02a42c
      pgd = 80004000
      [7f02a42c] *pgd=3f13d811, *pte=00000000, *ppte=00000000
      Internal error: Oops: 7 [#1] SMP ARM
      Modules linked in: usb_f_acm u_serial libcomposite configfs [last unloaded: g_serial]
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0+ #42
      task: 807dba88 ti: 807d0000 task.ti: 807d0000
      PC is at udc_irq+0x8fc/0xea4
      LR is at l2x0_cache_sync+0x5c/0x6c
      pc : [<803de7f4>]    lr : [<8001d0f0>]    psr: 20000193
      sp : 807d1d98  ip : 807d1d80  fp : 807d1df4
      r10: af809900  r9 : 808184d4  r8 : 00080001
      r7 : 00082001  r6 : afb711f8  r5 : afb71010  r4 : ffffffea
      r3 : 7f02a41c  r2 : afb71010  r1 : 807d1dc0  r0 : afb71068
      Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c53c7d  Table: 3f01804a  DAC: 00000017
      Process swapper/0 (pid: 0, stack limit = 0x807d0238)
      Stack: (0x807d1d98 to 0x807d2000)
      1d80:                                                       00000000 afb71014
      1da0: 000040f6 00000000 00000001 00000000 00007530 00000000 afb71010 001dcd65
      1dc0: 01000680 00400000 807d1e2c afb71010 0000004e 00000000 00000000 0000004b
      1de0: 808184d4 af809900 807d1e0c 807d1df8 803dbc24 803ddf04 afba75c0 0000004e
      1e00: 807d1e44 807d1e10 8007a19c 803dbb9c 8108e7e0 8108e7e0 9ceddce0 af809900
      1e20: 0000004e 807d0000 0000004b 00000000 00000010 00000000 807d1e5c 807d1e48
      1e40: 8007a334 8007a154 af809900 0000004e 807d1e74 807d1e60 8007d3b4 8007a2f0
      1e60: 0000004b 807cce3c 807d1e8c 807d1e78 80079b08 8007d300 00000180 807d8ba0
      1e80: 807d1eb4 807d1e90 8000eef4 80079aec 00000000 f400010c 807d8ce4 807d1ed8
      1ea0: f4000100 96d5c75d 807d1ed4 807d1eb8 80008600 8000eeac 8042699c 60000013
      1ec0: ffffffff 807d1f0c 807d1f54 807d1ed8 8000e180 800085dc 807d1f20 00000046
      1ee0: 9cedd275 00000010 8108f080 807de294 00000001 807de248 96d5c75d 00000010
      1f00: 00000000 807d1f54 00000000 807d1f20 8005ff54 8042699c 60000013 ffffffff
      1f20: 9cedd275 00000010 00000005 8108f080 8108f080 00000001 807de248 8086bd00
      1f40: 807d0000 00000001 807d1f7c 807d1f58 80426af0 80426950 807d0000 00000000
      1f60: 808184c0 808184c0 807d8954 805b886c 807d1f8c 807d1f80 8000f294 80426a44
      1f80: 807d1fac 807d1f90 8005f110 8000f288 807d1fac 807d8908 805b4748 807dc86c
      1fa0: 807d1fbc 807d1fb0 805aa58c 8005f068 807d1ff4 807d1fc0 8077c860 805aa530
      1fc0: ffffffff ffffffff 8077c330 00000000 00000000 807bef88 00000000 10c53c7d
      1fe0: 807d88d0 807bef84 00000000 807d1ff8 10008074 8077c594 00000000 00000000
      Backtrace:
      [<803ddef8>] (udc_irq+0x0/0xea4) from [<803dbc24>] (ci_irq+0x94/0x14c)
      [<803dbb90>] (ci_irq+0x0/0x14c) from [<8007a19c>] (handle_irq_event_percpu+0x54/0x19c)
       r5:0000004e r4:afba75c0
       [<8007a148>] (handle_irq_event_percpu+0x0/0x19c) from [<8007a334>] (handle_irq_event+0x50/0x70)
      [<8007a2e4>] (handle_irq_event+0x0/0x70) from [<8007d3b4>] (handle_fasteoi_irq+0xc0/0x16c)
       r5:0000004e r4:af809900
       [<8007d2f4>] (handle_fasteoi_irq+0x0/0x16c) from [<80079b08>] (generic_handle_irq+0x28/0x38)
       r5:807cce3c r4:0000004b
       [<80079ae0>] (generic_handle_irq+0x0/0x38) from [<8000eef4>] (handle_IRQ+0x54/0xb4)
       r4:807d8ba0 r3:00000180
       [<8000eea0>] (handle_IRQ+0x0/0xb4) from [<80008600>] (gic_handle_irq+0x30/0x64)
       r8:96d5c75d r7:f4000100 r6:807d1ed8 r5:807d8ce4 r4:f400010c
       r3:00000000
       [<800085d0>] (gic_handle_irq+0x0/0x64) from [<8000e180>] (__irq_svc+0x40/0x54)
      Exception stack(0x807d1ed8 to 0x807d1f20)
      1ec0:                                                       807d1f20 00000046
      1ee0: 9cedd275 00000010 8108f080 807de294 00000001 807de248 96d5c75d 00000010
      1f00: 00000000 807d1f54 00000000 807d1f20 8005ff54 8042699c 60000013 ffffffff
       r7:807d1f0c r6:ffffffff r5:60000013 r4:8042699c
       [<80426944>] (cpuidle_enter_state+0x0/0xf4) from [<80426af0>] (cpuidle_idle_call+0xb8/0x174)
       r9:00000001 r8:807d0000 r7:8086bd00 r6:807de248 r5:00000001
       r4:8108f080
       [<80426a38>] (cpuidle_idle_call+0x0/0x174) from [<8000f294>] (arch_cpu_idle+0x18/0x5c)
      [<8000f27c>] (arch_cpu_idle+0x0/0x5c) from [<8005f110>] (cpu_startup_entry+0xb4/0x148)
      [<8005f05c>] (cpu_startup_entry+0x0/0x148) from [<805aa58c>] (rest_init+0x68/0x80)
       r7:807dc86c
       [<805aa524>] (rest_init+0x0/0x80) from [<8077c860>] (start_kernel+0x2d8/0x334)
      [<8077c588>] (start_kernel+0x0/0x334) from [<10008074>] (0x10008074)
      Code: e59031e0 e51b203c e24b1034 e2820058 (e5933010)
      ---[ end trace f874b2c5533c04bc ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      Tested-by: default avatarMarek Vasut <marex@denx.de>
      Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f84839da
    • Peter Chen's avatar
      usb: chipidea: udc: Consolidate the call of disconnect · 92b336d7
      Peter Chen authored
      The udc-core will call gadget's driver->disconnect, so we should avoid
      calling gadget's disconnect again at ci_udc_stop in case the gadget's
      unbind free some structs which is still used at gadget's disconnect.
      Tested-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92b336d7
    • Peter Chen's avatar
      chipidea: udc: free pending TD at removal procedure · 4a29567b
      Peter Chen authored
      There is a pending TD which is not freed after request finishes,
      we do this due to a controller bug. This TD needs to be freed when
      the driver is removed. It prints below error message when unload
      chipidea driver at current code:
      "ci_hdrc ci_hdrc.0: dma_pool_destroy ci_hw_td, b0001000 busy"
      It indicates the buffer at dma pool are still in use.
      
      This commit will free the pending TD at driver's removal procedure,
      it can fix the problem described above.
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4a29567b
  9. 14 Aug, 2013 6 commits
  10. 24 Jun, 2013 1 commit
  11. 17 Jun, 2013 4 commits
  12. 11 Jun, 2013 1 commit
  13. 05 Apr, 2013 2 commits
  14. 30 Mar, 2013 14 commits