mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
net: stmmac: Don't rely on the PHY for flow-control testing
For flow-control testing in loopback mode, we don't need to ask what the PHY is currently using as pause/asym settings. The PHY is no longer involved in selftest, we rely strictly on MAC loopback. We therefore only need to know if the MAC supports Symmetric pause for the test, as we exercise both TX and RX pause support in the selftest. Remove phydev requirement for flowcontrol selftest as well as the AsymPause requirement. With that, we can also drop the linux/phy.h include. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20260728155728.1193169-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
1528af8300
commit
48806dbee0
@@ -11,7 +11,6 @@
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/ip.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/udp.h>
|
||||
#include <net/pkt_cls.h>
|
||||
#include <net/pkt_sched.h>
|
||||
@@ -716,13 +715,13 @@ static int stmmac_test_flowctrl_validate(struct sk_buff *skb,
|
||||
static int stmmac_test_flowctrl(struct stmmac_priv *priv)
|
||||
{
|
||||
unsigned char paddr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x01};
|
||||
struct phy_device *phydev = priv->dev->phydev;
|
||||
u32 rx_cnt = priv->plat->rx_queues_to_use;
|
||||
struct mac_device_info *mac = priv->hw;
|
||||
struct stmmac_test_priv *tpriv;
|
||||
unsigned int pkt_count;
|
||||
int i, ret = 0;
|
||||
|
||||
if (!phydev || (!phydev->pause && !phydev->asym_pause))
|
||||
if (!(mac->link.caps & MAC_SYM_PAUSE))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
tpriv = kzalloc_obj(*tpriv);
|
||||
|
||||
Reference in New Issue
Block a user