Re: lost interrupts when running sabrelite images (v4.15+) in qemu

2018-03-05 Thread Troy Kisky
On 3/3/2018 1:12 PM, Guenter Roeck wrote: > On 03/03/2018 12:48 PM, Guenter Roeck wrote: >> On 03/03/2018 11:07 AM, Troy Kisky wrote: >>> On 3/3/2018 8:32 AM, Guenter Roeck wrote: >>>> Hi, >>>> >>>> since v4.15, I get the following runtime wa

Re: lost interrupts when running sabrelite images (v4.15+) in qemu

2018-03-03 Thread Troy Kisky
On 3/3/2018 8:32 AM, Guenter Roeck wrote: > Hi, > > since v4.15, I get the following runtime warning when running sabrelite images > in qemu. > > irq 65: nobody cared (try booting with the "irqpoll" option) > ... > handlers: > [<26292474>] fec_pps_interrupt > Disabling IRQ #65 > fec

Re: [PATCH v2 net,stable 1/2] net: fec: restore dev_id in the cases of probe error

2018-01-03 Thread Troy Kisky
On 1/2/2018 6:39 PM, Fugang Duan wrote: > The static variable dev_id always plus one before netdev registerred. > It should restore the dev_id value in the cases of probe error. > > Signed-off-by: Fugang Duan > --- > drivers/net/ethernet/freescale/fec_main.c | 1 + > 1 file

[PATCH net v5 1/2] ARM: dts: imx: name the interrupts for the fec ethernet driver

2017-11-03 Thread Troy Kisky
uot; interrupt is for the PTP_CLOCK_PPS interrupts This will help document what each interrupt does. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v2: replaced empty names with "int0","int1", or "int2" reordered imx7 interrupts so that "int0&

