diff options
Diffstat (limited to 'src/drivers/net')
| -rw-r--r-- | src/drivers/net/phantom/phantom.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/drivers/net/phantom/phantom.c b/src/drivers/net/phantom/phantom.c index 38b66743c..781049ff4 100644 --- a/src/drivers/net/phantom/phantom.c +++ b/src/drivers/net/phantom/phantom.c @@ -2060,6 +2060,7 @@ static int phantom_probe ( struct pci_device *pci ) { struct net_device *netdev; struct phantom_nic *phantom; struct settings *parent_settings; + unsigned int busdevfn; int rc; /* Allocate Phantom device */ @@ -2090,19 +2091,20 @@ static int phantom_probe ( struct pci_device *pci ) { * B2 will have this fixed; remove this hack when B1 is no * longer in use. */ - if ( PCI_FUNC ( pci->busdevfn ) == 0 ) { + busdevfn = pci->busdevfn; + if ( PCI_FUNC ( busdevfn ) == 0 ) { unsigned int i; for ( i = 0 ; i < 8 ; i++ ) { uint32_t temp; pci->busdevfn = - PCI_BUSDEVFN ( PCI_BUS ( pci->busdevfn ), - PCI_SLOT ( pci->busdevfn ), i ); + PCI_BUSDEVFN ( PCI_SEG ( busdevfn ), + PCI_BUS ( busdevfn ), + PCI_SLOT ( busdevfn ), i ); pci_read_config_dword ( pci, 0xc8, &temp ); pci_read_config_dword ( pci, 0xc8, &temp ); pci_write_config_dword ( pci, 0xc8, 0xf1000 ); } - pci->busdevfn = PCI_BUSDEVFN ( PCI_BUS ( pci->busdevfn ), - PCI_SLOT ( pci->busdevfn ), 0 ); + pci->busdevfn = busdevfn; } /* Initialise the command PEG */ |
