]> git.ipfire.org Git - people/ms/linux.git/commit - drivers/net/ethernet/freescale/gianfar.c
gianfar: Fix P1010 config regression (SQ polling)
authorClaudiu Manoil <claudiu.manoil@freescale.com>
Fri, 21 Mar 2014 07:33:17 +0000 (09:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Mar 2014 04:40:44 +0000 (00:40 -0400)
commitc65d7533729a965ab8d93fa0470abc263060c54c
treed268bad3de3e20023b77c88bac0707487bc93154
parent4a4eb21fd6e3de1196cb67c856c5f89a84b555be
gianfar: Fix P1010 config regression (SQ polling)

The P1010 device tree restricts the number of
supported interrupt groups to 1, although the eth
controller can support 2 interrupt groups and the
driver assumes the Multi-Group mode ("fsl,etsec2" model).

So, in this case the assumption that the Multi-Group
mode (MQ_MG_MODE) devices always support 2 interrupt
groups is false.  To fix this, a check for the actual
number of interrupt groups enabled in the board's
device tree has been added in gfar_probe for the
"fsl,etsec2" devices.

Without this fix, P1010 based boards claim support for
2 Tx queues to the net stack but only one is actually
allocated, leading to NULL access in xmit.  This issue
was introduced by enabling Single-Queue polling for
the P1010 devices.
(71ff9e3 gianfar: Use Single-Queue polling for
"fsl,etsec2")

Fixes: 71ff9e3df7e1c5d3293af6b595309124e8c97412
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c