Commit Graph
8 Commits
Author SHA1 Message Date
William Liu bf79e46e0a f_usbnet:Requeue the request in shutdown case
Requeue the rx request in case of ether_open
or connection shutdown cases
make sure there is always requests available in the list

Change-Id: Ib3e5425b5fe3306df64594285e5717a1767fd275
Signed-off-by: William Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2399177
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-10-10 04:19:11 -05:00
William Liu 0d35abcfbf Revert "Revert "(CR):f_usbnet:Handle the rx error conditions""
This reverts commit e8fa083c2ddc3f6bba3655f19c606efdbb91654d.

After fixed the factory connection issue after factory-kill disabled
Reapply the stability improvement patch
Mot-CRs-Fixed:(CR)

Change-Id: Ica5a371f2e30cc97d2e4de0ce22467ab89edb2af
Signed-off-by: William Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2399176
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-10-10 04:16:04 -05:00
William Liu b32b9be9b9 f_usbnet:Handle the rx error conditions
f_usbnet driver did not handle the skb allocation
Or enqueue failure cases, the phone rx from PC bulkout endpoint
will stop if all the rx requests in the queue are all failed
Reschedule the rx in another workqueue so it will not stuck for ever

Change-Id: Icf0835fe5fad5925dd256649fd6badc772c0620d
Signed-off-by: William Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2392727
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianhong Wang <wangjhn@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-09-30 00:51:50 -05:00
a17671 ece2bbacc3 Add watchdog_cpu_dump and tzlog_dump support on 5.4
Add watchdog_cpu context and tzlog dump support
For 5.4 or later kernel, there is no way to browse the
Symbols without breaking the GKI rules
So read the ttbl1_el1 to get the init_mm->pgd instead of
The old symbols browsing
Update module dependencies

Change-Id: I26aca73f4a879f9504ecd5443c458e154cf48fe9
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1975101
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-01-11 02:28:00 -06:00
a17671 b736076b7f fs:exfat-linux:Integrate exfat-linux open source driver
Opensource exfat-linux driver provide better performance
Comparing with the existing Moto exfat-nofuse
It could support various kernel versions l(CR) 5.4/4.19/4.14/4.9
Original source :https://github.com/arter97/exfat-linux.git
version 5.8-2arter97
This commit also integrates almost all the exfat upstream
changes from kernel 5.8-5.16 listed in:
https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git/log/fs/exfat?h=exfat-for-5.16-rc1

Change-Id: I7c0db070ee33be8f7f24a42f987b4e825d957998
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2137224
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xinmin Fu <fuxm1@motorola.com>
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-15 23:10:34 -06:00
a17671 c9837700df usbnet:USBLAN Super speed plus support
Set the ssp_descriptors as ss_descriptors
in Moto USBLAN driver, otherwise
panic will be triggered when connected
With super speed plus supported PC

panic trace:

configfs-gadget gadget: super-speed-plus config #1: b
 configfs-gadget gadget: usbnet_set_alt intf: 1 alt: 0
 configfs-gadget gadget: do_set_config ep ep2in
 configfs-gadget gadget: config_ep_by_speed ep ep2in
 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
 pstate: 60c00085 (nZCv daIf +PAN +UAO)
 pc : config_ep_by_speed_and_alt+0x90/0x308
 lr : config_ep_by_speed+0x14/0x20
 sp : ffffffc0131f3980
 x29: ffffffc0131f3990 x28: 0000000000000001 
 x27: 0000000000007fff x26: ffffffe13d3f3254 
 x25: ffffff81c041Montana0 x24: ffffff81c0504f00 
 x23: 0000000000000001 x22: ffffff81c07bf480 
 x21: 0000000000000001 x20: ffffff81c0504f00 
 x19: ffffff81c166ca00 x18: ffffffc012931080 
 x17: 0000000000000041 x16: ffffffe13d3e4b0c 
 x15: ffffffe13e0a9197 x14: 0000000000000050 
 x13: 0000000000001e06 x12: 00000000341555ac 
 x11: 00000000fffd4775 x10: 0000000000000000 
 x9 : 0000000000000001 x8 : ffffff81c0504f28 
 x7 : 0000000000000000 x6 : ffffffe13eb2592b 
 x5 : 0000000000000054 x4 : 0000000000000008 
 x3 : 0000000000000000 x2 : ffffff81d11d9e00 
 x1 : ffffff81c0504f00 x0 : ffffff81d11a93c8 
 Call trace:
  config_ep_by_speed_and_alt+0x90/0x308
  config_ep_by_speed+0x14/0x20
  do_set_config+0x70/0x2f8 [moto_f_usbnet]
  usbnet_set_alt+0x30/0x60 [moto_f_usbnet]
  set_config+0x29c/0x56c
  composite_setup+0x40c/0x188c
  android_setup+0x11c/0x180
  dwc3_ep0_set_config+0x548/0x830
  dwc3_ep0_inspect_setup+0x234/0x334
  dwc3_ep0_interrupt+0x98/0x338
  dwc3_process_event_entry+0x144/0x678
  dwc3_process_event_buf+0x68/0x580
  dwc3_bh_work+0x64/0xf8
  process_one_work+0x2cc/0x568
  worker_thread+0x28c/0x518
  kthread+0x160/0x170
  ret_from_fork+0x10/0x18


