mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
sfc: Handle serious errors in exactly one interrupt handler
'Fatal' errors set an interrupt flag associated with a specific event queue; only read the syndrome vector if we see that queue's flag set (legacy interrupts) or in the interrupt handler for that queue (MSI). Do not ignore an interrupt if the fatal error flag is set but specific error flags are all zero. Even if we don't schedule a reset, we must respect the queue mask and rearm the appropriate event queues. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
00bbb4a534
commit
6369545945
3 changed files with 29 additions and 21 deletions
|
@ -175,16 +175,19 @@ irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id)
|
|||
EFX_TRACE(efx, "IRQ %d on CPU %d status " EFX_OWORD_FMT "\n",
|
||||
irq, raw_smp_processor_id(), EFX_OWORD_VAL(*int_ker));
|
||||
|
||||
/* Check to see if we have a serious error condition */
|
||||
syserr = EFX_OWORD_FIELD(*int_ker, FSF_AZ_NET_IVEC_FATAL_INT);
|
||||
if (unlikely(syserr))
|
||||
return efx_nic_fatal_interrupt(efx);
|
||||
|
||||
/* Determine interrupting queues, clear interrupt status
|
||||
* register and acknowledge the device interrupt.
|
||||
*/
|
||||
BUILD_BUG_ON(FSF_AZ_NET_IVEC_INT_Q_WIDTH > EFX_MAX_CHANNELS);
|
||||
queues = EFX_OWORD_FIELD(*int_ker, FSF_AZ_NET_IVEC_INT_Q);
|
||||
|
||||
/* Check to see if we have a serious error condition */
|
||||
if (queues & (1U << efx->fatal_irq_level)) {
|
||||
syserr = EFX_OWORD_FIELD(*int_ker, FSF_AZ_NET_IVEC_FATAL_INT);
|
||||
if (unlikely(syserr))
|
||||
return efx_nic_fatal_interrupt(efx);
|
||||
}
|
||||
|
||||
EFX_ZERO_OWORD(*int_ker);
|
||||
wmb(); /* Ensure the vector is cleared before interrupt ack */
|
||||
falcon_irq_ack_a1(efx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue