[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <VI1PR04MB1664C211E5C7BD0BCDA1DF6AE8F40@VI1PR04MB1664.eurprd04.prod.outlook.com>
Date: Wed, 6 Jan 2016 14:07:31 +0000
From: Shaohui Xie <shaohui.xie@....com>
To: Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>
CC: netdev <netdev@...r.kernel.org>
Subject: RE: [RFC PATCH net-next 10/24] mdio: Move allocation of interrupts
into core
> Have mdio_alloc() create the array of interrupt numbers, and
> initialize it to POLLING. This is what most MDIO drivers want, so
> allowing code to be removed from the drivers.
>
[S.H] Snip.
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 88cb4592b6fb..05381d0f559c 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -51,6 +51,7 @@ struct mii_bus *mdiobus_alloc_size(size_t size)
> struct mii_bus *bus;
> size_t aligned_size = ALIGN(sizeof(*bus), NETDEV_ALIGN);
> size_t alloc_size;
> + int i;
>
> /* If we alloc extra space, it should be aligned */
> if (size)
> @@ -65,6 +66,10 @@ struct mii_bus *mdiobus_alloc_size(size_t size)
> bus->priv = (void *)bus + aligned_size;
> }
>
> + /* Initialise the interrupts to polling */
> + for (i = 0; i < PHY_MAX_ADDR; i++)
> + bus->irq[i] = PHY_POLL;
> +
> return bus;
> }
[S.H] Should similar code in of_mdiobus_register() to remove?
Thanks,
Shaohui
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists