]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoCleanup if_media handling in mxge(4)
gallatin [Thu, 15 Apr 2010 13:50:55 +0000 (13:50 +0000)]
Cleanup if_media handling in mxge(4)

- Re-probe xfp / sfp+ socket on link events, in case user
    has changed transceiver
- correctly report current media to avoid confusing lagg (reported by Panasas)
- Report link speed  (submitted by yongari)

Reviewed by: yongari (earlier version)

MFC after: 7 days

14 years agoLocks SPTREE when setting some SP entries to state DEAD.
vanhu [Thu, 15 Apr 2010 12:40:33 +0000 (12:40 +0000)]
Locks SPTREE when setting some SP entries to state DEAD.
This can prevent kernel panics when updating SPs while
there is some traffic for them.

Obtained from: NETASQ
MFC after: 1m

14 years agoExplicitly enable PCI busmastering on attach.
mav [Thu, 15 Apr 2010 11:17:33 +0000 (11:17 +0000)]
Explicitly enable PCI busmastering on attach.
Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100).

H/W donated by: Gheorghe Ardelean

14 years agoscsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and
avg [Thu, 15 Apr 2010 09:22:14 +0000 (09:22 +0000)]
scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and
d_mediasize

[Forced commit to correct PR number.]
CD_FLAG_VALID_TOC is not required for setting those media properties.

PR: kern/138789
Submitted by: Juergen Lock <nox@jelal.kn-bremen.de>
a slightly different version
Tested by: Pavel Sukhoy <sukhoy@ripn.net>,
Markus Wild <m.wild@cybernet.ch>,
Juergen Lock <nox@jelal.kn-bremen.de>,
uqs
MFC after: 1 week

14 years agog_io_check: respond to zero pp->mediasize with ENXIO
avg [Thu, 15 Apr 2010 08:39:56 +0000 (08:39 +0000)]
g_io_check: respond to zero pp->mediasize with ENXIO

Previsouly this condition was reported with EIO by bio_offset > mediasize
check.
Perhaps that check should be extended to bio_offset+bio_length > mediasize.

MFC after: 1 week

14 years agoStill reference struct __sigaction with clarification when this form
kib [Thu, 15 Apr 2010 08:32:50 +0000 (08:32 +0000)]
Still reference struct __sigaction with clarification when this form
of argument declaration is needed.

Discussed with: bde
MFC after: 3 days

14 years agoscsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and
avg [Thu, 15 Apr 2010 08:29:14 +0000 (08:29 +0000)]
scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and
d_mediasize

CD_FLAG_VALID_TOC is not required for setting those media properties.

PR: kern/145385
Submitted by: Juergen Lock <nox@jelal.kn-bremen.de>
a slightly different version
Tested by: Pavel Sukhoy <sukhoy@ripn.net>,
Markus Wild <m.wild@cybernet.ch>,
Juergen Lock <nox@jelal.kn-bremen.de>,
uqs
MFC after: 1 week

14 years agoMove two copies of the same definition to a common include file.
julian [Wed, 14 Apr 2010 23:06:07 +0000 (23:06 +0000)]
Move two copies of the same definition to a common include file.

MFC after: 3 weeks

14 years agoUse the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local
gavin [Wed, 14 Apr 2010 22:03:48 +0000 (22:03 +0000)]
Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local
(almost identically named) local #define.

Reviewed by: hselasky

14 years agoWhen an underlying ioctl(2) handler returns an error, our ioctl(2)
delphij [Wed, 14 Apr 2010 22:02:19 +0000 (22:02 +0000)]
When an underlying ioctl(2) handler returns an error, our ioctl(2)
interface considers that it hits a fatal error, and will not copyout
the request structure back for _IOW and _IOWR ioctls, keeping them
untouched.

The previous implementation of the SIOCGIFDESCR ioctl intends to
feed the buffer length back to userland.  However, if we return
an error, the feedback would be defeated and ifconfig(8) would
trap into an infinite loop.

This commit changes SIOCGIFDESCR to set buffer field to NULL to
indicate the previous ENAMETOOLONG case.

Reported by: bschmidt
MFC after: 2 weeks

14 years agoMove fatal error at the right place.
fabient [Wed, 14 Apr 2010 21:53:27 +0000 (21:53 +0000)]
Move fatal error at the right place.
Fix exit from top mode when checking if PMC is available.

MFC after: 3 days

14 years agoMan page change to documant slight change in ktr_alq behaviour.
julian [Wed, 14 Apr 2010 21:44:14 +0000 (21:44 +0000)]
Man page change to documant slight change in ktr_alq behaviour.

14 years agoChange the semantics of the debug.ktr.alq_enable control so that when you
julian [Wed, 14 Apr 2010 21:42:29 +0000 (21:42 +0000)]
Change the semantics of the debug.ktr.alq_enable  control so that when you
disable alq, it acts as if alq had not been enabled in the build.
in other words, the rest of ktr is still available for use.
If you really don't want that as well, set the mask to 0.

MFC after:3 weeks

14 years agoAdd sge(4) man page and hook up sge(4) to the build.
yongari [Wed, 14 Apr 2010 21:27:48 +0000 (21:27 +0000)]
Add sge(4) man page and hook up sge(4) to the build.
Also add Xr to appropriate man pages.

14 years agoAdd a missing fragment in the tx msix handler to invoke
jfv [Wed, 14 Apr 2010 20:55:33 +0000 (20:55 +0000)]
Add a missing fragment in the tx msix handler to invoke
another if all work is not done.

Sync the igb driver with changes suggested by yongari and
made in em, these made sense to be in both drivers.

14 years agoAdd sge(4) to the list of supported network interface.
yongari [Wed, 14 Apr 2010 20:54:23 +0000 (20:54 +0000)]
Add sge(4) to the list of supported network interface.

14 years agoWe don't need the definition for in_cksum repeated here since we get
imp [Wed, 14 Apr 2010 20:50:07 +0000 (20:50 +0000)]
We don't need the definition for in_cksum repeated here since we get
it from machine/in_cksum.h.  This definition prevents us from using
hand-tuned assembler versions of in_cksum.

# this fixes the modules build on arm for ipfilter.

14 years agoAdd driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet.
yongari [Wed, 14 Apr 2010 20:45:33 +0000 (20:45 +0000)]
Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet.
This driver was written by Alexander Pohoyda and greatly enhanced
by Nikolay Denev. I don't have these hardwares but this driver was
tested by Nikolay Denev and xclin.

Because SiS didn't release data sheet for this controller, programming
information came from Linux driver and OpenSolaris. Unlike other open
source driver for SiS190/191, sge(4) takes full advantage of TX/RX
checksum offloading and does not require additional copy operation in
RX handler.
The controller seems to have advanced offloading features like VLAN
hardware tag insertion/stripping, TCP segmentation offload(TSO) as
well as jumbo frame support but these features are not available
yet. Special thanks to xclin <xclin<> cs dot nctu dot edu dot tw>
who sent fix for receiving VLAN oversized frames.

14 years agoMake this directory more regular. Since it is one we control, use the
imp [Wed, 14 Apr 2010 20:31:06 +0000 (20:31 +0000)]
Make this directory more regular.  Since it is one we control, use the
freebsd-based names for filenames.  This allows us to eliminate
almost all of the uses of ${MACHINE_ARCH} here to do special things, and
instead we use it to include filenames.  This makes new architectures easier
to support.

14 years agold_gs_base is executing with stack containing only the frame,
kib [Wed, 14 Apr 2010 20:04:55 +0000 (20:04 +0000)]
ld_gs_base is executing with stack containing only the frame,
temporary pushed %rflags has been popped already.

Pointy hat to: kib
MFC after: 3 days

14 years agomdoc: order prologue macros consistently by Dd/Dt/Os
uqs [Wed, 14 Apr 2010 19:08:06 +0000 (19:08 +0000)]
mdoc: order prologue macros consistently by Dd/Dt/Os

Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by: ru
Approved by: philip, ed (mentors)

14 years agoAdd and expand $FreeBSD$ keyword to allow committing to this file.
uqs [Wed, 14 Apr 2010 19:06:39 +0000 (19:06 +0000)]
Add and expand $FreeBSD$ keyword to allow committing to this file.

14 years agoAdd armeb-*-freebsd* to the list of known architectures. This is like
imp [Wed, 14 Apr 2010 19:03:27 +0000 (19:03 +0000)]
Add armeb-*-freebsd* to the list of known architectures.  This is like
arm-*-freebsd*, except it defaults to big endian builds instead of
little endian builds.

14 years agoAdd note about TARGET_ARCH
imp [Wed, 14 Apr 2010 18:56:07 +0000 (18:56 +0000)]
Add note about TARGET_ARCH

14 years agoMake this code a little more portable by wrapping the mtx calls into
rpaulo [Wed, 14 Apr 2010 18:29:40 +0000 (18:29 +0000)]
Make this code a little more portable by wrapping the mtx calls into
macros.

MFC after: 1 week

14 years agomdoc: don't abuse Bo/Pc to get what looks like an interval
uqs [Wed, 14 Apr 2010 18:29:34 +0000 (18:29 +0000)]
mdoc: don't abuse Bo/Pc to get what looks like an interval

Be explicit and use the general bracketing form plus symbols which are
to be interpreted mathematically in this case.

Complaint by: mdocml
Reviewed by: ru
Approved by: philip, ed (mentors)

14 years agomdoc: remove .Pp where not needed
uqs [Wed, 14 Apr 2010 18:29:26 +0000 (18:29 +0000)]
mdoc: remove .Pp where not needed

This trips up mdocml and can simply go away.

Reviewed by: ru
Approved by: philip, ed (mentors)

14 years agoRemove multiqueue stack related stuff form lem, it is
jfv [Wed, 14 Apr 2010 18:29:01 +0000 (18:29 +0000)]
Remove multiqueue stack related stuff form lem, it is
unneeded for legacy hardware.
Also remove some TSO related cruft.
Add some watchdog_time setting that was missing, thanks
to Mikolaj Golub for pointing that out.

14 years agoFor early ALI chips do not announce I/O sizes that require unsupported
mav [Wed, 14 Apr 2010 15:29:32 +0000 (15:29 +0000)]
For early ALI chips do not announce I/O sizes that require unsupported
48bit DMA commands.

14 years agoLinux puts a blank line between each CPU.
emaste [Wed, 14 Apr 2010 13:44:22 +0000 (13:44 +0000)]
Linux puts a blank line between each CPU.

14 years agoEliminate duplicate comment
kevlo [Wed, 14 Apr 2010 07:07:43 +0000 (07:07 +0000)]
Eliminate duplicate comment

14 years agoDestroy the pmap 'pm_mutex' in pmap_release() otherwise we will panic
neel [Wed, 14 Apr 2010 01:57:53 +0000 (01:57 +0000)]
Destroy the pmap 'pm_mutex' in pmap_release() otherwise we will panic
subsequently in pmap_pinit() with the following signature:

panic: lock "pmap" 0xc7878bc8 already initialized

This bug was uncovered by the changes made to vm_map.c in r206140.

14 years agoRevert the vm_machdep.c part of r205072.
neel [Wed, 14 Apr 2010 01:29:31 +0000 (01:29 +0000)]
Revert the vm_machdep.c part of r205072.

This causes a panic in vm_thread_dispose() when it tries to add this kstack
to the kstack cache. This happens only when 'td_kstack' is not (PAGE_SIZE * 2)
bytes aligned and we have unmapped the page at that address in cpu_thread_alloc.

Pointed out by: nwhitehorn@

14 years agoThe sequence number is now a node under which the MCA records are
marcel [Tue, 13 Apr 2010 22:27:39 +0000 (22:27 +0000)]
The sequence number is now a node under which the MCA records are
hung by CPU id.
When showing the MCA record, print the MIB as a comment.

PR: ia64/113102

14 years agoPopulate the sysctl tree with any MCA records we collected.
marcel [Tue, 13 Apr 2010 22:20:12 +0000 (22:20 +0000)]
Populate the sysctl tree with any MCA records we collected.
The sequence number is used as the name of a sysctl node,
under which we add the MCA records using the CPU id as the
leaf  name.

Add the hw.mca.inject sysctl to provide a way to inject
MC errors and trigger machine checks.

PR: ia64/113102

14 years agoOnly compile in uart_cpu_$MACHINE.c if it exists. I'm not sure how
imp [Tue, 13 Apr 2010 21:32:06 +0000 (21:32 +0000)]
Only compile in uart_cpu_$MACHINE.c if it exists.  I'm not sure how
useful it will be, but we really need to be keying off something other
than MACHINE for this anyway since on arm and mips we have lots of
these running around (one for each SoC family)...

14 years agoAllerheilingen -> Allerheiligen
edwin [Tue, 13 Apr 2010 20:50:59 +0000 (20:50 +0000)]
Allerheilingen -> Allerheiligen

Submitted by: Ronald Klop <ronald at realworks dot nl>

14 years agoAdd Agere ET1011 PHY which is found on Belkin F5D5055 USB
yongari [Tue, 13 Apr 2010 20:07:52 +0000 (20:07 +0000)]
Add Agere ET1011 PHY which is found on Belkin F5D5055 USB
controller. Unlike Agere ET1011C, Agere ET1011 does not seem to
need special DSP programming to workaround silicon bug.

14 years ago- Ignore and report duplicate and empty device names in devfs_populate_loop()
jh [Tue, 13 Apr 2010 18:53:39 +0000 (18:53 +0000)]
- Ignore and report duplicate and empty device names in devfs_populate_loop()
  instead of causing erratic behavior. Currently make_dev(9) can't fail, so
  there is no way to report an error to make_dev(9) callers.
- Disallow using "." and ".." in device path names. It didn't work previously
  but now it is reported rather than panicing.
- Treat multiple sequential slashes as single in device path names.

Discussed with: pjd

14 years agoChange the (generic) argument to ia64_store_mca_state() from the
marcel [Tue, 13 Apr 2010 15:55:18 +0000 (15:55 +0000)]
Change the (generic) argument to ia64_store_mca_state() from the
cpuid to the struct pcpu of the CPU. We casting between pointer
types only then.

14 years agoNuke the descriptions about ipv6_firewall_* as they were unified
ume [Tue, 13 Apr 2010 15:53:04 +0000 (15:53 +0000)]
Nuke the descriptions about ipv6_firewall_* as they were unified
into firewall_*.

MFC after: 3 days

14 years agoo s/u_int64_t/uint64_t/g
marcel [Tue, 13 Apr 2010 15:51:25 +0000 (15:51 +0000)]
o   s/u_int64_t/uint64_t/g
o   style(9) fixes.

14 years agoUse enums in the aac_command_status_table rather than duplicating the same
emaste [Tue, 13 Apr 2010 12:10:55 +0000 (12:10 +0000)]
Use enums in the aac_command_status_table rather than duplicating the same
values in two places.

Suggested by: Garrett Cooper

14 years agoChange printf() calls to uprintf() for sigreturn() and trap() complaints
kib [Tue, 13 Apr 2010 10:12:58 +0000 (10:12 +0000)]
Change printf() calls to uprintf() for sigreturn() and trap() complaints
about inacessible or wrong mcontext, and for dreaded "kernel trap with
interrupts disabled" situation. The later is changed when trap is
generated from user mode (shall never be ?).

Normalize the messages to include both pid and thread name.

MFC after: 1 week

14 years agofix copyright format, as requested by Joel Dahl
luigi [Tue, 13 Apr 2010 09:56:17 +0000 (09:56 +0000)]
fix copyright format, as requested by Joel Dahl

14 years agomake code compile with KTR
luigi [Tue, 13 Apr 2010 09:53:08 +0000 (09:53 +0000)]
make code compile with KTR

14 years agouse correct .PATH, remove unused CFLAGS
luigi [Tue, 13 Apr 2010 09:52:42 +0000 (09:52 +0000)]
use correct .PATH, remove unused CFLAGS

14 years agoAlign the declaration for sa_sigaction with POSIX.
kib [Tue, 13 Apr 2010 08:56:03 +0000 (08:56 +0000)]
Align the declaration for sa_sigaction with POSIX.

MFC after: 3 days

14 years agoUpdate the list of the process flags for P_WKILLED.
kib [Tue, 13 Apr 2010 08:54:53 +0000 (08:54 +0000)]
Update the list of the process flags for P_WKILLED.

MFC after: 4 weeks

14 years agoHandle a case in kern_openat() when vn_open() change file type from
kib [Tue, 13 Apr 2010 08:52:20 +0000 (08:52 +0000)]
Handle a case in kern_openat() when vn_open() change file type from
DTYPE_VNODE.

Only acquire locks for O_EXLOCK/O_SHLOCK if file type is still vnode,
since we allow for fcntl(2) to process with advisory locks for
DTYPE_VNODE only. Another reason is that all fo_close() routines need to
check and release locks otherwise.

For O_TRUNC, call fo_truncate() instead of truncating the vnode.

Discussed with: rwatson
MFC after: 2 week

14 years agoRemove XXX comment. Add another comment, describing why f_vnode assignment
kib [Tue, 13 Apr 2010 08:45:55 +0000 (08:45 +0000)]
Remove XXX comment. Add another comment, describing why f_vnode assignment
is useful.

MFC after: 3 days

14 years agoSimplify vm_thread_swapin().
alc [Tue, 13 Apr 2010 06:48:37 +0000 (06:48 +0000)]
Simplify vm_thread_swapin().

