Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sfc: SFX7101/SFT9001: Fix AN advertisements

All 10Xpress PHYs require autonegotiation all the time; enforce this
in the set_settings() method and do not treat it as a workaround.

Remove claimed support for 100M HD mode since it is not supported by
current firmware.

Do not set speed override bits when AN is enabled, and do not use
register 1.49192 for AN configuration as it can override what we set
elsewhere.

Always set the AN selector bits to 1 (802.3).

Fix confusion between Next Page and Extended Next Page.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ben Hutchings and committed by
David S. Miller
af4ad9bc c9d5a53f

+138 -198
-3
drivers/net/sfc/ethtool.c
··· 219 219 struct efx_nic *efx = netdev_priv(net_dev); 220 220 int rc; 221 221 222 - if (EFX_WORKAROUND_13963(efx) && !ecmd->autoneg) 223 - return -EINVAL; 224 - 225 222 /* Falcon GMAC does not support 1000Mbps HD */ 226 223 if (ecmd->speed == SPEED_1000 && ecmd->duplex != DUPLEX_FULL) { 227 224 EFX_LOG(efx, "rejecting unsupported 1000Mbps HD"
+77 -96
drivers/net/sfc/mdio_10g.c
··· 266 266 } 267 267 } 268 268 269 - static u32 mdio_clause45_get_an(struct efx_nic *efx, u16 addr, u32 xnp) 269 + static u32 mdio_clause45_get_an(struct efx_nic *efx, u16 addr) 270 270 { 271 271 int phy_id = efx->mii.phy_id; 272 272 u32 result = 0; ··· 281 281 result |= ADVERTISED_100baseT_Half; 282 282 if (reg & ADVERTISE_100FULL) 283 283 result |= ADVERTISED_100baseT_Full; 284 - if (reg & LPA_RESV) 285 - result |= xnp; 286 - 287 284 return result; 288 285 } 289 286 ··· 310 313 */ 311 314 void mdio_clause45_get_settings_ext(struct efx_nic *efx, 312 315 struct ethtool_cmd *ecmd, 313 - u32 xnp, u32 xnp_lpa) 316 + u32 npage_adv, u32 npage_lpa) 314 317 { 315 318 int phy_id = efx->mii.phy_id; 316 319 int reg; ··· 361 364 ecmd->autoneg = AUTONEG_ENABLE; 362 365 ecmd->advertising |= 363 366 ADVERTISED_Autoneg | 364 - mdio_clause45_get_an(efx, 365 - MDIO_AN_ADVERTISE, xnp); 367 + mdio_clause45_get_an(efx, MDIO_AN_ADVERTISE) | 368 + npage_adv; 366 369 } else 367 370 ecmd->autoneg = AUTONEG_DISABLE; 368 371 } else ··· 371 374 if (ecmd->autoneg) { 372 375 /* If AN is complete, report best common mode, 373 376 * otherwise report best advertised mode. */ 374 - u32 common = ecmd->advertising; 377 + u32 modes = 0; 375 378 if (mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 376 379 MDIO_MMDREG_STAT1) & 377 - (1 << MDIO_AN_STATUS_AN_DONE_LBN)) { 378 - common &= mdio_clause45_get_an(efx, MDIO_AN_LPA, 379 - xnp_lpa); 380 - } 381 - if (common & ADVERTISED_10000baseT_Full) { 380 + (1 << MDIO_AN_STATUS_AN_DONE_LBN)) 381 + modes = (ecmd->advertising & 382 + (mdio_clause45_get_an(efx, MDIO_AN_LPA) | 383 + npage_lpa)); 384 + if (modes == 0) 385 + modes = ecmd->advertising; 386 + 387 + if (modes & ADVERTISED_10000baseT_Full) { 382 388 ecmd->speed = SPEED_10000; 383 389 ecmd->duplex = DUPLEX_FULL; 384 - } else if (common & (ADVERTISED_1000baseT_Full | 385 - ADVERTISED_1000baseT_Half)) { 390 + } else if (modes & (ADVERTISED_1000baseT_Full | 391 + ADVERTISED_1000baseT_Half)) { 386 392 ecmd->speed = SPEED_1000; 387 - ecmd->duplex = !!(common & ADVERTISED_1000baseT_Full); 388 - } else if (common & (ADVERTISED_100baseT_Full | 389 - ADVERTISED_100baseT_Half)) { 393 + ecmd->duplex = !!(modes & ADVERTISED_1000baseT_Full); 394 + } else if (modes & (ADVERTISED_100baseT_Full | 395 + ADVERTISED_100baseT_Half)) { 390 396 ecmd->speed = SPEED_100; 391 - ecmd->duplex = !!(common & ADVERTISED_100baseT_Full); 397 + ecmd->duplex = !!(modes & ADVERTISED_100baseT_Full); 392 398 } else { 393 399 ecmd->speed = SPEED_10; 394 - ecmd->duplex = !!(common & ADVERTISED_10baseT_Full); 400 + ecmd->duplex = !!(modes & ADVERTISED_10baseT_Full); 395 401 } 396 402 } else { 397 403 /* Report forced settings */ ··· 418 418 int phy_id = efx->mii.phy_id; 419 419 struct ethtool_cmd prev; 420 420 u32 required; 421 - int ctrl1_bits, reg; 421 + int reg; 422 422 423 423 efx->phy_op->get_settings(efx, &prev); 424 424 ··· 433 433 if (prev.port != PORT_TP || ecmd->port != PORT_TP) 434 434 return -EINVAL; 435 435 436 - /* Check that PHY supports these settings and work out the 437 - * basic control bits */ 438 - if (ecmd->duplex) { 436 + /* Check that PHY supports these settings */ 437 + if (ecmd->autoneg) { 438 + required = SUPPORTED_Autoneg; 439 + } else if (ecmd->duplex) { 439 440 switch (ecmd->speed) { 440 - case SPEED_10: 441 - ctrl1_bits = BMCR_FULLDPLX; 442 - required = SUPPORTED_10baseT_Full; 443 - break; 444 - case SPEED_100: 445 - ctrl1_bits = BMCR_SPEED100 | BMCR_FULLDPLX; 446 - required = SUPPORTED_100baseT_Full; 447 - break; 448 - case SPEED_1000: 449 - ctrl1_bits = BMCR_SPEED1000 | BMCR_FULLDPLX; 450 - required = SUPPORTED_1000baseT_Full; 451 - break; 452 - case SPEED_10000: 453 - ctrl1_bits = (BMCR_SPEED1000 | BMCR_SPEED100 | 454 - BMCR_FULLDPLX); 455 - required = SUPPORTED_10000baseT_Full; 456 - break; 457 - default: 458 - return -EINVAL; 441 + case SPEED_10: required = SUPPORTED_10baseT_Full; break; 442 + case SPEED_100: required = SUPPORTED_100baseT_Full; break; 443 + default: return -EINVAL; 459 444 } 460 445 } else { 461 446 switch (ecmd->speed) { 462 - case SPEED_10: 463 - ctrl1_bits = 0; 464 - required = SUPPORTED_10baseT_Half; 465 - break; 466 - case SPEED_100: 467 - ctrl1_bits = BMCR_SPEED100; 468 - required = SUPPORTED_100baseT_Half; 469 - break; 470 - case SPEED_1000: 471 - ctrl1_bits = BMCR_SPEED1000; 472 - required = SUPPORTED_1000baseT_Half; 473 - break; 474 - default: 475 - return -EINVAL; 447 + case SPEED_10: required = SUPPORTED_10baseT_Half; break; 448 + case SPEED_100: required = SUPPORTED_100baseT_Half; break; 449 + default: return -EINVAL; 476 450 } 477 451 } 478 - if (ecmd->autoneg) 479 - required |= SUPPORTED_Autoneg; 480 452 required |= ecmd->advertising; 481 453 if (required & ~prev.supported) 482 454 return -EINVAL; 483 455 484 - /* Set the basic control bits */ 485 - reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 486 - MDIO_MMDREG_CTRL1); 487 - reg &= ~(BMCR_SPEED1000 | BMCR_SPEED100 | BMCR_FULLDPLX | 0x003c); 488 - reg |= ctrl1_bits; 489 - mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, MDIO_MMDREG_CTRL1, 490 - reg); 456 + if (ecmd->autoneg) { 457 + bool xnp = (ecmd->advertising & ADVERTISED_10000baseT_Full 458 + || EFX_WORKAROUND_13204(efx)); 491 459 492 - /* Set the AN registers */ 493 - if (ecmd->autoneg != prev.autoneg || 494 - ecmd->advertising != prev.advertising) { 495 - bool xnp = false; 460 + /* Set up the base page */ 461 + reg = ADVERTISE_CSMA; 462 + if (ecmd->advertising & ADVERTISED_10baseT_Half) 463 + reg |= ADVERTISE_10HALF; 464 + if (ecmd->advertising & ADVERTISED_10baseT_Full) 465 + reg |= ADVERTISE_10FULL; 466 + if (ecmd->advertising & ADVERTISED_100baseT_Half) 467 + reg |= ADVERTISE_100HALF; 468 + if (ecmd->advertising & ADVERTISED_100baseT_Full) 469 + reg |= ADVERTISE_100FULL; 470 + if (xnp) 471 + reg |= ADVERTISE_RESV; 472 + else if (ecmd->advertising & (ADVERTISED_1000baseT_Half | 473 + ADVERTISED_1000baseT_Full)) 474 + reg |= ADVERTISE_NPAGE; 475 + reg |= efx_fc_advertise(efx->wanted_fc); 476 + mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, 477 + MDIO_AN_ADVERTISE, reg); 496 478 497 - if (efx->phy_op->set_xnp_advertise) 498 - xnp = efx->phy_op->set_xnp_advertise(efx, 499 - ecmd->advertising); 479 + /* Set up the (extended) next page if necessary */ 480 + if (efx->phy_op->set_npage_adv) 481 + efx->phy_op->set_npage_adv(efx, ecmd->advertising); 500 482 501 - if (ecmd->autoneg) { 502 - reg = 0; 503 - if (ecmd->advertising & ADVERTISED_10baseT_Half) 504 - reg |= ADVERTISE_10HALF; 505 - if (ecmd->advertising & ADVERTISED_10baseT_Full) 506 - reg |= ADVERTISE_10FULL; 507 - if (ecmd->advertising & ADVERTISED_100baseT_Half) 508 - reg |= ADVERTISE_100HALF; 509 - if (ecmd->advertising & ADVERTISED_100baseT_Full) 510 - reg |= ADVERTISE_100FULL; 511 - if (xnp) 512 - reg |= ADVERTISE_RESV; 513 - mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, 514 - MDIO_AN_ADVERTISE, reg); 515 - } 516 - 483 + /* Enable and restart AN */ 517 484 reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 518 485 MDIO_MMDREG_CTRL1); 519 - if (ecmd->autoneg) 520 - reg |= BMCR_ANENABLE | BMCR_ANRESTART; 521 - else 522 - reg &= ~BMCR_ANENABLE; 523 - if (EFX_WORKAROUND_15195(efx) 524 - && LOOPBACK_MASK(efx) & efx->phy_op->loopbacks) 525 - reg &= ~BMCR_ANRESTART; 486 + reg |= BMCR_ANENABLE; 487 + if (!(EFX_WORKAROUND_15195(efx) && 488 + LOOPBACK_MASK(efx) & efx->phy_op->loopbacks)) 489 + reg |= BMCR_ANRESTART; 526 490 if (xnp) 527 491 reg |= 1 << MDIO_AN_CTRL_XNP_LBN; 528 492 else 529 493 reg &= ~(1 << MDIO_AN_CTRL_XNP_LBN); 530 494 mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, 495 + MDIO_MMDREG_CTRL1, reg); 496 + } else { 497 + /* Disable AN */ 498 + mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_AN, 499 + MDIO_MMDREG_CTRL1, 500 + __ffs(BMCR_ANENABLE), false); 501 + 502 + /* Set the basic control bits */ 503 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 504 + MDIO_MMDREG_CTRL1); 505 + reg &= ~(BMCR_SPEED1000 | BMCR_SPEED100 | BMCR_FULLDPLX | 506 + 0x003c); 507 + if (ecmd->speed == SPEED_100) 508 + reg |= BMCR_SPEED100; 509 + if (ecmd->duplex) 510 + reg |= BMCR_FULLDPLX; 511 + mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, 531 512 MDIO_MMDREG_CTRL1, reg); 532 513 } 533 514
+2 -1
drivers/net/sfc/mdio_10g.h
··· 155 155 #define MDIO_AN_XNP 22 156 156 #define MDIO_AN_LPA_XNP 25 157 157 158 - #define MDIO_AN_10GBT_ADVERTISE 32 158 + #define MDIO_AN_10GBT_CTRL 32 159 + #define MDIO_AN_10GBT_CTRL_ADV_10G_LBN 12 159 160 #define MDIO_AN_10GBT_STATUS (33) 160 161 #define MDIO_AN_10GBT_STATUS_MS_FLT_LBN (15) /* MASTER/SLAVE config fault */ 161 162 #define MDIO_AN_10GBT_STATUS_MS_LBN (14) /* MASTER/SLAVE config */
+2 -2
drivers/net/sfc/net_driver.h
··· 566 566 * @poll: Poll for hardware state. Serialised by the mac_lock. 567 567 * @get_settings: Get ethtool settings. Serialised by the mac_lock. 568 568 * @set_settings: Set ethtool settings. Serialised by the mac_lock. 569 - * @set_xnp_advertise: Set abilities advertised in Extended Next Page 569 + * @set_npage_adv: Set abilities advertised in (Extended) Next Page 570 570 * (only needed where AN bit is set in mmds) 571 571 * @num_tests: Number of PHY-specific tests/results 572 572 * @test_names: Names of the tests/results ··· 586 586 struct ethtool_cmd *ecmd); 587 587 int (*set_settings) (struct efx_nic *efx, 588 588 struct ethtool_cmd *ecmd); 589 - bool (*set_xnp_advertise) (struct efx_nic *efx, u32); 589 + void (*set_npage_adv) (struct efx_nic *efx, u32); 590 590 u32 num_tests; 591 591 const char *const *test_names; 592 592 int (*run_tests) (struct efx_nic *efx, int *results, unsigned flags);
+57 -92
drivers/net/sfc/tenxpress.c
··· 179 179 #define C22EXT_STATUS_LINK_LBN 2 180 180 #define C22EXT_STATUS_LINK_WIDTH 1 181 181 182 - #define C22EXT_MSTSLV_REG 49162 183 - #define C22EXT_MSTSLV_1000_HD_LBN 10 184 - #define C22EXT_MSTSLV_1000_HD_WIDTH 1 185 - #define C22EXT_MSTSLV_1000_FD_LBN 11 186 - #define C22EXT_MSTSLV_1000_FD_WIDTH 1 182 + #define C22EXT_MSTSLV_CTRL 49161 183 + #define C22EXT_MSTSLV_CTRL_ADV_1000_HD_LBN 8 184 + #define C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN 9 185 + 186 + #define C22EXT_MSTSLV_STATUS 49162 187 + #define C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN 10 188 + #define C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN 11 187 189 188 190 /* Time to wait between powering down the LNPGA and turning off the power 189 191 * rails */ ··· 743 741 return rc; 744 742 } 745 743 746 - static u32 tenxpress_get_xnp_lpa(struct efx_nic *efx) 744 + static void 745 + tenxpress_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 747 746 { 748 - int phy = efx->mii.phy_id; 749 - u32 lpa = 0; 747 + int phy_id = efx->mii.phy_id; 748 + u32 adv = 0, lpa = 0; 750 749 int reg; 751 750 752 751 if (efx->phy_type != PHY_TYPE_SFX7101) { 753 - reg = mdio_clause45_read(efx, phy, MDIO_MMD_C22EXT, 754 - C22EXT_MSTSLV_REG); 755 - if (reg & (1 << C22EXT_MSTSLV_1000_HD_LBN)) 752 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, 753 + C22EXT_MSTSLV_CTRL); 754 + if (reg & (1 << C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN)) 755 + adv |= ADVERTISED_1000baseT_Full; 756 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, 757 + C22EXT_MSTSLV_STATUS); 758 + if (reg & (1 << C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN)) 756 759 lpa |= ADVERTISED_1000baseT_Half; 757 - if (reg & (1 << C22EXT_MSTSLV_1000_FD_LBN)) 760 + if (reg & (1 << C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN)) 758 761 lpa |= ADVERTISED_1000baseT_Full; 759 762 } 760 - reg = mdio_clause45_read(efx, phy, MDIO_MMD_AN, MDIO_AN_10GBT_STATUS); 763 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 764 + MDIO_AN_10GBT_CTRL); 765 + if (reg & (1 << MDIO_AN_10GBT_CTRL_ADV_10G_LBN)) 766 + adv |= ADVERTISED_10000baseT_Full; 767 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 768 + MDIO_AN_10GBT_STATUS); 761 769 if (reg & (1 << MDIO_AN_10GBT_STATUS_LP_10G_LBN)) 762 770 lpa |= ADVERTISED_10000baseT_Full; 763 - return lpa; 764 - } 765 771 766 - static void sfx7101_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 767 - { 768 - mdio_clause45_get_settings_ext(efx, ecmd, ADVERTISED_10000baseT_Full, 769 - tenxpress_get_xnp_lpa(efx)); 770 - ecmd->supported |= SUPPORTED_10000baseT_Full; 771 - ecmd->advertising |= ADVERTISED_10000baseT_Full; 772 - } 772 + mdio_clause45_get_settings_ext(efx, ecmd, adv, lpa); 773 773 774 - static void sft9001_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 775 - { 776 - int phy_id = efx->mii.phy_id; 777 - u32 xnp_adv = 0; 778 - int reg; 779 - 780 - reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 781 - PMA_PMD_SPEED_ENABLE_REG); 782 - if (EFX_WORKAROUND_13204(efx) && (reg & (1 << PMA_PMD_100TX_ADV_LBN))) 783 - xnp_adv |= ADVERTISED_100baseT_Full; 784 - if (reg & (1 << PMA_PMD_1000T_ADV_LBN)) 785 - xnp_adv |= ADVERTISED_1000baseT_Full; 786 - if (reg & (1 << PMA_PMD_10000T_ADV_LBN)) 787 - xnp_adv |= ADVERTISED_10000baseT_Full; 788 - 789 - mdio_clause45_get_settings_ext(efx, ecmd, xnp_adv, 790 - tenxpress_get_xnp_lpa(efx)); 791 - 792 - ecmd->supported |= (SUPPORTED_100baseT_Half | 793 - SUPPORTED_100baseT_Full | 794 - SUPPORTED_1000baseT_Full); 795 - 796 - /* Use the vendor defined C22ext register for duplex settings */ 797 - if (ecmd->speed != SPEED_10000 && !ecmd->autoneg) { 798 - reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, 799 - GPHY_XCONTROL_REG); 800 - ecmd->duplex = (reg & (1 << GPHY_DUPLEX_LBN) ? 801 - DUPLEX_FULL : DUPLEX_HALF); 802 - } 774 + if (efx->phy_type != PHY_TYPE_SFX7101) 775 + ecmd->supported |= (SUPPORTED_100baseT_Full | 776 + SUPPORTED_1000baseT_Full); 803 777 804 778 /* In loopback, the PHY automatically brings up the correct interface, 805 779 * but doesn't advertise the correct speed. So override it */ 806 780 if (efx->loopback_mode == LOOPBACK_GPHY) 807 781 ecmd->speed = SPEED_1000; 808 - else if (LOOPBACK_MASK(efx) & SFT9001_LOOPBACKS) 782 + else if (LOOPBACK_MASK(efx) & efx->phy_op->loopbacks) 809 783 ecmd->speed = SPEED_10000; 810 784 } 811 785 812 - static int sft9001_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 786 + static int tenxpress_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 813 787 { 814 - int phy_id = efx->mii.phy_id; 815 - int rc; 788 + if (!ecmd->autoneg) 789 + return -EINVAL; 816 790 817 - rc = mdio_clause45_set_settings(efx, ecmd); 818 - if (rc) 819 - return rc; 820 - 821 - if (ecmd->speed != SPEED_10000 && !ecmd->autoneg) 822 - mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, 823 - GPHY_XCONTROL_REG, GPHY_DUPLEX_LBN, 824 - ecmd->duplex == DUPLEX_FULL); 825 - 826 - return rc; 791 + return mdio_clause45_set_settings(efx, ecmd); 827 792 } 828 793 829 - static bool sft9001_set_xnp_advertise(struct efx_nic *efx, u32 advertising) 794 + static void sfx7101_set_npage_adv(struct efx_nic *efx, u32 advertising) 830 795 { 831 - int phy = efx->mii.phy_id; 832 - int reg = mdio_clause45_read(efx, phy, MDIO_MMD_PMAPMD, 833 - PMA_PMD_SPEED_ENABLE_REG); 834 - bool enabled; 796 + mdio_clause45_set_flag(efx, efx->mii.phy_id, MDIO_MMD_AN, 797 + MDIO_AN_10GBT_CTRL, 798 + MDIO_AN_10GBT_CTRL_ADV_10G_LBN, 799 + advertising & ADVERTISED_10000baseT_Full); 800 + } 835 801 836 - reg &= ~((1 << 2) | (1 << 3)); 837 - if (EFX_WORKAROUND_13204(efx) && 838 - (advertising & ADVERTISED_100baseT_Full)) 839 - reg |= 1 << PMA_PMD_100TX_ADV_LBN; 840 - if (advertising & ADVERTISED_1000baseT_Full) 841 - reg |= 1 << PMA_PMD_1000T_ADV_LBN; 842 - if (advertising & ADVERTISED_10000baseT_Full) 843 - reg |= 1 << PMA_PMD_10000T_ADV_LBN; 844 - mdio_clause45_write(efx, phy, MDIO_MMD_PMAPMD, 845 - PMA_PMD_SPEED_ENABLE_REG, reg); 802 + static void sft9001_set_npage_adv(struct efx_nic *efx, u32 advertising) 803 + { 804 + int phy_id = efx->mii.phy_id; 846 805 847 - enabled = (advertising & 848 - (ADVERTISED_1000baseT_Half | 849 - ADVERTISED_1000baseT_Full | 850 - ADVERTISED_10000baseT_Full)); 851 - if (EFX_WORKAROUND_13204(efx)) 852 - enabled |= (advertising & ADVERTISED_100baseT_Full); 853 - return enabled; 806 + mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, 807 + C22EXT_MSTSLV_CTRL, 808 + C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN, 809 + advertising & ADVERTISED_1000baseT_Full); 810 + mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_AN, 811 + MDIO_AN_10GBT_CTRL, 812 + MDIO_AN_10GBT_CTRL_ADV_10G_LBN, 813 + advertising & ADVERTISED_10000baseT_Full); 854 814 } 855 815 856 816 struct efx_phy_operations falcon_sfx7101_phy_ops = { ··· 822 858 .poll = tenxpress_phy_poll, 823 859 .fini = tenxpress_phy_fini, 824 860 .clear_interrupt = efx_port_dummy_op_void, 825 - .get_settings = sfx7101_get_settings, 826 - .set_settings = mdio_clause45_set_settings, 861 + .get_settings = tenxpress_get_settings, 862 + .set_settings = tenxpress_set_settings, 863 + .set_npage_adv = sfx7101_set_npage_adv, 827 864 .num_tests = ARRAY_SIZE(sfx7101_test_names), 828 865 .test_names = sfx7101_test_names, 829 866 .run_tests = sfx7101_run_tests, ··· 839 874 .poll = tenxpress_phy_poll, 840 875 .fini = tenxpress_phy_fini, 841 876 .clear_interrupt = efx_port_dummy_op_void, 842 - .get_settings = sft9001_get_settings, 843 - .set_settings = sft9001_set_settings, 844 - .set_xnp_advertise = sft9001_set_xnp_advertise, 877 + .get_settings = tenxpress_get_settings, 878 + .set_settings = tenxpress_set_settings, 879 + .set_npage_adv = sft9001_set_npage_adv, 845 880 .num_tests = ARRAY_SIZE(sft9001_test_names), 846 881 .test_names = sft9001_test_names, 847 882 .run_tests = sft9001_run_tests,
-4
drivers/net/sfc/workarounds.h
··· 18 18 #define EFX_WORKAROUND_ALWAYS(efx) 1 19 19 #define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1) 20 20 #define EFX_WORKAROUND_10G(efx) EFX_IS10G(efx) 21 - #define EFX_WORKAROUND_SFT9001A(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A) 22 21 #define EFX_WORKAROUND_SFT9001(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A || \ 23 22 (efx)->phy_type == PHY_TYPE_SFT9001B) 24 23 ··· 54 55 55 56 /* Need to send XNP pages for 100BaseT */ 56 57 #define EFX_WORKAROUND_13204 EFX_WORKAROUND_SFT9001 57 - /* Need to keep AN enabled */ 58 - #define EFX_WORKAROUND_13963 EFX_WORKAROUND_SFT9001A 59 - 60 58 /* Don't restart AN in near-side loopback */ 61 59 #define EFX_WORKAROUND_15195 EFX_WORKAROUND_SFT9001 62 60