]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoAdd a mechanism to include files added by ports which contain
dougb [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.

Submitted by: flz
Reviewed by: brooks

18 years agoFix a bug recently introduced, the _thread_active_count should be
davidxu [Sun, 8 Jan 2006 10:13:18 +0000 (10:13 +0000)]
Fix a bug recently introduced, the _thread_active_count should be
decreased if thread can not be created.

18 years agoIt was always intended that regular expression matching be case
imp [Sun, 8 Jan 2006 05:18:36 +0000 (05:18 +0000)]
It was always intended that regular expression matching be case
insensitive.  Make it so.

18 years agoRemove the UQ_NO_OPEN_CLEARSTALL quirk, as this is now the default
iedowse [Sun, 8 Jan 2006 03:34:29 +0000 (03:34 +0000)]
Remove the UQ_NO_OPEN_CLEARSTALL quirk, as this is now the default
behaviour for all devices.

18 years agoDon't perform an endpoint stall clear every time a pipe is opened.
iedowse [Sun, 8 Jan 2006 03:27:43 +0000 (03:27 +0000)]
Don't perform an endpoint stall clear every time a pipe is opened.
This should not be necessary, and it is known to confuse certain
devices.

Obtained from: NetBSD
Requested by: many

18 years agoAllow background threads to be suspended.
davidxu [Sun, 8 Jan 2006 01:49:31 +0000 (01:49 +0000)]
Allow background threads to be suspended.

18 years agoTry to reduce total time needed for suspending all threads,
davidxu [Sun, 8 Jan 2006 01:48:51 +0000 (01:48 +0000)]
Try to reduce total time needed for suspending all threads,
first broadcast signals to all threads, then enter a wait loop.

18 years agoAdd Product ID for Acerscan 1240u and the corresponding entry in uscanner.c.
flz [Sun, 8 Jan 2006 01:43:00 +0000 (01:43 +0000)]
Add Product ID for Acerscan 1240u and the corresponding entry in uscanner.c.

PR: usb/91466
Submitted by: Cameron Lerch <cam@zarya.org>
MFC after: 3 days
Approved by: ssouhlal

18 years agoIf destroying a spinlock, make sure that it is exited properly.
scottl [Sun, 8 Jan 2006 00:18:34 +0000 (00:18 +0000)]
If destroying a spinlock, make sure that it is exited properly.

Submitted by: jhb
MFC After: 3 days

18 years agoWhen using @cwd %%FOO%%, we must ensure to return in the original
krion [Sat, 7 Jan 2006 22:10:58 +0000 (22:10 +0000)]
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.

PR: bin/77212
Submitted by: flz

18 years agoWhile reviewing if_sn in an attempt to understand network drivers
imp [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.

18 years ago- Mention the size of the additional header
pav [Sat, 7 Jan 2006 19:17:13 +0000 (19:17 +0000)]
- Mention the size of the additional header

PR: docs/85867
Submitted by: dinoex
MFC after: 1 week

18 years agoRevert an untested local change that crept in with the lo_class changes
jhb [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.

18 years agoRemove functions i386_get_gsbase and i386_set_gsbase, they were already
davidxu [Sat, 7 Jan 2006 06:01:43 +0000 (06:01 +0000)]
Remove functions i386_get_gsbase and i386_set_gsbase, they were already
in libc.

18 years agoAdd codec id support for Analog Device AD1986 AC'97 codec.
ariff [Sat, 7 Jan 2006 05:20:46 +0000 (05:20 +0000)]
Add codec id support for Analog Device AD1986 AC'97 codec.

Submitted by: UMENO Takashi <umeno at rr.iij4u.or.jp>
PR: kern/80234
MFC after: 2 days

18 years agoAdd a new feature to thr_kill, if thread ID argument is -1, send
davidxu [Sat, 7 Jan 2006 03:15:21 +0000 (03:15 +0000)]
Add a new feature to thr_kill, if thread ID argument is -1, send
signals to all threads except current sender.

18 years agoTrying to fix compilation bustage introduced in rev1.160 by converting
avatar [Sat, 7 Jan 2006 02:07:08 +0000 (02:07 +0000)]
Trying to fix compilation bustage introduced in rev1.160 by converting
a missing lo_class to LO_CLASSINDEX().

18 years agoSet the siginfo si_addr field, and also the mysterious 3rd parameter
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.

Found by:  libsigsegv tests

18 years agoFix FD_ISSET() on LP64 platforms. The FD_ISSET() function/macro is
marcel [Fri, 6 Jan 2006 22:12:46 +0000 (22:12 +0000)]
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.

PR: ia64/91421
Submitted by: Tanaka Akira (akr at m17n dot org)
MFC after: 1 week

18 years agothe geom_fox MLINK should not have been there.
wilko [Fri, 6 Jan 2006 20:55:28 +0000 (20:55 +0000)]
the geom_fox MLINK should not have been there.

Pointed out by: brueffer

18 years agoMake "portsnap extract" automatically create ${PORTSDIR} if necessary
cperciva [Fri, 6 Jan 2006 20:39:11 +0000 (20:39 +0000)]
Make "portsnap extract" automatically create ${PORTSDIR} if necessary
instead of complaining that "Directory does not exist or is not
writable".

Suggested by: {tlp, siep} via IRC
MFC after: 1 week

18 years ago- Update copyright years from the Specialix SDK.
jhb [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.

18 years agohookup geom_fox(4)
wilko [Fri, 6 Jan 2006 20:05:55 +0000 (20:05 +0000)]
hookup geom_fox(4)

18 years agoAdd manual page for the geom_fox multipath driver.
wilko [Fri, 6 Jan 2006 20:02:44 +0000 (20:02 +0000)]
Add manual page for the geom_fox multipath driver.

Review kindly provided by: phk
Abuse of mandoc bravely corrected by: ru

18 years agoUpdate the firmware image used for the SIJET cards to the latest available
jhb [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.

MFC after: 1 week

18 years ago- Fix cards with multiple modules. Prior to this, the ports on the various
jhb [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

18 years agoo Document the possibility of putting 'b' in the flag field.
ceri [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.

18 years ago- Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the
jhb [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.

18 years agoNote shrinkage of lock_object and the subsequent widespread kernel ABI
jhb [Fri, 6 Jan 2006 19:04:39 +0000 (19:04 +0000)]
Note shrinkage of lock_object and the subsequent widespread kernel ABI
breakage.

18 years agoTrim another pointer from struct lock_object (and thus from struct mtx and
jhb [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.

18 years agoReduce the scope of one #ifdef to avoid duplicating a SYSCTL_INT() macro
jhb [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).

18 years agoGet rid of the gv_bioq hack in most parts of the I/O path and
le [Fri, 6 Jan 2006 18:03:17 +0000 (18:03 +0000)]
Get rid of the gv_bioq hack in most parts of the I/O path and
use the standard bioq structures.

18 years agoFix various places that were testing td_critnest to see if interrupts
jhb [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.

18 years agoReturn error from fget_write() rather than hardcoding EBADF now that
jhb [Fri, 6 Jan 2006 16:34:22 +0000 (16:34 +0000)]
Return error from fget_write() rather than hardcoding EBADF now that
fget_write() DTRT.

Requested by: bde

18 years agoReturn EBADF rather than EINVAL for FWRITE failure as per POSIX.
jhb [Fri, 6 Jan 2006 16:30:30 +0000 (16:30 +0000)]
Return EBADF rather than EINVAL for FWRITE failure as per POSIX.

MFC after: 1 week

18 years agoBe a little more forgiving of lame BIOS writers. If a link device that
jhb [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.

PR: i386/89545
Tested by: anders

18 years agoAdd missing ' and '
phk [Fri, 6 Jan 2006 11:31:59 +0000 (11:31 +0000)]
Add missing ' and '

Submitted by: simon

18 years agoMake this more readable and add more devices.
phk [Fri, 6 Jan 2006 11:11:03 +0000 (11:11 +0000)]
Make this more readable and add more devices.

Partially from: mich@FreeBSD.org

18 years agoFix locking violation, causing frantic diagnostic messages during boot.
ariff [Fri, 6 Jan 2006 10:36:55 +0000 (10:36 +0000)]
Fix locking violation, causing frantic diagnostic messages during boot.

Reported by: [1] julian
MFC after: 3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003408.html

18 years agoAnother major fixes and enhancements:
ariff [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.

Tested by: barner
MFC after: 1 week

18 years agoNew option: NO_FFS_SNAPSHOT. I did this in p4 about the same time
imp [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).

18 years agoRemove XXX comments complaining that write(2) on a read-only descriptor
jhb [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.)

Discussed with: scottl, grog, mjacob, bde

18 years agoGet rid of the advertising clause in the copyright.
sos [Thu, 5 Jan 2006 21:27:19 +0000 (21:27 +0000)]
Get rid of the advertising clause in the copyright.

18 years agoDon't hold a reference to the disk vnode for each inode.
dumbbell [Thu, 5 Jan 2006 19:27:07 +0000 (19:27 +0000)]
Don't hold a reference to the disk vnode for each inode.

18 years agoFix a bug in Synaptics Touchapd support where psm(4) will enter an infinite
dumbbell [Thu, 5 Jan 2006 19:24:01 +0000 (19:24 +0000)]
Fix a bug in Synaptics Touchapd support where psm(4) will enter an infinite
loop if it receives an out of sync packet.

Reviewed by: mux (mentor)
MFC after: 4 days

18 years agoRefine thread suspension code, now thread suspension is a blockable
davidxu [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.

18 years agoo Typo in the debug message: s/skiped/skipped.
maxim [Thu, 5 Jan 2006 13:39:23 +0000 (13:39 +0000)]
o Typo in the debug message: s/skiped/skipped.

PR: kern/91346
Submitted by: Gavin Atkinson

18 years agoo Typo in the error message: s/invald/invalid.
maxim [Thu, 5 Jan 2006 13:37:07 +0000 (13:37 +0000)]
o Typo in the error message: s/invald/invalid.

PR: misc/91341
Submitted by: Guy Harris

18 years agoDocument the TMPDIR environment variable.
dds [Thu, 5 Jan 2006 10:19:42 +0000 (10:19 +0000)]
Document the TMPDIR environment variable.

MFC after: 1 week

18 years agoOops, on amd64 (and probably on all non-i386 systems), the previous
bde [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).

Exlain the problem better in comments.

18 years agoDocument the recently-added EINVAL behavior.
dds [Thu, 5 Jan 2006 08:55:56 +0000 (08:55 +0000)]
Document the recently-added EINVAL behavior.

MFC after: 1 week

18 years agoUse double precision internally to optimize cbrtf(), and change the
bde [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.

18 years agoEnable truss for powerpc
grehan [Thu, 5 Jan 2006 05:58:16 +0000 (05:58 +0000)]
Enable truss for powerpc

18 years agoAdd powerpc support for truss.
grehan [Thu, 5 Jan 2006 05:57:47 +0000 (05:57 +0000)]
Add powerpc support for truss.

Initial work by:  Orlando Bassotto  < orlando at break net >
Modified by:   grehan

18 years agoAdd -w parameter which tells kgdb to open kmem-based targets in read-write
kan [Wed, 4 Jan 2006 23:17:52 +0000 (23:17 +0000)]
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.

Requested by: wpaul

18 years agoCheck for 10BaseT media correctly. Before we were confusing
imp [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...

18 years agoReturn the proper rmi field in DVDIOCREADSTRUCTURE.
sos [Wed, 4 Jan 2006 21:35:57 +0000 (21:35 +0000)]
Return the proper rmi field in DVDIOCREADSTRUCTURE.

PR: 89650

18 years agoWe don't support I386_CPU in 6.0 and later. This file can be cleaned
netchild [Wed, 4 Jan 2006 20:11:04 +0000 (20:11 +0000)]
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.

Suggested by: jhb
Reviewed by: jhb

18 years agoConvert the PAGE_SIZE check into a CTASSERT.
netchild [Wed, 4 Jan 2006 19:19:42 +0000 (19:19 +0000)]
Convert the PAGE_SIZE check into a CTASSERT.

Suggested by: jhb

18 years agoThis commit was generated by cvs2svn to compensate for changes in r154032,
dougb [Wed, 4 Jan 2006 19:18:43 +0000 (19:18 +0000)]
This commit was generated by cvs2svn to compensate for changes in r154032,
which included commits to RCS files with non-trunk default branches.

18 years agoAfter some discussion with the folks at ISC, it turns out that the _ai_pad
dougb [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.

18 years agoPrevent divide by zero, use default values in case one of the divisor's
netchild [Wed, 4 Jan 2006 18:26:54 +0000 (18:26 +0000)]
Prevent divide by zero, use default values in case one of the divisor's
is zero.

Tested by: Randy Bush <randy@psg.com>

18 years agoEnable boot floppies for amd64. I just copied the needed variables over
jhb [Wed, 4 Jan 2006 18:02:56 +0000 (18:02 +0000)]
Enable boot floppies for amd64.  I just copied the needed variables over
from i386.

Tested by: Markus Trippelsdorf markus at trippelsdorf dot de
Approved by: scottl
MFC after: 1 week

18 years agoMinor whitespace cleanup.
bz [Wed, 4 Jan 2006 17:40:54 +0000 (17:40 +0000)]
Minor whitespace cleanup.

18 years agoFix minor sorting issue.
joel [Wed, 4 Jan 2006 17:19:28 +0000 (17:19 +0000)]
Fix minor sorting issue.

18 years agoRemove references to snd_vortex1(4).
joel [Wed, 4 Jan 2006 17:05:19 +0000 (17:05 +0000)]
Remove references to snd_vortex1(4).

Approved by: tanimura, ariff

18 years agodd some old gssapi libs.
netchild [Wed, 4 Jan 2006 15:54:02 +0000 (15:54 +0000)]
dd some old gssapi libs.

Requested by: bz

18 years agoFix broken capabilities, causing failure during channel reset.
ariff [Wed, 4 Jan 2006 15:35:55 +0000 (15:35 +0000)]
Fix broken capabilities, causing failure during channel reset.
Its min/max speed were off by -/+ 1000.

Reported by: [1] Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
             [2] barner
MFC after: 1 day

[1] http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2005-December/003189.html
[2] http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2006-January/003422.html

18 years agoAdd a new leaf to the net.link.generic.ifdata.%d sysctl to retrieve
harti [Wed, 4 Jan 2006 12:57:09 +0000 (12:57 +0000)]
Add a new leaf to the net.link.generic.ifdata.%d sysctl to retrieve
the name and unit number assigned by the driver. This is needed by
SNMP to find interfaces after they have been renamed.

MFC after: 4 weeks

18 years ago- Make sure the cpu_exthigh variable is initialized (page coloring case). [1]
netchild [Wed, 4 Jan 2006 12:57:02 +0000 (12:57 +0000)]
- Make sure the cpu_exthigh variable is initialized (page coloring case). [1]
- Remove a conditional in the AMD cache detection, it's always false. [2]
- Don't try to detect a cache if only compiled for i386.

Analyzed by: Antoine Brodin <antoine.brodin@laposte.net> [1]
Submitted by: Antoine Brodin <antoine.brodin@laposte.net> [2]

18 years ago1. Add SIGEV_THREAD notification for mq_notify.
davidxu [Wed, 4 Jan 2006 11:48:02 +0000 (11:48 +0000)]
1. Add SIGEV_THREAD notification for mq_notify.
2. Reuse current timer code and abstract some common code to
   to support both timer and mqueue.

18 years agoFix the promise modesetting for old chips.
sos [Wed, 4 Jan 2006 10:23:47 +0000 (10:23 +0000)]
Fix the promise modesetting for old chips.

Pointy hat to: sos

18 years agoDeorbit ttymalloc() in preference for ttyalloc()
phk [Wed, 4 Jan 2006 09:59:07 +0000 (09:59 +0000)]
Deorbit ttymalloc() in preference for ttyalloc()

18 years agoUse ttyalloc() instead of ttymalloc()
phk [Wed, 4 Jan 2006 09:46:20 +0000 (09:46 +0000)]
Use ttyalloc() instead of ttymalloc()

18 years agoUse ttyalloc() instead of ttymalloc()
phk [Wed, 4 Jan 2006 09:20:41 +0000 (09:20 +0000)]
Use ttyalloc() instead of ttymalloc()

18 years agoUse ttyalloc() instead of ttymalloc()
phk [Wed, 4 Jan 2006 09:09:46 +0000 (09:09 +0000)]
Use ttyalloc() instead of ttymalloc()

18 years agoUse ttyalloc() instead of ttymalloc()
phk [Wed, 4 Jan 2006 08:34:23 +0000 (08:34 +0000)]
Use ttyalloc() instead of ttymalloc()

18 years agoUse MTX_SYSINIT to set up the tty list mutex.
phk [Wed, 4 Jan 2006 08:22:39 +0000 (08:22 +0000)]
Use MTX_SYSINIT to set up the tty list mutex.

18 years agoFix promise probe printing.
sos [Wed, 4 Jan 2006 08:20:25 +0000 (08:20 +0000)]
Fix promise probe printing.

18 years agoFix style bug.
dds [Wed, 4 Jan 2006 07:50:54 +0000 (07:50 +0000)]
Fix style bug.

Prompted by: bde

18 years agoReplace tv_usec normalization with the return of EINVAL.
dds [Wed, 4 Jan 2006 00:47:13 +0000 (00:47 +0000)]
Replace tv_usec normalization with the return of EINVAL.
This addresses two objections to the previous behavior,
and unbreaks the alpha tinderbox build.

TODO: update the utimes(2) man page.

18 years agoShuffle some definitions so that this can be included from userland.
scottl [Tue, 3 Jan 2006 23:03:39 +0000 (23:03 +0000)]
Shuffle some definitions so that this can be included from userland.

18 years agoAdd some more data structures and definitions for communicating with the
scottl [Tue, 3 Jan 2006 23:03:15 +0000 (23:03 +0000)]
Add some more data structures and definitions for communicating with the
ServeRAID firmware.

18 years agoNormalize the tv_usec part of the utimes(2) arguments to ensure
dds [Tue, 3 Jan 2006 21:58:21 +0000 (21:58 +0000)]
Normalize the tv_usec part of the utimes(2) arguments to ensure
that a file's atime and mtime are only set to correct fractional
second values (0-999999000ns with the current interface).
Prior to this change users could create files with values outside
that range.  Moreover, on 32-bit machines tv_usec offsets larger than
4.3s would result in an unnormalized AND wrong timestamp value,
due to overflow.

MFC after: 1 week

18 years agoDon't use threads when there's no real reason to.
des [Tue, 3 Jan 2006 21:32:02 +0000 (21:32 +0000)]
Don't use threads when there's no real reason to.

MFC after: 2 weeks

18 years agoFix a couple of issues with the ibcs2 module event handler. First, return
jhb [Tue, 3 Jan 2006 20:39:38 +0000 (20:39 +0000)]
Fix a couple of issues with the ibcs2 module event handler.  First, return
success instead of EOPNOTSUPP when being loaded.  Secondly, if there are no
ibcs2 processes running when a MOD_UNLOAD request is made, break out to
return success instead of falling through into the default case which
returns EOPNOTSUPP.  With these fixes, I can now kldload and subsequently
kldunload the ibcs2 module.

PR: kern/82026 (and several duplicates)
Reported by: lots of folks
MFC after: 1 week

18 years agoCorrectly check the filter length. I committed the wrong version.
jkim [Tue, 3 Jan 2006 20:34:41 +0000 (20:34 +0000)]
Correctly check the filter length.  I committed the wrong version.
Pointy hat to me.

18 years ago- Explicitly validate an empty filter to match bpf_filter() comment[1].
jkim [Tue, 3 Jan 2006 20:26:03 +0000 (20:26 +0000)]
- Explicitly validate an empty filter to match bpf_filter() comment[1].
- Do not use BPF JIT compiler for an empty filter.

[1] Pointed out by: darrenr

18 years agoRelease the pci_link acpi serial lock if a link device has no actual links.
jhb [Tue, 3 Jan 2006 20:19:34 +0000 (20:19 +0000)]
Release the pci_link acpi serial lock if a link device has no actual links.

MFC after: 3 days

18 years agoThis signal handling code is worse than a no-op. If a
brian [Tue, 3 Jan 2006 17:01:43 +0000 (17:01 +0000)]
This signal handling code is worse than a no-op.  If a
signal is received during the msleep, the msleep is retried
indefinitely as it just keeps returning ERESTART because of
the pending signal.

Instead, just don't PCATCH - the signal can wait.

Sponsored by: Sophos/ActiveState

18 years ago- Don't list sleep() in the NAME section as we haven't had a sleep()
jhb [Tue, 3 Jan 2006 17:00:38 +0000 (17:00 +0000)]
- Don't list sleep() in the NAME section as we haven't had a sleep()
  function in years.
- Change the 'ident' paramters to 'wchan' to match <sys/systm.h>.
- Use 'otherwise' in place of 'else' in one place so that this reads like
  English rather than C.
- Document the new msleep_spin() function.
- Add history notes for msleep() and msleep_spin().

18 years agoFor the ``#ifdef NOTYET'' code that allows calling non-async-safe
brian [Tue, 3 Jan 2006 15:34:27 +0000 (15:34 +0000)]
For the ``#ifdef NOTYET'' code that allows calling non-async-safe
functions in the child after a fork() from a threaded process,
use __sys_setprocmask() rather than setprocmask() to keep our
signal handling sane.  Without this fix, signals are essentially
ignored in said child and things such as protection violations
result in an endless busy loop.

Reviewed by: deischen

18 years agoBack out VFS_LOCK_GIANT.9:1.4, due to losing a race in change/update
rwatson [Tue, 3 Jan 2006 14:00:22 +0000 (14:00 +0000)]
Back out VFS_LOCK_GIANT.9:1.4, due to losing a race in change/update
against revision 1.3.  No need to include mount.h twice, once will be
quite enough.

Pointed out by: simon

18 years agoRemove in-progress wait code to sync with libpthread's behavior.
davidxu [Tue, 3 Jan 2006 13:30:23 +0000 (13:30 +0000)]
Remove in-progress wait code to sync with libpthread's behavior.

18 years agoWhen returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule
rwatson [Tue, 3 Jan 2006 09:49:10 +0000 (09:49 +0000)]
When returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule
lock.  Otherwise the system comes to a rather sudden and grinding
halt.

MFC after: 1 week

18 years agoFix the other su bug reintroduced two commits ago, namely
brian [Tue, 3 Jan 2006 09:17:04 +0000 (09:17 +0000)]
Fix the other su bug reintroduced two commits ago, namely

    $ su
    % kill -STOP $$

where su is executing (t)csh.  csh's job handling is a little more
special than that of (a)sh, bash and even zsh and blows up a little
more spectacularly.  This modification restores the original mucking
about with the tty pgrp, but is careful to only do it when su (or
su's child) is the foreground process.

While I'm here, fix a STDERR_FILENO spelling as suggested by bde.

18 years ago- Tx side bus_dmamap_load_mbuf_sg(9) support. This reduces bookkeeping
yongari [Tue, 3 Jan 2006 06:14:07 +0000 (06:14 +0000)]
- Tx side bus_dmamap_load_mbuf_sg(9) support. This reduces bookkeeping
  requiried to keep consistent softc state before/after callback function
  invocation and supposed to be sligntly faster than previous one as it
  wouldn't incur callback overhead. With this change callback function
  was gone.
- Decrease TI_MAXTXSEGS to 32 from 128. It seems that most mbuf chain
  length is less than 32 and it would be re-packed with m_defrag(9) if
  its chain length is larger than TI_MAXTXSEGS. This would protect ti(4)
  against possible kernel stack overflow when txsegs[] is put on stack.
  Alternatively, we can embed the txsegs[] into softc. However, that
  would waste memory and make Tx/Rx speration hard when we want to
  sperate Tx/Rx handlers to optimize locking.
- Fix dma map tracking used in Tx path. Previously it used the dma map
  of the last mbuf chain in ti_txeof() which was incorrect as ti(4)
  used dma map of the first mbuf chain when it loads a mbuf chain with
  bus_dmamap_load_mbuf(9). Correct the bug by introducing queues that
  keep track of active/inactive dma maps/mbuf chain.
- Use ti_txcnt to check whether driver need to set watchdog timer instead
  of blidnly clearing the timer in ti_txeof().
- Remove the 3rd arg. of ti_encap(). Since ti(4) now caches the last
  descriptor index(ti_tx_saved_prodidx) used in Tx there is no need to
  pass it as a fuction arg.
- Change data type of producer/consumer index to int from u_int16_t in
  order to remove implicit type conversions in Tx/Rx handlers.
- Check interface queue before getting a mbuf chain to reduce locking
  overhead.
- Check number of available Tx descriptores to be 16 or higher in
  ti_start(). This wouldn't protect Tx descriptor shortage but it would
  reduce number of bus_dmamap_unload(9) calls in ti_encap() when we are
  about to running out of Tx descriptors.
- Command NIC to send packets ony when the driver really has packets
  enqueued. Previously it always set TI_MB_SENDPROD_IDX which would
  command NIC to DMA Tx descriptors into NIC local memory regardless
  of Tx descriptor changes.

Reviewed by: scottl

18 years agoUse the child to allocate the resource rather than bridge, since we're
imp [Tue, 3 Jan 2006 03:36:17 +0000 (03:36 +0000)]
Use the child to allocate the resource rather than bridge, since we're
allocating a resource that's in the card itself.

Remove more now-redundant resource_list_add, and now-redunant code
that lives in the pci layer.

# This fixes the atheros card that I have which had its CIS in one of
# the BARs.  Don't know yet if this fixes the amd64 issues reported.

18 years agoMinor style(9) hacking, plus use a macro in place of (struct resource *)~0UL
imp [Tue, 3 Jan 2006 03:16:53 +0000 (03:16 +0000)]
Minor style(9) hacking, plus use a macro in place of (struct resource *)~0UL
(what the heck does that mean?).

18 years agoFix a brain-o in the last commit, the conditional was always false.
thompsa [Mon, 2 Jan 2006 23:02:43 +0000 (23:02 +0000)]
Fix a brain-o in the last commit, the conditional was always false.