]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agonew committer: added my birthday to the calendar
aaron [Sun, 30 Oct 2005 21:02:09 +0000 (21:02 +0000)]
new committer: added my birthday to the calendar

Approved by: tobez

18 years agoReplace diagnostic printf()s by assertions. Use consistent style for
alc [Sun, 30 Oct 2005 20:47:42 +0000 (20:47 +0000)]
Replace diagnostic printf()s by assertions.  Use consistent style for
similar assertions.

18 years agoPush the assignment of a new or updated so_qlimit from solisten()
rwatson [Sun, 30 Oct 2005 19:44:40 +0000 (19:44 +0000)]
Push the assignment of a new or updated so_qlimit from solisten()
following the protocol pru_listen() call to solisten_proto(), so
that it occurs under the socket lock acquisition that also sets
SO_ACCEPTCONN.  This requires passing the new backlog parameter
to the protocol, which also allows the protocol to be aware of
changes in queue limit should it wish to do something about the
new queue limit.  This continues a move towards the socket layer
acting as a library for the protocol.

Bump __FreeBSD_version due to a change in the in-kernel protocol
interface.  This change has been tested with IPv4 and UNIX domain
sockets, but not other protocols.

18 years agoLocate __FreeBSD_cc_version's value beside __FreeBSD__'s value to make it
obrien [Sun, 30 Oct 2005 19:04:47 +0000 (19:04 +0000)]
Locate __FreeBSD_cc_version's value beside __FreeBSD__'s value to make it
easier to keep them in sync.

18 years agoRemove a stray return statement in the interrupt dispatch function
marcel [Sun, 30 Oct 2005 17:23:01 +0000 (17:23 +0000)]
Remove a stray return statement in the interrupt dispatch function
that caused a premature exit after calling a fast interrupt handler
and bypassing a much needed critical_exit() and the scheduling of
the interrupt thread for non-fast handlers. In short: unbreak :-)

18 years agoSSIDs are of length 32-bytes and not NUL terminated. Use the correct
brooks [Sun, 30 Oct 2005 16:31:05 +0000 (16:31 +0000)]
SSIDs are of length 32-bytes and not NUL terminated.  Use the correct
length and bail immediatly if the returned length is wrong rather than
attempting to set an correct value.

This commit differs from the patch in the PR in the use of exit instead
of return and the use of a defined value for the array.

Submitted by: Daan Vreeken [PA4DAN] <Danovitsch at Vitsch dot net>
PR: bin/74509

18 years agoMFi386: Enable beastie.4th.
nyan [Sun, 30 Oct 2005 15:59:08 +0000 (15:59 +0000)]
MFi386: Enable beastie.4th.

18 years agoFixed spelling of remquof() in its prototype.
bde [Sun, 30 Oct 2005 12:34:58 +0000 (12:34 +0000)]
Fixed spelling of remquof() in its prototype.

18 years agoFixed some comments added in rev.1.5.
bde [Sun, 30 Oct 2005 12:21:02 +0000 (12:21 +0000)]
Fixed some comments added in rev.1.5.

The log message for 1.5 said that some small (one or two ulp) inaccuracies
were fixed, and a comment implied that the critical change is to switch
the rounding mode to to-nearest, with a switch of the precision to
extended at no extra cost.  Actually, the errors are very large (ucbtest
finds ones of several hundred ulps), and it is the switch of the
precision that is critical.

Another comment was wrong about NaNs being handled sloppily.

18 years agoAdd some safeguards to AIOSFMT:
des [Sun, 30 Oct 2005 10:03:11 +0000 (10:03 +0000)]
Add some safeguards to AIOSFMT:

 - Return EINVAL if play_format or rec_format is set but the corresponding
   sample rate is 0.

 - Don't try to set the playback or recording format to 0.  Previously,
   issuing an AIOSFMT ioctl with an all-zeroes snd_chan_param would
   trigger a KASSERT in chn_fmtchain(); I'm unsure about the effects on
   a kernel without INVARIANTS.  After this commit, issuing AIOSFMT with
   an all-zeroes snd_chan_param is equivalent to issuing AIOGFMT.

MFC after: 2 weeks

18 years agoIn stack_save, stop when a trap-frame is encountered. This prevents
grehan [Sun, 30 Oct 2005 07:56:10 +0000 (07:56 +0000)]
In stack_save, stop when a trap-frame is encountered. This prevents
trying to access user-space stack addresses when a user fault
is encountered, as occurs when GEOM KTR code is handling a page fault
and is using stack_save() to capture a trace for debug purposes.

It may be possible to walk beyond the trap-frame if it is a kernel fault,
as db_backtrace() does, but I don't think that complexity is needed in
this routine.

