]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoDon't free jail parameter values after printing them - jail_param_get
jamie [Sat, 12 Dec 2009 21:59:30 +0000 (21:59 +0000)]
Don't free jail parameter values after printing them - jail_param_get
expects them to be there for the next jail in the list.

PR: bin/141359
MFC after: 1 week

14 years agoSince the change to rc.subr in r198162 it's not necessary to specify
dougb [Sat, 12 Dec 2009 21:51:50 +0000 (21:51 +0000)]
Since the change to rc.subr in r198162 it's not necessary to specify
command in the rc.d script if we have a corresponding ${name}_program
entry, which we do for named.

Rename named_precmd to named_prestart to make it more clear and match
convention.

Move the command_args definition related to -u up into _prestart().
It (and the associated $named_uid value) are only used there, and
unlike required_* and pidfile don't need to be used until this stage.

Fix a silly bug that would only have affected people who were using
the new named_wait or named_auto_forward features, AND had set up an
rndc.conf file instead of using the automatically generated rndc.key.

For named_conf:
Add "-c $named_conf" to command_args if it's not set to the
default. If it is set to the default and we're using the base
BIND it's not necessary. If we're using BIND from the ports
the user is likely to have included it in _flags (due to long
necessity for doing so) so don't duplicate that if it's set.

Add $named_conf to required_files