14 years agoThe Quanta Q101 modem has a different type of cdrom driver disk,
kevlo [Tue, 13 Apr 2010 06:27:02 +0000 (06:27 +0000)]
The Quanta Q101 modem has a different type of cdrom driver disk,
add the product id and use a standard scsi eject.

Reviewed by: thompsa
MFC after: 3 days

14 years agoSync up to SDM 2.2.
marcel [Tue, 13 Apr 2010 03:10:38 +0000 (03:10 +0000)]
Sync up to SDM 2.2.

14 years agoSync some minor items with the upstream driver. Should have no functional
emaste [Tue, 13 Apr 2010 01:16:15 +0000 (01:16 +0000)]
Sync some minor items with the upstream driver.  Should have no functional
change.

14 years agoWhitespace cleanup, in advance of next sync with Adaptec's driver. No
emaste [Tue, 13 Apr 2010 00:33:07 +0000 (00:33 +0000)]
Whitespace cleanup, in advance of next sync with Adaptec's driver.  No
functional change.

14 years ago- Add an entry for myself to committers-ports.dot
sahil [Mon, 12 Apr 2010 23:47:29 +0000 (23:47 +0000)]
- Add an entry for myself to committers-ports.dot

14 years agoSimplify how we select which architectures to add gdbserver for. If
imp [Mon, 12 Apr 2010 23:35:58 +0000 (23:35 +0000)]
Simplify how we select which architectures to add gdbserver for.  If
the MD files exist, compile it, otherwise omit it.

14 years agoDoh! Last minute changes bites me in the butt....
imp [Mon, 12 Apr 2010 21:33:06 +0000 (21:33 +0000)]
Doh!  Last minute changes bites me in the butt....

Remove _ to make things build again.

14 years agobce, bwi, bwn, mfi, mpt and siba_bwn all now compile that arm and mips
imp [Mon, 12 Apr 2010 18:28:08 +0000 (18:28 +0000)]
bce, bwi, bwn, mfi, mpt and siba_bwn all now compile that arm and mips
have added a BUS_SPACE_UNSPECIFIED definition.  Add them back to the
mix on these platforms.

14 years agoBring in geom_sched, support for scheduling disk I/O requests
luigi [Mon, 12 Apr 2010 16:37:45 +0000 (16:37 +0000)]
Bring in geom_sched, support for scheduling disk I/O requests
in a device independent manner. Also include an example anticipatory
scheduler, gsched_rr, which gives very nice performance improvements
in presence of competing random access patterns.

This is joint work with Fabio Checconi, developed last year
and presented at BSDCan 2009. You can find details in the
README file or at

http://info.iet.unipi.it/~luigi/geom_sched/

14 years agoRemove svn:executable prop.
rpaulo [Mon, 12 Apr 2010 13:46:20 +0000 (13:46 +0000)]
Remove svn:executable prop.

14 years ago- Add myself to the ports committers graph
fluffy [Mon, 12 Apr 2010 12:28:22 +0000 (12:28 +0000)]
- Add myself to the ports committers graph

Forgot to do it when gain my commit bit :)

14 years agofix a buffer overflow with large (100k+) number of input lines.
luigi [Mon, 12 Apr 2010 08:27:53 +0000 (08:27 +0000)]
fix a buffer overflow with large (100k+) number of input lines.

MFC after: 3 days

14 years agoAdd #endif missed in r206490.
marius [Sun, 11 Apr 2010 21:22:02 +0000 (21:22 +0000)]
Add #endif missed in r206490.

14 years agosh: Test that bogus values of PWD are not imported from the environment.
jilles [Sun, 11 Apr 2010 20:21:34 +0000 (20:21 +0000)]
sh: Test that bogus values of PWD are not imported from the environment.

Current versions pass this test trivially by never importing PWD, but I plan
to change sh to import PWD if it is an absolute pathname for the current
directory, possibly containing symlinks.

14 years agoWhile SPARC V9 allows tininess to be detected either before or after
marius [Sun, 11 Apr 2010 20:08:54 +0000 (20:08 +0000)]
While SPARC V9 allows tininess to be detected either before or after
rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and
UltraSPARC processors defines that in all cases  tininess is detected
before rounding therefore rounding up to the smallest normalized number
should set the underflow flag. This change is needed for using SoftFloat
on sparc64 for reference purposes.

PR: 144900
Submitted by: Peter Jeremy

14 years agoAdd myself to the ports committers graph
rene [Sun, 11 Apr 2010 19:58:01 +0000 (19:58 +0000)]
Add myself to the ports committers graph

Approved by: tabthorpe (mentor, implicit)

14 years agoTake a reference to make sure that the interface cannot go away during
bz [Sun, 11 Apr 2010 18:47:38 +0000 (18:47 +0000)]
Take a reference to make sure that the interface cannot go away during
if_clone_destroy() in case parallel threads try to.

PR: kern/116837
Submitted by: Mikolaj Golub (to.my.trociny gmail.com)
MFC after: 10 days

14 years agoIf a file is specifically both included and excluded, then:
kientzle [Sun, 11 Apr 2010 18:44:42 +0000 (18:44 +0000)]
If a file is specifically both included and excluded, then:
 * It is not extracted (because it is excluded)
 * If it's not present in the archive, then an error is
   reported (because the file was requested and not found)
 * If it is present in the archive, no error is reported.
Previously, this would always report an error because the
exclusion prevented the entry from matching the inclusion.

Also, tar is now more reluctant to report unmatched inclusions.
Previously, "tar x file1 'file*'" against an archive that contained a
single entry "file1" would match file1 and then report an error for
the second pattern because it wasn't matched.  It now considers both
inclusions to be matched and reports no error.

14 years agoCheck that the interface is on the list of cloned interfaces before trying
bz [Sun, 11 Apr 2010 18:41:31 +0000 (18:41 +0000)]
Check that the interface is on the list of cloned interfaces before trying
to remove it to avoid panics in case of two threads trying to remove it in
parallel.

PR: kern/116837
Submitted by: Takahiro Kurosawa (takahiro.kurosawa gmail.com) (orig version)
MFC after: 10 days

14 years agoDiff reduction against bsdtar 2.8.3
kientzle [Sun, 11 Apr 2010 16:28:10 +0000 (16:28 +0000)]
Diff reduction against bsdtar 2.8.3

14 years agoDiff reduction against bsdtar 2.8.3
kientzle [Sun, 11 Apr 2010 16:27:38 +0000 (16:27 +0000)]
Diff reduction against bsdtar 2.8.3

