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

2018-05-05 Thread Thomas Petazzoni
e link status. This is achieved using SFP+phylink+PPv2. > > And representing the SFP cage in the device tree, although it's a > "dummy" one, helps describing the hardware. Just to add to this: the board physically has a SFP cage, and a cable can be connected to it, or not

Re: [PATCH 1/2] net: mvneta: split rxq/txq init into SW and HW parts

2018-03-29 Thread Thomas Petazzoni
t mvneta_txq_init(struct mvneta_port *pp, > txq->tx_stop_threshold = txq->size - MVNETA_MAX_SKB_DESCS; > txq->tx_wake_threshold = txq->tx_stop_threshold / 2; > > - Spurious change. Thanks! Thomas Petazzoni -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 2/2] net: mvneta: improve suspend/resume

2018-03-29 Thread Thomas Petazzoni
w_init(pp, txq); > + } > + > + if (!pp->neta_armada3700) { > + spin_lock(&pp->lock); > + pp->is_stopped = false; > + spin_unlock(&pp->lock); > + cpuhp_state_add_instance_nocalls(online_hpstate, > + &pp->node_online); > + cpuhp_state_add_instance_nocalls(CPUHP_NET_MVNETA_DEAD, > + &pp->node_dead); > + } > + > + mvneta_set_rx_mode(dev); > + mvneta_start_dev(pp); Thanks! Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: Handling an Extra Signal at PHY Reset

2019-02-19 Thread Thomas Petazzoni
e deasserting reset, and then switched back to its original state so that the config pin can be used for its normal (non-reset) purpose. So the manipulation of the config signal is intertwined with the assert/de-assert of the reset. So I don't see how your fourth option would work for example. Am I missing something here ? Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: Handling an Extra Signal at PHY Reset

2019-02-20 Thread Thomas Petazzoni
hen as the pin for the PTP clock input. Does that clarify why the CONFIG pin is not simply connected to some static pull-up/pull-down ? Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 2/2] net: mvneta: improve suspend/resume

2018-03-30 Thread Thomas Petazzoni
eed. It would have been nicer to have something symmetric, with the hw/sw parts split in a similar way for the init and deinit of both txqs and rxqs, but I agree that dropping the RX packets before going into suspend involves both HW and SW operations. Thanks! Thomas Petazzoni -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] net: mvneta: fix enable of all initialized RXQs

2018-03-30 Thread Thomas Petazzoni
t; Signed-off-by: Yelena Krivosheev > Signed-off-by: Gregory CLEMENT Acked-by: Thomas Petazzoni Thanks, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next 1/5] net: mvpp2: use the same buffer pool for all ports

2018-03-02 Thread Thomas Petazzoni
mvpp2_pools[MVPP2_BM_LONG].pkt_size = MVPP2_BM_LONG_PKT_SIZE; > +} ? Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com

Re: [PATCH net-next 5/5] net: mvpp2: jumbo frames support

2018-03-02 Thread Thomas Petazzoni
dev->min_mtu = ETH_MIN_MTU; > - /* 9676 == 9700 - 20 and rounding to 8 */ > - dev->max_mtu = 9676; How come we already had a max_mtu of 9676 without Jumbo frame support ? > + /* 9704 == 9728 - 20 and rounding to 8 */ > + dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE; Is this correct for all ports ? Shouldn't the maximum MTU be different between port 0 (that supports Jumbo frames) and the other ports ? Thanks! Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com

Re: [PATCH net-next 3/5] net: mvpp2: use a data size of 10kB for Tx FIFO on port 0

2018-03-02 Thread Thomas Petazzoni
ion a limit of the PPv2.2 IP, or of the CP110 ? Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com

Re: [PATCH net-next 3/5] net: mvpp2: use a data size of 10kB for Tx FIFO on port 0

2018-03-04 Thread Thomas Petazzoni
#x27;s just a limitation of PPv2.2, and mentioning CP110 in the comment doesn't make much sense, correct ? Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com

Re: [PATCH net-next 5/5] net: mvpp2: jumbo frames support

2018-03-04 Thread Thomas Petazzoni
bo frames) and the other ports ? > > This is correct for all ports. All ports can support Jumbo frames. OK. With your explanation above, I understand better. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com

