Subject: Re: satalink(4): trouble detecting harddisk if booting "too fast"
To: None <tech-kern@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 04/27/2004 17:37:26
Hi,
sorry for the delay looking at this

On Wed, Apr 14, 2004 at 08:17:30PM +0200, Thomas Klausner wrote:
> On Sat, Apr 10, 2004 at 08:57:33PM +0200, Manuel Bouyer wrote:
> > On Fri, Apr 09, 2004 at 11:45:52PM +0200, Thomas Klausner wrote:
> > > I am using a Samsung harddisk on a satalink(4) controller
> > > on a 2.0C/i386; it's plugged into the second port.
> > > 
> > > Recently I added another Samsung hard disk in the primary port.
> > > Now, when booting, I have to wait 10-15s in the GRUB boot loader
> > > screen and the NetBSD boot loader screen (combined) before allowing
> > > the kernel to boot, otherwise NetBSD only detects the hard disk
> > > in the second port.
> > > 
> > > Any ideas what could be causing this? Is this a bug in satalink?
> > > Or does the hard disk in the primary port just need longer to
> > > spin up? Are there any debugging flags I could try to find out more?
> > 
> > Yes, you can try to set wdcdebug_mask and wdcdebug_wd_mask to 0x10
> 
> Attached are the dmesg outputs of the same kernel when booting
> "too fast" and when waiting long enough. Is this enough information
> to track this down?

Well, it appears that the controller's PHY really didn't detect the hard drive.
The probe routine can't do anything as long as the link to the drive is down.

I don't know if we can do something at the controller's level, but I'm not sure
we can even send a reset to the drive when the link is down.
If I remember properly, the PHY is supposed to automatically detect the link
state, so we may not have any possible action here either.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--