diff options
author | simokawa <simokawa@FreeBSD.org> | 2002-11-06 15:34:52 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2002-11-06 15:34:52 +0000 |
commit | e6dea8f6330af598cd10c616e7e30614449c8d75 (patch) | |
tree | 3c887d977eb81e61b1ba5cb873289098e705cd2a | |
parent | 9e1dcedc4a371029357f988d57dce49db9ad0def (diff) | |
download | FreeBSD-src-e6dea8f6330af598cd10c616e7e30614449c8d75.zip FreeBSD-src-e6dea8f6330af598cd10c616e7e30614449c8d75.tar.gz |
Minor clean up on cdb handling.
-rw-r--r-- | sys/dev/firewire/sbp.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index 12e7fd7..d33d5a9 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])); |