Browse Source

[undi] Ensure that native drivers are tried before the UNDI PCI driver

Suggested-by: Alessandro Salvatori <sandr8@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
a05b89ef45
2 changed files with 4 additions and 1 deletions
  1. 1
    1
      src/arch/i386/drivers/net/undi.c
  2. 3
    0
      src/include/ipxe/pci.h

+ 1
- 1
src/arch/i386/drivers/net/undi.c View File

140
 PCI_ROM ( 0xffff, 0xffff, "undipci", "UNDI (PCI)", 0 ),
140
 PCI_ROM ( 0xffff, 0xffff, "undipci", "UNDI (PCI)", 0 ),
141
 };
141
 };
142
 
142
 
143
-struct pci_driver undipci_driver __pci_driver = {
143
+struct pci_driver undipci_driver __pci_driver_fallback = {
144
 	.ids = undipci_nics,
144
 	.ids = undipci_nics,
145
 	.id_count = ( sizeof ( undipci_nics ) / sizeof ( undipci_nics[0] ) ),
145
 	.id_count = ( sizeof ( undipci_nics ) / sizeof ( undipci_nics[0] ) ),
146
 	.probe = undipci_probe,
146
 	.probe = undipci_probe,

+ 3
- 0
src/include/ipxe/pci.h View File

343
 /** Declare a PCI driver */
343
 /** Declare a PCI driver */
344
 #define __pci_driver __table_entry ( PCI_DRIVERS, 01 )
344
 #define __pci_driver __table_entry ( PCI_DRIVERS, 01 )
345
 
345
 
346
+/** Declare a fallback PCI driver */
347
+#define __pci_driver_fallback __table_entry ( PCI_DRIVERS, 02 )
348
+
346
 #define PCI_BUS( busdevfn )		( ( (busdevfn) >> 8 ) & 0xff )
349
 #define PCI_BUS( busdevfn )		( ( (busdevfn) >> 8 ) & 0xff )
347
 #define PCI_SLOT( busdevfn )		( ( (busdevfn) >> 3 ) & 0x1f )
350
 #define PCI_SLOT( busdevfn )		( ( (busdevfn) >> 3 ) & 0x1f )
348
 #define PCI_FUNC( busdevfn )		( ( (busdevfn) >> 0 ) & 0x07 )
351
 #define PCI_FUNC( busdevfn )		( ( (busdevfn) >> 0 ) & 0x07 )

Loading…
Cancel
Save