commit ba76ef246090601b783c1e6190e22b8b149a105f
Author: Judith Lebzelter <[EMAIL PROTECTED]>
Date: Fri Mar 9 13:07:44 2007 -0800
[SCSI] mptsas: Fix oops for insmod during kexec
This fix's an oops during driver load time. mptsas_probe calls
mpt_attach(over in mptbase.c). Inside that call, we read some
manufacturing config pages to setup some defaults. While reading the
config pages, the firmware doesn't complete the reply in time, and we
have a timeout. The timeout results in hardreset handler being called.
The hardreset handler calls all the fusion upper layer driver reset
callback handlers. The mptsas_ioc_reset function is the callback
handler in mptsas.c. So where I'm getting to, is mptsas_ioc_reset is
getting called before scsi_host_alloc is called, and the pointer ioc->sh
is NULL as well as the hostdata.
Signed-off-by: Judith Lebzelter <[EMAIL PROTECTED]>
Acked-by: "Moore, Eric" <[EMAIL PROTECTED]>
Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index
404c014db1bdaa30538a4f2fff0c25b2151f7e47..1d2d03f77894c75d8b42225da9529479173706c0
100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *io
static int
mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
{
- MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
+ MPT_SCSI_HOST *hd;
struct mptsas_target_reset_event *target_reset_list, *n;
int rc;
@@ -827,7 +827,10 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int r
if (reset_phase != MPT_IOC_POST_RESET)
goto out;
- if (!hd || !hd->ioc)
+ if (!ioc->sh || !ioc->sh->hostdata)
+ goto out;
+ hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
+ if (!hd->ioc)
goto out;
if (list_empty(&hd->target_reset_list))
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[EMAIL PROTECTED]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs