AHCI PATCH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all Linux ATA developers,

using the latest stable kernel 2.6.17.7 in conjunction with the AHCI SATA driver it can happen that the driver tries to identify a drive
although no drive is present at the corrosponding channel and the
physical link is down. This causes command timeouts on every unconnected
SATA channel and unnecessarily stalls the kernel boot-process.
The problem is related to an interaction issue between the generic
(libata-core) and the chip-specific (AHCI) driver and the fact,
that the ahci_dev_classify function returns a wrong class in case
of a not established physical link (at least on my ATI/ULi chipset
of my ASUS A8R32-MVP board). The issue can be removed by applying the
following patch to the ahci_hardreset method of the AHCI driver.

Regards
Steve

static int ahci_hardreset(struct ata_port *ap, int verbose,
                          unsigned int *class)
{
        int rc;

        DPRINTK("ENTER\n");

        ahci_stop_engine(ap);
        rc = sata_std_hardreset(ap, verbose, class);
        ahci_start_engine(ap);

-       if (rc == 0)
+       if ((rc == 0) && sata_dev_present(ap))
                *class = ahci_dev_classify(ap);
        if (*class == ATA_DEV_UNKNOWN)
                *class = ATA_DEV_NONE;

        DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
        return rc;
}
-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux