summaryrefslogtreecommitdiff
path: root/sys/cam/ctl/scsi_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/ctl/scsi_ctl.c')
-rw-r--r--sys/cam/ctl/scsi_ctl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c
index 15912e2ae3d7..655afd839981 100644
--- a/sys/cam/ctl/scsi_ctl.c
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -400,6 +400,7 @@ ctlfeasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg)
*/
port->max_targets = cpi->max_target;
port->max_target_id = cpi->max_target;
+ port->targ_port = -1;
/*
* XXX KDM need to figure out whether we're the master or
@@ -1164,9 +1165,8 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb)
* down the immediate notify path below.
*/
io->io_hdr.io_type = CTL_IO_SCSI;
- io->io_hdr.nexus.initid.id = atio->init_id;
+ io->io_hdr.nexus.initid = atio->init_id;
io->io_hdr.nexus.targ_port = bus_softc->port.targ_port;
- io->io_hdr.nexus.targ_target.id = atio->ccb_h.target_id;
io->io_hdr.nexus.targ_lun = atio->ccb_h.target_lun;
io->scsiio.tag_num = atio->tag_id;
switch (atio->tag_action) {
@@ -1200,10 +1200,9 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb)
io->scsiio.cdb_len);
#ifdef CTLFEDEBUG
- printf("%s: %ju:%d:%ju:%d: tag %04x CDB %02x\n", __func__,
- (uintmax_t)io->io_hdr.nexus.initid.id,
+ printf("%s: %u:%u:%u: tag %04x CDB %02x\n", __func__,
+ io->io_hdr.nexus.initid,
io->io_hdr.nexus.targ_port,
- (uintmax_t)io->io_hdr.nexus.targ_target.id,
io->io_hdr.nexus.targ_lun,
io->scsiio.tag_num, io->scsiio.cdb[0]);
#endif
@@ -1440,9 +1439,8 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb)
io->io_hdr.io_type = CTL_IO_TASK;
io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr =done_ccb;
inot->ccb_h.io_ptr = io;
- io->io_hdr.nexus.initid.id = inot->initiator_id;
+ io->io_hdr.nexus.initid = inot->initiator_id;
io->io_hdr.nexus.targ_port = bus_softc->port.targ_port;
- io->io_hdr.nexus.targ_target.id = inot->ccb_h.target_id;
io->io_hdr.nexus.targ_lun = inot->ccb_h.target_lun;
/* XXX KDM should this be the tag_id? */
io->taskio.tag_num = inot->seq_id;