Noisy printfs.
This commit is contained in:
parent
d8fc666005
commit
8ef7991906
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iopsp.c,v 1.29 2007/10/19 11:59:44 ad Exp $ */
|
||||
/* $NetBSD: iopsp.c,v 1.30 2007/12/01 18:12:37 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001, 2007 The NetBSD Foundation, Inc.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.29 2007/10/19 11:59:44 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.30 2007/12/01 18:12:37 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -154,21 +154,21 @@ iopsp_attach(struct device *parent, struct device *self, void *aux)
|
||||
* Say what the device is. If we can find out what the controling
|
||||
* device is, say what that is too.
|
||||
*/
|
||||
printf(": SCSI port");
|
||||
aprint_normal(": SCSI port");
|
||||
iop_print_ident(iop, ia->ia_tid);
|
||||
printf("\n");
|
||||
aprint_normal("\n");
|
||||
|
||||
rv = iop_field_get_all(iop, ia->ia_tid, I2O_PARAM_HBA_SCSI_CTLR_INFO,
|
||||
¶m, sizeof(param), NULL);
|
||||
if (rv != 0)
|
||||
goto bad;
|
||||
|
||||
printf("%s: ", sc->sc_dv.dv_xname);
|
||||
aprint_normal("%s: ", sc->sc_dv.dv_xname);
|
||||
if (fc)
|
||||
printf("FC");
|
||||
aprint_normal("FC");
|
||||
else
|
||||
printf("%d-bit", param.p.sci.maxdatawidth);
|
||||
printf(", max sync rate %dMHz, initiator ID %d\n",
|
||||
aprint_normal("%d-bit", param.p.sci.maxdatawidth);
|
||||
aprint_normal(", max sync rate %dMHz, initiator ID %d\n",
|
||||
(u_int32_t)le64toh(param.p.sci.maxsyncrate) / 1000,
|
||||
le32toh(param.p.sci.initiatorid));
|
||||
|
||||
@ -201,7 +201,7 @@ iopsp_attach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
/* Build the two maps, and attach to scsipi. */
|
||||
if (iopsp_reconfig(self) != 0) {
|
||||
printf("%s: configure failed\n", sc->sc_dv.dv_xname);
|
||||
aprint_error("%s: configure failed\n", sc->sc_dv.dv_xname);
|
||||
goto bad;
|
||||
}
|
||||
config_found(self, &sc->sc_channel, scsiprint);
|
||||
@ -285,8 +285,9 @@ iopsp_reconfig(struct device *dv)
|
||||
#if defined(DIAGNOSTIC) || defined(I2ODEBUG)
|
||||
if (targ >= sc_chan->chan_ntargets ||
|
||||
lun >= sc_chan->chan_nluns) {
|
||||
printf("%s: target %d,%d (tid %d): bad target/LUN\n",
|
||||
sc->sc_dv.dv_xname, targ, lun, tid);
|
||||
aprint_error("%s: target %d,%d (tid %d): "
|
||||
"bad target/LUN\n", sc->sc_dv.dv_xname,
|
||||
targ, lun, tid);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
@ -305,24 +306,26 @@ iopsp_reconfig(struct device *dv)
|
||||
it->it_offset = param.sdi.negoffset;
|
||||
it->it_syncrate = syncrate;
|
||||
|
||||
printf("%s: target %d (tid %d): %d-bit, ",
|
||||
aprint_verbose("%s: target %d (tid %d): %d-bit, ",
|
||||
sc->sc_dv.dv_xname, targ, tid, it->it_width);
|
||||
if (it->it_syncrate == 0)
|
||||
printf("asynchronous\n");
|
||||
aprint_verbose("asynchronous\n");
|
||||
else
|
||||
printf("synchronous at %dMHz, offset 0x%x\n",
|
||||
it->it_syncrate, it->it_offset);
|
||||
aprint_verbose("synchronous at %dMHz, "
|
||||
"offset 0x%x\n", it->it_syncrate,
|
||||
it->it_offset);
|
||||
}
|
||||
|
||||
/* Ignore the device if it's in use by somebody else. */
|
||||
if ((le32toh(le->usertid) & 4095) != I2O_TID_NONE) {
|
||||
if (sc->sc_tidmap == NULL ||
|
||||
IOPSP_TIDMAP(sc->sc_tidmap, targ, lun) !=
|
||||
IOPSP_TID_INUSE)
|
||||
printf("%s: target %d,%d (tid %d): in use by"
|
||||
" tid %d\n", sc->sc_dv.dv_xname,
|
||||
IOPSP_TID_INUSE) {
|
||||
aprint_verbose("%s: target %d,%d (tid %d): "
|
||||
"in use by tid %d\n", sc->sc_dv.dv_xname,
|
||||
targ, lun, tid,
|
||||
le32toh(le->usertid) & 4095);
|
||||
}
|
||||
IOPSP_TIDMAP(tidmap, targ, lun) = IOPSP_TID_INUSE;
|
||||
} else
|
||||
IOPSP_TIDMAP(tidmap, targ, lun) = (u_short)tid;
|
||||
@ -368,7 +371,7 @@ iopsp_rescan(struct iopsp_softc *sc)
|
||||
rv = iop_msg_post(iop, im, &mf, 5*60*1000);
|
||||
iop_msg_free(iop, im);
|
||||
if (rv != 0)
|
||||
printf("%s: bus rescan failed (error %d)\n",
|
||||
aprint_error("%s: bus rescan failed (error %d)\n",
|
||||
sc->sc_dv.dv_xname, rv);
|
||||
|
||||
if ((rv = iop_lct_get(iop)) == 0)
|
||||
@ -417,10 +420,8 @@ iopsp_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
|
||||
if ((flags & XS_CTL_RESET) != 0) {
|
||||
if (iop_simple_cmd(iop, tid, I2O_SCSI_DEVICE_RESET,
|
||||
sc->sc_ii.ii_ictx, 1, 30*1000) != 0) {
|
||||
#ifdef I2ODEBUG
|
||||
printf("%s: reset failed\n",
|
||||
aprint_error("%s: reset failed\n",
|
||||
sc->sc_dv.dv_xname);
|
||||
#endif
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
} else
|
||||
xs->error = XS_NOERROR;
|
||||
@ -573,8 +574,8 @@ iopsp_intr(struct device *dv, struct iop_msg *im, void *reply)
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
break;
|
||||
}
|
||||
printf("%s: HBA status 0x%02x\n", sc->sc_dv.dv_xname,
|
||||
rb->hbastatus);
|
||||
aprint_error("%s: HBA status 0x%02x\n",
|
||||
sc->sc_dv.dv_xname, rb->hbastatus);
|
||||
} else if (rb->scsistatus != SCSI_OK) {
|
||||
switch (rb->scsistatus) {
|
||||
case SCSI_CHECK:
|
||||
|
Loading…
Reference in New Issue
Block a user