]> git.hungrycats.org Git - linux/commitdiff
net: mvpp2: fill-in dev_port attribute
authorAryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
Thu, 20 Jun 2024 04:12:02 +0000 (16:12 +1200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2024 07:53:34 +0000 (09:53 +0200)
[ Upstream commit 00418d5530ca1f42d8721fe0a3e73d1ae477c223 ]

Fill this in so user-space can identify multiple ports on the same CP
unit.

Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

index cebc79a710ec2b3cecdfb2ee7871cd90d6cdba0d..6340e5e61a7daee77563b75770b060d2e7980b0c 100644 (file)
@@ -6906,6 +6906,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
        /* 9704 == 9728 - 20 and rounding to 8 */
        dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
        device_set_node(&dev->dev, port_fwnode);
+       dev->dev_port = port->id;
 
        port->pcs_gmac.ops = &mvpp2_phylink_gmac_pcs_ops;
        port->pcs_gmac.neg_mode = true;