Commit Graph

116 Commits

Author SHA1 Message Date
thorpej 1f93872e5c Kludge around i/o port overlap w/ the "wdc" driver. 1998-01-15 06:11:55 +00:00
thorpej 36760d9d94 Update for changes to config. 1998-01-12 18:59:04 +00:00
mikel 718221a852 fix format string in FD_DEBUG printf(); from Eric Haszlakiewicz in PR 4692 1997-12-16 07:35:45 +00:00
thorpej 1d1fd17f73 Don't panic if we fail to remap i/o or mem space in the attach function.
Instead, print a diagnostic and return.  (Some drivers do this already.)

Also, normalize the diagnostic message, and fix some places where the
printfs were getting ugly.
1997-10-20 20:07:57 +00:00
thorpej 29500b20c0 Make sure the i/o and/or mem addresses aren't wildcarded (i.e. -1) before
using the address in a bus_space_map() call.
1997-10-19 18:56:39 +00:00
explorer 80513cb5ae o Make usage of /dev/random dependant on
pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.
1997-10-13 00:46:08 +00:00
explorer 735c351f71 Add hooks to insert timing info into the random system 1997-10-10 01:49:12 +00:00
mycroft 6da60facfb GC a bunch of NEWCONFIG stuff. 1997-09-07 13:05:39 +00:00
jtk bd611fe5b6 use locator defines in "locators.h" to index cf_loc[]
still to be done and/or decided not to be done: replace all *UNK uses in
isa code with the native names from locators.h
1997-07-17 01:06:27 +00:00
fvdl 9270fc61c1 Turn some bus_space_write_2s back to bus_space_write1s, like they should
be. Seemingly leftover from bus_io -> bus_space transition.

Fixes PR 3780, from Thorsten Frueauf
1997-06-23 23:46:40 +00:00
thorpej 63bad43fa4 Pull thorpej-bus-dma branch into mainline. 1997-06-06 23:28:40 +00:00
thorpej 92796a6d43 Add a mountroothook that prompts the operator to insert a file system
floppy, a'la the SPARC port.
1997-03-15 01:34:10 +00:00
mycroft 5369bfe88a s/soft error/soft error (corrected)/, to avoid confusion. 1997-01-09 04:30:08 +00:00
jtk 6afa1586ff repair fdopen() to allow multiple opens at same density (was broken with fdformat) 1996-12-20 12:21:48 +00:00
jonathan 51194cb458 Fix #ifdef DEBUG prinf() lint: bp->b_bcount is long, not int. 1996-12-01 00:43:45 +00:00
jtk 6f602476b2 tabstop corrections, thanks to Paul Kranenburg 1996-11-30 01:45:39 +00:00
jtk 88449561be Add floppy formatting facility.
i386 floppy controller code came from FreeBSD, as worked on by:
   jc@irbs.UUCP (John Capo)
   vak@zebub.msk.su (Serge Vakulenko)
   ache@astral.msk.su (Andrew A. Chernov)
   joerg_wunsch@uriah.sax.de (Joerg Wunsch)
   dufault@hda.com (Peter Dufault)

formatting ioctl interface is generalized to an MI interface.  see fdc(4)
and fdformat(1)
1996-11-29 16:28:38 +00:00
thorpej 446317125e In fdcresult(), the loop that pulls status off the controller is treated
as a "timeout", yet there's no specific delay in each iteration.  Add
a small delay (10 usec... pretty arbitrary) in each iteration.  This
fixes the "fdcresult: timeout" problems I've been having on my 200MHz P6.
1996-11-27 19:53:51 +00:00
thorpej a0dffcafc2 Use bitmask_snprintf(). 1996-11-13 07:00:30 +00:00
thorpej 16c4c5af26 New bus.h implementation/interface:
- No more distinction between i/o-mapped and memory-mapped
	  devices.  It's all "bus space" now, and space tags
	  differentiate the space with finer grain than the
	  bus chipset tag.
	- Add memory barrier methods.
	- Implement space alloc/free methods.
	- Implement region read/write methods (like memcpy to/from
	  bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.
1996-10-21 22:24:37 +00:00
christos bd73314ed9 backout previous kprintf changes 1996-10-13 03:19:38 +00:00
christos 06555645c2 printf -> kprintf, sprintf -> ksprintf 1996-10-11 00:24:36 +00:00
explorer e331708d2f turn off floppy motor (and light) even if the drive isn't found. This fixes
some laptop indicator lights which would be stuck on after the probe
1996-10-09 16:10:14 +00:00
mycroft 0947abc4ec Oops; fix typo. 1996-08-31 05:10:03 +00:00
mycroft fbfd18b011 Make sure b_resid is always set before biodone(). 1996-08-30 19:59:07 +00:00
cgd 2a73ef60b7 change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
1996-08-27 21:53:46 +00:00
mycroft eda98d375d Use intr.h. 1996-05-12 23:11:54 +00:00
thorpej ea8aad3319 Use <machine/bus.h> ... on the right track to making this an MI driver. 1996-05-12 01:37:02 +00:00
christos 099b45aa2a - Add missing prototypes.
- Fix gcc warnings
1996-05-03 19:14:50 +00:00
cgd 79e0a8a2b9 update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().
1996-04-11 22:15:08 +00:00
thorpej 82d914d090 New device attachment scheme:
- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.
1996-03-17 01:26:49 +00:00
mycroft 7f1ba9f148 Update for changed DMA interface. 1996-03-04 04:01:03 +00:00
thorpej d586688437 In fdcretry(), set the state to DOSEEK rather than SEEKCOMPLETE before
retrying the operation.  Fixes disk_unbusy() imbalance and really seems
like the right thing to do in case it was the seek that failed.  Takes
care of PR #1985.  Patch from John F. Woods <jfw@jfwhome.funhouse.com>
1996-02-10 18:31:13 +00:00
thorpej 43b4486bb3 Balance calls to disk_busy() and disk_unbusy() properly to avoid
dk_busy < 0 panics.  Count seeks.
1996-01-12 00:19:29 +00:00
thorpej 5b39541e48 New generic disk framework. Highlights:
- New metrics handling.  Metrics are now kept in the new
	  `struct disk'.  Busy time is now stored as a timeval, and
	  transfer count in bytes.

	- Storage for disklabels is now dynamically allocated, so that
	  the size of the disk structure is not machine-dependent.

	- Several new functions for attaching and detaching disks, and
	  handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
1996-01-07 22:01:38 +00:00
perry 74e1e47aeb fixed my own pr 1758 -- the floppy drive motor was not being turned off
at halt time, especially if a floppy was mounted. Added a shutdown hook
to turn off the motor. Per a request by mycroft, the cookie from the hook
is saved in a new member I added to the fd_softc structure.
1995-12-28 15:48:57 +00:00
mycroft 3da4b2a160 The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
1995-12-24 02:29:35 +00:00
mycroft e11b690b80 Require drives 2 and 3 to be explicitly configured. 1995-08-21 06:56:14 +00:00
mycroft 7263209ce6 Make each disk and tape driver define its own read and write functions.
Deprecate rawread() and rawwrite() completely.  Remove d_strategy from cdevsw to
force the abstraction barrier.
1995-07-04 07:15:28 +00:00
cgd 2b71eae2c7 note that most of dev/ic's contents have changed names 1995-06-28 04:30:30 +00:00
cgd c8858650b0 DEBUG -> FD_DEBUG, so this thing doesn't spew when used with options DEBUG 1995-06-26 05:47:40 +00:00
cgd dd3e2df4a7 make dump stubs consistent. fix other piece of code to compile
properly with DEBUG; used bogus variable.
1995-06-26 05:20:40 +00:00
cgd 2e0e8fc49d use the machine-independent definitions for the mc146818.
wrap the various uses of the chip (including the uses of the NVRAM on it)
around the new defintions, structures, and functions specified in the header.
1995-05-04 19:39:08 +00:00
cgd 8a640328ed clean up several ISA device interfaces: autoconfiguration, header
inclusion, and interrupt configuration.  more work still needs to be done,
but it's getting better...
1995-04-17 12:06:30 +00:00
mycroft f8f99c94a1 Fdclose --> fdclose; no longer conflicts. 1995-04-10 04:18:14 +00:00
mycroft 4740006541 Oops. 1995-01-13 14:05:17 +00:00
mycroft 7bb384b66c Avoid some repeated multiplications. 1995-01-13 11:14:27 +00:00
mycroft c541b630fc Add a sc_bcount, similar to wd.c. 1995-01-13 10:35:58 +00:00
mycroft da7d74e3dc Fix typos. 1995-01-13 08:37:25 +00:00
mycroft ca84c10497 Only allow opening one density at a time. 1995-01-13 08:29:25 +00:00