freebsd-skq/sys/isa
Bruce Evans 5c1a1eae83 Fixed error handling:
- Call isa_dmadone() whenever necessary to stop DMA and/or free bounce
  buffers.  Undead DMA corrupted the malloc freelist fairly consistently
  in the following configuration: SLICE kernel, 2 floppy drives, no disk
  in fd0, disk in fd1.
- Don't call fdc_reset() from fd_timeout().  Doing so gave an "extra"
  interrupt which was usually misinterpreted as being for completion
  of the next FDC command; the interrupt for completion of the next
  FDC command was then usually misinterpreted...  There were further
  complications for interrupts latched by the soft-spl mechanism so
  that they were delivered after all the h/w interrupts went away.
  This caused at least wrong head settle delays and may be why the
  FreeBSD floppy driver seems to munch floppies more than most floppy
  drivers.  The reset was unnecessary anyway in cases that didn't have
  the bug described next, since is was repeated a little later for
  the IOTIMEDOUT state.  The state machine has complications to handle
  resets correctly, so just use it.
- Don't call retrier() from fd_timeout().  The IOTIMEDOUT state needs
  to be processed next, and it isn't valid to set to that state if
  retrier() has aborted the current transfer.  Doing so caused null
  pointer panics after the previous bug was fixed.

Improved error handling:
- If an i/o is aborted, arrange to reset in the state machine before
  doing the next i/o.  New fdc flag for this.  This fixes spurious
  warnings and lengthy busy-waiting for the next i/o.
- Split STARTRECAL into RESETCOMPLETE and STARTRECAL and only check
  for the results from reset if we actually reset.  This fixes spurious
  warnings for other paths to STARTRECAL.  [Oops, it may break reset
  handling for motor-off resets.]

Cleanups in fd_timeout():
- Renamed to fd_iotimeout() to make it clearer that it is only used
  for i/o.
- Don't handle the bp == 0 case.  This case can't happen for i/o.
- Don't check for controller-busy.  We know it must be.
- Don't print anything.  retrier() already prints too much for normal
  errors.
- Fudge the state differently so that the state machine advances
  fdc->retry and the status is invalid (perhaps this should fudge a
  valid state like the one for WP).
- Style fixes.
1998-07-29 13:00:42 +00:00
..
ic Enable the FIFO on enhanced floppy controllers. This reduces the 1997-09-17 20:16:17 +00:00
atrtc.c Add a tc_ prefix to struct timecounter members. 1998-06-09 13:10:54 +00:00
fd.c Fixed error handling: 1998-07-29 13:00:42 +00:00
fdc.h Fixed error handling: 1998-07-29 13:00:42 +00:00
fdreg.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
joy.c This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
kbdio.c Don't (conditionally) override the kernel's min() and max() functions 1998-02-13 07:09:38 +00:00
kbdio.h - Add support for the following mice to psm/moused/sysmouse: 1997-12-07 08:09:19 +00:00
kbdtables.h keymap -> key_map so that the kernel will compile with 1998-06-06 17:45:11 +00:00
ppc.c Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
ppcreg.h Minor ppc_data structure tweak. 1997-08-16 14:07:26 +00:00
rtc.h Improve a couple of comment. 1998-07-11 08:01:18 +00:00
sio.c Changed %n to %r in devfs name format strings. %n has almost gone away. 1998-07-15 12:18:34 +00:00
sioreg.h Bring back CONSPEED as a last-ditch default if you can't change the speed 1997-06-04 16:25:15 +00:00
syscons.c Changed %n to %r in devfs name format strings. %n has almost gone away. 1998-07-15 12:18:34 +00:00
syscons.h Add support for VESA mode 0x102 (800x600x4) in syscons. You can activate 1998-02-12 22:05:08 +00:00
timerreg.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00