2009-03-15 14:56:39 +02:00
|
|
|
Per definition, this function should return the number of bytes
|
|
|
|
consumed. Also take care of the unlikely case when buflen is not a
|
|
|
|
multiple of four; while transferring, the division cuts the remaining
|
|
|
|
bytes, so alter the return value accordingly.
|
|
|
|
|
|
|
|
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
|
|
|
|
---
|
2009-05-04 14:35:08 +03:00
|
|
|
--- a/drivers/ata/pata_rb532_cf.c
|
|
|
|
+++ b/drivers/ata/pata_rb532_cf.c
|
|
|
|
@@ -88,7 +88,7 @@ static unsigned int rb532_pata_data_xfer
|
2009-03-15 14:56:39 +02:00
|
|
|
readsl(ioaddr, buf, buflen / sizeof(u32));
|
|
|
|
|
|
|
|
rb532_pata_finish_io(adev->link->ap);
|
|
|
|
- return retlen;
|
|
|
|
+ return buflen - (buflen % sizeof(u32));;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void rb532_pata_freeze(struct ata_port *ap)
|