[PATCH net-next 01/13] phy: add sgmii and 10gkr modes to the phy_mode enum

2017-08-24 Thread Antoine Tenart
This patch adds more PHY modes to the phy_mode enum, to allow configuring PHYs to the SGMII and/or the 10GKR mode by using the set_mode callback. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- include/linux/phy/phy.h | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH net-next 03/13] Documentation/bindings: phy: document the Marvell comphy driver

2017-08-24 Thread Antoine Tenart
The Marvell Armada 7K/8K SoCs contains an hardware block called COMPHY that provides a number of shared PHYs used by various interfaces in the SoC: network, SATA, PCIe, etc. This Device Tree binding allows to describe this COMPHY hardware block. Signed-off-by: Antoine Tenart <antoine.ten...@f

[PATCH net-next 00/13] net: mvpp2: comphy configuration

2017-08-24 Thread Antoine Tenart
as before an relies on the firmware/bootloader configuration). Finally there are dt/defconfig patches to describe and take advantage of this. This was tested on a range of devices: 8040-db, 8040-mcbin and 7040-db. Thanks! Antoine Antoine Tenart (12): phy: add sgmii and 10gkr modes

[PATCH net-next 13/13] arm64: defconfig: enable Marvell CP110 comphy

2017-08-24 Thread Antoine Tenart
Raynal <miquel.ray...@free-electrons.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index cdde4f56a281..e671e37b30af 10064

[PATCH net-next 12/13] arm64: dts: marvell: mcbin: add comphy references to Ethernet ports

2017-08-24 Thread Antoine Tenart
This patch adds comphy phandles to the Ethernet ports in the mcbin device tree. The comphy is used to configure the serdes PHYs used by these ports. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 3 +++ 1 file chan

[PATCH net-next 3/4] net: mvpp2: fix use of the random mac address for PPv2.2

2017-08-24 Thread Antoine Tenart
if the h/w mac is valid when actually retrieving a mac from h/w. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp

[PATCH net-next 0/4] net: mvpp2: fix the mac address retrieval logic

2017-08-24 Thread Antoine Tenart
this or if I should do something else. Thanks! Antoine Fixes: 2697582144dd ("net: mvpp2: handle misc PPv2.1/PPv2.2 differences") Antoine Tenart (4): net: mvpp2: fix the mac address used when using PPv2.2 net: mvpp2: move the mac retrieval/copy logic into its own function net: mvpp

[PATCH net-next 2/4] net: mvpp2: move the mac retrieval/copy logic into its own function

2017-08-24 Thread Antoine Tenart
The MAC retrieval has a quite complicated logic (which is broken). Moves it to its own function to prepare for patches fixing its logic, so that reviews are easier. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.

[PATCH net-next 4/4] net: mvpp2: fallback using h/w and random mac if the dt one isn't valid

2017-08-24 Thread Antoine Tenart
When using a mac address described in the device tree, a check is made to see if it is valid. When it's not, no fallback is defined. This patches tries to get the mac address from h/w (or use a random one if the h/w one isn't valid) when the dt mac address isn't valid. Signed-off-by: Antoine

[PATCH net-next 1/4] net: mvpp2: fix the mac address used when using PPv2.2

2017-08-24 Thread Antoine Tenart
handled by this PPv2 driver. Fixes this by initializing the h/w mac address variable to {0}, which is an invalid mac address value. This way the random assignation fallback is called and all ports end up with their own addresses. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com>

[PATCH net-next] net: mvpp2: fix the packet size configuration for 10G

2017-08-25 Thread Antoine Tenart
The MVPP22_XLG_CTRL1_FRAMESIZELIMIT define is used as an offset, but is defined as BIT(0). Updated its name to contains "OFFS" as in offset and fix its value using the offset value, 0. Reported-by: Stefan Chulski <stef...@marvell.com> Signed-off-by: Antoine Tenart <

Re: [PATCH net-next 0/4] net: mvpp2: fix the mac address retrieval logic

2017-08-25 Thread Antoine Tenart
Hi Dave, On Thu, Aug 24, 2017 at 09:46:24PM -0700, David Miller wrote: > From: Antoine Tenart <antoine.ten...@free-electrons.com> > Date: Thu, 24 Aug 2017 11:46:54 +0200 > > > The MAC address retrieval logic was broken and when using the PPv2 > > driver on PPv2

