提交 d7826599 编写于 作者: S Sebastian Andrzej Siewior 提交者: Greg Kroah-Hartman

usb/xhci: ignore xhci version while checking for the link quirk

instead of reading the xhci interface version each time _even_ if the
quirk is not required, simply check if the quirk flag is set. This flag
is only set of the module parameter is set and here is where I moved the
version check to.
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 45e1892e
...@@ -316,7 +316,7 @@ int xhci_init(struct usb_hcd *hcd) ...@@ -316,7 +316,7 @@ int xhci_init(struct usb_hcd *hcd)
xhci_dbg(xhci, "xhci_init\n"); xhci_dbg(xhci, "xhci_init\n");
spin_lock_init(&xhci->lock); spin_lock_init(&xhci->lock);
if (link_quirk) { if (xhci->hci_version == 0x95 && link_quirk) {
xhci_dbg(xhci, "QUIRK: Not clearing Link TRB chain bits.\n"); xhci_dbg(xhci, "QUIRK: Not clearing Link TRB chain bits.\n");
xhci->quirks |= XHCI_LINK_TRB_QUIRK; xhci->quirks |= XHCI_LINK_TRB_QUIRK;
} else { } else {
......
...@@ -1526,9 +1526,7 @@ static inline void xhci_write_64(struct xhci_hcd *xhci, ...@@ -1526,9 +1526,7 @@ static inline void xhci_write_64(struct xhci_hcd *xhci,
static inline int xhci_link_trb_quirk(struct xhci_hcd *xhci) static inline int xhci_link_trb_quirk(struct xhci_hcd *xhci)
{ {
u32 temp = xhci_readl(xhci, &xhci->cap_regs->hc_capbase); return xhci->quirks & XHCI_LINK_TRB_QUIRK;
return ((HC_VERSION(temp) == 0x95) &&
(xhci->quirks & XHCI_LINK_TRB_QUIRK));
} }
/* xHCI debugging */ /* xHCI debugging */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册