Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-18 Thread Arnd Bergmann
On Mon, May 18, 2020 at 4:07 PM Bartosz Golaszewski wrote: > pt., 15 maj 2020 o 15:32 Arnd Bergmann napisał(a): > > I would get rid of the 'count' here, as it duplicates the information > > that is already known from the difference between head and tail, and you > > can't update it atomically

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-18 Thread Bartosz Golaszewski
pt., 15 maj 2020 o 15:32 Arnd Bergmann napisał(a): > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > +static int mtk_mac_ring_pop_tail(struct mtk_mac_ring *ring, > > +struct mtk_mac_ring_desc_data *desc_data) > > I took another look at this

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Arnd Bergmann
On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > +static int mtk_mac_ring_pop_tail(struct mtk_mac_ring *ring, > +struct mtk_mac_ring_desc_data *desc_data) I took another look at this function because of your comment on the locking the descriptor

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Andrew Lunn
On Fri, May 15, 2020 at 09:11:14AM +0200, Bartosz Golaszewski wrote: > czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > > > > > From: Bartosz Golaszewski > > > > > > This adds the driver for the MediaTek Ethernet MAC

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Arnd Bergmann
On Fri, May 15, 2020 at 2:56 PM Bartosz Golaszewski wrote: > pt., 15 maj 2020 o 14:04 Arnd Bergmann napisał(a): > > On Fri, May 15, 2020 at 9:11 AM Bartosz Golaszewski wrote: > > > > > > > > It looks like most of the stuff inside of the loop can be pulled out > > > > and only done once here. >

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Bartosz Golaszewski
pt., 15 maj 2020 o 14:04 Arnd Bergmann napisał(a): > > On Fri, May 15, 2020 at 9:11 AM Bartosz Golaszewski wrote: > > > > czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > > > > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski > > > wrote: > > > > +static unsigned int

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Arnd Bergmann
On Fri, May 15, 2020 at 9:11 AM Bartosz Golaszewski wrote: > > czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > > +static unsigned int mtk_mac_intr_read_and_clear(struct mtk_mac_priv > > > *priv) > > > +{ > > > +

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-15 Thread Bartosz Golaszewski
czw., 14 maj 2020 o 18:19 Arnd Bergmann napisał(a): > > On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > This adds the driver for the MediaTek Ethernet MAC used on the MT8* SoC > > family. For now we only support full-duplex. > > > >

Re: [PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-14 Thread Arnd Bergmann
On Thu, May 14, 2020 at 10:00 AM Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > This adds the driver for the MediaTek Ethernet MAC used on the MT8* SoC > family. For now we only support full-duplex. > > Signed-off-by: Bartosz Golaszewski Looks very nice overall. Just a few things

[PATCH v3 10/15] net: ethernet: mtk-eth-mac: new driver

2020-05-14 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This adds the driver for the MediaTek Ethernet MAC used on the MT8* SoC family. For now we only support full-duplex. Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/mediatek/Kconfig |6 + drivers/net/ethernet/mediatek/Makefile |1 +