summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/stand
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-23 16:08:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-23 16:08:30 +0000
commit3ea8990ba9276efe1c2bbde129074f8dd9b8c992 (patch)
tree4b0acb5ebb80229ea6db55b8bd4907075e62e500 /sys/arch/hp300/stand
parent1eab03134bb87b4d08f22d23fbf469607f6cf05c (diff)
Avoid using DEV_BSHIFT, and use DEV_BSIZE instead.
Diffstat (limited to 'sys/arch/hp300/stand')
-rw-r--r--sys/arch/hp300/stand/common/scsi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/hp300/stand/common/scsi.c b/sys/arch/hp300/stand/common/scsi.c
index fb5321dd0d3..42bd5cc1ff8 100644
--- a/sys/arch/hp300/stand/common/scsi.c
+++ b/sys/arch/hp300/stand/common/scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi.c,v 1.8 2011/08/18 20:02:58 miod Exp $ */
+/* $OpenBSD: scsi.c,v 1.9 2013/03/23 16:08:28 deraadt Exp $ */
/* $NetBSD: scsi.c,v 1.7 1997/01/30 10:32:57 thorpej Exp $ */
/*
@@ -403,8 +403,8 @@ scsi_tt_read(int ctlr, int slave, u_char *buf, u_int len, daddr32_t blk,
cdb.lbahm = blk >> 16;
cdb.lbalm = blk >> 8;
cdb.lbal = blk;
- cdb.lenh = nblk >> (8 + DEV_BSHIFT);
- cdb.lenl = nblk >> DEV_BSHIFT;
+ cdb.lenh = nblk / (256 * DEV_BSIZE);
+ cdb.lenl = nblk / DEV_BSIZE;
return (scsiicmd(hs, slave, (u_char *)&cdb, sizeof(cdb),
buf, len, DATA_IN_PHASE));
}
@@ -422,8 +422,8 @@ scsi_tt_write(int ctlr, int slave, u_char *buf, u_int len, daddr32_t blk,
cdb.lbahm = blk >> 16;
cdb.lbalm = blk >> 8;
cdb.lbal = blk;
- cdb.lenh = nblk >> (8 + DEV_BSHIFT);
- cdb.lenl = nblk >> DEV_BSHIFT;
+ cdb.lenh = nblk / (256 * DEV_BSIZE);
+ cdb.lenl = nblk / DEV_BSIZE;
return (scsiicmd(hs, slave, (u_char *)&cdb, sizeof(cdb),
buf, len, DATA_OUT_PHASE));
}