From: Andrew Vasquez <andrew.vasquez@qlogic.com>
Date: Mon, 29 Sep 2008 15:15:04 +0000
Subject: SCSI: qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes.
commit 048feec5548c0582ee96148c61b87cccbcb5f9be upstream
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>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Submitted by Gal Rosen <galr@storwize.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1213 d57e44dd-8a1f-0410-8b47-8ef2f437770f
in patch order between the systems on which this script is run. Since the
applied changes did not have any effect, I'm reverting this commit.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1203 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Moved qla2x00t patch generation code from qla2x00t/Makefile to
qla2x00t/extract-qla2xxx-orig and qla2x00t/generate-in-tree-patches.
Restored qla2x00t/Makefile to r1104.
- scripts/run-regression-tests now passes the full kernel version (including
patch level) to scripts/generate-kernel-patch.
- scripts/generate-kernel-patch can now generate patches for the files
in drivers/scsi/qla2xxx for any kernel version instead of only 2.6.26.8.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1198 d57e44dd-8a1f-0410-8b47-8ef2f437770f
follows:
- Building the QLogic target driver is possible by following the instructions
in qla2x00t/qla2x00-target/README.
- Some but not all of the qla2x00-target code is included in the output of
scripts/generate-kernel-patch. This is unfortunate because it is the output
of this script that is posted to the LKML each time SCST is submitted for
review.
- Most of the qla2x00-target code is checked during the nightly build by
checkpatch. None of the qla2x00-target code is checked during the nightly
build by sparse.
The patch below makes sure that all of the qla2x00-target code is included in
the generate-kernel-patch output and also that all of the qla2x00-target code
is checked during the nightly build by both checkpatch and sparse. This has
been realized by including the diff of the linux-2.6.26.8/drivers/scsi/qla2xxx
source files and the source files in qla2x00t/*[ch] as individual patches under
qla2x00t/in-tree-patches. These patches are generated from downloaded
linux-2.6.26.8 sources and the sources in the SCST SVN repository.
The next step is to fix the checkpatch and sparse warnings triggered by the
qla2x00-target code and to port the latest qla2xxx patches to the SCST
qla2x00t implementation.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
1. Incorrect task management response delivery (with patch)
2. Possible use of non-initialized variable
3. Incorrect size of port_data_t and mb[8] for MBC_PORT_NODE_NAME_LIST
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1179 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- WARNING: labels should not be indented
- WARNING: braces {} are not necessary for single statement blocks
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- ERROR: space required before the open parenthesis '('
- ERROR: "(foo*)" should be "(foo *)"
- ERROR: "foo * bar" should be "foo *bar"
- ERROR: code indent should use tabs where possible
Verified that the output of svn diff -x -w is empty for this commit.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- ERROR: else should follow close brace '}'
- ERROR: open brace '{' following struct go on the same line
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- 2 ERROR: code indent should use tabs where possible
- 2 ERROR: trailing whitespace
Verified that the output of svn diff -x -w is empty for this commit.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1168 d57e44dd-8a1f-0410-8b47-8ef2f437770f
from the qla2xxx driver source code in the 2.6.26 kernel. Verified
that the output of svn diff -x -w is empty for this commit.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- New scst_user option sgv_disable_clustered_pool added
- fileio_tgt updated to use those new facilities
- Scst_user docs updated
- sgv_pool_get() and sgv_pool_put() made exported
- AENs sense buffer override fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1159 d57e44dd-8a1f-0410-8b47-8ef2f437770f