Re: [PATCH net-next 1/5] net: mvpp2: use the same buffer pool for all ports

2018-03-05 Thread Thomas Petazzoni
ALIGN(X, SMP_CACHE_BYTES) I don't really see a __max(...) call. And if this value really expands depending on other values, then it isn't really a constant, and should be considered as a constant, no? Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com

Re: [PATCH net] net: mvpp2: Fix clock resource by adding an optional bus clock

2017-09-28 Thread Thomas Petazzoni
iv->mg_clk); > if (err < 0) > goto err_gop_clk; > + > + priv->axi_clk = devm_clk_get(&pdev->dev, "axi_clk"); > + if (IS_ERR(priv->axi_clk)) { > + err = PTR_ERR(priv->axi_clk); > + priv->axi_clk = NULL; You should handle -EPROBE_DEFER here. Indeed, if we have -EPROBE_DEFER, we shouldn't treat it as "the clock doesn't exist, so let's skip it and continue", but rather as "the clock exists, but isn't ready to use yet, let's try later". Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [PATCH net-next v4 0/4] net: mvpp2: 1000BaseX and 2500BaseX support

2018-01-11 Thread Thomas Petazzoni
parison in operand of ‘|’ [-Wparentheses] > if (port->phy_interface == PHY_INTERFACE_MODE_1000BASEX | > ^~~~~~~ This is actually a very good warning: it should be a || and not |. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: Linux mvneta driver unable to read MAC address from HW

2020-10-12 Thread Thomas Petazzoni
of all unused clocks at the end of the boot. When the driver is built-in, there is a driver adding a reference to the clock before all unused clocks are disabled. When the driver is compiled as a module, this does not happen. So indeed, the correct solution here is to have U-Boot pass the MAC address

[PATCH] net: phy: mdio_bus: add missing device_del() in mdiobus_register() error handling

2019-01-16 Thread Thomas Petazzoni
ssing device_del() invocation in the error path. Fixes: 69226896ad636 ("mdio_bus: Issue GPIO RESET to PHYs") Signed-off-by: Thomas Petazzoni --- drivers/net/phy/mdio_bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 2e59a8419b1

Re: [PATCH] net: phy: mdio_bus: add missing device_del() in mdiobus_register() error handling

2019-01-16 Thread Thomas Petazzoni
should always be called: "Always use put_device() to give up the reference initialized in this function instead.". What do you think? Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [BUG] MVPP2 driver exploding in presence of a tap interface

2018-10-30 Thread Thomas Petazzoni
proper reset/reinit of the HW ? I.e, isn't the firmware fix papering over a bug that should be fixed in Linux mvpp2 driver anyway ? Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [BUG] MVPP2 driver exploding in presence of a tap interface

2018-10-30 Thread Thomas Petazzoni
M on boot up that would avoid this issue ? Thanks, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net] net: mvneta: fix operation for 64K PAGE_SIZE

2018-12-16 Thread Thomas Petazzoni
ng on XDP support in mvneta, and this work also needs to change parts of the memory allocation strategy in this driver. I'd suggest to get in touch with those folks. Antoine can give you the contact details, I don't have them off-hand. Or perhaps they will see this e-mail :-) Best regards,

Re: [PATCH net-next v2 0/6] Add comphy support for Armada 38x

2019-02-08 Thread Thomas Petazzoni
e net-next tree, all the other patches should have gone through other trees. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] net: phy: mdio_bus: add missing device_del() in mdiobus_register() error handling

2019-02-11 Thread Thomas Petazzoni
ch will be freed up by mdiobus_free() So, if we were to use device_unregister() in the error path of mdiobus_register() and in mdiobus_unregister(), it would break how mdiobus_free() works. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [BUG] mveta: mvneta_txq_bufs_free NULL pointer dereference