MFC after: 3 days

18 years agoAdd back some bits.
scottl [Sun, 30 Oct 2005 05:41:42 +0000 (05:41 +0000)]
Add back some bits.

18 years agoReplace loader_color with loader_logo
scottl [Sun, 30 Oct 2005 05:36:23 +0000 (05:36 +0000)]
Replace loader_color with loader_logo

18 years agoChange POSIX_TIMERS to 200112L.
davidxu [Sun, 30 Oct 2005 03:20:39 +0000 (03:20 +0000)]
Change POSIX_TIMERS to 200112L.

18 years agoAdd timer_create wrapper.
davidxu [Sun, 30 Oct 2005 03:16:30 +0000 (03:16 +0000)]
Add timer_create wrapper.

18 years agoAdd POSIX timer interfaces.
davidxu [Sun, 30 Oct 2005 03:15:05 +0000 (03:15 +0000)]
Add POSIX timer interfaces.

18 years agoLet itimer store itimerspec instead of itimerval, so I don't have to
davidxu [Sun, 30 Oct 2005 02:56:08 +0000 (02:56 +0000)]
Let itimer store itimerspec instead of itimerval, so I don't have to
convert to or from timeval frequently.

Introduce function itimer_accept() to ack a timer signal in signal
acceptance code, this allows us to return more fresh overrun counter
than at signal generating time. while POSIX says:
"the value returned by timer_getoverrun() shall apply to the most
recent expiration signal delivery or acceptance for the timer,.."
I prefer returning it at acceptance time.

Introduce SIGEV_THREAD_ID notification mode, it is used by thread
libary to request kernel to deliver signal to a specified thread,
and in turn, the thread library may use the mechanism to implement
SIGEV_THREAD which is required by POSIX.

Timer signal is managed by timer code, so it can not fail even if
signal queue is full filled by sigqueue syscall.

18 years agoRegen.
davidxu [Sun, 30 Oct 2005 02:14:37 +0000 (02:14 +0000)]
Regen.

18 years agoFix sigevent's POSIX incompatible problem by adding member fields
davidxu [Sun, 30 Oct 2005 02:12:49 +0000 (02:12 +0000)]
Fix sigevent's POSIX incompatible problem by adding member fields
sigev_notify_function and sigev_notify_attributes. AIO syscalls
use sigevent, so they have to be adjusted.

Reviewed by: alc

18 years agoInclude disabled options in the output of 'set +o'. POSIX says the output of
stefanf [Sat, 29 Oct 2005 18:41:35 +0000 (18:41 +0000)]
Include disabled options in the output of 'set +o'.  POSIX says the output of
set +o can be used to reload previous settings, for this to work disabled
options must be printed as well or otherwise options that were set in the mean
time won't be turned off.

To avoid an excessively long output line I formatted the output to print only
six options per line.

Submitted by: Jilles Tjoelker
PR: 73500

18 years agoImplement inline functions to give the complex result x+I*y from float
bde [Sat, 29 Oct 2005 17:14:11 +0000 (17:14 +0000)]
Implement inline functions to give the complex result x+I*y from float
or double args x and y.  x+I*y cannot be used directly yet due to compiler
bugs.

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>

18 years agoUse double precision to simplify and optimize arg reduction for small
bde [Sat, 29 Oct 2005 16:34:50 +0000 (16:34 +0000)]
Use double precision to simplify and optimize arg reduction for small
and medium size args too: instead of conditionally subtracting a float
17+24, 17+17+24 or 17+17+17+24 bit approximation to pi/2, always
subtract a double 33+53 bit one.  The float version is now closer to
the double version than to old versions of itself -- it uses the same
33+53 bit approximation as the simplest cases in the double version,
and where the float version had to switch to the slow general case at
|x| == 2^7*pi/2, it now switches at |x| == 2^19*pi/2 the same as the
double version.

This speeds up arg reduction by a factor of 2 for |x| between 3*pi/4 and
2^7*pi/4, and by a factor of 7 for |x| between 2^7*pi/4 and 2^19*pi/4.

18 years agoRemove unused variable.
davidxu [Sat, 29 Oct 2005 13:40:31 +0000 (13:40 +0000)]
Remove unused variable.

Reviewed by: cognet

18 years agoDocument command -v and -V.
stefanf [Sat, 29 Oct 2005 13:08:35 +0000 (13:08 +0000)]
Document command -v and -V.

Glanced at by: simon

18 years agoCatch up with FreeBSD 7.
obrien [Sat, 29 Oct 2005 09:13:31 +0000 (09:13 +0000)]
Catch up with FreeBSD 7.

18 years agoDocument that read -t timeout returns 1 if the timeout elapses.
stefanf [Sat, 29 Oct 2005 08:22:09 +0000 (08:22 +0000)]
Document that read -t timeout returns 1 if the timeout elapses.

18 years agoStart trying to make the float precision trig functions actually worth
bde [Sat, 29 Oct 2005 08:15:29 +0000 (08:15 +0000)]
Start trying to make the float precision trig functions actually worth
using under FreeBSD.  Before this commit, all float precision functions
except exp2f() were implemented using only float precision, apparently
because Cygnus needed this in 1993 for embedded systems with slow or
inefficient double precision.  For FreeBSD, except possibly on systems
that do floating point entirely in software (very old i386 and now
arm), this just gives a more complicated implementation, many bugs,
and usually worse performance for float precision than for double
precision.  The bugs and worse performance were particulary large in
arg reduction for trig functions.  We want to divide by an approximation
to pi/2 which has as many as 1584 bits, so we should use the widest
type that is efficient and/or easy to use, i.e., double.  Use fdlibm's
__kernel_rem_pio2() to do this as Sun apparently intended.  Cygnus's
k_rem_pio2f.c is now unused.  e_rem_pio2f.c still needs to be separate
from e_rem_pio2.c so that it can be optimized for float args.  Similarly
for long double precision.

This speeds up cosf(x) on large args by a factor of about 2.  Correct
arg reduction on large args is still inherently very slow, so hopefully
these args rarely occur in practice.  There is much more efficiency
to be gained by using double precision to speed up arg reduction on
medium and small float args.

18 years agoForced commit to note the patch for the previous commit was
stefanf [Sat, 29 Oct 2005 07:19:11 +0000 (07:19 +0000)]
Forced commit to note the patch for the previous commit was

Submitted by: rodrigc

18 years agoMFp4: When doing lazy allocation, it turns out that we need to record the
imp [Sat, 29 Oct 2005 05:52:17 +0000 (05:52 +0000)]
MFp4: When doing lazy allocation, it turns out that we need to record the
actual resource values we received from the system rather than the range
we requested.  Since we request a range starting at 0, we would record
that number.  Later, since this == 0, we'd allocate again.  However,
we wouldn't write the new resource into the BAR.  This resulted in
a resource leak as well as a BAR that couldn't access the resource at
all since rman_get_start, et al, were wrong.

MFC After: 1 week (assuming RELENG_6 is open for business)

18 years agoUse symbolic name rather thanhard coding the cap pointer offset for
imp [Sat, 29 Oct 2005 05:49:06 +0000 (05:49 +0000)]
Use symbolic name rather thanhard coding the cap pointer offset for
type two devices.

18 years agoRecord renaming rc.d/ppp-user to rc.d/ppp.
yar [Sat, 29 Oct 2005 05:27:32 +0000 (05:27 +0000)]
Record renaming rc.d/ppp-user to rc.d/ppp.

18 years agoTransforming "ppp-user" into just "ppp", step 5:
yar [Sat, 29 Oct 2005 05:12:14 +0000 (05:12 +0000)]
Transforming "ppp-user" into just "ppp", step 5:
Finally, delete the old, unfittingly named file "ppp-user".

18 years agoTransforming "ppp-user" into just "ppp", step 4:
yar [Sat, 29 Oct 2005 05:08:00 +0000 (05:08 +0000)]
Transforming "ppp-user" into just "ppp", step 4:
The legacy script "/etc/netstart" will start "ppp", not "ppp-user".

18 years agoTransforming "ppp-user" into just "ppp", step 3:
yar [Sat, 29 Oct 2005 05:05:52 +0000 (05:05 +0000)]
Transforming "ppp-user" into just "ppp", step 3:
Install "ppp" (just repocopied) instead of "ppp-user".

18 years agoTransforming "ppp-user" into just "ppp", step 2:
yar [Sat, 29 Oct 2005 05:00:25 +0000 (05:00 +0000)]
Transforming "ppp-user" into just "ppp", step 2:
This file has been repo-copied from src/etc/rc.d/ppp-user.
(Forced commit.)

18 years agoAdd Billionton LNA-100B variation that Alan reported in arch. [1]
imp [Sat, 29 Oct 2005 03:49:44 +0000 (03:49 +0000)]
Add Billionton LNA-100B variation that Alan reported in arch. [1]
Also add Global Village lan modem, even though I'm unsure if it works.

Reported by: Alan newsletter at acsoftware dot org

18 years agoAdd Global Village lan modem.
imp [Sat, 29 Oct 2005 03:48:24 +0000 (03:48 +0000)]
Add Global Village lan modem.
Add Billionton LNA-100B[1]

Reported by: [1] Alan newsletter at acsoftware dot org

18 years agoShutdown a little better by commenting the shutdown code and acknowledging
imp [Sat, 29 Oct 2005 03:36:00 +0000 (03:36 +0000)]
Shutdown a little better by commenting the shutdown code and acknowledging
any interrupts after we turn off the interrupt mask.

18 years agoShut down the card bus bridge hardware on detach. Before we'd just
imp [Sat, 29 Oct 2005 03:27:43 +0000 (03:27 +0000)]
Shut down the card bus bridge hardware on detach.  Before we'd just
free the resoruces w/o actually turning off the interrupts.  This lead
to interrupt storms if you were to insert a card after kldunloading
the driver.

18 years agoKill unused variable declaration.
davidxu [Sat, 29 Oct 2005 03:08:43 +0000 (03:08 +0000)]
Kill unused variable declaration.

18 years agoRemove call to txp_set_filter() from txp_attach(). txp_set_filter() needs
wpaul [Sat, 29 Oct 2005 03:01:16 +0000 (03:01 +0000)]
Remove call to txp_set_filter() from txp_attach(). txp_set_filter() needs
the ifp, so you can't call it before doing if_alloc(). Also, there's
really no need to call it here anyway: the code I originally ported from
OpenBSD incorrectly set the station address only once at device attach
time, instead of setting in txp_init(). This meant you couldn't change
the address with ifconfig txp0 ether xx:xx:xx:xx:xx:xx. I added the
call to txp_set_filter() in txp_init() to correct this, but forgot to
remove the call from txp_attach(). Until now, it never mattered.

With this fix, the txp driver tests good:

txp0: <3Com 3cR990-TX-97 Etherlink with 3XP Processor> port 0xb800-0xb87f mem 0xe6800000-0xe683ffff irq 12 at device 10.0 on pci0
txp0: Ethernet address: 00:01:03:d4:91:4f

18 years agoAdd an ioctl framework for doing FC task management functions from
mjacob [Sat, 29 Oct 2005 02:46:59 +0000 (02:46 +0000)]
Add an ioctl framework for doing FC task management functions from
a user space tool- useful for doing FC target mode certification.

18 years agoFix ndis_getstate_80211() so that it properly reports the authmode
wpaul [Sat, 29 Oct 2005 02:18:27 +0000 (02:18 +0000)]
Fix ndis_getstate_80211() so that it properly reports the authmode
and channel to ifconfig. Also use the SSID and channel info from
the association info that we already have instead of using ndis_get_info()
to ask the driver for it again.

18 years agos/insure/ensure/ in previous commit. My dictionary and m-w.com say they
brooks [Fri, 28 Oct 2005 22:47:40 +0000 (22:47 +0000)]
s/insure/ensure/ in previous commit.  My dictionary and m-w.com say they
are synonymous, but ensure seems slightly closer and does not have the
connotation of buying insurance.

Reported by: Jason McIntyre <jmc at kerhand dot co dot uk>

18 years agoDon't crash when given an invalid nwkey string.
brooks [Fri, 28 Oct 2005 21:57:04 +0000 (21:57 +0000)]
Don't crash when given an invalid nwkey string.

PR: misc/88159

18 years agoReturn the right format (LBA/MSF) in TOC entries.
sos [Fri, 28 Oct 2005 21:41:42 +0000 (21:41 +0000)]
Return the right format (LBA/MSF) in TOC entries.
Null the TOC on media change even if no media present.

Reported by: des

18 years agoAdd some significant Ukrainian dates.
ru [Fri, 28 Oct 2005 21:25:28 +0000 (21:25 +0000)]
Add some significant Ukrainian dates.

PR: 88076
Submitted by: Andriy Gapon

18 years agoFirst fill in structure with valid values, and only then attach it
glebius [Fri, 28 Oct 2005 20:29:42 +0000 (20:29 +0000)]
First fill in structure with valid values, and only then attach it
to the global list.

Reviewed by: rwatson

18 years agoFix possible live-lock under heavy load where we can't allocate more
pjd [Fri, 28 Oct 2005 20:25:02 +0000 (20:25 +0000)]
Fix possible live-lock under heavy load where we can't allocate more
memory for request.
I was sure graid3 should handle such situations well, but green@ reported
it is not and we want to fix it before 6.0.

Submitted by: green

18 years agoDocument NGM_IFACE_GET_IFINDEX.
ru [Fri, 28 Oct 2005 19:05:44 +0000 (19:05 +0000)]
Document NGM_IFACE_GET_IFINDEX.

18 years agoFix this:
cracauer [Fri, 28 Oct 2005 18:39:00 +0000 (18:39 +0000)]
Fix this:
kern/87959 cracauer ext2fs: no cp(1) possible, mmap returns EINVAL

ext2fs was missing vnode_create_vobject.

(Reisefs probably has the same problem but I want to get this in quick
for 6-release)

18 years agoAdd the POSIX options -v and -V to the 'command' builtin. Both describe the
stefanf [Fri, 28 Oct 2005 18:37:09 +0000 (18:37 +0000)]
Add the POSIX options -v and -V to the 'command' builtin.  Both describe the
type of their argument, if it is a shell function, an alias, a builtin, etc.
-V is more verbose than -v.

PR: 77259, 84539

18 years agoUse ${name} in pathnames where appropriate.
yar [Fri, 28 Oct 2005 16:55:38 +0000 (16:55 +0000)]
Use ${name} in pathnames where appropriate.
The sendmail script already was on this way,
but it didn't reach the end of it yet.

18 years agoUse:
yar [Fri, 28 Oct 2005 16:10:56 +0000 (16:10 +0000)]
Use:

command="/path/to/${name}"

since it's applicable here.  It's the current style of rc.d.

Pointed out by: pjd

18 years agoTransforming "ppp-user" into just "ppp", step 1:
yar [Fri, 28 Oct 2005 16:07:52 +0000 (16:07 +0000)]
Transforming "ppp-user" into just "ppp", step 1:
The rcorder(8) condition PROVIDE'd by the script
and REQUIRE'd by the others becomes "ppp".

The ultimate goal of the transformation is to reduce
confusion resulting from the fact that $name has been
"ppp" already.

Discussed with: pjd, -rc

18 years agoFinally complete some work on generalizing the PCF8584-based I2C
joerg [Fri, 28 Oct 2005 15:58:19 +0000 (15:58 +0000)]
Finally complete some work on generalizing the PCF8584-based I2C
drivers I started quite some time before.

Retire the old i386-only pcf driver, and activate the new general
driver that has been sitting in the tree already for quite some
time.

Build the i2c modules for sparc64 architectures as well (where I've
been developing all this on).

18 years agoMove the isa, npx, mem and io devices and the PC98 option from GENERIC
nyan [Fri, 28 Oct 2005 15:30:51 +0000 (15:30 +0000)]
Move the isa, npx, mem and io devices and the PC98 option from GENERIC
into DEFAULTS.

18 years agoUse variable-sized arrays where appropriate.
ru [Fri, 28 Oct 2005 14:41:28 +0000 (14:41 +0000)]
Use variable-sized arrays where appropriate.

18 years agoBelatedly document the NGM_KSOCKET_ACCEPT ("accept") control message.
ru [Fri, 28 Oct 2005 14:15:54 +0000 (14:15 +0000)]
Belatedly document the NGM_KSOCKET_ACCEPT ("accept") control message.

18 years agoAdd test cases for the command built-in, including its -v and -V options which
stefanf [Fri, 28 Oct 2005 14:02:42 +0000 (14:02 +0000)]
Add test cases for the command built-in, including its -v and -V options which
I'll commit real soon.

Count the number of found test cases instead of hard-coding them.  Allow an
arbitrary exit status.

18 years agoUse fairly optimal minimax polynomials for __kernel_cosf() and
bde [Fri, 28 Oct 2005 13:36:58 +0000 (13:36 +0000)]
Use fairly optimal minimax polynomials for __kernel_cosf() and
__kernel_sinf().  The old ones were the double-precision polynomials
with coefficients truncated to float.  Truncation is not a good way
to convert minimax polynomials to lower precision.  Optimize for
efficiency and use the lowest-degree polynomials that give a relative
error of less than 1 ulp -- degree 8 instead of 14 for cosf and degree
9 instead of 13 for sinf.  For sinf, the degree 8 polynomial happens
to be 6 times more accurate than the old degree 14 one, but this only
gives a tiny amount of extra accuracy in results -- we just need to
use a a degree high enough to give a polynomial whose relative accuracy
in infinite precision (but with float coefficients) is a small fraction
of a float ulp (fdlibm generally uses 1/32 for the small fraction, and
the fraction for our degree 8 polynomial is about 1/600).

The maximum relative errors for cosf() and sinf() are now 0.7719 ulps
and 0.7969 ulps, respectively.

18 years agoProtect malloc, realloc and free calls with INT{ON,OFF} directly in chkalloc,
stefanf [Fri, 28 Oct 2005 10:45:19 +0000 (10:45 +0000)]
Protect malloc, realloc and free calls with INT{ON,OFF} directly in chkalloc,
ckrealloc and ckfree (added), respectively.  sh jumps out of the signal handler
using longjmp which is obviously a bad idea during malloc calls.

Note: I think there is still a small race here because volatile sig_atomic_t
only guarantees atomic reads and writes while we're doing increments and
decrements.

Protect a setmode call with INT{ON,OFF} as it calls malloc internally.

PR: 45478
Patch from: Nate Eldredge

18 years agoIn uart_bus_probe() return BUS_PROBE_DEFAULT when the probe is
marcel [Fri, 28 Oct 2005 06:30:39 +0000 (06:30 +0000)]
In uart_bus_probe() return BUS_PROBE_DEFAULT when the probe is
successful.

18 years agoo Style(9) nits
marcel [Fri, 28 Oct 2005 06:27:53 +0000 (06:27 +0000)]
o  Style(9) nits
o  Fix typo in comment
o  s/-100/BUS_PROBE_GENERIC/
o  s/err/error/ for consistency
o  Remove non-applicable comment
o  Allow uart_bus_probe() to return the predefined BUS_PROBE_*
   contants. In this case: explicitly test for error > 0.

18 years agoAllow uart_bus_probe() to return the predefined BUS_PROBE_*
marcel [Fri, 28 Oct 2005 06:24:09 +0000 (06:24 +0000)]
Allow uart_bus_probe() to return the predefined BUS_PROBE_*
constants. In this case: just return what uart_bus_probe()
returns.

18 years agoCardbus has only 1 slot, so simplify a little.
imp [Fri, 28 Oct 2005 06:03:53 +0000 (06:03 +0000)]
Cardbus has only 1 slot, so simplify a little.

18 years agoAdd PCIM_BIOS_ADDR_MASK too
imp [Fri, 28 Oct 2005 06:02:51 +0000 (06:02 +0000)]
Add PCIM_BIOS_ADDR_MASK too

18 years agoSome cardbus CIS definitions moved here since they are PCI registers.
imp [Fri, 28 Oct 2005 05:57:10 +0000 (05:57 +0000)]
Some cardbus CIS definitions moved here since they are PCI registers.

18 years agoMinor style(9) nitage.
imp [Fri, 28 Oct 2005 05:56:50 +0000 (05:56 +0000)]
Minor style(9) nitage.

18 years agoEliminate even more duplication, and move some definitions into pcireg.h
imp [Fri, 28 Oct 2005 05:55:52 +0000 (05:55 +0000)]
Eliminate even more duplication, and move some definitions into pcireg.h

18 years agoRemove now redundant defines.
imp [Fri, 28 Oct 2005 05:31:11 +0000 (05:31 +0000)]
Remove now redundant defines.

18 years agoSimplify code a little, prefer PCI?_FOO registers where possible.
imp [Fri, 28 Oct 2005 05:30:47 +0000 (05:30 +0000)]
Simplify code a little, prefer PCI?_FOO registers where possible.

18 years agoUse PCIR_BARS rather than CARDBUS_BASE0_REG
imp [Fri, 28 Oct 2005 05:29:41 +0000 (05:29 +0000)]
Use PCIR_BARS rather than CARDBUS_BASE0_REG
Style nit.

18 years agoRemove forgotten, no longer needed WB_UNLOCK() from the end wb_ioctl().
wpaul [Fri, 28 Oct 2005 02:17:40 +0000 (02:17 +0000)]
Remove forgotten, no longer needed WB_UNLOCK() from the end wb_ioctl().
With this change, the driver tests good (at least on i386):

wb0: <Winbond W89C840F 10/100BaseTX> port 0xb800-0xb87f mem 0xe6800000-0xe680007f irq 12 at device 10.0 on pci0
miibus1: <MII bus> on wb0
amphy0: <Am79C873 10/100 media interface> on miibus1
amphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
wb0: Ethernet address: 00:00:e8:18:2a:02
wb0: link state changed to DOWN
wb0: link state changed to UP

18 years agoSubmitted following patch to FSF GCC:
rodrigc [Thu, 27 Oct 2005 23:57:55 +0000 (23:57 +0000)]
Submitted following patch to FSF GCC:

* freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS):
  Use builtin_define_with_int_value() instead of
  adding a new check for every new major FreeBSD version.

Motivated by: simon
Discussed with: obrien, kan

18 years agoFixup locking and mark MPSAFE.
jhb [Thu, 27 Oct 2005 21:22:58 +0000 (21:22 +0000)]
Fixup locking and mark MPSAFE.
- Add locked variants of init() and start().
- Use callout_*() to manage callout.
- Test IFF_DRV_RUNNING rather than IFF_UP in wb_intr() to see if we are
  still active when an interrupt comes in.

I couldn't find any of these cards anywhere to test on myself, and google
turns up references to FreeBSD and OpenBSD manpages for this driver when
trying to locate a card that way.  I'm not sure anyone actually uses these
cards with FreeBSD.

