mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
[xhci] Record device-specific quirks in xHCI device structure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -3197,6 +3197,7 @@ static int xhci_probe ( struct pci_device *pci ) {
|
|||||||
goto err_alloc;
|
goto err_alloc;
|
||||||
}
|
}
|
||||||
xhci->name = pci->dev.name;
|
xhci->name = pci->dev.name;
|
||||||
|
xhci->quirks = pci->id->driver_data;
|
||||||
|
|
||||||
/* Fix up PCI device */
|
/* Fix up PCI device */
|
||||||
adjust_pci_device ( pci );
|
adjust_pci_device ( pci );
|
||||||
@@ -3218,7 +3219,7 @@ static int xhci_probe ( struct pci_device *pci ) {
|
|||||||
xhci_legacy_claim ( xhci );
|
xhci_legacy_claim ( xhci );
|
||||||
|
|
||||||
/* Fix Intel PCH-specific quirks, if applicable */
|
/* Fix Intel PCH-specific quirks, if applicable */
|
||||||
if ( pci->id->driver_data & XHCI_PCH )
|
if ( xhci->quirks & XHCI_PCH )
|
||||||
xhci_pch_fix ( xhci, pci );
|
xhci_pch_fix ( xhci, pci );
|
||||||
|
|
||||||
/* Reset device */
|
/* Reset device */
|
||||||
@@ -3254,7 +3255,7 @@ static int xhci_probe ( struct pci_device *pci ) {
|
|||||||
err_alloc_bus:
|
err_alloc_bus:
|
||||||
xhci_reset ( xhci );
|
xhci_reset ( xhci );
|
||||||
err_reset:
|
err_reset:
|
||||||
if ( pci->id->driver_data & XHCI_PCH )
|
if ( xhci->quirks & XHCI_PCH )
|
||||||
xhci_pch_undo ( xhci, pci );
|
xhci_pch_undo ( xhci, pci );
|
||||||
xhci_legacy_release ( xhci );
|
xhci_legacy_release ( xhci );
|
||||||
iounmap ( xhci->regs );
|
iounmap ( xhci->regs );
|
||||||
@@ -3276,7 +3277,7 @@ static void xhci_remove ( struct pci_device *pci ) {
|
|||||||
unregister_usb_bus ( bus );
|
unregister_usb_bus ( bus );
|
||||||
free_usb_bus ( bus );
|
free_usb_bus ( bus );
|
||||||
xhci_reset ( xhci );
|
xhci_reset ( xhci );
|
||||||
if ( pci->id->driver_data & XHCI_PCH )
|
if ( xhci->quirks & XHCI_PCH )
|
||||||
xhci_pch_undo ( xhci, pci );
|
xhci_pch_undo ( xhci, pci );
|
||||||
xhci_legacy_release ( xhci );
|
xhci_legacy_release ( xhci );
|
||||||
iounmap ( xhci->regs );
|
iounmap ( xhci->regs );
|
||||||
|
|||||||
@@ -1038,6 +1038,8 @@ struct xhci_device {
|
|||||||
void *regs;
|
void *regs;
|
||||||
/** Name */
|
/** Name */
|
||||||
const char *name;
|
const char *name;
|
||||||
|
/** Quirks */
|
||||||
|
unsigned int quirks;
|
||||||
|
|
||||||
/** Capability registers */
|
/** Capability registers */
|
||||||
void *cap;
|
void *cap;
|
||||||
|
|||||||
Reference in New Issue
Block a user