Subject: Re: Problems with rccide0
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Martti Kuparinen <martti.kuparinen@iki.fi>
List: current-users
Date: 11/28/2003 16:01:00
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");
         return ret;
}