Tested by: NO ONE (despite repeated requests)

18 years ago- Use if_printf() and device_printf() and remove vr_unit from the softc.
jhb [Thu, 27 Oct 2005 21:18:37 +0000 (21:18 +0000)]
- Use if_printf() and device_printf() and remove vr_unit from the softc.
  I had to initialize the ifnet a bit earlier in attach so that the
  if_printf()'s in vr_reset() didn't explode with a page fault.
- Use M_ZERO with contigmalloc() rather than an explicit bzero.

18 years ago- Add locking and mark MPSAFE. The driver had a mutex in the softc and
jhb [Thu, 27 Oct 2005 21:16:17 +0000 (21:16 +0000)]
- Add locking and mark MPSAFE.  The driver had a mutex in the softc and
  even initialized it, but it never used it.
- Use callout_*() to manage the callout.
- Use m_devget() to copy data out of the rx buffers rather than doing it
  all by hand.
- Use m_getcl() to allocate mbuf clusters rather than doing it all by hand.
- Don't free the software descriptor for a rx ring entry if we can't
  allocate an mbuf cluster for it.  We left a dangling pointer and never
  reallocated the entry anyway.  OpenBSD's code (from which this was
  derived) has the same bug.

Tested by: NO ONE (despite repeated requests)
Reviewed by: wpaul (5)

18 years agoDrop the driver lock around atm_input() analogous to all the ethernet
jhb [Thu, 27 Oct 2005 21:08:12 +0000 (21:08 +0000)]
Drop the driver lock around atm_input() analogous to all the ethernet
drivers dropping the driver lock around ether_input().

Silence by: harti

18 years agoBump config(8) version for the DEFAULTS change.
jhb [Thu, 27 Oct 2005 19:27:55 +0000 (19:27 +0000)]
Bump config(8) version for the DEFAULTS change.

18 years agoRemove information on nVidia nForce3 Pro-150 chipset to match GENERIC change.
obrien [Thu, 27 Oct 2005 19:07:35 +0000 (19:07 +0000)]
Remove information on nVidia nForce3 Pro-150 chipset to match GENERIC change.

18 years agoKeep locks consistent before goto.
glebius [Thu, 27 Oct 2005 19:02:34 +0000 (19:02 +0000)]
Keep locks consistent before goto.

Reported by: pho
Reviewed by: mohans

18 years agoMFi386: bring over DEFAULTS (repocopy) and adapt. While there isn't a
peter [Thu, 27 Oct 2005 18:54:43 +0000 (18:54 +0000)]
MFi386: bring over DEFAULTS (repocopy) and adapt.  While there isn't a
4.x->6.x amd64 upgrade path, the config files are kept in approximate sync.

18 years agoRemove atpic as we've changed to using the lapic timer vs. using irq0
obrien [Thu, 27 Oct 2005 18:40:56 +0000 (18:40 +0000)]
Remove atpic as we've changed to using the lapic timer vs. using irq0

18 years agoLook for packages in packages-6.0-release or packages-6-stable, as
murray [Thu, 27 Oct 2005 18:34:51 +0000 (18:34 +0000)]
Look for packages in packages-6.0-release or packages-6-stable, as
appropriate.

Approved by: re (scottl@)
Reviewed by: portmgr (kris@)

18 years agoRename the .dbg extension to .symbols, which matches "symbol-file"
ru [Thu, 27 Oct 2005 17:39:03 +0000 (17:39 +0000)]
Rename the .dbg extension to .symbols, which matches "symbol-file"
gdb(1) command better, though I must admit it's confusing: these
files have not only [debugging] symbols, but much more than that.

Requested by: obrien

18 years agoMFen: 1.883.2.7 -> 1.883.2.8
delphij [Thu, 27 Oct 2005 17:35:48 +0000 (17:35 +0000)]
MFen: 1.883.2.7 -> 1.883.2.8

MT6 candidate

Obtained from: The FreeBSD Simplified Chinese Project

