Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-07 Thread Jakub Kicinski
On Wed, May 06, 2020 at 12:23:29PM -0700, Jakub Kicinski wrote: > Please trim your replies. > > Off-topic. > > Is there any simple way to trim replies semi-automatically in VIM? > > Right now, I'm doing it manually, but maybe there is some better > way to do it. I'm also doing it manually :(

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-07 Thread Bartosz Golaszewski
czw., 7 maj 2020 o 15:16 Andrew Lunn napisał(a): > > On Thu, May 07, 2020 at 12:50:15PM +0200, Bartosz Golaszewski wrote: > > czw., 7 maj 2020 o 11:46 Mark-MC.Lee napisał(a): > > > > > > Hi Bartosz: > > > I think the naming of this driver and its Kconfig option is too generic > > > that will

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-07 Thread Andrew Lunn
On Thu, May 07, 2020 at 12:50:15PM +0200, Bartosz Golaszewski wrote: > czw., 7 maj 2020 o 11:46 Mark-MC.Lee napisał(a): > > > > Hi Bartosz: > > I think the naming of this driver and its Kconfig option is too generic > > that will confuse with current mediatek SoCs eth driver architecture(for > >

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-07 Thread Bartosz Golaszewski
czw., 7 maj 2020 o 11:46 Mark-MC.Lee napisał(a): > > Hi Bartosz: > I think the naming of this driver and its Kconfig option is too generic > that will confuse with current mediatek SoCs eth driver architecture(for > all mt7xxx SoCs). > Since mtk_eth_mac.c is not a common MAC part for all

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Leon Romanovsky
On Wed, May 06, 2020 at 12:23:29PM -0700, Jakub Kicinski wrote: > On Wed, 6 May 2020 22:16:11 +0300 Leon Romanovsky wrote: > > > +#define MTK_MAC_DRVNAME"mtk_eth_mac" > > > +#define MTK_MAC_VERSION"1.0" > > > > Please don't add driver

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Joe Perches
On Wed, 2020-05-06 at 22:16 +0300, Leon Romanovsky wrote: > On Tue, May 5, 2020 at 5:03 PM 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. [] > > diff --git

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Jakub Kicinski
On Wed, 6 May 2020 22:16:11 +0300 Leon Romanovsky wrote: > > +#define MTK_MAC_DRVNAME"mtk_eth_mac" > > +#define MTK_MAC_VERSION"1.0" > > Please don't add driver version to new driver. It has already been pointed out. Please trim

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Leon Romanovsky
On Tue, May 5, 2020 at 5:03 PM 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 > --- >

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Jakub Kicinski
On Wed, 6 May 2020 09:09:52 +0200 Bartosz Golaszewski wrote: > > > +} > > > > Why do you clean the TX ring from a work rather than from the NAPI > > context? > > So this was unclear to me, that's why I went with a workqueue. The > budget argument in napi poll is for RX. Should I put some cap on

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Bartosz Golaszewski
Hi Jakub, thanks for the review. wt., 5 maj 2020 o 20:04 Jakub Kicinski napisał(a): > > > +/* Represents the actual structure of descriptors used by the MAC. We can > > + * reuse the same structure for both TX and RX - the layout is the same, > > only > > + * the flags differ slightly. > > +

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Bartosz Golaszewski
Hi Andrew, thanks for the review. wt., 5 maj 2020 o 19:47 Andrew Lunn napisał(a): > > > +static struct net_device *mtk_mac_get_netdev(struct mtk_mac_priv *priv) > > +{ > > + char *ptr = (char *)priv; > > + > > + return (struct net_device *)(ptr - ALIGN(sizeof(struct net_device), > > +

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-05 Thread Jakub Kicinski
On Tue, 5 May 2020 16:02:26 +0200 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 > +#define MTK_MAC_VERSION

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-05 Thread Andrew Lunn
> +static struct net_device *mtk_mac_get_netdev(struct mtk_mac_priv *priv) > +{ > + char *ptr = (char *)priv; > + > + return (struct net_device *)(ptr - ALIGN(sizeof(struct net_device), > + NETDEV_ALIGN)); > +} Bit of an odd way to do it. It is

[PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-05 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 +