Kaynağa Gözat

[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>
tags/v0.9.7
Marty Connor 16 yıl önce
ebeveyn
işleme
1206999288
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2
    2
      src/drivers/net/e1000/e1000.c

+ 2
- 2
src/drivers/net/e1000/e1000.c Dosyayı Görüntüle

@@ -818,8 +818,8 @@ e1000_probe ( struct pci_device *pdev,
818 818
 	 * because it depends on mac_type 
819 819
 	 */
820 820
 	if ( ( adapter->hw.mac_type == e1000_ich8lan ) && ( pdev->ioaddr ) ) {
821
-		flash_start = pci_bar_start ( pdev, 1 );
822
-		flash_len = pci_bar_size ( pdev, 1 );
821
+		flash_start = pci_bar_start ( pdev, PCI_BASE_ADDRESS_1 );
822
+		flash_len = pci_bar_size ( pdev, PCI_BASE_ADDRESS_1 );
823 823
 		adapter->hw.flash_address = ioremap ( flash_start, flash_len );
824 824
 		if ( ! adapter->hw.flash_address )
825 825
 			goto err_flashmap;

Loading…
İptal
Kaydet