Browse Source

xhci: Print hcc params, version and quirks on init

To help debugging xhci problems.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hans de Goede 10 years ago
parent
commit
99705092a8
2 changed files with 6 additions and 0 deletions
  1. 4 0
      drivers/usb/host/xhci.c
  2. 2 0
      drivers/usb/host/xhci.h

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

@@ -4904,6 +4904,10 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 	if (retval)
 	if (retval)
 		goto error;
 		goto error;
 	xhci_dbg(xhci, "Called HCD init\n");
 	xhci_dbg(xhci, "Called HCD init\n");
+
+	xhci_info(xhci, "hcc params 0x%08x hci version 0x%x quirks 0x%08x\n",
+		  xhci->hcc_params, xhci->hci_version, xhci->quirks);
+
 	return 0;
 	return 0;
 error:
 error:
 	kfree(xhci);
 	kfree(xhci);

+ 2 - 0
drivers/usb/host/xhci.h

@@ -1605,6 +1605,8 @@ static inline struct usb_hcd *xhci_to_hcd(struct xhci_hcd *xhci)
 	dev_warn(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
 	dev_warn(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
 #define xhci_warn_ratelimited(xhci, fmt, args...) \
 #define xhci_warn_ratelimited(xhci, fmt, args...) \
 	dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
 	dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
+#define xhci_info(xhci, fmt, args...) \
+	dev_info(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
 
 
 /*
 /*
  * Registers should always be accessed with double word or quad word accesses.
  * Registers should always be accessed with double word or quad word accesses.