Skip to contentSkip to conversation

falconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods

PATCH Roman Zippel 4 participants 6 messages Mar 31, 2008 – Apr 1, 2008 libata

lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 7 lines · Alan Cox
Quoted 2 lines

Yes, the data on the disk is stored byte-swapped.
So it's only the drive ID and packet commands that should be swapped.

If you are storing the data on disk byte swapped then reverse the logic in the driver so you don't need hacks for un-swapping commands and write a bytesewap device mapper layer in the right place. Then you can even move disks around.

That would require an additional data copy and a double byteswap on machines which are not that fast in first place...

bye, Roman

#1 lore raw
Quoted 2 lines

That would require an additional data copy and a double byteswap on machines which are not that fast in first place...

So use the blitter ;)

At this point the future is not Commode Amiga or Atari TT and we risk mess in core code for obscure platforms ?

Alan

#2 lore raw

Hi,

Quoted 7 lines · Alan Cox
Quoted 2 lines

That would require an additional data copy and a double byteswap on machines which are not that fast in first place...

So use the blitter ;)

At this point the future is not Commode Amiga or Atari TT and we risk mess in core code for obscure platforms ?

We have worse mess and a _single_ simple hook which helps a small platform and doesn't hurt others doesn't sound that bad.

bye, Roman

#3 lore raw
In reply to Alan Cox

Hi,

Quoted 7 lines
Quoted 2 lines

That would require an additional data copy and a double byteswap on machines which are not that fast in first place...

So use the blitter ;)

At this point the future is not Commode Amiga or Atari TT and we risk mess in core code for obscure platforms ?

The Amiga isn't affected by this. Only Falcon and Q40 (Atari) are.

Sorry for the mess in core code - ist there any other way for only driveid and packet data getting swapped? And can we actually use the device mapper to byte-swap the root partition?

Michael

#4 lore raw
Quoted 3 lines

Sorry for the mess in core code - ist there any other way for only driveid and packet data getting swapped? And can we actually use the device mapper to byte-swap the root partition?

Device Mapper can certainly support that if needed - I don't think it has a swab target currently but byteswapped is just a very bad crypto algorithm so you can use dm crypt target as a reference. Might not be a bad idea just to make the media shareable.

The only other way I can see to do it would be to split the ATA transfer functions into two sets one for media data and one for other stuff - but then how do you handle iso9660 cd ?

Alan

#5 lore raw
Quoted 4 lines · Alan Cox
Quoted 3 lines

Sorry for the mess in core code - ist there any other way for only driveid and packet data getting swapped? And can we actually use the device mapper to byte-swap the root partition?

Quoted 8 lines

Device Mapper can certainly support that if needed - I don't think it has a swab target currently but byteswapped is just a very bad crypto algorithm so you can use dm crypt target as a reference. Might not be a bad idea just to make the media shareable.

The only other way I can see to do it would be to split the ATA transfer functions into two sets one for media data and one for other stuff - but then how do you handle iso9660 cd ?

I had a brief look at this a little while ago, as I was looking at the hacks Debian applies to make 2.6.x IDE work on Atari/ARAnym. As I understood it the problem was some IDENTIFY command which needed to not byteswap (the hack byteswaps a second time). Can't the driver inspect the command type and choose whether to swap or not?

I had a grand plan of writing a pata_falconide libata driver, but ran out of steam :-(