From e5d7d243615d5a196a46d23a162623d438454de1 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sat, 18 Jul 1998 03:15:33 +0000 Subject: 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 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. --- sys/dev/fdc/fdc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev/fdc') diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 9cebca51a8f2..f432e51a1620 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.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)); } } -- cgit v1.3