diff options
-rw-r--r-- | drivers/net/ixgb/ixgb_hw.c | 82 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_hw.h | 3 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_ids.h | 4 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 10 |
4 files changed, 91 insertions, 8 deletions
diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c index 2c6367ace3cd..80a8b9888225 100644 --- a/drivers/net/ixgb/ixgb_hw.c +++ b/drivers/net/ixgb/ixgb_hw.c | |||
@@ -45,6 +45,8 @@ static boolean_t ixgb_link_reset(struct ixgb_hw *hw); | |||
45 | 45 | ||
46 | static void ixgb_optics_reset(struct ixgb_hw *hw); | 46 | static void ixgb_optics_reset(struct ixgb_hw *hw); |
47 | 47 | ||
48 | static void ixgb_optics_reset_bcm(struct ixgb_hw *hw); | ||
49 | |||
48 | static ixgb_phy_type ixgb_identify_phy(struct ixgb_hw *hw); | 50 | static ixgb_phy_type ixgb_identify_phy(struct ixgb_hw *hw); |
49 | 51 | ||
50 | static void ixgb_clear_hw_cntrs(struct ixgb_hw *hw); | 52 | static void ixgb_clear_hw_cntrs(struct ixgb_hw *hw); |
@@ -90,10 +92,20 @@ static uint32_t ixgb_mac_reset(struct ixgb_hw *hw) | |||
90 | ASSERT(!(ctrl_reg & IXGB_CTRL0_RST)); | 92 | ASSERT(!(ctrl_reg & IXGB_CTRL0_RST)); |
91 | #endif | 93 | #endif |
92 | 94 | ||
93 | if (hw->phy_type == ixgb_phy_type_txn17401) { | 95 | if (hw->subsystem_vendor_id == SUN_SUBVENDOR_ID) { |
94 | ixgb_optics_reset(hw); | 96 | ctrl_reg = /* Enable interrupt from XFP and SerDes */ |
97 | IXGB_CTRL1_GPI0_EN | | ||
98 | IXGB_CTRL1_SDP6_DIR | | ||
99 | IXGB_CTRL1_SDP7_DIR | | ||
100 | IXGB_CTRL1_SDP6 | | ||
101 | IXGB_CTRL1_SDP7; | ||
102 | IXGB_WRITE_REG(hw, CTRL1, ctrl_reg); | ||
103 | ixgb_optics_reset_bcm(hw); | ||
95 | } | 104 | } |
96 | 105 | ||
106 | if (hw->phy_type == ixgb_phy_type_txn17401) | ||
107 | ixgb_optics_reset(hw); | ||
108 | |||
97 | return ctrl_reg; | 109 | return ctrl_reg; |
98 | } | 110 | } |
99 | 111 | ||
@@ -253,6 +265,10 @@ ixgb_identify_phy(struct ixgb_hw *hw) | |||
253 | break; | 265 | break; |
254 | } | 266 | } |
255 | 267 | ||
268 | /* update phy type for sun specific board */ | ||
269 | if (hw->subsystem_vendor_id == SUN_SUBVENDOR_ID) | ||
270 | phy_type = ixgb_phy_type_bcm; | ||
271 | |||
256 | return (phy_type); | 272 | return (phy_type); |
257 | } | 273 | } |
258 | 274 | ||
@@ -1225,3 +1241,65 @@ ixgb_optics_reset(struct ixgb_hw *hw) | |||
1225 | 1241 | ||
1226 | return; | 1242 | return; |
1227 | } | 1243 | } |
1244 | |||
1245 | /****************************************************************************** | ||
1246 | * Resets the 10GbE optics module for Sun variant NIC. | ||
1247 | * | ||
1248 | * hw - Struct containing variables accessed by shared code | ||
1249 | *****************************************************************************/ | ||
1250 | |||
1251 | #define IXGB_BCM8704_USER_PMD_TX_CTRL_REG 0xC803 | ||
1252 | #define IXGB_BCM8704_USER_PMD_TX_CTRL_REG_VAL 0x0164 | ||
1253 | #define IXGB_BCM8704_USER_CTRL_REG 0xC800 | ||
1254 | #define IXGB_BCM8704_USER_CTRL_REG_VAL 0x7FBF | ||
1255 | #define IXGB_BCM8704_USER_DEV3_ADDR 0x0003 | ||
1256 | #define IXGB_SUN_PHY_ADDRESS 0x0000 | ||
1257 | #define IXGB_SUN_PHY_RESET_DELAY 305 | ||
1258 | |||
1259 | static void | ||
1260 | ixgb_optics_reset_bcm(struct ixgb_hw *hw) | ||
1261 | { | ||
1262 | u32 ctrl = IXGB_READ_REG(hw, CTRL0); | ||
1263 | ctrl &= ~IXGB_CTRL0_SDP2; | ||
1264 | ctrl |= IXGB_CTRL0_SDP3; | ||
1265 | IXGB_WRITE_REG(hw, CTRL0, ctrl); | ||
1266 | |||
1267 | /* SerDes needs extra delay */ | ||
1268 | msleep(IXGB_SUN_PHY_RESET_DELAY); | ||
1269 | |||
1270 | /* Broadcom 7408L configuration */ | ||
1271 | /* Reference clock config */ | ||
1272 | ixgb_write_phy_reg(hw, | ||
1273 | IXGB_BCM8704_USER_PMD_TX_CTRL_REG, | ||
1274 | IXGB_SUN_PHY_ADDRESS, | ||
1275 | IXGB_BCM8704_USER_DEV3_ADDR, | ||
1276 | IXGB_BCM8704_USER_PMD_TX_CTRL_REG_VAL); | ||
1277 | /* we must read the registers twice */ | ||
1278 | ixgb_read_phy_reg(hw, | ||
1279 | IXGB_BCM8704_USER_PMD_TX_CTRL_REG, | ||
1280 | IXGB_SUN_PHY_ADDRESS, | ||
1281 | IXGB_BCM8704_USER_DEV3_ADDR); | ||
1282 | ixgb_read_phy_reg(hw, | ||
1283 | IXGB_BCM8704_USER_PMD_TX_CTRL_REG, | ||
1284 | IXGB_SUN_PHY_ADDRESS, | ||
1285 | IXGB_BCM8704_USER_DEV3_ADDR); | ||
1286 | |||
1287 | ixgb_write_phy_reg(hw, | ||
1288 | IXGB_BCM8704_USER_CTRL_REG, | ||
1289 | IXGB_SUN_PHY_ADDRESS, | ||
1290 | IXGB_BCM8704_USER_DEV3_ADDR, | ||
1291 | IXGB_BCM8704_USER_CTRL_REG_VAL); | ||
1292 | ixgb_read_phy_reg(hw, | ||
1293 | IXGB_BCM8704_USER_CTRL_REG, | ||
1294 | IXGB_SUN_PHY_ADDRESS, | ||
1295 | IXGB_BCM8704_USER_DEV3_ADDR); | ||
1296 | ixgb_read_phy_reg(hw, | ||
1297 | IXGB_BCM8704_USER_CTRL_REG, | ||
1298 | IXGB_SUN_PHY_ADDRESS, | ||
1299 | IXGB_BCM8704_USER_DEV3_ADDR); | ||
1300 | |||
1301 | /* SerDes needs extra delay */ | ||
1302 | msleep(IXGB_SUN_PHY_RESET_DELAY); | ||
1303 | |||
1304 | return; | ||
1305 | } | ||
diff --git a/drivers/net/ixgb/ixgb_hw.h b/drivers/net/ixgb/ixgb_hw.h index 7a7684d094dc..4f176ff2b786 100644 --- a/drivers/net/ixgb/ixgb_hw.h +++ b/drivers/net/ixgb/ixgb_hw.h | |||
@@ -44,7 +44,8 @@ typedef enum { | |||
44 | ixgb_phy_type_g6005, /* 850nm, MM fiber, XPAK transceiver */ | 44 | ixgb_phy_type_g6005, /* 850nm, MM fiber, XPAK transceiver */ |
45 | ixgb_phy_type_g6104, /* 1310nm, SM fiber, XPAK transceiver */ | 45 | ixgb_phy_type_g6104, /* 1310nm, SM fiber, XPAK transceiver */ |
46 | ixgb_phy_type_txn17201, /* 850nm, MM fiber, XPAK transceiver */ | 46 | ixgb_phy_type_txn17201, /* 850nm, MM fiber, XPAK transceiver */ |
47 | ixgb_phy_type_txn17401 /* 1310nm, SM fiber, XENPAK transceiver */ | 47 | ixgb_phy_type_txn17401, /* 1310nm, SM fiber, XENPAK transceiver */ |
48 | ixgb_phy_type_bcm /* SUN specific board */ | ||
48 | } ixgb_phy_type; | 49 | } ixgb_phy_type; |
49 | 50 | ||
50 | /* XPAK transceiver vendors, for the SR adapters */ | 51 | /* XPAK transceiver vendors, for the SR adapters */ |
diff --git a/drivers/net/ixgb/ixgb_ids.h b/drivers/net/ixgb/ixgb_ids.h index 4376e7e8fbef..180d20e793a5 100644 --- a/drivers/net/ixgb/ixgb_ids.h +++ b/drivers/net/ixgb/ixgb_ids.h | |||
@@ -35,7 +35,8 @@ | |||
35 | 35 | ||
36 | #define INTEL_VENDOR_ID 0x8086 | 36 | #define INTEL_VENDOR_ID 0x8086 |
37 | #define INTEL_SUBVENDOR_ID 0x8086 | 37 | #define INTEL_SUBVENDOR_ID 0x8086 |
38 | 38 | #define SUN_VENDOR_ID 0x108E | |
39 | #define SUN_SUBVENDOR_ID 0x108E | ||
39 | 40 | ||
40 | #define IXGB_DEVICE_ID_82597EX 0x1048 | 41 | #define IXGB_DEVICE_ID_82597EX 0x1048 |
41 | #define IXGB_DEVICE_ID_82597EX_SR 0x1A48 | 42 | #define IXGB_DEVICE_ID_82597EX_SR 0x1A48 |
@@ -46,6 +47,7 @@ | |||
46 | #define IXGB_DEVICE_ID_82597EX_CX4 0x109E | 47 | #define IXGB_DEVICE_ID_82597EX_CX4 0x109E |
47 | #define IXGB_SUBDEVICE_ID_A00C 0xA00C | 48 | #define IXGB_SUBDEVICE_ID_A00C 0xA00C |
48 | #define IXGB_SUBDEVICE_ID_A01C 0xA01C | 49 | #define IXGB_SUBDEVICE_ID_A01C 0xA01C |
50 | #define IXGB_SUBDEVICE_ID_7036 0x7036 | ||
49 | 51 | ||
50 | #endif /* #ifndef _IXGB_IDS_H_ */ | 52 | #endif /* #ifndef _IXGB_IDS_H_ */ |
51 | /* End of File */ | 53 | /* End of File */ |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 4f63839051b0..269e6f805f47 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -36,7 +36,7 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; | |||
36 | #else | 36 | #else |
37 | #define DRIVERNAPI "-NAPI" | 37 | #define DRIVERNAPI "-NAPI" |
38 | #endif | 38 | #endif |
39 | #define DRV_VERSION "1.0.126-k2"DRIVERNAPI | 39 | #define DRV_VERSION "1.0.126-k4"DRIVERNAPI |
40 | const char ixgb_driver_version[] = DRV_VERSION; | 40 | const char ixgb_driver_version[] = DRV_VERSION; |
41 | static const char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static const char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
42 | 42 | ||
@@ -212,9 +212,11 @@ static void | |||
212 | ixgb_irq_enable(struct ixgb_adapter *adapter) | 212 | ixgb_irq_enable(struct ixgb_adapter *adapter) |
213 | { | 213 | { |
214 | if(atomic_dec_and_test(&adapter->irq_sem)) { | 214 | if(atomic_dec_and_test(&adapter->irq_sem)) { |
215 | IXGB_WRITE_REG(&adapter->hw, IMS, | 215 | u32 val = IXGB_INT_RXT0 | IXGB_INT_RXDMT0 | |
216 | IXGB_INT_RXT0 | IXGB_INT_RXDMT0 | IXGB_INT_TXDW | | 216 | IXGB_INT_TXDW | IXGB_INT_LSC; |
217 | IXGB_INT_LSC); | 217 | if (adapter->hw.subsystem_vendor_id == SUN_SUBVENDOR_ID) |
218 | val |= IXGB_INT_GPI0; | ||
219 | IXGB_WRITE_REG(&adapter->hw, IMS, val); | ||
218 | IXGB_WRITE_FLUSH(&adapter->hw); | 220 | IXGB_WRITE_FLUSH(&adapter->hw); |
219 | } | 221 | } |
220 | } | 222 | } |