aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2007-10-31 18:22:10 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:03:44 -0500
commit3957d63da0067ad6a7dc8261b7eeb824f9dc42b4 (patch)
tree6566a29315969cb531f204d3a5c4ebcb8a1fc311 /drivers/net/ixgbe/ixgbe_main.c
parent040babf9d84e7010c457e9ce69e9eb1c27927c9e (diff)
ixgbe: Fix copper PHY initialization code
While cleaning up the internal API focussing on Fiber and CX4 code we found that I had broken the copper PHY initialization code. This patch restores the PHY-specific code. This is mostly uninteresting since no copper PHY boards are yet available. The changes have been tested against Fiber only as I do not even have copper PHY versions of 82598 macs. This change actually cleans up the API code a bit more and we lose some initialization code. A few PHY link detection helper lines of code have been snuck into this patch, as well as a read flush where it was suspected that this might cause issues. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 88341bfb5634..28c0fac1feed 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -54,9 +54,7 @@ static const char ixgbe_copyright[] =
54 "Copyright (c) 1999-2007 Intel Corporation."; 54 "Copyright (c) 1999-2007 Intel Corporation.";
55 55
56static const struct ixgbe_info *ixgbe_info_tbl[] = { 56static const struct ixgbe_info *ixgbe_info_tbl[] = {
57 [board_82598AF] = &ixgbe_82598AF_info, 57 [board_82598] = &ixgbe_82598_info,
58 [board_82598EB] = &ixgbe_82598EB_info,
59 [board_82598AT] = &ixgbe_82598AT_info,
60}; 58};
61 59
62/* ixgbe_pci_tbl - PCI Device ID Table 60/* ixgbe_pci_tbl - PCI Device ID Table
@@ -69,13 +67,13 @@ static const struct ixgbe_info *ixgbe_info_tbl[] = {
69 */ 67 */
70static struct pci_device_id ixgbe_pci_tbl[] = { 68static struct pci_device_id ixgbe_pci_tbl[] = {
71 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT), 69 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT),
72 board_82598AF }, 70 board_82598 },
73 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT), 71 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT),
74 board_82598AF }, 72 board_82598 },
75 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT_DUAL_PORT), 73 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AT_DUAL_PORT),
76 board_82598AT }, 74 board_82598 },
77 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), 75 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4),
78 board_82598EB }, 76 board_82598 },
79 77
80 /* required last entry */ 78 /* required last entry */
81 {0, } 79 {0, }
@@ -1570,8 +1568,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
1570 dev_err(&pdev->dev, "HW Init failed\n"); 1568 dev_err(&pdev->dev, "HW Init failed\n");
1571 return -EIO; 1569 return -EIO;
1572 } 1570 }
1573 if (hw->phy.ops.setup_speed(hw, IXGBE_LINK_SPEED_10GB_FULL, true, 1571 if (hw->mac.ops.setup_link_speed(hw, IXGBE_LINK_SPEED_10GB_FULL, true,
1574 false)) { 1572 false)) {
1575 dev_err(&pdev->dev, "Link Speed setup failed\n"); 1573 dev_err(&pdev->dev, "Link Speed setup failed\n");
1576 return -EIO; 1574 return -EIO;
1577 } 1575 }
@@ -2038,7 +2036,7 @@ static void ixgbe_watchdog(unsigned long data)
2038 bool link_up; 2036 bool link_up;
2039 u32 link_speed = 0; 2037 u32 link_speed = 0;
2040 2038
2041 adapter->hw.phy.ops.check(&adapter->hw, &(link_speed), &link_up); 2039 adapter->hw.mac.ops.check_link(&adapter->hw, &(link_speed), &link_up);
2042 2040
2043 if (link_up) { 2041 if (link_up) {
2044 if (!netif_carrier_ok(netdev)) { 2042 if (!netif_carrier_ok(netdev)) {
@@ -2606,7 +2604,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
2606 2604
2607 /* Setup hw api */ 2605 /* Setup hw api */
2608 memcpy(&hw->mac.ops, ii->mac_ops, sizeof(hw->mac.ops)); 2606 memcpy(&hw->mac.ops, ii->mac_ops, sizeof(hw->mac.ops));
2609 memcpy(&hw->phy.ops, ii->phy_ops, sizeof(hw->phy.ops));
2610 2607
2611 err = ii->get_invariants(hw); 2608 err = ii->get_invariants(hw);
2612 if (err) 2609 if (err)