ixgbe_82598.c 17 KB

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