Commit Graph

55 Commits

Author SHA1 Message Date
thorpej 1adb4489a6 Update for changes to config. 1998-01-12 20:23:38 +00:00
pk 004f196dcf Nuke 5.25 inch formats. 1997-10-19 23:29:47 +00:00
pk a0d6bae726 Add an odd-ball japanese floppy format (PR#2903).
A good time to get rid of the hard-coded floppy sector size.
1997-10-19 22:29:21 +00:00
fair 4c351f243e %x -> 0x%x 1997-07-29 09:58:04 +00:00
pk ec02e14ae2 Remove all `bustype' arguments from map[io]dev() and REG2PHYS(). 1997-05-24 20:16:06 +00:00
pk a05df4e228 * finish off support for the 82077 chip as found on sun4m machines.
* add non-dma mode bit to `specify command', so formatting disks starts
  working (thanks to Jeremy Cooper for finding out about this).
1997-05-02 13:03:44 +00:00
pk efeeba419f sun4c and sun4m `aux' register bits differ slightly. 1997-04-07 21:00:34 +00:00
pk cd9e3a7b59 Remove bogon from otherwise unused fdchwintr() function. 1997-03-31 20:27:32 +00:00
thorpej 2525eee053 Use new machine-independent mountroothook code. 1997-01-31 02:15:54 +00:00
pk a0f6df960f RAMDISK_HOOKS => MEMORY_DISK_HOOKS 1997-01-01 23:46:29 +00:00
pk d5b11782b5 rename: ramdisk => md 1996-12-28 23:27:00 +00:00
pk 841d1ec634 Comply with recent autoconfiguration changes. Diffs graciously
supplied by Chris Demetriou.
1996-12-10 22:54:46 +00:00
pk 92c4c71040 Finish import of floppy formatting code; not really usable yet, lots of
data overruns.
1996-12-10 14:44:53 +00:00
pk 837dd8e3e1 Import formatting code from the i386 version.
Revise communication between hw & sw interrupt handler.
1996-12-08 23:40:32 +00:00
pk c1274b3cff Stabilize timeout values in fdcresult() and out_fdc() by adding delay()s.
Noted by Jason Thorpe over in the i386 driver.
1996-11-27 21:14:33 +00:00
thorpej 35c9c776fe Use bitmask_snprintf(). 1996-11-13 06:13:39 +00:00
christos 7d1960f502 backout previous kprintf change 1996-10-13 02:59:38 +00:00
christos 19d8368f2f printf -> kprintf, sprintf -> ksprintf 1996-10-11 00:44:42 +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
pk b0b2a995cd When booting from a floppy drive and RAMDSK_HOOKS is defined, arrange for
a callback from memory disk driver to load the actual root image.
1996-06-20 20:12:31 +00:00
pk 5d5e7cf75e bootpath detection: some (newer?) v2 prom versions use actual device address,
e.g. `/fd@1,72000000'.
1996-06-16 23:28:18 +00:00
pk 4fa564e10d Fix case where sequence state wasn't updated properly, resulting in
`disk_unbusy' panic.
1996-05-27 00:10:40 +00:00
pk e147a74bbb Chip needs much more time to think things over (up to 2 seconds to complete
a `recalibrate' command if no flop present).
1996-04-29 12:07:32 +00:00
christos a897ec996a Remove dependency on <sys/cpu.h> 1996-04-22 02:42:00 +00:00
pk e4394459a1 `bootdv' is gone. Instead, set the device pointer in the `struct bootpath'
that is passed in the attach arguments.
1996-04-10 20:46:05 +00:00
christos f34addbb3b - remove dependency to dev_conf.h
- remove unneeded casts for %b
1996-04-01 17:33:10 +00:00
pk 2f3ec93250 Various cleanup; mostly trailing spaces/tabs. 1996-03-31 22:38:29 +00:00
pk c299fd2d61 Bitfields are unsigned. 1996-03-26 01:28:50 +00:00
pk a8564828ee Back to normal printf()s, now that gcc understands `%b'. 1996-03-26 00:35:25 +00:00
thorpej 3cd14f7597 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 02:00:30 +00:00
christos 5c32202b7e fix format in printf() 1996-03-16 23:28:33 +00:00
christos 03b701e393 Bring prototypes into scope and fix compiler warnings. 1996-03-14 19:44:30 +00:00
pk ba0eb7ea59 Use CPU-type macros. 1996-02-25 21:45:53 +00:00
thorpej 8a6ad45eed In fdcretry(), if we're not using implied seeks, set the state to DOSEEK
rather than SEEKCOMPLETE before retrying the operation.  If implied seeks
are being used, the state is set to DOIO (no change).  This is why I
couldn't reproduce the disk_unbusy() panic on my SS2; it uses implied
seeks.  Patch from John F. Woods <jfw@jfwhome.funhouse.com>
1996-02-10 18:37:36 +00:00
thorpej b97cbfb606 Implement DIOCLOCK. It's a no-op in this driver. 1996-01-30 18:31:05 +00:00
thorpej 353f4388fb Use a shutdownhook to make sure the drive motor is turned off
at halt/reboot time, as suggested by Perry Metzger.
1996-01-16 19:35:06 +00:00
thorpej 8a5504241e Three distinct changes:
- Better disklabel handling.  While a disklabel isn't used
	  in the driver, some versions of the OpenPROM insist on
	  one being present in order to boot from floppy.  These
	  changes provide a default label (in a way similar to how
	  the SCSI disk driver provides a default) so that a user
	  can more easily place the label on the disk.

	- Fix semi-bug in bootpath handling.  It appears as if the
	  bootpath can appear in a couple of formats: "/fd@0,0", which
	  is what bootpath_fake() creates on v0 proms and may be
	  passed by some v2 proms, and "/fd0" which is what the
	  v2 prom on my SS2 passes.  We now handle both formats.

	- Use a mountroot hook to eject the floppy and wait for
	  the user to insert a filesystem floppy if we're the boot/root
	  device.
1996-01-15 00:14:42 +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
pk 7430f70694 Return `no error' after ejecting; per Jason. 1996-01-11 21:18:40 +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
pk 0d1981416d Adapt to changed mapiodev() interface. 1995-12-11 12:43:14 +00:00
pk c7d1d39b3e dk_device => device in controller structure (noted by Jason Thorpe). 1995-11-11 21:12:50 +00:00
pk c4dc969b09 Point `bootdv' at the disk device instead of the controller (from Jason Thorpe). 1995-10-09 22:33:07 +00:00
pk 32c023995c Bring reset logic into interrupt state machine. 1995-10-03 17:32:12 +00:00
pk fb58a99a8f Fix some bogus calls to {read/write}disklabel(). 1995-10-02 21:04:45 +00:00
pk ffbae23b6e Set `bootdv' if booted from the floppy drive. 1995-08-18 10:30:16 +00:00
pk 9013a7a6e2 Add xxread/xxwrite. 1995-07-05 13:34:10 +00:00
pk 92414dd1c7 Use a different method to discriminate a 82077 from a 82072 (from Chris Torek);
using the NE7CMD_VERSION command is too unreliable.
1995-05-20 20:03:37 +00:00
pk ed9d5444a2 Really test # of status bytes. 1995-05-16 17:02:00 +00:00
pk 64f2d35a0f Do not report each pseudo-DMA overrun as a (soft) error.
Add a small heuristic to converge on an acceptable threshold value.
1995-04-25 14:44:44 +00:00