Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
mcb30 committed Nov 11, 2011
1 parent be90241 commit a05b89e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/i386/drivers/net/undi.c
Expand Up @@ -140,7 +140,7 @@ static struct pci_device_id undipci_nics[] = {
PCI_ROM ( 0xffff, 0xffff, "undipci", "UNDI (PCI)", 0 ),
};

struct pci_driver undipci_driver __pci_driver = {
struct pci_driver undipci_driver __pci_driver_fallback = {
.ids = undipci_nics,
.id_count = ( sizeof ( undipci_nics ) / sizeof ( undipci_nics[0] ) ),
.probe = undipci_probe,
Expand Down
3 changes: 3 additions & 0 deletions src/include/ipxe/pci.h
Expand Up @@ -343,6 +343,9 @@ struct pci_driver {
/** Declare a PCI driver */
#define __pci_driver __table_entry ( PCI_DRIVERS, 01 )

/** Declare a fallback PCI driver */
#define __pci_driver_fallback __table_entry ( PCI_DRIVERS, 02 )

#define PCI_BUS( busdevfn ) ( ( (busdevfn) >> 8 ) & 0xff )
#define PCI_SLOT( busdevfn ) ( ( (busdevfn) >> 3 ) & 0x1f )
#define PCI_FUNC( busdevfn ) ( ( (busdevfn) >> 0 ) & 0x07 )
Expand Down

0 comments on commit a05b89e

Please sign in to comment.