aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1997-10-19 13:12:02 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1997-10-19 13:12:02 +0000
commit0722d6aba3943012e411513ac8b26c69634fe35b (patch)
tree453159bb64d873bbbef869b8d34be0db15107eef
parent23e200d5ab0c8860ef95938f1d2eb92dac4590ef (diff)
Notes
-rw-r--r--sys/dev/fdc/fdc.c17
-rw-r--r--sys/i386/isa/fd.c17
-rw-r--r--sys/isa/fd.c17
3 files changed, 45 insertions, 6 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 72e7d7aef8eb..2d3081fc66e1 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.103 1997/09/21 21:41:00 gibbs Exp $
+ * $Id: fd.c,v 1.104 1997/09/23 22:14:43 gibbs Exp $
*
*/
@@ -88,6 +88,12 @@
/* misuse a flag to identify format operation */
#define B_FORMAT B_XXX
+/* configuration flags */
+#define FDC_PRETEND_D0 (1 << 0) /* pretend drive 0 to be there */
+
+/* internally used only, not really from CMOS: */
+#define RTCFDT_144M_PRETENDED 0x1000
+
/*
* this biotab field doubles as a field for the physical unit number
* on the controller
@@ -549,7 +555,10 @@ fdattach(struct isa_device *dev)
fdsu = fdup->id_physid;
/* look up what bios thinks we have */
switch (fdu) {
- case 0: fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
+ case 0: if (dev->id_flags & FDC_PRETEND_D0)
+ fdt = RTCFDT_144M | RTCFDT_144M_PRETENDED;
+ else
+ fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
break;
case 1: fdt = ((rtcin(RTC_FDISKETTE) << 4) & 0xf0);
break;
@@ -684,6 +693,10 @@ fdattach(struct isa_device *dev)
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
break;
+ case RTCFDT_144M | RTCFDT_144M_PRETENDED:
+ printf("config-pretended ");
+ fdt = RTCFDT_144M;
+ /* fallthrough */
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;
diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c
index 72e7d7aef8eb..2d3081fc66e1 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.103 1997/09/21 21:41:00 gibbs Exp $
+ * $Id: fd.c,v 1.104 1997/09/23 22:14:43 gibbs Exp $
*
*/
@@ -88,6 +88,12 @@
/* misuse a flag to identify format operation */
#define B_FORMAT B_XXX
+/* configuration flags */
+#define FDC_PRETEND_D0 (1 << 0) /* pretend drive 0 to be there */
+
+/* internally used only, not really from CMOS: */
+#define RTCFDT_144M_PRETENDED 0x1000
+
/*
* this biotab field doubles as a field for the physical unit number
* on the controller
@@ -549,7 +555,10 @@ fdattach(struct isa_device *dev)
fdsu = fdup->id_physid;
/* look up what bios thinks we have */
switch (fdu) {
- case 0: fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
+ case 0: if (dev->id_flags & FDC_PRETEND_D0)
+ fdt = RTCFDT_144M | RTCFDT_144M_PRETENDED;
+ else
+ fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
break;
case 1: fdt = ((rtcin(RTC_FDISKETTE) << 4) & 0xf0);
break;
@@ -684,6 +693,10 @@ fdattach(struct isa_device *dev)
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
break;
+ case RTCFDT_144M | RTCFDT_144M_PRETENDED:
+ printf("config-pretended ");
+ fdt = RTCFDT_144M;
+ /* fallthrough */
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 72e7d7aef8eb..2d3081fc66e1 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.103 1997/09/21 21:41:00 gibbs Exp $
+ * $Id: fd.c,v 1.104 1997/09/23 22:14:43 gibbs Exp $
*
*/
@@ -88,6 +88,12 @@
/* misuse a flag to identify format operation */
#define B_FORMAT B_XXX
+/* configuration flags */
+#define FDC_PRETEND_D0 (1 << 0) /* pretend drive 0 to be there */
+
+/* internally used only, not really from CMOS: */
+#define RTCFDT_144M_PRETENDED 0x1000
+
/*
* this biotab field doubles as a field for the physical unit number
* on the controller
@@ -549,7 +555,10 @@ fdattach(struct isa_device *dev)
fdsu = fdup->id_physid;
/* look up what bios thinks we have */
switch (fdu) {
- case 0: fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
+ case 0: if (dev->id_flags & FDC_PRETEND_D0)
+ fdt = RTCFDT_144M | RTCFDT_144M_PRETENDED;
+ else
+ fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
break;
case 1: fdt = ((rtcin(RTC_FDISKETTE) << 4) & 0xf0);
break;
@@ -684,6 +693,10 @@ fdattach(struct isa_device *dev)
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
break;
+ case RTCFDT_144M | RTCFDT_144M_PRETENDED:
+ printf("config-pretended ");
+ fdt = RTCFDT_144M;
+ /* fallthrough */
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;