]> git.baikalelectronics.ru Git - kernel.git/commit
libata-sff: fix 32-bit PIO ATAPI regression
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Sun, 15 Feb 2009 19:24:24 +0000 (23:24 +0400)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 16 Feb 2009 23:55:56 +0000 (18:55 -0500)
commit9d58aab3b83ec621351d3a91d65e8a5a35b55673
treee8b55a52e5a57f92b997f84365fa9a72ded106c8
parent036031e6cb98560dcf726c26f1bd528a9c9eef75
libata-sff: fix 32-bit PIO ATAPI regression

Commit 9fa7ab3fa380cbf81207a2e4c7fee013c42a0749 (libata: Add 32bit
PIO support) has caused all kinds of errors on the ATAPI devices, so
it has been empirically proven that one shouldn't try to read/write
an extra data word when a device is not expecting it already. "Don't
do it then"; however, still use a chance to do 32-bit read/write one
last time when there are exactly 3 trailing bytes.

Oh, and stop pointlessly swapping the bytes to and fro on big-endian
machines by using io*_rep() accessors which shouldn't byte-swap.

This patch should fix the kernel.org bug #12609.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-sff.c