2017-11-27 Thread Thomas Petazzoni
nd trace 0e5abdfc76ee83e5 ]--- > [ 1344.696733] Kernel panic - not syncing: Fatal exception in interrupt > [ 1344.703310] SMP: stopping secondary CPUs > [ 1344.707369] Kernel Offset: disabled > [ 1344.710613] CPU features: 0x002008 > [ 1344.714294] Memory Limit: none > [ 1344.717086] ---[ end Kernel panic - not syncing: Fatal exception in > interrupt > > I you want more logs or some other details about my setup i'll be > happy to help :-) > Also with testing a possible fix. > > Thanks, > Sean Nyekjaer -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

[PATCH 0/2] net: sh_eth: DMA mapping API fixes

2017-12-04 Thread Thomas Petazzoni
Hello, Here are two patches that fix how the sh_eth driver is using the DMA mapping API: a bogus struct device is used in some places, or a NULL struct device is used. Best regards, Thomas Thomas Petazzoni (2): net: sh_eth: use correct "struct device" when calling DMA mapping

[PATCH 1/2] net: sh_eth: use correct "struct device" when calling DMA mapping functions

2017-12-04 Thread Thomas Petazzoni
uct device" representing the physical device on its bus. This commit fixes that by adjusting all calls to the DMA mapping API. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/renesas/sh_eth.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/d

[PATCH 2/2] net: sh_eth: don't use NULL as "struct device" for the DMA mapping API

2017-12-04 Thread Thomas Petazzoni
Using NULL as argument for the DMA mapping API is bogus, as the DMA mapping API may use information from the "struct device" to perform the DMA mapping operation. Therefore, pass the appropriate "struct device". Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/r

[PATCH] net: sh_eth: do not advertise Gigabit capabilities when not available

2017-12-04 Thread Thomas Petazzoni
/s, even though the MAC doesn't support it. In order to avoid this, we mark phydev->supported if we're running a non-Gigabit capable hardware. Tested on a SH7786 platform, with a Gigabit PHY. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/renesas/sh_eth.c | 5 + 1 file

[PATCH 2/2] net: sh_eth: make work on big endian systems

2017-12-04 Thread Thomas Petazzoni
running big-endian. Therefore, all the endianness conversion needs to be removed for the sh_eth driver to work. Signed-off-by: Thomas Petazzoni --- Note: I see that Sergei Shtylyov has done some work around endianness on this driver back in 2015. I am not sure if it's used on other non-S

[PATCH 0/2] net: sh_eth: add support for SH7786 and big-endian

2017-12-04 Thread Thomas Petazzoni
er. Indeed, my change is based on the assumption that the DMA descriptors are in the native endianness of the CPU. Thanks, Thomas Thomas Petazzoni (2): net: sh_eth: add support for SH7786 net: sh_eth: make work on big endian systems drivers/net/ethernet/renesas/sh_

[PATCH 1/2] net: sh_eth: add support for SH7786

2017-12-04 Thread Thomas Petazzoni
This commit adds the sh_eth_cpu_data structure that describes the SH7786 variant of the IP. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/renesas/sh_eth.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers

Re: [PATCH 1/2] net: sh_eth: add support for SH7786

2017-12-04 Thread Thomas Petazzoni
Hello, On Mon, 4 Dec 2017 19:56:35 +0300, Sergei Shtylyov wrote: > On 12/04/2017 05:17 PM, Thomas Petazzoni wrote: > > > This commit adds the sh_eth_cpu_data structure that describes the > > SH7786 variant of the IP. > > The manual seems to be unavailable, so I hav

[PATCH v2] net: sh_eth: do not advertise Gigabit capabilities when not available

2017-12-05 Thread Thomas Petazzoni
h the MAC doesn't support it. In order to avoid this, we use the recently introduced phy_set_max_speed() to tell the PHY to not advertise speed higher than 100 MBit/s. Tested on a SH7786 platform, with a Gigabit PHY. Signed-off-by: Thomas Petazzoni --- Changes since v1: - Use phy_set_max_s

Re: [PATCH 1/2] net: sh_eth: use correct "struct device" when calling DMA mapping functions

2017-12-05 Thread Thomas Petazzoni
mp;mdp->pdev->dev); pm_runtime_put_sync(&mdp->pdev->dev); pm_runtime_put_sync(&mdp->pdev->dev); struct device *dev = &mdp->pdev->dev; Best regards, Thomas Petazzoni -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-09 Thread Thomas Petazzoni
tlin have > remained quiet. Unfortunately, we are no longer actively working on Marvell platform support at the moment. We might have a look on a best effort basis, but this is potentially a non-trivial issue, so I'm not sure when we will have the chance to investigate and fix this. Best regards,

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-09 Thread Thomas Petazzoni
t; 5.7-final? Since 5.7 is really close, I would suggest to disable the functionality. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: network unreliable on ReadyNAS 104 with Debian kernel

