[patch 83/96] ide-iops: fix odd-length ATAPI PIO transfers

From: Greg KH
Date: Fri Mar 13 2009 - 20:47:41 EST


2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------

From: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>

commit a509538d4fb4f99cdf0a095213d57cc3b2347615 upstream.

Commit 9567b349f7e7dd7e2483db99ee8e4a6fe0caca38 (ide: merge ->atapi_*put_bytes
and ->ata_*put_data methods) introduced a regression WRT the odd-length ATAPI
PIO transfers -- the final word didn't get written (causing command timeouts).

Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/ide/ide-iops.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -325,6 +325,8 @@ void ide_output_data(ide_drive_t *drive,
u8 io_32bit = drive->io_32bit;
u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;

+ len++;
+
if (io_32bit) {
unsigned long uninitialized_var(flags);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/