]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoRemove prtactive variable and related printf()s in the vop_inactive
kib [Fri, 19 Nov 2010 21:17:34 +0000 (21:17 +0000)]
Remove prtactive variable and related printf()s in the vop_inactive
and vop_reclaim() methods. They seems to be unused, and the reported
situation is normal for the forced unmount.

MFC after:   1 week
X-MFC-note:  keep prtactive symbol in vfs_subr.c

13 years agosh: Add another simple test for the wait builtin.
jilles [Fri, 19 Nov 2010 21:15:06 +0000 (21:15 +0000)]
sh: Add another simple test for the wait builtin.

13 years agoScan the list in reverse order for the shutdown handlers of loaded modules.
attilio [Fri, 19 Nov 2010 19:43:56 +0000 (19:43 +0000)]
Scan the list in reverse order for the shutdown handlers of loaded modules.
This way, when there is a dependency between two modules, the handler of the
latter probed runs first.

This is a similar approach as the modules are unloaded in the same
linkerfile.

Sponsored by: Sandvine Incorporated
Submitted by: Nima Misaghian <nmisaghian at sandvine dot com>
MFC after: 1 week

13 years agoSet the POSIX semaphore capability when the semaphore module is enabled.
jhb [Fri, 19 Nov 2010 17:57:50 +0000 (17:57 +0000)]
Set the POSIX semaphore capability when the semaphore module is enabled.
This is ignored in HEAD where semaphores are marked as always enabled in
<unistd.h>.

MFC after: 1 week

13 years agoSet various POSIX capability sysctls to the version of the API that is
jhb [Fri, 19 Nov 2010 17:56:16 +0000 (17:56 +0000)]
Set various POSIX capability sysctls to the version of the API that is
supported rather than 1.  They are supposed to return a suitable value
for sysconf(3).  While here, make the fsync sysctl match <unistd.h>.

MFC after: 1 week

13 years agoReduce the amount of detail printed by vm_page_free_toq() when it panics.
alc [Fri, 19 Nov 2010 17:49:08 +0000 (17:49 +0000)]
Reduce the amount of detail printed by vm_page_free_toq() when it panics.

Reviewed by: kib

13 years agoHandle malloc() failures more gracefully by error'ing out rather than
jhb [Fri, 19 Nov 2010 15:39:59 +0000 (15:39 +0000)]
Handle malloc() failures more gracefully by error'ing out rather than
segfaulting.

Submitted by: gcooper
MFC after: 1 week

13 years agoMake pmap_release consistent with pmap_pinit with respect to unpinning
cperciva [Fri, 19 Nov 2010 15:12:19 +0000 (15:12 +0000)]
Make pmap_release consistent with pmap_pinit with respect to unpinning
pages.  The pinning of NPGPTD pages is #if 0ed out in pmap_pinit (I'm
not quite sure why...) and this commit adds a corresponding #if 0 in
pmap_release to avoid unpinning those pages.

Some versions of Xen seem to silently ignore requests to unpin pages
which were never pinned in the first place, but some return an error
(causing FreeBSD to panic) prior to this commit.

13 years agospecialreg.h: add definitions for MPERF/APERF pair of MSRs
avg [Fri, 19 Nov 2010 15:07:36 +0000 (15:07 +0000)]
specialreg.h: add definitions for MPERF/APERF pair of MSRs

These MSRs can be used to determine actual (average) performance as
compared to a maximum defined performance.
Availability of these MSRs is indicated by bit0 in CPUID.6.ECX on both
Intel and AMD processors.

MFC after: 5 days

13 years agospecialreg.h: add AMD-specific "Hardware Configuration Register" MSR
avg [Fri, 19 Nov 2010 15:00:20 +0000 (15:00 +0000)]
specialreg.h: add AMD-specific "Hardware Configuration Register" MSR

It seems that this MSR has been available in a range of AMD processors
families for quite a while now.

Note1: not all AMD MSRs that are found in amd64 specialreg.h are also in
the i386 version.
Note2: perhaps some additional name component is needed to distinguish
AMD-specific MSRs.

MFC after: 5 days

13 years agospecialreg.h: add definition for AMD Core Performance Boost bit
avg [Fri, 19 Nov 2010 14:46:17 +0000 (14:46 +0000)]
specialreg.h: add definition for AMD Core Performance Boost bit

This bit indicates availability of the feature.

MFC after: 4 days

13 years agosh: Add printf builtin.
jilles [Fri, 19 Nov 2010 12:56:13 +0000 (12:56 +0000)]
sh: Add printf builtin.

This was removed in 2001 but I think it is appropriate to add it back:
* I do not want to encourage people to write fragile and non-portable echo
  commands by making printf much slower than echo.
* Recent versions of Autoconf use it a lot.
* Almost no software still wants to support systems that do not have
  printf(1) at all.
* In many other shells printf is already a builtin.

Side effect: printf is now always the builtin version (which behaves
identically to /usr/bin/printf) and cannot be overridden via PATH (except
via the undocumented %builtin mechanism).

Code size increases about 5K on i386. Embedded folks might want to replace
/usr/bin/printf with a hard link to /usr/bin/alias.

13 years agoFix fd leak
kevlo [Fri, 19 Nov 2010 10:18:58 +0000 (10:18 +0000)]
Fix fd leak

MFC after: 3 days

13 years agoClose file and directory descriptors
kevlo [Fri, 19 Nov 2010 10:15:29 +0000 (10:15 +0000)]
Close file and directory descriptors

MFC after: 3 days

13 years agoRemove obsoleted private symbol.
mm [Fri, 19 Nov 2010 09:59:55 +0000 (09:59 +0000)]
Remove obsoleted private symbol.

Approved by: delphij (mentor)
MFC after: together with 5.0.0 update

13 years agoOff by one page in vm_reserv_reclaim_contig(): Also reclaim reservations
mlaier [Fri, 19 Nov 2010 04:30:33 +0000 (04:30 +0000)]
Off by one page in vm_reserv_reclaim_contig(): Also reclaim reservations
with only a single free page if that satisfies the requested size.

MFC after: 3 days
Reviewed by: alc

13 years agoWhen doing a camcontrol rescan all or a camcontrol reset all, use the wildcard
rstone [Fri, 19 Nov 2010 03:47:10 +0000 (03:47 +0000)]
When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard
path id for enumerating the available busses.  Previously camcontrol was
implicitly passing 0 as the first path id, which meant that if bus 0 was not
present camcontrol would fail with EINVAL instead of rescanning/resetting any
busses that were present.

Approved by: emaste (mentor)
MFC after: 1 week

13 years agoWhen netstat was run with -i/-I and -w1 to produce running counters, the idrop
rstone [Thu, 18 Nov 2010 23:46:55 +0000 (23:46 +0000)]
When netstat was run with -i/-I and -w1 to produce running counters, the idrop
field printed an absolute value rather than the delta from the last value

Approved by: emaste (mentor)
MFC after: 1 week

13 years agoVarious small typos and grammar nits in comments.
jhb [Thu, 18 Nov 2010 22:17:20 +0000 (22:17 +0000)]
Various small typos and grammar nits in comments.

13 years agoMake pmap_release match pmap_pinit by invoking pmap_qremove(pmap->pm_pdpt)
cperciva [Thu, 18 Nov 2010 21:29:43 +0000 (21:29 +0000)]
Make pmap_release match pmap_pinit by invoking pmap_qremove(pmap->pm_pdpt)
to match pmap_pinit's pmap_qenter(pmap->pm_pdpt) call in the case of PAE.

13 years agovm_pageout_flush() might cache the pages that finished write to the
kib [Thu, 18 Nov 2010 21:09:02 +0000 (21:09 +0000)]
vm_pageout_flush() might cache the pages that finished write to the
backing storage. Such pages might be then reused, racing with the
assert in vm_object_page_collect_flush() that verified that dirty
pages from the run (most likely, pages with VM_PAGER_AGAIN status) are
write-protected still. In fact, the page indexes for the pages that
were removed from the object page list should be ignored by
vm_object_page_clean().

Return the length of successfully written run from vm_pageout_flush(),
that is, the count of pages between requested page and first page
after requested with status VM_PAGER_AGAIN. Supply the requested page
index in the array to vm_pageout_flush(). Use the returned run length
to forward the index of next page to clean in vm_object_page_clean().

Reported by: avg
Reviewed by: alc
MFC after: 1 week

13 years agoDon't KASSERT in pmap_release that
cperciva [Thu, 18 Nov 2010 21:02:40 +0000 (21:02 +0000)]
Don't KASSERT in pmap_release that
  xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME)
for i = NPGPTD, since pmap->pm_pdpt[i] is only initialized for
0 <= i < NPGPTD.

This fixes an inevitable panic with XEN && PAE && INVARIANTS when
pmap_release is called (e.g., when /sbin/init is launched).

13 years agoOnly increment object generation count when inserting the page into
kib [Thu, 18 Nov 2010 20:46:28 +0000 (20:46 +0000)]
Only increment object generation count when inserting the page into
object page list.  The only use of object generation count now is a
restart of the scan in vm_object_page_clean(), which makes sense to do
on the page addition. Page removals do not affect the dirtiness of the
object, as well as manipulations with the shadow chain.

Suggested and reviewed by: alc
MFC after:    1 week

13 years agoMake ATA_CAM wrapper to report SATA power management capabilities to CAM to
mav [Thu, 18 Nov 2010 19:28:45 +0000 (19:28 +0000)]
Make ATA_CAM wrapper to report SATA power management capabilities to CAM to
make it configure device to initiate transitions if controller configured
to accept them. This makes hint.ata.X.pm_level=1 mode working.

13 years agoFix paths for example files.
markm [Thu, 18 Nov 2010 18:22:58 +0000 (18:22 +0000)]
Fix paths for example files.

13 years agoAdd VIA VX900 to the list of supported chipsets.
mav [Thu, 18 Nov 2010 18:09:25 +0000 (18:09 +0000)]
Add VIA VX900 to the list of supported chipsets.

13 years agoFix a bug introduced with r215298; when atphy_reset() is called from
marius [Thu, 18 Nov 2010 17:58:59 +0000 (17:58 +0000)]
Fix a bug introduced with r215298; when atphy_reset() is called from
atphy_attach() the current media has not been set, yet, leading to a
NULL-dereference in atphy_setmedia().

Submitted by: jkim (initial version)

13 years agoDo not lint code beyond necessity (with apologies to Wiliam of Ockham).
markm [Thu, 18 Nov 2010 16:32:52 +0000 (16:32 +0000)]
Do not lint code beyond necessity (with apologies to Wiliam of Ockham).

Don't lint externally maintained CDDL code, or relint the 32-bit libraries
in amd64 mode.

13 years agoIf HBA doesn't report user-enabled SATA capabilies (like ATA_CAM wrapper) -
mav [Thu, 18 Nov 2010 13:38:33 +0000 (13:38 +0000)]
If HBA doesn't report user-enabled SATA capabilies (like ATA_CAM wrapper) -
handle all of them as disabled. This was original cause of the problem,
workarounded by r215453.

MFC after: 1 week

13 years agoEven if we are skipping SATA hard reset - set power management bits in
mav [Thu, 18 Nov 2010 11:58:17 +0000 (11:58 +0000)]
Even if we are skipping SATA hard reset - set power management bits in
SControl register. This should make things consistent and help to avoid
unexpected PHY events that I've noticed in some cases on VIA controllers.

13 years agoRecord that there is no devices if SATA reset found none.
mav [Thu, 18 Nov 2010 10:34:18 +0000 (10:34 +0000)]
Record that there is no devices if SATA reset found none.

13 years agoCorrect description of the return values of
hselasky [Thu, 18 Nov 2010 08:32:47 +0000 (08:32 +0000)]
Correct description of the return values of
the LibUSB v1.0 libusb_control_transfer() function.

PR: usb/151851
Submitted by: HIROSHI OOTA
Approved by: thompsa (mentor)

13 years agoSome VIA SATA controllers provide access to non-standard SATA registers via
mav [Thu, 18 Nov 2010 08:03:40 +0000 (08:03 +0000)]
Some VIA SATA controllers provide access to non-standard SATA registers via
PCI config space. Use them to implement hot-plug and link speed reporting.
Tested on ASRock PV530 board with VX900 chipset.

13 years agoAdd a resource_list_reserved() method that returns true if a resource
jhb [Wed, 17 Nov 2010 22:28:04 +0000 (22:28 +0000)]
Add a resource_list_reserved() method that returns true if a resource
list entry contains a reserved resource.

13 years agoRevert r215435. We need to figure out the exact value to be loaded.
andreast [Wed, 17 Nov 2010 20:37:16 +0000 (20:37 +0000)]
Revert r215435. We need to figure out the exact value to be loaded.

Approved by:  nwhitehorn (mentor)

13 years agoLet gcc and ld know where to find 32 bit libraries on amd64.
tijl [Wed, 17 Nov 2010 19:54:01 +0000 (19:54 +0000)]
Let gcc and ld know where to find 32 bit libraries on amd64.

Reviewed by: arch@
Approved by: kib (mentor)

13 years agoCheck the real-mode? OF property to find out whether we operate in real or
andreast [Wed, 17 Nov 2010 19:35:56 +0000 (19:35 +0000)]
Check the real-mode? OF property to find out whether we operate in real or
virtual mode. In virtual mode we have to do memory mapping. On PowerMacs it is
usually false while on pSeries we have found that it is true. The real-mode?
property is not available on sparc64.

Approved by:  nwhitehorn (mentor)

13 years agoMove the declaration of the eh struct (used only when debugging is enabled)
andreast [Wed, 17 Nov 2010 19:31:48 +0000 (19:31 +0000)]
Move the declaration of the eh struct (used only when debugging is enabled)
from ofwn_put into the debug section.

Approved by: nwhitehorn (mentor)

13 years agoMake sure the .bss is cleared at the beginning. The pSeries OF ELF loader does
andreast [Wed, 17 Nov 2010 19:28:48 +0000 (19:28 +0000)]
Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader does
not clear .bss automatically.

Approved by: nwhitehorn (mentor)

13 years agoLoad the full 16k stack space.
andreast [Wed, 17 Nov 2010 19:25:37 +0000 (19:25 +0000)]
Load the full 16k stack space.

Approved by: nwhitehorn (mentor)

13 years agoAdd new, per connection, statistics for TCP, including:
gnn [Wed, 17 Nov 2010 18:55:12 +0000 (18:55 +0000)]
Add new, per connection, statistics for TCP, including:
Retransmitted Packets
Zero Window Advertisements
Out of Order Receives

These statistics are available via the -T argument to
netstat(1).
MFC after: 2 weeks

13 years agoMCP55 is the only NVIDIA controller that supports VLAN tag
yongari [Wed, 17 Nov 2010 18:09:02 +0000 (18:09 +0000)]
MCP55 is the only NVIDIA controller that supports VLAN tag
insertion/stripping and it also supports TSO over VLAN. Implement
TSO over VLAN support for MCP55 controller.

While I'm here clean up SIOCSIFCAP ioctl handler. Since nfe(4)
sets ifp capabilities based on various hardware flags in device
attach, there is no need to check hardware flags again in
SIOCSIFCAP ioctl handler. Also fix a bug which toggled both TX and
RX checksum offloading even if user requested either TX or RX
checksum configuration change.

Tested by: Rob Farmer ( rfarmer <> predatorlabs dot net )

13 years agoAdd IDs for VIA VX900 chipset SATA controller.
mav [Wed, 17 Nov 2010 17:52:04 +0000 (17:52 +0000)]
Add IDs for VIA VX900 chipset SATA controller.
(Missed part of r215428)

13 years agoAdd IDs for VIA VX900 chipset SATA controller.
mav [Wed, 17 Nov 2010 16:17:35 +0000 (16:17 +0000)]
Add IDs for VIA VX900 chipset SATA controller.

MFC after: 1 week

13 years agoOnly save FPU context when not executing in the context of the crypto
kib [Wed, 17 Nov 2010 16:17:15 +0000 (16:17 +0000)]
Only save FPU context when not executing in the context of the crypto
thread.

Tested by: Mike Tancsa

13 years agoRemove unused autofs userland bits.
jhb [Wed, 17 Nov 2010 15:42:47 +0000 (15:42 +0000)]
Remove unused autofs userland bits.

Approved by: core

13 years agoChange "wait" banner to "qlen" to be more indicative of its purpose and to
ivoras [Wed, 17 Nov 2010 15:12:10 +0000 (15:12 +0000)]
Change "wait" banner to "qlen" to be more indicative of its purpose and to
be more inline with what gstat uses.

Reviewed by: gnn
Silence from: phk, keramida

13 years agoDo not initialize flag variables before needed.
bz [Wed, 17 Nov 2010 10:43:20 +0000 (10:43 +0000)]
Do not initialize flag variables before needed.
Consistently use the LLE_ prefix for lla_lookup() and the ND6_ prefix
for nd6_lookup() even though both are defined the same. Use the right
flag variable when checking each.

No real functional change.

MFC after: 4 days

13 years agoFix a panic on i386 for drivers using MmAllocateContiguousMemory()
bschmidt [Wed, 17 Nov 2010 09:32:39 +0000 (09:32 +0000)]
Fix a panic on i386 for drivers using MmAllocateContiguousMemory()
and MmAllocateContiguousMemorySpecifyCache().

Those two functions take 64-bit variable(s) for their arguments. On i386
that takes additional 32-bit variable per argument. This is required so
that windrv_wrap() can correctly wrap function that miniport driver calls
with stdcall convention. Similar explanation is provided in subr_ndis.c for
other functions.

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

13 years agoUse kmem_alloc_contig() to honour the cache_type variable.
bschmidt [Wed, 17 Nov 2010 09:28:17 +0000 (09:28 +0000)]
Use kmem_alloc_contig() to honour the cache_type variable.

Pointed out by: alc

13 years agoNo need to re-initialize the callout. We initially do it in in6_lltable_new()
bz [Wed, 17 Nov 2010 09:25:08 +0000 (09:25 +0000)]
No need to re-initialize the callout.  We initially do it in in6_lltable_new()
right after allocation.  Worse, we are losing the right flags here.

MFC after: 4 days

13 years agoRestore CR0 after MTRR initialization for correctness sakes. There will be
jkim [Tue, 16 Nov 2010 23:26:02 +0000 (23:26 +0000)]
Restore CR0 after MTRR initialization for correctness sakes.  There will be
no noticeable change because we enable caches before we enter here for both
BSP and AP cases.  Remove another pointless optimization for CR4.PGE bit
while I am here.

13 years agoInvalidate TLBs explicitly. r1.4 of sys/i386/i386/i686_mem.c removed this
jkim [Tue, 16 Nov 2010 22:44:58 +0000 (22:44 +0000)]
Invalidate TLBs explicitly.  r1.4 of sys/i386/i386/i686_mem.c removed this
code but probably it only worked by chance because modifying CR4.PGE bit
causes invlidation of entire TLBs.  Since these are very rare events, this
micro-optimization seems useless.

Reviewed by: jhb

13 years agoRe-enable generating links.
adrian [Tue, 16 Nov 2010 22:23:20 +0000 (22:23 +0000)]
Re-enable generating links.

13 years ago.. and then notice that the list of mk files is ordered, and update to suit.
adrian [Tue, 16 Nov 2010 22:22:16 +0000 (22:22 +0000)]
.. and then notice that the list of mk files is ordered, and update to suit.

13 years agoAdd in forgotten install rule.
adrian [Tue, 16 Nov 2010 22:21:14 +0000 (22:21 +0000)]
Add in forgotten install rule.

13 years agoAdd an SCTP socket option to retrieve the number of timeouts
tuexen [Tue, 16 Nov 2010 22:16:38 +0000 (22:16 +0000)]
Add an SCTP socket option to retrieve the number of timeouts
of an association.

MFC after: 3 days.

13 years agoFix an error in our results printing.
gnn [Tue, 16 Nov 2010 20:39:52 +0000 (20:39 +0000)]
Fix an error in our results printing.

13 years agozfs+sendfile: populate all requested pages, not just those already cached
avg [Tue, 16 Nov 2010 15:53:44 +0000 (15:53 +0000)]
zfs+sendfile: populate all requested pages, not just those already cached

kern_sendfile() uses vm_rdwr() to read-ahead blocks of data to populate
page cache.  When sendfile stumbles upon a page that is not populated
yet, it sends out all the mbufs that it collected so far.  This
resulted in very poor performance with ZFS when file data is not in the
page cache, because ZFS vop_read for UIO_NOCOPY case populated only
those pages that are already in cache, but not valid.  Which means that
most of the time it populated only the first requested page in the
described above scenario.

Reported by: Alexander Zagrebin <alexz@visp.ru>
Tested by: Alexander Zagrebin <alexz@visp.ru>,
Artemiev Igor <ai@kliksys.ru>
MFC after: 12 days

13 years agoNo need to include sys/systm.h twice.
cognet [Tue, 16 Nov 2010 14:08:21 +0000 (14:08 +0000)]
No need to include sys/systm.h twice.

13 years agohwpstate: use CPU_FOREACH when binding to all available processors
avg [Tue, 16 Nov 2010 12:43:45 +0000 (12:43 +0000)]
hwpstate: use CPU_FOREACH when binding to all available processors

Also, add a comment mentioning _PSD - on some systems it's enough to
put one logical CPU into a particular P-state to make other CPUs in
the same domain to enter that P-state.

Also, call sched_unbind() after the loop - sched_bind() automatically
rebinds from previous CPU to a new one, and the new arrangement of code
is safer against early loop exit.

Plus one minor style nit.

MFC after: 10 days

13 years agofix misspelling in a comment
avg [Tue, 16 Nov 2010 12:30:47 +0000 (12:30 +0000)]
fix misspelling in a comment

Reported by: Daniel Braniss <danny@cs.huji.ac.il>
MFC after: 3 days

13 years agoMake the CC framework more VIMAGE friendly by adding the machinery to allow
lstewart [Tue, 16 Nov 2010 09:34:31 +0000 (09:34 +0000)]
Make the CC framework more VIMAGE friendly by adding the machinery to allow
vnets to select their own default CC algorithm independent of each other and the
base system. If the base system or a vnet has set a default which gets unloaded,
we reset that netstack's default to NewReno.

Sponsored by: FreeBSD Foundation
Tested by: Mikolaj Golub <to.my.trociny at gmail com>
Reviewed by: bz (briefly)
MFC after: 3 months

13 years ago- Querying the default CC algo is more common than setting it and the function
lstewart [Tue, 16 Nov 2010 08:43:25 +0000 (08:43 +0000)]
- Querying the default CC algo is more common than setting it and the function
  is small, so there is no good reason not to declare the buffer at the top.

- Fix a whitespace nit.

Sponsored by: FreeBSD Foundation
MFC after: 11 weeks
X-MFC with: r215166

13 years agoMove protocol specific implementation detail out of the core CC framework.
lstewart [Tue, 16 Nov 2010 08:30:39 +0000 (08:30 +0000)]
Move protocol specific implementation detail out of the core CC framework.

Sponsored by: FreeBSD Foundation
Tested by: Mikolaj Golub <to.my.trociny at gmail com>
MFC after: 11 weeks
X-MFC with: r215166

13 years agoOn CC algorithm module unload, we walk the list of active TCP control blocks.
lstewart [Tue, 16 Nov 2010 07:57:56 +0000 (07:57 +0000)]
On CC algorithm module unload, we walk the list of active TCP control blocks.
Any found to be using the algorithm that is about to go away are switched back
to NewReno to avoid leaving dangling pointers which would trigger a panic. For
VIMAGE kernels, there is a list per vnet to walk, yet the implementation was
only examining one of the vnet lists.

Fix the implementation of the above feature for VIMAGE kernels by looping
through all active TCP control blocks across all vnets.

Sponsored by: FreeBSD Foundation
Tested by: Mikolaj Golub <to.my.trociny at gmail com>
Reviewed by: bz (briefly)
MFC after: 11 weeks

13 years agocc_init() should only be run once on system boot, but with VIMAGE kernels it
lstewart [Tue, 16 Nov 2010 07:09:05 +0000 (07:09 +0000)]
cc_init() should only be run once on system boot, but with VIMAGE kernels it
runs on boot and each time a vnet jail is created. Running cc_init() multiple
times results in a panic when attempting to initialise the cc_list lock again,
and so r215166 effectively broke the use of vnet jails.

Switch to using a SYSINIT to run cc_init() on boot. CC algorithm modules loaded
on boot register in the same SI_SUB_PROTO_IFATTACHDOMAIN category as is used in
this patch, so cc_init() is run at SI_ORDER_FIRST to ensure the framework is
initialised before module registration is attempted.

Sponsored by: FreeBSD Foundation
Reported and tested by: Mikolaj Golub <to.my.trociny at gmail com>
MFC after: 11 weeks
X-MFC with: r215166

13 years agoMake drm(4) build, if not work reliably, on PowerPC.
nwhitehorn [Tue, 16 Nov 2010 03:43:06 +0000 (03:43 +0000)]
Make drm(4) build, if not work reliably, on PowerPC.

13 years agoRestore the previous behaviour of substring match.
jkim [Mon, 15 Nov 2010 23:38:52 +0000 (23:38 +0000)]
Restore the previous behaviour of substring match.

13 years agoRemove no-op assignment.
des [Mon, 15 Nov 2010 23:14:14 +0000 (23:14 +0000)]
Remove no-op assignment.

Submitted by: clang via arundel@
MFC after: 2 weeks

13 years agoPlug memory leakage introduced in r204989.
jkim [Mon, 15 Nov 2010 23:13:25 +0000 (23:13 +0000)]
Plug memory leakage introduced in r204989.

Reported by: yongari

13 years agoGarbage-collect some code made obsolete by the TBEMD import.
nwhitehorn [Mon, 15 Nov 2010 22:12:13 +0000 (22:12 +0000)]
Garbage-collect some code made obsolete by the TBEMD import.

13 years agoTry including Makefile.${TARGET_ARCH} before Makefile.${TARGET_CPUARCH} if
nwhitehorn [Mon, 15 Nov 2010 22:11:18 +0000 (22:11 +0000)]
Try including Makefile.${TARGET_ARCH} before Makefile.${TARGET_CPUARCH} if
it exists in order to allow arch-specific overrides. This fixes the
binutils (and world) build on powerpc64 after recent TBEMD merges.

Reviewed by: imp

13 years agoPlug memory leakage introduced in r215327.
yongari [Mon, 15 Nov 2010 22:05:08 +0000 (22:05 +0000)]
Plug memory leakage introduced in r215327.

Submitted by: jkim

13 years agoConvert drivers somehow missed in r200874 to multipass probing.
marius [Mon, 15 Nov 2010 21:58:10 +0000 (21:58 +0000)]
Convert drivers somehow missed in r200874 to multipass probing.

13 years agoReturn from mii_attach() after calling bus_generic_attach(9) on the device_t
marius [Mon, 15 Nov 2010 21:41:45 +0000 (21:41 +0000)]
Return from mii_attach() after calling bus_generic_attach(9) on the device_t
of the MAC driver in order to attach miibus(4) on the first pass instead of
falling through to also calling it on the device_t of miibus(4). The latter
code flow was intended to attach the PHY drivers the same way regardless of
whether it's the first or a repeated pass, modulo the bus_generic_attach()
call in miibus_attach() which shouldn't be there. However, it turned out
that these variants cause miibus(4) to be attached twice under certain
conditions when using MAC drivers as modules.

Submitted by: yongari
MFC after: 3 days

13 years agoDon't display option 2 (to toggle ACPI on or off) on x86 machines if the
jhb [Mon, 15 Nov 2010 19:55:19 +0000 (19:55 +0000)]
Don't display option 2 (to toggle ACPI on or off) on x86 machines if the
BIOS does not support ACPI.  The other options in the menu retain their
existing numbers, option 2 is simply blanked out (and '2' is ignored).

MFC after: 1 month

13 years agoWe no longer need the OUTPUT_FORMAT line, so fix the build by removing it.
imp [Mon, 15 Nov 2010 19:05:09 +0000 (19:05 +0000)]
We no longer need the OUTPUT_FORMAT line, so fix the build by removing it.

13 years agoSome style(9) fixes.
netchild [Mon, 15 Nov 2010 13:07:10 +0000 (13:07 +0000)]
Some style(9) fixes.

Submitted by: arundel
MFC after: 1 week

13 years ago- print out the PID and program name of the program trying to use an
netchild [Mon, 15 Nov 2010 13:03:35 +0000 (13:03 +0000)]
- print out the PID and program name of the program trying to use an
  unsupported futex operation
- for those futex operations which are known to be not supported,
  print out which futex operation it is
- shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in
  some cases:
    FUTEX_CLOCK_REALTIME can be used to tell linux to use
    CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME
    however must only be set, if either FUTEX_WAIT_BITSET or
    FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case
    we can die with ENOSYS right at the beginning.

Submitted by: arundel
Reviewed by: rdivacky (earlier iteration of the patch)
MFC after: 1 week

13 years agoOnly unlock process if a thread is found.
davidxu [Mon, 15 Nov 2010 07:33:54 +0000 (07:33 +0000)]
Only unlock process if a thread is found.

13 years agoRemove unused struct rue_type
kevlo [Mon, 15 Nov 2010 06:04:25 +0000 (06:04 +0000)]
Remove unused struct rue_type

13 years agoRemove references to MAKEDEV(8)
dougb [Mon, 15 Nov 2010 05:25:51 +0000 (05:25 +0000)]
Remove references to MAKEDEV(8)

13 years agoMove timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't
pjd [Mon, 15 Nov 2010 03:07:42 +0000 (03:07 +0000)]
Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't
modify it.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

13 years ago1. Exit when we cannot create incoming connection.
pjd [Mon, 15 Nov 2010 03:05:33 +0000 (03:05 +0000)]
1. Exit when we cannot create incoming connection.
2. Improve logging to inform which connection can't be created.

Submitted by: [1] Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

13 years agoAdd the Sierra MC8700.
thompsa [Mon, 15 Nov 2010 02:27:01 +0000 (02:27 +0000)]
Add the Sierra MC8700.

13 years agoAdd flow control for all re(4) controllers. re(4) controllers do
yongari [Mon, 15 Nov 2010 00:06:19 +0000 (00:06 +0000)]
Add flow control for all re(4) controllers. re(4) controllers do
not provide any MAC configuration interface for resolved flow
control parameters. There is even no register that configures water
mark which will control generation of pause frames.
However enabling flow control surely enhanced performance a lot.

