summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-08-24 14:08:44 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-08-24 14:08:44 +0000
commit0c62d8b85dfc1667a4cb259d439ba6e9224daca4 (patch)
treef3e7a97fcb0dd095822d8dad0ae5e2737cc77979
parentc924ffe0358b90c98b0aaafd2f34f16f03a94844 (diff)
dont print debug output when the scsi completion path returns with
something other than SCSI_OK. for example, SCSI_SENSE is returned when the device has sense data. this code was left in to help debug problems in the field, but noones had any problems with mpi apart from it being too chatty when a device returns sense data...
-rw-r--r--sys/dev/ic/mpi.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index 9b195650dbc..895b3812ebc 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.64 2006/08/03 08:48:44 dlg Exp $ */
+/* $OpenBSD: mpi.c,v 1.65 2006/08/24 14:08:43 dlg Exp $ */
/*
* Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org>
@@ -1220,6 +1220,31 @@ mpi_scsi_cmd_done(struct mpi_ccb *ccb)
return;
}
+ DNPRINTF(MPI_D_CMD, "%s: mpi_scsi_cmd_done xs cmd: 0x%02x len: %d "
+ "flags 0x%x\n", DEVNAME(sc), xs->cmd->opcode, xs->datalen,
+ xs->flags);
+ DNPRINTF(MPI_D_CMD, "%s: target_id: %d bus: %d msg_length: %d "
+ "function: 0x%02x\n", DEVNAME(sc), sie->target_id, sie->bus,
+ sie->msg_length, sie->function);
+ DNPRINTF(MPI_D_CMD, "%s: cdb_length: %d sense_buf_length: %d "
+ "msg_flags: 0x%02x\n", DEVNAME(sc), sie->cdb_length,
+ sie->sense_buf_len, sie->msg_flags);
+ DNPRINTF(MPI_D_CMD, "%s: msg_context: 0x%08x\n", DEVNAME(sc),
+ letoh32(sie->msg_context));
+ DNPRINTF(MPI_D_CMD, "%s: scsi_status: 0x%02x scsi_state: 0x%02x "
+ "ioc_status: 0x%04x\n", DEVNAME(sc), sie->scsi_status,
+ sie->scsi_state, letoh16(sie->ioc_status));
+ DNPRINTF(MPI_D_CMD, "%s: ioc_loginfo: 0x%08x\n", DEVNAME(sc),
+ letoh32(sie->ioc_loginfo));
+ DNPRINTF(MPI_D_CMD, "%s: transfer_count: %d\n", DEVNAME(sc),
+ letoh32(sie->transfer_count));
+ DNPRINTF(MPI_D_CMD, "%s: sense_count: %d\n", DEVNAME(sc),
+ letoh32(sie->sense_count));
+ DNPRINTF(MPI_D_CMD, "%s: response_info: 0x%08x\n", DEVNAME(sc),
+ letoh32(sie->response_info));
+ DNPRINTF(MPI_D_CMD, "%s: tag: 0x%04x\n", DEVNAME(sc),
+ letoh16(sie->tag));
+
xs->status = sie->scsi_status;
switch (letoh16(sie->ioc_status)) {
case MPI_IOCSTATUS_SCSI_DATA_OVERRUN:
@@ -1315,34 +1340,8 @@ mpi_scsi_cmd_done(struct mpi_ccb *ccb)
xs->error = XS_BUSY;
}
- if (xs->error != XS_NOERROR && !cold) {
- printf("%s: xs cmd: 0x%02x len: %d error: 0x%02x "
- "flags 0x%x\n", DEVNAME(sc), xs->cmd->opcode, xs->datalen,
- xs->error, xs->flags);
- printf("%s: target_id: %d bus: %d msg_length: %d "
- "function: 0x%02x\n", DEVNAME(sc), sie->target_id,
- sie->bus, sie->msg_length, sie->function);
- printf("%s: cdb_length: %d sense_buf_length: %d "
- "msg_flags: 0x%02x\n", DEVNAME(sc), sie->cdb_length,
- sie->bus, sie->msg_flags);
- printf("%s: msg_context: 0x%08x\n", DEVNAME(sc),
- letoh32(sie->msg_context));
- printf("%s: scsi_status: 0x%02x scsi_state: 0x%02x "
- "ioc_status: 0x%04x\n", DEVNAME(sc), sie->scsi_status,
- sie->scsi_state, letoh16(sie->ioc_status));
- printf("%s: ioc_loginfo: 0x%08x\n", DEVNAME(sc),
- letoh32(sie->ioc_loginfo));
- printf("%s: transfer_count: %d\n", DEVNAME(sc),
- letoh32(sie->transfer_count));
- printf("%s: sense_count: %d\n", DEVNAME(sc),
- letoh32(sie->sense_count));
- printf("%s: response_info: 0x%08x\n", DEVNAME(sc),
- letoh32(sie->response_info));
- printf("%s: tag: 0x%04x\n", DEVNAME(sc),
- letoh16(sie->tag));
- printf("%s: xs error: 0x%02x xs status: %d\n", DEVNAME(sc),
- xs->error, xs->status);
- }
+ DNPRINTF(MPI_D_CMD, "%s: xs err: 0x%02x status: %d\n", DEVNAME(sc),
+ xs->error, xs->status);
mpi_push_reply(sc, ccb->ccb_reply_dva);
mpi_put_ccb(sc, ccb);