diff options
| author | Marty Connor | 2008-12-05 15:42:46 +0100 |
|---|---|---|
| committer | Michael Brown | 2008-12-05 17:35:33 +0100 |
| commit | 1206999288fef8d3b9af7bf8010949a61a3613e5 (patch) | |
| tree | 8d61e30ac5c2c6bcef0487ed0d8dc5ea04f915b5 /src | |
| parent | [x86_64] Add support for compilation as an x86_64 binary (diff) | |
| download | ipxe-1206999288fef8d3b9af7bf8010949a61a3613e5.tar.gz ipxe-1206999288fef8d3b9af7bf8010949a61a3613e5.tar.xz ipxe-1206999288fef8d3b9af7bf8010949a61a3613e5.zip | |
[e1000] Use PCI_BASE_ADDRESS_* symbols instead of integers
When compiling for the Linux kernel, PCI_BASE_ADDRESS_0 == 0, and
PCI_BASE_ADDRESS_1 == 1. This is not so when compiling for gPXE. We
must use the symbolic names rather than integers to get the correct
values.
Bug identified and patch supplied by:
George Chou <george.chou@advantech.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/net/e1000/e1000.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/net/e1000/e1000.c b/src/drivers/net/e1000/e1000.c index c4f35c1a8..c1a4a52d8 100644 --- a/src/drivers/net/e1000/e1000.c +++ b/src/drivers/net/e1000/e1000.c @@ -818,8 +818,8 @@ e1000_probe ( struct pci_device *pdev, * because it depends on mac_type */ if ( ( adapter->hw.mac_type == e1000_ich8lan ) && ( pdev->ioaddr ) ) { - flash_start = pci_bar_start ( pdev, 1 ); - flash_len = pci_bar_size ( pdev, 1 ); + flash_start = pci_bar_start ( pdev, PCI_BASE_ADDRESS_1 ); + flash_len = pci_bar_size ( pdev, PCI_BASE_ADDRESS_1 ); adapter->hw.flash_address = ioremap ( flash_start, flash_len ); if ( ! adapter->hw.flash_address ) goto err_flashmap; |