18 years agoCreate a default kernel config for i386 and move 'device isa' and
jhb [Thu, 27 Oct 2005 17:34:35 +0000 (17:34 +0000)]
Create a default kernel config for i386 and move 'device isa' and
'device npx' (both of which aren't really optional right now) and
'device io' and 'device mem' (to preserve POLA for 4.x users upgrading
to 6.0) from GENERIC into DEFAULTS.

Requested by: scottl
Reviewed by: scottl

18 years agoIn watchdog_config enable the software watchdog iff the WD_ACTIVE flag is
emaste [Thu, 27 Oct 2005 17:22:47 +0000 (17:22 +0000)]
In watchdog_config enable the software watchdog iff the WD_ACTIVE flag is
set.  When watchdogd(1) is terminated intentionally it clears the bit,
which should then disable it in the kernel.

PR: kern/74386
Submitted by: Alex Hoff <ahoff at sandvine dot com>
Approved by: phk, rwatson (mentor)

18 years agoOptionally include a DEFAULTS config file if it is present in the current
jhb [Thu, 27 Oct 2005 17:13:23 +0000 (17:13 +0000)]
Optionally include a DEFAULTS config file if it is present in the current
directory before the specified config file.  This is implemented by
opening DEFAULTS as stdin if it exists, and if so resetting stdin to the
actual config file when DEFAULTS is fully parsed via yywrap().  In short,
this lets us create DEFAULTS kernel configs in /sys/<arch>/conf that can
enable certain options or devices by default and allow users to disable
them via 'nooptions' or 'nodevice' rather than having to create kludge
NO_FOO options.

Requested by: scottl
Reviewed by: scottl

18 years agoUpdate example libmap.conf file:
jhb [Thu, 27 Oct 2005 16:59:02 +0000 (16:59 +0000)]
Update example libmap.conf file:
- Remove pointless examples that map libpthread to itself.
- Update shared libraries for 6.0 bumps.

Reported by: rwatson
MFC after: 1 day

18 years agoRevert most of revision 1.235 and fix the problem a different way. We
jhb [Thu, 27 Oct 2005 16:47:28 +0000 (16:47 +0000)]
Revert most of revision 1.235 and fix the problem a different way.  We
can't acquire an sx lock in ttyinfo() because ttyinfo() can be called
from interrupt handlers (such as atkbd_intr()).  Instead, go back to
locking the process group while we pick a thread to display information for
and hold that lock until after we drop sched_lock to make sure the
process doesn't exit out from under us.  sched_lock ensures that the
specific thread from that process doesn't go away.  To protect against
the process exiting after we drop the proc lock but before we dereference
it to lookup the pid and p_comm in the call to ttyprintf(), we now copy
the pid and p_comm to local variables while holding the proc lock.

This problem was found by the recently added TD_NO_SLEEPING assertions for
interrupt handlers.

Tested by: emaste
MFC after: 1 week

18 years agoEnclose the delayed attach in Giant so we dont loose the race with other
sos [Thu, 27 Oct 2005 16:32:39 +0000 (16:32 +0000)]
Enclose the delayed attach in Giant so we dont loose the race with other
drivers trying to attach ATA devices like pccard.
Dont clear the delayed flag before we are acutally finished.

Spotted by: imp

18 years agoClear pending_txs when not "RUNNING".
obrien [Thu, 27 Oct 2005 15:39:19 +0000 (15:39 +0000)]
Clear pending_txs when not "RUNNING".

Submitted by: Q <q@onthenet.com.au>

18 years agoUse ${S} to pass ${SYSDIR} to ports. This makes PORTS_MODULES
ru [Thu, 27 Oct 2005 14:33:08 +0000 (14:33 +0000)]
Use ${S} to pass ${SYSDIR} to ports.  This makes PORTS_MODULES
feature work when compiling a kernel via "make buildkernel".

Noticed and tested by: nork

18 years agoInstalling debug modules was a bad idea -- I bogusly assumed that
ru [Thu, 27 Oct 2005 14:24:45 +0000 (14:24 +0000)]
Installing debug modules was a bad idea -- I bogusly assumed that
our kernel linker will only load PT_LOAD segments, apparently not.
Instead, produce .dbg objects from .debug objects, and install
them together with non-debug objects, as described in objcopy(1).

Original code by: obrien

18 years agoLink libthr to libpthread on Alpha and Sparc.
davidxu [Thu, 27 Oct 2005 10:21:23 +0000 (10:21 +0000)]
Link libthr to libpthread on Alpha and Sparc.

18 years agoAllow 32bit get/setsockopt with SO_SNDTIMEO or SO_RECVTIMEO to work.
ps [Thu, 27 Oct 2005 04:26:35 +0000 (04:26 +0000)]
Allow 32bit get/setsockopt with SO_SNDTIMEO or SO_RECVTIMEO to work.

18 years agoDisconnect libc_r from buildworld, it is still kept in the tree to
davidxu [Thu, 27 Oct 2005 03:09:20 +0000 (03:09 +0000)]
Disconnect libc_r from buildworld, it is still kept in the tree to
provide some baseline references, but users are encouraged to use
libpthread or libthr in real world.

Discussed on: arch@

18 years agoDo not manually allocate/free device's softc structure.
emax [Wed, 26 Oct 2005 23:13:51 +0000 (23:13 +0000)]
Do not manually allocate/free device's softc structure.

Pointed by: jhb
Reviewed by: imp, jhb