13 years agoAdd flow control for 3C905B and newer controllers. Note, these
yongari [Sun, 14 Nov 2010 23:53:13 +0000 (23:53 +0000)]
Add flow control for 3C905B and newer controllers. Note, these
controllers support RX pause only.

Reviewed by: marius

13 years agoP5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue
yongari [Sun, 14 Nov 2010 23:37:43 +0000 (23:37 +0000)]
P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue
such that nfe(4) does not work with MSI-X. When MSI-X support was
introduced, I remember MCP55 controller worked without problems so
the issue could be either PCI bridge or BIOS issue. But I also
noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still
not sure this is generic issue of MCP55 chipset. If this was PCI
bridge issue we would have added it to a system wide black-list
table but it's not clear to me at this moment whether it was caused
by either broken BIOS or silicon bug of MCP55 chipset.

To workaround the issue, maintain a MSI/MSI-X black-list table in
driver and lookup base board manufacturer and product name from the
table before attempting to use MSI-X. If driver find an matching
entry, nfe(4) will not use MSI/MSI-X and fall back on traditional
INTx mode. This approach should be the last resort since it relies
on smbios and if another instance of MSI/MSI-X breakage is reported
with different maker/product, we may have to get the PCI bridge
black-listed instead of adding an new entry.

PR: kern/152150

13 years agoAdd a special INIT product ID used by some models of the HUAWEI
dd [Sun, 14 Nov 2010 23:05:57 +0000 (23:05 +0000)]
Add a special INIT product ID used by some models of the HUAWEI
K3765 datacard. After ejecting this device, it reappears using
the normal K3765 ID. It does not switch automatically

Reviewed by: n_hibma
Obtained from: OpenBSD
MFC after: 2 weeks

13 years agoUse the correct variable for determining the verbosity level in mpt_lprtc().
marius [Sun, 14 Nov 2010 22:34:33 +0000 (22:34 +0000)]
Use the correct variable for determining the verbosity level in mpt_lprtc().
While at it, fix the whitespace of that macro.

PR: 149502
Submitted by: Andrew Boyer
MFC after: 1 week

13 years agoDon't use -fno-exceptions or -fno-rtti for .c files, when building
dim [Sun, 14 Nov 2010 22:17:12 +0000 (22:17 +0000)]
Don't use -fno-exceptions or -fno-rtti for .c files, when building
llvm/clang.

13 years agoAdd optional files controlled by WITH_GPIO knob
gonzo [Sun, 14 Nov 2010 22:14:36 +0000 (22:14 +0000)]
Add optional files controlled by WITH_GPIO knob

Submitted by: Alexander Best <arundel@freebsd.org>

13 years agoRegenerate src.conf manpage after adding WITHOUT_GPIO build knob
gonzo [Sun, 14 Nov 2010 22:08:56 +0000 (22:08 +0000)]
Regenerate src.conf manpage after adding WITHOUT_GPIO build knob

13 years agoDo not use __FreeBSD_version prefix for the special osrel version.
kib [Sun, 14 Nov 2010 21:59:11 +0000 (21:59 +0000)]
Do not use __FreeBSD_version prefix for the special osrel version.
The ports/Mk/bsd.port.mk uses sys/param.h to fetch osrel, and cannot
grok several constants with the prefix.

Reported and tested by:     swell.k gmail com
MFC after:   1 week

13 years agoProvide a mutex around the read/modify/write of the IXP425_GPIO_*
thompsa [Sun, 14 Nov 2010 20:41:22 +0000 (20:41 +0000)]
Provide a mutex around the read/modify/write of the IXP425_GPIO_*
registers. Giant was used in some places, but not all.

13 years agoInstead of unconditionally emitting .globl's for the __start_set_xxx and
dim [Sun, 14 Nov 2010 20:40:55 +0000 (20:40 +0000)]
Instead of unconditionally emitting .globl's for the __start_set_xxx and
__stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu
sections are actually defined.

13 years agoApply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout
dim [Sun, 14 Nov 2010 20:38:11 +0000 (20:38 +0000)]
Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout
the tree.

13 years agoAdd macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.
dim [Sun, 14 Nov 2010 20:23:02 +0000 (20:23 +0000)]
Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.

13 years agoSimilar to sys/net/vnet.h, define the linker set name for sys/sys/pcpu.h
dim [Sun, 14 Nov 2010 20:14:25 +0000 (20:14 +0000)]
Similar to sys/net/vnet.h, define the linker set name for sys/sys/pcpu.h
as a macro, and use it instead of literal strings.