[i.MX8MQ] [Android] usb gadget driver keep output log when typeC port change into host mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[i.MX8MQ] [Android] usb gadget driver keep output log when typeC port change into host mode

648 Views
TzuWen_Chang
Contributor I

Hi NXP,

I am using i.MX 8M Quad EVK​​ and building my android 12 image.

I fond a issue both occures to my image and NXP official release image Android 12.1.0_1.0.0 (L5.15.52_2.1.0 BSP).
When I connect a typeC to typeA dongle to turn the typeC port to host mode.

or use command: echo host > /sys/kernel/debug/usb/38100000.usb/mode

Usb gadget driver will keep output "read descriptors", "read strings" like following.

[ 44.030387][ T350] AidlLazyServiceRegistrar: Process has 1 (of 1 available) client(s) in use after notification apexservice has clients: 1
[ 44.043077][ T350] AidlLazyServiceRegistrar: Shutdown prevented by forcePersist override flag.
[ 44.907299][ T42] android_work: did not send uevent (0 0 0000000000000000)
[ 44.910376][ T247] type=1400 audit(1657116056.803:67): avc: denied { search } for comm="usb@1.3-service" name="usb" dev="sysfs" ino=27912 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
[ 44.935307][ T247] type=1400 audit(1657116056.807:68): avc: denied { search } for comm="usb@1.3-service" name="usb" dev="sysfs" ino=27912 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
[ 44.957919][ T247] type=1400 audit(1657116056.807:69): avc: denied { search } for comm="usb@1.3-service" name="usb" dev="sysfs" ino=27912 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
[ 44.984250][ T514] read descriptors
[ 44.984995][ T247] type=1400 audit(1657116056.879:70): avc: denied { search } for comm="usb@1.3-service" name="usb" dev="sysfs" ino=27912 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
[ 44.987930][ T514] read strings
[ 45.024467][ T160] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 45.030822][ T160] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
[ 45.039507][ T160] xhci-hcd xhci-hcd.2.auto: hcc params 0x0220fe6c hci version 0x110 quirks 0x0000000000010010
[ 45.049712][ T160] xhci-hcd xhci-hcd.2.auto: irq 68, io mem 0x38100000
[ 45.057409][ T160] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 45.066422][ T160] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 45.074415][ T160] usb usb3: Product: xHCI Host Controller
[ 45.080078][ T160] usb usb3: Manufacturer: Linux 5.15.41-android13-8-00205-gf1bf82c3dacd-ab8743605 xhci-hcd
[ 45.090011][ T160] usb usb3: SerialNumber: xhci-hcd.2.auto
[ 45.096683][ T160] hub 3-0:1.0: USB hub found
[ 45.101257][ T160] hub 3-0:1.0: 1 port detected
[ 45.107227][ T160] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 45.113497][ T160] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
[ 45.121902][ T160] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
[ 45.129249][ T160] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 45.138243][ T160] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[ 45.147254][ T160] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 45.155197][ T160] usb usb4: Product: xHCI Host Controller
[ 45.160811][ T160] usb usb4: Manufacturer: Linux 5.15.41-android13-8-00205-gf1bf82c3dacd-ab8743605 xhci-hcd
[ 45.170665][ T160] usb usb4: SerialNumber: xhci-hcd.2.auto
[ 45.177262][ T160] hub 4-0:1.0: USB hub found
[ 45.181820][ T160] hub 4-0:1.0: 1 port detected
[ 46.053155][ T514] read descriptors
[ 46.056799][ T514] read strings
[ 47.103736][ T514] read descriptors
[ 47.107363][ T514] read strings
[ 48.153992][ T514] read descriptors
[ 48.157705][ T514] read strings
[ 49.215698][ T514] read descriptors
[ 49.219330][ T514] read strings
[ 50.271681][ T514] read descriptors
[ 50.275310][ T514] read strings
[ 50.357552][ T247] type=1400 audit(1657116062.251:71): avc: denied { search } for comm="usb@1.3-service" name="usb" dev="sysfs" ino=27912 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
[ 51.335791][ T514] read descriptors
[ 51.339452][ T514] read strings
[ 52.415731][ T514] read descriptors
[ 52.419360][ T514] read strings
[ 53.487740][ T514] read descriptors
[ 53.491372][ T514] read strings
[ 54.543708][ T514] read descriptors
[ 54.547342][ T514] read strings
[ 55.631693][ T514] read descriptors
[ 55.635325][ T514] read strings
[ 56.719770][ T514] read descriptors
[ 56.723439][ T514] read strings
[ 57.791757][ T514] read descriptors
[ 57.795427][ T514] read strings
[ 58.895732][ T514] read descriptors
[ 58.899367][ T514] read strings
[ 59.951692][ T514] read descriptors
[ 59.955324][ T514] read strings
[ 61.007682][ T514] read descriptors
[ 61.011315][ T514] read strings
[ 62.059571][ T514] read descriptors
[ 62.063207][ T514] read strings
[ 63.135734][ T514] read descriptors
[ 63.139371][ T514] read strings
[ 64.207736][ T514] read descriptors
[ 64.211371][ T514] read strings
[ 65.271688][ T514] read descriptors
[ 65.275322][ T514] read strings
[ 66.348906][ T514] read descriptors
[ 66.352580][ T514] read strings
[ 67.423728][ T514] read descriptors
[ 67.427362][ T514] read strings
[ 68.479747][ T514] read descriptors
[ 68.483419][ T514] read strings
[ 69.551457][ T514] read descriptors
[ 69.555090][ T514] read strings
[ 70.639708][ T514] read descriptors
[ 70.643341][ T514] read strings
[ 71.695700][ T514] read descriptors
[ 71.699335][ T514] read strings
[ 72.783777][ T514] read descriptors
[ 72.787437][ T514] read strings
[ 73.855692][ T514] read descriptors
[ 73.859328][ T514] read strings
[ 74.943756][ T514] read descriptors
[ 74.947426][ T514] read strings


Are there any patches to fix this issue?

Tags (1)
0 Kudos
2 Replies

599 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

I was able to reproduce the same behavior with my board and i will try making a patch for that, please be aware!

 

Regards

0 Kudos

575 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You can disable this verbose log using one of this methods:

1- stop u-boot booting and run this from terminal

# setenv append_bootargs loglevel=6 ; saveenv

 2- from kernel terminal switch to root user and set the log level 

# su
# echo "6" > /proc/sys/kernel/printk

3- You can apply this patch attached to linux kernel in android source code 

${ANDROID_BUILD}/vendor/nxp-opensource/kernel_imx

Regards

0 Kudos