Re: [PATCH net v2 1/4] net: mvpp2: fix the mac address used when using PPv2.2

2017-08-25 Thread Antoine Tenart
Hi Andrew, On Fri, Aug 25, 2017 at 04:19:39PM +0200, Andrew Lunn wrote: > On Fri, Aug 25, 2017 at 04:14:17PM +0200, Antoine Tenart wrote: > > The mac address is only retrieved from h/w when using PPv2.1. Otherwise > > the variable holding it is still checked and used if it c

[PATCH net-next v2 10/14] arm64: dts: marvell: extend the cp110 syscon register area length

2017-08-25 Thread Antoine Tenart
This patch extends on both cp110 the system register area length to include some of the comphy registers as well. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-cp110-slav

[PATCH net-next v2 11/14] arm64: dts: marvell: add comphy nodes on cp110 master and slave

2017-08-25 Thread Antoine Tenart
Now that the comphy driver is available, this patch adds the corresponding nodes in the cp110 master and slave device trees. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- .../boot/dts/marvell/armada-cp110-master.dtsi | 38 ++ .../arm64/bo

[PATCH net-next v2 00/14] net: mvpp2: comphy configuration

2017-08-25 Thread Antoine Tenart
net-next/master. Antoine Tenart (13): phy: add sgmii and 10gkr modes to the phy_mode enum phy: add the mvebu cp110 comphy driver Documentation/bindings: phy: document the Marvell comphy driver net: mvpp2: initialize the comphy net: mvpp2: do not force the link mode net: mvpp2: simplify

[PATCH net-next v2 01/14] phy: add sgmii and 10gkr modes to the phy_mode enum

2017-08-25 Thread Antoine Tenart
This patch adds more generic PHY modes to the phy_mode enum, to allow configuring generic PHYs to the SGMII and/or the 10GKR mode by using the set_mode callback. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- include/linux/phy/phy.h | 2 ++ 1 file changed, 2 inse

[PATCH net-next v2 09/14] net: mvpp2: dynamic reconfiguration of the PHY mode

2017-08-25 Thread Antoine Tenart
. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index 49a678

[PATCH net-next v2 07/14] net: mvpp2: improve the link management function

2017-08-25 Thread Antoine Tenart
itself. The queues are now stopped as well, and the netif carrier helpers are called. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp

[PATCH net v2 3/4] net: mvpp2: fix use of the random mac address for PPv2.2

2017-08-25 Thread Antoine Tenart
if the h/w mac is valid when actually retrieving a mac from h/w. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp

[PATCH net-next v2 14/14] arm64: defconfig: enable Marvell CP110 comphy

2017-08-25 Thread Antoine Tenart
Raynal <miquel.ray...@free-electrons.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index cdde4f56a281..e671e37b30af 10064

[PATCH net-next v2 06/14] net: mvpp2: simplify the link_event function

2017-08-25 Thread Antoine Tenart
The link_event function is somewhat complicated. This cosmetic patch simplifies it. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/et

[PATCH net-next v2 12/14] arm64: dts: marvell: mcbin: add comphy references to Ethernet ports

2017-08-25 Thread Antoine Tenart
This patch adds comphy phandles to the Ethernet ports in the mcbin device tree. The comphy is used to configure the serdes PHYs used by these ports. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 3 +++ 1 file chan

[PATCH net-next v2 13/14] arm64: dts: marvell: 7040-db: add comphy references to Ethernet ports

2017-08-25 Thread Antoine Tenart
This patch adds comphy phandles to the Ethernet ports in the 7040-db device tree. The comphy is used to configure the serdes PHYs used by these ports. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 1 + 1 file chan

[PATCH net-next v2 04/14] net: mvpp2: initialize the comphy

2017-08-25 Thread Antoine Tenart
relying on the bootloader. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/et

[PATCH net-next v2 05/14] net: mvpp2: do not force the link mode

2017-08-25 Thread Antoine Tenart
The link mode (speed, duplex) was forced based on what the phylib returns. This should not be the case, and only forced by ethtool functions manually. This patch removes the link mode enforcement from the phylib link_event callback. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.

[PATCH net-next v2 08/14] net: mvpp2: check the netif is running in the link_event function

2017-08-25 Thread Antoine Tenart
This patch adds an extra check when the link_event function is called, so that it won't do anything when the netif isn't running. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH net-next v2 02/14] phy: add the mvebu cp110 comphy driver

