]> git.hungrycats.org Git - linux/commitdiff
[e1000] misc cleanup
authorScott Feldman <scott.feldman@intel.com>
Mon, 7 Jul 2003 21:58:48 +0000 (17:58 -0400)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 7 Jul 2003 21:58:48 +0000 (17:58 -0400)
* whitespace cleanup
* removal of unused members of netdev priv struct
* extendable arrangement of h/w reset logic

drivers/net/e1000/e1000.h
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_main.c

index 8891f273269e5b636ba5eed3be1349fd054364e7..1908c7b08f384c03add1ee7a8a9ee8be8160111f 100644 (file)
@@ -224,6 +224,5 @@ struct e1000_adapter {
 
 
        uint32_t pci_state[16];
-       char ifname[IFNAMSIZ];
 };
 #endif /* _E1000_H_ */
index 0b220332e2ae8513cfbbb514a399c967509e59cc..efd366fbe84da293ac0f915f625086bcef7c3e47 100644 (file)
@@ -294,10 +294,20 @@ e1000_reset_hw(struct e1000_hw *hw)
        msec_delay(5);
     }
 
-    if(hw->mac_type > e1000_82543)
-        E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST));
-    else
-        E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST));
+    switch(hw->mac_type) {
+        case e1000_82544:
+        case e1000_82540:
+        case e1000_82545:
+        case e1000_82546:
+        case e1000_82541:
+            /* These controllers can't ack the 64-bit write when issuing the
+             * reset, so use IO-mapping as a workaround to issue the reset */
+            E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST));
+            break;
+        default:
+            E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST));
+            break;
+    }
 
     /* Force a reload from the EEPROM if necessary */
     if(hw->mac_type < e1000_82540) {
@@ -722,7 +732,8 @@ e1000_setup_fiber_link(struct e1000_hw *hw)
 static int32_t
 e1000_setup_copper_link(struct e1000_hw *hw)
 {
-    uint32_t ctrl, led_ctrl;
+    uint32_t ctrl;
+    uint32_t led_ctrl;
     int32_t ret_val;
     uint16_t i;
     uint16_t phy_data;
@@ -2284,7 +2295,8 @@ e1000_write_phy_reg(struct e1000_hw *hw,
 void
 e1000_phy_hw_reset(struct e1000_hw *hw)
 {
-    uint32_t ctrl, ctrl_ext, led_ctrl;
+    uint32_t ctrl, ctrl_ext;
+    uint32_t led_ctrl;
 
     DEBUGFUNC("e1000_phy_hw_reset");
 
index 390795a115c13406c4e6c018551cceb2ed251f1a..8f734f3cb9b55e32a4e2c0a2ed6fd173f6294276 100644 (file)
 
 /* Change Log
  *
+ * 5.1.13      5/28/03
+ *   o Bug fix: request_irq() failure resulted in freeing resources twice!
+ *     [Don Fry (brazilnut@us.ibm.com)]
+ *   o Bug fix: fix VLAN support on ppc64 [Mark Rakes (mrakes@vivato.net)]
+ *   o Bug fix: missing Tx cleanup opportunities during interrupt handling.
+ *   o Bug fix: alloc_etherdev failure didn't cleanup regions in probe.
+ *   o Cleanup: s/int/unsigned int/ for descriptor ring indexes.
+ *   
  * 5.1.11      5/6/03
  *   o Feature: Added support for 82546EB (Quad-port) hardware.
  *   o Feature: Added support for Diagnostics through Ethtool.
  *   o Bug fix: TSO bug fixes.
  *
  * 5.0.42      3/5/03
- *   o Feature: Added support for 82541 and 82547 hardware.
- *   o Feature: Added support for Intel Gigabit PHY (IGP) and a variety of
- *   eeproms.
- *   o Feature: Added support for TCP Segmentation Offload (TSO).
- *   o Feature: Added MII ioctl.
- *   o Feature: Added support for statistics reporting through ethtool.
- *   o Cleanup: Removed proprietary hooks for ANS.
- *   o Cleanup: Miscellaneous code changes to improve CPU utilization.
- *     - Replaced "%" with conditionals and "+-" operators.
- *     - Implemented dynamic Interrupt Throttle Rate (ITR).
- *     - Reduced expensive PCI reads of ICR in interrupt.
- *   o Bug fix: Request IRQ after descriptor ring setup to avoid panic in
- *   shared interrupt instances.
- *
- * 4.4.18       11/27/02
  */
 
 char e1000_driver_name[] = "e1000";
 char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
-char e1000_driver_version[] = "5.1.11-k1";
+char e1000_driver_version[] = "5.1.13-k1";
 char e1000_copyright[] = "Copyright (c) 1999-2003 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
@@ -128,6 +121,7 @@ static void e1000_update_stats(struct e1000_adapter *adapter);
 static inline void e1000_irq_disable(struct e1000_adapter *adapter);
 static inline void e1000_irq_enable(struct e1000_adapter *adapter);
 static irqreturn_t e1000_intr(int irq, void *data, struct pt_regs *regs);
+static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter);
 #ifdef CONFIG_E1000_NAPI
 static int e1000_clean(struct net_device *netdev, int *budget);
 static boolean_t e1000_clean_rx_irq(struct e1000_adapter *adapter,
@@ -135,7 +129,6 @@ static boolean_t e1000_clean_rx_irq(struct e1000_adapter *adapter,
 #else
 static boolean_t e1000_clean_rx_irq(struct e1000_adapter *adapter);
 #endif
-static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter);
 static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter);
 static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
 static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr,