Hello James,
On Thu, 2006-03-30 at 18:35 +0200, Ingo Flaschberger wrote:
+ sdev->max_xfer_len = 0xffff;
+ if (*bflags & BLIST_MAX_512K)
+ sdev->max_xfer_len = 0x200;
Where do you make the block layer see the effects of this?
Currently it seems all you do is truncate a READ10 or WRITE10 to a
maximum transfer size of 0x200. That means that we simply lie to the
block layer for transfers above 0x200 and say that it all completed when
we only transferred 0x200 blocks ... this is bound to cause data
corruption.
linux-2.6.16/drivers/scsi/sd.c
SCpnt->cmnd[14] = SCpnt->cmnd[15] = 0;
} else if ((this_count > 0xff) || (block > 0x1fffff) ||
SCpnt->device->use_10_for_rw) {
- if (this_count > 0xffff)
- this_count = 0xffff;
+ if (this_count > SCpnt->device->max_xfer_len)
+ this_count = SCpnt->device->max_xfer_len;
SCpnt->cmnd[0] += READ_10 - READ_6;
SCpnt->cmnd[1] |= blk_fua_rq(rq) ? 0x8 : 0;
Here, but only for the RA4x00.
bye,
Ingo
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html