]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agodevice_shutdown returns int.
imp [Thu, 5 Feb 2009 18:39:33 +0000 (18:39 +0000)]
device_shutdown returns int.

15 years agobus_add_child takes a const char *.
imp [Thu, 5 Feb 2009 18:38:39 +0000 (18:38 +0000)]
bus_add_child takes a const char *.

15 years agoadd cfi test tool
sam [Thu, 5 Feb 2009 18:15:20 +0000 (18:15 +0000)]
add cfi test tool

Sponsored by: Carlson Wireless
Reviewed by: imp, Chris Andreson

15 years agoAdd support for frobbing Intel StrataFlash Protection Registers:
sam [Thu, 5 Feb 2009 18:12:07 +0000 (18:12 +0000)]
Add support for frobbing Intel StrataFlash Protection Registers:
o add CFI_SUPPORT_STRATAFLASH compile option to enable support
o add new ioctls to get/set the factory and user/oem segments of the PR
  and to get/set Protection Lock Register that fuses the user segment
o add #defines for bits in the status register
o update cfi_wait_ready to take an offset so it can be used to wait for
  PR write completion and replace constants w/ symbolic names

Note: writing the user segment isn't correct; committing now to get review.

Sponsored by: Carlson Wireless
Reviewed by: imp, Chris Anderson

15 years agoadd support for max antenna gain (not used at the moment)
sam [Thu, 5 Feb 2009 17:51:46 +0000 (17:51 +0000)]
add support for max antenna gain (not used at the moment)

15 years agoFix return type for detach routine (should be int)
imp [Thu, 5 Feb 2009 17:43:12 +0000 (17:43 +0000)]
Fix return type for detach routine (should be int)
Fix first parameter for identify routine (should be driver_t *)

15 years agoRemove the assertive KA_HELD and KA_UNHELD as long as they are dangerous,
attilio [Thu, 5 Feb 2009 15:09:04 +0000 (15:09 +0000)]
Remove the assertive KA_HELD and KA_UNHELD as long as they are dangerous,
and not really helpful.

15 years agoDon't bother null-checking the thread pointer before the prison checks
jamie [Thu, 5 Feb 2009 15:04:23 +0000 (15:04 +0000)]
Don't bother null-checking the thread pointer before the prison checks
in udp6_connect (td is already dereferenced elsewhere without such a
check).  This makes the conversion from a sockaddr to a sockaddr_in6
always happen, so convert once at the beginning of the function rather
than twice in the middle.

Approved by: bz (mentor)

15 years agoAdd more KTR_VFS logging point in order to have a more effective tracing.
attilio [Thu, 5 Feb 2009 15:03:35 +0000 (15:03 +0000)]
Add more KTR_VFS logging point in order to have a more effective tracing.

Reviewed by: brueffer, kib
Tested by: Gianni Trematerra <giovanni D trematerra A gmail D com>

15 years agoCall prison_if from rtm_get_jailed, instead of splitting it out into
jamie [Thu, 5 Feb 2009 14:58:16 +0000 (14:58 +0000)]
Call prison_if from rtm_get_jailed, instead of splitting it out into
prison_check_ip4 and prison_check_ip6.  As prison_if includes a jailed()
check, remove that check before calling rtm_get_jailed.

Approved by: bz (mentor)

15 years agoRemove redundant calls of prison_local_ip4 in in_pcbbind_setup, and of
jamie [Thu, 5 Feb 2009 14:25:53 +0000 (14:25 +0000)]
Remove redundant calls of prison_local_ip4 in in_pcbbind_setup, and of
prison_local_ip6 in in6_pcbbind.

Approved by: bz (mentor)

15 years agoDon't leave the console TTY constantly open.
ed [Thu, 5 Feb 2009 14:21:09 +0000 (14:21 +0000)]
Don't leave the console TTY constantly open.

