]> Zhao Yanbai Git Server - minix.git/commitdiff
Add support for the 82567LM flavor of e1000
authorThomas Veerman <thomas@minix3.org>
Tue, 15 Mar 2011 10:04:35 +0000 (10:04 +0000)
committerThomas Veerman <thomas@minix3.org>
Tue, 15 Mar 2011 10:04:35 +0000 (10:04 +0000)
commands/netconf/netconf.sh
drivers/e1000/e1000.c
etc/system.conf

index 9606e64ce307bf97fa0c6066c19bdde55c378113..d6513deaada8455e04b35b11ae23cff6743c3d95 100644 (file)
@@ -111,7 +111,7 @@ cards()
     card 6 "NE2000, 3com 503 or WD based card (also emulated by Bochs)"
     card 7 "AMD LANCE (also emulated by VMWare and VirtualBox)" "1022:2000"
     card 8 "Intel PRO/1000 Gigabit"                                   \
-           "8086:100E" "8086:107C" "8086:10CD" "8086:10D3"
+           "8086:100E" "8086:107C" "8086:10CD" "8086:10D3" "8086:10DE"
        
     card 9 "Attansic/Atheros L2 FastEthernet" "1969:2048"
     card 10 "DEC Tulip 21140A in VirtualPC" "1011:0009"
index 976e7dd0bb98e000f3a5f2741283ba63dfd632ed..b7cb86b4225c1b9a86ec4f1847cfc5ad269e587e 100644 (file)
@@ -25,6 +25,7 @@ PRIVATE u16_t pcitab_e1000[] =
 {
     E1000_DEV_ID_82540EM,
     E1000_DEV_ID_82541GI_LF,
+    E1000_DEV_ID_ICH10_D_BM_LM,
     E1000_DEV_ID_ICH10_R_BM_LF,
     E1000_DEV_ID_82574L,
     0,
@@ -282,11 +283,12 @@ PRIVATE int e1000_probe(e1000_t *e, int skip)
      */
     switch (did)
     {
+        case E1000_DEV_ID_ICH10_D_BM_LM:
         case E1000_DEV_ID_ICH10_R_BM_LF:
             e->eeprom_read = eeprom_ich;
             break;
 
-       case E1000_DEV_ID_82574L:
+       case E1000_DEV_ID_82574L:
        case E1000_DEV_ID_82541GI_LF:
            e->eeprom_done_bit = (1 << 1);
            e->eeprom_addr_off =  2;
@@ -326,14 +328,24 @@ PRIVATE int e1000_probe(e1000_t *e, int skip)
        did != E1000_DEV_ID_82540EP &&
        pci_attr_r32(devind, PCI_BAR_2))
     {
-       if((e->flash = vm_map_phys(SELF,
-         (void *) pci_attr_r32(devind, PCI_BAR_2), 0x10000)) == MAP_FAILED) {
-               if((e->flash = vm_map_phys(SELF,
-                       (void *) pci_attr_r32(devind, PCI_BAR_2), 0x1000))
-                               == MAP_FAILED) {
-                               panic("e1000: couldn't map in flash.");
-               }
-       }
+        size_t flash_size;
+
+        /* 82566/82567/82562V series support mapping 4kB of flash memory */
+        switch(did)
+        {
+            case E1000_DEV_ID_ICH10_D_BM_LM:
+            case E1000_DEV_ID_ICH10_R_BM_LF:
+                flash_size = 0x1000;
+                break;
+            default:
+                flash_size = 0x10000;
+        }
+
+        if ((e->flash = vm_map_phys(SELF,
+                                    (void *) pci_attr_r32(devind, PCI_BAR_2),
+                                    flash_size)) == MAP_FAILED) {
+            panic("e1000: couldn't map in flash.");
+        }
 
        gfpreg = E1000_READ_FLASH_REG(e, ICH_FLASH_GFPREG);
         /*
index 466315d583d082dc2466bd299c2437bb68c92592..dc6d45409796209f44d102fe99319becf36443e0 100644 (file)
@@ -600,6 +600,7 @@ service e1000
        pci device      8086/107c;
        pci device      8086/10cd;
        pci device      8086/10d3;
+       pci device      8086/10de;
        ipc
                SYSTEM pm rs log tty ds vm
                pci inet ;