Lines Matching +full:asym +full:- +full:pause

1 // SPDX-License-Identifier: GPL-2.0-only
7 * (c) 2002-2007, Benjamin Herrenscmidt (benh@kernel.crashing.org)
10 * - Add support for PHYs that provide an IRQ line
11 * - Eventually moved the entire polling state machine in
14 * - On LXT971 & BCM5201, Apple uses some chip specific regs
17 * - Apple has some additional power management code for some
49 return phy->mdio_read(phy->dev, id, reg); in __sungem_phy_read()
54 phy->mdio_write(phy->dev, id, reg, val); in __sungem_phy_write()
59 return phy->mdio_read(phy->dev, phy->mii_id, reg); in sungem_phy_read()
64 phy->mdio_write(phy->dev, phy->mii_id, reg, val); in sungem_phy_write()
79 while (--limit) { in reset_one_mii_phy()
241 * in the tg3.c driver. -DaveM in bcm5401_init()
314 phy->autoneg = 1; in genmii_setup_aneg()
315 phy->speed = SPEED_10; in genmii_setup_aneg()
316 phy->duplex = DUPLEX_HALF; in genmii_setup_aneg()
317 phy->pause = 0; in genmii_setup_aneg()
318 phy->advertising = advertise; in genmii_setup_aneg()
345 phy->autoneg = 0; in genmii_setup_forced()
346 phy->speed = speed; in genmii_setup_forced()
347 phy->duplex = fd; in genmii_setup_forced()
348 phy->pause = 0; in genmii_setup_forced()
365 return -EINVAL; in genmii_setup_forced()
382 if (phy->autoneg && !(status & BMSR_ANEGCOMPLETE)) in genmii_poll_link()
391 if (phy->autoneg) { in genmii_read_link()
395 phy->duplex = DUPLEX_FULL; in genmii_read_link()
397 phy->duplex = DUPLEX_HALF; in genmii_read_link()
399 phy->speed = SPEED_100; in genmii_read_link()
401 phy->speed = SPEED_10; in genmii_read_link()
402 phy->pause = 0; in genmii_read_link()
404 /* On non-aneg, we assume what we put in BMCR is the speed, in genmii_read_link()
405 * though magic-aneg shouldn't prevent this case from occurring in genmii_read_link()
448 if (phy->platform_data) { in bcm5421_init()
449 struct device_node *np = of_get_parent(phy->platform_data); in bcm5421_init()
451 if (np == NULL || of_get_property(np, "no-autolowpower", NULL)) in bcm5421_init()
455 /* Enable automatic low-power */ in bcm5421_init()
470 phy->autoneg = 1; in bcm54xx_setup_aneg()
471 phy->speed = SPEED_10; in bcm54xx_setup_aneg()
472 phy->duplex = DUPLEX_HALF; in bcm54xx_setup_aneg()
473 phy->pause = 0; in bcm54xx_setup_aneg()
474 phy->advertising = advertise; in bcm54xx_setup_aneg()
514 phy->autoneg = 0; in bcm54xx_setup_forced()
515 phy->speed = speed; in bcm54xx_setup_forced()
516 phy->duplex = fd; in bcm54xx_setup_forced()
517 phy->pause = 0; in bcm54xx_setup_forced()
550 if (phy->autoneg) { in bcm54xx_read_link()
554 phy->duplex = phy_BCM5400_link_table[link_mode][0] ? in bcm54xx_read_link()
556 phy->speed = phy_BCM5400_link_table[link_mode][2] ? in bcm54xx_read_link()
561 phy->pause = (phy->duplex == DUPLEX_FULL) && in bcm54xx_read_link()
564 /* On non-aneg, we assume what we put in BMCR is the speed, in bcm54xx_read_link()
565 * though magic-aneg shouldn't prevent this case from occurring in bcm54xx_read_link()
633 phy->speed = SPEED_1000; in bcm5421_read_link()
635 /* find out whether we are running half- or full duplex */ in bcm5421_read_link()
640 phy->duplex |= DUPLEX_HALF; in bcm5421_read_link()
642 phy->duplex |= DUPLEX_FULL; in bcm5421_read_link()
660 phy->autoneg = autoneg; in bcm5421_enable_fiber()
709 phy->speed = SPEED_1000; in bcm5461_read_link()
711 /* find out whether we are running half- or full duplex */ in bcm5461_read_link()
716 phy->duplex |= DUPLEX_FULL; in bcm5461_read_link()
718 phy->duplex |= DUPLEX_HALF; in bcm5461_read_link()
725 /* select fiber mode, enable 1000 base-X registers */ in bcm5461_enable_fiber()
737 phy->autoneg = autoneg; in bcm5461_enable_fiber()
746 phy->autoneg = 1; in marvell_setup_aneg()
747 phy->speed = SPEED_10; in marvell_setup_aneg()
748 phy->duplex = DUPLEX_HALF; in marvell_setup_aneg()
749 phy->pause = 0; in marvell_setup_aneg()
750 phy->advertising = advertise; in marvell_setup_aneg()
797 phy->autoneg = 0; in marvell_setup_forced()
798 phy->speed = speed; in marvell_setup_forced()
799 phy->duplex = fd; in marvell_setup_forced()
800 phy->pause = 0; in marvell_setup_forced()
847 if (phy->autoneg) { in marvell_read_link()
850 return -EAGAIN; in marvell_read_link()
852 phy->speed = SPEED_1000; in marvell_read_link()
854 phy->speed = SPEED_100; in marvell_read_link()
856 phy->speed = SPEED_10; in marvell_read_link()
858 phy->duplex = DUPLEX_FULL; in marvell_read_link()
860 phy->duplex = DUPLEX_HALF; in marvell_read_link()
863 phy->pause = (status & pmask) == pmask; in marvell_read_link()
865 /* On non-aneg, we assume what we put in BMCR is the speed, in marvell_read_link()
866 * though magic-aneg shouldn't prevent this case from occurring in marvell_read_link()
878 /* On gigabit capable PHYs, we advertise Pause support but not asym pause
880 * it neither. --BenH.
1020 /* Broadcom BCM 5421 built-in K2 */
1033 .name = "BCM5421-K2",
1058 /* Broadcom BCM 5462 built-in Vesta */
1071 .name = "BCM5462-Vesta",
1168 * may re-probe the PHY regulary in sungem_phy_probe()
1170 phy->mii_id = mii_id; in sungem_phy_probe()
1182 if ((id & def->phy_id_mask) == def->phy_id) in sungem_phy_probe()
1188 phy->def = def; in sungem_phy_probe()
1192 phy->speed = 0; in sungem_phy_probe()
1193 phy->duplex = 0; in sungem_phy_probe()
1194 phy->pause = 0; in sungem_phy_probe()
1195 phy->advertising = 0; in sungem_phy_probe()
1196 return -ENODEV; in sungem_phy_probe()