Brooks Davis [Tue, 10 Jan 2006 05:33:33 +0000 (05:33 +0000)]
When we give up on an interface, use the arp(8) command to remove all
entries from the interface rather than using ifconfig's delete command.
This preserves non-dhclient configured addresses (though they are wiped
out when dhclient is restarted).
Tor Egge [Mon, 9 Jan 2006 19:32:21 +0000 (19:32 +0000)]
If the lock passed to getdirtybuf() is the softdep lock then the background
write completed wakeup could be missed. Close the race by grabbing the lock
normally used for protection of bp->b_xflags.
Florent Thoumie [Mon, 9 Jan 2006 18:27:21 +0000 (18:27 +0000)]
Add -K option to pkg_add and pkg_info.
This option saves packages to PKGDIR (if defined or current directory by default)
as they are downloaded.
Silent a warning when -n is used and package has a +DISPLAY file.
Add FOMA (NTT DoCoMo 3G mobile phone system) driver.
This is based on MCPC USB mobile phone guide line (MCPC-GL005)
Some other 3G system or so will work with this driver.
Kyocera PHS terminal (a.k.a. Kyopon) is known to work, which
is now supported by umodem(4) driver.
Sam Leffler [Mon, 9 Jan 2006 17:13:20 +0000 (17:13 +0000)]
Update monitoring support:
o record tsf in tx+rx frames
o switch from raw rssi to dbm for signal data and record both
signal and noise floor data (hacked for now to assume a fixed
noise floor; is correct with new hal)
o add monpass sysctl to control which rx'd frames are passed
up with errors; especially useful to see frames with CRC errors
o mark 'd packets w/ a CRC error with radiotap's BADFCS flag
Also add placeholder code for calibrating the noise floor when
using newer hals.
Warner Losh [Mon, 9 Jan 2006 06:05:57 +0000 (06:05 +0000)]
By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into
param.h. Per request, I've placed these just after the
_NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but
may since we don't need the __.
Ian Dowse [Sun, 8 Jan 2006 20:04:55 +0000 (20:04 +0000)]
There should be no need to retry when the CCB status code is
CAM_LUN_INVALID or CAM_TID_INVALID. Retries were being triggered
here when a umass device was unplugged, and while the retries
themselves are probably harmless, they complicated finding the real
SIM removal problems.
Doug Barton [Sun, 8 Jan 2006 10:15:31 +0000 (10:15 +0000)]
Add a mechanism to include files added by ports which contain
the names of directories to include in the base ldconfig script.
This will eliminate the need for each port to install its own
boot script which does nothing but ldocnfig a given directory.
This code was developed by flz (ports committer), discussed on
freebsd-rc@, and modified slightly by me.
When using @cwd %%FOO%%, we must ensure to return in the original
prefix later, but doing so with @cwd %%OLDPREFIX%% (having
PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing
list. That's not really a problem when dealing with ports but that's
a problem with packages since pkg_add -p option only overrides the
first @cwd occurrence.
This patch allow us to use @cwd without any argument. If no
directory argument is given, it will set current working directory
to the first prefix given by the @cwd command.
Warner Losh [Sat, 7 Jan 2006 19:29:25 +0000 (19:29 +0000)]
While reviewing if_sn in an attempt to understand network drivers
better, I discovered sn doing too many pointer dereferences. This
driver would do silly things like:
sn_foo(struct ifnet *ifp)
{
struct sn_softc *sc = ifp->if_softc;
sc->ifp->mumble
/* Other stuff */
}
while /* other stuff */ usually needed sc, the extra deref isn't
needed. Eliminate a few dozen of them.
John Baldwin [Sat, 7 Jan 2006 14:03:15 +0000 (14:03 +0000)]
Revert an untested local change that crept in with the lo_class changes
and subsequently broke the build. This change is supposed to fix the
case where doing a mtx_destroy() off a spin mutex while you hold it fails.
If it had been tested I would just leave it in, but it hasn't been tested
yet, so it will have to wait until later.
Peter Grehan [Sat, 7 Jan 2006 01:55:12 +0000 (01:55 +0000)]
Set the siginfo si_addr field, and also the mysterious 3rd parameter
to old-style signals, to be the DAR register for DSI miss exceptions.
This gives the address of the access rather than the instruction
address. The behaviour is now the same as on i386.
Fix FD_ISSET() on LP64 platforms. The FD_ISSET() function/macro is
defined to return an int, but on LP64 platforms the return value of
FD_ISSET() for file descriptors with a bit-index larger than 31 would
not fit an int (due to __fd_mask being defined as an unsigned long).
The fix is to explicitly test against 0.
John Baldwin [Fri, 6 Jan 2006 20:17:48 +0000 (20:17 +0000)]
- Update copyright years from the Specialix SDK.
- Update comment as this firmware is not used for the SX cards, they use
the si3_t225 firmware instead.
John Baldwin [Fri, 6 Jan 2006 19:58:08 +0000 (19:58 +0000)]
Update the firmware image used for the SIJET cards to the latest available
in the SDK from Specialix/Perle. The prior version was
JET.BIN Version 3.0.6 Beta I and the new version is JET__.BIN Version 4.0.1.
John Baldwin [Fri, 6 Jan 2006 19:56:12 +0000 (19:56 +0000)]
- Fix cards with multiple modules. Prior to this, the ports on the various
modules would have overlapping names.
- Only create /dev/si_control for unit 0.
Tested by: Joerg Lehners Joerg dot Lehners at informatik dot
uni-oldenburg dot de (on 6.x)
MFC after: 1 week
Ceri Davies [Fri, 6 Jan 2006 19:39:16 +0000 (19:39 +0000)]
o Document the possibility of putting 'b' in the flag field.
While we don't use the NC_BROADCAST value of nc_flag anywhere in the
RPC code, it is parseable by getnetconfigent(3) from /etc/netconfig.
o Clean up some "see below"'s that were cut and pasted from netconfig.h.
John Baldwin [Fri, 6 Jan 2006 19:22:19 +0000 (19:22 +0000)]
- Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the
various pcib drivers to use their own private devclass_t variables for
their modules.
- Use the DEFINE_CLASS_0() macro to declare drivers for the various pcib
drivers while I'm here.
John Baldwin [Fri, 6 Jan 2006 18:07:32 +0000 (18:07 +0000)]
Trim another pointer from struct lock_object (and thus from struct mtx and
struct sx). Instead of storing a direct pointer to a our lock_class
struct in lock_object, reserve 4 bits in the lo_flags field to serve as an
index into a global lock_classes array that contains pointers to the lock
classes. Only debugging code such as WITNESS or INVARIANTS checks and KTR
logging need to access the lock_class member, so this shouldn't add any
overhead to production kernels. It might add some slight overhead to
kernels using those debug options however.
As with the previous set of changes to lock_object, this is going to
completely obliterate the kernel ABI, so be sure to recompile all your
modules.
John Baldwin [Fri, 6 Jan 2006 18:03:45 +0000 (18:03 +0000)]
Reduce the scope of one #ifdef to avoid duplicating a SYSCTL_INT() macro
and trim another unneeded #ifdef (it was just around a macro that is
already conditionally defined).
John Baldwin [Fri, 6 Jan 2006 18:02:12 +0000 (18:02 +0000)]
Fix various places that were testing td_critnest to see if interrupts
should remain disabled during a trap or not to check
td_md.md_spinlock_count instead.
John Baldwin [Fri, 6 Jan 2006 16:14:32 +0000 (16:14 +0000)]
Be a little more forgiving of lame BIOS writers. If a link device that
doesn't have any actual interrupts is listed in a _PRT entry, only print
a warning rather than panic'ing when we walk the _PRT's to build up count
of entries that reference a given link (the counts are used as weights so
that we can attempt to balance the load across IRQs used by link devices).
Instead, only panic if we attempt to use the _PRT entry to route an
interrupt for a device.
Ariff Abdullah [Fri, 6 Jan 2006 05:04:18 +0000 (05:04 +0000)]
Another major fixes and enhancements:
- MPSAFE
- Fix / reorganize attach routine. Device specific initialization must
be done after generic bus / DMA setup. At last, Virtual Channels
(vchan) works as expected.
Note: Recent commit / fix against this driver proves that major enhancements
on the generic sound layer does indeed help to expose flaw within
device specific code. There are probably other drivers that need to
be addressed as well.
Warner Losh [Fri, 6 Jan 2006 04:44:09 +0000 (04:44 +0000)]
New option: NO_FFS_SNAPSHOT. I did this in p4 about the same time
that NetBSD implemented it independently of them (don't know which one
was actually first). This saves about 24k for those times you don't
need snapshot support (like when running off a ram disk, or in an
embedded environment where size matters).
John Baldwin [Thu, 5 Jan 2006 22:20:31 +0000 (22:20 +0000)]
Remove XXX comments complaining that write(2) on a read-only descriptor
returns EBADF. That errno is correct and is mandated by POSIX. It also
goes back to revision 1.1 of our CVS history (i.e. 4.4BSD).
The _fget() function should probably also be upated as it currently returns
EINVAL in that case rather than EBADF. (It does return EBADF for reads
on a write-only descriptor without any XXX comments oddly enough.)
David Xu [Thu, 5 Jan 2006 13:51:22 +0000 (13:51 +0000)]
Refine thread suspension code, now thread suspension is a blockable
operation, the caller is blocked util target threads are really
suspended, also avoid suspending a thread when it is holding a
critical lock.
Fix a bug in _thr_ref_delete which tests a never set flag.
Bruce Evans [Thu, 5 Jan 2006 09:18:48 +0000 (09:18 +0000)]
Oops, on amd64 (and probably on all non-i386 systems), the previous
commit broke the 2**24 cases where |x| > DBL_MAX/2. There are exponent
range problems not just for denormals (underflow) but for large values
(overflow). Doubles have more than enough exponent range to avoid the
problems, but I forgot to convert enough terms to double, so there was
an x+x term which was sometimes evaluated in float precision.
Unfortunately, this is a pessimization with some combinations of systems
and compilers (it makes no difference on Athlon XP's, but on Athlon64's
it gives a 5% pessimization with gcc-3.4 but not with gcc-3.3).
Bruce Evans [Thu, 5 Jan 2006 07:57:31 +0000 (07:57 +0000)]
Use double precision internally to optimize cbrtf(), and change the
algorithm for the second step significantly to also get a perfectly
rounded result in round-to-nearest mode. The resulting optimization
is about 25% on Athlon64's and 30% on Athlon XP's (about 25 cycles
out of 100 on the former).
Using extra precision, we don't need to do anything special to avoid
large rounding errors in the third step (Newton's method), so we can
regroup terms to avoid a division, increase clarity, and increase
opportunities for parallelism. Rearrangement for parallelism loses
the increase in clarity. We end up with the same number of operations
but with a division reduced to a multiplication.
Using specifically double precision, there is enough extra precision
for the third step to give enough precision for perfect rounding to
float precision provided the previous steps are accurate to 16 bits.
(They were accurate to 12 bits, which was almost minimal for imperfect
rounding in the old version but would be more than enough for imperfect
rounding in this version (9 bits would be enough now).) I couldn't
find any significant time optimizations from optimizing the previous
steps, so I decided to optimize for accuracy instead. The second step
needed a division although a previous commit optimized it to use a
polynomial approximation for its main detail, and this division dominated
the time for the second step. Use the same Newton's method for the
second step as for the third step since this is insignificantly slower
than the division plus the polynomial (now that Newton's method only
needs 1 division), significantly more accurate, and simpler. Single
precision would be precise enough for the second step, but doesn't
have enough exponent range to handle denormals without the special
grouping of terms (as in previous versions) that requires another
division, so we use double precision for both the second and third
steps.
Add -w parameter which tells kgdb to open kmem-based targets in read-write
mode. This allows one to use kgdb on /dev/mem and be able to patch memory
on a live system. This is identical to what -wcore used to do in previous
gdb versions for FreeBSD.
Warner Losh [Wed, 4 Jan 2006 23:00:01 +0000 (23:00 +0000)]
Check for 10BaseT media correctly. Before we were confusing
ifm_status and ifm_active. IFM_10_T gets set in the ifm_active field,
not in the ifm_status field, as far as I can tell.
Note: this was to enable a workaround that's rarely enabled. I don't know
how to corrupt my eeprom to test it, and would rather not know...
We don't support I386_CPU in 6.0 and later. This file can be cleaned
up some to assume that '#if defined(I486_CPU) || defined(I586_CPU) ||
defined(I686_CPU)' is true.
Doug Barton [Wed, 4 Jan 2006 19:18:43 +0000 (19:18 +0000)]
After some discussion with the folks at ISC, it turns out that the _ai_pad
part of the structure was a hack to maintain binary compatibility with
Sun binaries, and my understanding is that it's not needed generally
on sparc systems running other operating systems. Therefore, hide this
code behind the same set of tests as in lib/bind/include/netdb.h.
This file is being imported on the vendor branch because a similar change
(or change with similar effect) will be in the next version of BIND 9.
This change will not affect other platforms in any way.