2017-08-25 Thread Antoine Tenart
are supported by the comphy driver: sgmii and 10gkr. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/phy/marvell/Kconfig | 10 + drivers/phy/marvell/Makefile | 1 + drivers/phy/marvell/phy-mvebu-cp110-comphy.c

[PATCH net-next v2 03/14] Documentation/bindings: phy: document the Marvell comphy driver

2017-08-25 Thread Antoine Tenart
The Marvell Armada 7K/8K SoCs contains an hardware block called COMPHY that provides a number of shared PHYs used by various interfaces in the SoC: network, SATA, PCIe, etc. This Device Tree binding allows to describe this COMPHY hardware block. Signed-off-by: Antoine Tenart <antoine.ten...@f

[PATCH net v2 4/4] net: mvpp2: fallback using h/w and random mac if the dt one isn't valid

2017-08-25 Thread Antoine Tenart
When using a mac address described in the device tree, a check is made to see if it is valid. When it's not, no fallback is defined. This patches tries to get the mac address from h/w (or use a random one if the h/w one isn't valid) when the dt mac address isn't valid. Signed-off-by: Antoine

[PATCH net v2 2/4] net: mvpp2: move the mac retrieval/copy logic into its own function

2017-08-25 Thread Antoine Tenart
The MAC retrieval has a quite complicated logic (which is broken). Moves it to its own function to prepare for patches fixing its logic, so that reviews are easier. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.

[PATCH net v2 0/4] net: mvpp2: fix the mac address retrieval logic

2017-08-25 Thread Antoine Tenart
to relevant stable trees (4.12+). The series applies on net/master (9b4e946ce14e). Thanks! Antoine Since v1: - Rebased onto net (was on net-next). Antoine Tenart (4): net: mvpp2: fix the mac address used when using PPv2.2 net: mvpp2: move the mac retrieval/copy logic into its own function

[PATCH net v2 1/4] net: mvpp2: fix the mac address used when using PPv2.2

2017-08-25 Thread Antoine Tenart
handled by this PPv2 driver. Fixes this by initializing the h/w mac address variable to {0}, which is an invalid mac address value. This way the random assignation fallback is called and all ports end up with their own addresses. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com>

Re: [PATCH net-next v2 00/14] net: mvpp2: comphy configuration

2017-08-25 Thread Antoine Tenart
Hi Andrew, On Fri, Aug 25, 2017 at 05:51:11PM +0200, Andrew Lunn wrote: > > - Checked if the carrier_on/off functions were needed. They are. > > Could you explain the situations they are needed in? > > Quite a few drivers do this, so i'm not saying it is wrong. But it > would be nice to

Re: [PATCH net v2 1/4] net: mvpp2: fix the mac address used when using PPv2.2

