Subject: IDE probing problems
To: None <current-users@netbsd.org>
From: Ian Fry <Ian.Fry@sophos.com>
List: current-users
Date: 06/08/2004 16:34:47
I'm having problems with recent -current kernels not probing IDE devices
properly. A normal boot finds the following IDE/SCSI devices:

NetBSD 2.0E (TERRY) #312: Mon May 10 11:22:52 BST 2004
[...]
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
IPsec: Initialized Security Association Processing.
scsibus0: waiting 2 seconds for devices to settle...
atapibus0 at atabus0: 2 targets
cd0 at atapibus0 drive 1: <MATSHITA CR-585, , ZS15> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 3, DMA mode 1
wd0 at atabus0 drive 0: <Maxtor 83201A6>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 3060 MB, 6218 cyl, 16 head, 63 sec, 512 bytes/sect x 6267744 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2
wd0(siside0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
cd0(siside0:0:1): using PIO mode 3, DMA mode 1 (using DMA data transfers)
sd0 at scsibus0 target 0 lun 0: <QUANTUM, FIREBALL ST3.2S, 0F0C> disk fixed
sd0: 3090 MB, 7068 cyl, 4 head, 223 sec, 512 bytes/sect x 6328861 sectors
sd0: sync (50.00ns offset 15), 8-bit (20.000MB/s) transfers, tagged queueing
wd1 at atabus1 drive 0: <ST38410A>
wd1: drive supports 32-sector PIO transfers, LBA addressing
wd1: 8223 MB, 16708 cyl, 16 head, 63 sec, 512 bytes/sect x 16841664 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd1(siside0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs

However, with all the 2.0F kernels I've tried, wd0 isn't detected at all,
and I get a 'lost interrupt' message from the IDE controller. Probing also
takes much longer than normal - an extra 5-10 seconds, I think, and the
CDROM seems to spin-up twice, rather than once.

Here are the idents of the relevant source files for a good kernel:

/netbsd:
     $NetBSD: wdc.c,v 1.173 2004/05/08 15:03:32 bouyer Exp $
     $NetBSD: pciide_machdep.c,v 1.3 2003/10/30 21:19:54 fvdl Exp $
     $NetBSD: scsipiconf.c,v 1.20 2003/01/18 12:05:39 martin Exp $
     $NetBSD: scsipi_base.c,v 1.105 2004/04/27 18:15:37 bouyer Exp $
     $NetBSD: scsipi_ioctl.c,v 1.46 2003/06/29 22:30:41 fvdl Exp $
     $NetBSD: scsipi_verbose.c,v 1.22 2004/04/23 21:52:17 itojun Exp $
     $NetBSD: atapi_base.c,v 1.19 2004/03/10 21:57:31 bouyer Exp $
     $NetBSD: atapi_wdc.c,v 1.70 2004/05/08 15:03:32 bouyer Exp $
     $NetBSD: atapiconf.c,v 1.63 2003/10/17 00:19:46 mycroft Exp $
     $NetBSD: cd.c,v 1.201 2004/04/24 09:26:14 pk Exp $
     $NetBSD: wd.c,v 1.275 2004/05/03 20:11:40 bouyer Exp $
     $NetBSD: ata_wdc.c,v 1.54 2004/05/08 15:03:32 bouyer Exp $
     $NetBSD: ata.c,v 1.28 2004/04/13 19:51:06 bouyer Exp $
     $NetBSD: pciide_common.c,v 1.10 2004/05/05 17:56:14 bouyer Exp $
     $NetBSD: pciide.c,v 1.209 2003/10/08 11:51:59 bouyer Exp $

I've tried reverting a few of the recent changes (mainly the ones that
added extra delay() calls), but that hasn't helped.

Any suggestions as to what I should do to track this down? Let me know if
any more information would be useful, and I'll try to provide it.

Thanks in advance,

Ian.