]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoAdd line edit and history support to ngctl(8) via editline(3).
glebius [Mon, 7 Aug 2006 14:17:05 +0000 (14:17 +0000)]
Add line edit and history support to ngctl(8) via editline(3).

Details:
- The main thread runs editline(3) functions, that can block.
- A separate thread is launched to monitor netgraph sockets.
- The access to the descriptors is protected by a mutex. At
  runtime the monitoring thread owns the mutex. When the main
  thread reads a command from el_gets() it asks the monitoring
  thread to release a mutex and sleep until the main thread
  processes the command.

This makes ngctl(8) depend on libedit, and libpthread. Thus, the
new functionality isn't compiled in if release is being built
with -DRELEASE_CRUNCH.

PR: bin/87352
Reviewed by: ru, Nuno Antunes <nuno.antunes gmail.com>

17 years agoRecognize the 5750 C2.
glebius [Mon, 7 Aug 2006 12:51:50 +0000 (12:51 +0000)]
Recognize the 5750 C2.

Obtained from: OpenBSD (brad)

17 years agoMove definition of UNIX domain socket protosw and domain entries from
rwatson [Mon, 7 Aug 2006 12:02:43 +0000 (12:02 +0000)]
Move definition of UNIX domain socket protosw and domain entries from
uipc_proto.c to uipc_usrreq.c, making localdomain static.  Remove
uipc_proto.c as it's no longer used.  With this change, UNIX domain
sockets are entirely encapsulated in uipc_usrreq.c.

17 years agoSpell "determine" correctly.
keramida [Mon, 7 Aug 2006 10:33:07 +0000 (10:33 +0000)]
Spell "determine" correctly.

Reviewed by: jb

17 years agoUpdate NetBSD and OpenBSD SCM tags to match the reality. Note that
delphij [Mon, 7 Aug 2006 10:29:18 +0000 (10:29 +0000)]
Update NetBSD and OpenBSD SCM tags to match the reality.  Note that
NetBSD revisions 1.8 and 1.9 are not actually applied to our code base
because we have solved the problem differently, therefore, these changes
can be safely skipped.

17 years agoMerge all applicable NetBSD and OpenBSD improvements over this manpage
delphij [Mon, 7 Aug 2006 10:22:08 +0000 (10:22 +0000)]
Merge all applicable NetBSD and OpenBSD improvements over this manpage
till NetBSD mailwrapper.8,v 1.11 and OpenBSD mailwrapper.8,v 1.8:

 - Separate exit status out from diagnostics section.
 - Fix typos.

Obtained from: NetBSD, OpenBSD
MFC After: Along with mailwrapper(8) updates.

17 years ago- Use log(9) instead of printf(9).
glebius [Mon, 7 Aug 2006 08:05:10 +0000 (08:05 +0000)]
- Use log(9) instead of printf(9).
- Print node ID, where possible.
- Prepend log messages with function name, or at least with "ng_pppoe".

Reviewed by: julian
Tested by: Joao Barros <joao.barros gmail.com>

17 years agoFix things I misadvised to Nate Lawson:
yar [Mon, 7 Aug 2006 07:28:47 +0000 (07:28 +0000)]
Fix things I misadvised to Nate Lawson:

- "Ns No" is redundant, so reduce it to just "Ns";
- use Li to mark up CPU and system power states because here they are
  just strings to be typed literally (add more such mark-up as well);
- the best practice of typesetting tells us to use an en-dash to
  indicate a closed range; fortunately, groff_char(7) provides such a symbol.

In addition, consistently use a comma between independent clauses
coordinated by a conjunction.

Pointed out by: ru (mark-up part)
MFC after: 3 days

17 years agoadd wesside
sam [Mon, 7 Aug 2006 00:05:32 +0000 (00:05 +0000)]
add wesside

17 years agoanother tool that uses the raw tx api
sam [Mon, 7 Aug 2006 00:05:04 +0000 (00:05 +0000)]
another tool that uses the raw tx api

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agouse proper tx series
sam [Sun, 6 Aug 2006 23:50:56 +0000 (23:50 +0000)]
use proper tx series

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoEliminate the unnecessary acquisition and release of the page queues lock
alc [Sun, 6 Aug 2006 19:36:07 +0000 (19:36 +0000)]
Eliminate the unnecessary acquisition and release of the page queues lock
from pmap_pinit().

17 years agoMake mpo_associate_nfsd_label() return void, not int, to match
rwatson [Sun, 6 Aug 2006 16:56:15 +0000 (16:56 +0000)]
Make mpo_associate_nfsd_label() return void, not int, to match
mac_associate_nfsd_label().

Head nod: csjp

17 years agoEliminate a pair of unneeded parentheses slipped in from previous version of
marck [Sun, 6 Aug 2006 14:23:50 +0000 (14:23 +0000)]
Eliminate a pair of unneeded parentheses slipped in from previous version of
fix.

Noticed by: ru

17 years agoAdd identifier for the Epson CX3650 all-in-one scanner function.
bms [Sun, 6 Aug 2006 12:01:42 +0000 (12:01 +0000)]
Add identifier for the Epson CX3650 all-in-one scanner function.
This enables the scanner function on these devices to be detected
and probed by uscanner(4), but only when ulpt is not loaded.

PR: usb/92462
Submitted by: Friedrich Volkmann
MFC after: 30 days

17 years ago- Added ability to provide (optional) path to the kernel sources
rik [Sun, 6 Aug 2006 11:06:35 +0000 (11:06 +0000)]
- Added ability to provide (optional) path to the kernel sources
- Fixed path for ${s}/conf/files.FOO and a note that it should be merged into
corresponding file to be able to compile the kernel
- Changed kernel configuration example with the driver: it is not produced by
copying Generic but by including it
- Changed from automatic module building to asking an user if it whants to

Reviewed by:    julian@

17 years agoFix compilation.
rik [Sun, 6 Aug 2006 11:04:22 +0000 (11:04 +0000)]
Fix compilation.

Reviewed by: julian@

17 years agoImprove commenting of vaccess(), making sure to be clear that the ifdef
rwatson [Sun, 6 Aug 2006 10:43:35 +0000 (10:43 +0000)]
Improve commenting of vaccess(), making sure to be clear that the ifdef
capabilities code is there for reference and never actually used.  Slight
style tweak.

17 years agoDon't set pru_sosend, pru_soreceive, pru_sopoll to default values, as they
rwatson [Sun, 6 Aug 2006 10:39:21 +0000 (10:39 +0000)]
Don't set pru_sosend, pru_soreceive, pru_sopoll to default values, as they
are already set to default values.

17 years agostrlen(3) returns size_t, which is not strictly equivalent to int an 64-bit
marck [Sun, 6 Aug 2006 08:37:46 +0000 (08:37 +0000)]
strlen(3) returns size_t, which is not strictly equivalent to int an 64-bit
archs, hence printf(3) warning.  Fix this.

Noticed by: tinderbox
Approved by: rse

17 years agoEliminate the acquisition and release of the page queues lock around a call
alc [Sun, 6 Aug 2006 06:29:16 +0000 (06:29 +0000)]
Eliminate the acquisition and release of the page queues lock around a call
to vm_page_sleep_if_busy().

17 years agoReduce the scope of the page queues lock in kern_sendfile() now that
alc [Sun, 6 Aug 2006 01:00:09 +0000 (01:00 +0000)]
Reduce the scope of the page queues lock in kern_sendfile() now that
vm_page_sleep_if_busy() no longer requires the caller to hold the page
queues lock.

17 years agoEliminate the acquisition and release of the page queues lock around a call
alc [Sun, 6 Aug 2006 00:17:17 +0000 (00:17 +0000)]
Eliminate the acquisition and release of the page queues lock around a call
to vm_page_sleep_if_busy().

17 years agoChange vm_page_sleep_if_busy() so that it no longer requires the caller to
alc [Sun, 6 Aug 2006 00:15:40 +0000 (00:15 +0000)]
Change vm_page_sleep_if_busy() so that it no longer requires the caller to
hold the page queues lock.

17 years agoWith socket code no longer in svr4_stream.c, MAC includes are no longer
rwatson [Sat, 5 Aug 2006 22:04:21 +0000 (22:04 +0000)]
With socket code no longer in svr4_stream.c, MAC includes are no longer
required, so GC.

