Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsusb: improve usb2 device capability descriptor #209

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

tsundre
Copy link
Contributor

@tsundre tsundre commented Nov 15, 2024

Fix the following issues with the usb2 device capability descriptor dump:

Currently, the BESL values claim to be in microseconds, but are actually the raw, unshifted values from the descriptor. Use a lookup table for the BESL values, based on Table X-X1 from "Errata for USB 2.0 ECN: Link Power Management (LPM) - 7/2007" to display the actual microsecond values.

Currently, the BESL values are displayed at the same indentation level as bmAttributes, even though they are fields in bmAttributes. Adjust indentation to align all fields of bmAttributes.

Change "BESL value" to "Baseline BESL value", to reflect the actual names of the field.

Remove two unnecessary line breaks.

Before change:

  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x0000f41e
      BESL Link Power Management (LPM) Supported
    BESL value     1024 us
    Deep BESL value    61440 us

After change:

  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x0000f41e
      BESL Link Power Management (LPM) Supported
      Baseline BESL value    400 us
      Deep BESL value      10000 us

@tsundre tsundre force-pushed the improve-usb2-extension-devcap branch from 3c50f1a to 95e9e60 Compare November 16, 2024 07:10
Fix the following issues with the usb2 device capability descriptor
dump:

Currently, the BESL values claim to be in microseconds, but are actually
the raw, unshifted values from the descriptor. Use a lookup table for
the BESL values, based on Table X-X1 from "Errata for USB 2.0 ECN: Link
Power Management (LPM) - 7/2007" to display the actual microsecond
values.

Currently, the BESL values are displayed at the same indentation level
as bmAttributes, even though they are fields in bmAttributes. Adjust
indentation to align all fields of bmAttributes.

Change "BESL value" to "Baseline BESL value", to reflect the actual
names of the field.

Remove two unnecessary line breaks.

Before change:
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x0000f41e
      BESL Link Power Management (LPM) Supported
    BESL value     1024 us
    Deep BESL value    61440 us

After change:
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x0000f41e
      BESL Link Power Management (LPM) Supported
      Baseline BESL value    400 us
      Deep BESL value      10000 us

Signed-off-by: Torleiv Sundre <[email protected]>
@tsundre tsundre force-pushed the improve-usb2-extension-devcap branch from 95e9e60 to 5c02e04 Compare November 16, 2024 07:15
@gregkh
Copy link
Owner

gregkh commented Nov 16, 2024

Thanks, but this is failing the "Signed-off-by:" test, can you please fix that up?

@gregkh
Copy link
Owner

gregkh commented Nov 16, 2024

Looks great, thanks for the fix!

@gregkh gregkh merged commit 807d0cc into gregkh:master Nov 16, 2024
16 checks passed
@tsundre tsundre deleted the improve-usb2-extension-devcap branch November 16, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants