aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/pata_legacy.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-01 12:48:28 +0100
committerIngo Molnar <mingo@elte.hu>2009-03-01 12:48:28 +0100
commit645af4e9e0e32481e3336dda813688732c7e5f0f (patch)
tree931b31f3b6e0879df0f9a1d58ffd040d9a652f2e /drivers/ata/pata_legacy.c
parentecc25fbd6b9e07b33895c61ddf84006b00f55d99 (diff)
parent55f2b78995826d549401bdf20abeac1832636bb6 (diff)
Merge branch 'x86/pat' into x86/core
Diffstat (limited to 'drivers/ata/pata_legacy.c')
-rw-r--r--drivers/ata/pata_legacy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 6c1d778b63a..e3bc1b43628 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -283,9 +283,10 @@ static void pdc20230_set_piomode(struct ata_port *ap, struct ata_device *adev)
static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
unsigned char *buf, unsigned int buflen, int rw)
{
- if (ata_id_has_dword_io(dev->id)) {
+ int slop = buflen & 3;
+ /* 32bit I/O capable *and* we need to write a whole number of dwords */
+ if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)) {
struct ata_port *ap = dev->link->ap;
- int slop = buflen & 3;
unsigned long flags;
local_irq_save(flags);
@@ -735,7 +736,7 @@ static unsigned int vlb32_data_xfer(struct ata_device *adev, unsigned char *buf,
struct ata_port *ap = adev->link->ap;
int slop = buflen & 3;
- if (ata_id_has_dword_io(adev->id)) {
+ if (ata_id_has_dword_io(adev->id) && (slop == 0 || slop == 3)) {
if (rw == WRITE)
iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
else