summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/scsi/scsi_base.c11
-rw-r--r--sys/scsi/scsi_driver.c8
-rw-r--r--sys/scsi/scsiconf.c2
-rw-r--r--sys/scsi/scsiconf.h1
4 files changed, 19 insertions, 3 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index e77dd9b..3504b5a 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1199,6 +1199,12 @@ scsi_4btou(bytes)
static sc_printing;
void
+sc_print_init()
+{
+ sc_printing++;
+}
+
+void
sc_print_start(sc_link)
struct scsi_link *sc_link;
{
@@ -1245,11 +1251,12 @@ sc_print_addr(sc_link)
printf("\n");
if (sc_link->device == 0) {
- printf("nodevice");
+ printf("nodevice at ");
}
else if (strcmp(sc_link->device->name, "probe") != 0) {
printf("%s", sc_link->device->name);
- id_put(sc_link->dev_unit, " at ");
+ id_put(sc_link->dev_unit, ": ");
+ return;
}
printf("scbus");
diff --git a/sys/scsi/scsi_driver.c b/sys/scsi/scsi_driver.c
index 07018f9..f03e2c1 100644
--- a/sys/scsi/scsi_driver.c
+++ b/sys/scsi/scsi_driver.c
@@ -90,6 +90,13 @@ int scsi_device_attach(struct scsi_link *sc_link)
#endif
printf("%s%d: %s ", device->name, sc_link->dev_unit, device->desc);
+ /*
+ * XXX some SCSI adapter drivers print out things while the
+ * device-specific attach routine is running. The result is
+ * something of a mess. This hack at least keeps it so each
+ * line will begin with foodev0:.
+ */
+ sc_print_init();
dev = scsi_dev_lookup(device->open);
@@ -100,6 +107,7 @@ int scsi_device_attach(struct scsi_link *sc_link)
errcode = (device->attach) ? (*(device->attach))(sc_link) : 0;
printf("\n");
+ sc_print_finish();
if (errcode == 0)
sc_link->flags |= device->link_flags;
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index c993d6f..0c5974b 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -763,7 +763,7 @@ scsi_attachdevs(scbus)
}
bzero(scbus->sc_link, sizeof(struct scsi_link*[scbus->maxtarg + 1][8]));
#if defined(SCSI_DELAY) && SCSI_DELAY > 2
- printf("%s%d waiting for scsi devices to settle\n",
+ printf("%s%d: waiting for scsi devices to settle\n",
sc_link_proto->adapter->name, sc_link_proto->adapter_unit);
#else /* SCSI_DELAY > 2 */
#undef SCSI_DELAY
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 144165c..dd328cf 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -472,6 +472,7 @@ u_int32_t scsi_2btou __P((u_char *));
void sc_print_addr __P((struct scsi_link *));
void sc_print_start __P((struct scsi_link *));
+void sc_print_init __P((void));
void sc_print_finish __P((void));
#ifndef SCSIDEBUG
OpenPOWER on IntegriCloud