Subject: Re: Problems with rccide0
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: current-users
Date: 11/28/2003 16:33:23
On Fri, Nov 28, 2003 at 04:01:00PM +0200, Martti Kuparinen wrote:
> Martti Kuparinen wrote:
>
> >
> >>wdc_ata_get_parms
> >>wdc_exec_command rccide0:0:0
> >>wdc_exec_xfre 0xc1ad2000 channel 0 drive 0
> >>wdcstart from wdc_exec_xfre, flags 0x100
> >>wdcstart: xfer 0xc1ad200 channel 0 drive 0
> >>__wdccommand_start rccide0:0:0
> >>__wdcwait rccide0:0:0
> >>wdccomand rccide0:0:0: command=0xa1 cylin=0 head=0 sector=0 count=0
> >>precomp=0
> >><It hangs here>
>
>
> This is where it hangs. I see "5" and "6" but not "8"...
>
>
> /* $NetBSD: wdc.c,v 1.157 2003/11/27 23:02:40 fvdl Exp $ */
> [...]
> int
> wdc_exec_command(drvp, wdc_c)
> [...]
> if (wdc_c->flags & AT_DONE) {
> printf("5\n");
> ret = WDC_COMPLETE;
> } else {
> if (wdc_c->flags & AT_WAIT) {
> printf("6\n");
> while ((wdc_c->flags & AT_DONE) == 0) {
> tsleep(wdc_c, PRIBIO, "wdccmd", 0);
> }
> ret = WDC_COMPLETE;
> } else {
> printf("7\n");
> ret = WDC_QUEUED;
> }
> }
> splx(s);
> printf("8\n");
OK, this is likely an interrupt problem then. Can you add printfs to
serverworks_pci_intr() to see if there's a loop at this level (or add
a breakpoint with ddb and see what's happening here).
You can also try the attached patch to see if it helps.
BTW, if you remove rccide from your kernel you should have a slow but
working IDE system, it may help for futur tests to have a working kernel :)
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 24 ans d'experience feront toujours la difference
--