summaryrefslogtreecommitdiffstats
path: root/usr.sbin/fdcontrol
Commit message (Collapse)AuthorAgeFilesLines
* Force the use of the tbl(1) preprocessor.ru2006-10-251-1/+1
|
* Make fdcontrol work again. It has been broken for a while. It triespeter2005-10-261-1/+0
| | | | | | to set the floppy controller parameters, but that requires that the device node be open in O_RDWR mode now. I think it is broken in 6.0 as well. This line looks like a stray anyway.
* Cleanup usr.sbin/fd* so they can compile under WARNS=6.delphij2005-01-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | fdcontrol/fdcontrol.c: - Add const constraint to an intermediate value which is not supposed to be changed elsewhere. fdread/fdread.c: - Use _devname in favor of devname to avoid name conflicit. - -1 is less than any positive number so in order to get the block to function, we should get the block a little earlier. - Cast to remove signed when we are sure that a return value is positive, or is compared with an positive number (tracknumber of a floppy disk is not likely to have UINT_MAX/2 anyway) fdread/fdutil.c: - Use more specific initializer fdwrite/fdwrite.c: - Use static on format_track since it's not referenced in other places. - Use const char* to represent string constant. Bump WARNS accordingly.
* Follow style.Makefile(5):delphij2005-01-081-1/+1
| | | | | | WARNS comes before CFLAGS This reduces diff against my local branch.
* Rewrite of the floppy driver to make it MPsafe & GEOM friendly:phk2004-08-201-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+2
|
* Fixed warnings (missing .Ed call).ru2004-06-041-11/+11
| | | | | Fixed grammar (missing punctuation). Fixed screwup with the SEE ALSO section.
* Add PC98 supports.nyan2004-03-281-0/+4
| | | | Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp> (mostly)
* Backed out previous commit (bogus addition of -static to CFLAGS).bde2004-02-261-3/+2
| | | | Sorted macros (in build order).
* Update manual page.phk2004-02-251-19/+26
| | | | Give 8" example for the heck of it.
* Recognize "auto" format.phk2004-02-252-6/+47
| | | | Be more verbose when asked to.
* Grammar tweaking. "has been" is very often not as good as "is" or "was".markm2003-07-061-6/+6
|
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+2
|
* style.Makefile(5)obrien2003-04-041-2/+2
|
* english(4) police.schweikh2002-12-271-1/+1
|
* mdoc(7) police: tidy up the markup.ru2002-01-101-50/+79
|
* Second round of floppy disk driver documentation updates: document thejoerg2001-12-251-52/+251
| | | | | | | changes in the userland utilities. For fdcontrol(8), i now finally keep my promise made more than 7 years ago that ``the fdcontrol utility is currently under development and the user interface will likely change''. :-)
* Long promised major enhancement set for the floppy disk driver:joerg2001-12-152-86/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . The main device node now supports automatic density selection for commonly used media densities. So you can stuff your 1.44 MB and 720 KB media into your drive and just access /dev/fd0, no questions asked. It's all that easy, isn't it? :) . Device density handling has been completely overhauled. The old way of hardwired kernel density knowledge is no longer there. Instead, the kernel now implements 16 subdevices per drive. The first subdevice uses automatic density selection, while the remaining 15 devices are freely programmable. They can be assigned an arbitrary name of the form /dev/fd[:digit]+.[:digit:]{1,4}, where the second number is meant to either implement device names that are mnemonic for their raw capacity (as it used to be), or they can alternatively be created as "anonymous" devices like fd0.1 through fd0.15, depending on the taste of the administrator. After creating a subdevice, it is initialized to the maximal native density of the respective drive type, so it needs to be customized for other densities by using fdcontrol(8). Pseudo-partition devices (fd0a through fd0h) are still supported as symlinks. . The old hack to use flags 0x1 to always assume drive 0 were there is no longer supported; this is now supposed to be done by wiring the devices down from the loader via device flags. On IA32 architectures, the first two drives are looked up in the CMOS configuration records though. On PCMCIA (i. e., the Y-E Data controller of the Toshiba Libretto), a single drive is always assumed. . Other specialities like disabling the FIFO and not probing the drive at boot-time are selected by per-controller or per-drive flags, too. . Unit attentions (media has been changed) are supposed to be detected now; density autoselection only occurs after a unit attention. (Can be turned off by a per-drive flag, this will cause each Fdopen() to perform the autoselection.) . FM floppies can be handled now (on controllers that actually support it -- not all do these days). . Fdopen() can be told to avoid density selection by setting O_NONBLOCK; this leaves the descriptor in a half-opened state where only a few ioctls are accepted. This is necessary to run fdformat on a device that uses automatic density selection (since you cannot autoselect on an unformatted medium, obviously). . Just differentiate between a plain old NE765 and the enhanced chips, but don't try more; the existing code was wrong and only misdetected the chips anyway. BUGS and TODOs: . All documentation update still needs to be done. . Formatting not-so-standard format yields unpredictable results; i have yet to figure out why this happens. "Standard" formats like 720 and 1440 KB do work, however. . rc scripts are needed to setup device nodes with nonstandard densities (like the old /dev/fdN.MMM we used to have). . Obtaining device flags from the kernel environment doesn't work yet, thus currently only drives that are present in (IA32) CMOS are really detected. Someone who knows the odds and ends about device flags is needed here, i can't figure out what i'm doing wrong. . 2.88 MB still needs to be done.
* mdoc(7) police:ru2001-08-071-5/+3
| | | | | | | Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block.
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-1/+2
| | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
* Remove whitespace at EOL.dd2001-07-151-3/+3
|
* Add appropriate includes and prototypes; staticize; set WARNS=2. Alsodd2001-06-262-6/+11
| | | | | | minor Makefile nits. Submitted by: Mike Barcroft <mike@q9media.com>
* Part #2 of the <machine/ioctl_fd.h> => <sys/fdcio.h> move: handle thejoerg2001-06-061-1/+1
| | | | tools in usr.sbin/fd*.
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for usr.sbin/ to 8.ru2001-03-201-1/+2
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-101-2/+1
|
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-011-3/+6
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* Xref to warn(3) which is used instead of perror.charnier1999-10-171-2/+2
|
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-1/+3
| | | | | | | | | | | | | | | | | track. The Id line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.charnier1998-03-231-1/+1
|
* Perror() -> warn().charnier1997-09-171-7/+11
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-1/+1
| | | | posix standard on the topic.
* Update to work under Lite2 includespeter1997-03-111-0/+1
|
* Sort cross references.wosch1997-01-201-2/+2
|
* Minor formatting/style fixes.mpp1996-12-091-7/+4
| | | | Submitted by: Sandro Sigala <sandro@cat.local.net> as part of PR# 2134
* Fix a bunch of spelling errors in a bunch of man pages.mpp1996-01-301-2/+2
|
* Remove trailing whitespace.rgrimes1995-05-301-7/+7
|
* Import the fdcontrol command. It has been in 1.1.5, but obviously has been ↵joerg1994-10-303-0/+241
lost on its way to 2.0. This program uses the FD_DEBUG ioctl, which will have to be commited yet.
OpenPOWER on IntegriCloud