summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorjmz <jmz@FreeBSD.org>1997-05-28 21:25:49 +0000
committerjmz <jmz@FreeBSD.org>1997-05-28 21:25:49 +0000
commitda224a236351fb025ae0ce9c73cd06a094cd3d9f (patch)
treeff425fea90a247f1e92f65d7e3a68fbe698a8fae /sys/scsi
parent9764a899d5975b7dd6451dc35844f7a0c4bfb1cd (diff)
downloadFreeBSD-src-da224a236351fb025ae0ce9c73cd06a094cd3d9f.zip
FreeBSD-src-da224a236351fb025ae0ce9c73cd06a094cd3d9f.tar.gz
The correct way to combine 2 4bit values into a 8bit one is (a<<4) | b, not
(a<<8) || b. The conical hat please!
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/worm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c
index 0519545..f568a43 100644
--- a/sys/scsi/worm.c
+++ b/sys/scsi/worm.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: worm.c,v 1.38 1997/05/10 12:12:47 joerg Exp $
+ * $Id: worm.c,v 1.39 1997/05/19 17:30:40 jmz Exp $
*/
#include "opt_bounce.h"
@@ -1137,11 +1137,11 @@ rf4100_prepare_track(struct scsi_link *sc_link, struct wormio_prepare_track *t)
return EINVAL;
dat.page.pages.page_0x21.isrc_i6_7 = bin2bcd(year);
if (t->ISRC_serial[0]) {
- dat.page.pages.page_0x21.isrc_i8_9 = ((t->ISRC_serial[0]-'0') << 8) ||
+ dat.page.pages.page_0x21.isrc_i8_9 = ((t->ISRC_serial[0]-'0') << 4) |
(t->ISRC_serial[1] - '0');
- dat.page.pages.page_0x21.isrc_i10_11 = ((t->ISRC_serial[2]-'0') << 8) ||
+ dat.page.pages.page_0x21.isrc_i10_11 = ((t->ISRC_serial[2]-'0') << 4) |
(t->ISRC_serial[3] - '0');
- dat.page.pages.page_0x21.isrc_i12_0 = (t->ISRC_serial[4] - '0' << 8);
+ dat.page.pages.page_0x21.isrc_i12_0 = (t->ISRC_serial[4] - '0' << 4);
}
scsi_uto3b(blk_len, dat.blk_desc.blklen);
@@ -1429,11 +1429,11 @@ hp4020i_prepare_track(struct scsi_link *sc_link, struct wormio_prepare_track *t)
return EINVAL;
dat.page.pages.page_0x21.isrc_i6_7 = bin2bcd(year);
if (t->ISRC_serial[0]) {
- dat.page.pages.page_0x21.isrc_i8_9 = ((t->ISRC_serial[0]-'0') << 8) ||
+ dat.page.pages.page_0x21.isrc_i8_9 = ((t->ISRC_serial[0]-'0') << 4) |
(t->ISRC_serial[1] - '0');
- dat.page.pages.page_0x21.isrc_i10_11 = ((t->ISRC_serial[2]-'0') << 8) ||
+ dat.page.pages.page_0x21.isrc_i10_11 = ((t->ISRC_serial[2]-'0') << 4) |
(t->ISRC_serial[3] - '0');
- dat.page.pages.page_0x21.isrc_i12_0 = (t->ISRC_serial[4] - '0' << 8);
+ dat.page.pages.page_0x21.isrc_i12_0 = (t->ISRC_serial[4] - '0' << 4);
}
scsi_uto3b(blk_len, dat.blk_desc.blklen);
OpenPOWER on IntegriCloud