17 years agoRemove register, use ANSI function headers.
rwatson [Sat, 5 Aug 2006 21:40:59 +0000 (21:40 +0000)]
Remove register, use ANSI function headers.

17 years agoWe now spell "inode" as "vnode" in the VFS layer, so update comment
rwatson [Sat, 5 Aug 2006 21:08:47 +0000 (21:08 +0000)]
We now spell "inode" as "vnode" in the VFS layer, so update comment
for new world order.

MFC after: 3 days
Pointed out by: mckusick

17 years agoAdd libbsm to the list of our standard libraries.
yar [Sat, 5 Aug 2006 20:38:23 +0000 (20:38 +0000)]
Add libbsm to the list of our standard libraries.

Approved by: ru

17 years agoAdd OpenSolaris compatibility definitions which are only visible if
jb [Sat, 5 Aug 2006 20:35:11 +0000 (20:35 +0000)]
Add OpenSolaris compatibility definitions which are only visible if
_SOLARIS_C_SOURCE is defined.

The _OpenSolaris_version is set to match the last import of the OpenSolaris
tar ball and is based on the date in that file name.

17 years agoBack out 1.272. The LAPIC timer conflicts with C2/3 on various systems,
njl [Sat, 5 Aug 2006 20:28:50 +0000 (20:28 +0000)]
Back out 1.272.  The LAPIC timer conflicts with C2/3 on various systems,
and so users get hangs until interrupts are generated another way.  We'll
have to find a way to make the 2 work together before re-enabling this by
default.

17 years agoAdd support for the generated file systrace_args.c.
jb [Sat, 5 Aug 2006 19:25:14 +0000 (19:25 +0000)]
Add support for the generated file systrace_args.c.

17 years agoRemove a stale comment.
alc [Sat, 5 Aug 2006 19:07:07 +0000 (19:07 +0000)]
Remove a stale comment.

17 years agoUse safe strlcpy rather than unsafe strncpy. After marcel's last fix,
imp [Sat, 5 Aug 2006 18:22:11 +0000 (18:22 +0000)]
Use safe strlcpy rather than unsafe strncpy.  After marcel's last fix,
there was still one overflow possible.  strlcpy is faster anyway
because it doesn't unexpectedly zero the entire length of the string
when copying short strings....

17 years agomake it work after the api change
sam [Sat, 5 Aug 2006 18:21:04 +0000 (18:21 +0000)]
make it work after the api change

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoSince soisdisconnected() is no longer called in pru_detach(), call it
rwatson [Sat, 5 Aug 2006 14:14:34 +0000 (14:14 +0000)]
Since soisdisconnected() is no longer called in pru_detach(), call it
near consumers of at_pcbdisconnect() (_close, _abort).

17 years agoUse the SLIST_NEXT macro instead of sle_next.
stefanf [Sat, 5 Aug 2006 13:58:50 +0000 (13:58 +0000)]
Use the SLIST_NEXT macro instead of sle_next.

Checked with: cmp(1)

17 years agoDo not pass-through the tailing newline character from the ctime(3)
rse [Sat, 5 Aug 2006 12:50:38 +0000 (12:50 +0000)]
Do not pass-through the tailing newline character from the ctime(3)
output to setproctitle(3) in order to get rid of the ugly two-character
escape sequence "\n" in the ps(1) output of a dump(8) process:

<< [...] finished in 0:00 at Sat Aug  5 14:44:39 2006\n (dump)
>> [...] finished in 0:00 at Sat Aug  5 14:44:39 2006 (dump)

17 years agoUnbreak nForce3 SATA support.
sos [Sat, 5 Aug 2006 11:41:46 +0000 (11:41 +0000)]
Unbreak nForce3 SATA support.

17 years agohook packet injection tools up
sam [Sat, 5 Aug 2006 05:20:40 +0000 (05:20 +0000)]
hook packet injection tools up

17 years agotest programs for 802.11 packet injection
sam [Sat, 5 Aug 2006 05:18:03 +0000 (05:18 +0000)]
test programs for 802.11 packet injection

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years ago802.11 packet injection test tool
sam [Sat, 5 Aug 2006 05:13:31 +0000 (05:13 +0000)]
802.11 packet injection test tool

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agocrude stumbler using raw packet api's
sam [Sat, 5 Aug 2006 05:12:03 +0000 (05:12 +0000)]
crude stumbler using raw packet api's

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoraw tx stat
sam [Sat, 5 Aug 2006 05:09:20 +0000 (05:09 +0000)]
raw tx stat

