]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
igb: Fix panic with NICs with 1000BASE-SX PHY
authorBill Hayes <bill.hayes@hp.com>
Tue, 19 Feb 2008 18:24:41 +0000 (10:24 -0800)
committerJeff Garzik <jeff@garzik.org>
Sun, 24 Feb 2008 04:57:49 +0000 (23:57 -0500)
This patch eliminates a kernel panic with the igb driver in 2.6.25-rc2 when
running on a Intel 82575 Ethernet controller with a 1000BASE-SX PHY.  The
panic does not happen with the 1000BASE-T PHY, only with a SX connection.

Signed-off-by: Bill Hayes <bill.hayes@hp.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/igb/igb_main.c

index 3480cc72467a2b4f87312e64d11c0106c37ed2b4..6a1f23092099b5d3f0d974b7ea370a9a73c63b31 100644 (file)
@@ -816,7 +816,8 @@ void igb_reset(struct igb_adapter *adapter)
        wr32(E1000_VET, ETHERNET_IEEE_VLAN_TYPE);
 
        igb_reset_adaptive(&adapter->hw);
-       adapter->hw.phy.ops.get_phy_info(&adapter->hw);
+       if (adapter->hw.phy.ops.get_phy_info)
+               adapter->hw.phy.ops.get_phy_info(&adapter->hw);
 }
 
 /**
@@ -2052,7 +2053,8 @@ static void igb_set_multi(struct net_device *netdev)
 static void igb_update_phy_info(unsigned long data)
 {
        struct igb_adapter *adapter = (struct igb_adapter *) data;
-       adapter->hw.phy.ops.get_phy_info(&adapter->hw);
+       if (adapter->hw.phy.ops.get_phy_info)
+               adapter->hw.phy.ops.get_phy_info(&adapter->hw);
 }
 
 /**