xhci: Allow more than 32 quirks
Greg Kroah-Hartman
maintainerPATCH 1/3 xhci: Allow more than 32 quirks
Quoted 40 lines · Marc Zyngier
We now have 32 different quirks, and the field that holds them is full. Let's bump it up to the next stage so that we can handle some more... The type is now an unsigned long long, which is 64bit on most architectures.
Signed-off-by Marc Zyngier <[email protected]>--- drivers/usb/host/xhci.c | 6 +++--- drivers/usb/host/xhci.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/usb/host/xhci.c +3
-3@@ -33,8 +33,8 @@ static int link_quirk;module_param (link_quirk, int,S_IRUGO |S_IWUSR );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 ); +static unsigned long long quirks; +module_param (quirks, ullong,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? */ @@ -4963,7 +4963,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)return retval;xhci_dbg (xhci,"Called HCD init\n" ); -xhci_info (xhci,"hcc params 0x%08x hci version 0x%x quirks 0x%08x\n" , +xhci_info (xhci,"hcc params 0x%08x hci version 0x%x quirks 0x%016llx\n" , xhci->hcc_params, xhci->hci_version, xhci->quirks);return 0 ;drivers/usb/host/xhci.h +0
-0
drivers/usb/host/xhci.h struct xhci_hcd { · line 1790
Quoted 5 lines
drivers/usb/host/xhci.h +1
-1@@ -1787,7 +1787,7 @@ struct xhci_hcd {#define XHCI_STATE_DYING (1 << 0)#define XHCI_STATE_HALTED (1 << 1)#define XHCI_STATE_REMOVING (1 << 2) -unsigned int quirks; +unsigned long long quirks;
u64?
drivers/usb/host/xhci.h struct xhci_hcd { · line 1793
Quoted 3 lines
drivers/usb/host/xhci.h +0
-0#define XHCI_LINK_TRB_QUIRK (1 << 0)#define XHCI_RESET_EP_QUIRK (1 << 1)#define XHCI_NEC_HOST (1 << 2)
And these all can use BIT(), right?
thanks,
greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html