17 years agoraw 802.11 packet transmit support
sam [Sat, 5 Aug 2006 05:07:17 +0000 (05:07 +0000)]
raw 802.11 packet transmit support

Joint work with: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoraw 802.11 packet transmit support
sam [Sat, 5 Aug 2006 04:58:25 +0000 (04:58 +0000)]
raw 802.11 packet transmit support

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>

17 years agoRemove reference to PTI cards. They haven't been functioning
mjacob [Sat, 5 Aug 2006 04:21:20 +0000 (04:21 +0000)]
Remove reference to PTI cards. They haven't been functioning
or around for probably at least 5 years.

17 years agoAdd OpenSolaris compatibility definitions for stat64 and fstat64 which
jb [Fri, 4 Aug 2006 23:47:30 +0000 (23:47 +0000)]
Add OpenSolaris compatibility definitions for stat64 and fstat64 which
are only visible if _SOLARIS_C_SOURCE is defined.

Note thar FreeBSD stat() and fstat() are 64-bit functions now and Solaris
still persists with both 32- and 64-bit versions. When I query this, I am
referred to: <http://www.unix.org/version2/whatsnew/lfs20mar.html>.
But when you look at the main page of unix.org you will see that the
Single Unix Specification <http://www.unix.org/version3/> is the most
recent standard they are pushing. And there are no stat64() fstat64()
functions defined there. I guess this just goes to prove that there are so
many standards, you can take your pick.

17 years agoAdd a type definition for the cyclic timer callback function.
jb [Fri, 4 Aug 2006 23:31:16 +0000 (23:31 +0000)]
Add a type definition for the cyclic timer callback function.

The cyclic timer is a high-resolution timer allows timeouts at nanosecond
intervals where hardware support is available. Typically on i386 there
is no HPET (high performance event timer) like the one Intel started
specifying some time in 2004, so the best that tye cyclic timer subsystem
can do is run at Hz.

The cyclic timer code itself is ported from OpenSolaris and is covered
by the CDDL, so it is only loaded as a module. This function type definition
is used in machine-dependent code to provide a hook for the module to
register it's callback function.

17 years agoAdd some OpenSolaris compatibility definitions which are only visible
jb [Fri, 4 Aug 2006 23:10:11 +0000 (23:10 +0000)]
Add some OpenSolaris compatibility definitions which are only visible
if _SOLARIS_C_SOURCE is defined.

Add two function prototypes which are required to feed high-resolution
times to DTrace. DTrace requires it's own functions with the dtrace_
prefix so that it knows not to try and trace them. This is a rule that
code executed from the DTrace probe context must obey.

The two functions are only be compiled if the KDTRACE option is defined
to compile in kernel support for loading the DTrace modules.

17 years agoAdd some compatibility definitions for OpenSolaris source.
jb [Fri, 4 Aug 2006 22:54:10 +0000 (22:54 +0000)]
Add some compatibility definitions for OpenSolaris source.

These are only defined if _SOLARIS_C_SOURCE is defined, so they don't
polute the FreeBSD compile environment.

They are used all over the OpenSolaris source, so defining them here
removes the need to continually resolve differences in FreeBSD system
haeder files from Solaris header files.

17 years agoFix for architectures where sizeof(void *) > sizeof(int).
jb [Fri, 4 Aug 2006 21:45:08 +0000 (21:45 +0000)]
Fix for architectures where sizeof(void *) > sizeof(int).

17 years agoBuild shared on PowerPC now that the bug has been found and fixed.
marcel [Fri, 4 Aug 2006 21:29:39 +0000 (21:29 +0000)]
Build shared on PowerPC now that the bug has been found and fixed.

17 years agoThe KAME compatability shims in net_osdep.h have been removed.
brooks [Fri, 4 Aug 2006 21:29:22 +0000 (21:29 +0000)]
The KAME compatability shims in net_osdep.h have been removed.

