]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoMake g_label(4) ignore provider size when looking for UFS labels.
Edward Tomasz Napierala [Thu, 24 May 2012 16:48:33 +0000 (16:48 +0000)]
Make g_label(4) ignore provider size when looking for UFS labels.
Without it, it fails to create labels for filesystems resized by
growfs(8).

PR: kern/165962
Submitted by: Olivier Cochard-Labbe <olivier at cochard dot me>

12 years agoMFp4 bz_ipv6_fast:
Bjoern A. Zeeb [Thu, 24 May 2012 16:30:13 +0000 (16:30 +0000)]
MFp4 bz_ipv6_fast:

  Introduce in6_getscope() to allow more effective checksum
  computations without the need to copy the address to clear the
  scope.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoHook up mkulzma to the build.
Josh Paetzel [Thu, 24 May 2012 16:11:51 +0000 (16:11 +0000)]
Hook up mkulzma to the build.

MFC after: 3 days

12 years agoMF amd64 r233097, r233122
Alan Cox [Thu, 24 May 2012 15:25:35 +0000 (15:25 +0000)]
MF amd64 r233097, r233122

With the changes over the past year to how accesses to the page's dirty
field are synchronized, there is no need for pmap_protect() to acquire
the page queues lock unless it is going to access the pv lists or
PMAP1/PADDR1.

Style fix to pmap_protect().

12 years agoMFprojects/zfsd:
Alexander Motin [Thu, 24 May 2012 14:07:44 +0000 (14:07 +0000)]
MFprojects/zfsd:
Revamp the CAM enclosure services driver.
This updated driver uses an in-kernel daemon to track state changes and
publishes physical path location information\for disk elements into the
CAM device database.

Sponsored by:   Spectra Logic Corporation
Sponsored by:   iXsystems, Inc.
Submitted by:   gibbs, will, mav

12 years agoReturn Supervisor SP and LR registers instead of User ones while in KDB thread.
Grzegorz Bernacki [Thu, 24 May 2012 12:41:57 +0000 (12:41 +0000)]
Return Supervisor SP and LR registers instead of User ones while in KDB thread.

Obtained from: Semihalf

12 years agoARMs don't have motherboards.
Grzegorz Bernacki [Thu, 24 May 2012 12:38:24 +0000 (12:38 +0000)]
ARMs don't have motherboards.

Obtained from: Semihalf

12 years agoAdd sn_send_failed_event to sctp_notification.
Michael Tuexen [Thu, 24 May 2012 11:52:57 +0000 (11:52 +0000)]
Add sn_send_failed_event to sctp_notification.

MFC after: 3 days

12 years agoMFprojects/zfsd:
Alexander Motin [Thu, 24 May 2012 11:24:44 +0000 (11:24 +0000)]
MFprojects/zfsd:
Hide warning behind bootverbose. Average user has nothing to do about it.

12 years agoMFprojects/zfsd:
Alexander Motin [Thu, 24 May 2012 11:20:51 +0000 (11:20 +0000)]
MFprojects/zfsd:
Generalize and unify ses device description.

12 years agoMFprojects/zfsd:
Alexander Motin [Thu, 24 May 2012 11:07:39 +0000 (11:07 +0000)]
MFprojects/zfsd:
 - Add low-level support for SATA Enclosure Management Bridge (SEMB)
devices -- SATA equivalents of the SCSI SES/SAF-TE devices.
 - Add some utility functions for SCSI SAF-TE devices access.

Sponsored by: iXsystems, Inc.

12 years agoAdd kern_fhstat(), adjust sys_fhstat() to use it.
Gleb Kurtsou [Thu, 24 May 2012 08:00:26 +0000 (08:00 +0000)]
Add kern_fhstat(), adjust sys_fhstat() to use it.

Extend kern_getdirentries() to accept uio segflag and optionally return
buffer residue.

Sponsored by: Google Summer of Code 2011

12 years agostyle.Makefile(5)
David E. O'Brien [Thu, 24 May 2012 04:10:34 +0000 (04:10 +0000)]
style.Makefile(5)

12 years agoFixes to man8 groff mandoc style, usage mistakes, or typos.
Warren Block [Thu, 24 May 2012 02:24:03 +0000 (02:24 +0000)]
Fixes to man8 groff mandoc style, usage mistakes, or typos.

PR: 168016
Submitted by: Nobuyuki Koganemaru
Approved by: gjb
MFC after: 3 days

12 years agoAllow the socket list to be limited to a specific jail id.
Andrew Thompson [Thu, 24 May 2012 01:31:10 +0000 (01:31 +0000)]
Allow the socket list to be limited to a specific jail id.

