freebsd-dev/sys
Poul-Henning Kamp 1b67be7b75 Rewrite of the floppy driver to make it MPsafe & GEOM friendly:
Centralize the fdctl_wr() function by adding the offset in
	the resource to the softc structure.

	Bugfix: Read the drive-change signal from the correct place:
	same place as the ctl register.

	Remove the cdevsw{} related code and implement a GEOM class.

	Ditch the state-engine and park a thread on each controller
	to service the queue.

	Make the interrupt FAST & MPSAFE since it is just a simple
	wakeup(9) call.

	Rely on a per controller mutex to protect the bioqueues.
	Grab GEOMs topology lock when we have to and Giant when
	ISADMA needs it.  Since all access to the hardware is
	isolated in the per controller thread, the rest of the
	driver is lock & Giant free.

	Create a per-drive queue where requests are parked while
	the motor spins up.  When the motor is running the requests
	are purged to the per controller queue.  This allows
	requests to other drives to be serviced during spin-up.

	Only setup the motor-off timeout when we finish the last
	request on the queue and cancel it when a new request
	arrives.  This fixes the bug in the old code where the motor
	turned off while we were still retrying a request.

	Make the "drive-change" work reliably.  Probe the drive on
	first opens.  Probe with a recal and a seek to cyl=1 to
	reset the drive change line and check again to see if we
	have a media.

	When we see the media disappear we destroy the geom provider,
	create a new one, and flag that autodetection should happen
	next time we see a media (unless a specific format is configured).

	Add sysctl tunables for a lot of drive related parameters.
	If you spend a lot of time waiting for floppies you can
	grab the i82078 pdf from Intels web-page and try tuning
	these.

	Add sysctl debug.fdc.debugflags which will enable various
	kinds of debugging printfs.

	Add central definitions of our well known floppy formats.

	Simplify datastructures for autoselection of format and
	call the code at the right times.

	Bugfix: Remove at least one piece of code which would have
	made 2.88M floppies not work.

	Use implied seeks on enhanced controllers.

	Use multisector transfers on all controllers.  Increase
	ISADMA bounce buffers accordingly.

	Fall back to single sector when retrying.  Reset retry count
	on every successful transaction.

	Sort functions in a more sensible order and generally tidy
	up a fair bit here and there.

	Assorted related fixes and adjustments in userland utilities.

WORKAROUNDS:
	Do allow r/w opens of r/o media but refuse actual write
	operations.  This is necessary until the p4::phk_bufwork
	branch gets integrated (This problem relates to remounting
	not reopening devices, see sys/*/*/${fs}_vfsops.c for details).

	Keep PC98's private copy of the old floppy driver compiling
	and presumably working (see below).

TODO (planned)

	Move probing of drives until after interrupts/timeouts work
	(like for ATA/SCSI drives).

TODO (unplanned)

	This driver should be made to work on PC98 as well.

	Test on YE-DATA PCMCIA floppy drive.

	Fix 2.88M media.

This is a MT5 candidate (depends on the bioq_takefirst() addition).
2004-08-20 15:14:25 +00:00
..
alpha Add a new type, l_uintptr_t, which is an unsigned integer type with the 2004-08-16 07:05:44 +00:00
amd64 Sync with i386 - Optimize intr_execute_handlers a bit etc. 2004-08-16 23:12:30 +00:00
arm Add __elfN(dump_thread). This function is called from __elfN(coredump) 2004-08-11 02:35:06 +00:00
boot Temporary bandaid to help sparc64 systems with ATA disks boot. Recent 2004-08-19 20:13:31 +00:00
cam Add locking to the kqueue subsystem. This also makes the kqueue subsystem 2004-08-15 06:24:42 +00:00
coda Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
compat I'm a dumbass: remember to initialize fh->nf_map to NULL in 2004-08-16 19:25:27 +00:00
conf Unconditionally support the AMD64 GART HW. 2004-08-19 20:58:24 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r133931, 2004-08-18 05:41:21 +00:00
crypto
ddb Damage control. Correcly advance symtab and strtab pointers, not 2004-07-28 08:59:08 +00:00
dev Rewrite of the floppy driver to make it MPsafe & GEOM friendly: 2004-08-20 15:14:25 +00:00
doc Experimental support for using doxygen to generate kernel documentation. 2004-07-11 16:13:57 +00:00
fs Release the vnode cache mutex when calling vgone(), since vgone() may 2004-08-15 21:58:02 +00:00
gdb Comment-out the debugging printf I left in in case there were some 2004-08-10 19:32:33 +00:00
geom A volume can be up if it has a degraded RAID5 plex. 2004-08-19 12:03:27 +00:00
gnu Add locking to the kqueue subsystem. This also makes the kqueue subsystem 2004-08-15 06:24:42 +00:00
i4b Fix a possible hang which apparently occurs during a warm boot (cold boot 2004-07-18 20:13:31 +00:00
i386 Unconditionally support the AMD64 GART HW. 2004-08-19 20:58:24 +00:00
ia64 The existing code fails some corner cases. Replace it with 2004-08-16 22:09:58 +00:00
isa Defer the capture of the "expected sync bits" until the first "normal" 2004-08-17 18:12:37 +00:00
isofs/cd9660 Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
kern Revert the previous change. It works great for 4BSD but causes major 2004-08-20 05:58:38 +00:00
libkern Convert the vfsconf list to a TAILQ. 2004-07-27 22:32:01 +00:00
modules Enable build of Netgraph modules on all architectures. 2004-08-18 11:59:28 +00:00
net Convert ipfw to use PFIL_HOOKS. This is change is transparent to userland 2004-08-17 22:05:54 +00:00
net80211 Add a new network interface flag, IFF_NEEDSGIANT, which will allow 2004-07-27 23:20:45 +00:00
netatalk Inline umich license from COPYRIGHT to make it clear what license the 2004-08-10 03:23:05 +00:00
netatm Avoid casts as lvalues. 2004-07-28 06:59:55 +00:00
netgraph Align netgraph message fields ready for 64-bit (and 128 bit :-) machines. 2004-08-20 01:24:23 +00:00
netinet Fix a stupid typo which prevented an ipfw KLD unload from successfully cleaning 2004-08-20 00:36:55 +00:00
netinet6 Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD 2004-08-14 15:32:40 +00:00
netipsec Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD 2004-08-14 15:32:40 +00:00
netipx Avoid casts as lvalues. Declare local variable as u_char * instead of 2004-07-28 06:58:23 +00:00
netkey
netnatm
netncp
netsmb Avoid casts as lvalues. 2004-07-28 06:59:55 +00:00
nfs
nfs4client Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
nfsclient Put a version element in the VFS filesystem configuration structure 2004-07-30 22:08:52 +00:00
nfsserver If debug.mpsafenet is non-zero, run the NFS server callout without 2004-07-24 02:32:27 +00:00
opencrypto Don't acquire Giant in cryptof_close(), as the code is intended to be 2004-08-10 03:26:17 +00:00
pc98 MFi386: revision 1.597. 2004-08-05 13:01:29 +00:00
pccard Move PNP IDs back into oldcard files 2004-08-13 06:57:31 +00:00
pci fix LOR's in sk. Original patch from dwhite. This moves the memory 2004-08-20 06:22:04 +00:00
posix4
powerpc Instead of "OpenFirmware", "openfirmware", etc. use the official spelling 2004-08-16 15:45:27 +00:00
rpc fix array index out of bounds in rpc->rc_srtt[], rpc->rc_sdrtt[] 2004-07-15 22:21:25 +00:00
security * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
sparc64 - Sync whitespace and comments with i386 GENERIC. 2004-08-16 23:23:21 +00:00
sys Rewrite of the floppy driver to make it MPsafe & GEOM friendly: 2004-08-20 15:14:25 +00:00
tools Pass doxygen doc comments through to the output. 2004-07-11 16:14:24 +00:00
ufs Generalize the UFS bad magic value used to determine when a filesystem 2004-08-19 11:09:13 +00:00
vm Acquire and release Giant around a call to VOP_BMAP(). (This is a 2004-08-19 02:37:12 +00:00
Makefile Add a NO_BOOT knob to prevent building the boot blocks and loader. 2004-08-19 09:54:28 +00:00