linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* AHCI PATCH
@ 2006-08-06 10:46 Steffen Koehler
  2006-08-06 12:34 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Steffen Koehler @ 2006-08-06 10:46 UTC (permalink / raw)
  To: linux-ide, jgarzik, stk

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;
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: AHCI PATCH
  2006-08-06 10:46 AHCI PATCH Steffen Koehler
@ 2006-08-06 12:34 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2006-08-06 12:34 UTC (permalink / raw)
  To: Steffen Koehler; +Cc: linux-ide, jgarzik, stk

Steffen Koehler wrote:
> 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))

Acked-by: Tejun Heo <htejun@gmail.com>

The corresponding fix is already in libata-dev#upstream and Linus's 
tree, so this fix is just for -stable.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-06 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-06 10:46 AHCI PATCH Steffen Koehler
2006-08-06 12:34 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).