Re: Kernel Oops when downloading data from a 4G modem connected via USB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Amr,

On 5/2/2018 3:57 PM, Amr Bekhit wrote:
>> Could you please apply follow patches from linux-usb mailing list:
>> 1. usb: dwc2: hcd: Fix host channel halt flow
>> 2. usb: dwc2: host: Fix transaction errors in host mode
>> and test again.
> 
> Thanks for your response. I've tried applying the above patches (taken from
> https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.kernel.org_patch_10096209_&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=6z9Al9FrHR_ZqbbtSAsD16pvOL2S3XHxQnSzq8kusyI&m=pm_ejbHE3SzUg3PIMfP1w4oXRQ0fr7_DBiQdmIqqmmM&s=mxPCG_fQabXNnlZ018dj25jCjn1Y9G9vEoaniEVwUUM&e= and
> https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.kernel.org_patch_10104403_&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=6z9Al9FrHR_ZqbbtSAsD16pvOL2S3XHxQnSzq8kusyI&m=pm_ejbHE3SzUg3PIMfP1w4oXRQ0fr7_DBiQdmIqqmmM&s=r5y16b0B30KsR6tzs43Ebhl8UUAq1IPbWt-5k3mehnI&e=) to kernel 4.15.16. The
> compilation failed with the following error:
> 
> drivers/usb/dwc2/hcd.c: In function ‘dwc2_hc_halt’:
> drivers/usb/dwc2/hcd.c:995:12: error: ‘struct dwc2_hsotg’ has no member
> named ‘core_params’; did you mean ‘hw_params’?
>     if ((hsotg->core_params->dma_enable > 0 &&
>               ^~
> drivers/usb/dwc2/hcd.c:996:12: error: ‘struct dwc2_hsotg’ has no member
> named ‘core_params’; did you mean ‘hw_params’?
>          hsotg->core_params->dma_desc_enable <= 0) ||
>               ^~
> drivers/usb/dwc2/hcd.c: In function ‘dwc2_core_host_init’:
> drivers/usb/dwc2/hcd.c:2339:34: warning: unused variable ‘val’
> [-Wunused-variable]
>     u32 hcfg, hfir, otgctl, usbcfg, val;
>                                     ^~~
> scripts/Makefile.build:324: recipe for target 'drivers/usb/dwc2/hcd.o'
> failed
> 
> I tried to manually get the patch working by looking at the struct
> definitions in core.h and modified lines hcd.c lines 995-996 as follows
> (changing core_params to params and dma_enable to host_dma):
> 
> if ((hsotg->params.host_dma > 0 &&
>        hsotg->params.dma_desc_enable <= 0) ||
> 
> This compiles, but doesn't solve the problem. The kernel oops still occurs
> with the following trace (full dmesg trace can be found at
> https://urldefense.proofpoint.com/v2/url?u=https-3A__paste.ee_p_R8Ccj&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=6z9Al9FrHR_ZqbbtSAsD16pvOL2S3XHxQnSzq8kusyI&m=pm_ejbHE3SzUg3PIMfP1w4oXRQ0fr7_DBiQdmIqqmmM&s=3noSNdgD4z7wCWDc9Y3aNiPeRVHwYmSzh6qowy0S2fQ&e=):
> 
> [   50.520879] dwc2 101c0000.usb: --Host Channel 5 Interrupt: Transaction
> Error--
> [   57.760866] dwc2 101c0000.usb: --Host Channel 10 Interrupt: Transaction
> Error--
> [   57.846752] dwc2 101c0000.usb: --Host Channel 15 Interrupt: Transaction
> Error--
> [   57.912946] dwc2 101c0000.usb: --Host Channel 2 Interrupt: Transaction
> Error--
> [   57.920037] dwc2 101c0000.usb: --Host Channel 13 Interrupt: Transaction
> Error--
> [   57.926534] dwc2 101c0000.usb: --Host Channel 10 Interrupt: Transaction
> Error--
> [   57.926588] dwc2 101c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 7 -
> ChHltd set, but reason is unknown
> [   57.935448] dwc2 101c0000.usb: hcint 0x00000002, intsts 0x04000029
> [   57.940901] dwc2 101c0000.usb: dwc2_update_urb_state_abn(): trimming
> xfer length
> [   57.947796] dwc2 101c0000.usb: dwc2_update_urb_state(): trimming xfer
> length
> [   57.985245] dwc2 101c0000.usb: --Host Channel 15 Interrupt: Transaction
> Error--
> [   57.988891] dwc2 101c0000.usb: --Host Channel 10 Interrupt: Transaction
> Error--
> [   57.989236] dwc2 101c0000.usb: --Host Channel 14 Interrupt: Transaction
> Error--
> [   58.005362] dwc2 101c0000.usb: --Host Channel 3 Interrupt: Transaction
> Error--
> [   58.005486] dwc2 101c0000.usb: --Host Channel 10 Interrupt: Transaction
> Error--
> [   58.005666] dwc2 101c0000.usb: --Host Channel 15 Interrupt: Transaction
> Error--
> [   58.006000] dwc2 101c0000.usb: --Host Channel 14 Interrupt: Transaction
> Error--
> [   58.006143] dwc2 101c0000.usb: --Host Channel 1 Interrupt: Transaction
> Error--
> [   58.006308] dwc2 101c0000.usb: --Host Channel 15 Interrupt: Transaction
> Error--
> [   58.006415] dwc2 101c0000.usb: --Host Channel 0 Interrupt: Transaction
> Error--
> [   58.006574] dwc2 101c0000.usb: --Host Channel 14 Interrupt: Transaction
> Error--
> [   58.006749] dwc2 101c0000.usb: --Host Channel 10 Interrupt: Transaction
> Error--
> [   58.020865] Unable to handle kernel paging request at virtual address
> 76ad3ad7
> [   58.027491] pgd = 7da1f8f3
> [   58.029054] [76ad3ad7] *pgd=00000000
> [   58.031650] Internal error: Oops: 5 [#1] SMP ARM
> [   58.035354] Modules linked in:
> [   58.037311] CPU: 2 PID: 175 Comm: wget Not tainted 4.15.16 #2
> [   58.042274] Hardware name: Rockchip (Device Tree)
> [   58.046086] PC is at kfree_skb_list+0x18/0x28
> [   58.049493] LR is at skb_release_data+0x40/0x134
> [   58.053187] pc : [<c0509fc8>]    lr : [<c050a968>]    psr: 200d0013
> [   58.058733] sp : eeb1dd60  ip : eeb1dd78  fp : eeb1dd74
> [   58.063114] r10: 00000000  r9 : 00000000  r8 : ee630404
> [   58.067497] r7 : eeb1ddf8  r6 : 00000000  r5 : eea19cc0  r4 : ee4ad540
> [   58.073336] r3 : 00000000  r2 : 00001a00  r1 : 00001240  r0 : 76ad3ad7
> [   58.079176] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment
> none
> [   58.085695] Control: 10c5387d  Table: 8ebf404a  DAC: 00000051
> [   58.090663] Process wget (pid: 175, stack limit = 0x8f583f74)
> [   58.095629] Stack: (0xeeb1dd60 to 0xeeb1e000)
> [   58.099048] dd60: ee4ad540 eea19cc0 eeb1dd94 eeb1dd78 c050a968 c0509fbc
> eea19cc0 00000b00
> [   58.106739] dd80: eea19cc0 eeb1ddf8 eeb1ddac eeb1dd98 c0509f30 c050a934
> eea19cc0 00000b00
> [   58.114431] dda0: eeb1ddc4 eeb1ddb0 c0509f48 c0509f14 ee630040 00000b00
> eeb1de4c eeb1ddc8
> [   58.122121] ddc0: c055c9b8 c0509f40 effda7e0 00000000 eeb1ddec 00000004
> eeb1de20 ee6300dc
> [   58.129812] dde0: 00000001 00000000 ee6304dc 00000001 eeb1de90 00001500
> 5ae9a3ec 1dcda13f
> [   58.137502] de00: eeb1def0 7fffffff 5ae9a3ec 1dcda13f eeb1de28 eeb1de2c
> 00000000 00000000
> [   58.145193] de20: 00000008 eeb1de90 c055c374 ee9f50c0 eee8a1c0 00002000
> eeb1c000 00000000
> [   58.152883] de40: eeb1de74 eeb1de50 c0583480 c055c380 00000000 eeb1de5c
> eeb1dedc 00000000
> [   58.160573] de60: c0583438 00002000 eeb1de8c eeb1de78 c04feba8 c0583444
> eeb1def0 00002000
> [   58.168263] de80: eeb1dedc eeb1de90 c04fec34 c04feb94 00000000 00000000
> 00000000 00000b00
> [   58.175952] dea0: 00001500 eeb1dee8 00000001 00000000 00000000 00000000
> 00000000 eeb1df08
> [   58.183642] dec0: ee9f50c0 00000000 00000000 eeb1df80 eeb1df4c eeb1dee0
> c01eaf88 c04febb8
> [   58.191331] dee0: 00002000 00000000 002eee70 00002000 00000000 00000000
> 00002000 eeb1dee8
> [   58.199019] df00: 00000001 00000000 ee9f50c0 00000000 00000000 00000000
> 00000000 00000000
> [   58.206701] df20: 00000000 00000000 bed9c3e0 ee9f50c0 00000000 00002000
> 002eee70 eeb1df80
> [   58.214391] df40: eeb1df7c eeb1df50 c01eb044 c01eae94 c02072ac c020720c
> eeb1df7c ee9f50c0
> [   58.222082] df60: ee9f50c0 002eee70 00002000 c0107c84 eeb1dfa4 eeb1df80
> c01eb4b0 c01eafb8
> [   58.229771] df80: 00000000 00000000 00000000 00000003 0008ce08 00000003
> 00000000 eeb1dfa8
> [   58.237460] dfa0: c0107aa0 c01eb474 00000000 00000003 00000003 002eee70
> 00002000 00000000
> [   58.245149] dfc0: 00000000 00000003 0008ce08 00000003 00002000 00000000
> 000153cd 00000000
> [   58.252840] dfe0: 000850a4 bed9c470 000164e0 b6d54af8 600d0010 00000003
> 00000000 00010203
> [   58.260519] Backtrace:
> [   58.261809] [<c0509fb0>] (kfree_skb_list) from [<c050a968>]
> (skb_release_data+0x40/0x134)
> [   58.269494]  r5:eea19cc0 r4:ee4ad540
> [   58.272039] [<c050a928>] (skb_release_data) from [<c0509f30>]
> (skb_release_all+0x28/0x2c)
> [   58.279727]  r7:eeb1ddf8 r6:eea19cc0 r5:00000b00 r4:eea19cc0
> [   58.284601] [<c0509f08>] (skb_release_all) from [<c0509f48>]
> (__kfree_skb+0x14/0x20)
> [   58.291799]  r5:00000b00 r4:eea19cc0
> [   58.294349] [<c0509f34>] (__kfree_skb) from [<c055c9b8>]
> (tcp_recvmsg+0x644/0x8c8)
> [   58.301354]  r5:00000b00 r4:ee630040
> [   58.303904] [<c055c374>] (tcp_recvmsg) from [<c0583480>]
> (inet_recvmsg+0x48/0xc4)
> [   58.310820]  r10:00000000 r9:eeb1c000 r8:00002000 r7:eee8a1c0
> r6:ee9f50c0 r5:c055c374
> [   58.318113]  r4:eeb1de90
> [   58.319494] [<c0583438>] (inet_recvmsg) from [<c04feba8>]
> (sock_recvmsg+0x20/0x24)
> [   58.326498]  r5:00002000 r4:c0583438
> [   58.329040] [<c04feb88>] (sock_recvmsg) from [<c04fec34>]
> (sock_read_iter+0x88/0xb0)
> [   58.336239]  r5:00002000 r4:eeb1def0
> [   58.338789] [<c04febac>] (sock_read_iter) from [<c01eaf88>]
> (__vfs_read+0x100/0x124)
> [   58.345990]  r7:eeb1df80 r6:00000000 r5:00000000 r4:ee9f50c0
> [   58.350868] [<c01eae88>] (__vfs_read) from [<c01eb044>]
> (vfs_read+0x98/0x104)
> [   58.357391]  r8:eeb1df80 r7:002eee70 r6:00002000 r5:00000000 r4:ee9f50c0
> [   58.363434] [<c01eafac>] (vfs_read) from [<c01eb4b0>]
> (SyS_read+0x48/0x80)
> [   58.369666]  r8:c0107c84 r7:00002000 r6:002eee70 r5:ee9f50c0 r4:ee9f50c0
> [   58.375713] [<c01eb468>] (SyS_read) from [<c0107aa0>]
> (ret_fast_syscall+0x0/0x54)
> [   58.382622]  r7:00000003 r6:0008ce08 r5:00000003 r4:00000000
> [   58.387497] Code: e24cb004 e3500000 1a000000 e89da830 (e5904000)
> [   58.392955] ---[ end trace 5a0e52dd30feade4 ]---
> 

Actually, I didn't see any evidence which points to dwc2 as root cause 
of Kernel Oops. Transaction errors are accepted from USB spec point of 
view and dwc2 will continue initiated transfers.
Could you please provide verbose dwc2 log.
Per my understanding in your system EHCI host also available. Is any 
issue seen if connected to EHCI?
Thanks,
Minas
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux