Re: [PATCH] 2.5.8 IDE 36

Linus Torvalds (torvalds@transmeta.com)
Tue, 16 Apr 2002 08:30:12 -0700 (PDT)


On Tue, 16 Apr 2002, David Lang wrote:
>
> It sounds as if you are removing this capability, am I misunderstaning you
> or is there some other way to do this? (and duplicating the drive to use
> dd to byteswap is not practical for 100G+)

Doing it with a loopback like interface at a higher level is the much
saner operation - I understand why Martin removed the byteswap support,
and agree with it 100%. It just didn't make any sense from a driver
standpoint.

In fact, the byteswapping was actively incorrect, in that it swapped data
in-place - which means that it corrupts the data area while IO is in
progress. It also only works for PIO.

The only reason byteswapping exists is a rather historical one: Linux did
the wrong thing for "insw/outsw" on big-endian architectures at one point
(it byteswapped the data).

(Oh, and coupled with the fact that the IDE ID string is in a "big-endian"
word order, which may have been one more reason to add a "do byteswapped
IO" thing).

Linus

-
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/