Commit Graph

125175 Commits

Author SHA1 Message Date
Mark Murray
93c005929f Housekeeping. Update for maintainers who have handed in their commit bits
or (in my case) no longer feel that oversight is necessary.
2006-07-01 10:51:55 +00:00
Alan Cox
ad84c5de83 Eliminate the remaining uses of "register".
Convert the remaining K&R-style function declarations to ANSI-style.
2006-07-01 05:01:05 +00:00
Jason Evans
78a6842d2f Add __{BEGIN,END}_DECLS macros, so that function prototypes remain
unmangled for C++ programs.

Submitted by:	Niklas Sorensson <nik@cs.chalmers.se>
2006-06-30 20:57:41 +00:00
Jason Evans
00d8242c2b Make the behavior of malloc(0) standards-compliant by getting rid of nil,
and instead creating a small allocation for each malloc(0) call.  The
optional SysV compatibility behavior remains unchanged.

Add a couple of assertions.

Fix a couple of typos in error message strings.
2006-06-30 20:54:15 +00:00
Jung-uk Kim
732be1f298 Fix kernel module build breakage. 2006-06-30 19:35:35 +00:00
Sam Leffler
64db7ae46b o fix join/rejoin format
o add netbsd portability glue

MFC after:	2 weeks
2006-06-30 19:06:18 +00:00
Doug Ambrisko
78997d853b Change mfi_add_ld to "immediate command" mode since we need to enumerate
potential boot disks during the probe so they are read for mount root.

Reviewed by:	ps, scottl
2006-06-30 18:59:08 +00:00
Yaroslav Tykhiy
4e6098c6a4 We needn't check "m" for NULL here because "off" should be within
the mbuf chain.  If we ever get a buggy caller, a bogus "off" should
be caught by the sanity check at the function entry.  Null "m" here
means a very unusual condition of a totally broken mbuf chain (wrong
m_pkthdr.len or whatever), so we can just page fault later.

Found by:	Coverity Prevent(tm)
CID:		825
2006-06-30 18:25:07 +00:00
Ruslan Ermilov
3265e741f9 Gleb committed an intermediary version, commit the right one now.
Submitted by:	Vadim Goncharov
2006-06-30 11:35:35 +00:00
Ruslan Ermilov
2982527d8b - Simplify the formatting in the SYNOPSIS.
- Add the forgotten new option in usage().
2006-06-30 08:19:26 +00:00
Maxim Konovalov
e2668f5563 o Fix typo in the comment.
PR:		kern/99632
Submitted by:	clsung
2006-06-30 08:10:55 +00:00
Xin LI
8709e75efb - Reflect recent sched_core(4) changes.
- Some typo fixes.
2006-06-30 07:45:38 +00:00
Warner Losh
6c6d4885ee Have sio return BIS_PROBE_DEFAULT like all the other drivers in the
tree...  John Baldwin noted that sio might pass values between probe
and attach via softc.  It appears that sio does leave the hardware in
a known state after probing, so other drivers that try to probe might
leave it in a worse state.  It doesn't seem to pass any data in softc,
however, that I could find...  I think we should not be probing for
anything but nonPnP isa, but that's a change for another day.

Submitted by: Frank Behrens
PR: 87845
2006-06-30 06:27:24 +00:00
Florent Thoumie
aa1d7ce72f Add a -q option to suppress header lines when multiple files are specified.
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-06-29 22:07:49 +00:00
David E. O'Brien
1de763bd77 Create new dialect knob, as setting the language dialect isn't a warning flag. 2006-06-29 21:15:25 +00:00
Marcel Moolenaar
559adb10ad Partial support for branch long emulation. This only emulates the
branch long jump and not the branch long call. Support for that is
forthcoming.
2006-06-29 19:59:18 +00:00
David E. O'Brien
2e4db89cfc Fix building with GCC 4.2: define data types before referring to them. 2006-06-29 19:37:31 +00:00
Yaroslav Tykhiy
4b97d7affd There is a consensus that ifaddr.ifa_addr should never be NULL,
except in places dealing with ifaddr creation or destruction; and
in such special places incomplete ifaddrs should never be linked
to system-wide data structures.  Therefore we can eliminate all the
superfluous checks for "ifa->ifa_addr != NULL" and get ready
to the system crashing honestly instead of masking possible bugs.

Suggested by:	glebius, jhb, ru
2006-06-29 19:22:05 +00:00
Yaroslav Tykhiy
e54e7d6dae Use TAILQ_FOREACH in the __FreeBSD__ case, too.
Funnily enough, rev. 1.15 changed the __Net and __Open cases only.
2006-06-29 17:56:21 +00:00
Yaroslav Tykhiy
06dc090fe0 Use TAILQ_FOREACH. 2006-06-29 17:31:43 +00:00
Yaroslav Tykhiy
5aa288f461 Use the nifty TAILQ_FOREACH. 2006-06-29 17:16:13 +00:00
Yaroslav Tykhiy
ad67537233 Use TAILQ_FOREACH consistently. 2006-06-29 17:09:47 +00:00
Yaroslav Tykhiy
40e4360c10 Use queue(3) macros instead of accessing list/queue internals directly. 2006-06-29 16:56:07 +00:00
David E. O'Brien
482aa6a357 Fix building with GCC 4.2: ensure types are defined before refering to them. 2006-06-29 16:27:19 +00:00
Yaroslav Tykhiy
576cdf4352 Use the elegant TAILQ_FOREACH() in place of a hand-rolled for() loop. 2006-06-29 15:37:39 +00:00
John Baldwin
fe95c76276 Fix semctl(2) breakage from the previous commit. Previously __semctl() had
a local 'semid' variable which was the array index and used uap->semid
as the original IPC id.  During the kern_semctl() conversion those two
variables were collapsed into a single 'semid' variable breaking the
places that needed the original IPC ID.  To fix, add a new 'semidx'
variable to hold the array index and leave 'semid' unmolested as the IPC
id.  While I'm here, explicitly document that the (undocumented, at least
in semctl(2)) SEM_STAT command curiously expects an array index in the
'semid' parameter rather than an IPC id.

Submitted by:	maxim
2006-06-29 13:58:36 +00:00
Gleb Smirnoff
4d09f5a030 Fix URL to Bellovin's paper.
Submitted by:	Anton Yuzhaninov <citrin rambler-co.ru>
2006-06-29 13:38:36 +00:00
David Xu
5151eeb194 Fix a bug when accumulating run time, if a thread calls yield() syscall,
its run time may be lost.
2006-06-29 12:29:20 +00:00
Bjoern A. Zeeb
333ad3bc40 Eliminate the offset argument from send_reject. It's not been
used since FreeBSD-SA-06:04.ipfw.
Adopt send_reject6 to what had been done for legacy IP: no longer
send or permit sending rejects for any but the first fragment.

Discussed with: oleg, csjp (some weeks ago)
2006-06-29 11:17:16 +00:00
Bjoern A. Zeeb
421d8aa603 Use INPLOOKUP_WILDCARD instead of just 1 more consistently.
OKed by: rwatson (some weeks ago)
2006-06-29 10:49:49 +00:00
David Xu
d29a8ce69b Fix system load count (noticed by dephij). Remove incorrect
comment.
2006-06-29 09:49:00 +00:00
Xin LI
cf076341e7 Correct a typo 2006-06-29 09:18:16 +00:00
Takanori Watanabe
a42cdc22c0 Update man page.
Pointed out by: netchild
MFC after: 3 days
2006-06-29 08:28:18 +00:00
Yaroslav Tykhiy
249f4297db Detach the interface first, do vlan_unconfig() then.
Previously, another thread could get a pointer to the
interface by scanning the system-wide list and sleep
on the global vlan mutex held by vlan_unconfig().
The interface was gone by the time the other thread
woke up.

In order to be able to call vlan_unconfig() on a detached
interface, remove the purely cosmetic bzero'ing of IF_LLADDR
from the function because a detached interface has no addresses.

Noticed by:	a stress-testing script by maxim
Reviewed by:	glebius
2006-06-29 07:52:30 +00:00
Yaroslav Tykhiy
114c608c71 Remove a few unused things.
Fix some style and consistency points.
2006-06-29 07:30:39 +00:00
Yaroslav Tykhiy
185225ff52 Reduce unneeded code duplication. 2006-06-29 07:23:49 +00:00
Gleb Smirnoff
d848592e1c Since 5714 family doesn't have Jumbo ring, we do not support
Jumbos on them, yet. The 5780 is equivalent to the 5714.

Submitted by:	brad@OpenBSD, davidch
2006-06-29 06:38:21 +00:00
Takanori Watanabe
84c269d3f3 Comment fix.
Pointed out by: ume via IRC
2006-06-29 06:31:13 +00:00
Takanori Watanabe
bc5f8a4e55 Willcom WSIM DD support. 2006-06-29 06:17:48 +00:00
David Xu
0922ef0c42 Remove unused function declaration.
Add else statement in sched_calc_pri.
Fix a bug when checking interrupt thread in sched_add.
2006-06-29 05:59:36 +00:00
David Xu
d60003a2e4 Remove load balancer code, since it has serious priority inversion problem
which really hurts performance on FreeBSD.
2006-06-29 05:36:34 +00:00
Andrew Thompson
ae4748ad15 A small race existed where the lock was dropped between when encif was
tested and then set. [1]

Reorganise things to eliminate this, we now ensure that enc0 can not be
destroyed which as the benefit of no longer needing to lock in
ipsec_filter and ipsec_bpf. The cloner will create one interface during the
init so we can guarantee that encif will be valid before any SPD entries are
added to ipsec.

Spotted by:	glebius [1]
2006-06-28 21:57:35 +00:00
Bill Paul
e6e13c3cb6 Properly detect the RTL8168(B?) again. RealTek sent me a bunch of sample
cards: the chips are all marked "RTL8111B", but they put stickers on the
back that say "RTL8168B/8111B". The manual says there's only one HWREV code
for both the 8111B and 8168B devices, which is 0x30000000, but the cards
they sent me actually report HWREV of 0x38000000. Deciding to trust the
hardware in front of me rather than a possibly incorrect manual (it wouldn't
be the first time the HWREVs were incorrectly documented), I changed the
8168 revision code. It turns out this was a mistake though: 0x30000000
really is a valid for the 8168.

There are two possible reasons for there to be two different HWREVs:

1) 0x30000000 is used only for the 8168B and 0x38000000 is only for
   the 8111B.
2) There were 8111/8168 rev A devices which both used code 0x30000000,
   and the 8111B/8168B both use 0x38000000.

The product list on the RealTek website doesn't mention the existence of
any 8168/8111 rev A chips being in production though, and I've never seen
one, so until I get clarification from RealTek, I'm going to assume that
0x30000000 is just for the 8168B and 0x38000000 is for the 8111B only.

So, the HWREV code for the 8168 has been put back to 0x30000000,
a new 8111 HWREV code has been added, and there are now separate
entries for recognizing both devices in the device list. This will
allow all devices to work, though if it turns out I'm wrong I may
need to change the ID strings
2006-06-28 16:04:54 +00:00
Søren Schmidt
055ec4dbbc Dont call free on non-alloc'd items. 2006-06-28 15:04:10 +00:00
Gleb Smirnoff
9caee2ece7 Style: space after "return". 2006-06-28 10:38:38 +00:00
Christian Brueffer
fe0e43d648 - s/nve/nfe/ in the SYNOPSIS (1)
- bump date

PR:		99575
Submitted by:	thierry herbelot <thierry@herbelot.com> (1)
2006-06-28 10:19:16 +00:00
Søren Schmidt
ca40bd0b02 Update AHCI support to be more generic.
Add support for AHCI on the VIA VT8251.
2006-06-28 09:59:09 +00:00
Gleb Smirnoff
9e86676bd1 - Recognize more device IDs adding support for BCM5754, BCM5755,
BCM5787 based NICs.
- Recognize BCM5703 B0 ASIC.
- Rewrite the jumbo capability matching macro, so that chips known
  to work are listed there. [*]

[*] I'm still not sure about this. Probably more corrections
    will be done to this macro after discussion with davidch@
    and brad@OpenBSD.

Obtained from:	OpenBSD (brad)
2006-06-28 09:12:29 +00:00
Garance A Drosehn
656f773000 Remove the last three calls to strncpy(), two of which would have
been bugs if the source had ever been too big for the destination.

MFC after:	3 weeks
2006-06-27 22:14:09 +00:00
Rink Springer
44a8277bc6 Updated the XBOX kernel to use the new nfe(4) driver obtained from
OpenBSD. This driver seems to give a small performance increase, and
should lead to better maintainability in the future.

The nForce Ethernet-specific hack in sys/i386/xbox/xbox.c is still
required, judging from dev/nfe/if_nfe.c. The condition it hacks will
almost certainly only occur on XBOX-es anyway, so it is best left there.

Approved by:	imp (mentor)
2006-06-27 20:22:32 +00:00