When we leave the console TTY constantly open, we never reset the
termios attributes. This causes output processing, echoing, etc. not to
be reset to the proper values when going into single user mode after the
system has booted. It also causes nl-to-crnl-conversion not to take
place during shutdown, which causes a `staircase effect'.

This patch adds a new TTY flag, TF_OPENED_CONS, which is set when the
TTY is opened through /dev/console. Because the flags are only used by
the kernel and the pstat(8) utility, I've decided to renumber the TTY
flags. This shouldn't be an issue, because the TTY layer is not yet part
of a stable release.

Reported by: Mark Atkinson <atkin901 yahoo com>
Tested by: sepotvin

15 years agoDon't allow creating a socket with a protocol family that the current
jamie [Thu, 5 Feb 2009 14:15:18 +0000 (14:15 +0000)]
Don't allow creating a socket with a protocol family that the current
jail doesn't support.  This involves a new function prison_check_af,
like prison_check_ip[46] but that checks only the family.

With this change, most of the errors generated by jailed sockets
shouldn't ever occur, at least until jails are changeable.

Approved by: bz (mentor)

15 years agoStandardize the various prison_foo_ip[46] functions and prison_if to
jamie [Thu, 5 Feb 2009 14:06:09 +0000 (14:06 +0000)]
Standardize the various prison_foo_ip[46] functions and prison_if to
return zero on success and an error code otherwise.  The possible errors
are EADDRNOTAVAIL if an address being checked for doesn't match the
prison, and EAFNOSUPPORT if the prison doesn't have any addresses in
that address family.  For most callers of these functions, use the
returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or
EINVAL.

Always include a jailed() check in these functions, where a non-jailed
cred always returns success (and makes no changes).  Remove the explicit
jailed() checks that preceded many of the function calls.

Approved by: bz (mentor)

15 years agoUse the correct creds when reconnecting so that we have enough privilege to
dfr [Thu, 5 Feb 2009 11:48:10 +0000 (11:48 +0000)]
Use the correct creds when reconnecting so that we have enough privilege to
bind reserved ports (if necessary).

Submitted by: Jaakko Heinonen <jh at saualaht dot fi>

15 years agoIn some situations, mnt_lockref could go negative due to vfs_unbusy() being
trasz [Thu, 5 Feb 2009 08:46:18 +0000 (08:46 +0000)]
In some situations, mnt_lockref could go negative due to vfs_unbusy() being
called without calling vfs_busy() first.  This made umount(8) hang waiting
for mnt_lockref to become zero, which would never happen.

Reviewed by: kib
Approved by: rwatson (mentor)
Reported by: pho
Found with: stress2
Sponsored by: FreeBSD Foundation

15 years agopass in smp_processor_id to identify the cpu in use
kmacy [Thu, 5 Feb 2009 04:00:55 +0000 (04:00 +0000)]
pass in smp_processor_id to identify the cpu in use

15 years agoadjust the way that idle happens so as to avoid missing timer interrupts
kmacy [Thu, 5 Feb 2009 02:01:18 +0000 (02:01 +0000)]
adjust the way that idle happens so as to avoid missing timer interrupts

15 years agoAllow unprivileged users to run l2ping(8).
emax [Wed, 4 Feb 2009 22:44:09 +0000 (22:44 +0000)]
Allow unprivileged users to run l2ping(8).

MFC after: 1 month

15 years agoFix bm_shutdown() KOBJ method to correspond to return int, as it should.
nwhitehorn [Wed, 4 Feb 2009 22:16:27 +0000 (22:16 +0000)]
Fix bm_shutdown() KOBJ method to correspond to return int, as it should.

Found by: Andriy Gapon

15 years agoClenup code a bit and do not call fork(2) before dameon(3) where not needed.
emax [Wed, 4 Feb 2009 22:04:06 +0000 (22:04 +0000)]
Clenup code a bit and do not call fork(2) before dameon(3) where not needed.

MFC after: 1 month

15 years agoCorrect signatures to match kobj function definitions.
imp [Wed, 4 Feb 2009 21:11:31 +0000 (21:11 +0000)]
Correct signatures to match kobj function definitions.

15 years agoShutdown routine returns int.
imp [Wed, 4 Feb 2009 20:39:45 +0000 (20:39 +0000)]
Shutdown routine returns int.

15 years agodetach doesn't return an unsinged int, but returns an int.
imp [Wed, 4 Feb 2009 20:35:22 +0000 (20:35 +0000)]
detach doesn't return an unsinged int, but returns an int.

15 years agoFix shutdown routine to return 0 and change signature from void return
imp [Wed, 4 Feb 2009 20:26:27 +0000 (20:26 +0000)]
Fix shutdown routine to return 0 and change signature from void return
to int.

15 years agoCorrect signature for the identify routine. The bad parameter wasn't
imp [Wed, 4 Feb 2009 20:23:42 +0000 (20:23 +0000)]
Correct signature for the identify routine.  The bad parameter wasn't
used at all, so this is just a tidiness excersize.

15 years agoRemove local variable 'ddp' from DDP's attach and detach routines; they
rwatson [Wed, 4 Feb 2009 20:04:32 +0000 (20:04 +0000)]
Remove local variable 'ddp' from DDP's attach and detach routines; they
were used only for assertions, and rather than ifdef'ing them
INVARIANTS and using local variables, just directly access so_pcb.

Submitted by: Christoph Mallon <christoph dot mallon at gmx dot de>
MFC after: 1 week

15 years agoRemove written-to but never read local variable 'offset' from
rwatson [Wed, 4 Feb 2009 20:00:17 +0000 (20:00 +0000)]
Remove written-to but never read local variable 'offset' from
soreceive_dgram().

Submitted by: Christoph Mallon <christoph dot mallon at gmx dot de>
MFC after: 1 week

15 years agoEliminate the local variable 'ape' in audit_pipe_kqread(), as it's only
rwatson [Wed, 4 Feb 2009 19:56:37 +0000 (19:56 +0000)]
Eliminate the local variable 'ape' in audit_pipe_kqread(), as it's only
used for an assertion that we don't really need anymore.

MFC after: 1 week
Reported by: Christoph Mallon <christoph dot mallon at gmx dot de>

15 years agoTweak the ia64 machine check handling code to not register new sysctl nodes
jhb [Wed, 4 Feb 2009 18:44:29 +0000 (18:44 +0000)]
Tweak the ia64 machine check handling code to not register new sysctl nodes
while holding a spin mutex.  Instead, it now shoves the machine check
records onto a queue that is later drained to add sysctl nodes for each
record.  While a routine to drain the queue is present, it is not currently
called.

Reviewed by: marcel

15 years agoCheck for NOAUTO on child interfaces (eg wlanX) so they can be created via
thompsa [Wed, 4 Feb 2009 18:20:27 +0000 (18:20 +0000)]
Check for NOAUTO on child interfaces (eg wlanX) so they can be created via
rc.conf but not necessarily started.

15 years agoGet the right system makefiles for make distribution.
phk [Wed, 4 Feb 2009 18:14:30 +0000 (18:14 +0000)]
Get the right system makefiles for make distribution.

15 years agoRemove slush space from clists.
ed [Wed, 4 Feb 2009 17:10:01 +0000 (17:10 +0000)]
Remove slush space from clists.

Right now we only have a very small amount of drivers that use clists,
but we still allocate 50 cblocks as slush space, which allows drivers to
temporarily overcommit their storage. Most of the drivers don't allow
this anyway.

I've performed the following changes:

- We don't allocate any cblocks on startup.

- I've removed the DDB command, because it has nothing useful to print
  now. You can obtain the amount of allocated blocks by running `vmstat
  -m | grep clist'.

- I've removed cfreecount, which is now unused.

- The old code first tries to allocate using M_NOWAIT, followed by
  M_WAITOK. This doesn't make any sense, so just remove this logic. It
  seems the drivers allow us to sleep anyway.

We can even remove ccmax from clist_alloc_cblocks and c_cbmax from
struct clist, but this breaks binary compatibility.

This reduces the amount of allocated cblocks on my system from 54 to 4.

15 years agoWhen iterating through the list trying to find a router in
bz [Wed, 4 Feb 2009 10:35:27 +0000 (10:35 +0000)]
When iterating through the list trying to find a router in
defrouter_select(), NULL the cached llentry after unlocking
as we are no longer interested in it and with the second
iteration would try to unlock it again resulting in
panic: Lock (rw) lle not locked @ ...

Reported by: Mark Atkinson <m.atkinson@f5.com>
Tested by: Mark Atkinson <m.atkinson@f5.com>
PR: kern/128247 (in follow-up, unrelated to original report)

15 years agoErm... Report the buffer as being bounced even when it's the entire buffer,
cognet [Wed, 4 Feb 2009 01:14:06 +0000 (01:14 +0000)]
Erm... Report the buffer as being bounced even when it's the entire buffer,
or we would end up invalidating the cache line for what we just copied...

Reported by: thompsa
Pointy at to: cognet

MFC after: 3 days

