Re: IDE-flash device and hard disk on same controller

Benjamin Herrenschmidt (benh@kernel.crashing.org)
Sat, 24 Aug 2002 02:19:19 +0200


>> Well... x86 PCs with ordinary BIOSes did. Other firmwares,
>> embedded devices, whatever.... may not, or eventually the firmware
>> will have reset everything prior to booting the kernel (go figure
>> why, but that happens).
>>
>> It's not difficult nor harmful to wait for that dawn busy bit to
>> go away, so why not do it ?
>
>
>Basically think about the consequences of trying to handle a completely
>unknown state -- if you are going to attempt to handle this you would
>need to check for data, not just the BSY bit. And read the data into a
>throwaway buffer, if there is data to be read, or write the data it's
>expecting.
>
>So it's not just the busy bit :)

But are we dealing with completely unknown states ? That's not
what I'm saying. We are dealing with:

- Hotswap in (pcmcia, ...)
- Firmware that don't wait after reset
- Interfaces (like ide-pmac) that hard reset the disk
- no POST code (power-on reset)

A completely unknown state doesn't work today and I don't think
we should really care about it. If an arch wants to deal with
such a state (which is +/- the case of ide-pmac when booting
from MacOS), then that arch has to do the specifics of dealing
with that (in ide-pmac case, tggling the hard reset line of
the drive).

So I still think it would make sense to wait. Now, what I
suggested to Andre on IRC is that we could eventually make
that wait conditional on some HWIF flag set by the arch
(or rather the HBA driver) if you really don't want to do it in
the generic case.

Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/