2017-08-25 Thread Antoine Tenart
On Fri, Aug 25, 2017 at 05:42:47PM +0200, Andrew Lunn wrote: > > So probably the best way to handle this would have been to send 1/4 to > > net and 2-4/4 to net-next > > Correct. > > > (but then there's a dependency between the two series). > > Dave merges net into net-next every so often. So

Re: [PATCH net-next v2 08/14] net: mvpp2: check the netif is running in the link_event function

2017-08-25 Thread Antoine Tenart
Hi Florian, On Fri, Aug 25, 2017 at 09:49:15AM -0700, Florian Fainelli wrote: > On 08/25/2017 07:48 AM, Antoine Tenart wrote: > > This patch adds an extra check when the link_event function is called, > > so that it won't do anything when the netif isn't running. > > Why is

Re: [PATCH net-next 2/3] net: mvpp2: use the GoP interrupt for link status changes

2017-08-31 Thread Antoine Tenart
Hi Andrew, On Thu, Aug 31, 2017 at 03:47:24PM +0200, Andrew Lunn wrote: > On Thu, Aug 31, 2017 at 09:12:55AM +0200, Antoine Tenart wrote: > > +static void mvpp22_gop_unmask_irq(struct mvpp2_port *port) > > +{ > > + u32 val; > > + > > + if (port->phy_i

[PATCH net-next v3 1/3] net: mvpp2: move the mac retrieval/copy logic into its own function

2017-09-02 Thread Antoine Tenart
The MAC retrieval has a quite complicated logic (which is broken). Moves it to its own function to prepare for patches fixing its logic, so that reviews are easier. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.

[PATCH net-next v3 3/3] net: mvpp2: fallback using h/w and random mac if the dt one isn't valid

2017-09-02 Thread Antoine Tenart
When using a mac address described in the device tree, a check is made to see if it is valid. When it's not, no fallback is defined. This patches tries to get the mac address from h/w (or use a random one if the h/w one isn't valid) when the dt mac address isn't valid. Signed-off-by: Antoine

[PATCH net-next v3 0/3] net: mvpp2: improve the mac address retrieval logic

2017-09-02 Thread Antoine Tenart
was merged in net-next). - Rebased on net-next. Since v1: - Rebased onto net (was on net-next). Antoine Tenart (3): net: mvpp2: move the mac retrieval/copy logic into its own function net: mvpp2: fix use of the random mac address for PPv2.2 net: mvpp2: fallback using h/w and random mac

[PATCH net-next v3 2/3] net: mvpp2: fix use of the random mac address for PPv2.2

2017-09-02 Thread Antoine Tenart
if the h/w mac is valid when actually retrieving a mac from h/w. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp

Re: [PATCH net-next v4 02/13] phy: add the mvebu cp110 comphy driver

2017-08-30 Thread Antoine Tenart
Hi Kishon, On Wed, Aug 30, 2017 at 05:02:55PM +0530, Kishon Vijay Abraham I wrote: > On Wednesday 30 August 2017 01:59 PM, Antoine Tenart wrote: > > On the CP110 unit, which can be found on various Marvell platforms such > > as the 7k and 8k (currently), a comphy (common PHYs) har

Re: [PATCH net-next v3 02/13] phy: add the mvebu cp110 comphy driver

2017-08-29 Thread Antoine Tenart
Hi Kishon, On Tue, Aug 29, 2017 at 04:34:17PM +0530, Kishon Vijay Abraham I wrote: > On Monday 28 August 2017 08:27 PM, Antoine Tenart wrote: > > > > +config PHY_MVEBU_CP110_COMPHY > > + tristate "Marvell CP110 comphy driver" > > + depends

Re: [PATCH net-next v3 01/13] phy: add sgmii and 10gkr modes to the phy_mode enum

2017-08-29 Thread Antoine Tenart
Hi Kishon, On Tue, Aug 29, 2017 at 04:08:29PM +0530, Kishon Vijay Abraham I wrote: > On Monday 28 August 2017 08:27 PM, Antoine Tenart wrote: > > This patch adds more generic PHY modes to the phy_mode enum, to > > allow configuring generic PHYs to the SGMII and/or the 10GKR mo

Re: [PATCH net-next v3 02/13] phy: add the mvebu cp110 comphy driver

2017-08-29 Thread Antoine Tenart
Hi Kishon, On Tue, Aug 29, 2017 at 05:55:06PM +0530, Kishon Vijay Abraham I wrote: > On Tuesday 29 August 2017 04:53 PM, Antoine Tenart wrote: > > On Tue, Aug 29, 2017 at 04:34:17PM +0530, Kishon Vijay Abraham I wrote: > >> On Monday 28 August 2017 08:27 PM, Antoine Tenart wr

[PATCH net-next v2 4/4] Documentation/bindings: net: marvell-pp2: add the link interrupt

2017-09-01 Thread Antoine Tenart
A link interrupt can be described. Document this valid interrupt name. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> Tested-by: Marcin Wojtas <m...@semihalf.com> --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 2 +- 1 file changed, 1 insertion(+)

[PATCH net-next v2 3/4] net: mvpp2: use the GoP interrupt for link status changes

2017-09-01 Thread Antoine Tenart
ports not connected to a PHY cannot work. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> Tested-by: Marcin Wojtas <m...@semihalf.com> --- drivers/net/ethernet/marvell/mvpp2.c | 177 ++- 1 file changed, 172 insertions(+), 5 deletions(-)

[PATCH net-next v2 1/4] net: mvpp2: take advantage of the is_rgmii helper

2017-09-01 Thread Antoine Tenart
Convert all RGMII checks to use the phy_interface_mode_is_rgmii() helper. This is a cosmetic patch. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff

[PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link irq

2017-09-01 Thread Antoine Tenart
on the 7k-db and 8k-db boards. Thanks! Antoine Since v1: - Now use phy_interface_mode_is_rgmii() in the GoP link patch. - Added one cosmetic patch to take advantage of phy_interface_mode_is_rgmii() in the whole PPv2 driver. Antoine Tenart (4): net: mvpp2: take advantage of the is_rgmii helper

[PATCH net-next v2 2/4] net: mvpp2: make the phy optional

2017-09-01 Thread Antoine Tenart
n. However if a PHY is provided, the GoP link interrupt won't be used. With this patch switches directly connected to the serdes lanes and SFP ports on the Armada 8040-db and Armada 7040-db can be used if the link interrupt is described in the device tree. Signed-off-by: Antoine Tenart <antoin

[PATCH net-next 3/3] Documentation/bindings: net: marvell-pp2: add the link interrupt

2017-08-31 Thread Antoine Tenart
A link interrupt can be described. Document this valid interrupt name. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> Tested-by: Marcin Wojtas <m...@semihalf.com> --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 2 +- 1 file changed, 1 insertion(+)

[PATCH net-next 0/3] net: mvpp2: optional PHYs and GoP link irq

2017-08-31 Thread Antoine Tenart
-db and 8k-db boards. Thanks! Antoine Antoine Tenart (3): net: mvpp2: make the phy optional net: mvpp2: use the GoP interrupt for link status changes Documentation/bindings: net: marvell-pp2: add the link interrupt .../devicetree/bindings/net/marvell-pp2.txt| 2 +- drivers/net

[PATCH net-next 2/3] net: mvpp2: use the GoP interrupt for link status changes

2017-08-31 Thread Antoine Tenart
ports not connected to a PHY cannot work. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> Tested-by: Marcin Wojtas <m...@semihalf.com> --- drivers/net/ethernet/marvell/mvpp2.c | 189 ++- 1 file changed, 184 insertions(+), 5 deletions(-)

[PATCH net-next 1/3] net: mvpp2: make the phy optional

2017-08-31 Thread Antoine Tenart
n. However if a PHY is provided, the GoP link interrupt won't be used. With this patch switches directly connected to the serdes lanes and SFP ports on the Armada 8040-db and Armada 7040-db can be used if the link interrupt is described in the device tree. Signed-off-by: Antoine Tenart <antoin

[PATCH net 2/3] net: mvpp2: do not unmap TSO headers buffers

2017-10-23 Thread Antoine Tenart
in the TSO header pool. Fixes: 186cd4d4e414 ("net: mvpp2: software tso support") Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/driv

[PATCH net 3/3] net: mvpp2: do not call txq_done from the Tx path when Tx irqs are used

2017-10-23 Thread Antoine Tenart
txq_done() from the Tx path if Tx interrupts are used as it does not make sense to do so. Fixes: edc660fa09e2 ("net: mvpp2: replace TX coalescing interrupts with hrtimer") Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.

[PATCH net 1/3] net: mvpp2: fix TSO headers allocation and management

2017-10-23 Thread Antoine Tenart
gt; Signed-off-by: Yan Markman <ymark...@marvell.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/

[PATCH net 3/3] net: mvpp2: do not sleep in set_rx_mode

2017-10-24 Thread Antoine Tenart
This patch replaces GFP_KERNEL by GFP_ATOMIC to avoid sleeping in the ndo_set_rx_mode() call which is called with BH disabled. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com>

[PATCH net 1/3] net: mvpp2: fix typo in the tcam setup

2017-10-24 Thread Antoine Tenart
This patch fixes a typo in the mvpp2_prs_tcam_data_cmp() function, as the shift value is inverted with the data. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- driv

[PATCH net 2/3] net: mvpp2: fix invalid parameters order when calling the tcam init

2017-10-24 Thread Antoine Tenart
When calling mvpp2_prs_mac_multi_set() from mvpp2_prs_mac_init(), two parameters (the port index and the table index) are inverted. Fixes this. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Antoine Tenart <antoine.ten...@free-

[PATCH net 1/4] net: mvpp2: fix the txq_init error path

2017-11-28 Thread Antoine Tenart
] PREEMPT SMP This patch fixes this by removing the txq_init own error path, as the txq_deinit function is always called on errors. This was introduced by TSO as way more buffers are allocated. Fixes: 186cd4d4e414 ("net: mvpp2: software tso support") Signed-off-by: Antoine Tenart <antoin

[PATCH net 2/4] net: mvpp2: cleanup probed ports in the probe error path

2017-11-28 Thread Antoine Tenart
This patches fixes the probe error path by cleaning up probed ports, to avoid leaving registered net devices when the driver failed to probe. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Antoine Tenart <antoine.ten...@free-

[PATCH net 4/4] net: mvpp2: check ethtool sets the Tx ring size is to a valid min value

2017-11-28 Thread Antoine Tenart
d use stop/wake thresholds") Suggested-by: Yan Markman <ymark...@marvell.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp2.c

[PATCH net 3/4] net: mvpp2: do not disable GMAC padding

2017-11-28 Thread Antoine Tenart
sing a port") Signed-off-by: Yan Markman <ymark...@marvell.com> [Antoine: commit message] Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/net/ethernet/ma

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
Hi Andrew, On Tue, Nov 28, 2017 at 02:56:10PM +0100, Andrew Lunn wrote: > > + /* On _disconnect, the phy state machine and phylink resolve > > +* are stopped before executing full gracefull down/reset state. > > +* The further _connect starts with incorrect init state. Let's set > > +

[PATCH net] net: phy: marvell10g: fix the PHY id mask

2017-11-28 Thread Antoine Tenart
: 20b2af32ff3f ("net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support") Suggested-by: Yan Markman <ymark...@marvell.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/phy/marvell10g.c | 5 +++-- 1 file changed, 3 insertions(+), 2 de

[PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
ration parameters to an unknown value when calling phylink_bringup_phy. Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Yan Markman <ymark...@marvell.com> [Antoine: commit message] Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- dr

[PATCH net 0/4] net: mvpp2: set of fixes

2017-11-28 Thread Antoine Tenart
Hi all, This series fixes various issues with the Marvell PPv2 driver. The patches are sent together to avoid any possible conflict. The series is based on today's net tree. Thanks! Antoine Antoine Tenart (3): net: mvpp2: fix the txq_init error path net: mvpp2: cleanup probed ports

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
Hi Russell, On Tue, Nov 28, 2017 at 03:56:11PM +, Russell King wrote: > Oh, and lastly, please send patches to li...@armlinux.org.uk or the > address I use in the sign-offs - sending them to r...@armlinux.org.uk > is for personal non-Linux mail only, and has resulted in _all_ of > these

[PATCH net] net: mvpp2: allocate zeroed tx descriptors

2017-11-30 Thread Antoine Tenart
fixes this by using dma_zalloc_coherent instead of dma_alloc_coherent. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Yan Markman <ymark...@marvell.com> [Antoine: commit message] Signed-off-by: Antoine Tenart <antoine.ten...@free-el

Re: [PATCH net-next v3] net: mvpp2: add ethtool GOP statistics

2017-11-07 Thread Antoine Tenart
Hi David, On Wed, Nov 08, 2017 at 01:54:56PM +0900, David Miller wrote: > From: Miquel Raynal > Date: Mon, 6 Nov 2017 22:56:53 +0100 > > > Add ethtool statistics support by reading the GOP statistics from the > > hardware counters. Also implement a workqueue

Re: [PATCH net-next 1/6] net: mvpp2: only free the TSO header buffers when it was allocated

2017-12-08 Thread Antoine Tenart
On Thu, Dec 07, 2017 at 02:53:29PM -0500, David Miller wrote: > From: Antoine Tenart <antoine.ten...@free-electrons.com> > Date: Thu, 7 Dec 2017 09:48:58 +0100 > > > This patch adds a check to only free the TSO header buffer when its > > allocation previously suc

[PATCH net] net: mvpp2: fix the RSS table entry offset

2017-12-08 Thread Antoine Tenart
The macro used to access or set an RSS table entry was using an offset of 8, while it should use an offset of 0. This lead to wrongly configure the RSS table, not accessing the right entries. Fixes: 1d7d15d79fb4 ("net: mvpp2: initialize the RSS tables") Signed-off-by: Antoine Tenart &l

[PATCH net-next 1/6] net: mvpp2: only free the TSO header buffers when it was allocated

2017-12-07 Thread Antoine Tenart
This patch adds a check to only free the TSO header buffer when its allocation previously succeeded. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/d

[PATCH net-next 3/6] net: mvpp2: split the max ring size from the default one

2017-12-07 Thread Antoine Tenart
rvell.com> [Antoine: commit message] Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethern

[PATCH net-next 0/6] net: mvpp2: various improvements

2017-12-07 Thread Antoine Tenart
be allocate the feature is deactivated but the driver won't fail to probe. The other patches are small improvements. Thanks! Antoine Antoine Tenart (5): net: mvpp2: only free the TSO header buffers when it was allocated net: mvpp2: disable TSO if its buffers cannot be allocated net: mvpp2

[PATCH net-next 2/6] net: mvpp2: disable TSO if its buffers cannot be allocated

2017-12-07 Thread Antoine Tenart
DMA_CMA is enabled and CMA_SIZE_MBYTES is too small (ie. its default value). Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH net-next 4/6] net: mvpp2: align values in ethtool get_coalesce

2017-12-07 Thread Antoine Tenart
Cosmetic patch aligning values in the ethtool get_coalesce function. This patch do not modify in anyway the driver's behaviour. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH net-next 6/6] net: mvpp2: adjust the coalescing parameters

2017-12-07 Thread Antoine Tenart
This patch adjust the coalescing parameters to the vendor recommendations for the PPv2 network controller. Suggested-by: Yan Markman <ymark...@marvell.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 4 ++-- 1 fil

[PATCH net-next 5/6] net: mvpp2: report the tx-usec coalescing information to ethtool

2017-12-07 Thread Antoine Tenart
This patch adds the tx-usec value to the informations reported to ethtool by the get_coalesce function. Suggested-by: Yan Markman <ymark...@marvell.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 1 + 1 file changed,

[PATCH net-next v2 1/5] net: mvpp2: only free the TSO header buffers when it was allocated

2017-12-11 Thread Antoine Tenart
This patch adds a check to only free the TSO header buffer when its allocation previously succeeded. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/d

[PATCH net-next v2 2/5] net: mvpp2: split the max ring size from the default one

2017-12-11 Thread Antoine Tenart
rvell.com> [Antoine: commit message] Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethern

[PATCH net-next v2 0/5] net: mvpp2: various improvements

2017-12-11 Thread Antoine Tenart
Hi all, These patches are sent as a series to avoid any possible conflict, even though there're not entirely related. I can send them separately if needed. The series applies on today's net-next tree. Thanks! Antoine Since v1: - Removed the patch disabling TSO on allocation errors. Antoine

[PATCH net-next v2 3/5] net: mvpp2: align values in ethtool get_coalesce

2017-12-11 Thread Antoine Tenart
Cosmetic patch aligning values in the ethtool get_coalesce function. This patch do not modify in anyway the driver's behaviour. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH net-next v2 5/5] net: mvpp2: adjust the coalescing parameters

2017-12-11 Thread Antoine Tenart
This patch adjust the coalescing parameters to the vendor recommendations for the PPv2 network controller. Suggested-by: Yan Markman <ymark...@marvell.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 4 ++-- 1 fil

[PATCH net-next v2 4/5] net: mvpp2: report the tx-usec coalescing information to ethtool

2017-12-11 Thread Antoine Tenart
This patch adds the tx-usec value to the informations reported to ethtool by the get_coalesce function. Suggested-by: Yan Markman <ymark...@marvell.com> Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 1 + 1 file changed,

[PATCH net-next 2/6] net: mvpp2: initialize the Tx FIFO size

2017-10-30 Thread Antoine Tenart
So far only the Rx FIFO size was initialized. For PPv2.2 the Tx FIFO size can be set as well. This patch initializes the Tx FIFO size for PPv2.2 controllers to 3K. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.

[PATCH net-next 1/6] net: mvpp2: set the Rx FIFO size depending on the port speeds for PPv2.2

2017-10-30 Thread Antoine Tenart
The Rx FIFO size was set to the same value for all ports. This patch sets it depending on the maximum speed a given port can handle. This is only working for PPv2.2. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.

[PATCH net-next 6/6] net: mvpp2: simplify the Tx desc set DMA logic

2017-10-30 Thread Antoine Tenart
(). This patch moves the base+offset calculation logic to mvpp2_txdesc_dma_addr_set(), and removes mvpp2_txdesc_offset_set() to simplify things. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 39

[PATCH net-next 5/6] net: mvpp2: use the aggr txq size define everywhere

2017-10-30 Thread Antoine Tenart
Cosmetic patch using the MVPP2_AGGR_TXQ_SIZE everywhere instead of the size field of aggr_txq, as the size never change and is always equal to the MVPP2_AGGR_TXQ_SIZE define. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 6 +++

[PATCH net-next 3/6] net: mvpp2: initialize the RSS tables

2017-10-30 Thread Antoine Tenart
This patch initialize the RSS tables to evenly (depending on the packets RSS hashes) distribute the packets across port Rx queues. This helps to handle packets on different CPUs to improve performances, as more queues will be used in parallel. Signed-off-by: Antoine Tenart <antoine.ten...@f

[PATCH net-next 4/6] net: mvpp2: limit TSO segments and use stop/wake thresholds

2017-10-30 Thread Antoine Tenart
o skb". Wake up the queue when the number of descriptors is low enough. Signed-off-by: Antoine Tenart <antoine.ten...@free-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 0/6] net: ppv2: various improvements

2017-10-30 Thread Antoine Tenart
were tested extensively (I ran iperf and http downloads in parallel, transferring TBs of data). Thanks! Antoine Antoine Tenart (6): net: mvpp2: set the Rx FIFO size depending on the port speeds for PPv2.2 net: mvpp2: initialize the Tx FIFO size net: mvpp2: initialize the RSS tables net

Re: [PATCH net-next v2 02/13] net: phy: sfp: handle non-wired SFP connectors

2018-05-04 Thread Antoine Tenart
Hi Florian, On Fri, May 04, 2018 at 10:04:48AM -0700, Florian Fainelli wrote: > On 05/04/2018 06:56 AM, Antoine Tenart wrote: > > SFP connectors can be solder on a board without having any of their pins > > (LOS, i2c...) wired. In such cases the SFP link state ca

[PATCH net] net: phy: sfp: fix the BR,min computation

2018-05-04 Thread Antoine Tenart
values. This patch fixes the BR,min computation as the min value should be subtracted to the nominal one, not added. Fixes: 9962acf7fb8c ("sfp: add support for 1000Base-PX and 1000Base-BX10") Signed-off-by: Antoine Tenart <antoine.ten...@bootlin.com> --- drivers/net/phy/sfp-bus.

[PATCH net-next] net: phy: sfp: handle cases where neither BR,min nor BR,max is given

2018-05-04 Thread Antoine Tenart
values. When using a passive cable, the nominal value should be used as the maximum one, and there is no minimum one so we should use 0. Signed-off-by: Antoine Tenart <antoine.ten...@bootlin.com> --- Hi Russell, I'm not completely sure about this patch as this case is not really spe

Re: [PATCH net-next v2 01/13] net: phy: sfp: make the i2c-bus property really optional

2018-05-04 Thread Antoine Tenart
Hi Florian, On Fri, May 04, 2018 at 10:03:16AM -0700, Florian Fainelli wrote: > On 05/04/2018 06:56 AM, Antoine Tenart wrote: > > > > static int sfp_read(struct sfp *sfp, bool a2, u8 addr, void *buf, size_t > > len) > > { > > + if (!sfp->read

Re: [PATCH net-next v2 06/13] phy: add 2.5G SGMII mode to the phy_mode enum

2018-05-14 Thread Antoine Tenart
Hi Russell, On Tue, May 08, 2018 at 01:34:08PM +0100, Russell King - ARM Linux wrote: > On Fri, May 04, 2018 at 03:56:36PM +0200, Antoine Tenart wrote: > > This patch adds one more generic PHY mode to the phy_mode enum, to allow > > configuring generic PHYs to the 2.5G SGMI

Re: [PATCH] net: mvpp2: fix mvpp2_tx()'s return type

2018-05-14 Thread Antoine Tenart
ng 'netdev_tx_t' in this driver too. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> I don't think this has been applied yet, so, Acked-by: Antoine Tenart <antoine.ten...@bootlin.com> Thanks! Antoine > --- > drivers/net/ethernet/marvell/mvpp2.c | 2 +- >

Re: [PATCH net-next] net: phy: sfp: handle cases where neither BR,min nor BR,max is given

2018-05-14 Thread Antoine Tenart
Hi Russell, On Tue, May 08, 2018 at 01:30:26PM +0100, Russell King - ARM Linux wrote: > > The electronic engineer in me says that using zero isn't really valid > because there are coupling capacitors in the SFP module that block DC. > These blocking capacitors are required by the SFP+ specs to

<    1   2   3   4   5   >