Commit Graph

118861 Commits

Author SHA1 Message Date
Poul-Henning Kamp
947fc8de03 Make sure that the worker thread knows the type early enough to
grab Giant for vnode backing.

Found by:	pho & tegge
2005-10-06 19:47:04 +00:00
Emanuel Haupt
b8b9c6fe06 Adding myself to calendar.freebsd
Approved by:	novel (mentor)
2005-10-06 19:16:55 +00:00
Pawel Jakub Dawidek
24f8c87b41 Backout strtok() addition to libkern, strsep() is enough and strtok()
is not safe.

Discussed with:	stefanf, njl
2005-10-06 19:06:07 +00:00
Pawel Jakub Dawidek
df71afde00 - Use strsep() instead of strtok().
- strdup() uses M_WAITOK, so we don't need to check it's return value
  against NULL.

MFC after:	2 weeks
2005-10-06 19:04:08 +00:00
John Baldwin
46ceae8bc4 Fix another edge case I just noticed when committing the previous changes:
If bus_setup_intr() fails, cleanup the ifnet setup in vx_attach() by
calling ether_ifdetach() and if_free().

MFC after:	1 week
2005-10-06 18:41:31 +00:00
John Baldwin
fa08ebbbb1 Rototill vx(4), add locking, and mark MPSAFE:
- Rename vxfoo() functions to vx_foo() to improve readability and
  consistency with other drivers.
- Prefix most the softc members with 'vx_' (the other members already had
  the prefix).
- Switch to using callout_init_mtx() and callout_*() rather than
  timeout() and untimeout().
- Add some missing calls to if_free() in some failure cases in vx_attach().
- Use if_printf() and remove the unit number from the softc.
- Remove uses of the 'register' keyword and spls.
- Add locked variants of vx_init() and vx_start().
- Add a mutex to the softc and lock it in various appropriate places.
- Setup the interrupt handler last during attach.

Tested by:	imp
MFC after:	1 week
2005-10-06 18:27:59 +00:00
Poul-Henning Kamp
2628fdabad Eliminate need for __RMAN_RESOURCE_VISIBLE
Reviewed by:	marcel@
2005-10-06 17:39:18 +00:00
Søren Schmidt
40fdf81237 Add support for setting the SG list segment size.
Use this for the SiI3112 workaround to get rid of the "oversized DMA" errors.

MFC to 6.0 candidate.
2005-10-06 15:44:07 +00:00
Yaroslav Tykhiy
a2d3802cd8 Eliminate some unneeded code bits. 2005-10-06 15:05:55 +00:00
Robert Watson
570df2e4f2 Don't hard-code port numbers, let the user specify them. 2005-10-06 12:20:33 +00:00
Olivier Houchard
2dfc7d008b Export PAGE_SIZE from genassym.c, and include assym.s in bcopy_page.S,
instead of <machine/param.h>.
2005-10-06 11:26:37 +00:00
Pawel Jakub Dawidek
720f3948c0 Add boot.nfsroot.options loader tunable.
It allows to specify options for NFS root file system.
Currently supported options are: soft, intr, conn, lockd.

I'm adding this functionality mostly for 'lockd' option, which is only
honored when performing the initial mount and will be silently ignored
if used while updating the mount options.

This will allow to use flock(2) without the need of using varmfs or
rpc.lockd and friends.

Example of use:
boot.nfsroot.options="intr,lockd"

MFC after:	2 weeks
2005-10-06 11:18:34 +00:00
Pawel Jakub Dawidek
5e66cbaeaf Add strtok() and strtok_r() function to libkern.
MFC after:	2 weeks
2005-10-06 11:10:09 +00:00
Robert Watson
74af25e5db Improve realism of benchmark httpd: return some HTTP headers as part
of the sendfile() system call.
2005-10-06 10:28:31 +00:00
Tim J. Robbins
ff409d3258 Compile with -DHAVE_LSTAT since, for whatever reason, the configure script
shipped with GNU cpio 2.6 fails to test for it.
2005-10-06 09:49:37 +00:00
Robert Watson
6383f6aae0 Add basic simplified HTTP benchmark tools to the netrate suite:
- http is a lightweight, multithreaded HTTP query tool, which performs
  a timed measurement of the rate at which it can download files using
  single-fetch HTTP/1.0.  Other than specifying the IP and a URL path,
  it requires zero configuration.

- httpd is a lightweight, multithreaded HTTP server tool, which exports
  a single file of choice to the HTTP client, and responds with it no
  matter what the request.  Other than specifying the file to export,
  it requires zero configuration.

The goal of these tools is to measure the network costs associated with
HTTP serving, rather than file system, HTTP protocol parsing, error
handling, etc, and as such, parts relating to less interesting components
of HTTP testing are intentionally omitted.  Both are linked against
libpthread by default.
2005-10-06 08:41:08 +00:00
Pawel Jakub Dawidek
57432591c1 Fix a nasty typo. Change:
if (foo);
		bar();
to:
	if (foo)
		bar();
Really, really nasty bug and a very nice catch of mine.

Unfortunately, I'll not become a hero of the day, because the code is
commented out.
2005-10-06 08:30:40 +00:00
Tai-hwa Liang
11e0838887 Fixing a boot time panic(when if_fwip is compiled into kernel) by renaming
module name to something that wouldn't conflict with
sys/dev/firewire/firewire.c.

Submitted by:	Cai, Quanqing <caiquanqing at gmail dot com>
PR:		kern/82727
MFC after:	3 days
2005-10-06 07:09:34 +00:00
Andrew Thompson
64465c6bd3 Fix KASSERT function name in ether_output, use __func__ while I am here. 2005-10-06 01:21:40 +00:00
Warner Losh
4120e213d4 Make param.h includable again from assembler. 2005-10-05 23:36:19 +00:00
Christian S.J. Peron
4ccbe0c50d Un-break handling of -t 0 which was broken in my previous commit.
Add a flags argument to wait_for_lock so that O_NONBLOCK can be
passed to open if a user doesn't want the open to sleep until the
lock becomes available.

Submitted by:	Amir Shalem (partially modified)
2005-10-05 22:02:07 +00:00
Warner Losh
48ce90210f Include forgotten rtl80x9 file for ed. 2005-10-05 21:56:27 +00:00
Alexander Leidinger
e7d2d131f1 - Locking improvements.
- Don't keep the SPDIF state in the driver private struct since it
  can be overriden by hand with pciconf(8), query it when needed instead.

Regarding the locking I let Ariff explain it himself:
---snip---
About the locking, that is what I'm intended to do since the beginning.
The reason I'm not putting that along since my first patchset was
because several people especially from amd46 camp reported that it cause
lots of LORs, which is weird considering that I've never encounter such
in a pretty much strict locking environment (i386). However, since our
previous discussion with Pyun YongHyeon about strict locking, I've
decided to bring it back for all the affected drivers, not just for
es137x. It turns out that the root of the problem was within dsp.c
during device open, which has been fixed since dsp.c revision 1.84.
---snip---

Submitted by:	Ariff Abdullah <skywizard@MyBSD.org.my>
2005-10-05 20:05:52 +00:00
Alexander Leidinger
dcbde45390 Add a comment regarding problems with NForce 2 mainboards and add disabled
code which may help.

People with a ich compatible soundcard which want to help out should
change the "#if 1" to a "#if 0" and try if the soundcard still works.
Reports about working or not-working soundcards with this change to
multimedia@ please.

PR:		73987
2005-10-05 20:00:12 +00:00
John Baldwin
eefd941ba2 Update this manpage:
- Remove references to cpu_critical_*() as they no longer exist.
- Explain that any preemptions that occur during a critical section are
  deferred until the current thread exits the section.
- Remove a bogus example usage of a critical section.
- Note that one can interlock critical sections with spin mutexes in
  certain situations.

MFC after:	3 days
2005-10-05 19:48:21 +00:00
Christian S.J. Peron
031469eb27 Fix long standing race condition associated with how lockf uses open(2)
for mutual exclusion:

A brief description of the problem:

	1) Proc A picks up non-blocking lock on file X
	2) Proc B attempts to pickup lock, fails then waits
	3) Proc C attempts to pickup lock, fails then waits
	4) Proc A releases lock
	5) Proc B acquires lock, release it to pickup a non-blocking version
	6) Proc C acquires lock, release it to pickup a non-blocking version
	7) Both process B and C race each other to pickup lock again

This occurs mainly because the processes do not keep the lock after they have
been waiting on it. They drop it, attempt to re-acquire it. (They use the wait
to notify when the lock has become available then race to pick it up). This
results in additional CPU utilization during the race, and can also result
in processes picking locks up out of order.

This change attempts to correct this problem by eliminating the test/acquire
race and having the operating system handle it.