17 years agoFix (static) buffer overflow bug. The dest buffer is of size MAXPATHLEN,
marcel [Fri, 4 Aug 2006 21:28:42 +0000 (21:28 +0000)]
Fix (static) buffer overflow bug. The dest buffer is of size MAXPATHLEN,
so dest[MAXPATHLEN] falls outside the buffer.  This bug corrupted
arenas[0] defined in libc's malloc.c on PowerPC when kldxref is shared,
which triggered a delayed SIGSERV.

17 years agoWith exception of the if_name() macro, all definitions in net_osdep.h
brooks [Fri, 4 Aug 2006 21:27:40 +0000 (21:27 +0000)]
With exception of the if_name() macro, all definitions in net_osdep.h
were unused or already in if_var.h so add if_name() to if_var.h and
remove net_osdep.h along with all references to it.

Longer term we may want to kill off if_name() entierly since all modern
BSDs have if_xname variables rendering it unnecessicary.

17 years agoUse TAILQ_EMPTY instead of checking if TAILQ_FIRST is NULL.
brooks [Fri, 4 Aug 2006 21:15:09 +0000 (21:15 +0000)]
Use TAILQ_EMPTY instead of checking if TAILQ_FIRST is NULL.

17 years agoIncrease local reserved (high && low) storage in each command
mjacob [Fri, 4 Aug 2006 20:20:55 +0000 (20:20 +0000)]
Increase local reserved (high && low) storage in each command
structure from 2 to 3 words.

