aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSayanta Pattanayak <sayanta.pattanayak@arm.com>2020-09-05 18:33:29 +0530
committersudipto paul <sudipto.paul@arm.com>2020-09-08 08:09:06 +0100
commit84baaae9e751c058717d9702438429257f077f03 (patch)
tree2343562bffc35455f09e7178aec0a6fdd2e2d523
parent41e8d7be674f98a0f3bef67b16ea2162109fd522 (diff)
r8169: Fix to avoid duplicate sysfs entry creation errorN1SDP-2020.12.15
Following error observed with r8169 driver, this patch fix the issue. [ 27.544136] r8169 0002:07:00.0: enabling device (0000 -> 0003) [ 27.559734] sysfs: cannot create duplicate filename '/class/mdio_bus/r8169-700' … [ 27.684858] libphy: mii_bus r8169-700 failed to register [ 27.695602] r8169: probe of 0002:07:00.0 failed with error -22 Change-Id: Id696abbabd794ecef5c551c5c45630963d9502a6 Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
-rw-r--r--drivers/net/ethernet/realtek/r8169_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index c33c438850cc..7a883e1a91c6 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -6878,7 +6878,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
new_bus->priv = tp;
new_bus->parent = &pdev->dev;
new_bus->irq[0] = PHY_IGNORE_INTERRUPT;
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x", pci_dev_id(pdev));
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x", pdev->bus->domain_nr, pci_dev_id(pdev));
new_bus->read = r8169_mdio_read_reg;
new_bus->write = r8169_mdio_write_reg;