Reported by:	kris
Tested by:	kris
MFC after:	1 week
2005-10-05 17:39:15 +00:00
Alexander Leidinger
b64944a543 Don't use the builtin vaalist for icc.
Submitted by:	Igor Sysoev <is@rambler-co.ru>
MFC after:	3 days
2005-10-05 17:21:09 +00:00
Hartmut Brandt
bb5e059e0d This commit was generated by cvs2svn to compensate for changes in r150974,
which included commits to RCS files with non-trunk default branches.
2005-10-05 15:19:56 +00:00
Hartmut Brandt
4c0a7af955 Vendor fix for the build problem of snmp_pf. Move the fallback definitions
for U?INT32_{MAX,MIN} from asn1.h into the .c files that actually require
them (the .h file doesn't refer to these macros).
2005-10-05 15:19:56 +00:00
Robert Watson
f4997daeac Add simple TCP connect and TCP receive benchmark components, intended to
measure the rate of TCP connection round trips supported by a host at
the socket layer.
2005-10-05 12:10:35 +00:00
Gleb Smirnoff
f0796cd26c - Don't pollute opt_global.h with DEVICE_POLLING and introduce
opt_device_polling.h
- Include opt_device_polling.h into appropriate files.
- Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that
  can be compiled as loadable modules.

Reviewed by:	bde
2005-10-05 10:09:17 +00:00
Gleb Smirnoff
2afb277f09 - Don't include opt_global.h, it is always included implicitly.
- Include opt_device_polling.h
2005-10-05 10:07:27 +00:00
Gleb Smirnoff
0c06364148 Define HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
modules along with kernel.

After this change it is possible to embrace opt_*.h includes with ifdef
HAVE_KERNEL_OPTION_HEADERS. And thus, avoid editing a lot of Makefiles
in modules directory each time we introduce a new opt_xxx.h.

Requested by:	bde
2005-10-05 10:05:55 +00:00
Hajimu UMEMOTO
c837857210 stop RFC 4193 address on the outside interface.
MFC after:	1 day
2005-10-05 07:00:42 +00:00
Warner Losh
c6285009d7 Note added support for Tamarack TC5229J, Axiom and Dlink parts. Bump date. 2005-10-05 05:41:02 +00:00
Warner Losh
eb562f7bc6 Add if_ed_rtl80x9.c 2005-10-05 05:26:03 +00:00
Warner Losh
6ec4c010b5 Remove debug that crept in.. 2005-10-05 05:24:35 +00:00
Warner Losh
95a2adef58 MFp4:
o Add support for Tamarack TC5299J + MII found on SMC 8041TX V.2
	  and corega PCCCCTXD
	o Add support for ISA/PCI RTL80[12]9 chips
	o Improve support for the ax88790 based
	o minor code movement

Submitted by: (#2) David Madole
2005-10-05 05:21:07 +00:00
Brooks Davis
97fb6f6f5d Add regression tests for trimdomain(3). 2005-10-05 04:46:10 +00:00
Brooks Davis
72bd741cfc When removing the local domain, only do so when the result will be a
host name.  This is matches the documented behaviro.  The previous
behavior would remove the domain name even if the result retained a dot.

This fixes rsh connections from a.example.com to example.com.

Reviewed by:	ceri (at least the concept)
2005-10-05 04:42:20 +00:00
Peter Wemm
07f5921b86 Don't set segment registers via ptrace yet. Its not ready. 2005-10-04 23:26:00 +00:00
Warner Losh
2f624c21c5 When data passed into devctl_notify is NULL, don't print (null). Instead
don't print anything at all.

# this fixes a problem that I noticed with devd.pipe not terminating lines
# with \n correctly sometimes.
2005-10-04 22:25:14 +00:00
Warner Losh
09c47e76fb media-type predicate is used in contexts where device-name is undefined.
In those contexted, use subsystem instead.

# This causes dhclient to run again when I plug in my ethernet cable to
# my fxp card in my laptop.
2005-10-04 22:22:51 +00:00
Stefan Farfeleder
9dbcd4b0c0 Remove an unused variable.
Reviewed by:	ken
2005-10-04 22:00:35 +00:00
Stefan Farfeleder
6dea540edc Merge makelist rev 1.10 and map.c rev 1.22 from NetBSD. They just patch the
bug fixed in the last commit to map.c in a different way.  Follow NetBSD to
facilitate future merges.
2005-10-04 21:59:29 +00:00
Stefan Farfeleder
51890f2fed Merge NetBSD's rev. 1.49:
Fix double if (from Alexey E. Suslikov via jmc@openbsd).
While here, re-word both H_[GS]ETUNIQUE descriptions so they make
more sense. Bump date.
2005-10-04 21:51:26 +00:00
Stefan Farfeleder
bc6e20f014 Merge NetBSD's rev. 1.41:
PR/31012: Barry Naujok: libedit el_get with EL_EDITOR op does not work
Fixed as suggested.
2005-10-04 21:45:42 +00:00
Olivier Houchard
4d71248bc3 Remove a never reached RET. 2005-10-04 20:47:27 +00:00
Olivier Houchard
7bfacf3dc6 strd needs the destination to be double-word aligned, but the pointer passed
to savectx isn't always, so always use stmia, savectx isn't called enough
to need that kind of optimization.
2005-10-04 20:42:42 +00:00
Andrew Thompson
f69453ca8b When bridging is enabled and an ARP request is recieved on a member interface,
the arp code will search all local interfaces for a match. This triggers a
kernel log if the bridge has been assigned an address.

arp: ac🇩🇪48:18:83:3d is using my IP address 192.168.0.142!

bridge0: flags=8041<UP,RUNNING,MULTICAST> mtu 1500
        inet 192.168.0.142 netmask 0xffffff00
        ether ac🇩🇪48:18:83:3d

Silence this warning for 6.0 to stop unnecessary bug reports, the code will need
to be reworked.

Approved by:	mlaier (mentor)
MFC after:	3 days
2005-10-04 19:50:02 +00:00