[ipxe-devel] e1000e/8086:1502 not working?

Levente LEVAI levail at aviatronic.hu
Sun Dec 18 20:03:02 UTC 2011


On 2011-12-16 20:22, Michael Brown wrote:
> On Monday 12 Dec 2011 17:52:56 Levente LEVAI wrote:
>> After a false start with the 82571 flavor I have checked kernel driver
>> code and
>> it turned out that pid 1502 is the new variant of the pch controller
>> (found in
>> e1000e_ich8lan.c in the ipxe driver) used in new intel family 6 mobile
>> chipsets.
>> I have more or less dumbly copied the info section from kernel code.
>> At first sight it seems to work (the driver initialized the controller
>> and I was able
>> to get an ip address via dhcp) but I need to do further testing (e.g.
>> boot over iscsi).
> Fantastic!  Could you submit a patch, so that we can get support for this
> merged into iPXE?
>
> Thanks,
>
> Michael
I do not know the exact policy of posting patches plus I'm a novice to git.
I have pasted below the diff to the stock e1000e driver.

I did not have the time to check this stuff since my last post and there 
are a
number of places in the linux code where 1502 is treated separately. I have
checked and included only two of these so I suggest you wait bit before
you merge. I hope I will have time for proper testing after Christmas. I 
also
would like to see if I can get hold of a unit with a 1503 controller 
(from the
data sheet 1502 and 1503 are pretty much the same thing but I'm doubter
by habit).

In the mean time I have come across two other cases:
-atheros atl1c seems to have no driver support (atl1e has but from
  the linux code it seems to me that atl1c is something different).
  Is there any chance of getting atl1c support?
-I have come across a realtek controller (I do not have the exact pci 
ids now)
  that should be supported according to its pci id (actually a different 
card with
  the same controller works) but the driver initialization fails (the 
mac address
  is definitely wrong, it is all 0-s). Can that be nvm problem?



Levente

--------------------------

diff --git a/src/drivers/net/e1000e/e1000e.h 
b/src/drivers/net/e1000e/e1000e.h
index bc8e7b0..e2fcda7 100644
--- a/src/drivers/net/e1000e/e1000e.h
+++ b/src/drivers/net/e1000e/e1000e.h
@@ -143,6 +143,7 @@ enum e1000_boards {
      board_ich9lan,
      board_ich10lan,
      board_pchlan,
+    board_pch2lan,
      board_82583,
  };

diff --git a/src/drivers/net/e1000e/e1000e_hw.h 
b/src/drivers/net/e1000e/e1000e_hw.h
index 03ed35c..eb45f91 100644
--- a/src/drivers/net/e1000e/e1000e_hw.h
+++ b/src/drivers/net/e1000e/e1000e_hw.h
@@ -109,6 +109,7 @@ enum e1000_mac_type {
      e1000_ich9lan,
      e1000_ich10lan,
      e1000_pchlan,
+    e1000_pch2lan,
      e1000_num_macs  /* List is 1-based, so subtract 1 for true count. */
  };

diff --git a/src/drivers/net/e1000e/e1000e_ich8lan.c 
b/src/drivers/net/e1000e/e1000e_ich8lan.c
index 7b9a49b..a17adf1 100644
--- a/src/drivers/net/e1000e/e1000e_ich8lan.c
+++ b/src/drivers/net/e1000e/e1000e_ich8lan.c
@@ -3434,6 +3434,7 @@ static struct pci_device_id e1000e_ich8lan_nics[] = {
       PCI_ROM(0x8086, 0x10EB, "E1000_DEV_ID_PCH_M_HV_LC", 
"E1000_DEV_ID_PCH_M_HV_LC", board_pchlan),
       PCI_ROM(0x8086, 0x10EF, "E1000_DEV_ID_PCH_D_HV_DM", 
"E1000_DEV_ID_PCH_D_HV_DM", board_pchlan),
       PCI_ROM(0x8086, 0x10F0, "E1000_DEV_ID_PCH_D_HV_DC", 
"E1000_DEV_ID_PCH_D_HV_DC", board_pchlan),
+     PCI_ROM(0x8086, 0x1502, "E1000_DEV_ID_PCH2_LV_LM", 
"E1000_DEV_ID_PCH2_LV_LM", board_pch2lan),
  };

  struct pci_driver e1000e_ich8lan_driver __pci_driver = {
diff --git a/src/drivers/net/e1000e/e1000e_main.c 
b/src/drivers/net/e1000e/e1000e_main.c
index 352e3c4..2b91e4d 100644
--- a/src/drivers/net/e1000e/e1000e_main.c
+++ b/src/drivers/net/e1000e/e1000e_main.c
@@ -279,6 +279,32 @@ static struct e1000_info e1000_pch_info = {
      .get_variants        = e1000e_get_variants_ich8lan,
  };

+/* comes from 2.6.39.4 ich8lan.c */
+static struct e1000_info e1000_pch2_info = {
+        .mac                    = e1000_pch2lan,
+        .flags                  = FLAG_IS_ICH
+                                  | FLAG_HAS_WOL
+                                  | FLAG_RX_CSUM_ENABLED
+                                  | FLAG_HAS_CTRLEXT_ON_LOAD
+                                  | FLAG_HAS_AMT
+                                  | FLAG_HAS_FLASH
+                                  | FLAG_HAS_JUMBO_FRAMES
+                                  | FLAG_APME_IN_WUC,
+/* omitted by analogy, it does not seem to be set in these structs
+        .flags2                 = FLAG2_HAS_PHY_STATS
+                                  | FLAG2_HAS_EEE, */
+        .pba                    = 26,
+        .max_hw_frame_size      = DEFAULT_JUMBO,
+/* comes from above */
+    .init_ops        = e1000e_init_function_pointers_ich8lan,
+    .get_variants        = e1000e_get_variants_ich8lan,
+/* instead of the original below
+        .get_variants           = e1000_get_variants_ich8lan,
+        .mac_ops                = &ich8_mac_ops,
+        .phy_ops                = &ich8_phy_ops,
+        .nvm_ops                = &ich8_nvm_ops,
+        */
+};
  static const struct e1000_info *e1000_info_tbl[] = {
      [board_82571]        = &e1000_82571_info,
      [board_82572]        = &e1000_82572_info,
@@ -290,6 +316,7 @@ static const struct e1000_info *e1000_info_tbl[] = {
      [board_ich9lan]        = &e1000_ich9_info,
      [board_ich10lan]    = &e1000_ich10_info,
      [board_pchlan]        = &e1000_pch_info,
+    [board_pch2lan]        = &e1000_pch2_info,
  };

  /* Low-level support routines */
diff --git a/src/drivers/net/e1000e/e1000e_phy.c 
b/src/drivers/net/e1000e/e1000e_phy.c
index 337be73..2bcc2e3 100644
--- a/src/drivers/net/e1000e/e1000e_phy.c
+++ b/src/drivers/net/e1000e/e1000e_phy.c
@@ -213,6 +213,15 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, 
u32 offset, u16 *data)
      }
      *data = (u16) mdic;

+/* comes from 2.6.39.4 phy.c */
+        /*
+         * Allow some time after each MDIC transaction to avoid
+         * reading duplicate data in the next MDIC transaction.
+         */
+        if (hw->mac.type == e1000_pch2lan)
+                udelay(100);
+
+
  out:
      return ret_val;
  }
@@ -265,6 +274,13 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, 
u32 offset, u16 data)
          goto out;
      }

+/* comes from 2.6.39.4 phy.c */
+        /*
+         * Allow some time after each MDIC transaction to avoid
+         * reading duplicate data in the next MDIC transaction.
+         */
+        if (hw->mac.type == e1000_pch2lan)
+                udelay(100);
  out:
      return ret_val;
  }





More information about the ipxe-devel mailing list