Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-08-26 Thread Maxime Ripard
Hi, On Wed, Aug 24, 2016 at 02:02:21PM +0200, LABBE Corentin wrote: > > > +/* Set Management Data Clock, must be call after device reset */ > > > +static void sun8i_emac_set_mdc(struct net_device *ndev) > > > +{ > > > + struct sun8i_emac_priv *priv = netdev_priv(ndev); > > > + unsigned long rate;

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-08-24 Thread LABBE Corentin
> > +/* Set Management Data Clock, must be call after device reset */ > > +static void sun8i_emac_set_mdc(struct net_device *ndev) > > +{ > > + struct sun8i_emac_priv *priv = netdev_priv(ndev); > > + unsigned long rate; > > + u32 reg; > > + > > + rate = clk_get_rate(priv->ahb_clk); > > +

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-30 Thread Maxime Ripard
On Sat, Jul 30, 2016 at 09:30:01AM +0800, Chen-Yu Tsai wrote: > >> > > +static void sun8i_emac_unset_syscon(struct net_device *ndev) > >> > > +{ > >> > > + struct sun8i_emac_priv *priv = netdev_priv(ndev); > >> > > + u32 reg = 0; > >> > > + > >> > > + if (priv->variant == H3_EMAC) > >> > > +

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Chen-Yu Tsai
On Sat, Jul 30, 2016 at 1:25 AM, Maxime Ripard wrote: > On Thu, Jul 28, 2016 at 04:57:34PM +0200, LABBE Corentin wrote: >> > > +static int sun8i_mdio_write(struct mii_bus *bus, int phy_addr, int >> > > phy_reg, >> > > + u16 data) >> > > +{ >>

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Maxime Ripard
On Thu, Jul 28, 2016 at 04:57:34PM +0200, LABBE Corentin wrote: > > > +static int sun8i_mdio_write(struct mii_bus *bus, int phy_addr, int > > > phy_reg, > > > + u16 data) > > > +{ > > > + struct net_device *ndev = bus->priv; > > > + struct sun8i_emac_priv *priv =

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Andre Przywara
Hi, On 25/07/16 20:54, Maxime Ripard wrote: > On Wed, Jul 20, 2016 at 10:03:16AM +0200, LABBE Corentin wrote: >> This patch add support for sun8i-emac ethernet MAC hardware. >> It could be found in Allwinner H3/A83T/A64 SoCs. >> >> It supports 10/100/1000 Mbit/s speed with half/full duplex. >> It

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Arnd Bergmann
On Thursday, July 28, 2016 3:18:26 PM CEST LABBE Corentin wrote: > > I will reworked locking and it seems that no locking is necessary. > I have added the following comment about the locking strategy: > > /* Locking strategy: > * RX queue does not need any lock since only sun8i_emac_poll()

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-28 Thread LABBE Corentin
On Mon, Jul 25, 2016 at 09:54:55PM +0200, Maxime Ripard wrote: > On Wed, Jul 20, 2016 at 10:03:16AM +0200, LABBE Corentin wrote: > > This patch add support for sun8i-emac ethernet MAC hardware. > > It could be found in Allwinner H3/A83T/A64 SoCs. > > > > It supports 10/100/1000 Mbit/s speed with

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-28 Thread LABBE Corentin
On Wed, Jul 20, 2016 at 11:56:12AM +0200, Arnd Bergmann wrote: > On Wednesday, July 20, 2016 10:03:16 AM CEST LABBE Corentin wrote: > > + > > + /* Benched on OPIPC with 100M, setting more than 256 does not give > > any > > +* perf boost > > +*/ > > + priv->nbdesc_rx =

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-25 Thread Maxime Ripard
On Wed, Jul 20, 2016 at 10:03:16AM +0200, LABBE Corentin wrote: > This patch add support for sun8i-emac ethernet MAC hardware. > It could be found in Allwinner H3/A83T/A64 SoCs. > > It supports 10/100/1000 Mbit/s speed with half/full duplex. > It can use an internal PHY (MII 10/100) or an

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-20 Thread Arnd Bergmann
On Wednesday, July 20, 2016 10:03:16 AM CEST LABBE Corentin wrote: > + > + /* Benched on OPIPC with 100M, setting more than 256 does not give any > +* perf boost > +*/ > + priv->nbdesc_rx = 128; > + priv->nbdesc_tx = 256; > + > 256 tx descriptors can introduce a