2020-05-02 Thread Thomas Petazzoni
orrupted packets are given to the upper layers. > > Does this ring a bell for you? I didn't start to debug that yet. I think I do remember seeing reports about this, but I don't remember if it ended up being fixed (and what we're seeing is some other problem), or if it

[PATCH net-next 1/3] net: mvpp2: add comments about smp_processor_id() usage

2017-06-22 Thread Thomas Petazzoni
A previous commit modified a number of smp_processor_id() used in migration-enabled contexts into get_cpu/put_cpu sections. However, a few smp_processor_id() calls remain in the driver, and this commit adds comments explaining why they can be kept. Signed-off-by: Thomas Petazzoni --- drivers

[PATCH net-next 2/3] net: mvpp2: remove unused mvpp2_bm_cookie_pool_set() function

2017-06-22 Thread Thomas Petazzoni
This function is not used in the driver, remove it. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index 4b3bf37..aad763c 100644

[PATCH net-next 0/3] net: mvpp2: misc improvements

2017-06-22 Thread Thomas Petazzoni
David, Here are a few patches making various small improvements/refactoring in the mvpp2 driver. They are based on today's net-next. Thanks! Thomas Thomas Petazzoni (3): net: mvpp2: add comments about smp_processor_id() usage net: mvpp2: remove unused mvpp2_bm_cookie_pool_set() fun

[PATCH net-next 3/3] net: mvpp2: remove mvpp2_pool_refill()

2017-06-22 Thread Thomas Petazzoni
When all a function does is calling another function with the exact same arguments, in the exact same order, you know it's time to remove said function. Which is exactly what this commit does. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 14 +++--- 1

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-06-25 Thread Thomas Petazzoni
Hello Giuseppe, On Mon, 15 May 2017 16:27:34 +0200, Thomas Petazzoni wrote: > On Wed, 10 May 2017 09:18:17 +0200, Thomas Petazzoni wrote: > > > On Wed, 10 May 2017 09:03:12 +0200, Giuseppe CAVALLARO wrote: > > > > > > Please, read again my patch and the des

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

2017-07-25 Thread Thomas Petazzoni
path and in the remove path. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

[PATCH 7/8] dt-bindings: net: marvell-pp2: update interrupt-names with TX interrupts

2017-07-25 Thread Thomas Petazzoni
to the GIC directly. Signed-off-by: Thomas Petazzoni --- .../devicetree/bindings/net/marvell-pp2.txt| 33 +- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net

[PATCH 0/8] net: mvpp2: add TX interrupts support

2017-07-25 Thread Thomas Petazzoni
Antoine's. - Please do not apply the last patch of this series "arm64: dts: marvell: add TX interrupts for PPv2.2", it will be taken by the ARM mvebu maintainers. Thanks! Thomas Thomas Petazzoni (8): net: mvpp2: fix MVPP21_ISR_RXQ_GROUP_REG definition net: mvpp2: remove RX que

[PATCH 5/8] net: mvpp2: introduce queue_vector concept

2017-07-25 Thread Thomas Petazzoni
s a single queue_vector, so there are no changes in behavior, but it paves the way for additional queue_vector in the next commits. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 250 +-- 1 file changed, 178 insertions(+), 72 deletions(-) di

[PATCH 8/8] arm64: dts: marvell: add TX interrupts for PPv2.2

2017-07-25 Thread Thomas Petazzoni
This commit updates the Marvell Armada 7K/8K Device Tree to describe the TX interrupts of the Ethernet controllers, in both the master and slave CP110s. Signed-off-by: Thomas Petazzoni --- Dave: please do *not* apply this patch. It will go through the ARM mvebu maintainers. Thanks! .../arm64

[PATCH 4/8] net: mvpp2: move from cpu-centric naming to "software thread" naming

2017-07-25 Thread Thomas Petazzoni
nge, it makes sense to change the naming from MVPP2_MAX_CPUS to MVPP2_MAX_THREADS, and plan for 8 software threads instead of 4 currently. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) d

[PATCH 2/8] net: mvpp2: remove RX queue group reset code

2017-07-25 Thread Thomas Petazzoni
The RX queue group allocation is anyway re-done later in mvpp2_port_init(), so resetting it in mvpp2_init() is not very useful, and will be annoying as we are going to rework the RX queue group allocation logic. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 17

[PATCH 6/8] net: mvpp2: add support for TX interrupts and RX queue distribution modes

2017-07-25 Thread Thomas Petazzoni
, with only one RX interrupt, and TX completion being handled by an hrtimer. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 275 +++ 1 file changed, 246 insertions(+), 29 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b

[PATCH 1/8] net: mvpp2: fix MVPP21_ISR_RXQ_GROUP_REG definition

2017-07-25 Thread Thomas Petazzoni
The MVPP21_ISR_RXQ_GROUP_REG register is not indexed by rxq, but by port, so we fix the parameter name accordingly. There are no functional changes. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 3/8] net: mvpp2: introduce per-port nrxqs/ntxqs variables

2017-07-25 Thread Thomas Petazzoni
per-port count of RXQ and TXQ. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 83 ++-- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index e

Re: [PATCH 0/8] net: mvpp2: add TX interrupts support

2017-07-28 Thread Thomas Petazzoni
y are really related. It's very common to have patch series that contain patches that will be merged by different maintainers. > don't bother adding them to the series. That way you don't have to > give me special instructions, and I don't have the possibility of >

[PATCH v3] net: sh_eth: do not advertise Gigabit capabilities when not available

2017-12-08 Thread Thomas Petazzoni
h the MAC doesn't support it. In order to avoid this, we use the recently introduced phy_set_max_speed() to tell the PHY to not advertise speed higher than 100 MBit/s. Tested on a SH7786 platform, with a Gigabit PHY. Signed-off-by: Thomas Petazzoni --- Changes since v2: - Drop goto constructi

Re: [PATCH v2] net: sh_eth: do not advertise Gigabit capabilities when not available

2017-12-08 Thread Thomas Petazzoni
e sent a v3 that takes into account this comment. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [PATCH 1/2] net: sh_eth: add support for SH7786

2017-12-08 Thread Thomas Petazzoni
patible with SH_ETH_REG_FAST_SH4 layout ? Note that my patch makes Ethernet work in practice on SH7784, I have root over NFS working as we speak. This certainly doesn't mean that the patch is entirely correct, but it definitely means that the SH_ETH_REG_FAST_SH4 is close enough to what the SH7786 is using :-) Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-07-29 Thread Thomas Petazzoni
consider the RMII and (R)GMII cases. Have you had the chance to cook a different proposal? Alternatively, do you have some specific hints to give me to make a new proposal that would be acceptable for you ? Thanks a lot, Thomas Petazzoni -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and

[PATCH net-next v2 1/7] net: mvpp2: fix MVPP21_ISR_RXQ_GROUP_REG definition

2017-08-03 Thread Thomas Petazzoni
The MVPP21_ISR_RXQ_GROUP_REG register is not indexed by rxq, but by port, so we fix the parameter name accordingly. There are no functional changes. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH net-next v2 0/7] net: mvpp2: add TX interrupts support

2017-08-03 Thread Thomas Petazzoni
t go through the net tree. Thanks! Thomas Thomas Petazzoni (7): net: mvpp2: fix MVPP21_ISR_RXQ_GROUP_REG definition net: mvpp2: remove RX queue group reset code net: mvpp2: introduce per-port nrxqs/ntxqs variables net: mvpp2: move from cpu-centric naming to "software thread"

[PATCH net-next v2 2/7] net: mvpp2: remove RX queue group reset code

2017-08-03 Thread Thomas Petazzoni
The RX queue group allocation is anyway re-done later in mvpp2_port_init(), so resetting it in mvpp2_init() is not very useful, and will be annoying as we are going to rework the RX queue group allocation logic. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 17

[PATCH net-next v2 5/7] net: mvpp2: introduce queue_vector concept

2017-08-03 Thread Thomas Petazzoni
s a single queue_vector, so there are no changes in behavior, but it paves the way for additional queue_vector in the next commits. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 223 ++- 1 file changed, 169 insertions(+), 54 deletions(-) di

