Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
Marty Connor authored and Michael Brown committed Dec 5, 2008
1 parent ce0a0cc commit 1206999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/net/e1000/e1000.c
Expand Up @@ -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;
Expand Down

0 comments on commit 1206999

Please sign in to comment.