15 years agoUpdate the actions previously attempted by the -D option to make them
mckusick [Wed, 4 Feb 2009 01:02:56 +0000 (01:02 +0000)]
Update the actions previously attempted by the -D option to make them
robust. With these changes fsck is now able to detect and reliably
rebuild corrupted cylinder group maps. The -D option is no longer
necessary as it has been replaced by a prompt asking whether the
corrupted cylinder group should be rebuilt and doing so when requested.
These actions are only offered and taken when running fsck in manual
mode. Corrupted cylinder groups found during preen mode cause the fsck
to fail.

Add the -r option to free up excess unused inodes. Decreasing the
number of preallocated inodes reduces the running time of future
runs of fsck and frees up space that can allocated to files. The -r
option is ignored when running in preen mode.

Reviewed by: Xin LI <delphij@>
Sponsored by: Rsync.net

15 years agoWhen crafting a media setting w/ an auto (non-fixed) rate mask out the
sam [Tue, 3 Feb 2009 22:32:26 +0000 (22:32 +0000)]
When crafting a media setting w/ an auto (non-fixed) rate mask out the
turbo option in addition to the mode bits; otherwise if the current
channel is a turbo mode channel we'll form an invalid media setting
and the ifmedia_set operation in vap_attach will panic.

While here use C99-style initialization for an array indexed by mode;
this makes it consistent w/ other usage and avoids breakage if we
should ever change the set of modes.

15 years agoReflect adding_user.8 -> adding_user.7 rename
gabor [Tue, 3 Feb 2009 20:46:05 +0000 (20:46 +0000)]
Reflect adding_user.8 -> adding_user.7 rename

Reminded by: kib

15 years agoLOR fix - Lock only when calling the actual code that
rrs [Tue, 3 Feb 2009 20:33:28 +0000 (20:33 +0000)]
LOR fix - Lock only when calling the actual code that
          is messing with the UDP tunnel. This means
          that if two users actually tried to change the
          tunnel port at the same time interesting things COULD
          result, but its probably very unlikely to happen :-)

15 years agoRemove NUMCDEVSW, which is unused since RELENG_5.
ed [Tue, 3 Feb 2009 20:31:26 +0000 (20:31 +0000)]
Remove NUMCDEVSW, which is unused since RELENG_5.

Discussed with: kib

15 years agoFix the functions to match prototypes. The K&R definitions differ
imp [Tue, 3 Feb 2009 20:25:36 +0000 (20:25 +0000)]
Fix the functions to match prototypes.  The K&R definitions differ
from the ANSI-C prototype due to the 'int promotion' rule.

15 years agoSlightly improve the design of the TTY buffer.
ed [Tue, 3 Feb 2009 19:58:28 +0000 (19:58 +0000)]
Slightly improve the design of the TTY buffer.

The TTY buffers used the standard <sys/queue.h> lists. Unfortunately
they have a big shortcoming. If you want to have a double linked list,
but no tail pointer, it's still not possible to obtain the previous
element in the list. Inside the buffers we don't need them. This is why
I switched to custom linked list macros. The macros will also keep track
of the amount of items in the list. Because it doesn't use a sentinel,
we can just initialize the queues with zero.

In its simplest form (the output queue), we will only keep two
references to blocks in the queue, namely the head of the list and the
last block in use. All free blocks are stored behind the last block in
use.

I noticed there was a very subtle bug in the previous code: in a very
uncommon corner case, it would uma_zfree() a block in the queue before
calling memcpy() to extract the data from the block.

15 years agoTrim what we expose to userland in <dev/ppbus/ppbconf.h> to just the
jhb [Tue, 3 Feb 2009 19:49:21 +0000 (19:49 +0000)]
Trim what we expose to userland in <dev/ppbus/ppbconf.h> to just the
constants used for the ppi(4) ioctls for bits in the control and status
registers.

Reviewed by: db

15 years agoadd Roel's copyright as he did the initial version
sam [Tue, 3 Feb 2009 19:21:15 +0000 (19:21 +0000)]
add Roel's copyright as he did the initial version

15 years agoAdd support for the StrataFlash on 2348 boards:
sam [Tue, 3 Feb 2009 19:16:04 +0000 (19:16 +0000)]
Add support for the StrataFlash on 2348 boards:
o add bus shim for cfi driver
o add static mapping for CS0 (we map all 16M as the cfi driver doesn't
  support demand mapping)

Note this needs some tweaking to work for 2358 boards which is why the
CAMBRIA config is not touched.

15 years agohonor any interface width (e.g. setup by the bus shim) and don't probe;
sam [Tue, 3 Feb 2009 19:09:16 +0000 (19:09 +0000)]
honor any interface width (e.g. setup by the bus shim) and don't probe;
this is needed for the moment to workaround bus shim issues

15 years agoreorg ioctl code to simplify adding new requests
sam [Tue, 3 Feb 2009 19:07:41 +0000 (19:07 +0000)]
reorg ioctl code to simplify adding new requests

15 years agoforce atomic_cmpset_ptr types to match atomic_cmpset_32;
sam [Tue, 3 Feb 2009 19:06:12 +0000 (19:06 +0000)]
force atomic_cmpset_ptr types to match atomic_cmpset_32;
this matches what powerpc does

Submitted by: stass
MFC after: 2 weeks

15 years agofix compilation w/ AH_DEBUG
sam [Tue, 3 Feb 2009 19:00:56 +0000 (19:00 +0000)]
fix compilation w/ AH_DEBUG

15 years ago- ANSIfy function definitions
danger [Tue, 3 Feb 2009 17:58:20 +0000 (17:58 +0000)]
- ANSIfy function definitions
- use nul when we are looking for a terminating character where appropriate

Approved by: imp

15 years agoDelete fwohci_filt() as it is now unused
sbruno [Tue, 3 Feb 2009 17:13:37 +0000 (17:13 +0000)]
Delete fwohci_filt() as it is now unused

Obtained from: Marius Strobl <marius@alchemy.franken.de>
MFC after: 2 weeks

15 years agoDon't right-adjust the SMBus slave address for SSIF IPMI BMCs enumerated
jhb [Tue, 3 Feb 2009 16:39:51 +0000 (16:39 +0000)]
Don't right-adjust the SMBus slave address for SSIF IPMI BMCs enumerated
via ACPI either.  This is somewhat academic since we don't currently
support such devices though.

15 years ago- Change ichsmb(4) to follow the format of all the other smbus controllers
jhb [Tue, 3 Feb 2009 16:14:37 +0000 (16:14 +0000)]
- Change ichsmb(4) to follow the format of all the other smbus controllers
  for slave addressing by using left-adjusted slave addresses (i.e.
  xxxxxxx0b).
- Require the low bit of the slave address to always be zero in smb(4) to
  help catch broken applications.
- Adjust some code in the IPMI driver to not convert the slave address for
  SSIF to a right-adjusted address.  I (or possibly ambrisko@) added this in
  the past to (unknowingly) work around the bug in ichsmb(4).

Submitted by:  Andriy Gapon <avg of icyb.net.ua> (1,2)
MFC after: 1 month

15 years ago- Keep the same sorting on usb_errstr_table as the enum.
thompsa [Tue, 3 Feb 2009 16:00:20 +0000 (16:00 +0000)]
- Keep the same sorting on usb_errstr_table as the enum.
- Use c99 array initializers for usb_quirk_str so the indexing isnt critical.

15 years agoPartially revert r186559.
obrien [Tue, 3 Feb 2009 15:27:29 +0000 (15:27 +0000)]
Partially revert r186559.

15 years agoAdd missing string table for the usb quirk enum.
thompsa [Tue, 3 Feb 2009 15:24:00 +0000 (15:24 +0000)]
Add missing string table for the usb quirk enum.

Pointy hat: me
Submitted by: rrs

15 years ago- Cleanup checksum code.
rrs [Tue, 3 Feb 2009 11:04:03 +0000 (11:04 +0000)]
- Cleanup checksum code.
- Prepare for CRC offloading, add MIB counters (RS/MT).
- Bugfix: Disable CRC computation for IPv6 addresses with local scope (MT).
- Bugfix: Handle close() with SO_LINGER correctly when notifications
          are generated during the close() call(MT).
- Bugfix: Generate DRY event when sender is dry during subscription.
          Only for 1-to-1 style sockets (RS/MT)
- Bugfix: Put vtags for the correct amount of time into time-wait (MT).
- Bugfix: Clear vtag entries correctly on expiration (MT).
- Bugfix: shutdown() indicates ENOTCONN when called for unconnected
          1-to-1 style sockets (MT).
- Bugfix: In sctp Auth code (PL).
- Add support for devices that support SCTP csum offload (igb).
- Add missing sctp_associd to mib sysctl xsctp_tcb structure (RS)
Obtained from: With help from Peter Lei and Michael Tuexen

