Adjust various SCSI drivers to handle either a 32-bit or 64-bit lun_id_t,
mostly by adjustments to debugging printf() format specifiers. For high numbered LUNs, also switch to printing them in hex as per SAM-5. MFC after: 2 weeks
This commit is contained in:
parent
99720b455b
commit
14bec3e026
@ -957,9 +957,9 @@ static void arcmsr_iop_reset(struct AdapterControlBlock *acb)
|
||||
srb->srb_state = ARCMSR_SRB_ABORTED;
|
||||
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
|
||||
arcmsr_srb_complete(srb, 1);
|
||||
printf("arcmsr%d: scsi id=%d lun=%d srb='%p' aborted\n"
|
||||
printf("arcmsr%d: scsi id=%d lun=%jx srb='%p' aborted\n"
|
||||
, acb->pci_unit, srb->pccb->ccb_h.target_id
|
||||
, srb->pccb->ccb_h.target_lun, srb);
|
||||
, (uintmax_t)srb->pccb->ccb_h.target_lun, srb);
|
||||
}
|
||||
}
|
||||
/* enable all outbound interrupt */
|
||||
@ -2736,10 +2736,10 @@ static u_int8_t arcmsr_seek_cmd2abort(union ccb *abortccb)
|
||||
if(srb->srb_state == ARCMSR_SRB_START) {
|
||||
if(srb->pccb == abortccb) {
|
||||
srb->srb_state = ARCMSR_SRB_ABORTED;
|
||||
printf("arcmsr%d:scsi id=%d lun=%d abort srb '%p'"
|
||||
printf("arcmsr%d:scsi id=%d lun=%jx abort srb '%p'"
|
||||
"outstanding command \n"
|
||||
, acb->pci_unit, abortccb->ccb_h.target_id
|
||||
, abortccb->ccb_h.target_lun, srb);
|
||||
, (uintmax_t)abortccb->ccb_h.target_lun, srb);
|
||||
arcmsr_polling_srbdone(acb, srb);
|
||||
/* enable outbound Post Queue, outbound doorbell Interrupt */
|
||||
arcmsr_enable_allintr(acb, intmask_org);
|
||||
@ -3176,11 +3176,11 @@ static void arcmsr_polling_hba_srbdone(struct AdapterControlBlock *acb, struct C
|
||||
poll_srb_done = (srb == poll_srb) ? 1:0;
|
||||
if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
|
||||
if(srb->srb_state == ARCMSR_SRB_ABORTED) {
|
||||
printf("arcmsr%d: scsi id=%d lun=%d srb='%p'"
|
||||
printf("arcmsr%d: scsi id=%d lun=%jx srb='%p'"
|
||||
"poll command abort successfully \n"
|
||||
, acb->pci_unit
|
||||
, srb->pccb->ccb_h.target_id
|
||||
, srb->pccb->ccb_h.target_lun, srb);
|
||||
, (uintmax_t)srb->pccb->ccb_h.target_lun, srb);
|
||||
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
|
||||
arcmsr_srb_complete(srb, 1);
|
||||
continue;
|
||||
@ -3236,11 +3236,11 @@ static void arcmsr_polling_hbb_srbdone(struct AdapterControlBlock *acb, struct C
|
||||
poll_srb_done = (srb == poll_srb) ? 1:0;
|
||||
if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
|
||||
if(srb->srb_state == ARCMSR_SRB_ABORTED) {
|
||||
printf("arcmsr%d: scsi id=%d lun=%d srb='%p'"
|
||||
printf("arcmsr%d: scsi id=%d lun=%jx srb='%p'"
|
||||
"poll command abort successfully \n"
|
||||
, acb->pci_unit
|
||||
, srb->pccb->ccb_h.target_id
|
||||
, srb->pccb->ccb_h.target_lun, srb);
|
||||
, (uintmax_t)srb->pccb->ccb_h.target_lun, srb);
|
||||
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
|
||||
arcmsr_srb_complete(srb, 1);
|
||||
continue;
|
||||
@ -3291,8 +3291,8 @@ static void arcmsr_polling_hbc_srbdone(struct AdapterControlBlock *acb, struct C
|
||||
poll_srb_done = (srb == poll_srb) ? 1:0;
|
||||
if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
|
||||
if(srb->srb_state == ARCMSR_SRB_ABORTED) {
|
||||
printf("arcmsr%d: scsi id=%d lun=%d srb='%p'poll command abort successfully \n"
|
||||
, acb->pci_unit, srb->pccb->ccb_h.target_id, srb->pccb->ccb_h.target_lun, srb);
|
||||
printf("arcmsr%d: scsi id=%d lun=%jx srb='%p'poll command abort successfully \n"
|
||||
, acb->pci_unit, srb->pccb->ccb_h.target_id, (uintmax_t)srb->pccb->ccb_h.target_lun, srb);
|
||||
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
|
||||
arcmsr_srb_complete(srb, 1);
|
||||
continue;
|
||||
@ -3347,8 +3347,8 @@ static void arcmsr_polling_hbd_srbdone(struct AdapterControlBlock *acb, struct C
|
||||
poll_srb_done = (srb == poll_srb) ? 1:0;
|
||||
if((srb->acb != acb) || (srb->srb_state != ARCMSR_SRB_START)) {
|
||||
if(srb->srb_state == ARCMSR_SRB_ABORTED) {
|
||||
printf("arcmsr%d: scsi id=%d lun=%d srb='%p'poll command abort successfully \n"
|
||||
, acb->pci_unit, srb->pccb->ccb_h.target_id, srb->pccb->ccb_h.target_lun, srb);
|
||||
printf("arcmsr%d: scsi id=%d lun=%jx srb='%p'poll command abort successfully \n"
|
||||
, acb->pci_unit, srb->pccb->ccb_h.target_id, (uintmax_t)srb->pccb->ccb_h.target_lun, srb);
|
||||
srb->pccb->ccb_h.status |= CAM_REQ_ABORTED;
|
||||
arcmsr_srb_complete(srb, 1);
|
||||
continue;
|
||||
|
@ -2740,12 +2740,13 @@ asr_action(struct cam_sim *sim, union ccb *ccb)
|
||||
}
|
||||
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG) {
|
||||
printf(
|
||||
"asr%d WARNING: scsi_cmd(%x) already done on b%dt%du%d\n",
|
||||
"asr%d WARNING: scsi_cmd(%x) already done on b%dt%d "
|
||||
"LUN %jx\n",
|
||||
cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)),
|
||||
ccb->csio.cdb_io.cdb_bytes[0],
|
||||
cam_sim_bus(sim),
|
||||
ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun);
|
||||
(uintmax_t)ccb->ccb_h.target_lun);
|
||||
}
|
||||
debug_asr_cmd_printf("(%d,%d,%d,%d)", cam_sim_unit(sim),
|
||||
cam_sim_bus(sim), ccb->ccb_h.target_id,
|
||||
|
@ -1493,12 +1493,13 @@ sbp_print_scsi_cmd(struct sbp_ocb *ocb)
|
||||
struct ccb_scsiio *csio;
|
||||
|
||||
csio = &ocb->ccb->csio;
|
||||
printf("%s:%d:%d XPT_SCSI_IO: "
|
||||
printf("%s:%d:%jx XPT_SCSI_IO: "
|
||||
"cmd: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x"
|
||||
", flags: 0x%02x, "
|
||||
"%db cmd/%db data/%db sense\n",
|
||||
device_get_nameunit(ocb->sdev->target->sbp->fd.dev),
|
||||
ocb->ccb->ccb_h.target_id, ocb->ccb->ccb_h.target_lun,
|
||||
ocb->ccb->ccb_h.target_id,
|
||||
(uintmax_t)ocb->ccb->ccb_h.target_lun,
|
||||
csio->cdb_io.cdb_bytes[0],
|
||||
csio->cdb_io.cdb_bytes[1],
|
||||
csio->cdb_io.cdb_bytes[2],
|
||||
@ -2354,8 +2355,8 @@ sbp_action1(struct cam_sim *sim, union ccb *ccb)
|
||||
|
||||
SBP_DEBUG(1)
|
||||
if (sdev == NULL)
|
||||
printf("invalid target %d lun %d\n",
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun);
|
||||
printf("invalid target %d lun %jx\n",
|
||||
ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun);
|
||||
END_DEBUG
|
||||
|
||||
switch (ccb->ccb_h.func_code) {
|
||||
@ -2366,10 +2367,11 @@ END_DEBUG
|
||||
case XPT_CALC_GEOMETRY:
|
||||
if (sdev == NULL) {
|
||||
SBP_DEBUG(1)
|
||||
printf("%s:%d:%d:func_code 0x%04x: "
|
||||
printf("%s:%d:%jx:func_code 0x%04x: "
|
||||
"Invalid target (target needed)\n",
|
||||
device_get_nameunit(sbp->fd.dev),
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.target_id,
|
||||
(uintmax_t)ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.func_code);
|
||||
END_DEBUG
|
||||
|
||||
@ -2387,10 +2389,11 @@ END_DEBUG
|
||||
if (sbp == NULL &&
|
||||
ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) {
|
||||
SBP_DEBUG(0)
|
||||
printf("%s:%d:%d func_code 0x%04x: "
|
||||
printf("%s:%d:%jx func_code 0x%04x: "
|
||||
"Invalid target (no wildcard)\n",
|
||||
device_get_nameunit(sbp->fd.dev),
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.target_id,
|
||||
(uintmax_t)ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.func_code);
|
||||
END_DEBUG
|
||||
ccb->ccb_h.status = CAM_DEV_NOT_THERE;
|
||||
@ -2415,12 +2418,12 @@ END_DEBUG
|
||||
mtx_assert(sim->mtx, MA_OWNED);
|
||||
|
||||
SBP_DEBUG(2)
|
||||
printf("%s:%d:%d XPT_SCSI_IO: "
|
||||
printf("%s:%d:%jx XPT_SCSI_IO: "
|
||||
"cmd: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x"
|
||||
", flags: 0x%02x, "
|
||||
"%db cmd/%db data/%db sense\n",
|
||||
device_get_nameunit(sbp->fd.dev),
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun,
|
||||
csio->cdb_io.cdb_bytes[0],
|
||||
csio->cdb_io.cdb_bytes[1],
|
||||
csio->cdb_io.cdb_bytes[2],
|
||||
@ -2521,7 +2524,7 @@ printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntoh
|
||||
break;
|
||||
}
|
||||
SBP_DEBUG(1)
|
||||
printf("%s:%d:%d:%d:XPT_CALC_GEOMETRY: "
|
||||
printf("%s:%d:%d:%jx:XPT_CALC_GEOMETRY: "
|
||||
#if defined(__DragonFly__) || __FreeBSD_version < 500000
|
||||
"Volume size = %d\n",
|
||||
#else
|
||||
@ -2529,7 +2532,7 @@ SBP_DEBUG(1)
|
||||
#endif
|
||||
device_get_nameunit(sbp->fd.dev),
|
||||
cam_sim_path(sbp->sim),
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun,
|
||||
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
|
||||
(uintmax_t)
|
||||
#endif
|
||||
@ -2573,9 +2576,9 @@ END_DEBUG
|
||||
struct ccb_pathinq *cpi = &ccb->cpi;
|
||||
|
||||
SBP_DEBUG(1)
|
||||
printf("%s:%d:%d XPT_PATH_INQ:.\n",
|
||||
printf("%s:%d:%jx XPT_PATH_INQ:.\n",
|
||||
device_get_nameunit(sbp->fd.dev),
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun);
|
||||
ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun);
|
||||
END_DEBUG
|
||||
cpi->version_num = 1; /* XXX??? */
|
||||
cpi->hba_inquiry = PI_TAG_ABLE;
|
||||
@ -2617,9 +2620,9 @@ END_DEBUG
|
||||
scsi->valid = CTS_SCSI_VALID_TQ;
|
||||
scsi->flags = CTS_SCSI_FLAGS_TAG_ENB;
|
||||
SBP_DEBUG(1)
|
||||
printf("%s:%d:%d XPT_GET_TRAN_SETTINGS:.\n",
|
||||
printf("%s:%d:%jx XPT_GET_TRAN_SETTINGS:.\n",
|
||||
device_get_nameunit(sbp->fd.dev),
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun);
|
||||
ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun);
|
||||
END_DEBUG
|
||||
cts->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
|
@ -2641,10 +2641,10 @@ static void hptiop_post_scsi_command(void *arg, bus_dma_segment_t *segs,
|
||||
struct hpt_iop_hba *hba = srb->hba;
|
||||
|
||||
if (error || nsegs > hba->max_sg_count) {
|
||||
KdPrint(("hptiop: func_code=%x tid=%x lun=%x nsegs=%d\n",
|
||||
KdPrint(("hptiop: func_code=%x tid=%x lun=%jx nsegs=%d\n",
|
||||
ccb->ccb_h.func_code,
|
||||
ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun, nsegs));
|
||||
(uintmax_t)ccb->ccb_h.target_lun, nsegs));
|
||||
ccb->ccb_h.status = CAM_BUSY;
|
||||
bus_dmamap_unload(hba->io_dmat, srb->dma_map);
|
||||
hptiop_free_srb(hba, srb);
|
||||
|
@ -63,7 +63,7 @@ _inq(struct cam_sim *sim, union ccb *ccb)
|
||||
isc_session_t *sp = cam_sim_softc(sim);
|
||||
|
||||
debug_called(8);
|
||||
debug(3, "sid=%d target=%d lun=%d", sp->sid, ccb->ccb_h.target_id, ccb->ccb_h.target_lun);
|
||||
debug(3, "sid=%d target=%d lun=%jx", sp->sid, ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun);
|
||||
|
||||
cpi->version_num = 1; /* XXX??? */
|
||||
cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE | PI_WIDE_32;
|
||||
@ -188,9 +188,9 @@ ic_action(struct cam_sim *sim, union ccb *ccb)
|
||||
debug_called(8);
|
||||
|
||||
ccb_h->spriv_ptr0 = sp;
|
||||
sdebug(4, "func_code=0x%x flags=0x%x status=0x%x target=%d lun=%d retry_count=%d timeout=%d",
|
||||
sdebug(4, "func_code=0x%x flags=0x%x status=0x%x target=%d lun=%jx retry_count=%d timeout=%d",
|
||||
ccb_h->func_code, ccb->ccb_h.flags, ccb->ccb_h.status,
|
||||
ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.retry_count, ccb_h->timeout);
|
||||
if(sp == NULL) {
|
||||
xdebug("sp == NULL! cannot happen");
|
||||
@ -235,8 +235,8 @@ ic_action(struct cam_sim *sim, union ccb *ccb)
|
||||
struct ccb_calc_geometry *ccg;
|
||||
|
||||
ccg = &ccb->ccg;
|
||||
debug(4, "sid=%d target=%d lun=%d XPT_CALC_GEOMETRY vsize=%jd bsize=%d",
|
||||
sp->sid, ccb->ccb_h.target_id, ccb->ccb_h.target_lun,
|
||||
debug(4, "sid=%d target=%d lun=%jx XPT_CALC_GEOMETRY vsize=%jd bsize=%d",
|
||||
sp->sid, ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_lun,
|
||||
ccg->volume_size, ccg->block_size);
|
||||
if(ccg->block_size == 0 ||
|
||||
(ccg->volume_size < ccg->block_size)) {
|
||||
|
@ -1382,7 +1382,7 @@ isp_enable_deferred(ispsoftc_t *isp, int bus, lun_id_t lun)
|
||||
int luns_already_enabled;
|
||||
|
||||
ISP_GET_PC(isp, bus, tm_luns_enabled, luns_already_enabled);
|
||||
isp_prt(isp, ISP_LOGTINFO, "%s: bus %d lun %u luns_enabled %d", __func__, bus, lun, luns_already_enabled);
|
||||
isp_prt(isp, ISP_LOGTINFO, "%s: bus %d lun %jx luns_enabled %d", __func__, bus, (uintmax_t)lun, luns_already_enabled);
|
||||
if (IS_24XX(isp) || (IS_FC(isp) && luns_already_enabled)) {
|
||||
status = CAM_REQ_CMP;
|
||||
} else {
|
||||
@ -1406,7 +1406,7 @@ isp_enable_deferred(ispsoftc_t *isp, int bus, lun_id_t lun)
|
||||
}
|
||||
if (status == CAM_REQ_CMP) {
|
||||
ISP_SET_PC(isp, bus, tm_luns_enabled, 1);
|
||||
isp_prt(isp, ISP_LOGCONFIG|ISP_LOGTINFO, "bus %d lun %u now enabled for target mode", bus, lun);
|
||||
isp_prt(isp, ISP_LOGCONFIG|ISP_LOGTINFO, "bus %d lun %jx now enabled for target mode", bus, (uintmax_t)lun);
|
||||
}
|
||||
return (status);
|
||||
}
|
||||
@ -2362,7 +2362,7 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep)
|
||||
if (tptr == NULL) {
|
||||
tptr = get_lun_statep(isp, 0, CAM_LUN_WILDCARD);
|
||||
if (tptr == NULL) {
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: [0x%x] no state pointer for lun %d or wildcard", __func__, aep->at_rxid, lun);
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: [0x%x] no state pointer for lun %jx or wildcard", __func__, aep->at_rxid, (uintmax_t)lun);
|
||||
if (lun == 0) {
|
||||
isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0);
|
||||
} else {
|
||||
@ -2484,7 +2484,7 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep)
|
||||
atp->tattr = aep->at_taskflags & ATIO2_TC_ATTR_MASK;
|
||||
atp->state = ATPD_STATE_CAM;
|
||||
xpt_done((union ccb *)atiop);
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "ATIO2[0x%x] CDB=0x%x lun %d datalen %u", aep->at_rxid, atp->cdb0, lun, atp->orig_datalen);
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "ATIO2[0x%x] CDB=0x%x lun %jx datalen %u", aep->at_rxid, atp->cdb0, (uintmax_t)lun, atp->orig_datalen);
|
||||
rls_lun_statep(isp, tptr);
|
||||
return;
|
||||
noresrc:
|
||||
@ -3420,13 +3420,13 @@ isp_handle_platform_target_tmf(ispsoftc_t *isp, isp_notify_t *notify)
|
||||
if (tptr == NULL) {
|
||||
tptr = get_lun_statep(isp, notify->nt_channel, CAM_LUN_WILDCARD);
|
||||
if (tptr == NULL) {
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: no state pointer found for chan %d lun 0x%x", __func__, notify->nt_channel, lun);
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: no state pointer found for chan %d lun %#jx", __func__, notify->nt_channel, (uintmax_t)lun);
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
inot = (struct ccb_immediate_notify *) SLIST_FIRST(&tptr->inots);
|
||||
if (inot == NULL) {
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: out of immediate notify structures for chan %d lun 0x%x", __func__, notify->nt_channel, lun);
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: out of immediate notify structures for chan %d lun %#jx", __func__, notify->nt_channel, (uintmax_t)lun);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
@ -3460,7 +3460,7 @@ isp_handle_platform_target_tmf(ispsoftc_t *isp, isp_notify_t *notify)
|
||||
inot->arg = MSG_TARGET_RESET;
|
||||
break;
|
||||
default:
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: unknown TMF code 0x%x for chan %d lun 0x%x", __func__, notify->nt_ncode, notify->nt_channel, lun);
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: unknown TMF code 0x%x for chan %d lun %#jx", __func__, notify->nt_ncode, notify->nt_channel, (uintmax_t)lun);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
@ -5187,7 +5187,7 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
|
||||
} else {
|
||||
*dptr &= ~DPARM_SYNC;
|
||||
}
|
||||
isp_prt(isp, ISP_LOGDEBUG0, "SET (%d.%d.%d) to flags %x off %x per %x", bus, tgt, cts->ccb_h.target_lun, sdp->isp_devparam[tgt].goal_flags,
|
||||
isp_prt(isp, ISP_LOGDEBUG0, "SET (%d.%d.%jx) to flags %x off %x per %x", bus, tgt, (uintmax_t)cts->ccb_h.target_lun, sdp->isp_devparam[tgt].goal_flags,
|
||||
sdp->isp_devparam[tgt].goal_offset, sdp->isp_devparam[tgt].goal_period);
|
||||
sdp->isp_devparam[tgt].dev_update = 1;
|
||||
sdp->update = 1;
|
||||
@ -5276,8 +5276,8 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
|
||||
}
|
||||
spi->valid |= CTS_SPI_VALID_DISC;
|
||||
}
|
||||
isp_prt(isp, ISP_LOGDEBUG0, "GET %s (%d.%d.%d) to flags %x off %x per %x", IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM",
|
||||
bus, tgt, cts->ccb_h.target_lun, dval, oval, pval);
|
||||
isp_prt(isp, ISP_LOGDEBUG0, "GET %s (%d.%d.%jx) to flags %x off %x per %x", IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM",
|
||||
bus, tgt, (uintmax_t)cts->ccb_h.target_lun, dval, oval, pval);
|
||||
}
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
|
@ -504,7 +504,7 @@ default: \
|
||||
#define XS_ISP(ccb) cam_sim_softc(xpt_path_sim((ccb)->ccb_h.path))
|
||||
#define XS_CHANNEL(ccb) cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path))
|
||||
#define XS_TGT(ccb) (ccb)->ccb_h.target_id
|
||||
#define XS_LUN(ccb) (ccb)->ccb_h.target_lun
|
||||
#define XS_LUN(ccb) (uint32_t)((ccb)->ccb_h.target_lun)
|
||||
|
||||
#define XS_CDBP(ccb) \
|
||||
(((ccb)->ccb_h.flags & CAM_CDB_POINTER)? \
|
||||
|
@ -1063,8 +1063,8 @@ mpssas_announce_reset(struct mps_softc *sc, uint32_t ac_code,
|
||||
path_id_t path_id = cam_sim_path(sc->sassc->sim);
|
||||
struct cam_path *path;
|
||||
|
||||
mps_dprint(sc, MPS_XINFO, "%s code %x target %d lun %d\n", __func__,
|
||||
ac_code, target_id, lun_id);
|
||||
mps_dprint(sc, MPS_XINFO, "%s code %x target %d lun %jx\n", __func__,
|
||||
ac_code, target_id, (uintmax_t)lun_id);
|
||||
|
||||
if (xpt_create_path(&path, NULL,
|
||||
path_id, target_id, lun_id) != CAM_REQ_CMP) {
|
||||
|
@ -2203,8 +2203,8 @@ mpt_start(struct cam_sim *sim, union ccb *ccb)
|
||||
"read" : "write", csio->dxfer_len,
|
||||
(csio->dxfer_len == 1)? ")" : "s)");
|
||||
}
|
||||
mpt_prtc(mpt, "tgt %u lun %u req %p:%u\n", tgt,
|
||||
ccb->ccb_h.target_lun, req, req->serno);
|
||||
mpt_prtc(mpt, "tgt %u lun %jx req %p:%u\n", tgt,
|
||||
(uintmax_t)ccb->ccb_h.target_lun, req, req->serno);
|
||||
}
|
||||
|
||||
error = bus_dmamap_load_ccb(mpt->buffer_dmat, req->dmap, ccb, cb,
|
||||
@ -2978,8 +2978,8 @@ mpt_fc_els_reply_handler(struct mpt_softc *mpt, request_t *req,
|
||||
ccb = tgt->ccb;
|
||||
if (ccb) {
|
||||
mpt_prt(mpt,
|
||||
"CCB (%p): lun %u flags %x status %x\n",
|
||||
ccb, ccb->ccb_h.target_lun,
|
||||
"CCB (%p): lun %jx flags %x status %x\n",
|
||||
ccb, (uintmax_t)ccb->ccb_h.target_lun,
|
||||
ccb->ccb_h.flags, ccb->ccb_h.status);
|
||||
}
|
||||
mpt_prt(mpt, "target state 0x%x resid %u xfrd %u rpwrd "
|
||||
@ -3698,12 +3698,12 @@ mpt_action(struct cam_sim *sim, union ccb *ccb)
|
||||
}
|
||||
if (ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) {
|
||||
mpt_lprt(mpt, MPT_PRT_DEBUG1,
|
||||
"Put FREE ATIO %p lun %d\n", ccb, lun);
|
||||
"Put FREE ATIO %p lun %jx\n", ccb, (uintmax_t)lun);
|
||||
STAILQ_INSERT_TAIL(&trtp->atios, &ccb->ccb_h,
|
||||
sim_links.stqe);
|
||||
} else if (ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) {
|
||||
mpt_lprt(mpt, MPT_PRT_DEBUG1,
|
||||
"Put FREE INOT lun %d\n", lun);
|
||||
"Put FREE INOT lun %jx\n", (uintmax_t)lun);
|
||||
STAILQ_INSERT_TAIL(&trtp->inots, &ccb->ccb_h,
|
||||
sim_links.stqe);
|
||||
} else {
|
||||
@ -4866,7 +4866,8 @@ mpt_scsi_tgt_tsk_mgmt(struct mpt_softc *mpt, request_t *req, mpt_task_mgmt_t fc,
|
||||
}
|
||||
STAILQ_REMOVE_HEAD(&trtp->inots, sim_links.stqe);
|
||||
mpt_lprt(mpt, MPT_PRT_DEBUG1,
|
||||
"Get FREE INOT %p lun %d\n", inot, inot->ccb_h.target_lun);
|
||||
"Get FREE INOT %p lun %jx\n", inot,
|
||||
(uintmax_t)inot->ccb_h.target_lun);
|
||||
|
||||
inot->initiator_id = init_id; /* XXX */
|
||||
/*
|
||||
@ -5093,8 +5094,8 @@ mpt_scsi_tgt_atio(struct mpt_softc *mpt, request_t *req, uint32_t reply_desc)
|
||||
return;
|
||||
default:
|
||||
mpt_lprt(mpt, MPT_PRT_DEBUG,
|
||||
"CMD 0x%x to unmanaged lun %u\n",
|
||||
cdbp[0], lun);
|
||||
"CMD 0x%x to unmanaged lun %jx\n",
|
||||
cdbp[0], (uintmax_t)lun);
|
||||
buf[12] = 0x25;
|
||||
break;
|
||||
}
|
||||
@ -5126,7 +5127,7 @@ mpt_scsi_tgt_atio(struct mpt_softc *mpt, request_t *req, uint32_t reply_desc)
|
||||
atiop = (struct ccb_accept_tio *) STAILQ_FIRST(&trtp->atios);
|
||||
if (atiop == NULL) {
|
||||
mpt_lprt(mpt, MPT_PRT_WARN,
|
||||
"no ATIOs for lun %u- sending back %s\n", lun,
|
||||
"no ATIOs for lun %jx- sending back %s\n", (uintmax_t)lun,
|
||||
mpt->tenabled? "QUEUE FULL" : "BUSY");
|
||||
mpt_scsi_tgt_status(mpt, NULL, req,
|
||||
mpt->tenabled? SCSI_STATUS_QUEUE_FULL : SCSI_STATUS_BUSY,
|
||||
@ -5135,7 +5136,8 @@ mpt_scsi_tgt_atio(struct mpt_softc *mpt, request_t *req, uint32_t reply_desc)
|
||||
}
|
||||
STAILQ_REMOVE_HEAD(&trtp->atios, sim_links.stqe);
|
||||
mpt_lprt(mpt, MPT_PRT_DEBUG1,
|
||||
"Get FREE ATIO %p lun %d\n", atiop, atiop->ccb_h.target_lun);
|
||||
"Get FREE ATIO %p lun %jx\n", atiop,
|
||||
(uintmax_t)atiop->ccb_h.target_lun);
|
||||
atiop->ccb_h.ccb_mpt_ptr = mpt;
|
||||
atiop->ccb_h.status = CAM_CDB_RECVD;
|
||||
atiop->ccb_h.target_lun = lun;
|
||||
@ -5159,8 +5161,8 @@ mpt_scsi_tgt_atio(struct mpt_softc *mpt, request_t *req, uint32_t reply_desc)
|
||||
}
|
||||
if (mpt->verbose >= MPT_PRT_DEBUG) {
|
||||
int i;
|
||||
mpt_prt(mpt, "START_CCB %p for lun %u CDB=<", atiop,
|
||||
atiop->ccb_h.target_lun);
|
||||
mpt_prt(mpt, "START_CCB %p for lun %jx CDB=<", atiop,
|
||||
(uintmax_t)atiop->ccb_h.target_lun);
|
||||
for (i = 0; i < atiop->cdb_len; i++) {
|
||||
mpt_prtc(mpt, "%02x%c", cdbp[i] & 0xff,
|
||||
(i == (atiop->cdb_len - 1))? '>' : ' ');
|
||||
|
@ -207,15 +207,17 @@ tw_osli_execute_scsi(struct tw_osli_req_context *req, union ccb *ccb)
|
||||
csio->cdb_io.cdb_bytes[0]);
|
||||
|
||||
if (ccb_h->target_id >= TW_CL_MAX_NUM_UNITS) {
|
||||
tw_osli_dbg_dprintf(3, sc, "Invalid target. PTL = %x %x %x",
|
||||
ccb_h->path_id, ccb_h->target_id, ccb_h->target_lun);
|
||||
tw_osli_dbg_dprintf(3, sc, "Invalid target. PTL = %x %x %jx",
|
||||
ccb_h->path_id, ccb_h->target_id,
|
||||
(uintmax_t)ccb_h->target_lun);
|
||||
ccb_h->status |= CAM_TID_INVALID;
|
||||
xpt_done(ccb);
|
||||
return(1);
|
||||
}
|
||||
if (ccb_h->target_lun >= TW_CL_MAX_NUM_LUNS) {
|
||||
tw_osli_dbg_dprintf(3, sc, "Invalid lun. PTL = %x %x %x",
|
||||
ccb_h->path_id, ccb_h->target_id, ccb_h->target_lun);
|
||||
tw_osli_dbg_dprintf(3, sc, "Invalid lun. PTL = %x %x %jx",
|
||||
ccb_h->path_id, ccb_h->target_id,
|
||||
(uintmax_t)ccb_h->target_lun);
|
||||
ccb_h->status |= CAM_LUN_INVALID;
|
||||
xpt_done(ccb);
|
||||
return(1);
|
||||
|
@ -2119,10 +2119,9 @@ umass_cam_attach(struct umass_softc *sc)
|
||||
#ifndef USB_DEBUG
|
||||
if (bootverbose)
|
||||
#endif
|
||||
printf("%s:%d:%d:%d: Attached to scbus%d\n",
|
||||
printf("%s:%d:%d: Attached to scbus%d\n",
|
||||
sc->sc_name, cam_sim_path(sc->sc_sim),
|
||||
sc->sc_unit, CAM_LUN_WILDCARD,
|
||||
cam_sim_path(sc->sc_sim));
|
||||
sc->sc_unit, cam_sim_path(sc->sc_sim));
|
||||
}
|
||||
|
||||
/* umass_cam_detach
|
||||
@ -2173,19 +2172,19 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
|
||||
cmd = (uint8_t *)(ccb->csio.cdb_io.cdb_bytes);
|
||||
}
|
||||
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_SCSI_IO: "
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:XPT_SCSI_IO: "
|
||||
"cmd: 0x%02x, flags: 0x%02x, "
|
||||
"%db cmd/%db data/%db sense\n",
|
||||
cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun, cmd[0],
|
||||
(uintmax_t)ccb->ccb_h.target_lun, cmd[0],
|
||||
ccb->ccb_h.flags & CAM_DIR_MASK, ccb->csio.cdb_len,
|
||||
ccb->csio.dxfer_len, ccb->csio.sense_len);
|
||||
|
||||
if (sc->sc_transfer.ccb) {
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_SCSI_IO: "
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:XPT_SCSI_IO: "
|
||||
"I/O in progress, deferring\n",
|
||||
cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun);
|
||||
(uintmax_t)ccb->ccb_h.target_lun);
|
||||
ccb->ccb_h.status = CAM_SCSI_BUSY;
|
||||
xpt_done(ccb);
|
||||
goto done;
|
||||
@ -2303,9 +2302,9 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
|
||||
{
|
||||
struct ccb_pathinq *cpi = &ccb->cpi;
|
||||
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_PATH_INQ:.\n",
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:XPT_PATH_INQ:.\n",
|
||||
sc ? cam_sim_path(sc->sc_sim) : -1, ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun);
|
||||
(uintmax_t)ccb->ccb_h.target_lun);
|
||||
|
||||
/* host specific information */
|
||||
cpi->version_num = 1;
|
||||
@ -2358,9 +2357,9 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
|
||||
}
|
||||
case XPT_RESET_DEV:
|
||||
{
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_RESET_DEV:.\n",
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:XPT_RESET_DEV:.\n",
|
||||
cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun);
|
||||
(uintmax_t)ccb->ccb_h.target_lun);
|
||||
|
||||
umass_reset(sc);
|
||||
|
||||
@ -2372,9 +2371,9 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
|
||||
{
|
||||
struct ccb_trans_settings *cts = &ccb->cts;
|
||||
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_GET_TRAN_SETTINGS:.\n",
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:XPT_GET_TRAN_SETTINGS:.\n",
|
||||
cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun);
|
||||
(uintmax_t)ccb->ccb_h.target_lun);
|
||||
|
||||
cts->protocol = PROTO_SCSI;
|
||||
cts->protocol_version = SCSI_REV_2;
|
||||
@ -2388,9 +2387,9 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
|
||||
}
|
||||
case XPT_SET_TRAN_SETTINGS:
|
||||
{
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_SET_TRAN_SETTINGS:.\n",
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:XPT_SET_TRAN_SETTINGS:.\n",
|
||||
cam_sim_path(sc->sc_sim), ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun);
|
||||
(uintmax_t)ccb->ccb_h.target_lun);
|
||||
|
||||
ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
|
||||
xpt_done(ccb);
|
||||
@ -2404,19 +2403,19 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
|
||||
}
|
||||
case XPT_NOOP:
|
||||
{
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:XPT_NOOP:.\n",
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:XPT_NOOP:.\n",
|
||||
sc ? cam_sim_path(sc->sc_sim) : -1, ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun);
|
||||
(uintmax_t)ccb->ccb_h.target_lun);
|
||||
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%d:func_code 0x%04x: "
|
||||
DPRINTF(sc, UDMASS_SCSI, "%d:%d:%jx:func_code 0x%04x: "
|
||||
"Not implemented\n",
|
||||
sc ? cam_sim_path(sc->sc_sim) : -1, ccb->ccb_h.target_id,
|
||||
ccb->ccb_h.target_lun, ccb->ccb_h.func_code);
|
||||
(uintmax_t)ccb->ccb_h.target_lun, ccb->ccb_h.func_code);
|
||||
|
||||
ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
|
||||
xpt_done(ccb);
|
||||
|
@ -1048,8 +1048,8 @@ wds_scsi_io(struct cam_sim * sim, struct ccb_scsiio * csio)
|
||||
wp = (struct wds *)cam_sim_softc(sim);
|
||||
ccb_h = &csio->ccb_h;
|
||||
|
||||
DBG(DBX "wds%d: cmd TARG=%d LUN=%d\n", unit, ccb_h->target_id,
|
||||
ccb_h->target_lun);
|
||||
DBG(DBX "wds%d: cmd TARG=%d LUN=%jx\n", unit, ccb_h->target_id,
|
||||
(uintmax_t)ccb_h->target_lun);
|
||||
|
||||
if (ccb_h->target_id > 7 || ccb_h->target_id == WDS_HBA_ID) {
|
||||
ccb_h->status = CAM_TID_INVALID;
|
||||
|
Loading…
Reference in New Issue
Block a user