Subject: Re: haning after pciicd0
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Hanspeter Roth <hanspeter_roth@hotmail.com>
List: port-i386
Date: 03/11/2001 22:48:54
Hello Manuel,

Friday, March 09, 2001, 7:55:41 PM, you wrote:

[...]

> It hangs before the pciide0 line ?
> If so it may not be a problem inside the IDE code  ...

No it hangs _after_ the pciide0 line.
I realized that printf works fine. So I used printfs to isolate
the location where it hangs.

On the Mitac pciide0:0:0 is a harddisk and pciide0:1:0 is the CD-ROM.
Wdcattach calls ata_get_params on pciide0:0:0 which runs trough
without long delays.
Then it attempts ata_get_params on pciide0:0:1 which is empty.
It calls wd_exec_command twice since the first time failes.
On the second attempt wd_exec_command calls wdc_exec_xfer which
calls wdcstart which seems to hang somewhere.

When I tried to isolate it further it ended up issuing endless
trace messages within wd_exec_xfer.
I also ran out of dmesg-buffer-space. Can I increase it somewhere?

When I had lot of trace stuff it seemed to me that the problem was
less reproducable.
In dev/ic/wdc.c I changed the condition for the second invocation
of ata_get_params from "error != CMD_OK" to "error == CMD_AGAIN".
This seemed to solve the problem when checking pciide0:0:1 but
it occasionally hung while checking pciide0:1:1.
It seems to me timing is also playing a role.

I'm considering playing with PCIC_ISA_INTR_ALLOC_MASK and
PCIBIOS_IRQS_HINT. But I have no idea what I should set them to...

--
Hanspeter <hanspeter_roth@hotmail.com>