Re: serialize access to ide device

From: Alan Cox
Date: Thu Aug 19 2004 - 08:37:00 EST


On Iau, 2004-08-19 at 14:14, Bartlomiej Zolnierkiewicz wrote:
> What about adding new kind of REQ_SPECIAL request and converting
> set_using_dma(), set_xfer_rate(), ..., to be callback functions for this
> request?

Definitely the right direction but it doesn't ultimately fix the bigger
problem which is that in some cases you need to issue multiple commands
in order to set up the drive and cannot do that in one sequence if the
drive is active. This could also be done with some kind of ATA_IO SG_IO
like functionality for the most part (the drive side).

The reset() logic also has the same problem when it occurs from process
context. The newer 2.4 code in 2.6 as well is only a bandaid that
normally works.

Serialization is indeed needed for some controllers (CMD64x in some
cases, RZ1000 and others). Certain controllers have drive pair
constraints and in some cases BIOSes know a lot about DMA suitability of
their configurations. Thats more an argument that using hdparm -d1 at
random is playing with fire.

Alan

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