WSL2-Linux-Kernel/drivers/net/phy
Timur Tabi 529ed12752 net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause
Instead of having individual PHY drivers set the SUPPORTED_Pause and
SUPPORTED_Asym_Pause flags, phylib itself should set those flags,
unless there is a hardware erratum or other special case.  During
autonegotiation, the PHYs will determine whether to enable pause
frame support.

Pause frames are a feature that is supported by the MAC.  It is the MAC
that generates the frames and that processes them.  The PHY can only be
configured to allow them to pass through.

This commit also effectively reverts the recently applied c7a61319
("net: phy: dp83848: Support ethernet pause frames").

So the new process is:

1) Unless the PHY driver overrides it, phylib sets the SUPPORTED_Pause
and SUPPORTED_AsymPause bits in phydev->supported.  This indicates that
the PHY supports pause frames.

2) The MAC driver checks phydev->supported before it calls phy_start().
If (SUPPORTED_Pause | SUPPORTED_AsymPause) is set, then the MAC driver
sets those bits in phydev->advertising, if it wants to enable pause
frame support.

3) When the link state changes, the MAC driver checks phydev->pause and
phydev->asym_pause,  If the bits are set, then it enables the corresponding
features in the MAC.  The algorithm is:

	if (phydev->pause)
		The MAC should be programmed to receive and honor
                pause frames it receives, i.e. enable receive flow control.

	if (phydev->pause != phydev->asym_pause)
		The MAC should be programmed to transmit pause
		frames when needed, i.e. enable transmit flow control.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-10 23:31:19 -05:00
..
Kconfig net: phy: Add Meson GXL Internal PHY driver 2016-11-09 12:50:55 -05:00
Makefile net: phy: Add Meson GXL Internal PHY driver 2016-11-09 12:50:55 -05:00
amd.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
aquantia.c net: phy: aquantia: add PHY ID of AQR106 and AQR107 2016-10-20 14:25:23 -04:00
at803x.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-10-30 12:42:58 -04:00
bcm-cygnus.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
bcm-phy-lib.c net: phy: broadcom: Add support code for reading PHY counters 2016-11-30 10:22:27 -05:00
bcm-phy-lib.h net: phy: broadcom: Add support code for reading PHY counters 2016-11-30 10:22:27 -05:00
bcm7xxx.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
bcm63xx.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
bcm87xx.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
broadcom.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
cicada.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
davicom.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
dp83640.c ptp: dp83640: Use the high resolution frequency method. 2016-11-09 21:19:53 -05:00
dp83640_reg.h
dp83848.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
dp83867.c net: phy: dp83867: add support for MAC impedance configuration 2016-10-18 10:42:16 -04:00
et1011c.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
fixed_phy.c net: phy: fixed_phy: fix of_node leak in fixed_phy_unregister 2016-11-17 12:05:05 -05:00
icplus.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
intel-xway.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
lxt.c lxt: simplify lxt970_config_init() 2016-05-16 13:53:20 -04:00
marvell.c net: phy: Fix the mdix_ctrl changes 2016-12-01 11:26:48 -05:00
mdio-bcm-iproc.c net: phy: Broadcom iProc MDIO bus driver 2015-10-08 04:44:46 -07:00
mdio-bcm-unimac.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
mdio-bitbang.c net: phy: mdio-gpio: Handle phy_ignore_ta_mask 2015-05-14 13:40:55 -04:00
mdio-cavium.c phy: mdio-cavium: Add missing MODULE_* annotations. 2016-03-16 19:55:37 -04:00
mdio-cavium.h phy: mdio-octeon: Refactor into two files/modules 2016-03-14 15:27:22 -04:00
mdio-gpio.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
mdio-hisi-femac.c net: Add MDIO bus driver for the Hisilicon FEMAC 2016-07-16 21:32:58 -07:00
mdio-moxart.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
mdio-mux-bcm-iproc.c net: mdio-mux: Add MDIO mux driver for iProc SoCs 2016-06-10 23:24:54 -07:00
mdio-mux-gpio.c mdio: mux: Enhanced MDIO mux framework for integrated multiplexers 2016-06-10 23:24:53 -07:00
mdio-mux-mmioreg.c net: mdio-mux-mmioreg: Add support for 16bit and 32bit register sizes 2016-11-09 12:50:55 -05:00
mdio-mux.c mdio: mux: avoid 'maybe-uninitialized' warning 2016-06-15 20:48:52 -07:00
mdio-octeon.c phy: mdio-octeon: Refactor into two files/modules 2016-03-14 15:27:22 -04:00
mdio-sun4i.c mdio-sun4i: oops in error handling in probe 2016-03-21 11:30:01 -04:00
mdio-thunder.c phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses. 2016-03-14 15:27:22 -04:00
mdio-xgene.c drivers: net: phy: xgene: Fix 'remove' function 2016-09-13 12:04:11 -04:00
mdio-xgene.h drivers: net: phy: xgene: Add MDIO driver 2016-07-25 21:51:43 -07:00
mdio_bus.c net/phy: add trace events for mdio accesses 2016-11-24 11:55:43 -05:00
mdio_device.c mdio: Demote print from info to debug in mdio_driver_register 2016-11-14 16:40:16 -05:00
meson-gxl.c net: phy: Add Meson GXL Internal PHY driver 2016-11-09 12:50:55 -05:00
micrel.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
microchip.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
mscc.c net: phy: Add mdi(x) support in Microsemi PHYs driver 2016-12-01 11:26:47 -05:00
national.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
phy.c net: phy: update the mdix_ctrl with correct value. 2016-12-01 11:26:47 -05:00
phy_device.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
phy_led_triggers.c phy: fix error case of phy_led_triggers_(un)register 2016-11-25 19:57:57 -05:00
qsemi.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
realtek.c net: phy: realtek: fix enabling of the TX-delay for RTL8211F 2016-11-28 12:06:54 -05:00
smsc.c net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
spi_ks8995.c net: phy: spi_ks8895: Don't leak references to SPI devices 2016-04-21 15:00:27 -04:00
ste10Xp.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
swphy.c phy: generate swphy registers on the fly 2016-06-27 10:40:57 -04:00
swphy.h phy: generate swphy registers on the fly 2016-06-27 10:40:57 -04:00
teranetics.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
vitesse.c net: phy: vitesse: add support for VSC8572 2016-12-02 10:36:47 -05:00
xilinx_gmii2rgmii.c net: phy: xgmiitorgmii: Fix non static symbol warning 2016-08-23 17:17:48 -07:00