[REVIEW/TEST] Rewritten floppy driver.

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Aug 19 06:43:10 PDT 2004


Please review and test this patch:

	http://phk.freebsd.dk/patch/fdc.patch

This is a substantial rewrite of the floppy driver to make
it GEOM friendly and MP safe.

It would be very beneficial to get it into 5.3 but that hinges
on it getting a very good shakeout first.

- Ditch the state machine and park a kthread for each controller
  and have it service the requests.

- The interrupt handler becomes a simple wakeup() and is now fast
  and MPSAFE.

- Eliminate cdevsw{} and make_dev() and use a native GEOM interface
  instead.

- Improve bus tag/handling abstraction and read the DIGITAL INPUT
  register the right place.

- Implement handling of media change suitable for floppies:  Destroy
  and recreate the provider if the media changes.  Autoprobe on
  first open.  Refuse write open of read-only devices.

- Add sysctl tunables (debug.fdc.*) for various parameters.

- Add central definition of common formats.


MISSING:

	2.88M format (still missing, look for a related XXX comment)

	PC98 porting.

	PCMCIA (YE ?) floppy testing.




-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list