summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2003-06-16 08:42:20 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2003-06-16 08:42:20 +0000
commit62cc1e05847f0a125b8d1d2023cd953c4a79bafa (patch)
tree3965153c5f651509fad5004a6b2e0cdabaa40538
parente47e35e61b22f2ec5db3bdfd8ed7f097c53c9199 (diff)
Notes
-rw-r--r--sys/dev/fdc/fdc.c8
-rw-r--r--sys/isa/fd.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 759939241bc4..7d30d8f90c1e 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -1588,6 +1588,11 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
*
* If UA has been forced, proceed.
*
+ * If the drive has no changeline support,
+ * or if the drive parameters have been lost
+ * due to previous non-blocking access,
+ * assume a forced UA condition.
+ *
* If motor is off, turn it on for a moment
* and select our drive, in order to read the
* UA hardware signal.
@@ -1603,7 +1608,8 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
*/
unitattn = 0;
if ((dflags & FD_NO_CHLINE) != 0 ||
- (fd->flags & FD_UA) != 0) {
+ (fd->flags & FD_UA) != 0 ||
+ fd->ft == 0) {
unitattn = 1;
fd->flags &= ~FD_UA;
} else if (fdc->fdout & (FDO_MOEN0 | FDO_MOEN1 |
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 759939241bc4..7d30d8f90c1e 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -1588,6 +1588,11 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
*
* If UA has been forced, proceed.
*
+ * If the drive has no changeline support,
+ * or if the drive parameters have been lost
+ * due to previous non-blocking access,
+ * assume a forced UA condition.
+ *
* If motor is off, turn it on for a moment
* and select our drive, in order to read the
* UA hardware signal.
@@ -1603,7 +1608,8 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
*/
unitattn = 0;
if ((dflags & FD_NO_CHLINE) != 0 ||
- (fd->flags & FD_UA) != 0) {
+ (fd->flags & FD_UA) != 0 ||
+ fd->ft == 0) {
unitattn = 1;
fd->flags &= ~FD_UA;
} else if (fdc->fdout & (FDO_MOEN0 | FDO_MOEN1 |