android_kernel_xiaomi_sm8350/drivers/scsi/qla2xxx
Andrew Vasquez 048feec554 [SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes.
Josip Rodin noted
(http://article.gmane.org/gmane.linux.ports.sparc/10152) the
driver oopsing during registration of an rport to the
FC-transport layer with a backtrace indicating a dereferencing of
an shost->shost_data equal to NULL.  David Miller identified a
small window in driver logic where this could happen:

    > Look at how the driver registers the IRQ handler before the host has
    > been registered with the SCSI layer.
    >
    > That leads to a window of time where the shost hasn't been setup
    > fully, yet ISRs can come in and trigger DPC thread events, such as
    > loop resyncs, which expect the transport area to be setup.
    >
    > But it won't be setup, because scsi_add_host() hasn't finished yet.
    >
    > Note that in Josip's crash log, we don't even see the
    >
    >         qla_printk(KERN_INFO, ha, "\n"
    >             " QLogic Fibre Channel HBA Driver: %s\n"
    >             "  QLogic %s - %s\n"
    >             "  ISP%04X: %s @ %s hdma%c, host#=%ld, fw=%s\n",
    >  ...
    >
    > message yet.
    >
    > Which means that the crash occurs between qla2x00_request_irqs()
    > and printing that message.

Close this window by enabling RISC interrupts after the host has
been registered with the SCSI midlayer.

Reported-by: Josip Rodin <joy@entuzijast.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-09-13 13:12:58 -05:00
..
Kconfig
Makefile
qla_attr.c [SCSI] qla2xxx: Correct synchronization of software/firmware fcport states. 2008-08-16 10:21:09 -05:00
qla_dbg.c [SCSI] qla2xxx: Correct overflow during dump-processing on large-memory ISP23xx parts. 2008-07-26 15:14:46 -04:00
qla_dbg.h
qla_def.h [SCSI] qla2xxx: Explicitly tear-down vports during PCI remove_one(). 2008-08-16 10:24:12 -05:00
qla_devtbl.h
qla_dfs.c
qla_fw.h
qla_gbl.h [SCSI] qla2xxx: Retrieve board serial-number and description from VPD. 2008-07-26 15:14:39 -04:00
qla_gs.c [SCSI] qla2xxx: Skip FDMI registration on ISP21xx/22xx parts. 2008-07-26 15:14:46 -04:00
qla_init.c [SCSI] qla2xxx: Set npiv_supported flag for FCoE HBAs. 2008-08-16 10:22:35 -05:00
qla_inline.h
qla_iocb.c [SCSI] qla2xxx: Additional NPIV corrections. 2008-07-26 15:31:30 -04:00
qla_isr.c [SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes. 2008-09-13 13:12:58 -05:00
qla_mbx.c [SCSI] qla2xxx: Explicitly tear-down vports during PCI remove_one(). 2008-08-16 10:24:12 -05:00
qla_mid.c removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
qla_os.c [SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes. 2008-09-13 13:12:58 -05:00
qla_settings.h
qla_sup.c [SCSI] qla2xxx: Retrieve board serial-number and description from VPD. 2008-07-26 15:14:39 -04:00
qla_version.h [SCSI] qla2xxx: Update version number to 8.02.01-k7. 2008-08-16 10:24:31 -05:00