BETA4 installer doesn't attach my HDD controller; BETA3 did

Andrey V. Elsukov bu7cher at yandex.ru
Thu Dec 6 23:54:05 PST 2007


Todd Wasson wrote:
>> Todd Wasson wrote:
>>> I've got a Maxtor 6Y080L0 YAR41VW0 drive on a JMicron JMB368 UDMA133
>>> controller, and in the BETA4 installer the controller doesn't seem to
>>> be properly attaching, which leads to the drive not being found.  The
>>> relevant sections from dmesg (as I'm not sure where else to look while
>>> running the installer CD) are:
>>
>> Did you try "Safe Boot" key 3.

I think this changes may create a regression:

1. the BETA3's version:

         ctlr->r_type2 = SYS_RES_MEMORY;
         ctlr->r_rid2 = PCIR_BAR(5);
         if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
                                           &ctlr->r_rid2, RF_ACTIVE))){
             if ((error = ata_ahci_chipinit(dev)))
                 return error;
         }
We have two checks here. Probably your controller doesn't allocate a
memory resource for the AHCI, but it works because it skips second
checks.

2. the BETA4's version:

         if ((error = ata_ahci_chipinit(dev)))
             return error;

In this version driver doesn't pass it. I've already sent patch
for test to your PR, but i attach it again.
May be Soren can comment it?

-- 
WBR, Andrey V. Elsukov
-------------- next part --------------
--- src/sys/dev/ata/ata-chipset.c	2007-11-22 00:15:00.000000000 +0300
+++ src/sys/dev/ata/ata-chipset.c	2007-12-07 10:07:21.000000000 +0300
@@ -2243,7 +2243,7 @@ ata_jmicron_chipinit(device_t dev)
 	return ENXIO;
 
     /* do we have multiple PCI functions ? */
-    if (pci_read_config(dev, 0xdf, 1) & 0x40) {
+    if ((pci_read_config(dev, 0xdf, 1) & 0x40) || ctlr->chip->cfg1 == 0) {
 	/* are we on the AHCI part ? */
 	if (ata_ahci_chipinit(dev) != ENXIO)
 	    return 0;


More information about the freebsd-current mailing list