瀏覽代碼

xhci: Add quirks module option

It makes easier for debugging some hardware specific issues.

Note that this option won't override the value to be set.  That is,
you can turn quirks on by this option but cannot turn them off if set
by the driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Takashi Iwai 11 年之前
父節點
當前提交
4e6a1ee72b
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/usb/host/xhci.c

+ 6 - 0
drivers/usb/host/xhci.c

@@ -40,6 +40,10 @@ static int link_quirk;
 module_param(link_quirk, int, S_IRUGO | S_IWUSR);
 module_param(link_quirk, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(link_quirk, "Don't clear the chain bit on a link TRB");
 MODULE_PARM_DESC(link_quirk, "Don't clear the chain bit on a link TRB");
 
 
+static unsigned int quirks;
+module_param(quirks, uint, S_IRUGO);
+MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default");
+
 /* TODO: copied from ehci-hcd.c - can this be refactored? */
 /* TODO: copied from ehci-hcd.c - can this be refactored? */
 /*
 /*
  * xhci_handshake - spin reading hc until handshake completes or fails
  * xhci_handshake - spin reading hc until handshake completes or fails
@@ -4770,6 +4774,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 	xhci->hcc_params = readl(&xhci->cap_regs->hcc_params);
 	xhci->hcc_params = readl(&xhci->cap_regs->hcc_params);
 	xhci_print_registers(xhci);
 	xhci_print_registers(xhci);
 
 
+	xhci->quirks = quirks;
+
 	get_quirks(dev, xhci);
 	get_quirks(dev, xhci);
 
 
 	/* In xhci controllers which follow xhci 1.0 spec gives a spurious
 	/* In xhci controllers which follow xhci 1.0 spec gives a spurious