Jonathan Lemon [Wed, 17 Oct 2001 18:47:12 +0000 (18:47 +0000)]
Add dev_named(dev, name), which is similar in spirit to devtoname().
This function returns success if the device is known by either 'name'
or any of its aliases.
Jonathan Lemon [Wed, 17 Oct 2001 18:30:13 +0000 (18:30 +0000)]
When specifying an interface to ifconfig, first look up the interface
index, then retrieve statistics for that index, rather than retrieving
all interfaces and then looking for a matching name. This allows the
user to refer to an interface via an alias name.
While I'm here, also perform a few assorted cleanups.
Ruslan Ermilov [Wed, 17 Oct 2001 18:07:05 +0000 (18:07 +0000)]
Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2.
Have sys/net/route.c:rtrequest1(), which takes ``rt_addrinfo *''
as the argument. Pass rt_addrinfo all the way down to rtrequest1
and ifa->ifa_rtrequest. 3rd argument of ifa->ifa_rtrequest is now
``rt_addrinfo *'' instead of ``sockaddr *'' (almost noone is
using it anyways).
Benefit: the following command now works. Previously we needed
two route(8) invocations, "add" then "change".
# route add -inet6 default ::1 -ifp gif0
Remove unsafe typecast in rtrequest(), from ``rtentry *'' to
``sockaddr *''. It was introduced by 4.3BSD-Reno and never
corrected.
Hajimu UMEMOTO [Wed, 17 Oct 2001 13:03:37 +0000 (13:03 +0000)]
Fixed to process a IPv6 packet when ah transport after esp tunnel
should be applied. the SA of AH transport could not be selected
from the SAD because of this bug.
Hajimu UMEMOTO [Wed, 17 Oct 2001 13:01:39 +0000 (13:01 +0000)]
The behavior of SPDUPDATE has been changed.
SPDUPDATE doesn't depend on whether there is a SP or not.
This change makes `generate_policy on' of racoon work.
Back out previous revision. TCBHASHSIZE isn't an option, despite what I'd
been misled to believe by unknown parties. It probably *should* be an option,
but the runtime value is controlled by a tunable, which Ought To Be Enough.
Bill Fenner [Wed, 17 Oct 2001 04:12:29 +0000 (04:12 +0000)]
The interface index space may be sparsely populated (e.g. when an
interface in the middle is if_detach()'d). Return (and handle)
ENOENT when the ifmib(4) is accessed for a nonexistent interface.
Ian Dowse [Tue, 16 Oct 2001 21:55:53 +0000 (21:55 +0000)]
When nfsd was started with only UDP servers, the master nfsd would
spin in a loop eating CPU time. This bug has existed since the
TI-RPC import. The problem is that we should only enter the select
loop if at least one TCP server was started. Fix this by having
the master nfsd become a UDP server itself if there are no TCP
servers.
Also improve/correct the code for cleaning up slave nfsd processes
and unregistering with rpcbind when the master nfsd exits.
One issue that remains open is that if a slave nfsd dies, then all
nfsds will shut down. This is because nfssvc() in the master nfsd
returns 0 when the master nfsd receives a SIGCHLD.
Bruce Evans [Tue, 16 Oct 2001 14:12:35 +0000 (14:12 +0000)]
Deleted most of npxprobe(), and merged npxprobe1() back into npxprobe().
Use the normal interrupt handler (npx_intr()) instead of a special
probe-time interrupt handler, although this causes problems due to
the bus_teardown_intr() not actually even tearing down the interrupt
(these problems were avoided by doing interrupt attachment for the
special interrupt handler directly). Fixed minor bitrot in comments.
The reason for the npxprobe()/npxprobe1() split mostly went away at
about the same time it was made (in 1992 or 1993 just before the
beginning of history). 386BSD ran all probes with interrupts completely
masked, and I didn't want to disturb this when I added an irq probe
to npxprobe(). An irq (not necessarily npx) must be acked for at least
external npx's to take the cpu out of the wait state that it enters
when an npx error occurs, so the probe must be done with a suitable
irq unmasked. npxprobe() went to great lengths to unmask precisely
the npx irq.
Running probes with all interrupts masked was never really needed in
FreeBSD, since FreeBSD always masked interrupts well enough using
splhigh(), but it wasn't until rev.1.48 (1995/12/12) of autoconf.c
that all probes were run with CPU interrupts enabled. This permits
npxprobe() to probe its irq using normal interrupt resources. Note
that most drivers still can't depend on this. It depends on the
interrupt handler being fast and the irq not being shared.
Bruce Evans [Tue, 16 Oct 2001 12:55:38 +0000 (12:55 +0000)]
Commit my old fixes for cosmetic bugs in npxprobe() so that they aren't
lost when the buggy code goes away completely:
- don't assume that the npx irq number is >= 8. Rev.1.73 only reversed
part of the hard-coding of it to 13 in rev.1.66.
- backed out the part of rev.1.84 that added a highly confused comment
about an enable_intr() being "highly bogus". The whole reason for
existence of npxprobe() (separate from the main probe, npxprobe1())
is to handle the complications to make this enable_intr() safe.
- backed out the part of rev.1.94 that modified npxprobe(). It mainly
broke the enable_intr() to restore_intr(). Restoring the interrupt
state in a nested way is precisely what is not wanted here. It was
harmless in practice because npxprobe() is called with interrupts
enabled, so restoring the interrupt state enables interrupts. Most
of npxprobe() is a no-op for the same reason...
Doug Rabson [Tue, 16 Oct 2001 08:03:16 +0000 (08:03 +0000)]
Size the number of pv_entries we use to bootstrap the pv_entry allocator
based on the size of physical memory. This should eliminate the tweaking
needed for larger memory configurations.
Marcel Moolenaar [Tue, 16 Oct 2001 06:11:11 +0000 (06:11 +0000)]
o Change prototype of linux_lchown and linux_chown so that the
argument names match those on Alpha.
o Map the fchown directly to FreeBSD. Since the old version of
fchown is also mapped to the native fchown, give the new one
type NODEF.
Tor Egge [Mon, 15 Oct 2001 23:02:54 +0000 (23:02 +0000)]
Don't use an uninitialized field reserved for callers in the bio structure
passed to swap_pager_strategy(). Instead, use a field reserved for drivers
and initialize it before usage.
Try to make Linux socket ioctls work. Up until now they've only *pretended*
to work, but haven't really due to subtle differences in structs etc.
This is still not perfect (some ioctls are still known not to work, while
others haven't been tested at all), but it's enough to get Debian's ifconfig
to produce relatively sane output.
More work will be needed to get all ioctls (or at least a reasonable subset)
working, and to support the Cisco Aironet config tool mentioned in the PR.
In FreeBSD's ifreq, ifr_ifru.ifru_flags is an array of two chars, while Linux
defines it as a short. Change that to an array of one short so that FreeBSD's
ifr_flags macro will work (it evaluates to ifr_ifru.ifru_flags[0]).
Bill Fenner [Mon, 15 Oct 2001 19:21:01 +0000 (19:21 +0000)]
Set the interface speed back to zero, after ether_ifattach() set it
to 10Mbps. RFC 2863 says: "For a sub-layer which has no concept
of bandwidth, [ifSpeed] should be zero."
Doug Rabson [Mon, 15 Oct 2001 18:48:42 +0000 (18:48 +0000)]
Add ia64 support. Various adjustments were made to existing targets to
cope with a few interface changes required by the ia64. In particular,
function pointers on ia64 need special treatment in rtld.
Benno Rice [Mon, 15 Oct 2001 13:30:04 +0000 (13:30 +0000)]
Add a hack to get around the fact that egcs 1.1.2 (which I'm using to build
my powerpc kernels on NetBSD/macppc 1.5) doesn't know of the __func__ macro.
Robert Drehmel [Mon, 15 Oct 2001 09:51:09 +0000 (09:51 +0000)]
- Use the cell_t type definition for Open Firmware arguments in
combination with requisite casts as this avoids fatal side
effects on 64-bit architectures.
- Add the OF_alloc_phys function.
Robert Drehmel [Mon, 15 Oct 2001 09:35:40 +0000 (09:35 +0000)]
- Fill dummy functions with code to read from disk using Open
Firmware.
- Add a temporary disklabel header to boot off a NetBSD/sparc64
partition. This file can be deleted when we have got a FCode
bootblock.
Robert Drehmel [Mon, 15 Oct 2001 09:02:03 +0000 (09:02 +0000)]
- Add an ifdef guard.
- Use unsigned types for the (32-bit) Open Firmware device handles
to avoid sign extension on 64-bit architectures.
- Add a standard type definition for Open Firmware arguments.
Marcel Moolenaar [Mon, 15 Oct 2001 07:58:27 +0000 (07:58 +0000)]
When compiling with SKI support, create the fake memory regions
when either the memory descriptor in the bootinfo is NULL or
the descriptor count is 0.
Matt Jacob [Mon, 15 Oct 2001 06:59:41 +0000 (06:59 +0000)]
Whack on this soon to be deprecated driver.
What the heck, the OpenBSD version will benefit.
1. Add wx_txint_delay as a tunable (defaults to 5000 now, or ~5ms) and switch
to using delayed TXDW interrupts. Since the chip continues to reload the
TIDV with this value for each descriptor written back, this allows continued
deferral of the actual interrupt until the last packet completes (assuming
that 5ms between multiple packets transmitting is reasonable).
2. Add two other SYSCTL entities:
hw.wx.dump_stats
hw.wx.clear_stats
to be used, hackey hackey, to get the watchdog routine to dump/clear
the current softc statistics.
Usage would be:
sysctl -w hw.wx.dump_stats=UNIT
to cause the current stats to be dumped for UNIT.
3. Attempt to clean up wx_detach routine so we don't panic. Well, things
still panic, but given that the code is just like other NIC drivers,
I suspect it's actually something elsewhere, like e1000phy, that's actually
blowing up.
4. Skip the entire test for runt packets- after doing somet thinking
and experimenting, I believe that the chip only doesn't like it if
the whole frame to xmit is < 16 bytes- each TFD can be some fragment
of that. This should improve performance a chunk because of all of the
(14 byte ETHERHEADER + DATA) mbuf chains.
5. Keep track of total frame length. Try not to xmit an odd byte frame-
this is supposed to get around some dumb Cisco switch problems.
6. On the last packet, also set Interrupt Delay && Report Packet Sent
(see #1 above)
7. Attempt to do xmit garbage collection *first* in order to avoid setting
IFF_OACTIVE if at all possible.
David E. O'Brien [Mon, 15 Oct 2001 02:50:18 +0000 (02:50 +0000)]
Add back DEC_EB64PLUS and DEC_AXPPCI_33 support as we've gained a little bit
more room on the install floppies now that modules can be on a 3rd floppy.
David E. O'Brien [Mon, 15 Oct 2001 02:49:15 +0000 (02:49 +0000)]
+ Use `ee' in lue of `vi' as it is smaller.
+ Remove 'sleep' (not sure why it is so important in fix-it mode).
+ Remove ability to mount MSDOSFS as that is not a typical filesystem on an
alpha; and thus does not really add to the fix-it mix.
+ Sync style with i386.
Mark Peek [Mon, 15 Oct 2001 00:37:45 +0000 (00:37 +0000)]
Save WIP. Partial rewrite of cpu_switch() and savectx(). This makes it closer
to working but still needs some work to properly switch the full context
(such as saving the fpu registers, switch stacks, etc.). Also, remove some
dead code that was mixed in.