Resubmit since the offset changed by patch 4/5. Also changed printk() in previous patch to DPRINTK().
Albert
Signed-off-by: Albert Lee <[EMAIL PROTECTED]> --------------------------------------- --- libata-2.6-extrabytes/drivers/scsi/libata-core.c 2005-03-29 20:23:24.000000000 +0800 +++ libata-2.6-odd/drivers/scsi/libata-core.c 2005-03-29 20:51:52.000000000 +0800 @@ -2370,6 +2370,13 @@ /* don't cross page boundaries */ count = min(count, (unsigned int)PAGE_SIZE - offset);
+ /* handle the odd condition */ + if (unlikely(count & 0x01)) { + DPRINTK("ata%u: odd count %u rounded: qc->nbytes %u, bytes %u\n", + ap->id, count, qc->nbytes, bytes); + count++; + } + buf = kmap(page) + offset;
qc->curbytes += count;
--- libata-2.6-extrabytes/drivers/scsi/libata-core.c 2005-03-29 20:23:24.000000000 +0800 +++ libata-2.6-odd/drivers/scsi/libata-core.c 2005-03-29 20:51:52.000000000 +0800 @@ -2370,6 +2370,13 @@ /* don't cross page boundaries */ count = min(count, (unsigned int)PAGE_SIZE - offset); + /* handle the odd condition */ + if (unlikely(count & 0x01)) { + DPRINTK("ata%u: odd count %u rounded: qc->nbytes %u, bytes %u\n", + ap->id, count, qc->nbytes, bytes); + count++; + } + buf = kmap(page) + offset; qc->curbytes += count;