15 years agoAdds support for SCTP checksum offload. This means
rrs [Tue, 3 Feb 2009 11:00:43 +0000 (11:00 +0000)]
Adds support for SCTP checksum offload. This means
we, like TCP and UDP, move the checksum calculation
into the IP routines when there is no hardware support
we call into the normal SCTP checksum routine.

The next round of SCTP updates will use
this functionality. Of course the IGB driver needs
a few updates to support the new intel controller set
that actually does SCTP csum offload too.

Reviewed by: gnn, rwatson, kmacy

15 years agoImprove robustness of NMI handling, for NMIs recognized in kernel
jkoshy [Tue, 3 Feb 2009 09:01:45 +0000 (09:01 +0000)]
Improve robustness of NMI handling, for NMIs recognized in kernel
mode.

- Make the NMI handler run on its own stack (TSS_IST2).
- Store the GSBASE value for each CPU just before the start of
  each NMI stack, permitting efficient retrieval using %rsp-relative
  addressing.
- For NMIs taken from kernel mode, program MSR_GSBASE explicitly
  since one or both of MSR_GSBASE and MSR_KGSBASE can be potentially
  invalid.  The current contents of MSR_GSBASE are saved and restored
  at exit.
- For NMIs handled from user mode, continue to use 'swapgs' to
  load the per-CPU GSBASE.

Reviewed by: jeff
Debugging help: jeff
Tested by: gnn, Artem Belevich <artemb at gmail dot com>

15 years agoUse NULL in preference to 0 in pointer contexts.
imp [Tue, 3 Feb 2009 07:54:42 +0000 (07:54 +0000)]
Use NULL in preference to 0 in pointer contexts.

15 years agoMake bioq_disksort have a ANSI-C definition rather than a K&R definition.
imp [Tue, 3 Feb 2009 07:53:51 +0000 (07:53 +0000)]
Make bioq_disksort have a ANSI-C definition rather than a K&R definition.

15 years agorman_debug should be static, so make it static.
imp [Tue, 3 Feb 2009 07:53:08 +0000 (07:53 +0000)]
rman_debug should be static, so make it static.

15 years agoUse ANSI function definition for profil.
imp [Tue, 3 Feb 2009 07:52:36 +0000 (07:52 +0000)]
Use ANSI function definition for profil.

15 years agoPrefer ANSI function definitions to K&R ones.
imp [Tue, 3 Feb 2009 07:52:07 +0000 (07:52 +0000)]
Prefer ANSI function definitions to K&R ones.

15 years agoUse NULL in preference to 0 for pointers.
imp [Tue, 3 Feb 2009 07:51:41 +0000 (07:51 +0000)]
Use NULL in preference to 0 for pointers.

15 years agoUse NULL in preference to 0 for pointers.
imp [Tue, 3 Feb 2009 07:51:11 +0000 (07:51 +0000)]
Use NULL in preference to 0 for pointers.

15 years agoo Use unsigned for bit fields.
imp [Tue, 3 Feb 2009 07:50:41 +0000 (07:50 +0000)]
o Use unsigned for bit fields.
o Use NULL for pointers in preference to 0.

15 years agoint foo(void) is the proper ANSI function definition when there's no
imp [Tue, 3 Feb 2009 07:50:01 +0000 (07:50 +0000)]
int foo(void) is the proper ANSI function definition when there's no
parameters.  Use it for resettodr().

15 years agoIn g_handleattr(), set bp->bio_completed also for the case
marcel [Tue, 3 Feb 2009 07:07:13 +0000 (07:07 +0000)]
In g_handleattr(), set bp->bio_completed also for the case
where len is 0. Otherwise g_getattr() will never succeed
when it is handled by g_handleattr_str().

15 years agoIntroduce a C type representing the header for GNU-style hash table
jkoshy [Tue, 3 Feb 2009 06:12:13 +0000 (06:12 +0000)]
Introduce a C type representing the header for GNU-style hash table
sections.  These ELF sections are generated by newer versions of
GNU binutils.

Reviewed by: kaiw, Ali Bahrami <ali dot bahrami at sun dot com>

15 years agoMove away from autogenerated enums, these values never change and its helpful
thompsa [Tue, 3 Feb 2009 05:50:36 +0000 (05:50 +0000)]
Move away from autogenerated enums, these values never change and its helpful
to be able to look them up.

15 years agoo Define some symbols for a few items that are bare constants in the
imp [Tue, 3 Feb 2009 04:28:45 +0000 (04:28 +0000)]
o Define some symbols for a few items that are bare constants in the
  code.
