summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-18 03:15:33 +0000
committerbde <bde@FreeBSD.org>1998-07-18 03:15:33 +0000
commit7466f92c1a75cdfc614e9b0f5eccf1f8afb31d06 (patch)
tree85f65f73eb936bb47402504720908182bba6d999 /sys/isa
parent7ff39f1b603550fcd7c3980bf1b03393ca35dd0d (diff)
downloadFreeBSD-src-7466f92c1a75cdfc614e9b0f5eccf1f8afb31d06.zip
FreeBSD-src-7466f92c1a75cdfc614e9b0f5eccf1f8afb31d06.tar.gz
Fixed error handling after a seek error that can't happen. When the
controller reports a successful seek, it is very unlikely to report seeking to a cylinder other than the one requested, but we check for this, and botched the error handling for the requested_cylinder != 0 case. This error happened when the bug fixed in rev.1.52 of <sys/buf.h> caused the head of buffer queue to change to one starting on a different cylnder - the requested cylinder was found, but it wasn't what we thought we requested. The fix is simply to arrange to reset the state machine. Corruption of the buffer queue seems to only have been a problem in the floppy driver. Other drivers dequeue the head of the queue before doing physical i/o on it, so the corruption at worse broke the elevator sort order. Dequeueing breaks it anyway.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/fd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 9cebca5..f432e51 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -44,7 +44,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.117 1998/07/13 08:22:59 julian Exp $
+ * $Id: fd.c,v 1.118 1998/07/15 09:59:30 bde Exp $
*
*/
@@ -1648,6 +1648,8 @@ fdstate(fdcu_t fdcu, fdc_p fdc)
printf(
"fd%d: Seek to cyl %d failed; am at cyl %d (ST0 = 0x%x)\n",
fdu, descyl, cyl, st0);
+ if (fdc->retry < 3)
+ fdc->retry = 3;
return(retrier(fdcu));
}
}
OpenPOWER on IntegriCloud