Skip to contentSkip to conversation

aic94xx: Supermicro motherboards support

PATCH In review Sergey Kononenko 3 participants 4 messages Oct 14, 2006 – Oct 15, 2006 SCSI

lore
Share & tools
lore
#0 lore raw

cover aic94xx: Supermicro motherboards support

Hello,

The aic94xx driver in current mainline kernel don't work with controllers integrated in some of Supermicro motherboards (i have tested only on X6DHR-3G2) due to two reasons:
- driver do not contain corresponding PCI id (9005:041F)
- driver can not find flash on controller.

Patches which i send now ordered to resolve this problems.

First one is a simple and just add pci id, but second one is a bit controversial.

The following code from function asd_flash_getid (aic94xx_sds.c)

	reg = asd_read_reg_dword(asd_ha, EXSICNFGR);

        if (!(reg & FLASHEX)) {
                ASD_DPRINTK("flash doesn't exist\n");
                return -ENOENT;
        }

failed with error on controllers in supermicro motherboards. Looks like flag FLASHEX did not set on such devices, however flash chip present and without above if statement in code drivers works normally on supermicro controllers.

As i found this code was commented out in original driver by Luben Tuikov with following comment:

/* Early (current?) SuperMicro mainboards, X6DHR-3G2 and X6DH3-G2
have a bug whereby RS104 is missing (not installed) and RS103 is installed, causing FLASHEX to be 0. */
/* if (!(reg & FLASHEX)) { */
/* ASD_DPRINTK("flash doesn't exist\n"); */
/* return -ENOENT; */
/* } */

May be it is possible to write separate code for checking availability of flash chip especially for supermicro motherboards, but i don't know hot it possible and don't know what is RS104, RS103 and difference between it.

But more likely that check of FLASHEX can be removed safely from code because below there is another more generic check for flash chip via pci config probe.

This solution works perfect in my case, also it was in original code, however i think this second patch would be tested on some other varieties of aic94xx hardware.

--
Sergey Kononenko

#1 lore raw
Quoted 38 lines · --- Sergey Kononenko

Hello,

The aic94xx driver in current mainline kernel don't work with controllers integrated in some of Supermicro motherboards (i have tested only on X6DHR-3G2) due to two reasons:
- driver do not contain corresponding PCI id (9005:041F)
- driver can not find flash on controller.

Patches which i send now ordered to resolve this problems.

First one is a simple and just add pci id, but second one is a bit controversial.

The following code from function asd_flash_getid (aic94xx_sds.c)

	reg = asd_read_reg_dword(asd_ha, EXSICNFGR);

        if (!(reg & FLASHEX)) {
                ASD_DPRINTK("flash doesn't exist\n");
                return -ENOENT;
        }

failed with error on controllers in supermicro motherboards. Looks like flag FLASHEX did not set on such devices, however flash chip present and without above if statement in code drivers works normally on supermicro controllers.

As i found this code was commented out in original driver by Luben Tuikov with following comment:

/* Early (current?) SuperMicro mainboards, X6DHR-3G2 and X6DH3-G2
have a bug whereby RS104 is missing (not installed) and RS103 is installed, causing FLASHEX to be 0. */
/* if (!(reg & FLASHEX)) { */
/* ASD_DPRINTK("flash doesn't exist\n"); */
/* return -ENOENT; */
/* } */

Quoted 4 lines

May be it is possible to write separate code for checking availability of flash chip especially for supermicro motherboards, but i don't know hot it possible and don't know what is RS104, RS103 and difference between it.

RSxyz stands for "resistor xyz" in the schematic diagrams. This is a hardware bug in the (early?) SuperMicro mainboards. It dates from last year, 20 October 2005.

This is the commit from my git tree:

commit 433484ee805a953793cc33efa890cb24ef4afe1a

Author: Luben Tuikov <[email protected]>
Date:   Thu Oct 20 18:11:30 2005 -0400

Fix around buggy mainboards reporting Flash memory present Early (current?) SuperMicro mainboards, X6DHR-3G2 and X6DH3-G2 have a bug whereby RS104 is missing (not installed) and RS103 is installed, causing FLASHEX to be 0.

Quoted 1 line

But more likely that check of FLASHEX can be removed safely from code

Yes, you can remove it safely.

Luben

Quoted 14 lines

because below there is another more generic check for flash chip via pci config probe.

This solution works perfect in my case, also it was in original code, however i think this second patch would be tested on some other varieties of aic94xx hardware.

--
Sergey Kononenko
-
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

#2 lore raw
Quoted 11 lines · Luben Tuikov
Quoted 11 lines

As i found this code was commented out in original driver by Luben Tuikov with following comment:

/* Early (current?) SuperMicro mainboards, X6DHR-3G2 and X6DH3-G2
have a bug whereby RS104 is missing (not installed) and RS103 is installed, causing FLASHEX to be 0. */
/* if (!(reg & FLASHEX)) { */
/* ASD_DPRINTK("flash doesn't exist\n"); */
/* return -ENOENT; */
/* } */

Quoted 8 lines
Quoted 4 lines

May be it is possible to write separate code for checking availability of flash chip especially for supermicro motherboards, but i don't know hot it possible and don't know what is RS104, RS103 and difference between it.

RSxyz stands for "resistor xyz" in the schematic diagrams. This is a hardware bug in the (early?) SuperMicro mainboards. It dates from last year, 20 October 2005.

This wouldn't be the first (or last I'm sure) time a hardware manufacturer didn't properly set up the external resistors that signal to the chip whether or not certain options are installed. In the past I've done searches of the PCI device space looking for specific northbridge/southbridge pairs so I would know when to ignore certain hardware indicators based upon buggy motherboard setups.

Signature · 6 lines
Doug Ledford <[email protected]>
              GPG KeyID: CFBFF194
              http://people.redhat.com/dledford

Infiniband specific RPMs available at
              http://people.redhat.com/dledford/Infiniband
#3 lore raw
Quoted 21 lines · --- Doug Ledford
Quoted 11 lines · Luben Tuikov
Quoted 11 lines

As i found this code was commented out in original driver by Luben Tuikov with following comment:

/* Early (current?) SuperMicro mainboards, X6DHR-3G2 and X6DH3-G2
have a bug whereby RS104 is missing (not installed) and RS103 is installed, causing FLASHEX to be 0. */
/* if (!(reg & FLASHEX)) { */
/* ASD_DPRINTK("flash doesn't exist\n"); */
/* return -ENOENT; */
/* } */

Quoted 8 lines
Quoted 4 lines

May be it is possible to write separate code for checking availability of flash chip especially for supermicro motherboards, but i don't know hot it possible and don't know what is RS104, RS103 and difference between it.

RSxyz stands for "resistor xyz" in the schematic diagrams. This is a hardware bug in the (early?) SuperMicro mainboards. It dates from last year, 20 October 2005.

Quoted 6 lines

This wouldn't be the first (or last I'm sure) time a hardware manufacturer didn't properly set up the external resistors that signal to the chip whether or not certain options are installed. In the past I've done searches of the PCI device space looking for specific northbridge/southbridge pairs so I would know when to ignore certain hardware indicators based upon buggy motherboard setups.

That's a very neat trick! (to identifying mainboards)

Luben

P.S. For aic94xx, all boards shipped out (to customers) do have a flash chip installed (to store things like SAS phy parameters, SAS addresses, etc), so it would be safe to ignore FLASHEX bit.