freebsd-skq/usr.sbin
wpaul ce0ede96f1 Take the support for the 8139C+/8169/8169S/8110S chips out of the
rl(4) driver and put it in a new re(4) driver. The re(4) driver shares
the if_rlreg.h file with rl(4) but is a separate module. (Ultimately
I may change this. For now, it's convenient.)

rl(4) has been modified so that it will never attach to an 8139C+
chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to
match the 8169/8169S/8110S gigE chips. if_re.c contains the same
basic code that was originally bolted onto if_rl.c, with the
following updates:

- Added support for jumbo frames. Currently, there seems to be
  a limit of approximately 6200 bytes for jumbo frames on transmit.
  (This was determined via experimentation.) The 8169S/8110S chips
  apparently are limited to 7.5K frames on transmit. This may require
  some more work, though the framework to handle jumbo frames on RX
  is in place: the re_rxeof() routine will gather up frames than span
  multiple 2K clusters into a single mbuf list.

- Fixed bug in re_txeof(): if we reap some of the TX buffers,
  but there are still some pending, re-arm the timer before exiting
  re_txeof() so that another timeout interrupt will be generated, just
  in case re_start() doesn't do it for us.

- Handle the 'link state changed' interrupt

- Fix a detach bug. If re(4) is loaded as a module, and you do
  tcpdump -i re0, then you do 'kldunload if_re,' the system will
  panic after a few seconds. This happens because ether_ifdetach()
  ends up calling the BPF detach code, which notices the interface
  is in promiscuous mode and tries to switch promisc mode off while
  detaching the BPF listner. This ultimately results in a call
  to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init()
  to handle the IFF_PROMISC flag change. Unfortunately, calling re_init()
  here turns the chip back on and restarts the 1-second timeout loop
  that drives re_tick(). By the time the timeout fires, if_re.ko
  has been unloaded, which results in a call to invalid code and
  blows up the system.

  To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(),
  which stops the ioctl routine from trying to reset the chip.

- Modified comments in re_rxeof() relating to the difference in
  RX descriptor status bit layout between the 8139C+ and the gigE
  chips. The layout is different because the frame length field
  was expanded from 12 bits to 13, and they got rid of one of the
  status bits to make room.

- Add diagnostic code (re_diag()) to test for the case where a user
  has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some
  NICs have the REQ64# and ACK64# lines connected even though the
  board is 32-bit only (in this case, they should be pulled high).
  This fools the chip into doing 64-bit DMA transfers even though
  there is no 64-bit data path. To detect this, re_diag() puts the
  chip into digital loopback mode and sets the receiver to promiscuous
  mode, then initiates a single 64-byte packet transmission. The
  frame is echoed back to the host, and if the frame contents are
  intact, we know DMA is working correctly, otherwise we complain
  loudly on the console and abort the device attach. (At the moment,
  I don't know of any way to work around the problem other than
  physically modifying the board, so until/unless I can think of a
  software workaround, this will have do to.)

- Created re(4) man page

- Modified rlphy.c to allow re(4) to attach as well as rl(4).

Note that this code works for the sample 8169/Marvell 88E1000 NIC
that I have, but probably won't work for the 8169S/8110S chips.
RealTek has sent me some sample NICs, but they haven't arrived yet.
I will probably need to add an rlgphy driver to handle the on-board
PHY in the 8169S/8110S (it needs special DSP initialization).
2003-09-08 02:11:25 +00:00
..
ac Remove unused #includes. Eliminate castings by using size_t instead of int. 2002-10-17 13:19:47 +00:00
accton Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
acpi Now that amldb(8) is no longer needed by acpidump, remove the last vestiges 2003-08-28 03:38:18 +00:00
adduser Typo. 2003-06-24 15:20:43 +00:00
amd Sync with fresh generated file, keep our changed settings. This seems 2003-09-02 17:38:30 +00:00
ancontrol - Add support for Cisco latest firmware RID sizes that supports 25 SSIDs! 2003-08-20 03:46:05 +00:00
apm Remove the zzz files since they have been moved to src/usr.sbin/zzz 2003-07-14 16:32:45 +00:00
apmd - Set close on exec flag for device file descriptors. 2003-06-22 05:57:34 +00:00
arp Implement a new option: -i, which will allow to limit 2003-07-18 13:48:06 +00:00
asf Tidy up the manpage. 2003-06-10 05:29:14 +00:00
atm Use a size_t for variables that need to hold buffer lengths. 2003-07-29 13:40:52 +00:00
bluetooth Account for the fact that "buildworld" builds in the 'obj' tree 2003-06-24 18:45:22 +00:00
boot0cfg Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
boot98cfg s/DIOCGPC98/DIOCSPC98/ 2003-05-02 14:55:42 +00:00
bootparamd fix problem with uninitalized ptr (from PR) 2003-06-20 04:54:27 +00:00
btxld Make this work on different endianness machines. 2003-03-11 13:48:58 +00:00
burncd Fix "write from stdin". 2003-07-26 12:14:58 +00:00
cdcontrol Retire 'c' partition for a CD device. 2003-09-01 12:50:02 +00:00
chkgrp Warn if there is no newline at the end of the group file. 2003-06-06 07:10:39 +00:00
chown Use uid_t. 2003-09-07 16:43:53 +00:00
chroot Allow the optional setting of a user, primary group, or grouplist 2003-06-07 10:56:12 +00:00
ckdist - Align the function prototype of the external `crc' function with 2003-03-13 23:34:18 +00:00
config Add a reference to config(5) in the SEE ALSO section. 2003-08-06 21:41:35 +00:00
cron Fix a coredump that would occur when fdopen was unable to 2003-06-19 20:04:51 +00:00
crunch Fix a bug that caused i386 to produce broken binaries for big-endian 2003-08-08 15:44:17 +00:00
ctm No need to define externs for getopt interface. 2003-08-07 05:47:49 +00:00
daemon add FBSDID 2003-07-06 12:44:11 +00:00
devinfo -v now also prints the pnpinfo and location information for the devices 2003-02-17 18:56:54 +00:00
digictl style.Makefile(5) 2003-04-04 17:49:21 +00:00
diskinfo Assorted mdoc(7) fixes. 2003-05-31 18:07:09 +00:00
editmap Remove MAINTAINER= lines from individual Makefiles in favor of the 2003-07-07 03:54:04 +00:00
edquota Minor grammar, punctuation, and wording fixes 2003-07-29 13:25:56 +00:00
elf2exe
extattr Update lsextattr(8) to use the new extattr_list_*() APIs, rather than 2003-06-05 04:30:00 +00:00
extattrctl When giving examples of how to use extattrctl(8) to configure UFS1 2003-05-14 20:31:06 +00:00
faithd Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
fdcontrol Grammar tweaking. "has been" is very often not as good as "is" or "was". 2003-07-06 18:27:23 +00:00
fdformat
fdread
fdwrite
fwcontrol - Use /dev/fwX.Y rather than /dev/fwX. 2003-08-05 03:26:14 +00:00
getfmac sigh... revert the previous change; this isn't getpmac 2003-01-15 03:13:51 +00:00
getpmac mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
gstat Sigh, I guess this manpage used cat(1) as a template? 2003-05-31 18:19:50 +00:00
i4b Fix bug in find_matching_entry_incoming(): the loop checking the allowed 2003-07-31 09:13:22 +00:00
ifmcstat style.Makefile(5) 2003-04-04 17:49:21 +00:00
inetd Move my inetd maintainer note to src/MAINTAINERS. 2003-07-15 16:52:22 +00:00
iostat Remove MAINTAINER= lines in the makefiles for camcontrol, iostat, libcam 2003-06-14 05:28:01 +00:00
ipftest Move my maintainership of parts of ipfilter back to Darren Reed 2003-06-06 11:30:50 +00:00
ipresend Move my maintainership of parts of ipfilter back to Darren Reed 2003-06-06 11:30:50 +00:00
ipsend Move my maintainership of parts of ipfilter back to Darren Reed 2003-06-06 11:30:50 +00:00
iptest Move my maintainership of parts of ipfilter back to Darren Reed 2003-06-06 11:30:50 +00:00
IPXrouted The .Xr utility 2003-06-08 14:06:45 +00:00
jail add FBSDID 2003-07-06 12:44:11 +00:00
jexec Make jexec duplicate the actions of the shell searching for an 2003-07-04 19:14:27 +00:00
jls IP addresses can be up to 15 characters long, not 12. 2003-04-22 13:24:56 +00:00
kbdcontrol Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
kbdmap mdoc(7) police: bump document date for the C rewrite, nit. 2002-12-04 14:45:48 +00:00
kernbb Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
keyserv Use arc4random() instead of random() when generating the master key. 2003-02-18 01:35:58 +00:00
kgmon Use correct item to track max width of list 2003-03-24 20:55:28 +00:00
kgzip Remove uneeded cast. 2003-06-11 21:37:19 +00:00
kldxref style.Makefile(5) 2003-04-04 17:49:21 +00:00
lastlogin
lpr Minimal update to make it easier to increase the buffer-size lpd uses 2003-08-21 03:43:48 +00:00
lptcontrol Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
mailstats Remove MAINTAINER= lines from individual Makefiles in favor of the 2003-07-07 03:54:04 +00:00
mailwrapper add FBSDID 2003-07-06 12:44:11 +00:00
makemap Remove MAINTAINER= lines from individual Makefiles in favor of the 2003-07-07 03:54:04 +00:00
manctl
memcontrol mdoc(7) police: markup fixes. 2002-11-27 15:31:08 +00:00
mergemaster Use the actual build target (all), since relying on the build as a 2003-08-04 10:23:45 +00:00
mixer Document changes to default output. 2003-06-15 08:46:36 +00:00
mld6query
mlxcontrol
mount_nwfs Make this 64 bit clean. Use size_t for sysctl() length pointer args. 2003-07-25 20:56:57 +00:00
mount_portalfs Correct paths to mount sources. 2003-07-02 16:43:14 +00:00
mount_smbfs Correct paths to mount sources. 2003-07-02 16:43:14 +00:00
mountd When reporting errors binding IPv6 TCP sockets, don't call them UDP 2003-07-17 10:11:26 +00:00
moused Add section number to .Xr 2003-06-08 14:04:49 +00:00
mptable Don't need to redundantly redeclare optreset. 2003-06-07 18:33:18 +00:00
mrouted Backed out previous commit. Use ${LIBMROUTED} in LDADD again instead of 2003-04-16 14:53:51 +00:00
mtest add FBSDID 2003-07-06 12:44:11 +00:00
mtree Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
named LANG->LC_ALL 2003-08-04 21:31:53 +00:00
named.reload
named.restart
ndc style.Makefile(5) 2003-04-04 17:49:21 +00:00
ndp introduced a flag bit "ND6_IFF_ACCEPT_RTADV" in the nd_ifinfo structure to 2003-08-05 14:57:11 +00:00
newsyslog When checking the 'user:group' field in newsyslog.conf, freebsd's source 2003-08-19 03:53:03 +00:00
nfsd style.Makefile(5) 2003-04-04 17:49:21 +00:00
ngctl Add missing "of". 2002-12-14 00:20:43 +00:00
nghook add FBSDID, compare getopt() against -1, use fprintf() + exit() in usage() 2003-08-17 09:06:08 +00:00
nologin
nslookup style.Makefile(5) 2003-04-04 17:49:21 +00:00
nsupdate
ntp Xref police: ntp.conf(8) -> ntp.conf(5). 2003-06-17 09:51:17 +00:00
ofwdump Autosize the property buffer instead of limiting it to 8192, and 2003-06-11 18:44:26 +00:00
pccard Go ahead and allow ports as high as 0xfff to be used for pccard 2003-08-03 06:17:06 +00:00
pciconf make pciconf understand it's own output as stated in the manpage. 2003-06-20 23:59:25 +00:00
pcvt Call exit(0), not exit. 2003-04-29 19:53:00 +00:00
periodic
pkg_install Clarify the order of arguments passed to the pre-/post-install script 2003-08-26 14:49:11 +00:00
pnpinfo style.Makefile(5) 2003-04-04 17:49:21 +00:00
ppp Hide more crypto from being crunched at release time. 2003-07-24 20:20:16 +00:00
pppctl add FBSDID 2003-07-06 12:44:11 +00:00
pppd Don't check for the existance of src/crypto/ for building items that 2003-07-24 18:30:25 +00:00
pppstats
praliases Remove MAINTAINER= lines from individual Makefiles in favor of the 2003-07-07 03:54:04 +00:00
procctl Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
pstat Remove options processing for dumping swapdevice radix map. 2003-07-31 21:20:08 +00:00
pw The .Xr utility. Spelling. Put NIS under .Tn 2003-06-08 14:28:38 +00:00
pwd_mkdb Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
quot Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
quotaon Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
rarpd Make it clear that -a flag and interface parameter are mutually exclusive 2003-08-16 22:23:16 +00:00
raycontrol update for 802.11 support 2003-06-28 06:19:37 +00:00
repquota Add support for a -n argument which displays user and group IDs 2003-07-07 21:41:23 +00:00
rip6query
rmt There is no need to #include <sgtty.h> 2003-09-04 01:33:43 +00:00
route6d rtm_seq is int, so seq/myseq should be int. 2003-08-18 16:20:30 +00:00
rpc.lockd When getting back an NLM DENIED response for a requested lock from the 2003-05-15 03:19:30 +00:00
rpc.statd style.Makefile(5) 2003-04-04 17:49:21 +00:00
rpc.umntall Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
rpc.yppasswdd Fix yppasswdproc_update_master_1_svc() too. 2003-06-15 21:24:45 +00:00
rpc.ypupdated Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
rpc.ypxfrd Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
rpcbind style.Makefile(5) 2003-04-04 17:49:21 +00:00
rrenumd english(4) police. 2002-12-27 12:15:40 +00:00
rtadvd - supported a string notation for xxflags. 2003-08-15 19:13:53 +00:00
rtprio add FBSDID 2003-07-06 12:44:11 +00:00
rtsold backout 1.11. ifname in struct ifreq should be copyed by strncpy. 2003-08-17 11:54:58 +00:00
rwhod use a list to enumerate options 2003-07-06 12:27:52 +00:00
sa Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
sade Take the support for the 8139C+/8169/8169S/8110S chips out of the 2003-09-08 02:11:25 +00:00
sendmail Don't check for the existance of src/crypto/ for building items that 2003-07-24 18:30:25 +00:00
setfmac Mostly fixed the SYNOPSIS. 2003-05-31 18:42:18 +00:00
setkey Use NI_xxx macros. 2003-04-16 09:53:29 +00:00
setpmac mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
sgsc
sicontrol mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
sliplogin Add section number to .Xr 2003-06-08 14:33:04 +00:00
slstat Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
spkrtest
spray
stallion Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
sysinstall Take the support for the 8139C+/8169/8169S/8110S chips out of the 2003-09-08 02:11:25 +00:00
syslogd Avoid a corrupt timestamp on the console 2003-05-17 20:07:54 +00:00
tcpdchk Turn on the extended syntax, which TCP_wrappers has by default, as 2003-07-24 19:58:56 +00:00
tcpdmatch Drop MAINTAINER bits from here. 2003-06-04 15:58:03 +00:00
tcpdump Don't check for the existance of src/crypto/ for building items that 2003-07-24 18:30:25 +00:00
timed de-__P 2003-07-06 10:37:00 +00:00
traceroute
traceroute6 Quote from a Problem Report: 2003-07-21 11:06:47 +00:00
trpt Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
tzsetup style.Makefile(5) 2003-04-04 17:49:21 +00:00
ugidfw style.Makefile(5) 2003-04-04 17:49:21 +00:00
usbd The second argument to fgetln() is a size_t *, not an int *. 2003-07-12 17:56:50 +00:00
usbdevs
vidcontrol mdoc(7) police: Nits. 2003-03-02 21:04:21 +00:00
vipw Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
vnconfig
watch Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
watchdogd o style(9) fixes 2003-07-03 03:37:04 +00:00
wicontrol o update for new 802.11 support 2003-06-28 06:22:23 +00:00
wlconfig
yp_mkdb Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
ypbind Correct a spelling error. 2003-06-04 19:24:24 +00:00
yppoll Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
yppush Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
ypserv Eliminated two dozens of superfluous cats and two r-cats (sorry, Jordan). 2003-06-13 16:13:28 +00:00
ypset Include stdlib.h for exit() 2003-06-08 06:25:47 +00:00
zic style.Makefile(5) 2003-04-04 17:49:21 +00:00
zzz add section name 2003-08-16 19:59:53 +00:00
Makefile Introduce more knobs to slim down FreeBSD userland 2003-08-29 10:35:01 +00:00
Makefile.inc