>
> After some more thinking, Alan's suggestion (always doing the swapping) isn't
> that bad. Except for the loop layer on old slow machines, which I'd like to
> avoid.
convincing by simplicity, oversimplification also may have drawbacks.
> If we always swap, we only have to un-swap when reading/writing platter data
> from native disks. No more swapping has to be done in ide_fix_driveid(), apart
> from the obvious conversion from little to big endian of the driveid structure
> itself, which we cannot avoid.
yes. Smartdata and everything would be correct, except for the disk
contents.
> Since both Atari and Q40/Q60 use PIO only, this affects ata_{in,out}put_data()
> only. It's quite easy to add a swap flag to ide_drive_t (configurable through
> hdX=swapdata), that is checked in ata_{in,out}put_data(). To improve
> performance, we wouldn't swap twice, but just call the new routines
> hwif->{IN,OUT}S[WL]_NOSWAP.
contradicts previous paragraph? Still wrong smartdata etc unless
you mean to set the flag per request depending on the type of command
- which would be quite easy afaics.
> All of this can be protected by #ifdef CONFIG_IDE_BYTESWAPPED_HWIF. Influence
> on generic code is limited to ata_{in,out}put_data() and the new routines
> hwif->{IN,OUT}S[WL]_NOSWAP.
>
> Is this OK?
so to sum up, your idea is
- cleanup and correct current solution for IDE_BYTESWAPPED_HWIF machines
- make all others use the loop layer
looks fine.
Richard
-
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/