Commit Graph

27 Commits

Author SHA1 Message Date
leo 6c521b3fcc Now that formatting works (Thanks Nathan!), it shows that spec_read() is
issueing a 'DIOCGPART' at every read. Avoid re-reading the label at
every format-verify (or read/write on the block-device) by fetching the label
at open-time and caching it until we close.
2000-08-29 20:00:16 +00:00
nathanw 5127aa189d In fdioctl(), allocate fd_formb dynamically when needed, rather than on
the stack, and remove the no-longer-necessary PHOLD()/PRELE() calls
in fdformat().

(This eliminates 1/3 of the instances of PHOLD()/PRELE() in the kernel code.)

XXX We still have too many mostly-redundant floppy drivers.
2000-08-24 20:04:28 +00:00
mrg ca5133d3fb remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 08:22:17 +00:00
thorpej 463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
leo 793cd652e3 Add some {u}vm includes for the sake of PHOLD(). 2000-05-09 10:29:01 +00:00
thorpej 4044b5a41c Use separate callouts for motor-on and motor-off. Fixes a condition
where the floppy driver would wedge because a motor-on timeout would
be cancelled by another I/O operation cancelling a motor-off timeout.

From enami tsugutomo <enami@sm.sony.co.jp>.
2000-04-07 16:58:53 +00:00
leo 27d334cf76 Nuke a bunch of cf_unit abuses. 2000-03-29 14:19:22 +00:00
thorpej b667a5a357 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:30:07 +00:00
thorpej fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
thorpej 52242fdf9f Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:28:59 +00:00
leo 8c73075593 Limit the io-region mapped by this driver to the part actually used.
Otherwise, it conflicts with the wd-driver.
1999-10-22 08:50:59 +00:00
leo 2c1b82026b implement DIOCSDINFO. 1999-10-21 15:03:28 +00:00
leo 54f2532106 Change the way that bit's are cleared in the InterruptPending register of
the 68901. Do this now by _assigning_ ~<bit_to_clear> instead of the
previously used 'andb ~<bit_to_clear>'. The latter caused a rwm-cycle that
caused a race condition to happen when an interrupt arrived between the
Read and Modify-Write.
Anyway, this solved my hanging keyboard problem.
1999-08-06 08:27:30 +00:00
leo 38029cf240 If the floppy has no label, fake one. 1999-05-04 14:29:44 +00:00
leo b981000a00 If the disklabel on the floppy says that there are more tracks and sectors
than the hardware is capable off, believe the hardware...
1998-11-20 12:58:13 +00:00
leo 8a20859c2e Some DEBUG fixups 1998-10-06 09:22:01 +00:00
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
leo bc9ebf17a7 Major overhaul of the atari bus_space implementation. 1998-04-10 08:19:53 +00:00
thorpej 2d73f5ea18 Update for changes to config. 1998-01-12 18:03:58 +00:00
jtk b4777471db use locator defines in "locators.h" to index cf_loc[] 1997-07-17 01:52:54 +00:00
leo d5733f126e Allow formatting of 360Kb floppies. 1997-04-25 19:18:04 +00:00
leo 493e4aaebb The Hades floppy driver now uses intr_establish(). Also the interrupt
accounting is fixed (ie. counted as the right interrupt).
1997-01-01 21:12:56 +00:00
leo 291ced55a4 Get rid of BROKEN_INDIRECT_CONFIG 1996-12-20 12:49:35 +00:00
leo 421158437b Tweak the clockframe structure a bit so we are able to save a few cycles
at interrupt time. (From Gordon Ross).
1996-12-18 12:35:19 +00:00
leo ae092ee765 Merge the formatting code from the i386-port. 1996-12-14 13:47:12 +00:00
thorpej 490126b07a Use bitmask_snprintf(). 1996-11-13 06:48:24 +00:00
leo 76cc53af70 Hades floppy driver. 1996-11-09 22:27:25 +00:00