Skip to content

Some USB noise need to be filtered out #514

Closed

Description

@aiChaoSONG

check report 732 on CML_OLP_RT711 suspend case

[ 7160.094705] usb 2-4.1: Disable of device-initiated U1 failed.
[ 7160.469352] usb 2-4.1: Disable of device-initiated U2 failed.
[ 7171.776533] usb 2-4.1: device not accepting address 3, error -62

Activity

  1. aiChaoSONG commented on Nov 13, 2020

    @aiChaoSONG
    Author

    @marc-hb I just realized that our filters for some USB noise don't work, because the . only match a single character. maybe change . to *, or we specify the whole false failure text?

    ignore_str="$ignore_str"'|usb 2-3: Enable of device-initiated U1 failed\.'
    ignore_str="$ignore_str"'|usb 2-3: Enable of device-initiated U2 failed\.'
    
    # CHT devices with USB hub, issues reported by sof-test
    # BugLink: https://github.com/thesofproject/sof-test/issues/431
    ignore_str="$ignore_str"'|hub 2-.: .'
    ignore_str="$ignore_str"'|usb 2-.: .'
    
    # TGL devices with USB 3.1 devices, issues reported by sof-test
    # BugLink: https://github.com/thesofproject/sof-test/issues/482
    ignore_str="$ignore_str"'|usb 3-.: device descriptor read/64, error .'
    ignore_str="$ignore_str"'|usb 3-.: device not accepting address ., error .'
    
  2. marc-hb commented on Nov 13, 2020

    @marc-hb
    Collaborator

    maybe change . to *

    You mean change . to .*? Or better, to [[:digit:]-.]*

    ignore_str="$ignore_str"'|hub 2-.: .'
    ignore_str="$ignore_str"'|usb 2-.: .'
    
    ignore_str="$ignore_str"'|usb 3-.: device descriptor read/64, error .'
    ignore_str="$ignore_str"'|usb 3-.: device not accepting address ., error .'
    

    In the lack of a final $, a last . is pointless and should be removed. It sets a bad example.

    Use fake_kern_error() to test regular expressions like this. Regular expressions are extremely error-prone, can never be tested too much. You can stuff a single, quick test with dozens of fake_kern_error

    Is this an issue with the CML system? If yes did we report it somewhere? If not then how about we stop using broken USB peripherals?

  3. aiChaoSONG commented on Nov 13, 2020

    @aiChaoSONG
    Author

    @marc-hb In fact, our USB peripherals work, hard to tell which is broken. I have see usb error logs with same message but different usb version or error code, same usb version but different message, this make the filter RE hard to write.

  4. marc-hb commented on Nov 13, 2020

    @marc-hb
    Collaborator

    In fact, our USB peripherals work, hard to tell which is broken

    Plug them in/out/in/out... while watching journalctl -f :-)

  5. marc-hb commented on Jan 27, 2021

    @marc-hb
    Collaborator

    This specific error hasn't been seen on CML in a while.

    The single dot regex has been changed to multiple dots .* for usb3 but not usb2 yet, @aiChaoSONG to submit the change and close this.

  6. added a commit that references this issue on Jan 27, 2021
    3d8e012
  7. added
    type:bugSomething doesn't work as expected
    P2Critical bugs or normal features
    on Jun 4, 2021
  8. keqiaozhang commented on Jun 7, 2021

    @keqiaozhang
    Contributor

    Fixed in #595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Critical bugs or normal featuresarea:non-audio FailureFalse positives: failing when we don't want totype:bugSomething doesn't work as expected

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions