• Sergei Shtylyov's avatar
    libata-sff: fix 32-bit PIO ATAPI regression · d1b3525b
    Sergei Shtylyov authored
    Commit 871af121 (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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
    Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    d1b3525b
libata-sff.c 74.6 KB