freebsd-dev/sys/i386/isa
Rodney W. Grimes 92ed385a09 >From: bde@kralizec.zeta.org.au (Bruce Evans)
Date: Thu, 16 Sep 93 01:35:10 +1000
Julian writes:

>In fact DEVIDLE and FINDWORK ended up being basically equivalent.
>the bit I wonder about, is the returning of 0.. What (other than
>another request from somewhere else in the kernel) is going to start
>work on the next item on the queue?

I think removing FINDWORK would make things clearer.

Nothing much is going to start work on the next item.  However, it is
pointless to continue processing the queue for the same unready drive.
Aborting all reads and trying harder to perform all writes would be
better.
Julian writes.

> no, actually it should be:
> fdt = fd_data[FDUNIT(minor(dev))].ft;

Fixed.
From: bde@kralizec.zeta.org.au (Bruce Evans)
Date: Thu, 16 Sep 93 22:56:01 +1000
The fd driver reported the wrong cylinder/head/sector numbers after an
error (ST3 is only valid after a sense-drive command), and didn't report
fs block numbers (diskerr was not used).

There was an old problem with writes to block fd devices.   Try this:

1. write protect floppy in fd0.
2. tar cf /dev/fd0a /dev/null.  Repeat a few times.  Later writes tend to
   terminate earlier.
   3. un-write protect floppy.
   4. repeat step 2.  The writes tend to return 0, 2048, 4096, ... and then
      succeed.

This was caused by a bug in vfs__bios.c.  (The bug is fixed in NetBSD's
vfs_bio.c.)  fd.c sets bp->b_resid to nonzero after an error.  vfs__bios.c
was not initializing bp->b_resid.  This causes some writes to terminate
early (e.g., writes to block devices; see spec_write()).

Related funnies:

1. Nothing tries to write the residual bytes.
2. The wd driver sets bp->b_resid to 0 after an error, so there's no
   way anything else could write the residual bytes.
3. I use the block fd device for tar because the raw device seemed to
   have more bugs long ago, and because it ought to be able to handle
   buffering more transparently (I don't want to have to know the
   device size).  But spec_write() always uses the size BLKDEV_IOSIZE
   == 2048 which is too small.  For disks it should use the size of
   one track (rounded down to meet the next track boundary or the i/o
   size).  Here it would help if the DIOCGPART ioctl worked.  But
   DIOCGPART is not implemented for floppies, and the disk size is
   ignored except for partitions of type FS_BSDFFS.

Bruce
1993-09-23 15:22:57 +00:00
..
ic Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
aha1542.c Revised drivers from Julian. 1993-08-28 03:07:44 +00:00
aha1742.c Revised drivers from Julian. 1993-08-28 03:07:44 +00:00
bt742a.c Revised drivers from Julian. 1993-08-28 03:07:44 +00:00
clock.c Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
fd.c >From: bde@kralizec.zeta.org.au (Bruce Evans) 1993-09-23 15:22:57 +00:00
fdreg.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
icu.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
icu.s Removed patch kit header, added $Id$ 1993-09-06 16:12:05 +00:00
if_ed.c rewrote interrupt code to be cleaner, fixed up some other parts 1993-09-22 17:47:43 +00:00
if_edreg.h rewrote interrupt code to be cleaner, fixed up some other parts 1993-09-22 17:47:43 +00:00
if_is.c Fixed usage of arpcom and #define blahblah arpcom.blahblah, fixed ioctl 1993-09-06 16:13:15 +00:00
if_isreg.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
isa_device.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
isa.c Corrected off by 2 error in DELAY macro (it was delaying for 2 * value). 1993-08-24 01:24:43 +00:00
isa.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
iso8859.font Added necessary files for syscons (may move font include later, but for now 1993-07-26 21:21:11 +00:00
kbd.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
kbdtables.h >From: paul@u.tvt.se (Paul Pries) 1993-09-15 23:03:21 +00:00
lpt.c From Bruce Evans: 1993-07-13 18:52:49 +00:00
lptreg.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
npx.c Modified attach printf's so that the output is compatible with the "new" 1993-07-15 17:53:14 +00:00
rtc.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
sio.c From guido@gvr.win.tue.nl Wed Sep 8 13:34:16 1993 1993-09-10 16:59:16 +00:00
sioreg.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
spkr.c * Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading, 1993-07-27 10:52:31 +00:00
syscons.c Soren's latest syscons changes. 1993-09-08 22:11:48 +00:00
timerreg.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
ultra14f.c Revised drivers from Julian. 1993-08-28 03:07:44 +00:00
vector.s Removed patch kit header, added $Id$ 1993-09-06 16:12:05 +00:00
wd.c Reverting wd driver back to version before Bruces new driver until the 1993-09-07 02:08:51 +00:00
wdreg.h Reverting wd driver back to version before Bruces new driver until the 1993-09-07 02:08:51 +00:00
wt.c Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
wtreg.h Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00