On SATA/PATA, libata and JMicron controllers

This might be useful for all of you oldtimers 🙂

I had an IDE HDD and IDE DVD drives connected on one stripe. The HDD was in the middle and the DVD was at the end of the cable due to “internal architecture” in my computer case. Again HDD was selected as a master and DVD as a slave using switches on the drives. Just like you’d do this in the old, <=UDMA33, times.

Everything went smoothly until I’ve upgraded my motherboard (+ CPU + RAM) to Asus P5B-V like six months ago. I’ve connected both drives to the single available IDE slot without changing their config.

Lately I’ve noticed “host 80-wire cable detection failed” messages in my logs (kernel 2.6.23) and wanted to switch completely to libata — as I have also bought a new SATA drive.

To my disappointment the pata_jmicron kernel libata/pata driver was only detecting the DVD. HDD went into driver oblivion.

Googling around showed that some people have similar problem – but it was about pata_jmicron not detecting their IDE DVD/CD drives; no one mentioned a problem when only one of the drives was not detected.

So I asked the LKML list about the pata_jmicron. Together we came to a solution (thanks!):

The ATA66 standard (80-wire cables) always considers the last drive on the cable as master. You can change it with switches and it will work… with old ATA driver. This is not the case with new libata. It conforms to the standard.

Conclusion: with ATA66 always use cable-select.

After changing drives configs to cable-select (I now boot off SATA drive) everything works perfectly. Goodbye ATA, welcome libata!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s