actually use the 64bits value when doing comparing, previously SCSI_6 were wronly used for some io requests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39301 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -136,13 +136,13 @@ read_write(scsi_periph_device_info *device, scsi_ccb *request,
|
|||||||
numBlocks = 0x100;
|
numBlocks = 0x100;
|
||||||
|
|
||||||
// no way to break the 21 bit address limit
|
// no way to break the 21 bit address limit
|
||||||
if (pos > 0x200000)
|
if (offset > 0x200000)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
// don't allow transfer cross the 24 bit address limit
|
// don't allow transfer cross the 24 bit address limit
|
||||||
// (I'm not sure whether this is allowed, but this way we
|
// (I'm not sure whether this is allowed, but this way we
|
||||||
// are sure to not ask for trouble)
|
// are sure to not ask for trouble)
|
||||||
if (pos < 0x100000)
|
if (offset < 0x100000)
|
||||||
numBlocks = min_c(numBlocks, 0x100000 - pos);
|
numBlocks = min_c(numBlocks, 0x100000 - pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ read_write(scsi_periph_device_info *device, scsi_ccb *request,
|
|||||||
(request->flags & SCSI_ORDERED_QTAG) != 0 ? "yes" : "no");
|
(request->flags & SCSI_ORDERED_QTAG) != 0 ? "yes" : "no");
|
||||||
|
|
||||||
// use shortest commands whenever possible
|
// use shortest commands whenever possible
|
||||||
if (pos + numBlocks < 0x200000 && numBlocks <= 0x100) {
|
if (offset + numBlocks < 0x200000LL && numBlocks <= 0x100) {
|
||||||
scsi_cmd_rw_6 *cmd = (scsi_cmd_rw_6 *)request->cdb;
|
scsi_cmd_rw_6 *cmd = (scsi_cmd_rw_6 *)request->cdb;
|
||||||
|
|
||||||
isReadWrite10 = false;
|
isReadWrite10 = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user