mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
net: gianfar: Avoid 16 bytes of memset
The memset on CAMx is wrong, as it actually unmasks all carry irq's, which we clearly are not interested in. The memset on CARx registers is just pointless, as they are W1C. So let's just stop the memset before CAR1. Signed-off-by: Esben Haabendal <esben@geanix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ef09487431
commit
e2dbbbe52c
1 changed files with 1 additions and 1 deletions
|
@ -3098,7 +3098,7 @@ static void gfar_hw_init(struct gfar_private *priv)
|
||||||
|
|
||||||
/* Zero out the rmon mib registers if it has them */
|
/* Zero out the rmon mib registers if it has them */
|
||||||
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_RMON) {
|
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_RMON) {
|
||||||
memset_io(&(regs->rmon), 0, sizeof(struct rmon_mib));
|
memset_io(®s->rmon, 0, offsetof(struct rmon_mib, car1));
|
||||||
|
|
||||||
/* Mask off the CAM interrupts */
|
/* Mask off the CAM interrupts */
|
||||||
gfar_write(®s->rmon.cam1, 0xffffffff);
|
gfar_write(®s->rmon.cam1, 0xffffffff);
|
||||||
|
|
Loading…
Reference in a new issue