aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHidetoshi Shimokawa <simokawa@FreeBSD.org>2002-11-06 15:34:52 +0000
committerHidetoshi Shimokawa <simokawa@FreeBSD.org>2002-11-06 15:34:52 +0000
commit1d3e59b1d36c476e8c0b1c2db8c2a1c51189d9cd (patch)
tree3c887d977eb81e61b1ba5cb873289098e705cd2a /sys
parenta54587ad70a0cafd5fecd6969b86bd012449192f (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/firewire/sbp.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index 12e7fd72e6f59..d33d5a9e8c80b 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -1755,6 +1755,7 @@ END_DEBUG
struct ccb_scsiio *csio;
struct sbp_ocb *ocb;
int s, speed;
+ void *cdb;
csio = &ccb->csio;
@@ -1823,15 +1824,13 @@ END_DEBUG
if (csio->ccb_h.flags & CAM_DATA_PHYS)
printf("sbp: CAM_DATA_PHYS\n");
- if (csio->ccb_h.flags & CAM_CDB_POINTER) {
- bcopy(csio->cdb_io.cdb_ptr,
- (void *)(uintptr_t)(volatile void *)&ocb->orb[5],
- (csio->cdb_len + 3) & ~0x3);
- } else {
- bcopy(&csio->cdb_io.cdb_bytes,
+ if (csio->ccb_h.flags & CAM_CDB_POINTER)
+ cdb = (void *)csio->cdb_io.cdb_ptr;
+ else
+ cdb = (void *)&csio->cdb_io.cdb_bytes;
+ bcopy(cdb,
(void *)(uintptr_t)(volatile void *)&ocb->orb[5],
- (csio->cdb_len + 3) &~0x3);
- }
+ csio->cdb_len);
/*
printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[0]), ntohl(ocb->orb[1]), ntohl(ocb->orb[2]), ntohl(ocb->orb[3]));
printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntohl(ocb->orb[6]), ntohl(ocb->orb[7]));