[PATCH net-next v2 4/7] net: mvpp2: move from cpu-centric naming to "software thread" naming

2017-08-03 Thread Thomas Petazzoni
nge, it makes sense to change the naming from MVPP2_MAX_CPUS to MVPP2_MAX_THREADS, and plan for 8 software threads instead of 4 currently. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) d

[PATCH net-next v2 6/7] net: mvpp2: add support for TX interrupts and RX queue distribution modes

2017-08-03 Thread Thomas Petazzoni
, with only one RX interrupt, and TX completion being handled by an hrtimer. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 275 +++ 1 file changed, 246 insertions(+), 29 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b

[PATCH net-next v2 3/7] net: mvpp2: introduce per-port nrxqs/ntxqs variables

2017-08-03 Thread Thomas Petazzoni
per-port count of RXQ and TXQ. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 83 ++-- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index 5

[PATCH net-next v2 7/7] dt-bindings: net: marvell-pp2: update interrupt-names with TX interrupts

2017-08-03 Thread Thomas Petazzoni
to the GIC directly. Signed-off-by: Thomas Petazzoni --- .../devicetree/bindings/net/marvell-pp2.txt| 28 +++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-05-10 Thread Thomas Petazzoni
n to this problem should be designed. I made an initial simple proposal to show what is needed, but I'm definitely open to suggestions. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-05-15 Thread Thomas Petazzoni
Hello Giuseppe, On Wed, 10 May 2017 09:18:17 +0200, Thomas Petazzoni wrote: > On Wed, 10 May 2017 09:03:12 +0200, Giuseppe CAVALLARO wrote: > > > > Please, read again my patch and the description of the problem that I > > > have sent. But basically, any solution that d

Re: [PATCH] net: mvpp2: do not bypass the mvpp22_port_mii_set function

2017-06-06 Thread Thomas Petazzoni
gt; > Signed-off-by: Antoine Tenart Please add: Fixes: 2697582144dd ("net: mvpp2: handle misc PPv2.1/PPv2.2 differences") with this: Acked-by: Thomas Petazzoni I am wondering if we shouldn't Cc: stable as well. I don't think we have seen issues on our side because

[PATCH 0/5] net: mvpp2: fixes and cleanups

2017-06-08 Thread Thomas Petazzoni
should be pushed to stable. The last three patches are cleanups and not needed for stable, but they stack on top of the fixes. Thanks, Thomas Thomas Petazzoni (5): net: mvpp2: remove mvpp2_bm_cookie_{build,pool_get} net: mvpp2: use {get,put}_cpu() instead of smp_processor_id() net: mvpp2

[PATCH 2/5] net: mvpp2: use {get,put}_cpu() instead of smp_processor_id()

2017-06-08 Thread Thomas Petazzoni
commit replaces the smp_processor_id() in migration-enabled contexts by the appropriate get_cpu/put_cpu sections. Reported-by: Marc Zyngier Fixes: a786841df72e ("net: mvpp2: handle register mapping and access for PPv2.2") Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mv

[PATCH 1/5] net: mvpp2: remove mvpp2_bm_cookie_{build,pool_get}

2017-06-08 Thread Thomas Petazzoni
: 3f518509dedc9 ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 51 ++-- 1 file changed, 14 insertions(+), 37 deletions(-) diff --git a/drivers/net/ethernet/marvell/

[PATCH 3/5] net: mvpp2: add comments about smp_processor_id() usage

2017-06-08 Thread Thomas Petazzoni
A previous commit modified a number of smp_processor_id() used in migration-enabled contexts into get_cpu/put_cpu sections. However, a few smp_processor_id() calls remain in the driver, and this commit adds comments explaining why they can be kept. Signed-off-by: Thomas Petazzoni --- drivers

[PATCH 4/5] net: mvpp2: remove unused mvpp2_bm_cookie_pool_set() function

2017-06-08 Thread Thomas Petazzoni
This function is not used in the driver, remove it. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index 037f6bd..4ca1639 100644

[PATCH 5/5] net: mvpp2: remove mvpp2_pool_refill()

2017-06-08 Thread Thomas Petazzoni
When all a function does is calling another function with the exact same arguments, in the exact same order, you know it's time to remove said function. Which is exactly what this commit does. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 14 +++--- 1