14 years agoIn current code, threads performing an interruptible sleep (on both
attilio [Sat, 12 Dec 2009 21:31:07 +0000 (21:31 +0000)]
In current code, threads performing an interruptible sleep (on both
sxlock, via the sx_{s, x}lock_sig() interface, or plain lockmgr), will
leave the waiters flag on forcing the owner to do a wakeup even when if
the waiter queue is empty.
That operation may lead to a deadlock in the case of doing a fake wakeup
on the "preferred" (based on the wakeup algorithm) queue while the other
queue has real waiters on it, because nobody is going to wakeup the 2nd
queue waiters and they will sleep indefinitively.

A similar bug, is present, for lockmgr in the case the waiters are
sleeping with LK_SLEEPFAIL on.  In this case, even if the waiters queue
is not empty, the waiters won't progress after being awake but they will
just fail, still not taking care of the 2nd queue waiters (as instead the
lock owned doing the wakeup would expect).

In order to fix this bug in a cheap way (without adding too much locking
and complicating too much the semantic) add a sleepqueue interface which
does report the actual number of waiters on a specified queue of a
waitchannel (sleepq_sleepcnt()) and use it in order to determine if the
exclusive waiters (or shared waiters) are actually present on the lockmgr
(or sx) before to give them precedence in the wakeup algorithm.
This fix alone, however doesn't solve the LK_SLEEPFAIL bug. In order to
cope with it, add the tracking of how many exclusive LK_SLEEPFAIL waiters
a lockmgr has and if all the waiters on the exclusive waiters queue are
LK_SLEEPFAIL just wake both queues.

The sleepq_sleepcnt() introduction and ABI breakage require
__FreeBSD_version bumping.

Reported by: avg, kib, pho
Reviewed by: kib
Tested by: pho

14 years agoFor ia32 syscall(), call cpu_set_syscall_retval(). Update comment inside
kib [Sat, 12 Dec 2009 20:11:31 +0000 (20:11 +0000)]
For ia32 syscall(), call cpu_set_syscall_retval(). Update comment inside
cpu_set_syscall_retval() accordingly.

MFC after: 1 week

14 years agoDon't read the newline character to line buffer because lines are passed
jh [Sat, 12 Dec 2009 18:18:46 +0000 (18:18 +0000)]
Don't read the newline character to line buffer because lines are passed
to wcscoll(3). Newline characters could cause incorrect results when
comparing lines.

Also, if an input line didn't contain a newline character, it was
omitted from the output. According to my interpretation, SUSv3 requires
that the newline is always printed.

Add regression tests for the cases. [1]

PR: bin/140976
Submitted by: D'Arcy Cain (original version) [1]
Approved by: trasz (mentor)

14 years agoThe input line length limit mentioned on the manual page was removed by
jh [Sat, 12 Dec 2009 18:04:50 +0000 (18:04 +0000)]
The input line length limit mentioned on the manual page was removed by
r179374.

Approved by: trasz (mentor)

14 years agoInstall firmware(9) examples.
antoine [Sat, 12 Dec 2009 17:04:36 +0000 (17:04 +0000)]
Install firmware(9) examples.

MFC after: 1 month

14 years agoMake the code buildable in userland so it is easier to test it:
luigi [Sat, 12 Dec 2009 15:49:28 +0000 (15:49 +0000)]
Make the code buildable in userland so it is easier to test it:
this requires a small reordering of headers and a few #defines to
map functions not available in userland.

Remove a useless #ifndef block at the beginning of the file.

Introduce (temporarily) rn_init2(), see the comment in the code
for the proper long term change.

No ABI or functional change.

MFC after: 7 days

14 years agoOver time things that used to be files/directories/links can change
dougb [Sat, 12 Dec 2009 02:19:41 +0000 (02:19 +0000)]
Over time things that used to be files/directories/links can change
to something else. So add code to detect when things don't match and
give the user choices about how to fix it.

If we're using -P and something in the above check needs to be moved
we need to have the directory there for it, so create it at the
beginning and delete empty versions of it at the end.

The case where something used to be a file or link and now is supposed
to be a directory (e.g., /etc/security) is especially dangerous, so
make failure to install a necessary directory in $DESTDIR a fatal error.

14 years agoFix libusb_open_device_with_vid_pid() to return a NULL if no device is
scf [Sat, 12 Dec 2009 00:24:30 +0000 (00:24 +0000)]
Fix libusb_open_device_with_vid_pid() to return a NULL if no device is
found instead of the last device in its search list.

Reviewed by: thompsa
MFC after: 5 days

14 years agoRemove a dead store.
scf [Sat, 12 Dec 2009 00:11:40 +0000 (00:11 +0000)]
Remove a dead store.

MFC after: 5 days

14 years agoRemove driver lock assertion in MII register access. This change
yongari [Sat, 12 Dec 2009 00:06:43 +0000 (00:06 +0000)]
Remove driver lock assertion in MII register access. This change
was made in r199543 to remove MTX_RECURSE. These routines can be
called in device attach phase(e.g. mii_phy_probe()) so checking
assertion here is not right as caller does not hold a driver lock.

14 years agoThe hostname passed to ulog_login(3) may be optional.
ed [Fri, 11 Dec 2009 23:52:42 +0000 (23:52 +0000)]
The hostname passed to ulog_login(3) may be optional.

Don't trip on a null pointer being passed to this function when
performing a local login.

Noticed by: dougb

14 years agoRemove unneeded header includes from usr.bin/ except contributed code.
delphij [Fri, 11 Dec 2009 23:35:38 +0000 (23:35 +0000)]
Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe

14 years agoRemove unnecessary termcap.h includes inherited from extern.h and other
delphij [Fri, 11 Dec 2009 23:30:22 +0000 (23:30 +0000)]
Remove unnecessary termcap.h includes inherited from extern.h and other
unneeded headers.  While I'm there, make function definations ANSI
prototypes.

14 years agoMove unistd.h includes to individual .c files and remove unnecessary
delphij [Fri, 11 Dec 2009 23:23:57 +0000 (23:23 +0000)]
Move unistd.h includes to individual .c files and remove unnecessary
includes.

14 years agoRemove unnecessary includes.
delphij [Fri, 11 Dec 2009 23:20:02 +0000 (23:20 +0000)]
Remove unnecessary includes.

Reviewed by: rodrigc

14 years agoSimplify handling of MTREEFILE relative to DESTDIR
dougb [Fri, 11 Dec 2009 23:03:35 +0000 (23:03 +0000)]
Simplify handling of MTREEFILE relative to DESTDIR

Make the message about a missing MTREEFILE combined with -U
more informative

14 years agoReference the correct man page for firmware(9).
bcr [Fri, 11 Dec 2009 19:36:10 +0000 (19:36 +0000)]
Reference the correct man page for firmware(9).

PR:             docs/140985
Submitted by:   Glen Barber (glen dot j dot barber at gmail dot com)
MFC after:      7 days
Reviewed by:    rpaulo
Approved by:    rpaulo, jkois (mentor)

14 years agoCFA support doesn't exclude FLUSH support.
mav [Fri, 11 Dec 2009 16:32:59 +0000 (16:32 +0000)]
CFA support doesn't exclude FLUSH support.

Submitted by: Grzegorz Bernacki

14 years agoConvert pam_lastlog(8) to libulog.
ed [Fri, 11 Dec 2009 14:15:55 +0000 (14:15 +0000)]
Convert pam_lastlog(8) to libulog.

The information used by the "Last login:"-line is obtained by using
ulog_setutxfile(3) to switch to the lastlog database. Login and logout
are performed using the utility functions ulog_login(3) and
ulog_logout(3).

This also means we must build libulog during bootstrap.

Approved by: des

14 years agoBump the man page date to the date of the last update.
syrinx [Fri, 11 Dec 2009 13:05:09 +0000 (13:05 +0000)]
Bump the man page date to the date of the last update.

Noticed by: bz

14 years agoCleanups the boot2 for pc98. There is no functional change.
nyan [Fri, 11 Dec 2009 12:36:59 +0000 (12:36 +0000)]
Cleanups the boot2 for pc98.  There is no functional change.
  - Make setting machine type and getting geom conditional for future.
  - Remove unused RAWBOOT and CDBOOT supports.
  - Remove unneeded include.
  - Fix warnings.

MFC after: 1 week

14 years agoonly export bio_cmd and flags to userland (bio_cmd are
luigi [Fri, 11 Dec 2009 10:35:58 +0000 (10:35 +0000)]
only export bio_cmd and flags to userland (bio_cmd are
used by ggatectl, flags are potentially useful).
Other parts are internal kernel data structures and should
not be visible to userland.

No API change involved.

MFC after: 3 days

14 years agoAdd support for TACACS+ accounting to libtacplus(3).
syrinx [Fri, 11 Dec 2009 07:53:44 +0000 (07:53 +0000)]
Add support for TACACS+ accounting to libtacplus(3).

Submitted by: Michael Pounov misho@aitbg.com
OKed by: emaste

14 years agoFix interrupt handling. It started off broken and grew worse over time.
marcel [Fri, 11 Dec 2009 03:08:07 +0000 (03:08 +0000)]
Fix interrupt handling. It started off broken and grew worse over time.
The rewrite of the interrupt handler includes:
o   loop until all pending interrupts are handled. This closes a
    race condition.
o   count the number of interrupt sources we handled so that we can
    properly return FILTER_HANDLED or FILTER_STRAY when we break out
    of the loop.
o   When matching the interrupt source to the devices that have that
    source pending, check only from the set of devices we found to
    have a pending interrupt.

PR: kern/140947
MFC after: 3 days

14 years agoWrap long lines.
thompsa [Fri, 11 Dec 2009 02:52:14 +0000 (02:52 +0000)]
Wrap long lines.

14 years agoAdd a quirk for the Curitel UM175 where setting multiplexing for call
thompsa [Fri, 11 Dec 2009 02:44:15 +0000 (02:44 +0000)]
Add a quirk for the Curitel UM175 where setting multiplexing for call
management over the data endpoint causes communication to die.

Take this one step further and model it on the existing NetBSD quirk and import
other device IDs from them.

Obtained from: NetBSD

14 years agoApply two vendor fixes for CVE-2009-3720.
delphij [Fri, 11 Dec 2009 02:09:46 +0000 (02:09 +0000)]
Apply two vendor fixes for CVE-2009-3720.

Security: CVE-2009-3720
MFC after: 3 days

14 years agoUpdate to the December 12, 2008 version of this file. The one
dougb [Fri, 11 Dec 2009 01:06:04 +0000 (01:06 +0000)]
Update to the December 12, 2008 version of this file. The one
substantive change is to add the IPv6 address of L. The other
changes are all CAPS LOCK related.

14 years agoRevert r199331, the UM175 is in fact a cdc-acm device handled by umodem(4).
thompsa [Fri, 11 Dec 2009 00:57:30 +0000 (00:57 +0000)]
Revert r199331, the UM175 is in fact a cdc-acm device handled by umodem(4).

14 years agoAdd one more set of codec IDs.
mav [Fri, 11 Dec 2009 00:38:13 +0000 (00:38 +0000)]
Add one more set of codec IDs.

14 years agoUpdate termcap entries for xterm.
ed [Thu, 10 Dec 2009 22:25:53 +0000 (22:25 +0000)]
Update termcap entries for xterm.

It turns out these entries do make Terminal.app behave a little better.
According to Thomas Dickey, Terminal.app should use TERM=nsterm anyway,
but we don't support this yet. Already having an improved termcap entry
helps, so I am going to MFC this change after all.

Suggested by: Leonidas Tsampros <ltsampros upnet gr>
MFC after: 1 month

14 years agoAdd a missing else that negated the truncation of ki_ngroups to
brooks [Thu, 10 Dec 2009 21:16:16 +0000 (21:16 +0000)]
Add a missing else that negated the truncation of ki_ngroups to
NGROUPS.

Submitted by: Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>

14 years agouse div64 when converting back the burst value for userland
luigi [Thu, 10 Dec 2009 18:37:14 +0000 (18:37 +0000)]
use div64 when converting back the burst value for userland

14 years agowhen draining a flowset free the entire chain, not just one packet.
luigi [Thu, 10 Dec 2009 18:34:07 +0000 (18:34 +0000)]
when draining a flowset free the entire chain, not just one packet.

14 years agoAdd module dependency for cam if configured as ATA_CAM.
takawata [Thu, 10 Dec 2009 16:55:16 +0000 (16:55 +0000)]
Add module dependency for cam if configured as ATA_CAM.

14 years agocentralize the code to free a packet (or a chain) while in dummynet.
luigi [Thu, 10 Dec 2009 15:17:34 +0000 (15:17 +0000)]
centralize the code to free a packet (or a chain) while in dummynet.
Remove an old macro and its stale comment.

14 years agoDon't warn about an RSDP with a corrupt checksum. The kernel does a better
jhb [Thu, 10 Dec 2009 14:54:29 +0000 (14:54 +0000)]
Don't warn about an RSDP with a corrupt checksum.  The kernel does a better
job about warning about these things later and this message can be
confusing.

Submitted by: infofarmer
MFC after: 1 week

14 years agoRecord part of history I participated in.
kib [Thu, 10 Dec 2009 14:41:47 +0000 (14:41 +0000)]
Record part of history I participated in.

No objections from: ed, pho

14 years agoNo functional changes (who dares to touch this code!) but:
luigi [Thu, 10 Dec 2009 10:34:30 +0000 (10:34 +0000)]
No functional changes (who dares to touch this code!) but:

- cast the result of LEN() to int as this is the main usage.
- use LEN() in one place where it was forgotten.
- Document the use of a static variable in rw mode.

More small changes to follow.

MFC after: 7 days

14 years agoLimit maximum I/O size, depending on command set supported by device.
mav [Thu, 10 Dec 2009 09:26:56 +0000 (09:26 +0000)]
Limit maximum I/O size, depending on command set supported by device.
It is required to suppot non-LBA48 devices with MAXPHYS above 128K.
Same is done in ada(4).

14 years agofor PV XEN translate page table entries from machine (real) to physical (logical...
kmacy [Thu, 10 Dec 2009 07:48:47 +0000 (07:48 +0000)]
for PV XEN translate page table entries from machine (real) to physical (logical) addresses so that kgdb can
translate them to the correct coredump offsets

14 years agoMerge two cpio fixes from libarchive.googlecode.com:
kientzle [Thu, 10 Dec 2009 06:42:28 +0000 (06:42 +0000)]
Merge two cpio fixes from libarchive.googlecode.com:
 1) Avoid an infinite loop in the header resync for certain malformed
    archives.
 2) Don't try to match hardlinks if the nlinks count is < 2.   This
    reduces the likelihood of a false hardlink match due to ino truncation.

MFC after: 7 days

14 years ago- revert pmap_kenter_temporary to taking a physical address
kmacy [Thu, 10 Dec 2009 03:09:35 +0000 (03:09 +0000)]
- revert pmap_kenter_temporary to taking a physical address
- make minidump work

14 years agoSimplify arena_run_reg_dalloc(), and remove a bug that was due to incorrect
jasone [Thu, 10 Dec 2009 02:51:40 +0000 (02:51 +0000)]
Simplify arena_run_reg_dalloc(), and remove a bug that was due to incorrect
initialization of ssize_invs.

14 years agoImplement a rudimentary suspend/resume methods for PCI P2P bridge.
jkim [Thu, 10 Dec 2009 01:01:53 +0000 (01:01 +0000)]
Implement a rudimentary suspend/resume methods for PCI P2P bridge.

Reviewed by: jhb, imp

14 years agoFix the posix_memalign() changes in r196861 to actually return a NULL pointer
jasone [Thu, 10 Dec 2009 00:16:11 +0000 (00:16 +0000)]
Fix the posix_memalign() changes in r196861 to actually return a NULL pointer
as intended.

PR: standards/138307

14 years agoAdd my birthday.
gavin [Wed, 9 Dec 2009 22:03:57 +0000 (22:03 +0000)]
Add my birthday.

Approved by: ed (mentor)

14 years agoFor some buses, devices may have active resources assigned even though they
jhb [Wed, 9 Dec 2009 21:52:53 +0000 (21:52 +0000)]
For some buses, devices may have active resources assigned even though they
are not allocated by the device driver.  These resources should still appear
allocated from the system's perspective so that their assigned ranges are
not reused by other resource requests.  The PCI bus driver has used a hack
to effect this for a while now where it uses rman_set_device() to assign
devices to the PCI bus when they are first encountered and later assigns
them to the actual device when a driver allocates a BAR.  A few downsides of
this approach is that it results in somewhat confusing devinfo -r output as
well as not being very easily portable to other bus drivers.

This commit adds generic support for "reserved" resources to the resource
list API used by many bus drivers to manage the resources of child devices.
A resource may be reserved via resource_list_reserve().  This will allocate
the resource from the bus' parent without activating it.
resource_list_alloc() recognizes an attempt to allocate a reserved resource.
When this happens it activates the resource (if requested) and then returns
the reserved resource.  Similarly, when a reserved resource is released via
resource_list_release(), it is deactivated (if it is active) and the
resource is then marked reserved again, but is left allocated from the
bus' parent.  To completely remove a reserved resource, a bus driver may
use resource_list_unreserve().  A bus driver may use resource_list_busy()
to determine if a reserved resource is allocated by a child device or if
it can be unreserved.

The PCI bus driver has been changed to use this framework instead of
abusing rman_set_device() to keep track of reserved vs allocated resources.

Submitted by: imp (an older version many moons ago)
MFC after: 1 month

14 years agoAdd myself, and show ed@ as my mentor.
gavin [Wed, 9 Dec 2009 21:39:43 +0000 (21:39 +0000)]
Add myself, and show ed@ as my mentor.

Approved by: ed (mentor)

14 years agoAdd missing relation between philip and I.
ed [Wed, 9 Dec 2009 21:18:56 +0000 (21:18 +0000)]
Add missing relation between philip and I.

It seems I forgot this when I became a committer last year.

14 years agoFix a confusing typo in the EDD packet structure used in gptboot and
jhb [Wed, 9 Dec 2009 21:09:32 +0000 (21:09 +0000)]
Fix a confusing typo in the EDD packet structure used in gptboot and
gptzfsboot.  I got the segment and offset fields reversed in the structure,
but I also succeeded in crossing the assignments so the actual EDD packet
ended up correct.

MFC after: 1 week

14 years ago- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
jhb [Wed, 9 Dec 2009 20:36:56 +0000 (20:36 +0000)]
- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
  safely allocate a heap region above 1MB.  This enables {gpt,}zfsboot()
  to allocate much larger buffers than before.
- Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers.  This
  allows more reliable reading of compressed files in a raidz/raidz2 pool.

Submitted by: Matt Reimer  mattjreimer of gmail
MFC after: 1 week

14 years agoFix hardware issue with FTDI chips: avoid sending a zero length packet due to
thompsa [Wed, 9 Dec 2009 20:28:33 +0000 (20:28 +0000)]
Fix hardware issue with FTDI chips: avoid sending a zero length packet due to
hardware sending garbage on ZLPs.

Reported by: Corey Smith
Submitted by: HPS

14 years agoFix dwSignature for NCM mode and add extra debug output.
thompsa [Wed, 9 Dec 2009 20:27:06 +0000 (20:27 +0000)]
Fix dwSignature for NCM mode and add extra debug output.

Submitted by: HPS

14 years agoAdd new device ids.
thompsa [Wed, 9 Dec 2009 20:24:49 +0000 (20:24 +0000)]
Add new device ids.

PR: usb/140951, usb/140923
Submitted by: Romain Tartiere, Brett Glass

14 years agoCorrect name, 82801IJ -> 82801JI
thompsa [Wed, 9 Dec 2009 20:17:22 +0000 (20:17 +0000)]
Correct name, 82801IJ -> 82801JI

Submitted by: mitya_cabletv.dp.ua

14 years agoIf the ID byte is non zero then we allow descriptors having multiple sizes.
thompsa [Wed, 9 Dec 2009 20:15:05 +0000 (20:15 +0000)]
If the ID byte is non zero then we allow descriptors having multiple sizes.

Submitted by: HPS
Reported by: daichi

14 years agoPort lastlogin(1) to libulog.
ed [Wed, 9 Dec 2009 20:05:37 +0000 (20:05 +0000)]
Port lastlogin(1) to libulog.

Just use ulog_getutxuser() to obtain lastlog records or ulog_getutxent()
to browse through all of them.

14 years agoDon't let sysinstall depend on <utmp.h>.
ed [Wed, 9 Dec 2009 19:46:56 +0000 (19:46 +0000)]
Don't let sysinstall depend on <utmp.h>.

Looking at the other entries, I suspect we must also reserve one
terminating byte, so I'm using UNAME_FIELD_LEN - 1, not UNAME_FIELD_LEN.

14 years agowhen calling ldd, use the cross libraries and not the host version
luigi [Wed, 9 Dec 2009 17:48:05 +0000 (17:48 +0000)]
when calling ldd, use the cross libraries and not the host version

MFC after: 3 days

14 years agouse default HZ
luigi [Wed, 9 Dec 2009 17:42:14 +0000 (17:42 +0000)]
use default HZ

14 years agoadd -lulog, the program "less" and a comment
luigi [Wed, 9 Dec 2009 17:41:47 +0000 (17:41 +0000)]
add -lulog, the program "less" and a comment

14 years agoClear result before requesting XPT_PATH_INQ.
mav [Wed, 9 Dec 2009 14:21:21 +0000 (14:21 +0000)]
Clear result before requesting XPT_PATH_INQ.
Many SIMs doesn't fill maxio field yet.

14 years agoIncrease Max Read Request Size for PCIe chips from 512 to 1024 bytes.
mav [Wed, 9 Dec 2009 13:10:10 +0000 (13:10 +0000)]
Increase Max Read Request Size for PCIe chips from 512 to 1024 bytes.
It gives those beasts additional 10% of write bandwidth.

14 years agoThe default balance algorithm has changed from "split" to
ru [Wed, 9 Dec 2009 11:00:00 +0000 (11:00 +0000)]
The default balance algorithm has changed from "split" to
(the improved version of) "load".

14 years agomake PV core dump actually dump memory - still need to fix program header initialization
kmacy [Wed, 9 Dec 2009 08:09:25 +0000 (08:09 +0000)]
make PV core dump actually dump memory - still need to fix program header initialization

14 years agoAllow using IPv6 in nfsrvd_sentcache() callback.
delphij [Tue, 8 Dec 2009 23:43:50 +0000 (23:43 +0000)]
Allow using IPv6 in nfsrvd_sentcache() callback.

PR: kern/141289
Submitted by: Petr Lampa <lampa fit vutbr cz>
Approved by: rmacklem
MFC after: 1 week

14 years agoChange gmirror default balance algorithm from "split" to "load".
mav [Tue, 8 Dec 2009 22:43:29 +0000 (22:43 +0000)]
Change gmirror default balance algorithm from "split" to "load".
"split" is very ineffective for devices with rotating media as HDDs.
To be effective, it needs that transfer time reduction due to block
splitting was bigger then access time increase due to non-sequential
access. For modern HDDs I was able to reproduce it only with read sizes
of 2MB and above, which is almost not applicable in real life.
"load" algorithm same time is more universal and effective now.

Reviewed by: pjd

14 years agoSimplify a macro not to generate unncessary symbols.
jkim [Tue, 8 Dec 2009 22:38:42 +0000 (22:38 +0000)]
Simplify a macro not to generate unncessary symbols.

14 years agoFix the build.
mav [Tue, 8 Dec 2009 21:42:04 +0000 (21:42 +0000)]
Fix the build.

14 years agosem_init(3): document process shared semaphores and their restrictions
jilles [Tue, 8 Dec 2009 20:48:06 +0000 (20:48 +0000)]
sem_init(3): document process shared semaphores and their restrictions

14 years agoDon't add VAPPEND if the file is not being opened for writing. Note that this
trasz [Tue, 8 Dec 2009 20:47:10 +0000 (20:47 +0000)]
Don't add VAPPEND if the file is not being opened for writing.  Note that this
only affects cases where open(2) is being used improperly - i.e. when the user
specifies O_APPEND without O_WRONLY or O_RDWR.

Reviewed by: rwatson

14 years agoAdd additional checks of the kernel stack addresses in order to
marius [Tue, 8 Dec 2009 20:18:54 +0000 (20:18 +0000)]
Add additional checks of the kernel stack addresses in order to
ensure we don't overrun the end of the call chain.

MFC after: 1 week

14 years agoWhat we have in base system is actually OpenBSD 4.5's netcat,
delphij [Tue, 8 Dec 2009 19:12:38 +0000 (19:12 +0000)]
What we have in base system is actually OpenBSD 4.5's netcat,
update this file to reflect the fact.

14 years agoRemove phantom line of code that somehow slipped
jfv [Tue, 8 Dec 2009 18:54:37 +0000 (18:54 +0000)]
Remove phantom line of code that somehow slipped
into the checkin.

14 years agoCreate sysctl node(dev.bge.%d.focred_collapse) instead of
yongari [Tue, 8 Dec 2009 17:54:23 +0000 (17:54 +0000)]
Create sysctl node(dev.bge.%d.focred_collapse) instead of
hw.bge.forced_collapse. hw.bge.forced_collapse affects all bge(4)
controllers on system which may not desirable behavior of the
sysctl node. Also allow the sysctl node could be modified at any
time.

Reviewed by: bde (initial version)

14 years agoAdd ID for NetMos NM9820 Serial Port chip, found on CardBus serial adapter.
mav [Tue, 8 Dec 2009 14:55:07 +0000 (14:55 +0000)]
Add ID for NetMos NM9820 Serial Port chip, found on CardBus serial adapter.

14 years agoMFi386: revision 200219
nyan [Tue, 8 Dec 2009 13:06:35 +0000 (13:06 +0000)]
MFi386: revision 200219

  Improve the algorithm the loader uses to choose a memory range for its
  heap when using a range above 1MB.

MFC after: 1 week

14 years agoMFi386: Use real mode instead of v86 mode.
nyan [Tue, 8 Dec 2009 13:04:26 +0000 (13:04 +0000)]
MFi386: Use real mode instead of v86 mode.

MFC after: 1 week

14 years agoMFi386: revision 200216
nyan [Tue, 8 Dec 2009 12:10:06 +0000 (12:10 +0000)]
MFi386: revision 200216

  Various small whitespace and style fixes.

14 years ago- Try pre-allocating all FIBs upfront. Previously we tried pre-allocating
jkim [Tue, 8 Dec 2009 05:35:51 +0000 (05:35 +0000)]
- Try pre-allocating all FIBs upfront.  Previously we tried pre-allocating
128 FIBs first and allocated more later if necessary.  Remove now unused
definitions from the header file[1].
- Force sequential bus scanning.  It seems parallel scanning is in fact
slower and causes more harm than good[1].  Adjust a comment to reflect that.

PR: kern/141269
Submitted by: Alexander Sack (asack at niksun dot com)[1]
Reviewed by: scottl

14 years agoPartially revert r200228. For mini RCB case, bge(4) still have to
yongari [Tue, 8 Dec 2009 03:24:29 +0000 (03:24 +0000)]
Partially revert r200228. For mini RCB case, bge(4) still have to
disable mini ring withtout regard to mini ring support.

Reported by: marcel
Tested by: marcel

14 years agoResync with Intel versions of both the em and igb
jfv [Tue, 8 Dec 2009 01:07:44 +0000 (01:07 +0000)]
Resync with Intel versions of both the em and igb
drivers. These add new hardware support, most importantly
the pch (i5 chipset) in the em driver. Also, both drivers
now have the simplified (and I hope improved) watchdog
code. The igb driver uses the new RX cleanup that I
first implemented in ixgbe.

em  - version 6.9.24
igb - version 1.8.4

14 years agoFix typo in comment
rpaulo [Tue, 8 Dec 2009 00:54:08 +0000 (00:54 +0000)]
Fix typo in comment

Submitted by: Paul B Mahol <onemda at gmail.com>

14 years agoImprove response to multi-touch taps.
rpaulo [Tue, 8 Dec 2009 00:52:59 +0000 (00:52 +0000)]
Improve response to multi-touch taps.

Submitted by: Rohit Grover <rgrover1 at gmail.com>

14 years agoIn exception_save, write-back ar.rnat after switching the backing-
marcel [Tue, 8 Dec 2009 00:44:23 +0000 (00:44 +0000)]
In exception_save, write-back ar.rnat after switching the backing-
store. Writing to ar.bspstore is defined to leave ar.rnat undefined.

PR: ia64/120315
MFC after: 3 days

14 years agoUpdate driver to Intel version 2.0.7:
jfv [Mon, 7 Dec 2009 21:30:54 +0000 (21:30 +0000)]
Update driver to Intel version 2.0.7:

This adds new feature support for the 82599, a hardware
assist to LRO, doing this required a large revamp to the
RX cleanup code because the descriptor ring may not be
processed out of order, this necessitated the elimination
of global pointers.

Additionally, the RX routine now does not refresh mbufs
on every descriptor, rather it will do a range, and then
update the hardware pointer at that time. These are
performance oriented changes.

The TX side now has a cleaner simpler watchdog algorithm
as well, in TX cleanup a read of ticks is stored, that
can then be compared in local_timer to determine if
there is a hang.

Various other cleanups along the way, thanks to all who
have provided input and testing.

14 years agoRevert r200231. It was already taken cared by jhb long ago.
jkim [Mon, 7 Dec 2009 21:24:07 +0000 (21:24 +0000)]
Revert r200231.  It was already taken cared by jhb long ago.

Pointed out by: jhb
Pointy hat: jkim

14 years agoMake mfi(4) little bit less chatty.
jkim [Mon, 7 Dec 2009 20:17:33 +0000 (20:17 +0000)]
Make mfi(4) little bit less chatty.

14 years agoAdd support for the NetMos NM9865 family of Serial/Parallel ports.
marcel [Mon, 7 Dec 2009 20:05:02 +0000 (20:05 +0000)]
Add support for the NetMos NM9865 family of Serial/Parallel ports.

Obtained from: NetMos MCS9865 v1.0.0.1 driver
MFC after: 3 days

14 years agoDon't access jumbo frame related registers if controller lacks the
yongari [Mon, 7 Dec 2009 19:26:54 +0000 (19:26 +0000)]
Don't access jumbo frame related registers if controller lacks the
feature. These registers are reserved on controllers that have no
support for jumbo frame.
Only BCM5700 has mini ring so do not poke mini ring related
registers if controller is not BCM5700.

Reviewed by: marius

14 years agoRemove PHY isolate/power down code in bge_stop(). The isolation
yongari [Mon, 7 Dec 2009 19:18:23 +0000 (19:18 +0000)]
Remove PHY isolate/power down code in bge_stop(). The isolation
handler in brgphy(4) does not exist and brgphy(4) just resets the
PHY and returns EINVAL as it has no isolation handler. I also agree
on Marius's opinion that stop handler of every NIC driver seems to
be the wrong place for implementing PHY isolate/power down.
If we need PHY isolate/power down it should be implemented in
brgphy(4) and users should administratively down the PHY.

Reviewed by: marius

14 years agoExplicitly acknowledge MSI completion, as required by SiI3124 datasheet.
mav [Mon, 7 Dec 2009 18:37:50 +0000 (18:37 +0000)]
Explicitly acknowledge MSI completion, as required by SiI3124 datasheet.
It makes MSI working there. Later (and cheaper) PCIe chips (3132/3531)
still randomly crashing system in few seconds of high MSI rates, generating
something inaporopriate, like NMI or "Fatal trap 30".

14 years agoImprove the algorithm the loader uses to choose a memory range for its
jhb [Mon, 7 Dec 2009 16:29:43 +0000 (16:29 +0000)]
Improve the algorithm the loader uses to choose a memory range for its
heap when using a range above 1MB.

Previously the loader would always use the last 3MB in the first memory
range above 1MB for the heap.  However, this memory range is also where the
kernel and any modules are loaded.  If this memory range is "small", then
using the high 3MB for the heap may not leave enough room for the kernel
and modules.

Now the loader will use any range below 4GB for the heap, and the logic to
choose the "high" heap region has moved into biosmem.c.  It sets two
variables that the loader can use for a high heap if it desires.  When a
high heap is enabled (BZIP2, FireWire, GPT, or ZFS), then the following
memory ranges are preferred for the heap in order from best to worst:
- The largest memory region in the SMAP with a start address greater than
  1MB.  The memory region must be at least 3MB in length.  This leaves the
  region starting at 1MB purely for use by the kernel and modules.
- The last 3MB of the memory region starting at 1MB if it is at least 3MB
  in size.  This matches the current behavior except that the current loader
  would break horribly if the first region was not at least 3MB in size.
- The memory range from the end of the loader up to the 640k window.  This
  is the range the loader uses when none of the high-heap-requesting options
  are enabled.

Tested by: hrs
MFC after: 1 week

14 years agoMFp4;
mav [Mon, 7 Dec 2009 16:23:25 +0000 (16:23 +0000)]
MFp4;
- Cleanup kernel messages, mostly PMP.
- Took references on devices, while PMP reinitializes them, to not let them
go and distort freeze reference counting.

14 years agoSiI3124 has no SNotification register. Handle Asynchronous Notifications
mav [Mon, 7 Dec 2009 16:10:48 +0000 (16:10 +0000)]
SiI3124 has no SNotification register. Handle Asynchronous Notifications
there without it as good as possible.

14 years agoVarious small whitespace and style fixes.
jhb [Mon, 7 Dec 2009 16:00:59 +0000 (16:00 +0000)]
Various small whitespace and style fixes.

14 years agoAdd <machine/pcb.h> missed in r199135.
marius [Mon, 7 Dec 2009 15:29:07 +0000 (15:29 +0000)]
Add <machine/pcb.h> missed in r199135.