Skip to contentSkip to conversation

sata_sil and byte-aligned mmio

DISCUSSION Kevin Hilman 2 participants 3 messages Oct 11, 2006 – Oct 16, 2006 libata

lore
Share & tools
lore
#0 lore raw

Tejun,

A while back you provided a patch for sata_sil to use PCI IO space since so that it can work on hardware that doesn't support byte-aligned MMIO.

I'd like to see a fix for this pushed upstream, but IIRC, Jeff Garzik prefers that the driver be fixed up to use 32-bit aligned MMIO instead of making the driver use IO space.

If you can point me in the right direction, as to where the byte-alignement assumtions are, I can fix up the driver and test it on my hardware.

Thanks,

Kevin

#1 lore raw

Hello, Kevin.

Quoted 5 lines · Kevin Hilman

Tejun,

A while back you provided a patch for sata_sil to use PCI IO space since so that it can work on hardware that doesn't support byte-aligned MMIO.

Quoted 7 lines

I'd like to see a fix for this pushed upstream, but IIRC, Jeff Garzik prefers that the driver be fixed up to use 32-bit aligned MMIO instead of making the driver use IO space.

If you can point me in the right direction, as to where the byte-alignement assumtions are, I can fix up the driver and test it on my hardware.

Byte-aligned IO accesses are in the default ATA operations - ata_tf_load/read, ata_check_status, ata_exec_command, ata_std_dev_select, all the bmdma ops, etc... Basically, traditional ATA interface is designed to use byte-aligned registers to operate.

sil3112 family of controllers allow all those ops implemented using 32bit ops, so you need to implement sata_sil's own methods to replace those standard byte-aligned ops. I don't think it's gonna be too difficult.

Good luck. :-)

Signature · 1 line
tejun
#2 lore raw
Quoted 12 lines · Tejun Heo

Hello, Kevin.

Quoted 9 lines · Kevin Hilman

Tejun,

A while back you provided a patch for sata_sil to use PCI IO space since so that it can work on hardware that doesn't support byte-aligned MMIO.

I'd like to see a fix for this pushed upstream, but IIRC, Jeff Garzik prefers that the driver be fixed up to use 32-bit aligned MMIO instead of making the driver use IO space.

Quoted 7 lines
Quoted 3 lines

If you can point me in the right direction, as to where the byte-alignement assumtions are, I can fix up the driver and test it on my hardware.

Byte-aligned IO accesses are in the default ATA operations - ata_tf_load/read, ata_check_status, ata_exec_command, ata_std_dev_select, all the bmdma ops, etc... Basically, traditional ATA interface is designed to use byte-aligned registers to operate.

sil3112 family of controllers allow all those ops implemented using 32bit ops, so you need to implement sata_sil's own methods to replace those standard byte-aligned ops. I don't think it's gonna be too difficult.

Oh, and just in case you don't have them already, the specs are available at the following URL.

http://gkernel.sourceforge.net/specs/sii/

Signature · 1 line
tejun