tech-kern archive

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

Re: Nvidia MCP67 SATA controller



On Wed, Jun 18, 2008 at 08:23:04PM +0200, Dieter Baron wrote:
[...]
> > This is almost a duplicate of ahci_reset(), which is the first thing done
> > in ahci_attach(). I think you don't need this function at all,
> > just set the AHCI_GHC_AE bit in the force_ahci case, and let ahci_attach()
> > to the reset.
> 
>   I tried that first, but then it never worked the first time after
> power on.  I had to do a reset when the first boot hung, then the
> second boot would succeed.

It's probably the same issue that cause your drive to not be probed
properly some times. It's most probably timing-related and I guess it works
with your patch only because of the 1s delay it adds.
Could you see if the attached patch would help ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: ahcisata_core.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/ahcisata_core.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 ahcisata_core.c
--- ahcisata_core.c     7 Jun 2008 12:56:57 -0000       1.16
+++ ahcisata_core.c     18 Jun 2008 18:49:22 -0000
@@ -606,8 +606,8 @@ ahci_probe_drive(struct ata_channel *chp
                    AHCI_P_IX_DHRS);
                /* and start operations */
                ahci_channel_start(sc, chp);
-               /* wait 100ms before actually starting operations */
-               tsleep(&sc, PRIBIO, "ahciprb", mstohz(100));
+               /* wait 500ms before actually starting operations */
+               tsleep(&sc, PRIBIO, "ahciprb", mstohz(500));
                break;
 
        default:


Home | Main Index | Thread Index | Old Index