2019-05-27 08:55:01 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2018-12-26 06:35:23 -06:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:13 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2006-10-03 16:18:28 +01:00
|
|
|
|
2018-09-29 23:04:09 +02:00
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
2016-01-06 20:11:07 +01:00
|
|
|
|
2006-10-03 16:18:28 +01:00
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2015-09-24 20:36:02 +01:00
|
|
|
|
2006-10-03 16:18:28 +01:00
|
|
|
|
|
|
|
|
|
2010-04-02 01:05:27 +00:00
|
|
|
|
2020-01-15 20:48:50 -08:00
|
|
|
|
2020-03-16 22:32:33 +01:00
|
|
|
|
2020-03-23 23:05:53 +08:00
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2011-07-26 16:09:06 -07:00
|
|
|
|
2007-09-28 22:42:14 -07:00
|
|
|
|
2013-12-05 14:52:13 -08:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-05 14:52:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2018-09-29 23:04:16 +02:00
|
|
|
|
|
|
|
|
|
2023-01-09 17:59:58 +01:00
|
|
|
|
2018-09-29 23:04:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-15 16:55:30 +01:00
|
|
|
|
2018-09-29 23:04:16 +02:00
|
|
|
|
2023-02-11 08:41:06 +01:00
|
|
|
|
2013-12-05 14:52:13 -08:00
|
|
|
|
2018-09-29 23:04:16 +02:00
|
|
|
|
|
|
|
|
|
2023-01-09 17:59:58 +01:00
|
|
|
|
2018-09-29 23:04:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-15 16:55:30 +01:00
|
|
|
|
2018-09-29 23:04:16 +02:00
|
|
|
|
2023-02-11 08:41:06 +01:00
|
|
|
|
2013-12-05 14:52:13 -08:00
|
|
|
|
2019-07-10 21:03:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-10 23:43:33 +01:00
|
|
|
|
2022-04-29 18:34:31 +03:00
|
|
|
|
2023-01-09 17:59:58 +01:00
|
|
|
|
2018-11-10 23:43:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
2021-02-14 15:16:23 +01:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2021-02-14 15:16:23 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2018-11-09 18:17:22 +01:00
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:32 +02:00
|
|
|
|
2016-01-06 20:11:26 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-08 22:25:44 -08:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-04 17:01:48 +03:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-15 17:11:17 +00:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-13 12:56:25 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2021-02-16 20:20:53 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-11 14:54:51 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2022-08-17 14:32:52 +02:00
|
|
|
|
2022-09-02 18:02:39 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
2011-07-05 16:42:09 +08:00
|
|
|
|
2017-06-23 10:33:14 -07:00
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-28 04:07:21 +00:00
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
2021-06-04 17:01:48 +03:00
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
2007-04-13 01:25:57 -05:00
|
|
|
|
2007-11-26 16:17:48 -06:00
|
|
|
|
|
|
|
|
|
2011-07-05 16:42:09 +08:00
|
|
|
|
|
|
|
|
|
2014-01-10 14:26:46 +08:00
|
|
|
|
2020-03-12 18:10:09 +01:00
|
|
|
|
2014-02-13 16:08:42 -08:00
|
|
|
|
2014-04-15 15:50:19 +02:00
|
|
|
|
2016-09-22 10:33:54 +08:00
|
|
|
|
2021-01-13 12:56:25 +01:00
|
|
|
|
2017-02-04 20:02:49 +01:00
|
|
|
|
|
|
|
|
|
2021-02-16 20:20:53 +01:00
|
|
|
|
2017-02-04 20:02:49 +01:00
|
|
|
|
2017-06-05 12:23:10 +01:00
|
|
|
|
2020-01-03 20:43:17 +00:00
|
|
|
|
|
|
|
|
|
2021-06-11 14:54:51 +02:00
|
|
|
|
2019-05-23 20:06:49 +02:00
|
|
|
|
2020-01-03 20:43:17 +00:00
|
|
|
|
|
|
|
|
|
2022-08-17 14:32:52 +02:00
|
|
|
|
2022-09-02 18:02:39 -04:00
|
|
|
|
2014-02-11 17:27:39 -08:00
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
|
|
|
|
|
2021-10-26 11:06:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: phy: remove kernel-doc duplication
Sphinx 3 now checks for duplicated function declarations:
.../Documentation/networking/kapi:143: ../include/linux/phy.h:163: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'unsigned int phy_supported_speeds (struct phy_device *phy, unsigned int *speeds, unsigned int size)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1034: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1076: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1088: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1100: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
It turns that both the C and the H files have the same
kernel-doc markup for the same functions. Let's drop the
at the header file, keeping the one closer to the code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/75e9a357f9a716833d2094b04898754876365e68.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-27 10:51:18 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2016-10-17 10:49:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-11 17:27:39 -08:00
|
|
|
|
2018-12-26 06:35:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2014-02-11 17:27:39 -08:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2014-02-11 17:27:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-23 10:33:14 -07:00
|
|
|
|
|
|
|
|
|
2014-02-11 17:27:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-04 17:01:48 +03:00
|
|
|
|
|
|
|
|
|
2014-02-11 17:27:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 18:10:09 +01:00
|
|
|
|
|
|
|
|
|
2014-02-13 16:08:42 -08:00
|
|
|
|
|
|
|
|
|
2014-04-15 15:50:19 +02:00
|
|
|
|
|
|
|
|
|
2016-09-22 10:33:54 +08:00
|
|
|
|
|
|
|
|
|
2017-02-04 20:02:49 +01:00
|
|
|
|
|
|
|
|
|
2022-09-02 18:02:39 -04:00
|
|
|
|
|
|
|
|
|
2017-02-04 20:02:49 +01:00
|
|
|
|
|
|
|
|
|
2021-02-16 20:20:53 +01:00
|
|
|
|
|
|
|
|
|
2017-02-04 20:02:49 +01:00
|
|
|
|
|
|
|
|
|
2017-06-05 12:23:10 +01:00
|
|
|
|
|
|
|
|
|
2020-01-03 20:43:17 +00:00
|
|
|
|
|
|
|
|
|
2021-06-11 14:54:51 +02:00
|
|
|
|
|
|
|
|
|
2019-05-23 20:06:49 +02:00
|
|
|
|
|
|
|
|
|
2020-01-03 20:43:17 +00:00
|
|
|
|
|
|
|
|
|
2021-01-13 12:56:25 +01:00
|
|
|
|
|
|
|
|
|
2022-08-17 14:32:52 +02:00
|
|
|
|
|
|
|
|
|
2014-02-11 17:27:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2006-01-11 11:27:33 -08:00
|
|
|
|
2008-04-09 19:38:13 -05:00
|
|
|
|
|
|
|
|
|
2017-01-19 17:05:04 +01:00
|
|
|
|
2006-01-11 11:27:33 -08:00
|
|
|
|
2012-01-30 11:46:54 -05:00
|
|
|
|
phylink: add phylink infrastructure
The link between the ethernet MAC and its PHY has become more complex
as the interface evolves. This is especially true with serdes links,
where the part of the PHY is effectively integrated into the MAC.
Serdes links can be connected to a variety of devices, including SFF
modules soldered down onto the board with the MAC, a SFP cage with
a hotpluggable SFP module which may contain a PHY or directly modulate
the serdes signals onto optical media with or without a PHY, or even
a classical PHY connection.
Moreover, the negotiation information on serdes links comes in two
varieties - SGMII mode, where the PHY provides its speed/duplex/flow
control information to the MAC, and 1000base-X mode where both ends
exchange their abilities and each resolve the link capabilities.
This means we need a more flexible means to support these arrangements,
particularly with the hotpluggable nature of SFP, where the PHY can
be attached or detached after the network device has been brought up.
Ethtool information can come from multiple sources:
- we may have a PHY operating in either SGMII or 1000base-X mode, in
which case we take ethtool/mii data directly from the PHY.
- we may have a optical SFP module without a PHY, with the MAC
operating in 1000base-X mode - the ethtool/mii data needs to come
from the MAC.
- we may have a copper SFP module with a PHY whic can't be accessed,
which means we need to take ethtool/mii data from the MAC.
Phylink aims to solve this by providing an intermediary between the
MAC and PHY, providing a safe way for PHYs to be hotplugged, and
allowing a SFP driver to reconfigure the serdes connection.
Phylink also takes over support of fixed link connections, where the
speed/duplex/flow control are fixed, but link status may be controlled
by a GPIO signal. By avoiding the fixed-phy implementation, phylink
can provide a faster response to link events: fixed-phy has to wait for
phylib to operate its state machine, which can take several seconds.
In comparison, phylink takes milliseconds.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- remove sync status
- rework supported and advertisment handling
- add 1000base-x speed for fixed links
- use functionality exported from phy-core, reworking
__phylink_ethtool_ksettings_set for it
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-25 15:03:13 +01:00
|
|
|
|
2019-11-15 19:56:51 +00:00
|
|
|
|
|
|
|
|
|
2012-01-30 11:46:54 -05:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 20:48:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-23 16:30:07 +02:00
|
|
|
|
|
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2015-09-24 20:36:02 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2008-04-09 19:38:13 -05:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2016-01-06 20:11:06 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2016-01-06 20:11:06 +01:00
|
|
|
|
2023-01-09 16:30:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2020-01-15 20:48:50 -08:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
2008-01-29 10:05:09 -06:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2008-10-01 15:41:33 +00:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2008-10-08 16:33:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2008-10-08 16:33:40 -07:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2016-01-06 20:11:18 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-11-02 16:13:06 -07:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2015-05-12 10:33:24 -07:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:15 +01:00
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
2016-01-06 20:11:15 +01:00
|
|
|
|
2017-04-21 16:15:38 +03:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2017-04-21 16:15:38 +03:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-07-30 21:57:48 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2017-06-12 23:55:38 +03:00
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2008-10-08 16:33:40 -07:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-12 15:23:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-24 20:36:02 +01:00
|
|
|
|
2020-06-29 14:03:43 +02:00
|
|
|
|
|
|
|
|
|
2015-09-24 20:36:02 +01:00
|
|
|
|
2020-06-29 14:03:43 +02:00
|
|
|
|
|
|
|
|
|
2020-04-20 23:29:05 +02:00
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
|
|
|
|
|
2014-04-30 15:23:33 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-24 16:53:58 -06:00
|
|
|
|
2023-01-18 11:01:36 +01:00
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
2018-11-09 18:35:52 +01:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2018-11-10 23:40:50 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2018-12-16 18:30:14 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-06-18 14:45:58 +01:00
|
|
|
|
|
|
|
|
|
2012-06-27 07:33:35 +00:00
|
|
|
|
|
|
|
|
|
2020-06-18 14:46:08 +01:00
|
|
|
|
|
|
|
|
|
2012-06-27 07:33:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-18 14:46:08 +01:00
|
|
|
|
2020-06-18 14:46:13 +01:00
|
|
|
|
2012-06-27 07:33:35 +00:00
|
|
|
|
2010-07-17 08:49:36 +00:00
|
|
|
|
2020-01-13 23:31:40 +01:00
|
|
|
|
2020-01-13 23:31:42 +01:00
|
|
|
|
2020-01-13 23:31:40 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2022-11-30 10:12:16 +08:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-16 16:54:53 -06:00
|
|
|
|
2021-04-07 17:51:56 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2021-12-06 16:12:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2021-02-09 17:38:52 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-11 08:41:06 +01:00
|
|
|
|
2023-02-22 06:50:42 +01:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2022-09-30 16:21:03 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
net: phy: Add support for rate matching
This adds support for rate matching (also known as rate adaptation) to
the phy subsystem. The general idea is that the phy interface runs at
one speed, and the MAC throttles the rate at which it sends packets to
the link speed. There's a good overview of several techniques for
achieving this at [1]. This patch adds support for three: pause-frame
based (such as in Aquantia phys), CRS-based (such as in 10PASS-TS and
2BASE-TL), and open-loop-based (such as in 10GBASE-W).
This patch makes a few assumptions and a few non assumptions about the
types of rate matching available. First, it assumes that different phys
may use different forms of rate matching. Second, it assumes that phys
can use rate matching for any of their supported link speeds (e.g. if a
phy supports 10BASE-T and XGMII, then it can adapt XGMII to 10BASE-T).
Third, it does not assume that all interface modes will use the same
form of rate matching. Fourth, it does not assume that all phy devices
will support rate matching (even if some do). Relaxing or strengthening
these (non-)assumptions could result in a different API. For example, if
all interface modes were assumed to use the same form of rate matching,
then a bitmask of interface modes supportting rate matching would
suffice.
For some better visibility into the process, the current rate matching
mode is exposed as part of the ethtool ksettings. For the moment, only
read access is supported. I'm not sure what userspace might want to
configure yet (disable it altogether, disable just one mode, specify the
mode to use, etc.). For the moment, since only pause-based rate
adaptation support is added in the next few commits, rate matching can
be disabled altogether by adjusting the advertisement.
802.3 calls this feature "rate adaptation" in clause 49 (10GBASE-R) and
"rate matching" in clause 61 (10PASS-TL and 2BASE-TS). Aquantia also calls
this feature "rate adaptation". I chose "rate matching" because it is
shorter, and because Russell doesn't think "adaptation" is correct in this
context.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-09-20 18:12:31 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-29 18:34:34 +03:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2022-06-28 12:15:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-03 08:51:59 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2022-11-04 12:01:25 -07:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:16 +01:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-30 10:12:16 +08:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2012-06-27 07:33:35 +00:00
|
|
|
|
2018-05-23 08:05:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-05 21:23:13 +02:00
|
|
|
|
2018-05-23 08:05:20 +02:00
|
|
|
|
|
|
|
|
|
2020-03-12 22:25:20 +01:00
|
|
|
|
2018-05-23 08:05:20 +02:00
|
|
|
|
|
|
|
|
|
2020-03-20 17:51:38 +01:00
|
|
|
|
2021-02-16 16:54:53 -06:00
|
|
|
|
2021-04-07 17:51:56 +02:00
|
|
|
|
2018-05-23 08:05:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-02 20:43:30 +02:00
|
|
|
|
2012-06-27 07:33:35 +00:00
|
|
|
|
2018-11-09 18:35:52 +01:00
|
|
|
|
|
|
|
|
|
2022-06-28 12:15:08 +02:00
|
|
|
|
|
|
|
|
|
2018-11-09 18:35:52 +01:00
|
|
|
|
net: phy: Add support for rate matching
This adds support for rate matching (also known as rate adaptation) to
the phy subsystem. The general idea is that the phy interface runs at
one speed, and the MAC throttles the rate at which it sends packets to
the link speed. There's a good overview of several techniques for
achieving this at [1]. This patch adds support for three: pause-frame
based (such as in Aquantia phys), CRS-based (such as in 10PASS-TS and
2BASE-TL), and open-loop-based (such as in 10GBASE-W).
This patch makes a few assumptions and a few non assumptions about the
types of rate matching available. First, it assumes that different phys
may use different forms of rate matching. Second, it assumes that phys
can use rate matching for any of their supported link speeds (e.g. if a
phy supports 10BASE-T and XGMII, then it can adapt XGMII to 10BASE-T).
Third, it does not assume that all interface modes will use the same
form of rate matching. Fourth, it does not assume that all phy devices
will support rate matching (even if some do). Relaxing or strengthening
these (non-)assumptions could result in a different API. For example, if
all interface modes were assumed to use the same form of rate matching,
then a bitmask of interface modes supportting rate matching would
suffice.
For some better visibility into the process, the current rate matching
mode is exposed as part of the ethtool ksettings. For the moment, only
read access is supported. I'm not sure what userspace might want to
configure yet (disable it altogether, disable just one mode, specify the
mode to use, etc.). For the moment, since only pause-based rate
adaptation support is added in the next few commits, rate matching can
be disabled altogether by adjusting the advertisement.
802.3 calls this feature "rate adaptation" in clause 49 (10GBASE-R) and
"rate matching" in clause 61 (10PASS-TL and 2BASE-TS). Aquantia also calls
this feature "rate adaptation". I chose "rate matching" because it is
shorter, and because Russell doesn't think "adaptation" is correct in this
context.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-09-20 18:12:31 -04:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-01 12:01:06 -06:00
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-09 17:38:52 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-05-05 08:35:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2018-11-10 23:43:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-10 23:43:34 +01:00
|
|
|
|
2019-08-12 23:52:19 +02:00
|
|
|
|
|
|
|
|
|
2023-02-11 08:41:06 +01:00
|
|
|
|
|
|
|
|
|
2023-02-22 06:50:42 +01:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2022-09-30 16:21:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-28 10:46:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-17 10:49:55 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-02 00:49:18 +01:00
|
|
|
|
|
|
|
|
|
2016-10-17 10:49:55 -05:00
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2009-03-13 15:41:19 -07:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2008-01-29 10:05:09 -06:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2019-11-15 19:56:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phylink: add phylink infrastructure
The link between the ethernet MAC and its PHY has become more complex
as the interface evolves. This is especially true with serdes links,
where the part of the PHY is effectively integrated into the MAC.
Serdes links can be connected to a variety of devices, including SFF
modules soldered down onto the board with the MAC, a SFP cage with
a hotpluggable SFP module which may contain a PHY or directly modulate
the serdes signals onto optical media with or without a PHY, or even
a classical PHY connection.
Moreover, the negotiation information on serdes links comes in two
varieties - SGMII mode, where the PHY provides its speed/duplex/flow
control information to the MAC, and 1000base-X mode where both ends
exchange their abilities and each resolve the link capabilities.
This means we need a more flexible means to support these arrangements,
particularly with the hotpluggable nature of SFP, where the PHY can
be attached or detached after the network device has been brought up.
Ethtool information can come from multiple sources:
- we may have a PHY operating in either SGMII or 1000base-X mode, in
which case we take ethtool/mii data directly from the PHY.
- we may have a optical SFP module without a PHY, with the MAC
operating in 1000base-X mode - the ethtool/mii data needs to come
from the MAC.
- we may have a copper SFP module with a PHY whic can't be accessed,
which means we need to take ethtool/mii data from the MAC.
Phylink aims to solve this by providing an intermediary between the
MAC and PHY, providing a safe way for PHYs to be hotplugged, and
allowing a SFP driver to reconfigure the serdes connection.
Phylink also takes over support of fixed link connections, where the
speed/duplex/flow control are fixed, but link status may be controlled
by a GPIO signal. By avoiding the fixed-phy implementation, phylink
can provide a faster response to link events: fixed-phy has to wait for
phylib to operate its state machine, which can take several seconds.
In comparison, phylink takes milliseconds.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- remove sync status
- rework supported and advertisment handling
- add 1000base-x speed for fixed links
- use functionality exported from phy-core, reworking
__phylink_ethtool_ksettings_set for it
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-25 15:03:13 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2022-10-03 08:51:59 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2015-07-10 13:56:54 +12:00
|
|
|
|
2016-11-29 15:16:46 +05:30
|
|
|
|
2015-07-10 13:56:54 +12:00
|
|
|
|
2022-04-29 18:34:34 +03:00
|
|
|
|
|
|
|
|
|
2022-11-04 12:01:25 -07:00
|
|
|
|
|
|
|
|
|
2020-05-18 15:23:59 -07:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-01-13 23:31:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
mdio, phy: fix -Wshadow warnings triggered by nested container_of()
container_of() macro hides a local variable '__mptr' inside. This
becomes a problem when several container_of() are nested in each
other within single line or plain macros.
As C preprocessor doesn't support generating random variable names,
the sole solution is to avoid defining macros that consist only of
container_of() calls, or they will self-shadow '__mptr' each time:
In file included from ./include/linux/bitmap.h:10,
from drivers/net/phy/phy_device.c:12:
drivers/net/phy/phy_device.c: In function ‘phy_device_release’:
./include/linux/kernel.h:693:8: warning: declaration of ‘__mptr’ shadows a previous local [-Wshadow]
693 | void *__mptr = (void *)(ptr); \
| ^~~~~~
./include/linux/phy.h:647:26: note: in expansion of macro ‘container_of’
647 | #define to_phy_device(d) container_of(to_mdio_device(d), \
| ^~~~~~~~~~~~
./include/linux/mdio.h:52:27: note: in expansion of macro ‘container_of’
52 | #define to_mdio_device(d) container_of(d, struct mdio_device, dev)
| ^~~~~~~~~~~~
./include/linux/phy.h:647:39: note: in expansion of macro ‘to_mdio_device’
647 | #define to_phy_device(d) container_of(to_mdio_device(d), \
| ^~~~~~~~~~~~~~
drivers/net/phy/phy_device.c:217:8: note: in expansion of macro ‘to_phy_device’
217 | kfree(to_phy_device(dev));
| ^~~~~~~~~~~~~
./include/linux/kernel.h:693:8: note: shadowed declaration is here
693 | void *__mptr = (void *)(ptr); \
| ^~~~~~
./include/linux/phy.h:647:26: note: in expansion of macro ‘container_of’
647 | #define to_phy_device(d) container_of(to_mdio_device(d), \
| ^~~~~~~~~~~~
drivers/net/phy/phy_device.c:217:8: note: in expansion of macro ‘to_phy_device’
217 | kfree(to_phy_device(dev));
| ^~~~~~~~~~~~~
As they are declared in header files, these warnings are highly
repetitive and very annoying (along with the one from linux/pci.h).
Convert the related macros from linux/{mdio,phy}.h to static inlines
to avoid self-shadowing and potentially improve bug-catching.
No functional changes implied.
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20210116161246.67075-1-alobakin@pm.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-16 16:13:22 +00:00
|
|
|
|
2023-01-09 13:30:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mdio, phy: fix -Wshadow warnings triggered by nested container_of()
container_of() macro hides a local variable '__mptr' inside. This
becomes a problem when several container_of() are nested in each
other within single line or plain macros.
As C preprocessor doesn't support generating random variable names,
the sole solution is to avoid defining macros that consist only of
container_of() calls, or they will self-shadow '__mptr' each time:
In file included from ./include/linux/bitmap.h:10,
from drivers/net/phy/phy_device.c:12:
drivers/net/phy/phy_device.c: In function ‘phy_device_release’:
./include/linux/kernel.h:693:8: warning: declaration of ‘__mptr’ shadows a previous local [-Wshadow]
693 | void *__mptr = (void *)(ptr); \
| ^~~~~~
./include/linux/phy.h:647:26: note: in expansion of macro ‘container_of’
647 | #define to_phy_device(d) container_of(to_mdio_device(d), \
| ^~~~~~~~~~~~
./include/linux/mdio.h:52:27: note: in expansion of macro ‘container_of’
52 | #define to_mdio_device(d) container_of(d, struct mdio_device, dev)
| ^~~~~~~~~~~~
./include/linux/phy.h:647:39: note: in expansion of macro ‘to_mdio_device’
647 | #define to_phy_device(d) container_of(to_mdio_device(d), \
| ^~~~~~~~~~~~~~
drivers/net/phy/phy_device.c:217:8: note: in expansion of macro ‘to_phy_device’
217 | kfree(to_phy_device(dev));
| ^~~~~~~~~~~~~
./include/linux/kernel.h:693:8: note: shadowed declaration is here
693 | void *__mptr = (void *)(ptr); \
| ^~~~~~
./include/linux/phy.h:647:26: note: in expansion of macro ‘container_of’
647 | #define to_phy_device(d) container_of(to_mdio_device(d), \
| ^~~~~~~~~~~~
drivers/net/phy/phy_device.c:217:8: note: in expansion of macro ‘to_phy_device’
217 | kfree(to_phy_device(dev));
| ^~~~~~~~~~~~~
As they are declared in header files, these warnings are highly
repetitive and very annoying (along with the one from linux/pci.h).
Convert the related macros from linux/{mdio,phy}.h to static inlines
to avoid self-shadowing and potentially improve bug-catching.
No functional changes implied.
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20210116161246.67075-1-alobakin@pm.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-16 16:13:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-27 00:21:41 +02:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-27 00:21:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-09 17:59:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-17 14:22:36 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2017-11-30 23:46:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:26 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2017-11-27 08:16:45 +01:00
|
|
|
|
2018-09-29 23:04:16 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2014-11-19 12:59:14 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2014-02-17 13:34:03 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-09 15:24:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: phy: Add support for rate matching
This adds support for rate matching (also known as rate adaptation) to
the phy subsystem. The general idea is that the phy interface runs at
one speed, and the MAC throttles the rate at which it sends packets to
the link speed. There's a good overview of several techniques for
achieving this at [1]. This patch adds support for three: pause-frame
based (such as in Aquantia phys), CRS-based (such as in 10PASS-TS and
2BASE-TL), and open-loop-based (such as in 10GBASE-W).
This patch makes a few assumptions and a few non assumptions about the
types of rate matching available. First, it assumes that different phys
may use different forms of rate matching. Second, it assumes that phys
can use rate matching for any of their supported link speeds (e.g. if a
phy supports 10BASE-T and XGMII, then it can adapt XGMII to 10BASE-T).
Third, it does not assume that all interface modes will use the same
form of rate matching. Fourth, it does not assume that all phy devices
will support rate matching (even if some do). Relaxing or strengthening
these (non-)assumptions could result in a different API. For example, if
all interface modes were assumed to use the same form of rate matching,
then a bitmask of interface modes supportting rate matching would
suffice.
For some better visibility into the process, the current rate matching
mode is exposed as part of the ethtool ksettings. For the moment, only
read access is supported. I'm not sure what userspace might want to
configure yet (disable it altogether, disable just one mode, specify the
mode to use, etc.). For the moment, since only pause-based rate
adaptation support is added in the next few commits, rate matching can
be disabled altogether by adjusting the advertisement.
802.3 calls this feature "rate adaptation" in clause 49 (10GBASE-R) and
"rate matching" in clause 61 (10PASS-TL and 2BASE-TS). Aquantia also calls
this feature "rate adaptation". I chose "rate matching" because it is
shorter, and because Russell doesn't think "adaptation" is correct in this
context.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-09-20 18:12:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-29 15:21:20 -05:00
|
|
|
|
net: phy: Add support for rate matching
This adds support for rate matching (also known as rate adaptation) to
the phy subsystem. The general idea is that the phy interface runs at
one speed, and the MAC throttles the rate at which it sends packets to
the link speed. There's a good overview of several techniques for
achieving this at [1]. This patch adds support for three: pause-frame
based (such as in Aquantia phys), CRS-based (such as in 10PASS-TS and
2BASE-TL), and open-loop-based (such as in 10GBASE-W).
This patch makes a few assumptions and a few non assumptions about the
types of rate matching available. First, it assumes that different phys
may use different forms of rate matching. Second, it assumes that phys
can use rate matching for any of their supported link speeds (e.g. if a
phy supports 10BASE-T and XGMII, then it can adapt XGMII to 10BASE-T).
Third, it does not assume that all interface modes will use the same
form of rate matching. Fourth, it does not assume that all phy devices
will support rate matching (even if some do). Relaxing or strengthening
these (non-)assumptions could result in a different API. For example, if
all interface modes were assumed to use the same form of rate matching,
then a bitmask of interface modes supportting rate matching would
suffice.
For some better visibility into the process, the current rate matching
mode is exposed as part of the ethtool ksettings. For the moment, only
read access is supported. I'm not sure what userspace might want to
configure yet (disable it altogether, disable just one mode, specify the
mode to use, etc.). For the moment, since only pause-based rate
adaptation support is added in the next few commits, rate matching can
be disabled altogether by adjusting the advertisement.
802.3 calls this feature "rate adaptation" in clause 49 (10GBASE-R) and
"rate matching" in clause 61 (10PASS-TL and 2BASE-TS). Aquantia also calls
this feature "rate adaptation". I chose "rate matching" because it is
shorter, and because Russell doesn't think "adaptation" is correct in this
context.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-09-20 18:12:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2008-04-09 19:38:27 -05:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2014-02-11 17:27:37 -08:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-12-14 22:37:50 -08:00
|
|
|
|
|
|
|
|
|
2020-11-23 17:38:17 +02:00
|
|
|
|
|
|
|
|
|
2009-04-07 02:01:42 +00:00
|
|
|
|
2020-11-23 17:38:17 +02:00
|
|
|
|
2009-04-07 02:01:42 +00:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-03-16 22:32:33 +01:00
|
|
|
|
2019-05-30 15:10:06 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 07:33:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 13:56:44 +00:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 13:56:44 +00:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-18 11:01:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-21 16:36:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-21 16:36:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2018-01-02 10:58:43 +00:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2018-01-02 10:58:43 +00:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-02 17:27:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-02 17:27:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
2020-05-27 00:21:38 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-27 00:21:41 +02:00
|
|
|
|
|
|
|
|
|
2020-05-27 00:21:38 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
2015-12-30 16:28:25 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2015-12-30 16:28:25 +01:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2015-12-30 16:28:25 +01:00
|
|
|
|
|
|
|
|
|
2016-11-17 13:07:21 +01:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2016-11-17 13:07:21 +01:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2016-11-17 13:07:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2017-06-30 17:44:15 +08:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-20 08:29:14 +02:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2020-05-20 08:29:14 +02:00
|
|
|
|
2023-01-09 17:59:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2016-01-06 20:11:26 +01:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2008-04-18 17:29:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-10 00:39:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-18 17:29:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-19 17:05:04 +01:00
|
|
|
|
2008-04-18 17:29:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 15:02:42 +01:00
|
|
|
|
|
|
|
|
|
net: phy: Add support for rate matching
This adds support for rate matching (also known as rate adaptation) to
the phy subsystem. The general idea is that the phy interface runs at
one speed, and the MAC throttles the rate at which it sends packets to
the link speed. There's a good overview of several techniques for
achieving this at [1]. This patch adds support for three: pause-frame
based (such as in Aquantia phys), CRS-based (such as in 10PASS-TS and
2BASE-TL), and open-loop-based (such as in 10GBASE-W).
This patch makes a few assumptions and a few non assumptions about the
types of rate matching available. First, it assumes that different phys
may use different forms of rate matching. Second, it assumes that phys
can use rate matching for any of their supported link speeds (e.g. if a
phy supports 10BASE-T and XGMII, then it can adapt XGMII to 10BASE-T).
Third, it does not assume that all interface modes will use the same
form of rate matching. Fourth, it does not assume that all phy devices
will support rate matching (even if some do). Relaxing or strengthening
these (non-)assumptions could result in a different API. For example, if
all interface modes were assumed to use the same form of rate matching,
then a bitmask of interface modes supportting rate matching would
suffice.
For some better visibility into the process, the current rate matching
mode is exposed as part of the ethtool ksettings. For the moment, only
read access is supported. I'm not sure what userspace might want to
configure yet (disable it altogether, disable just one mode, specify the
mode to use, etc.). For the moment, since only pause-based rate
adaptation support is added in the next few commits, rate matching can
be disabled altogether by adjusting the advertisement.
802.3 calls this feature "rate adaptation" in clause 49 (10GBASE-R) and
"rate matching" in clause 61 (10PASS-TL and 2BASE-TS). Aquantia also calls
this feature "rate adaptation". I chose "rate matching" because it is
shorter, and because Russell doesn't think "adaptation" is correct in this
context.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-09-20 18:12:31 -04:00
|
|
|
|
2017-07-25 15:02:42 +01:00
|
|
|
|
2022-08-17 14:32:54 +02:00
|
|
|
|
|
|
|
|
|
2017-07-25 15:02:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-10 23:43:33 +01:00
|
|
|
|
2017-07-25 15:02:47 +01:00
|
|
|
|
2018-11-10 23:43:33 +01:00
|
|
|
|
2019-02-11 15:25:26 +01:00
|
|
|
|
2019-02-11 15:25:27 +01:00
|
|
|
|
2019-08-12 23:51:27 +02:00
|
|
|
|
2017-07-25 15:02:47 +01:00
|
|
|
|
2018-12-16 18:30:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-13 20:11:40 +01:00
|
|
|
|
2018-12-16 18:30:14 +01:00
|
|
|
|
|
|
|
|
|
2019-10-04 17:06:09 +01:00
|
|
|
|
2017-12-29 12:46:38 +00:00
|
|
|
|
2020-03-20 17:51:38 +01:00
|
|
|
|
2017-12-29 12:46:38 +00:00
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-09 09:17:42 +00:00
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
2016-01-06 20:11:16 +01:00
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
|
|
|
|
|
2020-03-23 23:05:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-02 10:58:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-09 09:17:42 +00:00
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
2016-01-06 20:11:16 +01:00
|
|
|
|
2008-09-29 17:12:35 +00:00
|
|
|
|
|
|
|
|
|
2018-01-02 10:58:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-17 14:52:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: phy: remove kernel-doc duplication
Sphinx 3 now checks for duplicated function declarations:
.../Documentation/networking/kapi:143: ../include/linux/phy.h:163: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'unsigned int phy_supported_speeds (struct phy_device *phy, unsigned int *speeds, unsigned int size)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1034: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1076: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1088: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1100: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
It turns that both the C and the H files have the same
kernel-doc markup for the same functions. Let's drop the
at the header file, keeping the one closer to the code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/75e9a357f9a716833d2094b04898754876365e68.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-27 10:51:18 +01:00
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-23 23:05:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: phy: remove kernel-doc duplication
Sphinx 3 now checks for duplicated function declarations:
.../Documentation/networking/kapi:143: ../include/linux/phy.h:163: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'unsigned int phy_supported_speeds (struct phy_device *phy, unsigned int *speeds, unsigned int size)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1034: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1076: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1088: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1100: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
It turns that both the C and the H files have the same
kernel-doc markup for the same functions. Let's drop the
at the header file, keeping the one closer to the code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/75e9a357f9a716833d2094b04898754876365e68.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-27 10:51:18 +01:00
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: phy: remove kernel-doc duplication
Sphinx 3 now checks for duplicated function declarations:
.../Documentation/networking/kapi:143: ../include/linux/phy.h:163: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'unsigned int phy_supported_speeds (struct phy_device *phy, unsigned int *speeds, unsigned int size)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1034: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1076: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1088: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1100: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
It turns that both the C and the H files have the same
kernel-doc markup for the same functions. Let's drop the
at the header file, keeping the one closer to the code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/75e9a357f9a716833d2094b04898754876365e68.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-27 10:51:18 +01:00
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: phy: remove kernel-doc duplication
Sphinx 3 now checks for duplicated function declarations:
.../Documentation/networking/kapi:143: ../include/linux/phy.h:163: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'unsigned int phy_supported_speeds (struct phy_device *phy, unsigned int *speeds, unsigned int size)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1034: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1076: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1088: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
.../Documentation/networking/kapi:143: ../include/linux/phy.h:1100: WARNING: Duplicate C declaration, also defined in 'networking/kapi'.
Declaration is 'int __phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'.
It turns that both the C and the H files have the same
kernel-doc markup for the same functions. Let's drop the
at the header file, keeping the one closer to the code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/75e9a357f9a716833d2094b04898754876365e68.1603791716.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-27 10:51:18 +01:00
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-10 19:57:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-02 10:58:37 +00:00
|
|
|
|
2018-01-02 10:58:53 +00:00
|
|
|
|
2018-01-02 10:58:37 +00:00
|
|
|
|
2019-02-10 19:57:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
2019-02-10 19:57:56 +01:00
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
2019-02-10 19:57:56 +01:00
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
2018-01-12 21:20:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-06 07:36:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-19 22:53:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-14 15:16:23 +01:00
|
|
|
|
2013-05-19 22:53:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-14 15:16:23 +01:00
|
|
|
|
2013-05-19 22:53:42 +00:00
|
|
|
|
|
|
|
|
|
2018-07-23 21:40:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-23 21:40:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 18:16:15 -08:00
|
|
|
|
2019-12-25 18:16:09 -08:00
|
|
|
|
|
|
|
|
|
2013-05-23 01:11:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-16 16:54:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-18 15:13:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2017-05-18 15:13:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 10:24:16 +00:00
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2017-12-01 10:24:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
2017-12-01 10:24:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-26 12:19:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-18 15:13:43 -07:00
|
|
|
|
net: phy: Allow PHY devices to identify themselves as Ethernet switches, etc.
Some Ethernet MAC drivers using the PHY library require the hardcoding
of link parameters when interfaced to a switch device, SFP module,
switch to switch port, etc. This has typically lead to various ad-hoc
implementations looking like this:
- using a "fixed PHY" emulated device, which will provide link
indication towards the Ethernet MAC driver and hardware
- pretend there is no PHY and hardcode link parameters, ala mv643x_eth
Based on that, it is desireable to have the PHY drivers advertise the
correct link parameters, just like regular Ethernet PHYs towards their
CPU Ethernet MAC drivers, however, Ethernet MAC drivers should be able
to tell whether this link should be monitored or not. In the context
of an Ethernet switch, SFP module, switch to switch link, we do not
need to monitor this link since it should be always up.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-31 15:56:46 +02:00
|
|
|
|
|
|
|
|
|
2020-09-23 00:29:03 +02:00
|
|
|
|
net: phy: Allow PHY devices to identify themselves as Ethernet switches, etc.
Some Ethernet MAC drivers using the PHY library require the hardcoding
of link parameters when interfaced to a switch device, SFP module,
switch to switch port, etc. This has typically lead to various ad-hoc
implementations looking like this:
- using a "fixed PHY" emulated device, which will provide link
indication towards the Ethernet MAC driver and hardware
- pretend there is no PHY and hardcode link parameters, ala mv643x_eth
Based on that, it is desireable to have the PHY drivers advertise the
correct link parameters, just like regular Ethernet PHYs towards their
CPU Ethernet MAC drivers, however, Ethernet MAC drivers should be able
to tell whether this link should be monitored or not. In the context
of an Ethernet switch, SFP module, switch to switch link, we do not
need to monitor this link since it should be always up.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-31 15:56:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-26 12:19:58 -07:00
|
|
|
|
|
|
|
|
|
2018-01-02 10:58:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-09 20:44:22 +02:00
|
|
|
|
|
|
|
|
|
2018-01-02 10:58:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-19 23:24:52 +00:00
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
2021-06-11 13:53:51 +03:00
|
|
|
|
2021-06-11 13:53:48 +03:00
|
|
|
|
2021-06-11 13:53:49 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 07:33:35 +00:00
|
|
|
|
2009-04-25 12:52:46 +00:00
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
|
|
|
|
|
2021-06-11 13:53:51 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-11 13:53:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-11 13:53:49 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-24 20:36:28 +01:00
|
|
|
|
2021-07-19 13:32:11 +08:00
|
|
|
|
2009-12-30 08:23:30 +00:00
|
|
|
|
2013-12-13 10:20:27 +01:00
|
|
|
|
|
|
|
|
|
2018-02-27 01:56:06 +01:00
|
|
|
|
2017-06-30 17:44:15 +08:00
|
|
|
|
2019-11-15 19:56:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
|
|
|
|
|
2010-02-04 10:23:02 -08:00
|
|
|
|
2014-01-10 14:27:54 +08:00
|
|
|
|
|
|
|
|
|
2009-04-25 12:52:51 +00:00
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-08-24 18:46:21 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-19 15:01:02 +02:00
|
|
|
|
2005-08-24 18:46:21 -05:00
|
|
|
|
2016-11-10 17:10:46 -06:00
|
|
|
|
2018-07-12 21:32:53 +02:00
|
|
|
|
|
|
|
|
|
2023-02-11 08:41:08 +01:00
|
|
|
|
2005-08-24 18:46:21 -05:00
|
|
|
|
2017-06-05 12:23:00 +01:00
|
|
|
|
2017-12-11 13:16:58 +01:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-27 00:21:38 +02:00
|
|
|
|
2020-05-27 00:21:41 +02:00
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-27 00:21:38 +02:00
|
|
|
|
|
|
|
|
|
2020-05-27 00:21:41 +02:00
|
|
|
|
|
|
|
|
|
2020-05-27 00:21:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:30 +02:00
|
|
|
|
|
|
|
|
|
2020-05-10 21:12:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-04 13:35:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:09 +01:00
|
|
|
|
2016-01-06 20:11:16 +01:00
|
|
|
|
2016-01-06 20:11:09 +01:00
|
|
|
|
2022-06-14 10:46:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-29 23:04:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-29 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:09 +01:00
|
|
|
|
2017-07-25 11:08:15 +02:00
|
|
|
|
2016-01-06 20:11:09 +01:00
|
|
|
|
2016-01-06 20:11:10 +01:00
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:16 +01:00
|
|
|
|
2016-01-06 20:11:10 +01:00
|
|
|
|
|
|
|
|
|
2019-11-23 17:28:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:13 +01:00
|
|
|
|
|
|
|
|
|
2020-01-12 09:35:38 -08:00
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:13 +01:00
|
|
|
|
2017-06-05 12:22:50 +01:00
|
|
|
|
|
|
|
|
|
2019-03-27 21:58:44 +01:00
|
|
|
|
2013-11-20 16:38:19 -06:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2019-12-17 13:39:11 +00:00
|
|
|
|
2019-02-18 21:26:58 +01:00
|
|
|
|
2019-08-09 20:43:50 +02:00
|
|
|
|
2014-02-11 17:27:36 -08:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2019-10-04 17:06:04 +01:00
|
|
|
|
2019-12-17 13:39:16 +00:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2022-03-07 21:45:14 +05:30
|
|
|
|
2008-11-28 16:24:56 -08:00
|
|
|
|
|
|
|
|
|
2017-06-30 17:44:15 +08:00
|
|
|
|
2014-02-17 13:34:02 -08:00
|
|
|
|
2020-11-01 14:51:12 +02:00
|
|
|
|
2019-08-09 20:43:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-24 01:11:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-20 09:44:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-05 12:22:50 +01:00
|
|
|
|
2019-10-22 11:31:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-05 12:22:50 +01:00
|
|
|
|
|
|
|
|
|
2019-02-18 21:27:18 +01:00
|
|
|
|
2017-06-05 12:22:50 +01:00
|
|
|
|
2019-02-07 21:41:46 +01:00
|
|
|
|
2017-06-05 12:22:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-06 06:23:52 +02:00
|
|
|
|
2019-02-17 10:29:19 +01:00
|
|
|
|
2017-06-05 12:22:50 +01:00
|
|
|
|
2017-12-29 12:46:27 +00:00
|
|
|
|
2019-02-11 15:25:28 +01:00
|
|
|
|
2023-02-11 08:41:06 +01:00
|
|
|
|
2022-05-06 06:23:54 +02:00
|
|
|
|
2019-02-22 23:51:44 +01:00
|
|
|
|
2022-05-06 06:23:56 +02:00
|
|
|
|
2019-08-21 11:00:46 +00:00
|
|
|
|
2021-03-24 00:46:40 +08:00
|
|
|
|
2021-04-19 19:13:59 +03:00
|
|
|
|
|
|
|
|
|
2021-10-24 16:27:34 +08:00
|
|
|
|
2023-01-09 18:00:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-11 08:41:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-22 06:50:41 +01:00
|
|
|
|
2023-02-22 06:50:42 +01:00
|
|
|
|
2017-06-05 12:22:50 +01:00
|
|
|
|
2020-07-07 03:49:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-01 16:08:56 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-30 23:46:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2012-07-04 05:44:34 +00:00
|
|
|
|
2016-01-06 20:11:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-01 14:50:56 +02:00
|
|
|
|
2010-01-18 05:37:16 +00:00
|
|
|
|
2019-05-30 15:11:06 +02:00
|
|
|
|
2020-11-01 14:50:56 +02:00
|
|
|
|
2018-01-10 21:21:31 +01:00
|
|
|
|
2014-01-05 03:27:17 +03:00
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2017-06-13 10:09:46 +03:00
|
|
|
|
|
|
|
|
|
2016-04-15 00:35:00 +02:00
|
|
|
|
|
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
2020-01-20 22:17:11 +01:00
|
|
|
|
2020-01-20 22:16:07 +01:00
|
|
|
|
2020-06-24 15:58:24 +08:00
|
|
|
|
2019-01-23 07:31:58 +01:00
|
|
|
|
2019-05-30 15:09:15 +02:00
|
|
|
|
2005-08-24 18:46:21 -05:00
|
|
|
|
net: phy: Add support for rate matching
This adds support for rate matching (also known as rate adaptation) to
the phy subsystem. The general idea is that the phy interface runs at
one speed, and the MAC throttles the rate at which it sends packets to
the link speed. There's a good overview of several techniques for
achieving this at [1]. This patch adds support for three: pause-frame
based (such as in Aquantia phys), CRS-based (such as in 10PASS-TS and
2BASE-TL), and open-loop-based (such as in 10GBASE-W).
This patch makes a few assumptions and a few non assumptions about the
types of rate matching available. First, it assumes that different phys
may use different forms of rate matching. Second, it assumes that phys
can use rate matching for any of their supported link speeds (e.g. if a
phy supports 10BASE-T and XGMII, then it can adapt XGMII to 10BASE-T).
Third, it does not assume that all interface modes will use the same
form of rate matching. Fourth, it does not assume that all phy devices
will support rate matching (even if some do). Relaxing or strengthening
these (non-)assumptions could result in a different API. For example, if
all interface modes were assumed to use the same form of rate matching,
then a bitmask of interface modes supportting rate matching would
suffice.
For some better visibility into the process, the current rate matching
mode is exposed as part of the ethtool ksettings. For the moment, only
read access is supported. I'm not sure what userspace might want to
configure yet (disable it altogether, disable just one mode, specify the
mode to use, etc.). For the moment, since only pause-based rate
adaptation support is added in the next few commits, rate matching can
be disabled altogether by adjusting the advertisement.
802.3 calls this feature "rate adaptation" in clause 49 (10GBASE-R) and
"rate matching" in clause 61 (10PASS-TL and 2BASE-TS). Aquantia also calls
this feature "rate adaptation". I chose "rate matching" because it is
shorter, and because Russell doesn't think "adaptation" is correct in this
context.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-09-20 18:12:31 -04:00
|
|
|
|
|
|
|
|
|
2022-01-28 21:32:40 +03:00
|
|
|
|
2018-09-12 01:53:14 +02:00
|
|
|
|
2019-05-01 21:34:43 +02:00
|
|
|
|
2018-09-12 01:53:16 +02:00
|
|
|
|
2018-09-12 01:53:15 +02:00
|
|
|
|
2018-09-12 01:53:18 +02:00
|
|
|
|
|
|
|
|
|
2018-09-12 01:53:17 +02:00
|
|
|
|
2018-09-12 01:53:19 +02:00
|
|
|
|
|
|
|
|
|
2020-02-15 15:49:27 +00:00
|
|
|
|
2020-06-24 07:16:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-15 15:49:27 +00:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2008-04-18 17:29:54 -05:00
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
2008-04-18 17:29:54 -05:00
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
2008-04-18 17:29:54 -05:00
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
2008-04-18 17:29:54 -05:00
|
|
|
|
2016-12-07 20:26:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 21:14:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-11 13:56:44 +00:00
|
|
|
|
2014-01-05 03:20:17 +03:00
|
|
|
|
|
|
|
|
|
2016-05-10 00:19:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-15 10:06:30 -08:00
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 21:14:38 +00:00
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
2008-05-02 13:00:51 -05:00
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
2008-05-02 13:00:51 -05:00
|
|
|
|
2020-07-08 09:46:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-09 18:00:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-27 12:41:49 -07:00
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-23 16:30:07 +02:00
|
|
|
|
|
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-23 16:30:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-06 16:53:13 +02:00
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|
2014-11-11 19:45:57 +01:00
|
|
|
|
2017-02-04 13:02:44 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-23 10:01:19 -07:00
|
|
|
|
2017-02-04 13:02:44 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-11 19:45:57 +01:00
|
|
|
|
2020-09-23 00:29:02 +02:00
|
|
|
|
2014-11-11 19:45:57 +01:00
|
|
|
|
2020-09-23 00:29:02 +02:00
|
|
|
|
2014-11-11 19:45:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-06 20:11:22 +01:00
|
|
|
|
2014-11-11 19:45:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-15 15:09:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-07-30 19:31:23 -04:00
|
|
|
|