BSD autoconf.
Don't use POLL & NOSLEEP mode if attaching after autoconf
-/* $OpenBSD: ch.c,v 1.8 1998/03/22 20:19:59 tholo Exp $ */
+/* $OpenBSD: ch.c,v 1.9 2000/04/08 19:19:33 csapuntz Exp $ */
/* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */
/*
* Get information about the device. Note we can't use
* interrupts yet.
*/
- if (ch_get_params(sc, SCSI_AUTOCONF))
+ if (ch_get_params(sc, scsi_autoconf))
printf("%s: offline\n", sc->sc_dev.dv_xname);
else {
#define PLURAL(c) (c) == 1 ? "" : "s"
-/* $OpenBSD: scsiconf.c,v 1.50 2000/02/21 08:21:22 mjacob Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.51 2000/04/08 19:19:33 csapuntz Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
int scsidebug_luns = SCSIDEBUG_LUNS;
int scsidebug_level = SCSIDEBUG_LEVEL;
+int scsi_autoconf = SCSI_AUTOCONF;
+
int scsibusprint __P((void *, const char *));
int
struct scsibus_softc *sb = (struct scsibus_softc *)self;
struct scsi_link *sc_link_proto = aux;
int nbytes, i;
+ extern int cold;
+
+ if (!cold)
+ scsi_autoconf = 0;
sc_link_proto->scsibus = sb->sc_dev.dv_unit;
sb->adapter_link = sc_link_proto;
#endif /* SCSIDEBUG */
(void) scsi_test_unit_ready(sc_link,
- SCSI_AUTOCONF | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE);
+ scsi_autoconf | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE);
#ifdef SCSI_2_DEF
/* some devices need to be told to go to SCSI2 */
/* However some just explode if you tell them this.. leave it out */
- scsi_change_def(sc_link, SCSI_AUTOCONF | SCSI_SILENT);
+ scsi_change_def(sc_link, scsi_autoconf | SCSI_SILENT);
#endif /* SCSI_2_DEF */
/* Now go ask the device all about itself. */
bzero(&inqbuf, sizeof(inqbuf));
- if (scsi_inquire(sc_link, &inqbuf, SCSI_AUTOCONF) != 0)
+ if (scsi_inquire(sc_link, &inqbuf, scsi_autoconf) != 0)
goto bad;
{
-/* $OpenBSD: scsiconf.h,v 1.21 1999/12/16 05:17:36 mjacob Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.22 2000/04/08 19:19:33 csapuntz Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
struct buf;
struct scsi_xfer;
+/*
+ * Temporary hack
+ */
+extern int scsi_autoconf;
+
/*
* These entrypoints are called by the high-end drivers to get services from
* whatever low-end drivers they are attached to each adapter type has one of
-/* $OpenBSD: sd.c,v 1.41 1999/12/05 02:49:17 deraadt Exp $ */
+/* $OpenBSD: sd.c,v 1.42 2000/04/08 19:19:33 csapuntz Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
if ((sd->sc_link->quirks & SDEV_NOSTARTUNIT) == 0) {
error = scsi_start(sd->sc_link, SSS_START,
- SCSI_AUTOCONF | SCSI_IGNORE_ILLEGAL_REQUEST |
+ scsi_autoconf | SCSI_IGNORE_ILLEGAL_REQUEST |
SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT);
} else
error = 0;
result = SDGP_RESULT_OFFLINE;
else
result = (*sd->sc_ops->sdo_get_parms)(sd, &sd->params,
- SCSI_AUTOCONF);
+ scsi_autoconf);
printf("%s: ", sd->sc_dev.dv_xname);
switch (result) {
-/* $OpenBSD: st.c,v 1.27 1999/09/05 20:58:03 niklas Exp $ */
+/* $OpenBSD: st.c,v 1.28 2000/04/08 19:19:33 csapuntz Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
printf("\n");
printf("%s: %s", st->sc_dev.dv_xname, st->quirkdata ? "rogue, " : "");
if (scsi_test_unit_ready(sc_link,
- SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE) ||
+ scsi_autoconf | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE) ||
st_mode_sense(st,
- SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE))
+ scsi_autoconf | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE))
printf("drive empty\n");
else {
printf("density code 0x%x, ", st->media_density);