Subject: Re: ide disks missing under 3.99.15
To: Arto Huusko <arto.huusko@utu.fi>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 02/07/2006 21:36:08
--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Feb 08, 2006 at 07:27:22AM +1100, Daniel Carosone wrote:
> [I'm Cc:'ing current-users for wider confirmation and testing, this is
> not an alpha-specific issue, and leaving extra quoted context accordingly]
> 
> On Tue, Feb 07, 2006 at 08:59:12PM +0100, Manuel Bouyer wrote:
> > On Tue, Feb 07, 2006 at 08:00:59PM +0200, Arto Huusko wrote:
> > > Manuel Bouyer wrote:
> > > >On Sat, Feb 04, 2006 at 07:36:25PM +0200, Arto Huusko wrote:
> > > >>I tried to upgrade to 3.99.15 (sources updated about Jan 20), but
> > > >>neither my custom kernel nor GENERIC find the IDE disk anymore.
> > > >
> > > >Please make sure you have sys/dev/ic/wdc.c 1.234. If that's not the 
> > > >problem,
> > > >try going back to sys/dev/ata/ata.c 1.72
> > > 
> > > It still does not work with wdc.c 1.234 and ata 1.73.
> > > And the original non-working configuration had
> > > wdc.c 1.232 and ata.c 1.72.
> > 
> > Ha, so it's not my recent changes.  Make sure you have cmdide.c 1.22.
> 
> I can confirm something that looks very much like this on i386, with
> sil0680 controllers, under xen (and also native).  Up until I saw this
> thread, I had been trying to chase it down as a config issue: all the
> disks on the other controllers are wired down and probe correctly,
> while the remaining wd* devices never appear. I thought that was
> somehow related to autoconf changes, but perhaps it is specific to the
> sil0680 instead?

Yes, it looks like there is still a missing ch_ndrive initialisation,
the 680 has a specific channel_map routine.
Please test the attached patch (which I'm going to commit shortly).

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

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff2

Index: cmdide.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/cmdide.c,v
retrieving revision 1.22
diff -u -r1.22 cmdide.c
--- cmdide.c	17 Jan 2006 00:40:49 -0000	1.22
+++ cmdide.c	7 Feb 2006 20:34:23 -0000
@@ -529,6 +529,7 @@
 		    sc->sc_wdcdev.sc_atac.atac_dev.dv_xname, cp->name);
 		    return;
 	}
+	cp->ata_channel.ch_ndrive = 2;
 
 	/* XXX */
 	reg = 0xa2 + channel * 16;

--AhhlLboLdkugWU4S--