In the interest of not dropping the ball, I have made a patch,
as per the changes described by Eric, and tested by Judith.
It may be wildly inaccurate.

Please Review

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

Currently modprobe of mptsas fails after kexec.

This appears to be due to interrupts not being enabled during probe.
As mpt_attach() issues commands which require interrupts, which fail,
the code ends up in mpt_do_ioc_recovery(). This code expects
ioc->sh and ioc-sh->hostdata to be set, and oopses if they don't.
This fix makes mptsas_ioc_reset() fail cleanly in this case.

Note that the description and proposed fix for this is the work
of Eric Moore. And that testing was done by Judith Lebzelte. I
am merely putting things together in a patch.

I have to reproduce the reported problem both with and without this
patch, on a Tiger2 using 2.6.21-rc4, with a but with no luck. I guess I
am trying the wrong thing.

Cc: Eric More <[EMAIL PROTECTED]>
Cc: Judith Lebzelter <[EMAIL PROTECTED]>
Cc: Fernando Luis Vázquez Cao <[EMAIL PROTECTED]>
Signed-off-by: Simon Horman <[EMAIL PROTECTED]>

diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 404c014..9027a96 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR 
*mf, MPT_FRAME_HDR *mr)
 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,11 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
        if (reset_phase != MPT_IOC_POST_RESET)
                goto out;
 
-       if (!hd || !hd->ioc)
+       if (!ioc->sh || !ioc->sh->hostdata)
+               goto out;
+
+       hd = ioc->sh->hostdata;
+       if (!hd->ioc)
                goto out;
 
        if (list_empty(&hd->target_reset_list))

_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to