Bill Paul [Sat, 19 Jun 1999 20:17:38 +0000 (20:17 +0000)]
Fix up the RealTek 8139 driver to work on FreeBSD/alpha. This involves a
few changes:
- there was a bug in rl_list_tx_init(): it was calculating the registers
to initialize incorrectly. Not a problem on the x86 where unaligned
access are allowed, but a problem on the alpha.
- set rl_btag accordingly depending on the machine type
- rl_rxeof() needs to be sure to longword-align the packet data. This
is a little tricky since we copy the data out of the receive buffer
using m_devget(), however there's no way to tell m_devget() to fill
in the mbufs starting at a particular offset. To get around this,
we tell m_devget to copy bytes+2 bytes starting at offset offset-2. This
results in the proper alignment, and we can trim off the two leading
bytes afterwards with m_adj(). We also allocate some extra space before
the start of the receive buffer so that we don't get into trouble in
the case where offset == 0.
- redefine vtophys() in if_rlreg.h for the alpha.
Making this chipset work on the alpha is sort of the inverse of putting
a jet engine on a rowboat (putting a propeller on a 747?) but when
you can get these things for $5 a pop, it's hard to stop people from
buying them.
Brian Feldman [Sat, 19 Jun 1999 19:49:35 +0000 (19:49 +0000)]
Miscellaneous dd(1) changes: mainly fixing variable types (size_t, ssize_t,
off_t, int, u_int64_t, etc.). dd(1) should now work properly with REALLY
big amounts of data.
Matt Jacob [Sat, 19 Jun 1999 19:33:44 +0000 (19:33 +0000)]
Thanks to Bruce for noticing this.... compare against the *new* nfsnode's
mount point for seeing whether or not the new nfsnode is already in the
hash queue. We're pretty much guaranteed that the old nfsnode is already
in the hash queue. Wank! Infinite Loop! Looks like just a minor typo....
(ah the influence of fortran ... np && np2... why not nfsnode_the_first &&
nfsnode_the_second???)...
Add a new interface ioctl, to return "aux status".
This is inteded for to allow ifconfig to print various unstructured
information from an interface.
The data is returned from the kernel in ASCII form, see the comment in
if.h for some technicalities.
Canonical cut&paste example to be found in if_tun.c
Initial use:
Now tun* interfaces tell the PID of the process which opened them.
Future uses could be (volounteers welcome!):
Have ppp/slip interfaces tell which tty they use.
Make sync interfaces return their media state: red/yellow/blue
alarm, timeslot assignment and so on.
Make ethernets warn about missing heartbeats and/or cables
Greg Lehey [Sat, 19 Jun 1999 08:14:56 +0000 (08:14 +0000)]
sioprobe: Don't try to initialize disabled ports. In particular,
attempting to initialize sio3 caused problems with ATI video boards,
which cleverly share the I/O space.
Bill Paul [Sat, 19 Jun 1999 00:36:56 +0000 (00:36 +0000)]
Add a transmit descriptor usage counter and use it to absolutely,
positively not let ti_encap() fill up the TX ring all the way and wrap
around. This fixes a potential transmit lockup where a really fast
machine (or particular TX traffic pattern) can overrun the end of the
ring.
Brian Feldman [Fri, 18 Jun 1999 19:56:02 +0000 (19:56 +0000)]
K6-family MTRR support
This is tested, but I really can't say whether it works entirely. I
don't know exactly what to look for when testing it. So let's say this
is open for testing. Send any results to green@FreeBSD.org
Brian Feldman [Fri, 18 Jun 1999 19:24:40 +0000 (19:24 +0000)]
Harmless change to prevent possible problems in the future. I made
sure that i686_mem was only used when
1. CPUID had MTRR set (this was there before)
2. the CPU was GenuineIntel (not there)
3. the CPU is a 686 (also not there)
This should prevent any problems with CPUs that set MTRR but aren't
compatibile with Intel's interface (none that I know of yet.)
Bruce Evans [Fri, 18 Jun 1999 14:32:21 +0000 (14:32 +0000)]
Changed the global `idt' from an array to a pointer so that npx.c
automatically hacks on the active copy of the IDT if f00f_hack()
has changed it. This also allows simplifications in setidt().
This fixes breakage of FP exception handling by rev.1.55 of
sys/kernel.h. FP exceptions were sent to npx.c's probe handlers
because npx.c "restored" the old handlers to the wrong copy of the
IDT. The SYSINIT for f00f_hack() was purposely run quite late to
avoid problems like this, but it is bogusly associated with the
SYSINIT for proc0 so it was moved with the latter.
Problem reported and fix tested by: Martin Cracauer <cracauer@cons.org>
This lets you specify "gemdosfs", "shortnames", "longnames", and
"nowin95" as arguments to the "-o" flag, as alternatives to "-G", "-s",
"-l", and "-9"; when running "mount_msdos" by hand, that doesn't let you
do anything you couldn't already do, but if you're letting "mount" run
it, it lets you specify those options, which is especially useful if,
for example, you have an entry in "/etc/fstab" for some file system,
with "noauto" set, so you can conveniently mount a DOS partition from a
removable drive and force it to treat the file system as VFAT rather
than boring old FAT.
Kirk McKusick [Fri, 18 Jun 1999 05:49:46 +0000 (05:49 +0000)]
On our final pass through ffs_fsync, do all I/O synchronously so that
we can find out if our flush is failing because of write errors. This
change avoids a "flush failed" panic during unrecoverable disk errors.
Brian Feldman [Thu, 17 Jun 1999 23:54:50 +0000 (23:54 +0000)]
Reviewed by: the cast of thousands
This is the change to struct sockets that gets rid of so_uid and replaces
it with a much more useful struct pcred *so_cred. This is here to be able
to do socket-level credential checks (i.e. IPFW uid/gid support, to be added
to HEAD soon). Along with this comes an update to pidentd which greatly
simplifies the code necessary to get a uid from a socket. Soon to come:
a sysctl() interface to finding individual sockets' credentials.
Sheldon Hearn [Thu, 17 Jun 1999 14:48:02 +0000 (14:48 +0000)]
Null commit to reflect that the previous commit added warnings for
previously unreported malloc() failures, and changed the exit status
for those failures to encourage MTA retries.
Sheldon Hearn [Thu, 17 Jun 1999 09:16:08 +0000 (09:16 +0000)]
Various fixes for inetd's TCP Wrappers support:
1) Handle forking and non-forking internal services correctly.
Turn on wrapping for internal services because it works now.
2) Preserve server names for each service on HUP.
3) Honour hosts_options(5) severity option.
4) Add IMPLEMENTATION NOTES section to clarify TCP Wrappers
usage and limitations.
This change may cause previously allowed builtin services (e.g. daytime)
to be denied in existing configurations.
Alan Cox [Thu, 17 Jun 1999 05:49:00 +0000 (05:49 +0000)]
vm_map_insert sometimes extends an existing vm_map entry, rather than
creating a new entry. vm_map_stack and vm_map_growstack can panic when
a new entry isn't created. Fixed vm_map_stack and vm_map_growstack.
Also, when extending the stack, always set the protection to VM_PROT_ALL.
Alan Cox [Thu, 17 Jun 1999 00:39:26 +0000 (00:39 +0000)]
Move vm_map_stack and vm_map_growstack after the definition
of the vm_map_clip_end macro. (The next commit will modify
vm_map_stack and vm_map_growstack to use vm_map_clip_end.)
Kirk McKusick [Wed, 16 Jun 1999 23:27:55 +0000 (23:27 +0000)]
Add a vnode argument to VOP_BWRITE to get rid of the last vnode
operator special case. Delete special case code from vnode_if.sh,
vnode_if.src, umap_vnops.c, and null_vnops.c.
Matt Jacob [Wed, 16 Jun 1999 18:35:58 +0000 (18:35 +0000)]
Use vput instead of vrele.
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Submitted by: Ville-Pertti Keinonen <will@iki.fi>
Obtained from: Matthew Dillon <dillon@apollo.backplane.com>
Bill Paul [Wed, 16 Jun 1999 16:27:30 +0000 (16:27 +0000)]
Grrr! The PNIC II's multicast hash table is only 128 bits wide, not 512
like the original PNIC and the MX98715A (from which the PNIC II is derived).
This requires special handling. Save the card type, and in mx_calchash(),
if we see that the card is a PNIC, return only the low 7 bits of the
hash instead of the low 9 bits.
David Greenman [Wed, 16 Jun 1999 15:54:30 +0000 (15:54 +0000)]
Changed trypbuf to a getpbuf to work around a problem where redundant writes
would occur when clustering them - caused by running out of buffers
and taking a degenerate code path as a result. It appears that waiting
instead for buffers to become available is okay.
Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Discovered by: Craig A Soules <soules+@andrew.cmu.edu>
Tor Egge [Wed, 16 Jun 1999 03:19:04 +0000 (03:19 +0000)]
If we still haven't got a sufficient number of free buffers after the
call to flushdirtybuffers() then sleep in waitfreebuffers().
PR: 11697
Reviewed by: David Greenman, Matt Dillon
Kirk McKusick [Tue, 15 Jun 1999 23:37:29 +0000 (23:37 +0000)]
Get rid of the global variable rushjob and replace it with a function in
kern/vfs_subr.c named speedup_syncer() which handles the speedup request.
Change the various clients of rushjob to use the new function.
Matt Jacob [Tue, 15 Jun 1999 23:24:14 +0000 (23:24 +0000)]
If we retry this operation from the top of this routine, we need to
make sure we've freed any allocated resources (to avoid a memory leak)
and and do the right thing with respect to the nfs node hash lock we'd
acquired.
Julian Elischer [Tue, 15 Jun 1999 23:13:09 +0000 (23:13 +0000)]
Add a couple of command definitions.
Also add offsets into the IDE parameter block so that it is humanly
possible to match the structure to the manufacturer's documentation.
(basically this is just changes to comments)
Mike Pritchard [Tue, 15 Jun 1999 20:03:01 +0000 (20:03 +0000)]
cam_get_device() was returning 0 on failure, and 1 on success, while
camcontrol(8) and the documentation in camlib.c and cam(3) all expect
-1 on failure and 0 on success. Updated camlib.c to return the values
specified by the documentation.