summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/conf/NOTES9
-rw-r--r--sys/dev/fdc/fdc.c8
-rw-r--r--sys/i386/conf/LINT9
-rw-r--r--sys/i386/conf/NOTES9
-rw-r--r--sys/i386/isa/fd.c8
-rw-r--r--sys/i386/isa/ft.c35
-rw-r--r--sys/isa/fd.c8
7 files changed, 53 insertions, 33 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index f5a0be9..e276a8f 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
-# $Id: LINT,v 1.176 1995/04/28 00:51:18 dufault Exp $
+# $Id: LINT,v 1.177 1995/05/05 07:47:44 davidg Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@@ -507,10 +507,17 @@ disk wd3 at wdc1 drive 1
# Standard floppy disk controllers and floppy tapes: `fdc', `fd', and `ft'
#
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+#
+# Activate this line instead of the fdc0 line above if you happen to
+# have an Insight floppy tape. Probing them proved to be dangerous
+# for people with floppy disks only, so it's "hidden" behind a flag:
+#controller fdc0 at isa? port "IO_FD1" bio flags 1 irq 6 drq 2 vector fdintr
+
disk fd0 at fdc0 drive 0
disk fd1 at fdc0 drive 1
tape ft0 at fdc0 drive 2
+
#
# Options for `fd':
#
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index e573e83..86bcc55 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.57 1995/04/12 20:47:41 wollman Exp $
+ * $Id: fd.c,v 1.58 1995/04/20 03:17:44 julian Exp $
*
*/
@@ -53,9 +53,6 @@
#endif
#include "fd.h"
-/* Flags */
-#define FT_PROBE 0x1
-
#if NFDC > 0
#include <sys/param.h>
@@ -605,8 +602,7 @@ fdattach(struct isa_device *dev)
unithasfd = 0;
if (fdu < NFD && fd->type != NO_TYPE)
unithasfd = 1;
- if ((dev->id_flags & FT_PROBE) &&
- ftattach(dev, fdup, unithasfd))
+ if (ftattach(dev, fdup, unithasfd))
continue;
if (fdsu < DRVS_PER_CTLR)
fd->type = NO_TYPE;
diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT
index f5a0be9..e276a8f 100644
--- a/sys/i386/conf/LINT
+++ b/sys/i386/conf/LINT
@@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
-# $Id: LINT,v 1.176 1995/04/28 00:51:18 dufault Exp $
+# $Id: LINT,v 1.177 1995/05/05 07:47:44 davidg Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@@ -507,10 +507,17 @@ disk wd3 at wdc1 drive 1
# Standard floppy disk controllers and floppy tapes: `fdc', `fd', and `ft'
#
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+#
+# Activate this line instead of the fdc0 line above if you happen to
+# have an Insight floppy tape. Probing them proved to be dangerous
+# for people with floppy disks only, so it's "hidden" behind a flag:
+#controller fdc0 at isa? port "IO_FD1" bio flags 1 irq 6 drq 2 vector fdintr
+
disk fd0 at fdc0 drive 0
disk fd1 at fdc0 drive 1
tape ft0 at fdc0 drive 2
+
#
# Options for `fd':
#
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index f5a0be9..e276a8f 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
-# $Id: LINT,v 1.176 1995/04/28 00:51:18 dufault Exp $
+# $Id: LINT,v 1.177 1995/05/05 07:47:44 davidg Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@@ -507,10 +507,17 @@ disk wd3 at wdc1 drive 1
# Standard floppy disk controllers and floppy tapes: `fdc', `fd', and `ft'
#
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+#
+# Activate this line instead of the fdc0 line above if you happen to
+# have an Insight floppy tape. Probing them proved to be dangerous
+# for people with floppy disks only, so it's "hidden" behind a flag:
+#controller fdc0 at isa? port "IO_FD1" bio flags 1 irq 6 drq 2 vector fdintr
+
disk fd0 at fdc0 drive 0
disk fd1 at fdc0 drive 1
tape ft0 at fdc0 drive 2
+
#
# Options for `fd':
#
diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c
index e573e83..86bcc55 100644
--- a/sys/i386/isa/fd.c
+++ b/sys/i386/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.57 1995/04/12 20:47:41 wollman Exp $
+ * $Id: fd.c,v 1.58 1995/04/20 03:17:44 julian Exp $
*
*/
@@ -53,9 +53,6 @@
#endif
#include "fd.h"
-/* Flags */
-#define FT_PROBE 0x1
-
#if NFDC > 0
#include <sys/param.h>
@@ -605,8 +602,7 @@ fdattach(struct isa_device *dev)
unithasfd = 0;
if (fdu < NFD && fd->type != NO_TYPE)
unithasfd = 1;
- if ((dev->id_flags & FT_PROBE) &&
- ftattach(dev, fdup, unithasfd))
+ if (ftattach(dev, fdup, unithasfd))
continue;
if (fdsu < DRVS_PER_CTLR)
fd->type = NO_TYPE;
diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c
index 9470fb9..f1dd370 100644
--- a/sys/i386/isa/ft.c
+++ b/sys/i386/isa/ft.c
@@ -17,7 +17,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* ft.c - QIC-40/80 floppy tape driver
- * $Id: ft.c,v 1.19 1995/04/09 06:23:12 rgrimes Exp $
+ * $Id: ft.c,v 1.20 1995/04/12 20:47:43 wollman Exp $
*
* 01/19/95 ++sg
* Cleaned up recalibrate/seek code at attach time for FreeBSD 2.x.
@@ -104,6 +104,9 @@ extern int out_fdc(int, int); /* write fdc registers */
extern int hz; /* system clock rate */
+/* Flags in isadev struct */
+#define FT_PROBE 0x1 /* allow for "dangerous" tape probes */
+
/* Type of tape attached */
/* use numbers that don't interfere with the possible floppy types */
#define NO_TYPE 0 /* (same as NO_TYPE in fd.c) */
@@ -494,21 +497,29 @@ ftattach(isadev, fdup, unithasfd)
goto out;
}
- /*
- * FT_INSIGHT - insight style
- *
- * Since insight requires turning the drive motor on, we will not
- * perform this probe if a floppy drive was already found with the
- * the given unit and controller.
- */
- if (unithasfd) goto out;
- tape_start(ftu, 1);
- if (tape_status(ftu) >= 0) {
+ if(isadev->id_flags & FT_PROBE) {
+ /*
+ * Insight probe is dangerous, since it requires the motor being
+ * enabled and therefore risks attached floppy disk drives to jam.
+ * Probe only if explicitly requested by a flag 0x1 from config
+ */
+
+ /*
+ * FT_INSIGHT - insight style
+ *
+ * Since insight requires turning the drive motor on, we will not
+ * perform this probe if a floppy drive was already found with the
+ * the given unit and controller.
+ */
+ if (unithasfd) goto out;
+ tape_start(ftu, 1);
+ if (tape_status(ftu) >= 0) {
ft->type = FT_INSIGHT;
ftreq_hwinfo(ftu, &hw);
goto out;
+ }
}
-
+
out:
tape_end(ftu);
if (ft->type != NO_TYPE) {
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index e573e83..86bcc55 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.57 1995/04/12 20:47:41 wollman Exp $
+ * $Id: fd.c,v 1.58 1995/04/20 03:17:44 julian Exp $
*
*/
@@ -53,9 +53,6 @@
#endif
#include "fd.h"
-/* Flags */
-#define FT_PROBE 0x1
-
#if NFDC > 0
#include <sys/param.h>
@@ -605,8 +602,7 @@ fdattach(struct isa_device *dev)
unithasfd = 0;
if (fdu < NFD && fd->type != NO_TYPE)
unithasfd = 1;
- if ((dev->id_flags & FT_PROBE) &&
- ftattach(dev, fdup, unithasfd))
+ if (ftattach(dev, fdup, unithasfd))
continue;
if (fdsu < DRVS_PER_CTLR)
fd->type = NO_TYPE;
OpenPOWER on IntegriCloud