tx4939ide: Do not use zero count PRD entry

This fixes data corruption on some heavy load.

Signed-off-by: Atsushi Nemoto <[email protected]>
Cc: stable <[email protected]>
Cc: [email protected]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
Atsushi Nemoto 2008-12-29 20:27:28 +01:00 • committed by Bartlomiej Zolnierkiewicz
commit a0fce792b5

View file

@ -259,6 +259,12 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, struct request *rq)
bcount = 0x10000 - (cur_addr & 0xffff);
if (bcount > cur_len)
bcount = cur_len;
/*
* This workaround for zero count seems required.
* (standard ide_build_dmatable do it too)
*/
if ((bcount & 0xffff) == 0x0000)
bcount = 0x8000;
*table++ = bcount & 0xffff;
*table++ = cur_addr;
cur_addr += bcount;