Change-Id: I68c8309ad81a36c4c40657e62c45a6902a17dde6
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2048201
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-08-24 09:50:48 -05:00
a17671 51eb207822 exfat:Fix panic of handlings of unhashed alias
Unhashed alias is allowed to exist
In the latest upstream kernel exfat driver
It does not have to generate panic in this case
Porting this handling to exfat-nofuse driver from url
https://git.kernel.org/pub/scm/linux/kernel/git/
stable/linux.git/tree/fs/exfat/namei.c?h=v5.10.8#n724

Panic stack trace:
kernel BUG at ../../motorola/kernel/modules/fs/exfat/exfat_super.c:874!
[  759.284483] pc : exfat_lookup+0x1dc/0x1e0 [exfat]
[  759.284496] lr : exfat_lookup+0x144/0x1e0 [exfat]
[  759.284502] sp : ffffff800ea2b9d0
[  759.284507] x29: ffffff800ea2ba20 x28: fffffff6f3cf8000
[  759.284515] x27: 0000000000000000 x26: 0000000000000000
[  759.284523] x25: 0000000056000000 x24: fffffff7b8742d88
[  759.284530] x23: 0000000000004000 x22: fffffff883b08390
[  759.284538] x21: fffffff7b874b228 x20: fffffff86d375000
[  759.284546] x19: fffffff883b08980 x18: 0000000007270df4
[  759.284553] x17: 0000000000000000 x16: ffffff9bebd5c9b8
[  759.284561] x15: fffffff6f976ba00 x14: 0000000000000041
[  759.284569] x13: ffffff9bede96590 x12: fffffff6f89f7b00
[  759.284576] x11: 2cf70e9f45774b00 x10: 0000000000000000
[  759.284584] x9 : 0000000000000000 x8 : 0000000000000000
[  759.284591] x7 : ffffff9bec02e394 x6 : 0000000000000000
[  759.284599] x5 : 0000000000000000 x4 : 0000000000000001
[  759.284606] x3 : 0000000000000000 x2 : ffffff9bebd5ca84
[  759.284614] x1 : 0000000000000001 x0 : fffffff883b08390
[  759.284622] Call trace:
[  759.284636]  exfat_lookup+0x1dc/0x1e0 [exfat]
[  759.284650]  __lookup_slow+0x9c/0x188
[  759.284658]  walk_component+0x1d0/0x868
[  759.284665]  path_lookupat+0xb8/0x210
[  759.284672]  filename_lookup+0x98/0x1c8
[  759.284679]  user_path_at_empty+0x54/0x68
[  759.284688]  vfs_statx+0x90/0x130
[  759.284695]  __arm64_sys_newfstatat+0x40/0x80
[  759.284704]  el0_svc_common+0xa0/0x170
[  759.284711]  el0_svc_handler+0x6c/0x88
[  759.284719]  el0_svc+0x8/0xc
[  759.284728] Code: 17ffffa7 92800176 17ffffec 940018f2 (d4210000)

Change-Id: I5fb26e2416f70733fe2010484740513dc9a8c5d0
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1853335
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-01-19 19:32:36 -06:00
a17671 f3cbb755a7 moto_f_usbnet:Release skb if bulk_in is NULL
Ip link tearing down is later than the usbnet disabling.
Kernel will panic if bulk_in endpoint is NULL and ip stack still has data
Free the skb in this case.

Change-Id: Icc987551da4a8b9c1998b0c09f19fbed49ea58ee
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1220589
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2018-08-06 07:07:40 -05:00