diff options
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r-- | drivers/net/e100.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 91ef5f2fd768..47d970896a5c 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | 3 | ||
4 | Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved. | 4 | Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms of the GNU General Public License as published by the Free | 7 | under the terms of the GNU General Public License as published by the Free |
@@ -158,10 +158,10 @@ | |||
158 | 158 | ||
159 | 159 | ||
160 | #define DRV_NAME "e100" | 160 | #define DRV_NAME "e100" |
161 | #define DRV_EXT "-NAPI" | 161 | #define DRV_EXT "-NAPI" |
162 | #define DRV_VERSION "3.5.10-k2"DRV_EXT | 162 | #define DRV_VERSION "3.5.16-k2"DRV_EXT |
163 | #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" | 163 | #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" |
164 | #define DRV_COPYRIGHT "Copyright(c) 1999-2005 Intel Corporation" | 164 | #define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation" |
165 | #define PFX DRV_NAME ": " | 165 | #define PFX DRV_NAME ": " |
166 | 166 | ||
167 | #define E100_WATCHDOG_PERIOD (2 * HZ) | 167 | #define E100_WATCHDOG_PERIOD (2 * HZ) |
@@ -173,8 +173,11 @@ MODULE_LICENSE("GPL"); | |||
173 | MODULE_VERSION(DRV_VERSION); | 173 | MODULE_VERSION(DRV_VERSION); |
174 | 174 | ||
175 | static int debug = 3; | 175 | static int debug = 3; |
176 | static int eeprom_bad_csum_allow = 0; | ||
176 | module_param(debug, int, 0); | 177 | module_param(debug, int, 0); |
178 | module_param(eeprom_bad_csum_allow, int, 0); | ||
177 | MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); | 179 | MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); |
180 | MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums"); | ||
178 | #define DPRINTK(nlevel, klevel, fmt, args...) \ | 181 | #define DPRINTK(nlevel, klevel, fmt, args...) \ |
179 | (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \ | 182 | (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \ |
180 | printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \ | 183 | printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \ |
@@ -756,7 +759,8 @@ static int e100_eeprom_load(struct nic *nic) | |||
756 | checksum = le16_to_cpu(0xBABA - checksum); | 759 | checksum = le16_to_cpu(0xBABA - checksum); |
757 | if(checksum != nic->eeprom[nic->eeprom_wc - 1]) { | 760 | if(checksum != nic->eeprom[nic->eeprom_wc - 1]) { |
758 | DPRINTK(PROBE, ERR, "EEPROM corrupted\n"); | 761 | DPRINTK(PROBE, ERR, "EEPROM corrupted\n"); |
759 | return -EAGAIN; | 762 | if (!eeprom_bad_csum_allow) |
763 | return -EAGAIN; | ||
760 | } | 764 | } |
761 | 765 | ||
762 | return 0; | 766 | return 0; |
@@ -1391,15 +1395,11 @@ static int e100_phy_init(struct nic *nic) | |||
1391 | } | 1395 | } |
1392 | 1396 | ||
1393 | if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) && | 1397 | if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) && |
1394 | (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000))) { | 1398 | (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) && |
1395 | /* enable/disable MDI/MDI-X auto-switching. | 1399 | !(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) { |
1396 | MDI/MDI-X auto-switching is disabled for 82551ER/QM chips */ | 1400 | /* enable/disable MDI/MDI-X auto-switching. */ |
1397 | if((nic->mac == mac_82551_E) || (nic->mac == mac_82551_F) || | 1401 | mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, |
1398 | (nic->mac == mac_82551_10) || (nic->mii.force_media) || | 1402 | nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH); |
1399 | !(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled)) | ||
1400 | mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, 0); | ||
1401 | else | ||
1402 | mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, NCONFIG_AUTO_SWITCH); | ||
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | return 0; | 1405 | return 0; |
@@ -1763,11 +1763,10 @@ static inline void e100_start_receiver(struct nic *nic, struct rx *rx) | |||
1763 | #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) | 1763 | #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) |
1764 | static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) | 1764 | static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) |
1765 | { | 1765 | { |
1766 | if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + NET_IP_ALIGN))) | 1766 | if(!(rx->skb = netdev_alloc_skb(nic->netdev, RFD_BUF_LEN + NET_IP_ALIGN))) |
1767 | return -ENOMEM; | 1767 | return -ENOMEM; |
1768 | 1768 | ||
1769 | /* Align, init, and map the RFD. */ | 1769 | /* Align, init, and map the RFD. */ |
1770 | rx->skb->dev = nic->netdev; | ||
1771 | skb_reserve(rx->skb, NET_IP_ALIGN); | 1770 | skb_reserve(rx->skb, NET_IP_ALIGN); |
1772 | memcpy(rx->skb->data, &nic->blank_rfd, sizeof(struct rfd)); | 1771 | memcpy(rx->skb->data, &nic->blank_rfd, sizeof(struct rfd)); |
1773 | rx->dma_addr = pci_map_single(nic->pdev, rx->skb->data, | 1772 | rx->dma_addr = pci_map_single(nic->pdev, rx->skb->data, |
@@ -2143,7 +2142,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) | |||
2143 | 2142 | ||
2144 | e100_start_receiver(nic, NULL); | 2143 | e100_start_receiver(nic, NULL); |
2145 | 2144 | ||
2146 | if(!(skb = dev_alloc_skb(ETH_DATA_LEN))) { | 2145 | if(!(skb = netdev_alloc_skb(nic->netdev, ETH_DATA_LEN))) { |
2147 | err = -ENOMEM; | 2146 | err = -ENOMEM; |
2148 | goto err_loopback_none; | 2147 | goto err_loopback_none; |
2149 | } | 2148 | } |
@@ -2795,6 +2794,7 @@ static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel | |||
2795 | /* Detach; put netif into state similar to hotplug unplug. */ | 2794 | /* Detach; put netif into state similar to hotplug unplug. */ |
2796 | netif_poll_enable(netdev); | 2795 | netif_poll_enable(netdev); |
2797 | netif_device_detach(netdev); | 2796 | netif_device_detach(netdev); |
2797 | pci_disable_device(pdev); | ||
2798 | 2798 | ||
2799 | /* Request a slot reset. */ | 2799 | /* Request a slot reset. */ |
2800 | return PCI_ERS_RESULT_NEED_RESET; | 2800 | return PCI_ERS_RESULT_NEED_RESET; |
@@ -2873,7 +2873,7 @@ static int __init e100_init_module(void) | |||
2873 | printk(KERN_INFO PFX "%s, %s\n", DRV_DESCRIPTION, DRV_VERSION); | 2873 | printk(KERN_INFO PFX "%s, %s\n", DRV_DESCRIPTION, DRV_VERSION); |
2874 | printk(KERN_INFO PFX "%s\n", DRV_COPYRIGHT); | 2874 | printk(KERN_INFO PFX "%s\n", DRV_COPYRIGHT); |
2875 | } | 2875 | } |
2876 | return pci_module_init(&e100_driver); | 2876 | return pci_register_driver(&e100_driver); |
2877 | } | 2877 | } |
2878 | 2878 | ||
2879 | static void __exit e100_cleanup_module(void) | 2879 | static void __exit e100_cleanup_module(void) |