Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
module_param(quirks, ullong, S_IRUGO);
MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default");

static int sandbag_lpm = 1;
module_param(sandbag_lpm, int, S_IRUGO | S_IWUSR);

Check failure on line 43 in drivers/usb/host/xhci.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
MODULE_PARM_DESC(sandbag_lpm, "Use relaxed U1/U2 port LPM timeouts");

static bool td_on_ring(struct xhci_td *td, struct xhci_ring *ring)
{
struct xhci_segment *seg = ring->first_seg;
Expand Down Expand Up @@ -4807,7 +4811,7 @@
}
}

if (xhci->quirks & (XHCI_INTEL_HOST | XHCI_ZHAOXIN_HOST))
if (sandbag_lpm || xhci->quirks & (XHCI_INTEL_HOST | XHCI_ZHAOXIN_HOST))
timeout_ns = xhci_calculate_intel_u1_timeout(udev, desc);
else
timeout_ns = udev->u1_params.sel;
Expand Down Expand Up @@ -4871,7 +4875,7 @@
}
}

if (xhci->quirks & (XHCI_INTEL_HOST | XHCI_ZHAOXIN_HOST))
if (sandbag_lpm || xhci->quirks & (XHCI_INTEL_HOST | XHCI_ZHAOXIN_HOST))
timeout_ns = xhci_calculate_intel_u2_timeout(udev, desc);
else
timeout_ns = udev->u2_params.sel;
Expand Down
Loading