o Use NULL in preference to 0 for a few pointers.
o default to bus timing normal, like we default to bus_width_1.

15 years agomake sure that interrupts are disabled when handling page faults et al
kmacy [Tue, 3 Feb 2009 03:43:00 +0000 (03:43 +0000)]
make sure that interrupts are disabled when handling page faults et al

15 years agoUse NULL in preference to 0 for pointers.
imp [Tue, 3 Feb 2009 01:17:34 +0000 (01:17 +0000)]
Use NULL in preference to 0 for pointers.

15 years agoUse NULL in preference to '0' for pointers.
imp [Tue, 3 Feb 2009 01:17:17 +0000 (01:17 +0000)]
Use NULL in preference to '0' for pointers.

15 years agoUse %u instead of %zu when we intend to print integer constant.
delphij [Tue, 3 Feb 2009 00:15:19 +0000 (00:15 +0000)]
Use %u instead of %zu when we intend to print integer constant.

15 years agoDeclare bus_data_devices to be static: it isn't used elsewhere.
imp [Tue, 3 Feb 2009 00:10:21 +0000 (00:10 +0000)]
Declare bus_data_devices to be static: it isn't used elsewhere.
Use NULL in a couple of places rather than 0 in the context of
pointers to be consistent with the rest of the file.

15 years agobreak out of loop if we run out of mbufs
kmacy [Mon, 2 Feb 2009 23:04:20 +0000 (23:04 +0000)]
break out of loop if we run out of mbufs