[PATCH v2 1/2] net: mvpp2: remove mvpp2_bm_cookie_{build,pool_get}

2017-06-10 Thread Thomas Petazzoni
: 3f518509dedc9 ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 47 +++- 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/drivers/net/ethernet/marvell/

[PATCH v2 0/2] net: mvpp2: driver fixes

2017-06-10 Thread Thomas Petazzoni
the kbuild report on the first submission. - Added Tested-by from Marc Zyngier on PATCH 2. Thanks! Thomas Thomas Petazzoni (2): net: mvpp2: remove mvpp2_bm_cookie_{build,pool_get} net: mvpp2: use {get,put}_cpu() instead of smp_processor_id() drivers/net/ethernet/marvell/mv

[PATCH v2 2/2] net: mvpp2: use {get,put}_cpu() instead of smp_processor_id()

2017-06-10 Thread Thomas Petazzoni
commit replaces the smp_processor_id() in migration-enabled contexts by the appropriate get_cpu/put_cpu sections. Reported-by: Marc Zyngier Fixes: a786841df72e ("net: mvpp2: handle register mapping and access for PPv2.2") Signed-off-by: Thomas Petazzoni Tested-by: Marc Zyngier --- d

Re: Problems with mvneta

2017-10-18 Thread Thomas Petazzoni
napi_complete_done() a29b6235560a1ed10c8e1a73bfc616a66b802b90 net: mvneta: add BQL support 2a90f7e1d5d04e4f1060268e0b55a2c702bbd67a net: mvneta: add xmit_more support Could you try to take mvneta* from Linux 4.10, put that in Linux 4.12, and see if you can still produce the problem? I'd li

Re: Problems with mvneta

2017-10-20 Thread Thomas Petazzoni
nce. So let's focus on those 3 commits for the moment. Assuming you're using Git, to revert a commit just do: "git revert ". Thanks again! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: Problems with mvneta

2017-10-31 Thread Thomas Petazzoni
g stability issues with this patch applied. Do you think you will have some time to look into this ? Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: Problems with mvneta

2017-10-31 Thread Thomas Petazzoni
ck look, I wonder what is happening if > "txq->pending + frags > MVNETA_TXQ_DEC_SENT_MASK" ? Because IIUC > mvneta_txq_pend_desc_add() is called anyway. And according to the > comment inside the function, it assumes there is less than 255 > descriptors to send... It look

Re: [PATCH] net: mvneta: replace MVNETA_CPU_D_CACHE_LINE_SIZE with L1_CACHE_BYTES

2016-03-31 Thread Thomas Petazzoni
uses cache_line_size(), see: "[PATCH v2] net: mvneta: replace MVNETA_CPU_D_CACHE_LINE_SIZE with cache_line_size" Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com

Re: stmmac still supporting spear600 ?

2017-03-21 Thread Thomas Petazzoni
Hello, On Thu, 9 Mar 2017 15:56:31 +0100, Giuseppe CAVALLARO wrote: > On 3/9/2017 10:32 AM, Thomas Petazzoni wrote: > > > OK, I'll have a look. However, I'm still confused by this DMA_RESET bit > > that never clears, contrary to what the datasheet says. Are ther

Re: stmmac still supporting spear600 ?

2017-04-02 Thread Thomas Petazzoni
he LAN8700 PHY ? Was it on a SPEAr600 based platform ? If you tested on SPEAr600, what is the GMAC clock configuration (i.e the value of the GMAC_CFG_CTR and GMAC_CFG_SYNT registers) ? Regarding the PHY reset time, our PHY reset pin is not connected to a GPIO, but to the system reset logic, so Linux ca

Re: [PATCH] net: mvpp2: sleeping function called from invalid context

2017-04-08 Thread Thomas Petazzoni
local variable. Anyway, I think it's worth investigating a different solution than blindly converting to a GFP_ATOMIC allocation. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: stmmac still supporting spear600 ?

2017-04-12 Thread Thomas Petazzoni
. Again, we see the same behavior in U-Boot (DMA reset bit never clears), but Ethernet does work in U-Boot. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

Re: stmmac still supporting spear600 ?

