Skip to content
Commit 80b7aae9 authored by Julien Panis's avatar Julien Panis Committed by David S. Miller
Browse files

net: ethernet: ti: am65-cpsw: Fix xdp_rxq error for disabled port

When an ethX port is disabled in the device tree, an error is returned
by xdp_rxq_info_reg() function while transitioning the CPSW device to
the up state. The message 'Missing net_device from driver' is output.

This patch fixes the issue by registering xdp_rxq info only if ethX
port is enabled (i.e. ndev pointer is not NULL).

Fixes: 8acacc40 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support")
Link: https://lore.kernel.org/all/260d258f-87a1-4aac-8883-aab4746b32d8@ti.com/


Reported-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
Closes: https://gist.github.com/Siddharth-Vadapalli-at-TI/5ed0e436606001c247a7da664f75edee


Signed-off-by: default avatarJulien Panis <jpanis@baylibre.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bfa858f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment