diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2013-02-24 00:38:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-24 12:04:01 -0500 |
commit | 62ed839dba70edfdc20a9aab92edff0451078584 (patch) | |
tree | 929ea8774ba76b15d3111871ec10630f0ce42cd6 /drivers | |
parent | da8c87241c26aac81a64c7e4d21d438a33018f4e (diff) |
gianfar: fix compile fail for NET_POLL=y due to struct packing
Commit ee873fda3bec7c668407b837fc5519eb961fcd37 ("gianfar: Pack struct
gfar_priv_grp into three cachelines") moved the irq number and names
off into a separate struct and created accessors for them. However
it was never tested with NET_POLL enabled, and so some conversions
that were simply overlooked went undetected until now.
Make the netpoll ones also use the gfar_irq() accessors.
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: Jianhua Xie <jianhua.xie@freescale.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 4b5e8a692481..d2c5441d1bf0 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
@@ -2906,21 +2906,23 @@ static void gfar_netpoll(struct net_device *dev) | |||
2906 | /* If the device has multiple interrupts, run tx/rx */ | 2906 | /* If the device has multiple interrupts, run tx/rx */ |
2907 | if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) { | 2907 | if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) { |
2908 | for (i = 0; i < priv->num_grps; i++) { | 2908 | for (i = 0; i < priv->num_grps; i++) { |
2909 | disable_irq(priv->gfargrp[i].interruptTransmit); | 2909 | struct gfar_priv_grp *grp = &priv->gfargrp[i]; |
2910 | disable_irq(priv->gfargrp[i].interruptReceive); | 2910 | |
2911 | disable_irq(priv->gfargrp[i].interruptError); | 2911 | disable_irq(gfar_irq(grp, TX)->irq); |
2912 | gfar_interrupt(priv->gfargrp[i].interruptTransmit, | 2912 | disable_irq(gfar_irq(grp, RX)->irq); |
2913 | &priv->gfargrp[i]); | 2913 | disable_irq(gfar_irq(grp, ER)->irq); |
2914 | enable_irq(priv->gfargrp[i].interruptError); | 2914 | gfar_interrupt(gfar_irq(grp, TX)->irq, grp); |
2915 | enable_irq(priv->gfargrp[i].interruptReceive); | 2915 | enable_irq(gfar_irq(grp, ER)->irq); |
2916 | enable_irq(priv->gfargrp[i].interruptTransmit); | 2916 | enable_irq(gfar_irq(grp, RX)->irq); |
2917 | enable_irq(gfar_irq(grp, TX)->irq); | ||
2917 | } | 2918 | } |
2918 | } else { | 2919 | } else { |
2919 | for (i = 0; i < priv->num_grps; i++) { | 2920 | for (i = 0; i < priv->num_grps; i++) { |
2920 | disable_irq(priv->gfargrp[i].interruptTransmit); | 2921 | struct gfar_priv_grp *grp = &priv->gfargrp[i]; |
2921 | gfar_interrupt(priv->gfargrp[i].interruptTransmit, | 2922 | |
2922 | &priv->gfargrp[i]); | 2923 | disable_irq(gfar_irq(grp, TX)->irq); |
2923 | enable_irq(priv->gfargrp[i].interruptTransmit); | 2924 | gfar_interrupt(gfar_irq(grp, TX)->irq, grp); |
2925 | enable_irq(gfar_irq(grp, TX)->irq); | ||
2924 | } | 2926 | } |
2925 | } | 2927 | } |
2926 | } | 2928 | } |