[PATCH] aacraid: 2.6.21-rc6-mm1 aacraid not finding device

Salyzyn, Mark
2007-04-13T12:35:28Z

[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]

Thanks for the help from Steve Fox and Duane Cox investigating this
issue, I'd like to report that we found the problem. The issue is with
the patch Steve Fox isolated below, by not accommodating older adapters
properly and issuing a command they do not support when retrieving
storage parameters about the arrays. This simple patch resolves the
problem (and more accurately mimics the logic of the original code
before the patch).

ObligatoryDisclaimer: Please accept my condolences regarding Outlook's
handling of patches.

This attached patch is against current scsi-misc-2.6 and can apply to
2.6.21-rc6-mm1. Please consider it for expedited inclusion.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>

---

Sincerely -- Mark Salyzyn

> -----Original Message-----
> From: Steve Fox [mailto:drfickle@linux.vnet.ibm.com]
> Sent: Tuesday, April 10, 2007 6:21 PM
> To: Andrew Morton
> Cc: linux-kernel@vger.kernel.org; Salyzyn, Mark;
> markh@linux-foundation.org; James.Bottomley@SteelEye.com;
> linux-scsi@vger.kernel.org
> Subject: Re: 2.6.21-rc6-mm1 aacraid not finding device
>
>
> On Sun, 2007-04-08 at 14:35 -0700, Andrew Morton wrote:
> >
>
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc6
/2.6.21-rc6-mm1/

Since 2.6.21-rc5-mm1, one of the test.kernel.org machines (elm3b239) has
not been able to boot because it cannot find the SCSI device. You can
view http://test.kernel.org/abat/82623/debug/console.log for the latest
boot log (rc6-mm1).

I tracked this down to the git-scsi-misc patch in the -mm tree and then
bisected the scsi-misc git tree until I reached the commit below from
Mark Salyzyn:

fe76df4235986cfacc2d3b71cef7c42bc1a6dd6c

[SCSI] aacraid: Fix blocking issue with container probing function (cast
update)

This is a pretty big patch, so hopefully Mark can take a look at it.
lspci shows

01:02.0 RAID bus controller: Adaptec AAC-RAID (rev 02)
0f:02.0 SCSI storage controller: Adaptec AIC-9410W SAS (Razor ASIC
non-RAID) (rev 08)
1d:02.0 SCSI storage controller: Adaptec AIC-9410W SAS (Razor ASIC
non-RAID) (rev 08)
2b:02.0 SCSI storage controller: Adaptec AIC-9410W SAS (Razor ASIC
non-RAID) (rev 08)

on 2.6.21-rc6. Let me know if I can provide more details.

--

Steve Fox
IBM Linux Technology Center

[-- Attachment #2: aacraid_logical_bugfix.patch --]
[-- Type: application/octet-stream, Size: 666 bytes --]

diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c 2007-04-12 15:54:25.244399102 -0400
+++ b/drivers/scsi/aacraid/aachba.c 2007-04-12 15:57:03.806468297 -0400
@@ -503,8 +503,7 @@
dresp = (struct aac_mount *) fib_data(fibptr);
dresp->mnt[0].capacityhigh = 0;
if ((le32_to_cpu(dresp->status) != ST_OK) ||
- ((le32_to_cpu(dresp->mnt[0].vol) != CT_NONE) &&
- (le32_to_cpu(dresp->mnt[0].state) == FSCS_HIDDEN)))
+ (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE))
return _aac_probe_container2(context, fibptr);
scsicmd = (struct scsi_cmnd *) context;
scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL;