Skip to contentSkip to conversation

Adaptect 9405w: What is the best solution?

DISCUSSION Tarjei Huse 6 participants 13 messages Jan 11, 2007 – Jan 17, 2007 2 messages not in the archive SCSI

lore
Share & tools
lore
#0 lore raw

Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 running a HostRaid controller that uses the adaptech 9405w chipset.

I found this thread on the list:
http://thread.gmane.org/gmane.linux.scsi/29040/focus=29040

What I'm wondering about is:
a) Where can I get the patches that mr Tuikov maintains for this chipset? b) Are they maintained wrt to different kernel versions, i.e. do they apply cleanly to a 2.6.20 or 2.6.16 kernel?

c) In the thread Darrick Wong refers to another branch[1] that contains (according to him) a lot of fixes for this chipset. Is that branch confirmed to work with my chipset?

My main goal is to get this box up and running using debian or ubuntu. I have managed to get it to run the debian 2.6.9 kernel as outlined in [2] using the adp94xx driver, but I cannot get that driver to compile on newer kernels.

I have also tried to compile the latest rc of the 2.6.20 kernel and loaded up the aic94xx driver + firmware. I then ended up getting the same errors that started the above mentioned thread on this list.

So what is the best solution here? Has anyone managed to get a newer kernel to run on this chipset?

1. http://www.kernel.org/git/?p=linux/kernel/git/jejb/aic94xx-sas-2.6.git;a=summary
2. http://www.jimmy.co.at/weblog/?p=71

Kind regards and thanks for any input.
Tarjei Huse

#1 lore raw
Quoted 5 lines · Tarjei Huse

Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 running a HostRaid controller that uses the adaptech 9405w chipset.

I found this thread on the list:
http://thread.gmane.org/gmane.linux.scsi/29040/focus=29040

Basically Luben Tuikov developed the original aic94xx SAS driver for Linux when he was working for Adaptec. Soon after he made it available, the Linux SCSI community decided to fork the development for various reasons. The "Linux SCSI community" version seems to have passed through various hands, currently it seems to Darrick Wong's headache. In the meantime Mr Tuikov has continued developing his "version" which I can report is now very stable and feature rich on my hardware (an adaptec 48300 HBA with a aic-9410w chip in it).

Some people involved are still quite upset about what happened and it shows in the email exchange you referred to. One unfortunate aspect of the GPL and what the "community" did is that the source code still has the copyright notices of Adaptec and Luben Tuikov. That may lead an observer to think that either or both still have an interest or control over that driver. As far as I can see that is not the case and a note should be added to the source code to that end.

So given the above, Linux distribution vendors have a problem when they try to "certify" hardware containing Adaptec SAS aic94xx series chips.

Quoted 3 lines

What I'm wondering about is:
a) Where can I get the patches that mr Tuikov maintains for this chipset?

You need to contact Luben Tuikov < [email protected] > directly.

b) Are they maintained wrt to different kernel versions, i.e.

Quoted 1 line

do they apply cleanly to a 2.6.20 or 2.6.16 kernel?

You need different driver versions for different kernels.

Quoted 3 lines

c) In the thread Darrick Wong refers to another branch[1] that contains (according to him) a lot of fixes for this chipset. Is that branch confirmed to work with my chipset?

I haven't checked recently but Adaptec used to have their own linux driver, named the adp94xx driver. It would seem that Adaptec has lost interest in Linux.

Quoted 4 lines

My main goal is to get this box up and running using debian or ubuntu. I have managed to get it to run the debian 2.6.9 kernel as outlined in [2] using the adp94xx driver, but I cannot get that driver to compile on newer kernels.

See my previous note.

Quoted 3 lines

I have also tried to compile the latest rc of the 2.6.20 kernel and loaded up the aic94xx driver + firmware. I then ended up getting the same errors that started the above mentioned thread on this list.

Here are my thoughts on the 48300 HBA and the available drivers. I bought the device about 12 months ago so I assumed it at least had production firmware on it. It required two firmware upgrades before it was stable in POST+scan in non-trivial SAS toplologies (by which I mean connected to SAS expanders). [Since I also had a LSI MPT Fusion SAS controller, it was relatively simple for me to determine the source of my problems.] All drivers I tried (although I could never get the adp94xx driver working because it was too old) showed the same problems (tmf timeouts). Then Luben Tuikov sent me a version of his driver with a "use_msi" related fix in it. My 48300 has been rock solid since. The last time I tried "Darrick's" driver (about a week ago) it failed in the fashion unto which I have become accustomed.

I have encouraged people to talk amongst themselves about the use_msi patch, but I don't believe that I should be reverse engineering that patch. There are other issues. As you may understand from the above, I am walking on a bit of a tight rope here.

I can also report that the same hardware works fine in Windows 2000, Vista RC1 and that FreeBSD doesn't have an aic94xx driver yet.

Quoted 7 lines

So what is the best solution here? Has anyone managed to get a newer kernel to run on this chipset?

1.
http://www.kernel.org/git/?p=linux/kernel/git/jejb/aic94xx-sas-2.6.git;a=summary

2. http://www.jimmy.co.at/weblog/?p=71

This last thread may help explain IBM's interest in getting the aic94xx working reliably.

Is there a best solution?

Doug Gilbert

#2 lore raw

[cc'ing a few contacts at adaptec]

Quoted 3 lines · Douglas Gilbert
Quoted 2 lines · Tarjei Huse

Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 running a HostRaid controller that uses the adaptech 9405w chipset.

<snip>

Quoted 3 lines
Quoted 3 lines

c) In the thread Darrick Wong refers to another branch[1] that contains (according to him) a lot of fixes for this chipset. Is that branch confirmed to work with my chipset?

Yes. I'd also strongly recommend consideration of patches #23 and #26 from here:

http://sweaglesw.net/~djwong/docs/sas_ata-patches/

I create my kernel tree by cloning the linux-2.6 git tree and then applying scsi-misc-2.6, scsi-rc-fixes-2.6 and aic94xx-sas-2.6 patches atop that. And then the giant long slew of patches atop *that*.

Quoted 3 lines
Quoted 3 lines

I have also tried to compile the latest rc of the 2.6.20 kernel and loaded up the aic94xx driver + firmware. I then ended up getting the same errors that started the above mentioned thread on this list.

Yes, because you need the changes that are in aic94xx-sas that add SATA support. Ideally that message would have printed something less cryptic, such as "SATA device found but not supported in this driver!", but that's water under the bridge at this point.

Quoted 1 line

it was too old) showed the same problems (tmf timeouts). Then

The TMF timeout problems (and several other bugs) were fixed in v18 of the sequencer firmware blob. Alexis, Ed, and Gilbert are currently working to have the firmware blob posted on Adaptec's web site. I think the sequencer is up to v28 now?

(Vaporware, I know, but hopefully we can nip this one in the bud soon.)

Quoted 4 lines

Luben Tuikov sent me a version of his driver with a "use_msi" related fix in it. My 48300 has been rock solid since. The last time I tried "Darrick's" driver (about a week ago) it failed in the fashion unto which I have become accustomed.

I'm not certain that I'm completely aware of the failures that you're seeing with the driver. Can you send me the BIOS firmware level, the sequencer version (probably v17 since that's the only one that I know of that's available on the 'net), and a dmesg output?

Quoted 5 lines

I have encouraged people to talk amongst themselves about the use_msi patch, but I don't believe that I should be reverse engineering that patch. There are other issues. As you may understand from the above, I am walking on a bit of a tight rope here.

Are you enabling MSI mode? There is a known bug where one needs to kick one of the CHIMINTEN bits if a certain flag is set, though none of the IBM boxes require MSI (and at the moment it isn't working anyway...).

Quoted 1 line
Quoted 1 line

2. http://www.jimmy.co.at/weblog/?p=71

Egad.

Anyway, patches are forthcoming.

--D

#3 lore raw

Hi,

Quoted 16 lines · Darrick J. Wong

[cc'ing a few contacts at adaptec]

Quoted 5 lines · Douglas Gilbert
Quoted 3 lines · Tarjei Huse

Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 running a HostRaid controller that uses the adaptech 9405w chipset.

<snip>

Quoted 4 lines
Quoted 4 lines

c) In the thread Darrick Wong refers to another branch[1] that contains (according to him) a lot of fixes for this chipset. Is that branch confirmed to work with my chipset?

Quoted 8 lines

Yes. I'd also strongly recommend consideration of patches #23 and #26 from here:

http://sweaglesw.net/~djwong/docs/sas_ata-patches/

I create my kernel tree by cloning the linux-2.6 git tree and then applying scsi-misc-2.6, scsi-rc-fixes-2.6 and aic94xx-sas-2.6 patches

Ok, I haven't tested a git tree yet, but what you're saying is that I should download just this git tree and use it, right?

http://www.kernel.org/git/?p=linux/kernel/git/jejb/aic94xx-sas-2.6.git;a=summary

Or should I just download the the patches you mention and

Quoted 1 line

atop that. And then the giant long slew of patches atop *that*.

What patches? Are they related to the aic driver or are they related to other things you are testing? (i.e. do I run a risk by using them?

Also, when will this work land in the mainline kernel tree?

Thanks for replying.
Regards,
Tarjei

Quoted 56 lines
Quoted 5 lines
Quoted 5 lines

I have also tried to compile the latest rc of the 2.6.20 kernel and loaded up the aic94xx driver + firmware. I then ended up getting the same errors that started the above mentioned thread on this list.

Yes, because you need the changes that are in aic94xx-sas that add SATA support. Ideally that message would have printed something less cryptic, such as "SATA device found but not supported in this driver!", but that's water under the bridge at this point.

Quoted 2 lines

it was too old) showed the same problems (tmf timeouts). Then

The TMF timeout problems (and several other bugs) were fixed in v18 of the sequencer firmware blob. Alexis, Ed, and Gilbert are currently working to have the firmware blob posted on Adaptec's web site. I think the sequencer is up to v28 now?

(Vaporware, I know, but hopefully we can nip this one in the bud soon.)

Quoted 5 lines

Luben Tuikov sent me a version of his driver with a "use_msi" related fix in it. My 48300 has been rock solid since. The last time I tried "Darrick's" driver (about a week ago) it failed in the fashion unto which I have become accustomed.

I'm not certain that I'm completely aware of the failures that you're seeing with the driver. Can you send me the BIOS firmware level, the sequencer version (probably v17 since that's the only one that I know of that's available on the 'net), and a dmesg output?

Quoted 6 lines

I have encouraged people to talk amongst themselves about the use_msi patch, but I don't believe that I should be reverse engineering that patch. There are other issues. As you may understand from the above, I am walking on a bit of a tight rope here.

Are you enabling MSI mode? There is a known bug where one needs to kick one of the CHIMINTEN bits if a certain flag is set, though none of the IBM boxes require MSI (and at the moment it isn't working anyway...).

Quoted 2 lines
Quoted 2 lines

2. http://www.jimmy.co.at/weblog/?p=71

Egad.

Anyway, patches are forthcoming.

--D

#4 lore raw
Quoted 2 lines · Tarjei Huse

Ok, I haven't tested a git tree yet, but what you're saying is that I should download just this git tree and use it, right?

I suppose you could do that with some patch massaging, though at the moment the patches are based off 2.6.20-rc4 + scsi-misc + scsi-rc-fixes
+ aic94xx-sas and will probably generate quite a bit of fuzz when applied against anything else.

Quoted 2 lines

http://www.kernel.org/git/?p=linux/kernel/git/jejb/aic94xx-sas-2.6.git;a=summary
Or should I just download the the patches you mention and

...and? I think your message got truncated?

Quoted 2 lines

What patches? Are they related to the aic driver or are they related to other things you are testing? (i.e. do I run a risk by using them?

All of those patches fix problems seen while testing/beating/exercising the aic94xx driver.

Quoted 1 line

Also, when will this work land in the mainline kernel tree?

Hopefully sooner than later.

--D

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 5 lines · Tarjei Huse

I did the opposite, I downloaded the git tree and tried to compile it. Since I got an error, I added the scsi-rc-fixes patch (the scsi-misc and aic94xx didn't apply cleanly so I guessed they were already in the git tree), the 39-libsas-fix-thypos, ../11-aic94xx-dont-eat-query-task-results_1, 17-aic94xx-fix-fw-leak_1.

The aic94xx-sas git tree is a requirement. Something along the lines of:

$ cg-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
$ cd linux-2.6
$ cg-branch-add scsi-misc git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
$ cg-branch-add scsi-rc git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
$ cg-branch-add aic94xx git://git.kernel.org/pub/scm/linux/kernel/git/jejb/aic94xx-sas-2.6.git
$ cg-update scsi-misc
$ cg-update scsi-rc
$ cg-update aic94xx

*Then* apply patches from my patch set.

--D

#7 lore raw

(note: I've sent this email with CC to Darrick ++ earlier, but forgot to remove html crap. Sorry about that).

Quoted 21 lines · Darrick J. Wong
Quoted 6 lines · Tarjei Huse

I did the opposite, I downloaded the git tree and tried to compile it. Since I got an error, I added the scsi-rc-fixes patch (the scsi-misc and aic94xx didn't apply cleanly so I guessed they were already in the git tree), the 39-libsas-fix-thypos, ../11-aic94xx-dont-eat-query-task-results_1, 17-aic94xx-fix-fw-leak_1.

The aic94xx-sas git tree is a requirement. Something along the lines of:

$ cg-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
$ cd linux-2.6
$ cg-branch-add scsi-misc git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
$ cg-branch-add scsi-rc git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
$ cg-branch-add aic94xx git://git.kernel.org/pub/scm/linux/kernel/git/jejb/aic94xx-sas-2.6.git
$ cg-update scsi-misc
$ cg-update scsi-rc
$ cg-update aic94xx
Quoted 2 lines

*Then* apply patches from my patch set.

Duh! Thanks :-)

After doing as you suggested, and running make oldconfig using the configuration from Ubuntu Dapper (2.6.15-23-server) and the stock Ubuntu Edgy I get the same error when booting the kernel:

PCI: BIOS Bug: MCFG area at e00000000 is not E820-reserved
PCI: Not using MMCONFIG
PCI Cannot allocate resource region 7 of bridge 0000:00:01.1 PCI Cannot allocate resource region 8 of bridge 0000:00:01.1 PCI Cannot allocate resource region 9 of bridge 0000:00:01.1

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown wn-block(0,0)

Is this some missing compile option or a bug?

Again thank you for your help.

Kind regards,
Tarjei

Quoted 2 lines

--D

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw
Quoted 11 lines · Tarjei Huse

Duh! Thanks :-)

After doing as you suggested, and running make oldconfig using the configuration from Ubuntu Dapper (2.6.15-23-server) and the stock Ubuntu Edgy I get the same error when booting the kernel:

PCI: BIOS Bug: MCFG area at e00000000 is not E820-reserved
PCI: Not using MMCONFIG
PCI Cannot allocate resource region 7 of bridge 0000:00:01.1 PCI Cannot allocate resource region 8 of bridge 0000:00:01.1 PCI Cannot allocate resource region 9 of bridge 0000:00:01.1

This is a known conflict between the kernel and the BIOS. As far as I know this should not affect the operation of the aic94xx because it is a PCIX device, and bridge 0:0:1.1 is a PCIe port. At least on the x306m...

Quoted 4 lines
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown

wn-block(0,0)

Is this some missing compile option or a bug?

Perhaps. Could you send a full output? It does not appear that the aic94xx driver is loading at all...?

--D

#10 lore raw
Quoted 21 lines · Darrick J. Wong
Quoted 6 lines · Tarjei Huse

Duh! Thanks :-)

After doing as you suggested, and running make oldconfig using the configuration from Ubuntu Dapper (2.6.15-23-server) and the stock Ubuntu Edgy I get the same error when booting the kernel:

Quoted 6 lines

PCI: BIOS Bug: MCFG area at e00000000 is not E820-reserved
PCI: Not using MMCONFIG
PCI Cannot allocate resource region 7 of bridge 0000:00:01.1 PCI Cannot allocate resource region 8 of bridge 0000:00:01.1 PCI Cannot allocate resource region 9 of bridge 0000:00:01.1

This is a known conflict between the kernel and the BIOS. As far as I know this should not affect the operation of the aic94xx because it is a PCIX device, and bridge 0:0:1.1 is a PCIe port. At least on the x306m...

Quoted 9 lines
Quoted 5 lines
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown

wn-block(0,0)

Is this some missing compile option or a bug?

Perhaps. Could you send a full output? It does not appear that the aic94xx driver is loading at all...?

Duh again. I thought I had added the module to the initrd, but that didn't happen.

Ok, I'm one step further. Where can I get the binary firmware the adapter asks for?

[    2.119258] aic94xx: Adaptec aic94xx SAS/SATA driver version 1.0.3 loaded
[    2.119335] ACPI: PCI Interrupt 0000:03:04.0[A] -> GSI 19 (level, low) -> IRQ 18
[    2.119379] aic94xx: found Adaptec AIC-9405W SAS/SATA Host Adapter, device 0000:03:04.0
[    2.119382] scsi0 : aic94xx
[   12.158371] aic94xx: Failed to load sequencer firmware file aic94xx-seq-v28.bin, error -2
[   12.158375] aic94xx: couldn't init seqs for 0000:03:04.0
[   12.158376] aic94xx: couldn't init the chip

Kind regards,
Tarjei

Quoted 2 lines

--D

#11 lore raw

Hi Tarjei,

I am glad that you a progressing forward!

<snip>

Quoted 10 lines
Quoted 5 lines
Quoted 1 line

Perhaps. Could you send a full output? It does not appear that the aic94xx driver is loading at all...?

Duh again. I thought I had added the module to the initrd, but that didn't happen.

Ok, I'm one step further. Where can I get the binary firmware the adapter asks for?

The new sequencer has yet to be posted. You can, however, use the old f/w in the meantime by backing out patch #38:

http://sweaglesw.net/~djwong/docs/sas_ata-patches/38-aic94xx-v28-sequencer_2.patch

Regards,

Alexis

Quoted 23 lines
[    2.119258] aic94xx: Adaptec aic94xx SAS/SATA driver version 1.0.3 loaded
[    2.119335] ACPI: PCI Interrupt 0000:03:04.0[A] -> GSI 19 (level,
low) -> IRQ 18
[    2.119379] aic94xx: found Adaptec AIC-9405W SAS/SATA Host Adapter,
device 0000:03:04.0
[    2.119382] scsi0 : aic94xx
[   12.158371] aic94xx: Failed to load sequencer firmware file
aic94xx-seq-v28.bin, error -2
[   12.158375] aic94xx: couldn't init seqs for 0000:03:04.0
[   12.158376] aic94xx: couldn't init the chip

Kind regards,
Tarjei

Quoted 2 lines

--D

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw
Quoted 4 lines · Alexis Bruemmer

Hi Tarjei,

I am glad that you a progressing forward!

Me too :-)

Quoted 9 lines

<snip>

Quoted 7 lines
Quoted 4 lines

Perhaps. Could you send a full output? It does not appear that the aic94xx driver is loading at all...?

Duh again. I thought I had added the module to the initrd, but that didn't happen.

Quoted 9 lines
Quoted 3 lines

Ok, I'm one step further. Where can I get the binary firmware the adapter asks for?

The new sequencer has yet to be posted. You can, however, use the old f/w in the meantime by backing out patch #38:

http://sweaglesw.net/~djwong/docs/sas_ata-patches/38-aic94xx-v28-sequencer_2.patch

Ok, did that. I now manage to load the module after boot when running rmmod aic94xx and then modprobe aic94xx. However, I cannot get it to load the firmware on boot. I've tried modifying the initram-fs image and placing the module in both /lib/firmware/ and /lib/firmware/2.6.20-rc5/ but it seems not to find the firmware (aic94xx-seq.fw) in any of those locations.

If I reload the module after booting, it will find the firmware in /lib/firmware/2.6.20-rc5 without problems.

Any tips?

kind regards,
Tarjei

Any

Quoted 31 lines

Regards,

Alexis

Quoted 24 lines
[    2.119258] aic94xx: Adaptec aic94xx SAS/SATA driver version 1.0.3 loaded
[    2.119335] ACPI: PCI Interrupt 0000:03:04.0[A] -> GSI 19 (level,
low) -> IRQ 18
[    2.119379] aic94xx: found Adaptec AIC-9405W SAS/SATA Host Adapter,
device 0000:03:04.0
[    2.119382] scsi0 : aic94xx
[   12.158371] aic94xx: Failed to load sequencer firmware file
aic94xx-seq-v28.bin, error -2
[   12.158375] aic94xx: couldn't init seqs for 0000:03:04.0
[   12.158376] aic94xx: couldn't init the chip

Kind regards,
Tarjei

Quoted 3 lines

--D

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw
Quoted 22 lines · Tarjei Huse
Quoted 4 lines · Alexis Bruemmer

Hi Tarjei,

I am glad that you a progressing forward!

Me too :-)

Quoted 16 lines

<snip>

Quoted 10 lines
Quoted 4 lines

Perhaps. Could you send a full output? It does not appear that the aic94xx driver is loading at all...?

Duh again. I thought I had added the module to the initrd, but that didn't happen.

Ok, I'm one step further. Where can I get the binary firmware the adapter asks for?

The new sequencer has yet to be posted. You can, however, use the old f/w in the meantime by backing out patch #38:

Quoted 7 lines
Quoted 2 lines

http://sweaglesw.net/~djwong/docs/sas_ata-patches/38-aic94xx-v28-sequencer_2.patch

Ok, did that. I now manage to load the module after boot when running rmmod aic94xx and then modprobe aic94xx. However, I cannot get it to load the firmware on boot. I've tried modifying the initram-fs image and placing the module in both /lib/firmware/ and /lib/firmware/2.6.20-rc5/ but it seems not to find the firmware (aic94xx-seq.fw) in any of those locations.

If I reload the module after booting, it will find the firmware in /lib/firmware/2.6.20-rc5 without problems.

Any tips?

Your initramfs needs to have hotplug scripts that can handle firmware loading. I'm pretty sure that is what is missing, because I just went through the same thing with a QLogic FC driver.

Signature · 1 line
Mark Rustad, [email protected]