diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-06-18 15:05:54 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-06-18 15:05:54 +0100 |
commit | 323bf186fb9e0a273df23b5f803e1a0292527aad (patch) | |
tree | 6040e4b0477779bf7ea5b394558a1771e5ba72f3 /src/drivers | |
parent | 6b7157c233541a4cb3c90021e8ca219b0b5dd358 (diff) | |
download | ipxe-323bf186fb9e0a273df23b5f803e1a0292527aad.zip ipxe-323bf186fb9e0a273df23b5f803e1a0292527aad.tar.gz ipxe-323bf186fb9e0a273df23b5f803e1a0292527aad.tar.bz2 |
[xhci] Record device-specific quirks in xHCI device structure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/usb/xhci.c | 7 | ||||
-rw-r--r-- | src/drivers/usb/xhci.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/drivers/usb/xhci.c b/src/drivers/usb/xhci.c index fa49669..4f506db 100644 --- a/src/drivers/usb/xhci.c +++ b/src/drivers/usb/xhci.c @@ -3197,6 +3197,7 @@ static int xhci_probe ( struct pci_device *pci ) { goto err_alloc; } xhci->name = pci->dev.name; + xhci->quirks = pci->id->driver_data; /* Fix up PCI device */ adjust_pci_device ( pci ); @@ -3218,7 +3219,7 @@ static int xhci_probe ( struct pci_device *pci ) { xhci_legacy_claim ( xhci ); /* Fix Intel PCH-specific quirks, if applicable */ - if ( pci->id->driver_data & XHCI_PCH ) + if ( xhci->quirks & XHCI_PCH ) xhci_pch_fix ( xhci, pci ); /* Reset device */ @@ -3254,7 +3255,7 @@ static int xhci_probe ( struct pci_device *pci ) { err_alloc_bus: xhci_reset ( xhci ); err_reset: - if ( pci->id->driver_data & XHCI_PCH ) + if ( xhci->quirks & XHCI_PCH ) xhci_pch_undo ( xhci, pci ); xhci_legacy_release ( xhci ); iounmap ( xhci->regs ); @@ -3276,7 +3277,7 @@ static void xhci_remove ( struct pci_device *pci ) { unregister_usb_bus ( bus ); free_usb_bus ( bus ); xhci_reset ( xhci ); - if ( pci->id->driver_data & XHCI_PCH ) + if ( xhci->quirks & XHCI_PCH ) xhci_pch_undo ( xhci, pci ); xhci_legacy_release ( xhci ); iounmap ( xhci->regs ); diff --git a/src/drivers/usb/xhci.h b/src/drivers/usb/xhci.h index 078798a..e35ef51 100644 --- a/src/drivers/usb/xhci.h +++ b/src/drivers/usb/xhci.h @@ -1038,6 +1038,8 @@ struct xhci_device { void *regs; /** Name */ const char *name; + /** Quirks */ + unsigned int quirks; /** Capability registers */ void *cap; |