2017-04-20 Thread Thomas Petazzoni
PHY is not coming in through the same pin when in GMII and MII mode it seems. Does this needs some special configuration? Any hint/idea would definitely be welcome. Thanks a lot! Thomas On Wed, 12 Apr 2017 15:05:58 +0200, Thomas Petazzoni wrote: > Hello, > > Thanks again for your answe

Re: [PATCH 4.10-rc3 07/13] net: mvneta: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-02-01 Thread Thomas Petazzoni
n] > > Add linux/phy_fixed.h to mvneta.c > > Signed-off-by: Russell King Acked-by: Thomas Petazzoni -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

[PATCHv3 net-next 08/12] net: mvpp2: remove unused register definitions

2017-02-02 Thread Thomas Petazzoni
Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index e7d0da6..ef68780 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net

[PATCHv3 net-next 09/12] net: mvpp2: fix indentation of MVPP2_EXT_GLOBAL_CTRL_DEFAULT

2017-02-02 Thread Thomas Petazzoni
Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index ef68780..b219b0c 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b

[PATCHv3 net-next 05/12] net: mvpp2: remove unused 'tx_skb' field of 'struct mvpp2_tx_queue'

2017-02-02 Thread Thomas Petazzoni
This commit remove a field of 'struct mvpp2_tx_queue' that is not used anywhere. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvp

[PATCHv3 net-next 07/12] net: mvpp2: simplify mvpp2_bm_bufs_add()

2017-02-02 Thread Thomas Petazzoni
thing, just call mvpp2_bm_pool_put() directly, since we have the BM pool ID. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c

[PATCHv3 net-next 04/12] net: mvpp2: release reference to txq_cpu[] entry after unmapping

2017-02-02 Thread Thomas Petazzoni
been completely unmapped/released. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index d938996..30aaff8 100644 --- a

[PATCHv3 net-next 01/12] net: mvpp2: remove useless arguments in mvpp2_rx_{pkts,time}_coal_set

2017-02-02 Thread Thomas Petazzoni
tting them again in the mvpp2_rx_queue structure is useles. This commit therefore gets rid of this additional argument, assuming the caller has assigned the appropriate value to rxq->pkts_coal or rxq->time_coal before calling the respective functions. Signed-off-by: Thomas Petazzoni

[PATCHv3 net-next 03/12] net: mvpp2: handle too large value in mvpp2_rx_time_coal_set()

2017-02-02 Thread Thomas Petazzoni
implementation. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index 3fd5a9f..d938996 100644 --- a

[PATCHv3 net-next 06/12] net: mvpp2: drop useless fields in mvpp2_bm_pool and related code

2017-02-02 Thread Thomas Petazzoni
tomic_read(&bm_pool->in_use) < bm_pool->in_use_thresh)) return 0; However 'is_recycle', passed as argument to mvpp2_rx_refill() is always false. So in fact, this code is never reached, and the 'is_recycle' argument is useless. So let's drop this code.

[PATCHv3 net-next 11/12] net: mvpp2: switch to build_skb() in the RX path

2017-02-02 Thread Thomas Petazzoni
buffers in mvpp2_bm_bufs_add() as well as the refill of the RX buffers in mvpp2_rx_refill() is adjusted accordingly. - Finally, the mvpp2_rx() is modified to use build_skb(). Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 77

[PATCHv3 net-next 02/12] net: mvpp2: handle too large value handling in mvpp2_rx_pkts_coal_set()

2017-02-02 Thread Thomas Petazzoni
low value. It makes a lot more sense to simply check if the value is too high, and if it's too high, limit it to the maximum possible value. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dr

[PATCHv3 net-next 10/12] net: mvpp2: simplify MVPP2_PRS_RI_* definitions

2017-02-02 Thread Thomas Petazzoni
UCAST’ mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L2_UCAST, Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index b219b0c..ec8f4

[PATCHv3 net-next 12/12] net: mvpp2: enable building on 64-bit platforms

2017-02-02 Thread Thomas Petazzoni
compliant. We use dma_addr_t for DMA addresses, and unsigned long for virtual addresses. It is worth mentioning that after this commit, the driver is for now still only used on 32-bits platforms, and will only work on 32-bits platforms. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet

  1   2   3   >