ixgbe_82598.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. /*******************************************************************************
  2. Intel 10 Gigabit PCI Express Linux driver
  3. Copyright(c) 1999 - 2007 Intel Corporation.
  4. This program is free software; you can redistribute it and/or modify it
  5. under the terms and conditions of the GNU General Public License,
  6. version 2, as published by the Free Software Foundation.
  7. This program is distributed in the hope it will be useful, but WITHOUT
  8. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  9. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  10. more details.
  11. You should have received a copy of the GNU General Public License along with
  12. this program; if not, write to the Free Software Foundation, Inc.,
  13. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  14. The full GNU General Public License is included in this distribution in
  15. the file called "COPYING".
  16. Contact Information:
  17. Linux NICS <linux.nics@intel.com>
  18. e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  19. Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  20. *******************************************************************************/
  21. #include <linux/pci.h>
  22. #include <linux/delay.h>
  23. #include <linux/sched.h>
  24. #include "ixgbe_type.h"
  25. #include "ixgbe_common.h"
  26. #include "ixgbe_phy.h"
  27. #define IXGBE_82598_MAX_TX_QUEUES 32
  28. #define IXGBE_82598_MAX_RX_QUEUES 64
  29. #define IXGBE_82598_RAR_ENTRIES 16
  30. static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw);
  31. static s32 ixgbe_get_link_settings_82598(struct ixgbe_hw *hw, u32 *speed,
  32. bool *autoneg);
  33. static s32 ixgbe_get_copper_link_settings_82598(struct ixgbe_hw *hw,
  34. u32 *speed, bool *autoneg);
  35. static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw);
  36. static s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw);
  37. static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, u32 *speed,
  38. bool *link_up);
  39. static s32 ixgbe_setup_mac_link_speed_82598(struct ixgbe_hw *hw, u32 speed,
  40. bool autoneg,
  41. bool autoneg_wait_to_complete);
  42. static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw);
  43. static s32 ixgbe_check_copper_link_82598(struct ixgbe_hw *hw, u32 *speed,
  44. bool *link_up);
  45. static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw, u32 speed,
  46. bool autoneg,
  47. bool autoneg_wait_to_complete);
  48. static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw);
  49. static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
  50. {
  51. hw->mac.num_rx_queues = IXGBE_82598_MAX_TX_QUEUES;
  52. hw->mac.num_tx_queues = IXGBE_82598_MAX_RX_QUEUES;
  53. hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES;
  54. return 0;
  55. }
  56. /**
  57. * ixgbe_get_link_settings_82598 - Determines default link settings
  58. * @hw: pointer to hardware structure
  59. * @speed: pointer to link speed
  60. * @autoneg: boolean auto-negotiation value
  61. *
  62. * Determines the default link settings by reading the AUTOC register.
  63. **/
  64. static s32 ixgbe_get_link_settings_82598(struct ixgbe_hw *hw, u32 *speed,
  65. bool *autoneg)
  66. {
  67. s32 status = 0;
  68. s32 autoc_reg;
  69. autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
  70. if (hw->mac.link_settings_loaded) {
  71. autoc_reg &= ~IXGBE_AUTOC_LMS_ATTACH_TYPE;
  72. autoc_reg &= ~IXGBE_AUTOC_LMS_MASK;
  73. autoc_reg |= hw->mac.link_attach_type;
  74. autoc_reg |= hw->mac.link_mode_select;
  75. }
  76. switch (autoc_reg & IXGBE_AUTOC_LMS_MASK) {
  77. case IXGBE_AUTOC_LMS_1G_LINK_NO_AN:
  78. *speed = IXGBE_LINK_SPEED_1GB_FULL;
  79. *autoneg = false;
  80. break;
  81. case IXGBE_AUTOC_LMS_10G_LINK_NO_AN:
  82. *speed = IXGBE_LINK_SPEED_10GB_FULL;
  83. *autoneg = false;
  84. break;
  85. case IXGBE_AUTOC_LMS_1G_AN:
  86. *speed = IXGBE_LINK_SPEED_1GB_FULL;
  87. *autoneg = true;
  88. break;
  89. case IXGBE_AUTOC_LMS_KX4_AN:
  90. case IXGBE_AUTOC_LMS_KX4_AN_1G_AN:
  91. *speed = IXGBE_LINK_SPEED_UNKNOWN;
  92. if (autoc_reg & IXGBE_AUTOC_KX4_SUPP)
  93. *speed |= IXGBE_LINK_SPEED_10GB_FULL;
  94. if (autoc_reg & IXGBE_AUTOC_KX_SUPP)
  95. *speed |= IXGBE_LINK_SPEED_1GB_FULL;
  96. *autoneg = true;
  97. break;
  98. default:
  99. status = IXGBE_ERR_LINK_SETUP;
  100. break;
  101. }
  102. return status;
  103. }
  104. /**
  105. * ixgbe_get_copper_link_settings_82598 - Determines default link settings
  106. * @hw: pointer to hardware structure
  107. * @speed: pointer to link speed
  108. * @autoneg: boolean auto-negotiation value
  109. *
  110. * Determines the default link settings by reading the AUTOC register.
  111. **/
  112. static s32 ixgbe_get_copper_link_settings_82598(struct ixgbe_hw *hw,
  113. u32 *speed, bool *autoneg)
  114. {
  115. s32 status = IXGBE_ERR_LINK_SETUP;
  116. u16 speed_ability;
  117. *speed = 0;
  118. *autoneg = true;
  119. status = ixgbe_read_phy_reg(hw, IXGBE_MDIO_PHY_SPEED_ABILITY,
  120. IXGBE_MDIO_PMA_PMD_DEV_TYPE,
  121. &speed_ability);
  122. if (status == 0) {
  123. if (speed_ability & IXGBE_MDIO_PHY_SPEED_10G)
  124. *speed |= IXGBE_LINK_SPEED_10GB_FULL;
  125. if (speed_ability & IXGBE_MDIO_PHY_SPEED_1G)
  126. *speed |= IXGBE_LINK_SPEED_1GB_FULL;
  127. }
  128. return status;
  129. }
  130. /**
  131. * ixgbe_get_media_type_82598 - Determines media type
  132. * @hw: pointer to hardware structure
  133. *
  134. * Returns the media type (fiber, copper, backplane)
  135. **/
  136. static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
  137. {
  138. enum ixgbe_media_type media_type;
  139. /* Media type for I82598 is based on device ID */
  140. switch (hw->device_id) {
  141. case IXGBE_DEV_ID_82598AF_DUAL_PORT:
  142. case IXGBE_DEV_ID_82598AF_SINGLE_PORT:
  143. case IXGBE_DEV_ID_82598EB_CX4:
  144. media_type = ixgbe_media_type_fiber;
  145. break;
  146. case IXGBE_DEV_ID_82598AT_DUAL_PORT:
  147. media_type = ixgbe_media_type_copper;
  148. break;
  149. default:
  150. media_type = ixgbe_media_type_unknown;
  151. break;
  152. }
  153. return media_type;
  154. }
  155. /**
  156. * ixgbe_setup_mac_link_82598 - Configures MAC link settings
  157. * @hw: pointer to hardware structure
  158. *
  159. * Configures link settings based on values in the ixgbe_hw struct.
  160. * Restarts the link. Performs autonegotiation if needed.
  161. **/
  162. static s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw)
  163. {
  164. u32 autoc_reg;
  165. u32 links_reg;
  166. u32 i;
  167. s32 status = 0;
  168. autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
  169. if (hw->mac.link_settings_loaded) {
  170. autoc_reg &= ~IXGBE_AUTOC_LMS_ATTACH_TYPE;
  171. autoc_reg &= ~IXGBE_AUTOC_LMS_MASK;
  172. autoc_reg |= hw->mac.link_attach_type;
  173. autoc_reg |= hw->mac.link_mode_select;
  174. IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
  175. msleep(50);
  176. }
  177. /* Restart link */
  178. autoc_reg |= IXGBE_AUTOC_AN_RESTART;
  179. IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
  180. /* Only poll for autoneg to complete if specified to do so */
  181. if (hw->phy.autoneg_wait_to_complete) {
  182. if (hw->mac.link_mode_select == IXGBE_AUTOC_LMS_KX4_AN ||
  183. hw->mac.link_mode_select == IXGBE_AUTOC_LMS_KX4_AN_1G_AN) {
  184. links_reg = 0; /* Just in case Autoneg time = 0 */
  185. for (i = 0; i < IXGBE_AUTO_NEG_TIME; i++) {
  186. links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
  187. if (links_reg & IXGBE_LINKS_KX_AN_COMP)
  188. break;
  189. msleep(100);
  190. }
  191. if (!(links_reg & IXGBE_LINKS_KX_AN_COMP)) {
  192. status = IXGBE_ERR_AUTONEG_NOT_COMPLETE;
  193. hw_dbg(hw,
  194. "Autonegotiation did not complete.\n");
  195. }
  196. }
  197. }
  198. /*
  199. * We want to save off the original Flow Control configuration just in
  200. * case we get disconnected and then reconnected into a different hub
  201. * or switch with different Flow Control capabilities.
  202. */
  203. hw->fc.type = hw->fc.original_type;
  204. ixgbe_setup_fc(hw, 0);
  205. /* Add delay to filter out noises during initial link setup */
  206. msleep(50);
  207. return status;
  208. }
  209. /**
  210. * ixgbe_check_mac_link_82598 - Get link/speed status
  211. * @hw: pointer to hardware structure
  212. * @speed: pointer to link speed
  213. * @link_up: true is link is up, false otherwise
  214. *
  215. * Reads the links register to determine if link is up and the current speed
  216. **/
  217. static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, u32 *speed,
  218. bool *link_up)
  219. {
  220. u32 links_reg;
  221. links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
  222. if (links_reg & IXGBE_LINKS_UP)
  223. *link_up = true;
  224. else
  225. *link_up = false;
  226. if (links_reg & IXGBE_LINKS_SPEED)
  227. *speed = IXGBE_LINK_SPEED_10GB_FULL;
  228. else
  229. *speed = IXGBE_LINK_SPEED_1GB_FULL;
  230. return 0;
  231. }
  232. /**
  233. * ixgbe_setup_mac_link_speed_82598 - Set MAC link speed
  234. * @hw: pointer to hardware structure
  235. * @speed: new link speed
  236. * @autoneg: true if auto-negotiation enabled
  237. * @autoneg_wait_to_complete: true if waiting is needed to complete
  238. *
  239. * Set the link speed in the AUTOC register and restarts link.
  240. **/
  241. static s32 ixgbe_setup_mac_link_speed_82598(struct ixgbe_hw *hw,
  242. u32 speed, bool autoneg,
  243. bool autoneg_wait_to_complete)
  244. {
  245. s32 status = 0;
  246. /* If speed is 10G, then check for CX4 or XAUI. */
  247. if ((speed == IXGBE_LINK_SPEED_10GB_FULL) &&
  248. (!(hw->mac.link_attach_type & IXGBE_AUTOC_10G_KX4)))
  249. hw->mac.link_mode_select = IXGBE_AUTOC_LMS_10G_LINK_NO_AN;
  250. else if ((speed == IXGBE_LINK_SPEED_1GB_FULL) && (!autoneg))
  251. hw->mac.link_mode_select = IXGBE_AUTOC_LMS_1G_LINK_NO_AN;
  252. else if (autoneg) {
  253. /* BX mode - Autonegotiate 1G */
  254. if (!(hw->mac.link_attach_type & IXGBE_AUTOC_1G_PMA_PMD))
  255. hw->mac.link_mode_select = IXGBE_AUTOC_LMS_1G_AN;
  256. else /* KX/KX4 mode */
  257. hw->mac.link_mode_select = IXGBE_AUTOC_LMS_KX4_AN_1G_AN;
  258. } else {
  259. status = IXGBE_ERR_LINK_SETUP;
  260. }
  261. if (status == 0) {
  262. hw->phy.autoneg_wait_to_complete = autoneg_wait_to_complete;
  263. hw->mac.link_settings_loaded = true;
  264. /*
  265. * Setup and restart the link based on the new values in
  266. * ixgbe_hw This will write the AUTOC register based on the new
  267. * stored values
  268. */
  269. hw->phy.ops.setup(hw);
  270. }
  271. return status;
  272. }
  273. /**
  274. * ixgbe_setup_copper_link_82598 - Setup copper link settings
  275. * @hw: pointer to hardware structure
  276. *
  277. * Configures link settings based on values in the ixgbe_hw struct.
  278. * Restarts the link. Performs autonegotiation if needed. Restart
  279. * phy and wait for autonegotiate to finish. Then synchronize the
  280. * MAC and PHY.
  281. **/
  282. static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw)
  283. {
  284. s32 status;
  285. u32 speed = 0;
  286. bool link_up = false;
  287. /* Set up MAC */
  288. hw->phy.ops.setup(hw);
  289. /* Restart autonegotiation on PHY */
  290. status = hw->phy.ops.setup(hw);
  291. /* Synchronize MAC to PHY speed */
  292. if (status == 0)
  293. status = hw->phy.ops.check(hw, &speed, &link_up);
  294. return status;
  295. }
  296. /**
  297. * ixgbe_check_copper_link_82598 - Syncs MAC & PHY link settings
  298. * @hw: pointer to hardware structure
  299. * @speed: pointer to link speed
  300. * @link_up: true if link is up, false otherwise
  301. *
  302. * Reads the mac link, phy link, and synchronizes the MAC to PHY.
  303. **/
  304. static s32 ixgbe_check_copper_link_82598(struct ixgbe_hw *hw, u32 *speed,
  305. bool *link_up)
  306. {
  307. s32 status;
  308. u32 phy_speed = 0;
  309. bool phy_link = false;
  310. /* This is the speed and link the MAC is set at */
  311. hw->phy.ops.check(hw, speed, link_up);
  312. /*
  313. * Check current speed and link status of the PHY register.
  314. * This is a vendor specific register and may have to
  315. * be changed for other copper PHYs.
  316. */
  317. status = hw->phy.ops.check(hw, &phy_speed, &phy_link);
  318. if ((status == 0) && (phy_link)) {
  319. /*
  320. * Check current link status of the MACs link's register
  321. * matches that of the speed in the PHY register
  322. */
  323. if (*speed != phy_speed) {
  324. /*
  325. * The copper PHY requires 82598 attach type to be XAUI
  326. * for 10G and BX for 1G
  327. */
  328. hw->mac.link_attach_type =
  329. (IXGBE_AUTOC_10G_XAUI | IXGBE_AUTOC_1G_BX);
  330. /* Synchronize the MAC speed to the PHY speed */
  331. status = hw->phy.ops.setup_speed(hw, phy_speed, false,
  332. false);
  333. if (status == 0)
  334. hw->phy.ops.check(hw, speed, link_up);
  335. else
  336. status = IXGBE_ERR_LINK_SETUP;
  337. }
  338. } else {
  339. *link_up = phy_link;
  340. }
  341. return status;
  342. }
  343. /**
  344. * ixgbe_setup_copper_link_speed_82598 - Set the PHY autoneg advertised field
  345. * @hw: pointer to hardware structure
  346. * @speed: new link speed
  347. * @autoneg: true if autonegotiation enabled
  348. * @autoneg_wait_to_complete: true if waiting is needed to complete
  349. *
  350. * Sets the link speed in the AUTOC register in the MAC and restarts link.
  351. **/
  352. static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw, u32 speed,
  353. bool autoneg,
  354. bool autoneg_wait_to_complete)
  355. {
  356. s32 status;
  357. bool link_up = 0;
  358. /* Setup the PHY according to input speed */
  359. status = hw->phy.ops.setup_speed(hw, speed, autoneg,
  360. autoneg_wait_to_complete);
  361. /* Synchronize MAC to PHY speed */
  362. if (status == 0)
  363. status = hw->phy.ops.check(hw, &speed, &link_up);
  364. return status;
  365. }
  366. /**
  367. * ixgbe_reset_hw_82598 - Performs hardware reset
  368. * @hw: pointer to hardware structure
  369. *
  370. * Resets the hardware by reseting the transmit and receive units, masks and
  371. * clears all interrupts, performing a PHY reset, and performing a link (MAC)
  372. * reset.
  373. **/
  374. static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw)
  375. {
  376. s32 status = 0;
  377. u32 ctrl;
  378. u32 gheccr;
  379. u32 i;
  380. u32 autoc;
  381. u8 analog_val;
  382. /* Call adapter stop to disable tx/rx and clear interrupts */
  383. ixgbe_stop_adapter(hw);
  384. /*
  385. * Power up the Atlas TX lanes if they are currently powered down.
  386. * Atlas TX lanes are powered down for MAC loopback tests, but
  387. * they are not automatically restored on reset.
  388. */
  389. ixgbe_read_analog_reg8(hw, IXGBE_ATLAS_PDN_LPBK, &analog_val);
  390. if (analog_val & IXGBE_ATLAS_PDN_TX_REG_EN) {
  391. /* Enable TX Atlas so packets can be transmitted again */
  392. ixgbe_read_analog_reg8(hw, IXGBE_ATLAS_PDN_LPBK, &analog_val);
  393. analog_val &= ~IXGBE_ATLAS_PDN_TX_REG_EN;
  394. ixgbe_write_analog_reg8(hw, IXGBE_ATLAS_PDN_LPBK, analog_val);
  395. ixgbe_read_analog_reg8(hw, IXGBE_ATLAS_PDN_10G, &analog_val);
  396. analog_val &= ~IXGBE_ATLAS_PDN_TX_10G_QL_ALL;
  397. ixgbe_write_analog_reg8(hw, IXGBE_ATLAS_PDN_10G, analog_val);
  398. ixgbe_read_analog_reg8(hw, IXGBE_ATLAS_PDN_1G, &analog_val);
  399. analog_val &= ~IXGBE_ATLAS_PDN_TX_1G_QL_ALL;
  400. ixgbe_write_analog_reg8(hw, IXGBE_ATLAS_PDN_1G, analog_val);
  401. ixgbe_read_analog_reg8(hw, IXGBE_ATLAS_PDN_AN, &analog_val);
  402. analog_val &= ~IXGBE_ATLAS_PDN_TX_AN_QL_ALL;
  403. ixgbe_write_analog_reg8(hw, IXGBE_ATLAS_PDN_AN, analog_val);
  404. }
  405. /* Reset PHY */
  406. ixgbe_reset_phy(hw);
  407. /*
  408. * Prevent the PCI-E bus from from hanging by disabling PCI-E master
  409. * access and verify no pending requests before reset
  410. */
  411. if (ixgbe_disable_pcie_master(hw) != 0) {
  412. status = IXGBE_ERR_MASTER_REQUESTS_PENDING;
  413. hw_dbg(hw, "PCI-E Master disable polling has failed.\n");
  414. }
  415. /*
  416. * Issue global reset to the MAC. This needs to be a SW reset.
  417. * If link reset is used, it might reset the MAC when mng is using it
  418. */
  419. ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL);
  420. IXGBE_WRITE_REG(hw, IXGBE_CTRL, (ctrl | IXGBE_CTRL_RST));
  421. IXGBE_WRITE_FLUSH(hw);
  422. /* Poll for reset bit to self-clear indicating reset is complete */
  423. for (i = 0; i < 10; i++) {
  424. udelay(1);
  425. ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL);
  426. if (!(ctrl & IXGBE_CTRL_RST))
  427. break;
  428. }
  429. if (ctrl & IXGBE_CTRL_RST) {
  430. status = IXGBE_ERR_RESET_FAILED;
  431. hw_dbg(hw, "Reset polling failed to complete.\n");
  432. }
  433. msleep(50);
  434. gheccr = IXGBE_READ_REG(hw, IXGBE_GHECCR);
  435. gheccr &= ~((1 << 21) | (1 << 18) | (1 << 9) | (1 << 6));
  436. IXGBE_WRITE_REG(hw, IXGBE_GHECCR, gheccr);
  437. /*
  438. * AUTOC register which stores link settings gets cleared
  439. * and reloaded from EEPROM after reset. We need to restore
  440. * our stored value from init in case SW changed the attach
  441. * type or speed. If this is the first time and link settings
  442. * have not been stored, store default settings from AUTOC.
  443. */
  444. autoc = IXGBE_READ_REG(hw, IXGBE_AUTOC);
  445. if (hw->mac.link_settings_loaded) {
  446. autoc &= ~(IXGBE_AUTOC_LMS_ATTACH_TYPE);
  447. autoc &= ~(IXGBE_AUTOC_LMS_MASK);
  448. autoc |= hw->mac.link_attach_type;
  449. autoc |= hw->mac.link_mode_select;
  450. IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc);
  451. } else {
  452. hw->mac.link_attach_type =
  453. (autoc & IXGBE_AUTOC_LMS_ATTACH_TYPE);
  454. hw->mac.link_mode_select = (autoc & IXGBE_AUTOC_LMS_MASK);
  455. hw->mac.link_settings_loaded = true;
  456. }
  457. /* Store the permanent mac address */
  458. ixgbe_get_mac_addr(hw, hw->mac.perm_addr);
  459. return status;
  460. }
  461. static struct ixgbe_mac_operations mac_ops_82598 = {
  462. .reset = &ixgbe_reset_hw_82598,
  463. .get_media_type = &ixgbe_get_media_type_82598,
  464. };
  465. static struct ixgbe_phy_operations phy_ops_82598EB = {
  466. .setup = &ixgbe_setup_copper_link_82598,
  467. .check = &ixgbe_check_copper_link_82598,
  468. .setup_speed = &ixgbe_setup_copper_link_speed_82598,
  469. .get_settings = &ixgbe_get_copper_link_settings_82598,
  470. };
  471. struct ixgbe_info ixgbe_82598EB_info = {
  472. .mac = ixgbe_mac_82598EB,
  473. .get_invariants = &ixgbe_get_invariants_82598,
  474. .mac_ops = &mac_ops_82598,
  475. .phy_ops = &phy_ops_82598EB,
  476. };
  477. static struct ixgbe_phy_operations phy_ops_82598AT = {
  478. .setup = &ixgbe_setup_tnx_phy_link,
  479. .check = &ixgbe_check_tnx_phy_link,
  480. .setup_speed = &ixgbe_setup_tnx_phy_link_speed,
  481. .get_settings = &ixgbe_get_copper_link_settings_82598,
  482. };
  483. struct ixgbe_info ixgbe_82598AT_info = {
  484. .mac = ixgbe_mac_82598EB,
  485. .get_invariants = &ixgbe_get_invariants_82598,
  486. .mac_ops = &mac_ops_82598,
  487. .phy_ops = &phy_ops_82598AT,
  488. };
  489. static struct ixgbe_phy_operations phy_ops_82598AF = {
  490. .setup = &ixgbe_setup_mac_link_82598,
  491. .check = &ixgbe_check_mac_link_82598,
  492. .setup_speed = &ixgbe_setup_mac_link_speed_82598,
  493. .get_settings = &ixgbe_get_link_settings_82598,
  494. };
  495. struct ixgbe_info ixgbe_82598AF_info = {
  496. .mac = ixgbe_mac_82598EB,
  497. .get_invariants = &ixgbe_get_invariants_82598,
  498. .mac_ops = &mac_ops_82598,
  499. .phy_ops = &phy_ops_82598AF,
  500. };