17 years agoFix na_fcentry_t to not have a lun field. Fix indentation in handly
mjacob [Fri, 4 Aug 2006 20:20:00 +0000 (20:20 +0000)]
Fix na_fcentry_t to not have a lun field. Fix indentation in handly
the notify structs. Fix messages in isp_got_msg_fc to print out the
loop id of the sender- not the wwpn which will be synthesized later,
if possible, in the outer layers. Put in debug printouts to pair
a notify ack to a notify so one can see the start/close of an
immediate notify event. Put in spsace for TASK MANAGEMENT response
flags (which we don't do yet).

17 years agoInitialize 2300 request/response pointers in isp_reset- not in
mjacob [Fri, 4 Aug 2006 20:14:52 +0000 (20:14 +0000)]
Initialize 2300 request/response pointers in isp_reset- not in
isp_fibre_init.

17 years agoRename ioctl driven task management functions so they
mjacob [Fri, 4 Aug 2006 20:14:03 +0000 (20:14 +0000)]
Rename ioctl driven task management functions so they
don't collide with task management definitions on other
platforms.

17 years agoForgot to add mountlate to the Makefile.
des [Fri, 4 Aug 2006 18:37:03 +0000 (18:37 +0000)]
Forgot to add mountlate to the Makefile.

17 years agoBy default "autosrc" is off.
glebius [Fri, 4 Aug 2006 18:28:57 +0000 (18:28 +0000)]
By default "autosrc" is off.

Submitted by: ru

17 years agoCopy the link-layer address from our ifnet pointer at reset time
gallatin [Fri, 4 Aug 2006 17:58:40 +0000 (17:58 +0000)]
Copy the link-layer address from our ifnet pointer at reset time
so that the mac address can be overridden.

17 years agoBuild libthread_db on PowerPC.
marcel [Fri, 4 Aug 2006 17:56:31 +0000 (17:56 +0000)]
Build libthread_db on PowerPC.

17 years agoAdd stub functions. This allows libthread_db to be built and installed,
marcel [Fri, 4 Aug 2006 17:55:55 +0000 (17:55 +0000)]
Add stub functions. This allows libthread_db to be built and installed,
which means that we also have <thread_db.h>.

17 years agoDont overwrite cpu_model in the case of Via's C3-CPU.
mr [Fri, 4 Aug 2006 13:49:16 +0000 (13:49 +0000)]
Dont overwrite cpu_model in the case of Via's C3-CPU.

Noticed by:  Mike Tancsa
MFC after: 2 days

17 years agoIn symlook_obj(): fix _rtld_error output.
delphij [Fri, 4 Aug 2006 13:37:54 +0000 (13:37 +0000)]
In symlook_obj(): fix _rtld_error output.

MFC After: 2 weeks

17 years agoTurn off by default "feature" that overwrites MAC address
glebius [Fri, 4 Aug 2006 13:36:27 +0000 (13:36 +0000)]
Turn off by default "feature" that overwrites MAC address
on output frames.

Many people were confused with not working CARP, ng_bridge(4)
and other subsystems, because ng_ether(4) overwritten source
MAC address.

17 years agoCheck if the filedes of kevent is expected one. Though our
ume [Fri, 4 Aug 2006 12:26:07 +0000 (12:26 +0000)]
Check if the filedes of kevent is expected one.  Though our
old resolver opened just one socket, BIND9's resolver may
open more than one sockets.  And, BIND9's resolver doesn't
close the socket on timeout.  So, we need this check.

Reported by: freebsd-cvs-src__at__oldach.net (Helge Oldach), bz
Hinted by: rwatson

17 years agoRemove useless NULL pointer check: we are using M_WAITOK flag for memory
oleg [Fri, 4 Aug 2006 10:50:51 +0000 (10:50 +0000)]
Remove useless NULL pointer check: we are using M_WAITOK flag for memory
allocation.

Submitted by: Andrey Elsukov <bu7cher at yandex dot ru>
Approved by: glebius (mentor)
MFC after: 1 week

17 years ago_close() should be called instead of close() here.
ume [Fri, 4 Aug 2006 10:21:11 +0000 (10:21 +0000)]
_close() should be called instead of close() here.

17 years agoCommit the results of the typo hunt by Darren Pilgrim.
yar [Fri, 4 Aug 2006 07:56:35 +0000 (07:56 +0000)]
Commit the results of the typo hunt by Darren Pilgrim.
This change affects documentation and comments only,
no real code involved.

PR: misc/101245
Submitted by: Darren Pilgrim <darren pilgrim bitfreak org>
Tested by: md5(1)
MFC after: 1 week

17 years agoUse floating point instead of hacking something together. Suggested by
njl [Fri, 4 Aug 2006 07:31:55 +0000 (07:31 +0000)]
Use floating point instead of hacking something together.  Suggested by
bde@.  Fix nearby int conversion and a couple style bugs.

MFC after: 1 day

17 years agoImprove quoting of the S1-S5 states. Suggested by yar@.
njl [Fri, 4 Aug 2006 07:19:01 +0000 (07:19 +0000)]
Improve quoting of the S1-S5 states.  Suggested by yar@.
Add a workaround for conflicts between ACPI Cx CPU idling and LAPIC timer.

MFC after: 1 day

17 years agoThe page queues lock is no longer required by vm_page_io_start(). Reduce
alc [Fri, 4 Aug 2006 05:53:20 +0000 (05:53 +0000)]
The page queues lock is no longer required by vm_page_io_start().  Reduce
the scope of the page queues lock in kern_sendfile() accordingly.

17 years agoWhen sleeping on a busy page, use the lock from the containing object
alc [Thu, 3 Aug 2006 23:56:11 +0000 (23:56 +0000)]
When sleeping on a busy page, use the lock from the containing object
rather than the global page queues lock.

17 years agoUse proper trap code for the EXC_ALI traps. This fixes SIGBUS during
sobomax [Thu, 3 Aug 2006 22:44:46 +0000 (22:44 +0000)]
Use proper trap code for the EXC_ALI traps. This fixes SIGBUS during
unaligned 64-bits load/stores.

MFC after: 2 weeks

17 years agoReport the correct function name in a DPRINTF.
jb [Thu, 3 Aug 2006 21:19:13 +0000 (21:19 +0000)]
Report the correct function name in a DPRINTF.

17 years agoUpdate document date.
bms [Thu, 3 Aug 2006 20:43:51 +0000 (20:43 +0000)]
Update document date.

Noticed by: ru

17 years agoRevert back changes to made in rev 1.109 of if_em.c which were unnecessary.
pdeuskar [Thu, 3 Aug 2006 19:05:04 +0000 (19:05 +0000)]
Revert back changes to made in rev 1.109 of if_em.c which were unnecessary.
This makes it easier for us to get the changes into -current and to -stable quickly.

17 years ago- Fix ncp_poll() to not panic if the socket doesn't have any pending data.
jhb [Thu, 3 Aug 2006 15:31:52 +0000 (15:31 +0000)]
- Fix ncp_poll() to not panic if the socket doesn't have any pending data.
  We have to adjust curthread's state enough so that it appears to be
  in a poll(2) or select(2) call so that selrecord() will work and then
  teardown that state after calling sopoll().
- Fix some minor nits in nearby ncp_sock_rselect() and in the identical
  nbssn_rselect() function in the netsmb code:
  - Don't call nb_poll()/ncp_poll() now that ncp_poll() already fakes up
    poll(2) state since the rselect() functions already do that.  Just
    invoke sopoll() directly.
  - To make things slightly more intuitive, store the results of sopoll()
    in a new 'revents' variable rather than 'error' since that's what
    sopoll() actually returns.
  - If the requested timeout time has been exceeded by the time we get
    ready to block, then return EWOULDBLOCK rather than 0 to signal a
    timeout as this is what the calling code expects.

Tested by: Eric Christeson <eric.j.christeson AT gmail> (1)
MFC after: 1 week

17 years agoShould vlan_input() ever be called with ifp pointing to a non-Ethernet
yar [Thu, 3 Aug 2006 09:59:08 +0000 (09:59 +0000)]
Should vlan_input() ever be called with ifp pointing to a non-Ethernet
interface, do not just assign -1 to tag because it breaks the logic of
the code to follow.  The better way is to handle this case as an unsupported
protocol and return unless INVARIANTS is in effect and we can panic.
Panic is good there because the scenario can happen only because of a
coding error elsewhere.

We also should show the interface name in the panic message for easier
debugging of the problem, should it ever emerge.

Submitted by: qingli (initially)

17 years agoBack out rev. 1.107 because it introduced as many problems
yar [Thu, 3 Aug 2006 09:50:15 +0000 (09:50 +0000)]
Back out rev. 1.107 because it introduced as many problems
as it tried to solve:

- it smuggled hidden 802.1q details into otherwise protocol-neutral code;
- it put an important code consistency check under DEBUG, which was never
  defined by anyone but a developer hacking this file for the moment;
- lastly, the former bcopy() call had been correct as long as the "dead"
  code was there.

(A new version of the fix for tag of -1 to come in the next commit.)

Agreed by: qingli

17 years agoMerge in new driver from Intel, version 6.0.5. It adds support for
glebius [Thu, 3 Aug 2006 09:20:11 +0000 (09:20 +0000)]
Merge in new driver from Intel, version 6.0.5. It adds support for
80003 NICs and NICs found on ICH8 mobos, and improves support for
already known chips.

Details:
  - if_em.c. Merged manually, viewing diff between new vendor
    driver and previous one. This was an easy task, because
    most changes between 5.1.5 and 6.0.5 are bugfixes taken
    from FreeBSD.
  - if_em_hw.h. Dropped in from vendor, and then restored
    revisions 1.16, 1.17, 1.18.
  - if_em_hw.c. Dropped in from vendor, and then restored
    revision 1.15.
  - if_em_osdep.h. Added new required macros from vendor file
    and add a hack against define namespace mangling in
    if_em_hw.h. Intel made another hack, but I prefer mine.

17 years agoAdd the DTrace library script directory.
jb [Thu, 3 Aug 2006 05:46:32 +0000 (05:46 +0000)]
Add the DTrace library script directory.

17 years agoNot allowed to use tabs. The rule that proves the rule. Heh.
jb [Thu, 3 Aug 2006 05:44:51 +0000 (05:44 +0000)]
Not allowed to use tabs. The rule that proves the rule. Heh.

17 years agoRegen.
jb [Thu, 3 Aug 2006 05:32:43 +0000 (05:32 +0000)]
Regen.

Note the addition of the extra file now generated.

17 years agoRegen.
jb [Thu, 3 Aug 2006 05:31:28 +0000 (05:31 +0000)]
Regen.

17 years agoGenerate another file called systrace_args.c. This will be compiled
jb [Thu, 3 Aug 2006 05:29:09 +0000 (05:29 +0000)]
Generate another file called systrace_args.c. This will be compiled
into systrace and is used to map the syscall arguments into the 64-bit
parameter array.

17 years agoAdd fields to struct sysent to support the DTrace syscall provider called
jb [Thu, 3 Aug 2006 05:26:51 +0000 (05:26 +0000)]
Add fields to struct sysent to support the DTrace syscall provider called
systrace.

Another file called systrace_args.c is generated. This will be compiled
into systrace and is used to map the syscall arguments into the 64-bit
parameter array.

17 years agoAdd an option to enable KSE support.
jb [Thu, 3 Aug 2006 05:19:33 +0000 (05:19 +0000)]
Add an option to enable KSE support.

Add an option to build in kernel DTrace hooks. Without this option, the
DTrace modules acn't be loaded.

17 years agoWhen the volume is being downgraded from a read-write mode, mark
delphij [Thu, 3 Aug 2006 03:55:52 +0000 (03:55 +0000)]
When the volume is being downgraded from a read-write mode, mark
it as clean.

PR: kern/85366
Submitted by: Dan Lukes <dan at obluda dot cz>
MFC After: 2 weeks

17 years agoIn DCE 1.1, the time_low value is defined as an unsigned 32-bit
delphij [Thu, 3 Aug 2006 03:34:36 +0000 (03:34 +0000)]
In DCE 1.1, the time_low value is defined as an unsigned 32-bit
integer.  Presently, our implementation employs an approach that
converts the value to int64_t, then back to int, unfortunately,
this approach can be problematic when the the difference between
the two time_low is larger than 0x7fffffff, as the value is then
truncated to int.

To quote the test case from the original PR, the following is
true with the current implementation:

865e1a56-b9d9-11d9-ba27-0003476f2e88 < 062ac45c-b9d9-11d9-ba27-0003476f2e88

However, according to the DCE specification, the expected result
should be:

865e1a56-b9d9-11d9-ba27-0003476f2e88 > 062ac45c-b9d9-11d9-ba27-0003476f2e88

This commit adds a new intermediate variable which uses int64_t
to store the result of subtraction between the two time_low values,
which would not introduce different semantic of the MSB found in
time_low value.

PR: 83107
Submitted by: Steve Sears <sjs at acm dot org>
MFC After: 1 month

17 years agoAlphabetical order is probably better.
jb [Thu, 3 Aug 2006 03:30:53 +0000 (03:30 +0000)]
Alphabetical order is probably better.

17 years agoAdd the library directory where DTrace library scripts live.
jb [Thu, 3 Aug 2006 03:28:03 +0000 (03:28 +0000)]
Add the library directory where DTrace library scripts live.

17 years agoFix re(4) breakge introduced in tree from rev 1.68.
yongari [Thu, 3 Aug 2006 00:15:19 +0000 (00:15 +0000)]
Fix re(4) breakge introduced in tree from rev 1.68.
This should fix incorrect configuration of station address on
big-endian architectures.

Reviewed by: wpaul
Tested on: sparc64

17 years agoMove destroying kqueue state from above pru_detach to below it in
rwatson [Wed, 2 Aug 2006 18:37:44 +0000 (18:37 +0000)]
Move destroying kqueue state from above pru_detach to below it in
sofree(), as a number of protocols expect to be able to call
soisdisconnected() during detach.  That may not be a good assumption,
but until I'm sure if it's a good assumption or not, allow it.

17 years agoDon't ignore errors from intr_event_add_handler().
jhb [Wed, 2 Aug 2006 17:50:31 +0000 (17:50 +0000)]
Don't ignore errors from intr_event_add_handler().

CID: 1516
Found by: Coverity Prevent (tm)

17 years ago- Use m_getcl(), m_get(), and m_gethdr() rather than the older macros for
jhb [Wed, 2 Aug 2006 17:41:58 +0000 (17:41 +0000)]
- Use m_getcl(), m_get(), and m_gethdr() rather than the older macros for
  alloc'ing mbufs so that there is less error handling required.
- Go ahead and account for the data space in the first mbuf before entering
  the loop to alloc more mbuf's.  This simplifies the loop logic and avoids
  confusing Coverity.

CID: 817
Reviewed by: sam
Tested by: pjd
Found by: Coverity Prevent (tm)

17 years agoRemove remnants of Alpha.
marcel [Wed, 2 Aug 2006 17:22:30 +0000 (17:22 +0000)]
Remove remnants of Alpha.