linux/drivers/scsi/cxlflash
Uma Krishnan d2d354a606 scsi: cxlflash: Handle spurious interrupts
The following Oops can occur when there is heavy I/O traffic and the host is
reset by a tool such as sg_reset.

[c000200fff3fbc90] c00800001690117c process_cmd_doneq+0x104/0x500
                                       [cxlflash] (unreliable)
[c000200fff3fbd80] c008000016901648 cxlflash_rrq_irq+0xd0/0x150 [cxlflash]
[c000200fff3fbde0] c000000000193130 __handle_irq_event_percpu+0xa0/0x310
[c000200fff3fbea0] c0000000001933d8 handle_irq_event_percpu+0x38/0x90
[c000200fff3fbee0] c000000000193494 handle_irq_event+0x64/0xb0
[c000200fff3fbf10] c000000000198ea0 handle_fasteoi_irq+0xc0/0x230
[c000200fff3fbf40] c00000000019182c generic_handle_irq+0x4c/0x70
[c000200fff3fbf60] c00000000001794c __do_irq+0x7c/0x1c0
[c000200fff3fbf90] c00000000002a390 call_do_irq+0x14/0x24
[c000200e5828fab0] c000000000017b2c do_IRQ+0x9c/0x130
[c000200e5828fb00] c000000000009b04 h_virt_irq_common+0x114/0x120

When a context is reset, the pending commands are flushed and the AFU is
notified. Before the AFU handles this request there could be command
completion interrupts queued to PHB which are yet to be delivered to the
context. In this scenario, a context could receive an interrupt for a command
that has been flushed, leading to a possible crash when the memory for the
flushed command is accessed.

To resolve this problem, a boolean will indicate if the hardware queue is
ready to process interrupts or not. This can be evaluated in the interrupt
handler before proessing an interrupt.

Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-04-18 19:32:51 -04:00
..
backend.h scsi: cxlflash: Introduce object handle fop 2018-04-18 19:32:50 -04:00
common.h scsi: cxlflash: Handle spurious interrupts 2018-04-18 19:32:51 -04:00
cxl_hw.c scsi: cxlflash: Introduce object handle fop 2018-04-18 19:32:50 -04:00
Kconfig scsi: cxlflash: Introduce OCXL backend 2018-04-18 19:32:47 -04:00
lunmgt.c scsi: cxlflash: Remove port configuration assumptions 2017-04-13 22:55:41 -04:00
main.c scsi: cxlflash: Handle spurious interrupts 2018-04-18 19:32:51 -04:00
main.h scsi: cxlflash: Enable OCXL operations 2018-04-18 19:32:50 -04:00
Makefile scsi: cxlflash: Introduce OCXL backend 2018-04-18 19:32:47 -04:00
ocxl_hw.c scsi: cxlflash: Support AFU reset 2018-04-18 19:32:50 -04:00
ocxl_hw.h scsi: cxlflash: Register for translation errors 2018-04-18 19:32:50 -04:00
sislite.h scsi: cxlflash: Update synchronous interrupt status bits 2018-04-18 19:32:50 -04:00
superpipe.c scsi: cxlflash: Setup LISNs for user contexts 2018-04-18 19:32:50 -04:00
superpipe.h scsi: cxlflash: Remove embedded CXL work structures 2018-01-10 23:24:57 -05:00
vlun.c scsi: cxlflash: Use derived maximum write same length 2017-10-31 12:28:02 -04:00
vlun.h scsi: cxlflash: Fix warnings/errors 2017-04-13 22:55:41 -04:00