Re: Newer kernel for N4100?
Bill Gatliff wrote:
> I found in the .17 kernel where Thecus commented out the EEPROM checksum test in
> the e1000 driver, I'm going to do the same and see what happens. My first
> attempt caused the code to load all ff's for the MAC, which obviously isn't what
> I want.
... and this patch is sooooo bad, I hesitate to post it. But if I don't, I'll
lose it myself! :)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ad6da7b..9a2a65a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1064,6 +1064,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
/* before reading the EEPROM, reset the controller to
* put the device in a known good starting state */
+#if 0
e1000_reset_hw(hw);
/* make sure the EEPROM is good */
@@ -1080,10 +1081,21 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
*/
memset(hw->mac_addr, 0, netdev->addr_len);
} else {
/* copy the MAC address out of the EEPROM */
if (e1000_read_mac_addr(hw))
DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
}
+#else
+#warning "TODO: Figure out how to deal with EEPROM checksum on N4100"
+ static int mac_seed = 0x8a;
+ hw->mac_addr[0] = 0;
+ hw->mac_addr[1] = 0x14;
+ hw->mac_addr[2] = 0xfd;
+ hw->mac_addr[3] = 0x10;
+ hw->mac_addr[4] = 0x11;
+ hw->mac_addr[5] = mac_seed++;
+#endif
/* don't block initalization here due to bad MAC address */
memcpy(netdev->dev_addr, hw->mac_addr, netdev->addr_len);
memcpy(netdev->perm_addr, hw->mac_addr, netdev->addr_len);
b.g.
--
Bill Gatliff
bgat@billgatliff.com
Reply to: