diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/pata_legacy.c | 8 | ||||
-rw-r--r-- | drivers/ata/pata_qdi.c | 8 | ||||
-rw-r--r-- | drivers/ata/pata_winbond.c | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 7bed8d806381..17159b5e1e43 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -271,14 +271,12 @@ static void pdc_data_xfer_vlb(struct ata_device *adev, unsigned char *buf, unsig | |||
271 | ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); | 271 | ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); |
272 | 272 | ||
273 | if (unlikely(slop)) { | 273 | if (unlikely(slop)) { |
274 | u32 pad; | 274 | __le32 pad = 0; |
275 | if (write_data) { | 275 | if (write_data) { |
276 | memcpy(&pad, buf + buflen - slop, slop); | 276 | memcpy(&pad, buf + buflen - slop, slop); |
277 | pad = le32_to_cpu(pad); | 277 | iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr); |
278 | iowrite32(pad, ap->ioaddr.data_addr); | ||
279 | } else { | 278 | } else { |
280 | pad = ioread32(ap->ioaddr.data_addr); | 279 | pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); |
281 | pad = cpu_to_le16(pad); | ||
282 | memcpy(buf + buflen - slop, &pad, slop); | 280 | memcpy(buf + buflen - slop, &pad, slop); |
283 | } | 281 | } |
284 | } | 282 | } |
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index 7d4c696c4cb6..a4c0e502cb42 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -136,14 +136,12 @@ static void qdi_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned | |||
136 | ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); | 136 | ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); |
137 | 137 | ||
138 | if (unlikely(slop)) { | 138 | if (unlikely(slop)) { |
139 | u32 pad; | 139 | __le32 pad = 0; |
140 | if (write_data) { | 140 | if (write_data) { |
141 | memcpy(&pad, buf + buflen - slop, slop); | 141 | memcpy(&pad, buf + buflen - slop, slop); |
142 | pad = le32_to_cpu(pad); | 142 | iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr); |
143 | iowrite32(pad, ap->ioaddr.data_addr); | ||
144 | } else { | 143 | } else { |
145 | pad = ioread32(ap->ioaddr.data_addr); | 144 | pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); |
146 | pad = cpu_to_le32(pad); | ||
147 | memcpy(buf + buflen - slop, &pad, slop); | 145 | memcpy(buf + buflen - slop, &pad, slop); |
148 | } | 146 | } |
149 | } | 147 | } |
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c index 311cdb3a5566..7116a9e7a8b2 100644 --- a/drivers/ata/pata_winbond.c +++ b/drivers/ata/pata_winbond.c | |||
@@ -104,14 +104,12 @@ static void winbond_data_xfer(struct ata_device *adev, unsigned char *buf, unsig | |||
104 | ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); | 104 | ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); |
105 | 105 | ||
106 | if (unlikely(slop)) { | 106 | if (unlikely(slop)) { |
107 | u32 pad; | 107 | __le32 pad = 0; |
108 | if (write_data) { | 108 | if (write_data) { |
109 | memcpy(&pad, buf + buflen - slop, slop); | 109 | memcpy(&pad, buf + buflen - slop, slop); |
110 | pad = le32_to_cpu(pad); | 110 | iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr); |
111 | iowrite32(pad, ap->ioaddr.data_addr); | ||
112 | } else { | 111 | } else { |
113 | pad = ioread32(ap->ioaddr.data_addr); | 112 | pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); |
114 | pad = cpu_to_le16(pad); | ||
115 | memcpy(buf + buflen - slop, &pad, slop); | 113 | memcpy(buf + buflen - slop, &pad, slop); |
116 | } | 114 | } |
117 | } | 115 | } |