14 years agoInitialize the virtual memory-related resource limits in a single place.
alc [Sun, 11 Apr 2010 16:26:07 +0000 (16:26 +0000)]
Initialize the virtual memory-related resource limits in a single place.
Previously, one of these limits was initialized in two places to a
different value in each place.  Moreover, because an unsigned int was used
to represent the amount of pageable physical memory, some of these limits
were incorrectly initialized on 64-bit architectures.  (Currently, this
error is masked by login.conf's default settings.)

Make vm_thread_swapin() and vm_thread_swapout() static.

Submitted by: bde (an earlier version)
Reviewed by: kib

14 years ago- Introduce a blessed list for sxlocks that prevents the deadlkres to
attilio [Sun, 11 Apr 2010 16:06:09 +0000 (16:06 +0000)]
- Introduce a blessed list for sxlocks that prevents the deadlkres to
  panic on those ones. [0]
- Fix ticks counter wrap-up

Sponsored by: Sandvine Incorporated
[0] Reported by: jilles
[0] Tested by: jilles
MFC: 1 week

14 years agoPlug reference leaks in the link-layer code ("new-arp") that previously
bz [Sun, 11 Apr 2010 16:04:08 +0000 (16:04 +0000)]
Plug reference leaks in the link-layer code ("new-arp") that previously
prevented the link-layer entry from being freed.

In both in.c and in6.c (though that code path seems to be basically dead)
plug a reference leak in case of a pending callout being drained.

In if_ether.c consistently add a reference before resetting the callout
and in case we canceled a pending one remove the reference for that.
In the final case in arptimer, before freeing the expired entry, remove
the reference again and explicitly call callout_stop() to clear the active
flag.

In nd6.c:nd6_free() we are only ever called from the callout function and
thus need to remove the reference there as well before calling into
llentry_free().

In if_llatbl.c when freeing entire tables make sure that in case we cancel
a pending callout to remove the reference as well.

Reviewed by: qingli (earlier version)
MFC after: 10 days
Problem observed, patch tested by: simon on ipv6gw.f.o,
Christian Kratzer (ck cksoft.de),
Evgenii Davidov (dado korolev-net.ru)
PR: kern/144564
Configurations still affected: with options FLOWTABLE

14 years agoUpdate for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs.
marius [Sun, 11 Apr 2010 15:35:17 +0000 (15:35 +0000)]
Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs.

14 years agoFix grammar in comment.
ume [Sun, 11 Apr 2010 15:31:09 +0000 (15:31 +0000)]
Fix grammar in comment.

Submitted by: "b. f." <bf1783__at__googlemail.com>
MFC after: 3 days

14 years agoDeclare all functions as static.
bschmidt [Sun, 11 Apr 2010 13:51:20 +0000 (13:51 +0000)]
Declare all functions as static.

Approved by: rpaulo (mentor)
MFC after: 2 weeks

14 years agoHook ieee80211_media_change() to ieee80211_vap_attach().
bschmidt [Sun, 11 Apr 2010 13:48:52 +0000 (13:48 +0000)]
Hook ieee80211_media_change() to ieee80211_vap_attach().

Approved by: rpaulo (mentor)
MFC after: 2 weeks

14 years agoiwn5000_reset_sched() is not used; #ifdef it.
bschmidt [Sun, 11 Apr 2010 13:47:46 +0000 (13:47 +0000)]
iwn5000_reset_sched() is not used; #ifdef it.

Approved by: rpaulo (mentor)
MFC after: 2 weeks

14 years agoAdd some missing protoypes.
bschmidt [Sun, 11 Apr 2010 13:46:42 +0000 (13:46 +0000)]
Add some missing protoypes.

Approved by: rpaulo (mentor)
MFC after: 2 weeks

14 years agosh: Partially revert r206146, allowing double-quotes in arithmetic.
jilles [Sun, 11 Apr 2010 12:24:47 +0000 (12:24 +0000)]
sh: Partially revert r206146, allowing double-quotes in arithmetic.

These do pretty much nothing (except that parentheses are ignored), but
people seem to use them and allowing them does not hurt much.

Single-quotes seem not to be used and cause silently different behaviour
with ksh93 character constants.

14 years agoDon't forget to catch realloc() errors.
ed [Sun, 11 Apr 2010 12:07:03 +0000 (12:07 +0000)]
Don't forget to catch realloc() errors.

14 years agoAlphabetically sort the output of lastlogin(8).
ed [Sun, 11 Apr 2010 12:02:13 +0000 (12:02 +0000)]
Alphabetically sort the output of lastlogin(8).

According to the manpage, the entries have to be sorted by uid. This is
no longer possible, since our utmpx implementation is completely unaware
of user IDs. You can safely add entries for multiple users sharing the
same uid.

Make the output less random by sorting everything by name.

14 years agoIn if_detach_internal() we cannot hold the af_data lock over the
bz [Sun, 11 Apr 2010 11:51:44 +0000 (11:51 +0000)]
In if_detach_internal() we cannot hold the af_data lock over the
dom_ifdetach() calls as they might sleep for callout_drain().
Do as we do in if_attachdomain1() [r121470] and handle
if_afdata_initialized earlier and call dom_ifdetach() unlocked.

Discussed with: rwatson
MFC after: 10 days

14 years agoIn if_detach_internal() only try to do the detach run if if_attachdomain1()
bz [Sun, 11 Apr 2010 11:49:24 +0000 (11:49 +0000)]
In if_detach_internal() only try to do the detach run if if_attachdomain1()
has actually succeeded to initialize and attach.  There is a theoretical
possibility to drop out early in if_attachdomain1() leaving the array
uninitialized if we cannot get the lock.

Discussed with: rwatson
MFC after: 10 days

14 years agoFix -X.
kientzle [Sun, 11 Apr 2010 01:36:10 +0000 (01:36 +0000)]
Fix -X.

14 years agoConsistently specify O_BINARY when opening files.
kientzle [Sun, 11 Apr 2010 01:32:30 +0000 (01:32 +0000)]
Consistently specify O_BINARY when opening files.

14 years agoRemove an unnecessary include and conditionalize some code.
kientzle [Sun, 11 Apr 2010 01:31:50 +0000 (01:31 +0000)]
Remove an unnecessary include and conditionalize some code.

14 years agoCorrect the markup for the -s option,
kientzle [Sun, 11 Apr 2010 01:30:15 +0000 (01:30 +0000)]
Correct the markup for the -s option,
document the iso9660:rockridge and mtree:indent options

14 years agoTry to help with a virtualized dummynet after r206428.
bz [Sat, 10 Apr 2010 22:11:01 +0000 (22:11 +0000)]
Try to help with a virtualized dummynet after r206428.

This adds the explicit include (so far probably included through one of the
few "hidden" includes in other header files) for vnet.h and adds a cast
to unbreak LINT-VIMAGE.

14 years agoThe lock move in rxeof necessitated a couple
jfv [Sat, 10 Apr 2010 19:25:55 +0000 (19:25 +0000)]
The lock move in rxeof necessitated a couple
more places to do the locking, fixes a panic.

14 years agoHandle a case when non-canonical address is loaded into the fsbase or
kib [Sat, 10 Apr 2010 18:38:11 +0000 (18:38 +0000)]
Handle a case when non-canonical address is loaded into the fsbase or
gsbase MSR.

MFC after: 3 days

14 years agoAdd WPA-None support:
bschmidt [Sat, 10 Apr 2010 13:54:00 +0000 (13:54 +0000)]
Add WPA-None support:
* WPA-None requires ap_scan=2:
  The major difference between ap_scan=1 (default) and 2 is, that no
  IEEE80211_IOC_SCAN* ioctls/functions are called, though, there is a
  dependency on those. For example the call to wpa_driver_bsd_scan()
  sets the interface UP, this never happens, therefore the interface
  must be marked up in wpa_driver_bsd_associate(). IEEE80211_IOC_SSID
  also is not called, which means that the SSID has not been set prior
  to the IEEE80211_MLME_ASSOC call.
* WPA-None has no support for sequence number updates, it doesn't make
  sense to check for replay violations..
* I had some crashes right after the switch to RUN state, issue is
  that sc->sc_lastrs was not yet defined.

Approved by: rpaulo (mentor)
MFC after: 3 weeks

14 years agoHonor the CE bit even when the CWR bit is set.
rpaulo [Sat, 10 Apr 2010 12:47:06 +0000 (12:47 +0000)]
Honor the CE bit even when the CWR bit is set.

PR: 145600
Submitted by: Richard Scheffenegger <rs at netapp.com>
MFC after: 1 week

14 years agoAdd a comment to MAINTAINERS indicating that sbin/routed is in fact
bms [Sat, 10 Apr 2010 12:29:09 +0000 (12:29 +0000)]
Add a comment to MAINTAINERS indicating that sbin/routed is in fact
vendor branch code from before contrib existed in FreeBSD's history.

Changes should be run by Vernon Schryver at Rhyolite first.

14 years agoWhen embedding the scope ID in MLDv1 output, check if the scope of the address
bms [Sat, 10 Apr 2010 12:24:21 +0000 (12:24 +0000)]
When embedding the scope ID in MLDv1 output, check if the scope of the address
being embedded is in fact link-local, before attempting to embed it.

Note that this operation is a side-effect of trying to avoid recursion on
the IN6 scope lock.

PR: 144560
Submitted by: Petr Lampa
MFC after: 3 days

14 years agoAdd missing copyright shebang.
marius [Sat, 10 Apr 2010 12:10:11 +0000 (12:10 +0000)]
Add missing copyright shebang.

14 years agoFix a few issues related to the legacy 4.4 BSD multicast APIs.
bms [Sat, 10 Apr 2010 12:05:31 +0000 (12:05 +0000)]
Fix a few issues related to the legacy 4.4 BSD multicast APIs.

IPv4 addresses can and do change during normal operation. Testing by
pfSense developers exposed an issue where OpenOSPFD was using the IPv4
address to leave the OSPF link-scope multicast groups on a dynamic
OpenVPN tun interface, rather than using RFC 3678 with the interface
index, which won't be raced when the interface's addresses change.

In inp_join_group():
 If we are already a member of an ASM group, and IP_ADD_MEMBERSHIP or
 MCAST_JOIN_GROUP ioctls are re-issued, return EADDRINUSE as per the
 legacy 4.4BSD multicast API. This bends RFC 3678 slightly, but does
 not violate POLA for apps using the old API.
 It also stops us falling through to kicking IGMP state transactions
 in what is otherwise a no-op case.
 [This has already been dealt with in HEAD, but make it explicit before
  we MFC the change to 8.]

In inp_leave_group():
 Fix a bogus conditional.
 Move the ifp null check to ioctls MCAST_LEAVE* in the switch..case
 where it actually belongs.
 If an interface was specified, by primary IPv4 address, for ioctl
 IP_DROP_MEMBERSHIP or MCAST_LEAVE_GROUP (an ASM full leave operation),
 then and only then should we look up the ifp from the IPv4 address in
 mreqs.imr_interface.
 If not, we fall through to imo_match_group() as before, but only in
 the IP_DROP_MEMBERSHIP case.

With these changes, the legacy 4.4BSD multicast API idempotence should
be mostly preserved in the SSM enabled IPv4 stack.

Found by: ermal (with pfSense)
MFC after: 3 days