aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_legacy.c10
-rw-r--r--drivers/ata/pata_qdi.c2
-rw-r--r--drivers/ata/pata_winbond.c2
3 files changed, 6 insertions, 8 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index fe7cc8ed4ea4..bc037ffce200 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -305,7 +305,7 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
305 iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); 305 iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
306 306
307 if (unlikely(slop)) { 307 if (unlikely(slop)) {
308 u32 pad; 308 __le32 pad;
309 if (rw == READ) { 309 if (rw == READ) {
310 pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); 310 pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
311 memcpy(buf + buflen - slop, &pad, slop); 311 memcpy(buf + buflen - slop, &pad, slop);
@@ -746,14 +746,12 @@ static unsigned int vlb32_data_xfer(struct ata_device *adev, unsigned char *buf,
746 ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); 746 ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
747 747
748 if (unlikely(slop)) { 748 if (unlikely(slop)) {
749 u32 pad; 749 __le32 pad;
750 if (rw == WRITE) { 750 if (rw == WRITE) {
751 memcpy(&pad, buf + buflen - slop, slop); 751 memcpy(&pad, buf + buflen - slop, slop);
752 pad = le32_to_cpu(pad); 752 iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr);
753 iowrite32(pad, ap->ioaddr.data_addr);
754 } else { 753 } else {
755 pad = ioread32(ap->ioaddr.data_addr); 754 pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
756 pad = cpu_to_le32(pad);
757 memcpy(buf + buflen - slop, &pad, slop); 755 memcpy(buf + buflen - slop, &pad, slop);
758 } 756 }
759 } 757 }
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c
index 97e5b090d7c2..63b7a1c165a5 100644
--- a/drivers/ata/pata_qdi.c
+++ b/drivers/ata/pata_qdi.c
@@ -137,7 +137,7 @@ static unsigned int qdi_data_xfer(struct ata_device *dev, unsigned char *buf,
137 iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); 137 iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
138 138
139 if (unlikely(slop)) { 139 if (unlikely(slop)) {
140 u32 pad; 140 __le32 pad;
141 if (rw == READ) { 141 if (rw == READ) {
142 pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); 142 pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
143 memcpy(buf + buflen - slop, &pad, slop); 143 memcpy(buf + buflen - slop, &pad, slop);
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
index 474528f8fe3d..a7606b044a61 100644
--- a/drivers/ata/pata_winbond.c
+++ b/drivers/ata/pata_winbond.c
@@ -105,7 +105,7 @@ static unsigned int winbond_data_xfer(struct ata_device *dev,
105 iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); 105 iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
106 106
107 if (unlikely(slop)) { 107 if (unlikely(slop)) {
108 u32 pad; 108 __le32 pad;
109 if (rw == READ) { 109 if (rw == READ) {
110 pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); 110 pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
111 memcpy(buf + buflen - slop, &pad, slop); 111 memcpy(buf + buflen - slop, &pad, slop);