[PATCH net v5 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-11-03 Thread Troy Kisky
This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.

Re: [PATCH net v4 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-11-01 Thread Troy Kisky
On 10/31/2017 7:43 PM, Andy Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, November > 01, 2017 4:17 AM >> This is better for code locality and should slightly speed up normal >> interrupts. >> >> This also allows PPS clo

[PATCH net v4 1/2] imx7s/imx7d has the ptp interrupt newly added as well.

2017-10-31 Thread Troy Kisky
elp document what each interrupt does. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v2: replaced empty names with "int0","int1", or "int2" reordered imx7 interrupts so that "int0", for queue 0, is first. v3: renamed "ptp" in

[PATCH net v4 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-31 Thread Troy Kisky
This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.

[PATCH net v3 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-31 Thread Troy Kisky
This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.

[PATCH net v3 1/2] ARM: dts: imx: name the interrupts for the fec ethernet driver

2017-10-31 Thread Troy Kisky
uot; interrupt is for the PTP_CLOCK_PPS interrupts This will help document what each interrupt does. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v2: replaced empty names with "int0","int1", or "int2" reordered imx7 interrupts so that "int0&

Re: [PATCH net v2 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-18 Thread Troy Kisky
On 10/18/2017 11:10 AM, Troy Kisky wrote: > On 10/17/2017 7:30 PM, Andy Duan wrote: >> From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, October >> 18, 2017 5:34 AM >>>>> This is better for code locality and should slightly speed up normal &

Re: [PATCH net v2 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-18 Thread Troy Kisky
On 10/17/2017 7:30 PM, Andy Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, October > 18, 2017 5:34 AM >>>> This is better for code locality and should slightly speed up normal >> interrupts. >>>> >>>> This a

Re: [PATCH net v2 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-17 Thread Troy Kisky
On 10/15/2017 8:41 PM, Andy Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Saturday, October 14, > 2017 10:10 AM >> This is better for code locality and should slightly speed up normal >> interrupts. >> >> This also allows PPS clo

[PATCH net v2 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-13 Thread Troy Kisky
This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.

[PATCH net v2 1/2] ARM: dts: imx: name the interrupts for the fec ethernet driver

2017-10-13 Thread Troy Kisky
uot; interrupt is for the PTP_CLOCK_PPS interrupts This will help document what each interrupt does. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v2: replaced empty names with "int0","int1", or "int2" reordered imx7 interrupts so that "int0", for

Re: [PATCH net v1 1/2] ARM: dts: imx: let's name the ptp interrupt for the fec ethernet driver

2017-10-03 Thread Troy Kisky
On 10/2/2017 5:51 PM, Andrew Lunn wrote: > On Mon, Oct 02, 2017 at 05:04:41PM -0700, Troy Kisky wrote: >> imx7s/imx7d has the ptp interrupt newly added as well. >> This will allow the ptp interrupt to have its own interrupt routine. >> >> Signed-off-by: Troy Kisky <

[PATCH net v1 1/2] ARM: dts: imx: let's name the ptp interrupt for the fec ethernet driver

2017-10-02 Thread Troy Kisky
imx7s/imx7d has the ptp interrupt newly added as well. This will allow the ptp interrupt to have its own interrupt routine. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- arch/arm/boot/dts/imx6qdl.dtsi | 1 + arch/arm/boot/dts/imx6sx.dtsi | 2 ++ arch/arm/boot/dts/imx6u

[PATCH net v1 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-02 Thread Troy Kisky
This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.

[PATCH v4 3/3] net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it

2017-09-19 Thread Troy Kisky
fec_ptp_check_pps_event will return 1 if FEC_T_TF_MASK caused an interrupt. Don't return IRQ_NONE in this case. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> Acked-by: Fugang Duan <fugang.d...@nxp.com> --- v3: New patch, came from feedback from another patch. v4:

[PATCH v4 2/3] net: fec: remove unused interrupt FEC_ENET_TS_TIMER

2017-09-19 Thread Troy Kisky
FEC_ENET_TS_TIMER is not checked in the interrupt routine so there is no need to enable it. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> Acked-by: Fugang Duan <fugang.d...@nxp.com> --- v4: Added Acked-by Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com>

[PATCH v4 1/3] net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set

2017-09-19 Thread Troy Kisky
Before queue 0 was always checked if any queue caused an interrupt. It is better to just mark queue 0 if queue 0 has caused an interrupt. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> Acked-by: Fugang Duan <fugang.d...@nxp.com> --- v3: add Acked-by v4: no change Signed-

[PATCH net v2 1/1] net: fec: update dirty_tx even if no skb

2016-05-27 Thread Troy Kisky
: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x] [size=66 bytes] encountered by Holger Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> Tested-by: <holgerschu...@gmail.com> Acked-by: Fugang Duan <fugang.d...@nxp.com>

Re: [PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-05-07 Thread Troy Kisky
On 4/21/2016 10:59 PM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Friday, April 22, > 2016 10:01 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan >> <fugang.d...@nxp.com>; lzn...@gmail.com >> Cc: Fabio E

Re: [PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-04-22 Thread Troy Kisky
On 4/21/2016 10:59 PM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Friday, April 22, > 2016 10:01 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan >> <fugang.d...@nxp.com>; lzn...@gmail.com >> Cc: Fabio E

[PATCH net 1/1] net: fec: update dirty_tx even if no skb

2016-04-21 Thread Troy Kisky
: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x] [size=66 bytes] encountered by Holger Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> Tested-by: <holgerschu...@gmail.com> --- drivers/net/ethernet/freescale/fe

Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-14 Thread Troy Kisky
fec_enet_napi_q1+0x98/0xe8) > [ 58.581589] r10:0800 r9:ef2ec580 r8: r7:0040 r6:0000 > r5:ef2ec000 I think I've already fixed this, but I've only submitted once. commit 466cb4a2e5583d2e18470f30d5948edcf4b947f5 Author: Troy Kisky <troy.ki...@boundarydevice

Re: [PATCH net-next V3 05/16] net: fec: reduce interrupts

2016-04-07 Thread Troy Kisky
On 4/6/2016 8:57 PM, David Miller wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> > Date: Wed, 6 Apr 2016 17:42:47 -0700 > >> Sure, that's an easy change. But if a TX int is what caused the >> interrupt and masks them, and then a RX packet happens befor

Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-07 Thread Troy Kisky
On 4/6/2016 8:58 PM, David Miller wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> > Date: Wed, 6 Apr 2016 18:09:17 -0700 > >> On 4/6/2016 2:20 PM, David Miller wrote: >>> >>> This is a way too large patch series. >>> >>&

Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-06 Thread Troy Kisky
On 4/6/2016 2:20 PM, David Miller wrote: > > This is a way too large patch series. > > Please split it up into smaller, more logical, pieces. > > Thanks. > If you apply the 1st 3 that have been acked, I'll be at 13. Would I then send the next 5 for V4, and when that is applied send another

Re: [PATCH net-next V3 05/16] net: fec: reduce interrupts

2016-04-06 Thread Troy Kisky
On 4/6/2016 2:20 PM, David Miller wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> > Date: Tue, 5 Apr 2016 19:25:51 -0700 > >> By clearing the NAPI interrupts in the NAPI routine >> and not in the interrupt handler, we can reduce the >> number of i

Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-06 Thread Troy Kisky
On 4/6/2016 9:43 AM, Troy Kisky wrote: > On 4/6/2016 1:51 AM, Fugang Duan wrote: >> From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, April 06, >> 2016 10:26 AM >>> To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan >>> <fug

Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-06 Thread Troy Kisky
On 4/6/2016 1:51 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, April 06, > 2016 10:26 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan >> <fugang.d...@nxp.com>; lzn...@gmail.com >> Cc: Fabio E

[PATCH net-next V3 13/16] net: fec: detect tx int lost

2016-04-05 Thread Troy Kisky
If a tx int is lost, no need to reset the fec. Just mark the event and call napi_schedule. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: no change --- drivers/net/ethernet/freescale/fec_main.c | 38 ++- 1 file changed, 37 insertions

[PATCH net-next V3 09/16] net: fec: eliminate calls to fec_enet_get_prevdesc

2016-04-05 Thread Troy Kisky
Eliminating calls to fec_enet_get_prevdesc shrinks the code a little. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: Change commit message s/unsigned status/unsigned int status/ as requested --- drivers/net/ethernet/freescale/fec_main.

[PATCH net-next V3 14/16] net: fec: create subroutine reset_tx_queue

2016-04-05 Thread Troy Kisky
Create subroutine reset_tx_queue to have one place to release any queued tx skbs. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: change commit message --- drivers/net/ethernet/freescale/fec_main.c | 50 +++ 1 file changed, 25 insertions(

[PATCH net-next V3 05/16] net: fec: reduce interrupts

2016-04-05 Thread Troy Kisky
is 2010 interrupts. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: Fix introduced bug of checking for FEC_ENET_TS_TIMER before calling fec_ptp_check_pps_event Changed commit message to show measured changes. Used netdev_info instead of pr_info. Fugang Duan suggested spl

[PATCH net-next V3 10/16] net: fec: move restart test for efficiency

2016-04-05 Thread Troy Kisky
Move restart test to earlier in fec_txq() which saves one comparison. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: change commit message --- drivers/net/ethernet/freescale/fec_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/d

[PATCH net-next V3 11/16] net: fec: clear cbd_sc after transmission to help with debugging

2016-04-05 Thread Troy Kisky
When the tx queue is dumped, it is easier to see that this entry is idle if cbd_sc is cleared after transmission. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: change commit message --- drivers/net/ethernet/freescale/fec_main.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH net-next V3 12/16] net: fec: dump all tx queues in fec_dump

2016-04-05 Thread Troy Kisky
Dump all tx queues, not just queue 0. Also, disable fec interrupts first. The interrupts will be reenabled in fec_restart. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: no change --- drivers/net/ethernet/freescale/fec_main.c | 40 +--

[PATCH net-next V3 03/16] net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it

2016-04-05 Thread Troy Kisky
fec_ptp_check_pps_event will return 1 if FEC_T_TF_MASK caused an interrupt. Don't return IRQ_NONE in this case. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: New patch, came from feedback from another patch. --- drivers/net/ethernet/freescale/fec_main.c | 4 ++--

[PATCH net-next V3 16/16] net: fec: don't set cbd_bufaddr unless no mapping error

2016-04-05 Thread Troy Kisky
Not assigning cbd_bufaddr on error will prevent trying to unmap the error in case the FEC is reset. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: no change --- drivers/net/ethernet/freescale/fec_main.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-)

[PATCH net-next V3 15/16] net: fec: call dma_unmap_single on mapped tx buffers at restart

2016-04-05 Thread Troy Kisky
Make sure any pending tx buffers are unmapped when the fec is restarted. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: no change --- drivers/net/ethernet/freescale/fec_main.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH net-next V3 07/16] net: fec: don't clear all rx queue bits when just one is being checked

2016-04-05 Thread Troy Kisky
-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: change commit message --- drivers/net/ethernet/freescale/fec_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 17140ea..3cd0cdf

[PATCH net-next V3 08/16] net: fec: set cbd_sc without relying on previous value

2016-04-05 Thread Troy Kisky
Relying on the wrap bit of cdb_sc to stay valid once initialized when the controller also writes to this byte seems undesirable since we can easily know what the value should be. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: change commit message --- drivers/net/et

[PATCH net-next V3 02/16] net: fec: remove unused interrupt FEC_ENET_TS_TIMER

2016-04-05 Thread Troy Kisky
FEC_ENET_TS_TIMER is not checked in the interrupt routine so there is no need to enable it. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: New patch Frank Li said "TS_TIMER should never be triggered." when discussing another patch. --- drivers/net/ethernet

[PATCH net-next V3 06/16] net: fec: split off napi routine with 3 queues

2016-04-05 Thread Troy Kisky
If we only have 1 tx/rx queue, we need not check the other queues. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- v3: rebase changes only, fep is no longer passed as a parameter to fec_rxq/fec_txq --- drivers/net/ethernet/freescale/fec_main.

[PATCH net-next V3 00/16] net: fec: cleanup and fixes

2016-04-05 Thread Troy Kisky
tead.patch The changes are noted on individual patches My measured performance of this series is before patch set 365 Mbits/sec Tx/407 RX after patch set 374 Tx/427 Rx Troy Kisky (16): net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set net: fec: remove unused interrupt FEC_ENET_TS_T

[PATCH net-next V3 04/16] net: fec: pass rxq/txq to fec_enet_rx/tx_queue instead of queue_id

2016-04-05 Thread Troy Kisky
The queue_id is the qid member of struct bufdesc_prop. Passing rxq/txq will allow the macro FEC_ENET_GET_QUQUE to be removed in the next patch. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> Acked-by: Fugang Duan <fugang.d...@nxp.com> --- v3: add Acked-by combine with &qu

[PATCH net-next V3 01/16] net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set

2016-04-05 Thread Troy Kisky
Before queue 0 was always checked if any queue caused an interrupt. It is better to just mark queue 0 if queue 0 has caused an interrupt. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> Acked-by: Fugang Duan <fugang.d...@nxp.com> --- v3: add Acked-by --- drivers/

Re: [PATCH] net: fec: stop the "rcv is not +last, " error messages

2016-03-30 Thread Troy Kisky
On 3/29/2016 8:24 PM, Greg Ungerer wrote: > Hi Troy, > > Commit 55cd48c8 ('net: fec: stop the "rcv is not +last, " error > messages') adds a write to a register that is not present in all > implementations of the FEC hardware module. None of the ColdFire > SoC parts with the FEC module have the

Re: [PATCH net-next V2 13/16] net: fec: print more debug info in fec_timeout

2016-03-04 Thread Troy Kisky
On 3/4/2016 10:35 AM, Joe Perches wrote: > On Fri, 2016-03-04 at 09:05 -0700, Troy Kisky wrote: >> On 3/4/2016 3:06 AM, Fugang Duan wrote: >>> From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, February >>> 25, 2016 8:37 AM > [] >>>

Re: [PATCH net-next V2 06/16] net: fec: don't clear all rx queue bits when just one is being checked

2016-03-04 Thread Troy Kisky
On 3/4/2016 9:38 AM, Russell King - ARM Linux wrote: > On Fri, Mar 04, 2016 at 09:18:19AM -0700, Troy Kisky wrote: >> On 3/4/2016 2:11 AM, Fugang Duan wrote: >>> From: Troy Kisky <troy.ki...@boundarydevices.com>Sent: Thursday, February >>> 25, 2016 8:37 AM &g

Re: [PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id

2016-03-04 Thread Troy Kisky
On 3/4/2016 12:41 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, March 03, > 2016 12:14 AM >> To: Fugang Duan <fugang.d...@nxp.com>; netdev@vger.kernel.org; >> da...@davemloft.net; b38...@freescale.com >> C

Re: [PATCH net-next V2 06/16] net: fec: don't clear all rx queue bits when just one is being checked

2016-03-04 Thread Troy Kisky
On 3/4/2016 2:11 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com>Sent: Thursday, February 25, > 2016 8:37 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com >> Cc: fabio.este...@freescale.com; l.st...@pengutronix.de;

Re: [PATCH net-next V2 13/16] net: fec: print more debug info in fec_timeout

2016-03-04 Thread Troy Kisky
On 3/4/2016 3:06 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, February > 25, 2016 8:37 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com >> Cc: fabio.este...@freescale.com; l.st...@pengutronix.de;

Re: [PATCH net-next V2 07/16] net: fec: set cbd_sc without relying on previous value

2016-03-04 Thread Troy Kisky
On 3/4/2016 2:29 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, February > 25, 2016 8:37 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com >> Cc: fabio.este...@freescale.com; l.st...@pengutronix.de;

Re: [PATCH net-next V2 08/16] net: fec: eliminate calls to fec_enet_get_prevdesc

2016-03-04 Thread Troy Kisky
On 3/4/2016 2:33 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, February > 25, 2016 8:37 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com >> Cc: fabio.este...@freescale.com; l.st...@pengutronix.de;

Re: [PATCH net-next V2 04/16] net: fec: reduce interrupts

2016-03-02 Thread Troy Kisky
On 3/2/2016 9:47 AM, Zhi Li wrote: > On Wed, Mar 2, 2016 at 10:12 AM, Troy Kisky > <troy.ki...@boundarydevices.com> wrote: >> On 3/2/2016 8:13 AM, Fugang Duan wrote: >>> From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, February >>&g

Re: [PATCH net-next V2 04/16] net: fec: reduce interrupts

2016-03-02 Thread Troy Kisky
On 3/2/2016 8:13 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, February > 25, 2016 8:37 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com >> Cc: fabio.este...@freescale.com; l.st...@pengutronix.de;

Re: [PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id

2016-03-02 Thread Troy Kisky
On 3/2/2016 8:16 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, February > 25, 2016 8:37 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; b38...@freescale.com >> Cc: fabio.este...@freescale.com; l.st...@pengutronix.de;

Re: [PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id

2016-03-01 Thread Troy Kisky
On 3/1/2016 3:26 PM, Zhi Li wrote: > On Tue, Mar 1, 2016 at 3:51 PM, Troy Kisky > <troy.ki...@boundarydevices.com> wrote: >> True, but fec_txq/fec_rxq is called in a loop. > > netdev_priv(ndev) is that pointer move. > dev + ALIGN(sizeof(struct net_device), NETDEV_ALI

Re: [PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id

2016-03-01 Thread Troy Kisky
On 3/1/2016 2:06 PM, Zhi Li wrote: > On Wed, Feb 24, 2016 at 6:36 PM, Troy Kisky > <troy.ki...@boundarydevices.com> wrote: >> queue_id is the qid member of struct bufdesc_prop. >> >> Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> >> --- >

Re: [PATCH] net: fec: Add "phy-reset-active-low" property to DT

2016-03-01 Thread Troy Kisky
We need that for a custom hardware that needs the reverse reset sequence. Signed-off-by: Bernhard Walle --- Documentation/devicetree/bindings/net/fsl-fec.txt | 3 +++ drivers/net/ethernet/freescale/fec_main.c | 8 ++-- 2 files changed, 9 insertions(+), 2

Re: [PATCH net-next V2 00/16] net: fec: cleanup and fixes

2016-02-25 Thread Troy Kisky
On 2/24/2016 7:52 PM, Joshua Clayton wrote: > Hello Troy, > I'm replying here instead of to a particular commit because several of > the commit messages seem inadequate. > > The first line summaries all look good. > > The descriptions should each also include the "user visible impact" of > the

Re: [PATCH net-next V2 00/16] net: fec: cleanup and fixes

2016-02-25 Thread Troy Kisky
On 2/25/2016 1:39 AM, Holger Schurig wrote: > Hi Troy, > > what is the general aim of your patches? Stability? Speed? Cleanup? > 1. Stability 2. performance 3. easier to read 4. more debug info The 2nd goal is very hard to measure. It seems function alignment changes swamp most any other

[PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id

2016-02-24 Thread Troy Kisky
queue_id is the qid member of struct bufdesc_prop. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/d

[PATCH net-next V2 01/16] net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set

2016-02-24 Thread Troy Kisky
Before queue 0 was always checked if any queue caused an interrupt. It is better to just mark queue 0 if queue 0 has caused an interrupt. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions

[PATCH net-next V2 11/16] net: fec: dump all tx queues in fec_dump

2016-02-24 Thread Troy Kisky
Dump all tx queues, not just queue 0. Also, disable fec interrupts first. The interrupts will be reenabled in fec_restart. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 40 +-- 1 file changed, 22 inse

[PATCH net-next V2 07/16] net: fec: set cbd_sc without relying on previous value

2016-02-24 Thread Troy Kisky
Relying on the wrap bit to stay valid once initialized when the controller also writes to this byte seems undesirable since we can easily know what the value should be. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.

[PATCH net-next V2 06/16] net: fec: don't clear all rx queue bits when just one is being checked

2016-02-24 Thread Troy Kisky
FEC_ENET_RXF is 3 separate bits, we only check one queue at a time. So, when the last queue is being checked, it is bad to remove the interrupt on the 1st queue. Also, since this is now done in the napi routine and not the interrupt, it is not needed. Signed-off-by: Troy Kisky <troy

[PATCH net-next V2 10/16] net: fec: clear cbd_sc after transmission to help with debugging

2016-02-24 Thread Troy Kisky
When the tx queue is dumped, it is easier to see that this entry is idle. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drive

[PATCH net-next V2 12/16] net: fec: detect tx int lost

2016-02-24 Thread Troy Kisky
If a tx int is lost, no need to reset the fec. Just mark the event and call napi_schedule. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 38 ++- 1 file changed, 37 insertions(+), 1 deletion(-) diff

[PATCH net-next V2 13/16] net: fec: print more debug info in fec_timeout

2016-02-24 Thread Troy Kisky
Print the current interrupt flags and mask and the interrupt state during the last interrupt in fec_timeout. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 1 + drivers/net/ethernet/freescale/fec_main.c | 4 2 files chan

[PATCH net-next V2 05/16] net: fec: split off napi routine with 3 queues

2016-02-24 Thread Troy Kisky
If we only have 1 tx/rx queue, we need not check the other queues. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/drivers/net/et

[PATCH net-next V2 14/16] net: fec: create subroutine reset_tx_queue

2016-02-24 Thread Troy Kisky
This creates one place to release any queued tx skbs. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 50 +++ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/fre

[PATCH net-next V2 08/16] net: fec: eliminate calls to fec_enet_get_prevdesc

2016-02-24 Thread Troy Kisky
This shrinks the code a little. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 37 +-- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drive

[PATCH net-next V2 15/16] net: fec: call dma_unmap_single on mapped tx buffers at restart

2016-02-24 Thread Troy Kisky
Make sure any pending tx buffers are unmapped when the fec is restarted. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/fre

[PATCH net-next V2 16/16] net: fec: don't set cbd_bufaddr unless no mapping error

2016-02-24 Thread Troy Kisky
Not assigning cbd_bufaddr on error will prevent trying to unmap the error in case the FEC is reset. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH net-next V2 09/16] net: fec: move restart test for efficiency

2016-02-24 Thread Troy Kisky
This saves 1 comparison. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/fre

[PATCH net-next V2 04/16] net: fec: reduce interrupts

2016-02-24 Thread Troy Kisky
continue to receive the previously pending packets. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 6 +- drivers/net/ethernet/freescale/fec_main.c | 127 -- 2 files changed, 50 insertions(+), 83 deletions(-)

[PATCH net-next V2 02/16] net: fec: pass rxq to fec_enet_rx_queue instead of queue_id

2016-02-24 Thread Troy Kisky
The queue_id is the qid member of struct bufdesc_prop. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/d

[PATCH net-next V2 00/16] net: fec: cleanup and fixes

2016-02-24 Thread Troy Kisky
ies, and the rest of my fec patches, for those who would like to test it. https://github.com:boundarydevices/linux-imx6.git branch net-next_master Troy Kisky (16): SDCard TX/RX 379/402 Before any patches 376/402 net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set 379/399 net: fec: pass

Re: [PATCH net-next V2 7/8] net: fec: don't transfer ownership until descriptor write is complete

2016-02-24 Thread Troy Kisky
On 2/6/2016 4:52 AM, Sergei Shtylyov wrote: > Hello. > > On 2/6/2016 12:52 AM, Troy Kisky wrote: > >> If you don't own it, you shouldn't write to it. >> >> Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> >> --- >> drivers/net/ethernet

Re: [PATCH net-next V2 7/8] net: fec: don't transfer ownership until descriptor write is complete

2016-02-24 Thread Troy Kisky
On 2/5/2016 6:03 PM, Joshua Clayton wrote: > On Fri, 5 Feb 2016 14:52:49 -0700 > Troy Kisky <troy.ki...@boundarydevices.com> wrote: > >> If you don't own it, you shouldn't write to it. >> >> Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> &g

[PATCH net-next V2 5/8] net: fec: add variable reg_desc_active to speed things up

2016-02-05 Thread Troy Kisky
There is no need for complex macros every time we need to activate a queue. Also, no need to call skb_get_queue_mapping when we already know which queue it is using. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 7 + drive

[PATCH net-next V2 3/8] net: fec: fix fec_enet_get_free_txdesc_num

2016-02-05 Thread Troy Kisky
instead. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 162fa59..adbddfd

[PATCH net-next V2 2/8] net: fec: fix rx error counts

2016-02-05 Thread Troy Kisky
On an overrun, the other flags are not valid, so don't check them. Also, don't pass bad frames up the stack. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 36 +-- 1 file changed, 15 insertions(

[PATCH net-next V2 8/8] net: fec: improve error handling

2016-02-05 Thread Troy Kisky
Unmap initial buffer on error. Don't free skb until it has been unmapped. Move cbd_bufaddr assignment closer to the mapping function. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 11 +++ 1 file changed, 7 insertions

[PATCH net-next V2 4/8] net: fec: add struct bufdesc_prop

2016-02-05 Thread Troy Kisky
This reduces code and gains speed. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 29 ++- drivers/net/ethernet/freescale/fec_main.c | 288 -- 2 files changed, 132 insertions(+), 185 deletions(-) diff

[PATCH net-next V2 0/8] net: fec: cleanup/fixes

2016-02-05 Thread Troy Kisky
hub with this series, and the rest of my fec patches, for those who would like to test it. https://github.com:boundarydevices/linux-imx6.git branch net-next_master Troy Kisky (8): SDCard TX/RX 378/405 before any patches 379/407 net: fec: stop the "rcv is not +last, " error messages 378/

[PATCH net-next V2 7/8] net: fec: don't transfer ownership until descriptor write is complete

2016-02-05 Thread Troy Kisky
If you don't own it, you shouldn't write to it. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drive

[PATCH net-next V2 6/8] net: fec: don't disable FEC_ENET_TS_TIMER interrupt

2016-02-05 Thread Troy Kisky
Only the interrupt routine processes this condition. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 1 + drivers/net/ethernet/freescale/fec_main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH net-next V2 1/8] net: fec: stop the "rcv is not +last, " error messages

2016-02-05 Thread Troy Kisky
Setting the FTRL register will stop the fec from trying to use multiple receive buffers. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 1 + drivers/net/ethernet/freescale/fec_main.c | 1 + 2 files changed, 2 insertions(+) diff

Re: [PATCH net-next 08/40] net: fec: move cbd_bufaddr assignment closer to the mapping function

2016-01-29 Thread Troy Kisky
On 1/28/2016 3:02 PM, Arnd Bergmann wrote: > On Thursday 28 January 2016 14:25:32 Troy Kisky wrote: >> Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> >> --- >> drivers/net/ethernet/freescale/fec_main.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2

[PATCH net-next 04/40] net: fec: add struct bufdesc_prop

2016-01-28 Thread Troy Kisky
This reduces code and gains speed. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 29 ++- drivers/net/ethernet/freescale/fec_main.c | 288 -- 2 files changed, 132 insertions(+), 185 deletions(-) diff

[PATCH net-next 00/40] net: fec: cleanup/fixes

2016-01-28 Thread Troy Kisky
ies https://github.com:boundarydevices/linux-imx6.git branch net-next_master Troy Kisky (40): NFS SDCARD TX/RX TX/RX Mbits/sec 377/406 379/407 before any patches 377/409 379/406 net: fec: stop the "rcv is not +last, " error messages 374/406 374/407 net: fec: fix rx error counts 37

[PATCH net-next 02/40] net: fec: fix rx error counts

2016-01-28 Thread Troy Kisky
On an overrun, the other flags are not valid, so don't check them. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 36 +-- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/drivers/net/et

[PATCH net-next 05/40] net: fec: add variable reg_desc_active to speed things up

2016-01-28 Thread Troy Kisky
There is no need for complex macros every time we need to activate a queue. Also, no need to call skb_get_queue_mapping when we already know which queue it is using. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 7 + drive

[PATCH net-next 13/40] net: fec: split off napi routine with 3 queues

2016-01-28 Thread Troy Kisky
If we only have 1 tx/rx queue, we need not check the other queues. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec_main.c | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/drivers/net/et

[PATCH net-next 06/40] net: fec: don't disable FEC_ENET_TS_TIMER interrupt

2016-01-28 Thread Troy Kisky
Only the interrupt routine processes this condition. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/net/ethernet/freescale/fec.h | 1 + drivers/net/ethernet/freescale/fec_main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drive

  1   2   >