summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/usb/umass_scsi.c9
-rw-r--r--sys/scsi/scsi_base.c28
-rw-r--r--sys/scsi/scsiconf.h3
3 files changed, 15 insertions, 25 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c
index 7783397d114..dc3439699ff 100644
--- a/sys/dev/usb/umass_scsi.c
+++ b/sys/dev/usb/umass_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass_scsi.c,v 1.21 2007/10/20 04:37:54 krw Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.22 2008/06/13 04:27:07 krw Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -194,13 +194,6 @@ umass_scsi_cmd(struct scsi_xfer *xs)
sc_link->target, sc_link->lun, xs, xs->cmd->opcode,
xs->datalen, sc_link->quirks, xs->flags & SCSI_POLL));
-#if defined(USB_DEBUG) && defined(SCSIDEBUG)
- if (umassdebug & UDMASS_SCSI)
- show_scsi_xs(xs);
- else if (umassdebug & ~UDMASS_CMD)
- show_scsi_cmd(xs);
-#endif
-
if (sc->sc_dying) {
xs->error = XS_DRIVER_STUFFUP;
goto done;
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index e95064c63d9..849fad9463f 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.124 2007/11/25 22:28:53 dlg Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.125 2008/06/13 04:27:08 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -214,6 +214,11 @@ scsi_make_xs(struct scsi_link *sc_link, struct scsi_generic *scsi_cmd,
xs->cmd->bytes[0] |= ((sc_link->lun << SCSI_CMD_LUN_SHIFT) &
SCSI_CMD_LUN_MASK);
+#ifdef SCSIDEBUG
+ if ((sc_link->flags & SDEV_DB1) != 0)
+ show_scsi_xs(xs);
+#endif /* SCSIDEBUG */
+
return (xs);
}
@@ -687,10 +692,6 @@ scsi_done(struct scsi_xfer *xs)
splassert(IPL_BIO);
SC_DEBUG(sc_link, SDEV_DB2, ("scsi_done\n"));
-#ifdef SCSIDEBUG
- if ((sc_link->flags & SDEV_DB1) != 0)
- show_scsi_cmd(xs);
-#endif /* SCSIDEBUG */
/*
* If it's a user level request, bypass all usual completion processing,
@@ -1916,7 +1917,13 @@ scsi_decode_sense(struct scsi_sense_data *sense, int flag)
void
show_scsi_xs(struct scsi_xfer *xs)
{
+ u_char *b = (u_char *) xs->cmd;
+ int i = 0;
+
+ sc_print_addr(xs->sc_link);
+
printf("xs(%p): ", xs);
+
printf("flg(0x%x)", xs->flags);
printf("sc_link(%p)", xs->sc_link);
printf("retr(0x%x)", xs->retries);
@@ -1927,17 +1934,8 @@ show_scsi_xs(struct scsi_xfer *xs)
printf("len(0x%x)", xs->datalen);
printf("res(0x%x)", xs->resid);
printf("err(0x%x)", xs->error);
- printf("bp(%p)", xs->bp);
- show_scsi_cmd(xs);
-}
+ printf("bp(%p)\n", xs->bp);
-void
-show_scsi_cmd(struct scsi_xfer *xs)
-{
- u_char *b = (u_char *) xs->cmd;
- int i = 0;
-
- sc_print_addr(xs->sc_link);
printf("command: ");
if ((xs->flags & SCSI_RESET) == 0) {
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 88a30e5cea5..3429f94a09a 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.90 2007/12/29 00:45:26 dlg Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.91 2008/06/13 04:27:08 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -346,7 +346,6 @@ int scsi_report_luns(struct scsi_link *, int,
void show_scsi_xs(struct scsi_xfer *);
void scsi_print_sense(struct scsi_xfer *);
-void show_scsi_cmd(struct scsi_xfer *);
void show_mem(u_char *, int);
void scsi_strvis(u_char *, u_char *, int);
int scsi_delay(struct scsi_xfer *, int);