* added no multi-buffer override for 3c503
*
* Revision 2.1 93/09/29 12:32:12 davidg
* changed multi-buffer count for 16bit 3c503's from 5 to 2 after
* noticing that the transmitter becomes idle because of so many
* packets to load.
*
* Revision 2.0 93/09/29 00:00:19 davidg
* many changes, rewrites, additions, etc. Now supports the
* NE1000, NE2000, WD8003, WD8013, 3C503, 16bit 3C503, and
* a variety of similar clones. 16bit 3c503 now does multi
* transmit buffers. Nearly every part of the driver has
* changed in some way since rev 1.30.
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
message for Bruces changes:
>From: bde@kralizec.zeta.org.au (Bruce Evans)
>Subject: fixes for fd driver
I think I've fixed some bugs in the 0.2.4 fd driver.
1. The main cause of hangs was that there was no timeout for seeks. So
attempting i/o with no floppy in the drive hung iff a seek was required.
2. Opens of unattached drives were allowed. The kernel usually paniced
soon after due to a bad pointer.
3. Some timeout functions ran at splclock() instead of splbio(). This
may not have mattered.
4. The state machine was left in a funny state after a timeout.
5. Some function headers were new-style.
6. I picked up some code posted the other day to implement label ioctls.
Now `disklabel fd0' works. See a comment for how to modify conf.c.
>Subject: Bad bug in kbdtables.h [FreeBSD]
I found a bug in /sys/i386/isa/kbdtables.h which contain the
different keyboard layouts for syscons. This regards all tables exept
the Danish and US. When compiling the kernel with any other keymapping
than Danish or none at all (US), you get an error that 'key_map' is undefined.
This is because there is a typo in the name of the struct containing
the tables, keymap intead of key_map.
That is because TIOCMGET was broken. Yes...this is known for some time
and no, we (Bruce and me) never posted it. Why? Simply because we choose
to post fixes when we fixed most of the bugs.
Anyway..now that the slip problems are coming, here is a fix for
correct TIOCMGET behaviour.
-Guido
Note: this should be tested first (Rich?). Tested by rgrimes
1) fixed 3c503 lock-up if the thinwire cable was disconnected at boot time
2) 8013EBT boards now work (quite well!) in 16bit/16k mode
3) ED_NO_DOUBLE_BUFFERING flag now works
4) slightly higer performance (about 3%) with 16bit WD/SMC boards
5) support for WD8013WC (10BaseT) boards
Additionally, the probe code has been reorganized to be much cleaner. This
revision of the driver is 1.25. The release notes have been updated as well.
Subject: Re: Some small errors in GAMMA
4. Move printf("\n"); at line 491 in "/sys/i386/isa/sio.c" to after
COM_MULTIPORT block at line 512.
From rgrimes:
The above would cause the word (multiport) with out a new line to
appear after the uart type message if you had COM_MULTIPORT enabled.
reinitialized between while loops. Added comments about what was going
on in the out_fdc routine.
out_fdc now returns if the direction bit is not set in time instead of
trying to wait for MRQ to get cleared.
profiling, and various protection checks that cause security holes
and system crashes.
* Changed min/max/bcmp/ffs/strlen to be static inline functions
- included from cpufunc.h in via systm.h. This change
improves performance in many parts of the kernel - up to 5% in the
networking layer alone. Note that this requires systm.h to be included
in any file that uses these functions otherwise it won't be able to
find them during the load.
* Fixed incorrect call to splx() in if_is.c
* Fixed bogus variable assignment to splx() in if_ed.c
* them in cpufunc.h. Modified wait loop in reset to look a little better.
* Added read for talley counters to prevent an infinite loop on old
* 8003E's if they (the counters) overflow.
asic register even if the board isn't a 3c503. This caused old 8003E's not
to work because they ignore IO address bits >10bits and the 3c503 asic is
located at +0x400....the offset was ignored by the 8003E and so the
value was written to one of the NIC registers. The bug was discovered by
Wolfgang Solfrank.
8bit or 16bit operation, and a flag to disable transmitter double buffering.
See the updated "ed.relnotes" file for information about how to set
the flags.
This should be considered the first "production" release. It still
needs a manual page, though.
way of doing things. There still remain several drivers that need to
be updated. Also added a compile-time option to pccons to switch the
control and caps-lock keys (REVERSE_CAPS_CTRL) - added for my personal
sanity.