aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-15 16:49:09 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-15 16:49:09 -0500
commit0938e7586440ac97cedc0f5528a8684ebfa4ce43 (patch)
tree3bdb55cb86b1ffb0bd136713eec975efae4cc651
parent7d2284b09fd967b5cad6f03c6d4a5c064f37b855 (diff)
parent121a09e590d54be840289c6feac840453aa999d9 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: correct handling of TSS DVD [libata] core checkpatch fix [libata] pata_bf54x: checkpatch fixes libata fixes for sparse-found problems
-rw-r--r--drivers/ata/libata-core.c4
-rw-r--r--drivers/ata/pata_bf54x.c3
-rw-r--r--drivers/ata/pata_legacy.c8
-rw-r--r--drivers/ata/pata_qdi.c8
-rw-r--r--drivers/ata/pata_winbond.c8
-rw-r--r--include/linux/ata.h2
6 files changed, 14 insertions, 19 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4753a1831dbc..6380726f7538 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6998,7 +6998,9 @@ int ata_host_start(struct ata_host *host)
6998 rc = ap->ops->port_start(ap); 6998 rc = ap->ops->port_start(ap);
6999 if (rc) { 6999 if (rc) {
7000 if (rc != -ENODEV) 7000 if (rc != -ENODEV)
7001 dev_printk(KERN_ERR, host->dev, "failed to start port %d (errno=%d)\n", i, rc); 7001 dev_printk(KERN_ERR, host->dev,
7002 "failed to start port %d "
7003 "(errno=%d)\n", i, rc);
7002 goto err_out; 7004 goto err_out;
7003 } 7005 }
7004 } 7006 }
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 088a41f4e656..7842cc487359 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1509,7 +1509,8 @@ static int __devinit bfin_atapi_probe(struct platform_device *pdev)
1509 if (res == NULL) 1509 if (res == NULL)
1510 return -EINVAL; 1510 return -EINVAL;
1511 1511
1512 while (bfin_port_info[board_idx].udma_mask>0 && udma_fsclk[udma_mode] > fsclk) { 1512 while (bfin_port_info[board_idx].udma_mask > 0 &&
1513 udma_fsclk[udma_mode] > fsclk) {
1513 udma_mode--; 1514 udma_mode--;
1514 bfin_port_info[board_idx].udma_mask >>= 1; 1515 bfin_port_info[board_idx].udma_mask >>= 1;
1515 } 1516 }
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 }
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 72ab80801ef6..e672e80202a8 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -554,8 +554,6 @@ static inline int ata_drive_40wire(const u16 *dev_id)
554 554
555static inline int ata_drive_40wire_relaxed(const u16 *dev_id) 555static inline int ata_drive_40wire_relaxed(const u16 *dev_id)
556{ 556{
557 if (ata_id_is_sata(dev_id))
558 return 0; /* SATA */
559 if ((dev_id[93] & 0x2000) == 0x2000) 557 if ((dev_id[93] & 0x2000) == 0x2000)
560 return 0; /* 80 wire */ 558 return 0; /* 80 wire */
561 return 1; 559 return 1;