No objections: current@

12 years agoRevert r235797. GCC's mis-assumptions has led to incorrect usage of
David E. O'Brien [Wed, 23 May 2012 23:43:55 +0000 (23:43 +0000)]
Revert r235797.  GCC's mis-assumptions has led to incorrect usage of
"%q[diouxX]" within FreeBSD sources.

12 years agoUpgrade our copy of llvm/clang to 3.1 release. Release notes can be
Dimitry Andric [Wed, 23 May 2012 21:48:49 +0000 (21:48 +0000)]
Upgrade our copy of llvm/clang to 3.1 release.  Release notes can be
found at: http://llvm.org/releases/3.1/docs/ReleaseNotes.html

MFC after: 3 days

12 years agoVendor import of clang release_31 r156863 (the actual 3.1 release):
Dimitry Andric [Wed, 23 May 2012 21:39:13 +0000 (21:39 +0000)]
Vendor import of clang release_31 r156863 (the actual 3.1 release):
http://llvm.org/svn/llvm-project/cfe/branches/release_31@156863

12 years agoVendor import of llvm release_31 r156863 (the actual 3.1 release):
Dimitry Andric [Wed, 23 May 2012 21:37:39 +0000 (21:37 +0000)]
Vendor import of llvm release_31 r156863 (the actual 3.1 release):
http://llvm.org/svn/llvm-project/llvm/branches/release_31@156863

12 years agoEnable drm2 modules build.
Konstantin Belousov [Wed, 23 May 2012 21:07:01 +0000 (21:07 +0000)]
Enable drm2 modules build.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

12 years ago - Correct signedness for casts;
Xin LI [Wed, 23 May 2012 20:51:21 +0000 (20:51 +0000)]
 - Correct signedness for casts;
 - Wrap long line while I'm there.

Noticed by: pjd, avg

12 years agomdoc: Only use macros inside a reference block.
Joel Dahl [Wed, 23 May 2012 20:29:16 +0000 (20:29 +0000)]
mdoc: Only use macros inside a reference block.

12 years agomdoc: fix .Bl -offset.
Joel Dahl [Wed, 23 May 2012 20:22:09 +0000 (20:22 +0000)]
mdoc: fix .Bl -offset.

12 years agoshutdown: Remove unnecessary 2-second delay.
Jilles Tjoelker [Wed, 23 May 2012 19:25:46 +0000 (19:25 +0000)]
shutdown: Remove unnecessary 2-second delay.

12 years agoTweak condition for disabling allocation from per-CPU buckets in
Maksim Yevmenkin [Wed, 23 May 2012 18:56:29 +0000 (18:56 +0000)]
Tweak condition for disabling allocation from per-CPU buckets in
low memory situation. I've observed a situation where per-CPU
allocations were disabled while there were enough free cached pages.
Basically, cnt.v_free_count was sitting stable at a value lower
than cnt.v_free_min and that caused massive performance drop.

Reviewed by: alc
MFC after: 1 week

12 years agoFix error reported by mandoc.
Joel Dahl [Wed, 23 May 2012 18:41:45 +0000 (18:41 +0000)]
Fix error reported by mandoc.

12 years agoUse %ju to match uintmax_t usage
Xin LI [Wed, 23 May 2012 18:17:02 +0000 (18:17 +0000)]
Use %ju to match uintmax_t usage

12 years agoAdd 'cow' keyword to show per-process cow count.
Konstantin Belousov [Wed, 23 May 2012 18:11:36 +0000 (18:11 +0000)]
Add 'cow' keyword to show per-process cow count.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoCalculate the count of per-process cow faults. Export the count to
Konstantin Belousov [Wed, 23 May 2012 18:10:54 +0000 (18:10 +0000)]
Calculate the count of per-process cow faults.  Export the count to
userspace using the obscure spare int field in struct kinfo_proc.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoUse %j and cast off_t to intmax_t for now to fix build.
Xin LI [Wed, 23 May 2012 17:49:59 +0000 (17:49 +0000)]
Use %j and cast off_t to intmax_t for now to fix build.

Noticed by: bz

12 years agoAdd two new locale-specific man pages:
Isabell Long [Wed, 23 May 2012 17:13:30 +0000 (17:13 +0000)]
Add two new locale-specific man pages:
- libc/stdio/scanf_l.3
- libc/stdio/printf_l.3

Reviewed by: theraven
Approved by: gabor (mentor)
MFC after: 5 days

12 years agoThe drm2 modules makefiles commit.
Konstantin Belousov [Wed, 23 May 2012 17:10:22 +0000 (17:10 +0000)]
The drm2 modules makefiles commit.
Still not attached to the build.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

12 years agoAdd 'drmn' device as another drm child, to allow drm2 drivers to live
Konstantin Belousov [Wed, 23 May 2012 17:09:14 +0000 (17:09 +0000)]
Add 'drmn' device as another drm child, to allow drm2 drivers to live
in parallel with drm1.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

12 years agoRestore Processor object path for verbose boot message.
Jung-uk Kim [Wed, 23 May 2012 17:03:09 +0000 (17:03 +0000)]
Restore Processor object path for verbose boot message.

12 years agoMention the upper hard limit for -n option. Patch slightly modified
Warren Block [Wed, 23 May 2012 16:19:19 +0000 (16:19 +0000)]
Mention the upper hard limit for -n option.  Patch slightly modified
from PR version.

PR: 168255
Submitted by: Andy Kosela
Approved by: gjb
MFC after: 3 days

12 years agoNote that the new jail(8) will be appearing in 9.1.
Jamie Gritton [Wed, 23 May 2012 15:30:13 +0000 (15:30 +0000)]
Note that the new jail(8) will be appearing in 9.1.

12 years agomdoc: move two sentences from synopsis to description (where they really
Joel Dahl [Wed, 23 May 2012 15:06:13 +0000 (15:06 +0000)]
mdoc: move two sentences from synopsis to description (where they really
belong). With this change, mandoc now formats these manpages properly.

12 years agoRework the previous change to honor MADT processor IDs when probing
John Baldwin [Wed, 23 May 2012 13:45:52 +0000 (13:45 +0000)]
Rework the previous change to honor MADT processor IDs when probing
processor objects.  Instead of forcing the new-bus CPU objects to use
a unit number equal to pc_cpuid, adjust acpi_pcpu_get_id() to honor the
MADT IDs by default.  As with the previous change, setting
debug.acpi.cpu_unordered to 1 in the loader will revert to the old
behavior.

Tested by: jimharris
MFC after: 1 month

12 years agoOnly check to see if a memory resource is a PCI ROM BAR when activating
John Baldwin [Wed, 23 May 2012 13:41:12 +0000 (13:41 +0000)]
Only check to see if a memory resource is a PCI ROM BAR when activating
and deactivating PCI resources.  Previously, if a device had more than
48 MSI interrupts, then activating message 48 (which has a rid == PCIR_BIOS)
would incorrectly try to enable the PCI ROM BAR.

Tested by: Olivier Cinquin  ocinquin uci edu
MFC after: 3 days

12 years agoSoft PMC support for ARM.
Fabien Thomas [Wed, 23 May 2012 13:23:40 +0000 (13:23 +0000)]
Soft PMC support for ARM.
Callgraph is not captured, only current location.

Sample system wide profiling: "pmcstat -Sclock.hard -T"

12 years agovm_pager_object_lookup: small performance optimization
Andriy Gapon [Wed, 23 May 2012 12:51:49 +0000 (12:51 +0000)]
vm_pager_object_lookup: small performance optimization

do not needlessly lock an object if its handle doesn't match

Reviewed by: kib, alc
MFC after: 1 week

12 years agoUse consistent text at the begining of the files.
Michael Tuexen [Wed, 23 May 2012 11:26:28 +0000 (11:26 +0000)]
Use consistent text at the begining of the files.

MFC after: 3 days

12 years agoUpdate copyright date.
Michael Tuexen [Wed, 23 May 2012 10:35:40 +0000 (10:35 +0000)]
Update copyright date.

MFC after: 3 days

12 years agoFix build:
Xin LI [Wed, 23 May 2012 06:49:50 +0000 (06:49 +0000)]
Fix build:

 - Use %ll instead of %q for explicit long long casts;
 - Use %j instead of %q in XFS and cast to intmax_t.

Tested with: make universe

12 years agoDon't force max payload size to 128. Root complex and Endpoint will
Pyun YongHyeon [Wed, 23 May 2012 03:35:08 +0000 (03:35 +0000)]
Don't force max payload size to 128. Root complex and Endpoint will
negotiate with each other on the TLP payload size so blindly
forcing the size to 128 can cause a completion error which in turn
will stop device.

Reported by: Geans Pin < geanspin <> broadcom dot com >
MFC after: 5 days

12 years agoMake IPMI work in the bce driver even when the interface is
Pyun YongHyeon [Wed, 23 May 2012 01:20:25 +0000 (01:20 +0000)]
Make IPMI work in the bce driver even when the interface is
configured down.  Formerly, IPMI communication was lost whenever the
interface was not up.  The reason was that the BCE_EMAC_MODE
register was not configured with the correct media settings.  There
are two parts to the fix.

First, resetting the chip in bce_reset() causes the BCE_EMAC_MODE
register to be initialized to a default value that does not
necessarily correspond to the actual media settings.  The fix
implemented here is a bit of a hack.  Ideally, at the end of
bce_reset() we would poll the PHY to determine the negotiated media,
and then we would set the BCE_EMAC_MODE register accordingly.  That
is difficult, since the PHY is abstracted behind the MII layer and is
not supposed to be queried directly from the MAC driver.  Instead,
we read the BCE_EMAC_MODE register at the beginning of bce_reset()
and then restore its media bits to their original values before
returning.  If IPMI is up and running, then the link is already
established and the BCE_EMAC_MODE register is already set appropriately
when bce_reset() is called.  If IPMI is not running, no harm is
done by preserving the BCE_EMAC_MODE settings.  The driver will set
the register properly once the interface is configured up and link
is established.

Second, bce_miibus_statchg() is sometimes called when the link is
down.  In that case, the reported media settings are invalid.
Formerly, the driver used them anyway to setup the BCE_EMAC_MODE
register.  We now avoid changing any MAC registers unless link is
active and the reported media settings are valid.

Submitted by: jdp
Tested by: jdp
MFC after: 5 days

12 years agoVendor import of clang release_31 final r156748:
Dimitry Andric [Tue, 22 May 2012 21:36:38 +0000 (21:36 +0000)]
Vendor import of clang release_31 final r156748:
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_31/final@156748

12 years agoVendor import of llvm release_31 final r156748:
Dimitry Andric [Tue, 22 May 2012 21:30:23 +0000 (21:30 +0000)]
Vendor import of llvm release_31 final r156748:
http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_31/final@156748

12 years agoRe-up the TX ath_buf limit from 128 to 512.
Adrian Chadd [Tue, 22 May 2012 19:50:21 +0000 (19:50 +0000)]
Re-up the TX ath_buf limit from 128 to 512.

I'll have to leave this high for now, until I've done some significant
surgery with how ath_bufs (and descriptors) are handled.

This should significantly cut down on the opportunities for a full TX
queue hanging traffic.  I'll continue making things work though; I'm
mostly doing this for users. :)

12 years agoFix use-after-free in kern_jail_set() triggered e.g. by attempts
Edward Tomasz Napierala [Tue, 22 May 2012 19:43:20 +0000 (19:43 +0000)]
Fix use-after-free in kern_jail_set() triggered e.g. by attempts
to clear "persist" flag from empty persistent jail, like this:

jail -c persist=1
jail -n 1 -m persist=0

Submitted by: Mateusz Guzik <mjguzik at gmail dot com>
MFC after: 2 weeks

12 years agocommandline -> command line
Xin LI [Tue, 22 May 2012 19:40:54 +0000 (19:40 +0000)]
commandline -> command line

MFC after: 1 week

12 years agoFix some corner cases in the ieee80211_send_bar() handling.
Adrian Chadd [Tue, 22 May 2012 19:37:12 +0000 (19:37 +0000)]
Fix some corner cases in the ieee80211_send_bar() handling.

* If the first call succeeded but failed to transmit, a timer would
  reschedule it via bar_timeout().  Unfortunately bar_timeout() didn't
  check the return value from the ieee80211_send_bar() reattempt and
  if that failed (eg the driver ic_raw_xmit() failed), it would never
  re-arm the timer.

* If BARPEND is cleared (which ieee80211_send_bar() will do if it can't
  TX), then re-arming the timer isn't enough - once bar_timeout() occurs,
  it'll see BARPEND is 0 and not run through the rest of the routine.
  So when rearming the timer, also set that flag.

