android_kernel_xiaomi_sm7250/drivers/scsi/qla2xxx
Andrew Vasquez d2ba5675d8 [SCSI] qla2xxx: Disable local-interrupts while polling for RISC status.
Matthew Wilcox <matthew@wil.cx> reported the following lockdep
warning:

 > =================================
 > [INFO:inconsistentlockstate]
 > 2.6.26-rc1-00115-g0340eda-dirty#60
 > ---------------------------------
 > inconsistent{hardirq-on-W}->{in-hardirq-W}usage.
 > swapper/1[HC1[1]:SC0[0]:HE0:SE1]takes:
 > (&ha->hardware_lock){+-..},at:[<c035495d>]qla2300_intr_handler+0x35/0x1f5
 > {hardirq-on-W}statewasregisteredat:
 > [<c0139a16>]__lock_acquire+0x459/0xb1d
 > [<c013a091>]__lock_acquire+0xad4/0xb1d
 > [<c013a142>]lock_acquire+0x68/0x82
 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
 > [<c0506da5>]_spin_lock+0x24/0x4d
 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
 > [<c01391e4>]trace_hardirqs_on+0xe7/0x10e
 > [<c034f0a6>]qla2x00_mailbox_command+0x1c6/0x433
 ...
 > other info that might help us debug this:
 > no locks held by swapper/1.
 >
 > stack backtrace:
 > Pid:1,comm:swapperNottainted2.6.26-rc1-00115-g0340eda-dirty#60
 > [<c0138121>]print_usage_bug+0x100/0x10a
 > [<c0138d37>]mark_lock+0xaa/0x395
 > [<c01399af>]__lock_acquire+0x3f2/0xb1d
 > [<c013a091>]__lock_acquire+0xad4/0xb1d
 > [<c013a142>]lock_acquire+0x68/0x82
 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
 > [<c0506da5>]_spin_lock+0x24/0x4d
 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
 > [<c035495d>]qla2300_intr_handler+0x35/0x1f5
 > [<c014a37b>]handle_IRQ_event+0x13/0x3d
 > [<c014b366>]handle_fasteoi_irq+0x76/0xab

Which shows that lockdep is detecting the driver's
interrupt-handler is run in both process and interrupt context
with irqs-enabled in the former case.

During init-time and error-recovery (after a RISC reset), the
driver disables interrupts and 'polls' for completions by calling
qla2x00_poll():

	static inline void
	qla2x00_poll(scsi_qla_host_t *ha)
	{
		ha->isp_ops->intr_handler(0, ha);
	}

which in-turn calls the ISP registered interrupt handler.  This
patch corrects it by disabling local interrupts during polling.

Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-05-15 16:39:29 +01:00
..
Kconfig [SCSI] qla2xxx: Update firmware filenames for new ISP parts. 2008-04-07 12:19:11 -05:00
Makefile [SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support. 2008-01-23 11:29:32 -06:00
qla_attr.c [SCSI] qla2xxx: Extend the 'fw_dump' SYSFS node the ability to initiate a firmware dump. 2008-05-15 16:39:29 +01:00
qla_dbg.c [SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump. 2008-04-27 12:19:57 -05:00
qla_dbg.h [SCSI] qla2xxx: Add ISP84XX support. 2008-04-07 12:19:15 -05:00
qla_def.h [SCSI] qla2xxx: Convert vport_sem to a mutex 2008-05-15 16:39:29 +01:00
qla_devtbl.h [SCSI] qla2xxx: Resync with latest HBA SSID specification -- 2.2u. 2007-10-23 15:53:23 -04:00
qla_dfs.c [SCSI] qla2xxx: Update copyright banner. 2008-04-07 12:19:11 -05:00
qla_fw.h [SCSI] qla2xxx: Correct misc. endian and byte-ordering issues. 2008-04-27 12:19:59 -05:00
qla_gbl.h [SCSI] qla2xxx: Extend the 'fw_dump' SYSFS node the ability to initiate a firmware dump. 2008-05-15 16:39:29 +01:00
qla_gs.c [SCSI] qla2xxx: Correct misc. endian and byte-ordering issues. 2008-04-27 12:19:59 -05:00
qla_init.c [SCSI] qla2xxx: Correct misc. endian and byte-ordering issues. 2008-04-27 12:19:59 -05:00
qla_inline.h [SCSI] qla2xxx: Disable local-interrupts while polling for RISC status. 2008-05-15 16:39:29 +01:00
qla_iocb.c [SCSI] qla2xxx: Cruft cleanup of functions and structures. 2008-04-07 12:19:14 -05:00
qla_isr.c [SCSI] qla2xxx: Correct locking within MSI-X interrupt handlers. 2008-05-15 16:39:28 +01:00
qla_mbx.c [SCSI] qla2xxx: Extend the 'fw_dump' SYSFS node the ability to initiate a firmware dump. 2008-05-15 16:39:29 +01:00
qla_mid.c [SCSI] qla2xxx: Convert vport_sem to a mutex 2008-05-15 16:39:29 +01:00
qla_os.c [SCSI] qla2xxx: Convert vport_sem to a mutex 2008-05-15 16:39:29 +01:00
qla_settings.h [SCSI] qla2xxx: Remove unused and obsolete #define's. 2008-04-07 12:19:13 -05:00
qla_sup.c [SCSI] qla2xxx: Add ISP84XX support. 2008-04-07 12:19:15 -05:00
qla_version.h [SCSI] qla2xxx: Update version number to 8.02.01-k2. 2008-04-27 12:19:59 -05:00