Subject: Re: how to debug an IDE driver
To: None <>
From: Manuel Bouyer <>
List: tech-kern
Date: 11/29/2004 16:04:36
On Sun, Nov 28, 2004 at 03:18:35PM +0100, Klaus Heinz wrote:
> Hi,
> the IDE driver for NetBSD/bebox does not work for me (I don't know about
> other people). As I will have some time to spare looking for a solution
> I ask here for some guidance how to attack the problem; the list
> port-bebox has been very silent :-/.
> The symptoms can be seen in the two appended files of kernel output. One
> is for NetBSD 2.0RC4 and the other for NetBSD 2.99.10 from 2004-10-23,
> The latter has atadebug_mask=0x7f and wdcdebug_wd_mask=0x7f.


> wskbd0 at pckbd0 mux 1
> wdc0 at isa0 port 0x1f0-0x1f7 irq 14
> atabus0 at wdc0 channel 0

wdc@isa works, I just tested on a PC.

>         type: ata tc_bcount: 512 tc_skip: 0
> : <Conner Peripherals 635MB - CFS635A>
> wd0: drive supports 16-sector PIO transfers, LBA addressing
> wd0: 609 MB, 1238 cyl, 16 head, 63 sec, 512 bytes/sect x 1248438 sectors
> wdc0:0:0: lost interrupt
>         type: ata tc_bcount: 512 tc_skip: 0

This looks like an interrupt problem. Usually, I debug this with printf's
in interrupt routines, or boot -d and breakpoints on interrupt routines.

> root device. With the 2.0RC4 kernel I could break into ddb at this
> point; the -current kernel just prints an endless stream of "wdcintr:
> inactive controller" as soon as I send the break on the serial console
> or press any other key.

Could it be that the kernel doesn't enable interrupts soon enouth ?

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference