ar71xx: fix mii bus irq assignment

Signed-off-by: Felix Fietkau <nbd@nbd.name>
openwrt-18.06
Felix Fietkau 2018-03-03 12:23:51 +01:00
parent f62d2b9549
commit 83ddc3bfc2
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,9 @@ struct ag71xx_ring {
struct ag71xx_mdio { struct ag71xx_mdio {
struct mii_bus *mii_bus; struct mii_bus *mii_bus;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
int mii_irq[PHY_MAX_ADDR]; int mii_irq[PHY_MAX_ADDR];
#endif
void __iomem *mdio_base; void __iomem *mdio_base;
struct ag71xx_mdio_platform_data *pdata; struct ag71xx_mdio_platform_data *pdata;
}; };

View File

@ -256,8 +256,6 @@ static int ag71xx_mdio_probe(struct platform_device *pdev)
am->mii_bus->reset = ag71xx_mdio_reset; am->mii_bus->reset = ag71xx_mdio_reset;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
am->mii_bus->irq = am->mii_irq; am->mii_bus->irq = am->mii_irq;
#else
memcpy(am->mii_bus->irq, am->mii_irq, sizeof(am->mii_bus->irq));
#endif #endif
am->mii_bus->priv = am; am->mii_bus->priv = am;
am->mii_bus->parent = &pdev->dev; am->mii_bus->parent = &pdev->dev;
@ -265,7 +263,7 @@ static int ag71xx_mdio_probe(struct platform_device *pdev)
am->mii_bus->phy_mask = pdata->phy_mask; am->mii_bus->phy_mask = pdata->phy_mask;
for (i = 0; i < PHY_MAX_ADDR; i++) for (i = 0; i < PHY_MAX_ADDR; i++)
am->mii_irq[i] = PHY_POLL; am->mii_bus->irq[i] = PHY_POLL;
ag71xx_mdio_wr(am, AG71XX_REG_MAC_CFG1, 0); ag71xx_mdio_wr(am, AG71XX_REG_MAC_CFG1, 0);