--- 13_atapi_pio_trailing_data_handling/drivers/scsi/libata-core.c 2005-06-06 13:57:18.000000000 +0800 +++ 14_atapi_pio_odd_handling/drivers/scsi/libata-core.c 2005-06-06 14:54:36.000000000 +0800 @@ -2607,6 +2607,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;