]> git.baikalelectronics.ru Git - kernel.git/commit
qed: Fix interrupt flags on Rx LL2
authorRam Amrani <Ram.Amrani@cavium.com>
Tue, 14 Mar 2017 13:26:02 +0000 (15:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Mar 2017 18:37:05 +0000 (11:37 -0700)
commit8559ab9cab1f62f0550c3b33f2e40e1719e0c752
treece0c1a0efe4b0c112eb06e4d1049710d1e0aa929
parent6b18f81d4076e394c47584d0c881da33c3fd1f58
qed: Fix interrupt flags on Rx LL2

Before iterating over the the LL2 Rx ring, the ring's
spinlock is taken via spin_lock_irqsave().
The actual processing of the packet [including handling
by the protocol driver] is done without said lock,
so qed releases the spinlock and re-claims it afterwards.

Problem is that the final spin_lock_irqrestore() at the end
of the iteration uses the original flags saved from the
initial irqsave() instead of the flags from the most recent
irqsave(). So it's possible that the interrupt status would
be incorrect at the end of the processing.

Fixes: 25f6af4f23ed ("qed: Add Light L2 support");
CC: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_ll2.c