* If the TX wasn't occuring, bar_tx_complete() wouldn't be called and the
  driver callback wouldn't be called either.  So the driver had no idea
  that the BAR TX attempt had failed.  In the ath(4) case, TX would stay
  paused.

  (There's no callback to indicate that BAR TX had failed or not;
  only a "BAR TX was attempted".  That's a separate, later problem.)

  So call the driver callback (ic_bar_response()) before the ADDBA session
  is torn down, so it has a chance of being notified that things didn't
  quite go to plan.

I've verified that yes, this does suspend traffic for ath(4), retry BAR
TX even if the driver is failing ic_raw_xmit(), and then eventually giving
up and sending a DELBA.  I'll address the "out of ath_buf" issue in ath(4)
in a subsequent commit - this commit just fixes the edge case where any
driver is (way) out of internal buffers/descriptors and fails frame TX.

PR: kern/168170
Reviewed by: bschmidt
MFC after: 1 month

12 years agoThe fix in r235291 re-broke the "allow.nomount" case. Re-fix it
Jamie Gritton [Tue, 22 May 2012 18:30:32 +0000 (18:30 +0000)]
The fix in r235291 re-broke the "allow.nomount" case.  Re-fix it
by testing for the right parameter name.

12 years agoDo not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms.
David E. O'Brien [Tue, 22 May 2012 18:18:06 +0000 (18:18 +0000)]
Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms.

12 years agoDon't leak locks in prison_racct_modify().
Edward Tomasz Napierala [Tue, 22 May 2012 17:30:02 +0000 (17:30 +0000)]
Don't leak locks in prison_racct_modify().

Submitted by: Mateusz Guzik <mjguzik at gmail dot com>
MFC after: 2 weeks

12 years agoFix world after byacc import:
Baptiste Daroussin [Tue, 22 May 2012 16:33:10 +0000 (16:33 +0000)]
Fix world after byacc import:
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
  'yyparse'

Approved by: des (mentor)

12 years agoBump __FreeBSD_version for the byacc import, and update _bootstrap_tools.
Dag-Erling Smørgrav [Tue, 22 May 2012 15:59:07 +0000 (15:59 +0000)]
Bump __FreeBSD_version for the byacc import, and update _bootstrap_tools.

12 years agoFix panic with RACCT that could occur in low memory (or out of swap)
Edward Tomasz Napierala [Tue, 22 May 2012 15:58:27 +0000 (15:58 +0000)]
Fix panic with RACCT that could occur in low memory (or out of swap)
situations, due to fork1() calling racct_proc_exit() without calling
racct_proc_fork() first.

Submitted by: Mateusz Guzik <mjguzik at gmail dot com> (earlier version)
Reviewed by: Mateusz Guzik <mjguzik at gmail dot com>

12 years agoAdd the code for new Intel GPU driver, which supports GEM, KMS and
Konstantin Belousov [Tue, 22 May 2012 11:07:44 +0000 (11:07 +0000)]
Add the code for new Intel GPU driver, which supports GEM, KMS and
works with new generations of GPUs (IronLake, SandyBridge and
supposedly IvyBridge).

The driver is not connected to the build yet.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

12 years agoA rewrite of the i810 bits of the agp(4) driver. New driver supports
Konstantin Belousov [Tue, 22 May 2012 10:59:26 +0000 (10:59 +0000)]
A rewrite of the i810 bits of the agp(4) driver.  New driver supports
operations required by GEMified i915.ko. It also attaches to SandyBridge
and IvyBridge CPU northbridges now.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

12 years agoFix enforcement of file size limit with O_APPEND on ZFS.
Edward Tomasz Napierala [Tue, 22 May 2012 10:54:42 +0000 (10:54 +0000)]
Fix enforcement of file size limit with O_APPEND on ZFS.

vn_rlimit_fsize takes uio->uio_offset and uio->uio_resid into account
when determining whether given write would exceed RLIMIT_FSIZE.

When APPEND flag is specified, ZFS updates uio->uio_offset to point to the
end of file.

But this happens after a call to vn_rlimit_fsize, so vn_rlimit_fsize check
can be rendered ineffective by thread that opens some file with O_APPEND
and lseeks below RLIMIT_FSIZE before calling write.

Submitted by: Mateusz Guzik <mjguzik at gmail dot com>
MFC after: 2 weeks

12 years agoFix a compilation error with some compilers: __attribute__
Hartmut Brandt [Tue, 22 May 2012 09:59:49 +0000 (09:59 +0000)]
Fix a compilation error with some compilers: __attribute__
requires two parenthesis for its argument, but instead of using
__attribute__ directly, use the appropriate __nonnull macro
from cdefs.h.

12 years agoDivide nand flash for DB6281 into two partitions. One for u-boot
Grzegorz Bernacki [Tue, 22 May 2012 09:27:57 +0000 (09:27 +0000)]
Divide nand flash for DB6281 into two partitions. One for u-boot
and second one for general use.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks

12 years agoAdd a new geom class which allows to divide NAND Flash chip
Grzegorz Bernacki [Tue, 22 May 2012 08:33:14 +0000 (08:33 +0000)]
Add a new geom class which allows to divide NAND Flash chip
into partitions.

Partitions are created based on data in dts file which are
extracted and interpreted by slicer.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks

12 years agoMake dumptid non-static. It is used by libkvm to detect whether
Hartmut Brandt [Tue, 22 May 2012 07:23:41 +0000 (07:23 +0000)]
Make dumptid non-static. It is used by libkvm to detect whether
this is a VNET-kernel or not. gcc used to put the static symbol into
the symbol table, clang does not. This fixes the 'netstat: no namelist'
error seen on clang+VNET systems.

12 years agoFix booting on ARM.
Andrew Turner [Tue, 22 May 2012 07:04:23 +0000 (07:04 +0000)]
Fix booting on ARM.

In PHYS_TO_VM_PAGE() when VM_PHYSSEG_DENSE is set the check if we are past
the end of vm_page_array was incorrect causing it to return NULL. This
value is then used in vm_phys_add_page causing a data abort.

Reviewed by: alc, kib, imp
Tested by: stas

12 years agoFix make depend.
Ulrich Spörlein [Tue, 22 May 2012 06:33:08 +0000 (06:33 +0000)]
Fix make depend.

12 years agoFix up some corner cases with aggregation handling.
Adrian Chadd [Tue, 22 May 2012 06:31:03 +0000 (06:31 +0000)]
Fix up some corner cases with aggregation handling.

I've come across a weird scenario in net80211 where two TX streams will
happily attempt to setup an aggregation session together.
If we're very lucky, it happens concurrently on separate CPUs and the
total lack of locking in the net80211 aggregation code causes this stuff
to race. Badly.

So >1 call would occur to the ath(4) addba start, but only one call would
complete to addba complete or timeout.  The TID would thus stay paused.

The real fix is to implement some proper per-node (or maybe per-TID)
locking in net80211, which then could be leveraged by the ath(4) TX
aggregation code.

Whilst I'm at it, shuffle around the debugging messages a bit.
I like to keep people on their toes.

12 years agoCorrect use_screen() and use_window() prototypes in curs_threads(3x).
Dimitry Andric [Tue, 22 May 2012 06:28:53 +0000 (06:28 +0000)]
Correct use_screen() and use_window() prototypes in curs_threads(3x).

Submitted by: Yanhui Shen <shen.elf@gmail.com>
MFC after: 3 days

12 years agoIgnore the power button press event for resuming rather than starting
Mitsuru IWASAKI [Tue, 22 May 2012 05:18:30 +0000 (05:18 +0000)]
Ignore the power button press event for resuming rather than starting
shutdown.

MFC after: 2 days

12 years agoRemove redundant declaration of yyparse
Kevin Lo [Tue, 22 May 2012 03:01:54 +0000 (03:01 +0000)]
Remove redundant declaration of yyparse

Reported by: tinderbox

12 years agoAdd missing header needed by free()
Kevin Lo [Tue, 22 May 2012 01:28:32 +0000 (01:28 +0000)]
Add missing header needed by free()

Reported by: tinderbox

12 years agoWait until completion context unwinds before retrying CCBs that have been
Jim Harris [Mon, 21 May 2012 22:54:33 +0000 (22:54 +0000)]
Wait until completion context unwinds before retrying CCBs that have been
queued internally.  This works around issue in the isci HAL where it cannot
accept new I/O to a device after a resetting->ready state transition until
the completion context has unwound.

This issue was found by submitting non-tagged CCBs through pass(4) interface
to a SATA disk with an extremely small timeout value (5ms).  This would trigger
internal resets with I/O in the isci(4) internal queues.

The small timeout value had not been intentional (and original reporter has
since changed his test to use 5sec instead), but it did uncover this corner
case that would result in a hung disk.

Sponsored by: Intel
Reported and tested by: Ravi Pokala <rpokala at panasas dot com>
Reviewed by: scottl (earlier version)
MFC after: 1 week

12 years agoFor now, add a quick debugging patch to log when the hw TXQ != the TID/AC.
Adrian Chadd [Mon, 21 May 2012 22:43:38 +0000 (22:43 +0000)]
For now, add a quick debugging patch to log when the hw TXQ != the TID/AC.

12 years agoRename ath_tx_cleanup() -> ath_tx_tid_cleanup() in order to not clash
Adrian Chadd [Mon, 21 May 2012 22:39:13 +0000 (22:39 +0000)]
Rename ath_tx_cleanup() -> ath_tx_tid_cleanup() in order to not clash
with a symbol in if_ath.c

12 years agoMake most BPF ioctls() SMP-safe.
Alexander V. Chernikov [Mon, 21 May 2012 22:21:00 +0000 (22:21 +0000)]
Make most BPF ioctls() SMP-safe.

Approved by:      kib(mentor)
MFC in:            4 weeks

12 years agoCall bpf_jitter() before acquiring BPF global lock due to malloc() being used inside...
Alexander V. Chernikov [Mon, 21 May 2012 22:19:19 +0000 (22:19 +0000)]
Call bpf_jitter() before acquiring BPF global lock due to malloc() being used inside bpf_jitter.

Eliminate bpf_buffer_alloc() and allocate BPF buffers on descriptor creation and BIOCSBLEN ioctl.
This permits us not to allocate buffers inside bpf_attachd() which is protected by global lock.

Approved by:      kib(mentor)
MFC in:            4 weeks

12 years agoFix old panic when BPF consumer attaches to destroying interface.
Alexander V. Chernikov [Mon, 21 May 2012 22:17:29 +0000 (22:17 +0000)]
Fix old panic when BPF consumer attaches to destroying interface.
'flags' field is added to the end of bpf_if structure. Currently the only
flag is BPFIF_FLAG_DYING which is set on bpf detach and checked by bpf_attachd()
Problem can be easily triggered on SMP stable/[89] by the following command (sort of):
'while true; do ifconfig vlan222 create vlan 222 vlandev em0 up ; tcpdump -pi vlan222 & ; ifconfig vlan222 destroy ; done'

Fix possible use-after-free when BPF detaches itself from interface, freeing bpf_bif memory,
while interface is still UP and there can be routes via this interface.
Freeing is now delayed till ifnet_departure_event is received via eventhandler(9) api.

Convert bpfd rwlock back to mutex due lack of performance gain (currently checking if packet
matches filter is done without holding bpfd lock and we have to acquire write lock if packet matches)

Approved by:      kib(mentor)
MFC in:            4 weeks

12 years agoFix panic on attaching to non-existent interface (introduced by r233937, pointed...
Alexander V. Chernikov [Mon, 21 May 2012 22:13:48 +0000 (22:13 +0000)]
Fix panic on attaching to non-existent interface (introduced by r233937, pointed by hrs@)
Fix panic on tcpdump being attached to interface being removed (introduced by r233937, pointed by hrs@ and adrian@)
Protect most of bpf_setf() by BPF global lock

Add several forgotten assertions (thanks to adrian@)

Document current locking model inside bpf.c
Document EVENTHANDLER(9) usage inside BPF.

Approved by:       kib(mentor)
Tested by:         gnn
MFC in:            4 weeks

12 years agoAdd checks for memory allocation failures in appropriate places, and
Guy Helmer [Mon, 21 May 2012 21:10:00 +0000 (21:10 +0000)]
Add checks for memory allocation failures in appropriate places, and
avoid creating bad entries in the grp list as a result of memory allocation
failures while building new entries.

PR: bin/83340
Reviewed by: delphij (prior version of patch)

12 years agoApply style(9) to return and switch/case statements.
Guy Helmer [Mon, 21 May 2012 21:04:29 +0000 (21:04 +0000)]
Apply style(9) to return and switch/case statements.

Reviewed by: delphij (prior version of the patch)

12 years agoRe-add 'ic' and properly wrap it in the SUPERG macro.
Adrian Chadd [Mon, 21 May 2012 17:51:26 +0000 (17:51 +0000)]
Re-add 'ic' and properly wrap it in the SUPERG macro.

12 years agoDon't recurse into libssp when MK_SSP is set to no.
Marcel Moolenaar [Mon, 21 May 2012 16:03:44 +0000 (16:03 +0000)]
Don't recurse into libssp when MK_SSP is set to no.

12 years agoAdd missing \n when generating pkg.conf
Baptiste Daroussin [Mon, 21 May 2012 15:45:18 +0000 (15:45 +0000)]
Add missing \n when generating pkg.conf

Reported by: beat
Approved by: des (mentor)
MFC after: 1 day

12 years agoRegenerate usb.conf
Hans Petter Selasky [Mon, 21 May 2012 15:01:35 +0000 (15:01 +0000)]
Regenerate usb.conf

MFC after: 3 days

12 years agoImport byacc from invisible island, it brings us lots of compatibilities with
Baptiste Daroussin [Mon, 21 May 2012 13:31:26 +0000 (13:31 +0000)]
Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR: bin/140309 [1]
Submitted by: Philippe Pepiot <ksh@philpep.org> [1]
Approved by: des (mentor)
MFC after: 1 month

12 years agoDisable NLS catalog use in libc if built with WITHOUT_NLS option.
Gleb Kurtsou [Mon, 21 May 2012 08:10:42 +0000 (08:10 +0000)]
Disable NLS catalog use in libc if built with WITHOUT_NLS option.

Functions affected: strerror, strsignal, gai_strerror.

12 years agoAccording to shared memory man pages, advice including <sys/types.h>
Kevin Lo [Mon, 21 May 2012 07:52:46 +0000 (07:52 +0000)]
According to shared memory man pages, advice including <sys/types.h>
instead of <sys/param.h>

12 years agoBe a little less magical, not that these values are likely to change...
Warner Losh [Mon, 21 May 2012 07:47:57 +0000 (07:47 +0000)]
Be a little less magical, not that these values are likely to change...

12 years agoImplement pmap_mincore for arm. Now programs using it don't cause a
Warner Losh [Mon, 21 May 2012 06:56:26 +0000 (06:56 +0000)]
Implement pmap_mincore for arm.  Now programs using it don't cause a
flood of console messages.

Reviewed by: alc@

12 years ago- On FreeBSD, com_err.h is installed into /usr/include, not /usr/include/krb5.
Stanislav Sedov [Mon, 21 May 2012 04:29:11 +0000 (04:29 +0000)]
- On FreeBSD, com_err.h is installed into /usr/include, not /usr/include/krb5.
  Reflect that in the manpage.

PR: bin/167986
Reported by: truckman@

12 years agoAnother minor re-arrangement of the code: calcualte the master clock
Warner Losh [Mon, 21 May 2012 04:24:58 +0000 (04:24 +0000)]
Another minor re-arrangement of the code: calcualte the master clock
frequency in the at91_pmc_clock_init rather than passing it in.  Allow
for frequencies >= 21MHz by rounding to the nearest 500Hz (Idea from
Ian Lapore whose company uses a similar arrangement in their product).
at91_pmc_clock_init() is now nearly independent of the rest of the pmc
driver (which means we may be able to call it much earlier in boot
soon to eliminate the master clock config file requirement for printf
to work during early boot and also eliminate some interdependencies
with the device ordering which requires pmc to be the first device
added).

12 years agoPrint key value, an index, otherwise we don't know which key is allocated.
David Xu [Mon, 21 May 2012 03:06:31 +0000 (03:06 +0000)]
Print key value, an index, otherwise we don't know which key is allocated.

12 years agoUse strcmp that I replaced by accident.
Kevin Lo [Mon, 21 May 2012 02:45:47 +0000 (02:45 +0000)]
Use strcmp that I replaced by accident.

12 years agoFix broken ref count
Kevin Lo [Mon, 21 May 2012 02:41:15 +0000 (02:41 +0000)]
Fix broken ref count

Submitted by: gcooper

12 years agoFix improper handling of variadic args with ICDEBUG
Kevin Lo [Mon, 21 May 2012 02:30:22 +0000 (02:30 +0000)]
Fix improper handling of variadic args with ICDEBUG

PR: kern/168095
Submitted by: gcooper

12 years agoRemove dead code
Kevin Lo [Mon, 21 May 2012 02:23:20 +0000 (02:23 +0000)]
Remove dead code

12 years agoMinor cleanup before some more major changes:
Warner Losh [Sun, 20 May 2012 20:50:40 +0000 (20:50 +0000)]
Minor cleanup before some more major changes:
o main_clock_hz isn't used, eliminate it
o move main clock calculation code and table so we have only one ifdef.

12 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
Alan Cox [Sun, 20 May 2012 18:25:45 +0000 (18:25 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.c.  This new r/w lock is used primarily to synchronize access
to the PV lists.  However, it will be used in a somewhat unconventional
way.  As finer-grained PV list locking is added to each of the pmap
functions that acquire this r/w lock, its acquisition will be changed from
write to read, enabling concurrent execution of the pmap functions with
finer-grained locking.

Reviewed by: kib
X-MFC after: r235598

12 years agoDetermine kernel load address dynamically from u-boot memory map.
Tim Kientzle [Sun, 20 May 2012 18:07:35 +0000 (18:07 +0000)]
Determine kernel load address dynamically from u-boot memory map.

The generic ELF loading code maps the kernel into low memory
by subtracting KERN_BASE.  So the copyin/copyout/readin functions
are always called with low addresses.  This code finds the largest
DRAM block from the U-Boot memory map and adds that base to
the addresses.

In particular, this fixes ubldr on AM3358, which has DRAM
mapped to 0x80000000 at power-on.