15 years agoGoof, catch up to constant rename (I renamed it to match the overall PCI
jhb [Mon, 2 Feb 2009 22:06:20 +0000 (22:06 +0000)]
Goof, catch up to constant rename (I renamed it to match the overall PCI
style of having register offsets start with PCIR_* rather than PCI_*).

Submitted by: rss

15 years ago- Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
jhb [Mon, 2 Feb 2009 22:04:40 +0000 (22:04 +0000)]
- Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
  device.  The details include the current value of the BAR (including all
  the flag bits and the current base address), its length, and whether or not
  it is enabled.  Since this operation is not invasive, non-root users are
  allowed to use it (unlike manual config register access which requires
  root).  The intention is that userland apps (such as Xorg) will use this
  interface rather than dangerously frobbing the BARs from userland to
  obtain this information.
- Add a new sub-mode to the 'list' mode of pciconf.  The -b flag when used
  with -l will now list all the active BARs for each device.

(Missed in previous commit)

MFC after: 1 week

15 years agoProvide a type for the argument.
rdivacky [Mon, 2 Feb 2009 21:51:52 +0000 (21:51 +0000)]
Provide a type for the argument.

Approved by: kib (mentor)

15 years agoProperly retun error core from kbdmux_modevent()
emax [Mon, 2 Feb 2009 21:34:04 +0000 (21:34 +0000)]
Properly retun error core from kbdmux_modevent()

Reported by: Christoph Mallon < christoph -dot- mallon -at- gmx -dot- de >
MFC after: 1 week

15 years agoBegin basic improvements to fwcontrol in the area of handling
sbruno [Mon, 2 Feb 2009 21:05:12 +0000 (21:05 +0000)]
Begin basic improvements to fwcontrol in the area of handling
video streams from cameras.

This patch changes the displayed timer to a time stamp and corrects
one or two mishandled errors.

Submitted by: imp

15 years agoMove a comment to where it belongs.
cognet [Mon, 2 Feb 2009 20:24:29 +0000 (20:24 +0000)]
Move a comment to where it belongs.

Spotted out by: Christoph Mallon <christoph d0t mallon AT gmx d0t de>

15 years agoRemove unused variables.
cognet [Mon, 2 Feb 2009 20:09:14 +0000 (20:09 +0000)]
Remove unused variables.

Spotted out by: Christoph Mallon <christoph d0t mallon AT gmx d0t de>

15 years ago- Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
jhb [Mon, 2 Feb 2009 19:54:16 +0000 (19:54 +0000)]
- Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
  device.  The details include the current value of the BAR (including all
  the flag bits and the current base address), its length, and whether or not
  it is enabled.  Since this operation is not invasive, non-root users are
  allowed to use it (unlike manual config register access which requires
  root).  The intention is that userland apps (such as Xorg) will use this
  interface rather than dangerously frobbing the BARs from userland to
  obtain this information.
- Add a new sub-mode to the 'list' mode of pciconf.  The -b flag when used
  with -l will now list all the active BARs for each device.

MFC after: 1 month

15 years ago- Use a separate pointer to the allocated memory for freeing, as strsep may
lulf [Mon, 2 Feb 2009 19:22:53 +0000 (19:22 +0000)]
- Use a separate pointer to the allocated memory for freeing, as strsep may
  modify the pointer argument passed to it. This triggered an assert in malloc
  when a geom command being run under the livefs environment.

PR: bin/130632
Submitted by: Dimitry Andric <dimitry -at- andric.com>
Pointy hat to: me
MFC after: 2 days

15 years agoHook up btpand(8) to the build
emax [Mon, 2 Feb 2009 18:10:51 +0000 (18:10 +0000)]
Hook up btpand(8) to the build

MFC after: 1 month

15 years agoFix client mode. Pick up service availability changes.
emax [Mon, 2 Feb 2009 18:08:22 +0000 (18:08 +0000)]
Fix client mode. Pick up service availability changes.

Obtained from: NetBSD
MFC after: 1 month

15 years agoo make SAVE_CCK slightly less error prone by always writing the _flag
sam [Mon, 2 Feb 2009 16:56:58 +0000 (16:56 +0000)]
o make SAVE_CCK slightly less error prone by always writing the _flag
  value used later by RESTORE_CCK
o swap arg order in RESTORE_CCK to slightly reduce cost

15 years agorestore variable initialization removed in r187831; this broke
sam [Mon, 2 Feb 2009 16:55:57 +0000 (16:55 +0000)]
restore variable initialization removed in r187831; this broke
the horrible SAVE/RESTORE_CCK macros used by swan/nala cards to
implement 11b using 11g

15 years agoSince, rc.d/defaultroute has the ability to wait for a
mtm [Mon, 2 Feb 2009 15:38:24 +0000 (15:38 +0000)]
Since, rc.d/defaultroute has the ability to wait for a
default route to show up we can turn this knob back on
without screwing subsequent daemons that expect to be
able to talk to the outside world.

15 years agoThe 30 second wait for network interfaces to show up effectively makes the
mtm [Mon, 2 Feb 2009 15:33:22 +0000 (15:33 +0000)]
The 30 second wait for network interfaces to show up effectively makes the
time to boot an unplugged system 30 sec. longer for no good reason. Therefore,
add a check to make sure that any DHCP interfaces are plugged in before
waiting.

15 years agoThe last sector in the first segment might just be a sync, increment before
phk [Mon, 2 Feb 2009 14:30:07 +0000 (14:30 +0000)]
The last sector in the first segment might just be a sync, increment before
checking validity of segment two.

15 years agoDon't overwrite it, if only one sector is written yet.
phk [Mon, 2 Feb 2009 14:29:15 +0000 (14:29 +0000)]
Don't overwrite it, if only one sector is written yet.

Discovered by: "Dewayne Geraghty" <dewayne.geraghty@heuristicsystems.com.au>

15 years agoAlow dirname(1) to accept multiple arguments in the same way that
rwatson [Mon, 2 Feb 2009 11:19:56 +0000 (11:19 +0000)]
Alow dirname(1) to accept multiple arguments in the same way that
basename(1) does.

(Two different PRs contained identical patches, both cited below)

PR: 121520, 86148
Submitted by: Ighighi <ighighi at gmail dot com>
Submitted by: Leif Neland <leif at neland dot dk>
MFC after: 3 days

15 years agoExplain that we assume AF_INET and only use the addr and port field
luigi [Mon, 2 Feb 2009 11:02:19 +0000 (11:02 +0000)]
Explain that we assume AF_INET and only use the addr and port field
from a struct sockaddr_in, so there is no need to initialize sin_len

15 years agoremove duplicate #include
luigi [Mon, 2 Feb 2009 10:58:05 +0000 (10:58 +0000)]
remove duplicate #include

15 years agoRemove duplicate OPTFLAGS definition.
fjoe [Mon, 2 Feb 2009 06:25:57 +0000 (06:25 +0000)]
Remove duplicate OPTFLAGS definition.

15 years agoFix select on platforms where sizeof(long) != sizeof(int). This used
sepotvin [Mon, 2 Feb 2009 03:34:40 +0000 (03:34 +0000)]
Fix select on platforms where sizeof(long) != sizeof(int). This used
to work by accident before the cleanup done in revision 187693.

Approved by: kan (mentor)