]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoRemove the now defunct kern.ipc.nmbufs tunable.
Sergey Kandaurov [Wed, 13 Apr 2011 12:19:03 +0000 (12:19 +0000)]
Remove the now defunct kern.ipc.nmbufs tunable.

PR: kern/132497 (part)
MFC after: 1 week

13 years agoBring over the antenna diversity logic support for Kite.
Adrian Chadd [Wed, 13 Apr 2011 11:32:15 +0000 (11:32 +0000)]
Bring over the antenna diversity logic support for Kite.

Again, this is just the code ported from ath9k and included in the build,
it isn't yet enabled.

13 years agoStaticize malloc types.
Sergey Kandaurov [Wed, 13 Apr 2011 11:28:46 +0000 (11:28 +0000)]
Staticize malloc types.

Approved by: lstewart
MFC after: 1 week

13 years agoAs soon as siis_reset() doesn't waits for device readiness, but only for
Alexander Motin [Wed, 13 Apr 2011 06:36:22 +0000 (06:36 +0000)]
As soon as siis_reset() doesn't waits for device readiness, but only for
controller port readiness (that should set just after PHY ready signal),
reduce wait time from 10s to 1s before trying more aggressive reset method.

This should improve system responsibility in some failure conditions.

13 years agoPort over a TX gain fix from ath9k specific to the AR9285 (Kite) and AR9271.
Adrian Chadd [Wed, 13 Apr 2011 04:40:59 +0000 (04:40 +0000)]
Port over a TX gain fix from ath9k specific to the AR9285 (Kite) and AR9271.
Note: this HAL currently only supports the AR9285.

From Linux ath9k:

The problem is that when the attenuation is increased,
the rate will start to drop from MCS7 -> MCS6, and finally
will see MCS1 -> CCK_11Mbps. When the rate is changed b/w
CCK and OFDM, it will use register desired_scale to calculate
how much tx gain need to change.

The output power with the same tx gain for CCK and OFDM modulated
signals are different. This difference is constant for AR9280
but not AR9285/AR9271. It has different PA architecture
a constant. So it should be calibrated against this PA
characteristic.

The driver has to read the calibrated values from EEPROM and set
the tx power registers accordingly.

13 years agoAdd new fields to the v4k EEPROM modal header.
Adrian Chadd [Wed, 13 Apr 2011 03:05:42 +0000 (03:05 +0000)]
Add new fields to the v4k EEPROM modal header.

13 years agoAdd OS_REG_RMW, which mirrors ath9k's REG_RMW.
Adrian Chadd [Wed, 13 Apr 2011 03:05:15 +0000 (03:05 +0000)]
Add OS_REG_RMW, which mirrors ath9k's REG_RMW.

This macro does a read-modify-write pass with register bits to set and clear.

13 years agoAdd the initial AR9285 PHY glue for supporting antenna diversity.
Adrian Chadd [Wed, 13 Apr 2011 02:40:45 +0000 (02:40 +0000)]
Add the initial AR9285 PHY glue for supporting antenna diversity.
This code isn't currently used anywhere; it's just linked into the build.

13 years ago- Fix the code that matches userids in match_jobspec(). It needs to check
Garance A Drosehn [Wed, 13 Apr 2011 00:36:19 +0000 (00:36 +0000)]
- Fix the code that matches userids in match_jobspec().  It needs to check
  the username-for-accounting field (P), not the username-for-headerpage (L).
  These are usually the same value, except that control files do not have
  the username-for-headerpage field if the user has requested no header page.
- Also rename the cji_username field to cji_headruser, to make it clear that
  the value should only be used for the header page.  (aka banner page)

MFC after: 3 weeks

13 years agoFix a couple of mbuf leaks introduced by r217242. I do
Rick Macklem [Wed, 13 Apr 2011 00:03:49 +0000 (00:03 +0000)]
Fix a couple of mbuf leaks introduced by r217242. I do
not believe that these leaks had a practical impact,
since the situations in which they would have occurred
would have been extremely rare.

MFC after: 2 weeks

13 years agoReduce errors in effective frequency calculation.
Jung-uk Kim [Tue, 12 Apr 2011 23:49:07 +0000 (23:49 +0000)]
Reduce errors in effective frequency calculation.

13 years agoReinstate cpu_est_clockrate() support for P-state invariant TSC if APERF and
Jung-uk Kim [Tue, 12 Apr 2011 23:04:01 +0000 (23:04 +0000)]
Reinstate cpu_est_clockrate() support for P-state invariant TSC if APERF and
MPERF MSRs are available.  It was disabled in r216443.  Remove the earlier
hack to subtract 0.5% from the calibrated frequency as DELAY(9) is little
bit more reliable now.

13 years agoAdd support for IEE/IEC (and now also SI) power of two notions of
Xin LI [Tue, 12 Apr 2011 22:48:03 +0000 (22:48 +0000)]
Add support for IEE/IEC (and now also SI) power of two notions of
prefixes (Ki, Mi, Gi...) for humanize_number(3).

Note that applications has to pass HN_IEC_PREFIXES to use this
feature for backward compatibility reasons.

Reviewed by: arundel
MFC after: 2 weeks

13 years agoDo not use TSC for DELAY(9) if it not P-state invariant to avoid possible
Jung-uk Kim [Tue, 12 Apr 2011 22:41:52 +0000 (22:41 +0000)]
Do not use TSC for DELAY(9) if it not P-state invariant to avoid possible
foot-shooting.  DELAY() becomes unreliable when TSC frequency varies wildly,
especially cpufreq(4) and powerd(8) are used at the same time.

13 years agoAdd forgotten declarations for tsc_perf_stat from the previous commit.
Jung-uk Kim [Tue, 12 Apr 2011 22:22:01 +0000 (22:22 +0000)]
Add forgotten declarations for tsc_perf_stat from the previous commit.

13 years agoProbe capability to find effective frequency. When the TSC is P-state
Jung-uk Kim [Tue, 12 Apr 2011 22:15:46 +0000 (22:15 +0000)]
Probe capability to find effective frequency.  When the TSC is P-state
invariant, APERF/MPERF ratio can be used to find effective frequency.

13 years agoAdd definitions for CPUID instruction 6, ECX information.
Jung-uk Kim [Tue, 12 Apr 2011 22:12:23 +0000 (22:12 +0000)]
Add definitions for CPUID instruction 6, ECX information.

13 years agoAdd a new tunable 'machdep.disable_tsc_calibration' to allow skipping TSC
Jung-uk Kim [Tue, 12 Apr 2011 21:08:34 +0000 (21:08 +0000)]
Add a new tunable 'machdep.disable_tsc_calibration' to allow skipping TSC
frequency calibration.  For Intel processors, if brand string from CPUID
contains its nominal frequency, this frequency is used instead.

13 years agoRefactor hard-reset implementation in ahci(4).
Alexander Motin [Tue, 12 Apr 2011 20:50:57 +0000 (20:50 +0000)]
Refactor hard-reset implementation in ahci(4).

Instead of spinning in a tight loop for up to 15 seconds, polling for device
readiness while it spins up, return reset completion just after PHY reports
"connect well" or 100ms connection timeout. If device was found, use callout
for checking device readiness with 100ms period up to full 31 second timeout.

This fixes system freeze for 5-10 seconds on drives hot plug-in.

13 years agoFix 'zfs list <path>' handling. If the path was found, the 'ret' variable was
Pawel Jakub Dawidek [Tue, 12 Apr 2011 20:31:33 +0000 (20:31 +0000)]
Fix 'zfs list <path>' handling. If the path was found, the 'ret' variable was
uninitialized.

PR: kern/155940
Submitted by: KOIE Hidetaka <koie@suri.co.jp>
MFC after: 1 week

13 years agoGet rid of DSIZ; instead just call the sizing function if provided.
Edward Tomasz Napierala [Tue, 12 Apr 2011 20:10:15 +0000 (20:10 +0000)]
Get rid of DSIZ; instead just call the sizing function if provided.

13 years agoThe replication mode that is currently support is fullsync, not memsync.
Pawel Jakub Dawidek [Tue, 12 Apr 2011 19:13:10 +0000 (19:13 +0000)]
The replication mode that is currently support is fullsync, not memsync.
Correct this and print a warning if different replication mode is
configured.

MFC after: 1 week

13 years agoImplement automatic SCSI sense fetching for mvs(4).
Alexander Motin [Tue, 12 Apr 2011 16:01:27 +0000 (16:01 +0000)]
Implement automatic SCSI sense fetching for mvs(4).

Make few improvements/changes to ATAPI PIO support to pass most of scgcheck
(cdrtools) tests.

13 years agoRestore previous behaviour - always match rule when we doing tagging,
Andrey V. Elsukov [Tue, 12 Apr 2011 15:20:34 +0000 (15:20 +0000)]
Restore previous behaviour - always match rule when we doing tagging,
even when tag is already exists.

Reported by: Vadim Goncharov
MFC after: 1 week

13 years agoUpdate some terminology: floppies are no longer built, and FreeBSD is not
Nathan Whitehorn [Tue, 12 Apr 2011 12:57:46 +0000 (12:57 +0000)]
Update some terminology: floppies are no longer built, and FreeBSD is not
necessarily distributed by CVS any longer.

13 years agoImplement automatic SCSI sense fetching for siis(4).
Alexander Motin [Tue, 12 Apr 2011 11:29:15 +0000 (11:29 +0000)]
Implement automatic SCSI sense fetching for siis(4).

Fix device freeze leak on recovery request (READ LOG, REQUEST SENSE)
failure.

13 years agoImplement automatic SCSI sense fetching for ahci(4).
Alexander Motin [Tue, 12 Apr 2011 11:24:59 +0000 (11:24 +0000)]
Implement automatic SCSI sense fetching for ahci(4).

13 years agoImplement automatic SCSI sense fetching for ata(4) in ATA_CAM mode.
Alexander Motin [Tue, 12 Apr 2011 09:55:24 +0000 (09:55 +0000)]
Implement automatic SCSI sense fetching for ata(4) in ATA_CAM mode.
While it could be successfully done by CAM error recovery code, I was
told by several people that it is also a SIM obligation.

13 years agoUse the full and proper company name for Swinburne University of Technology
Lawrence Stewart [Tue, 12 Apr 2011 08:13:18 +0000 (08:13 +0000)]
Use the full and proper company name for Swinburne University of Technology
throughout the source tree.

Requested by: Grenville Armitage, Director of CAIA at Swinburne University of
Technology
MFC after: 3 days

13 years agoIntroduce geom_map, a GEOM provider designed for use by
Adrian Chadd [Tue, 12 Apr 2011 08:10:25 +0000 (08:10 +0000)]
Introduce geom_map, a GEOM provider designed for use by
embedded flash stores.

Some devices - notably those with uboot - don't have an
explicit partition table (eg like Redboot's FIS.)
geom_map thus provides an easy way to export the hard-coded
flash layout as geom providers for use by filesystems and
other tools.

It also includes a "search" function which allows for
dynamic creation of partition layouts where the device only
has a single hard-coded partition. For example, if
there is a "kernel+rootfs" partition, a single image can
be created which appends the rootfs after the kernel with
an appropriate search string. geom_map can be told to
search for said search string and create a partition
beginning after it.

Submitted by: Aleksandr Rybalko <ray@dlink.ua>

13 years agoWe don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI
Hans Petter Selasky [Tue, 12 Apr 2011 07:49:11 +0000 (07:49 +0000)]
We don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI
bus driver at detach, hence ehci_detach() does exactly this since r199718.

Submitted by: Luiz Otavio O Souza
MFC after: 7 days
Approved by: thompsa (mentor)

13 years agoIf building (custom) FreeBSD images people tend to patch param.h. In case
Bjoern A. Zeeb [Tue, 12 Apr 2011 02:07:23 +0000 (02:07 +0000)]
If building (custom) FreeBSD images people tend to patch param.h.  In case
this happens just before the build is started (within the same second)
CHECK_TIME actually triggers thinking param.h is in the future (see f_Xtime,
c_Xtime logi in find(1) sources for the details in !F_EXACTTIME case).
Using the -mtime -0s (seconds, rather than no unit) avoids this 1s race.

Submitted by: ed (2009-05-03)
Reviewed by: cperciva (2009-05-03), emaste
Tested by: bz (for almost two years)
MFC after: 4 days

13 years agoEven though this block is not compiled currently, properly assign
Bjoern A. Zeeb [Tue, 12 Apr 2011 01:19:23 +0000 (01:19 +0000)]
Even though this block is not compiled currently, properly assign
CSUM_TSO to if_hwassist rather than if_capabilities to avoid future
errors.

Reviewed by: jeff

13 years agoMFV of r220547, tzdata2011f:
Edwin Groothuis [Mon, 11 Apr 2011 21:57:59 +0000 (21:57 +0000)]
MFV of r220547, tzdata2011f:

- During 2011 the Falkland Islands will remain on Summer time.

Obtained from:  ftp://elsie.nci.nih.gov/pub/

13 years agoVendor import of tzdata2011f:
Edwin Groothuis [Mon, 11 Apr 2011 21:54:09 +0000 (21:54 +0000)]
Vendor import of tzdata2011f:

- During 2011 the Falkland Islands will remain on Summer time.

Obtained from: ftp://elsie.nci.nih.gov/pub/

13 years agoVrele ni_startdir in the experimental NFS server for the case
Rick Macklem [Mon, 11 Apr 2011 20:54:30 +0000 (20:54 +0000)]
Vrele ni_startdir in the experimental NFS server for the case
of NFSv2 getting an error return from VOP_MKNOD(). Without this
patch, the server file system remains busy after an NFSv2
VOP_MKNOD() fails.

MFC after: 2 weeks

13 years agoMerge two similar functions to reduce duplication.
Jung-uk Kim [Mon, 11 Apr 2011 19:27:44 +0000 (19:27 +0000)]
Merge two similar functions to reduce duplication.

13 years agoDon't do make release and make install in one step. Setting DESTDIR for
Nathan Whitehorn [Mon, 11 Apr 2011 15:03:01 +0000 (15:03 +0000)]
Don't do make release and make install in one step. Setting DESTDIR for
make release has deleterious consequences.

13 years agoMake the keymap script continue to work now that stderr is being
Nathan Whitehorn [Mon, 11 Apr 2011 14:46:40 +0000 (14:46 +0000)]
Make the keymap script continue to work now that stderr is being
redirected to the log file.

13 years agoAdd an install target to release/Makefile instead of grubbing around
Nathan Whitehorn [Mon, 11 Apr 2011 14:30:45 +0000 (14:30 +0000)]
Add an install target to release/Makefile instead of grubbing around
(and requesting that users grub around) in /usr/obj. Also make sure that
make clean removes the bootonly media and clean up that target a little.

13 years agoDe-dup the ar5416 rates array definition.
Adrian Chadd [Mon, 11 Apr 2011 11:15:34 +0000 (11:15 +0000)]
De-dup the ar5416 rates array definition.

13 years agoRework change made at r203146. Instead of reporting all wire errors as
Alexander Motin [Mon, 11 Apr 2011 08:23:27 +0000 (08:23 +0000)]
Rework change made at r203146. Instead of reporting all wire errors as
SCSI status errors to CAM (that was wrong, as it too often turned retriable
wire errors into non-retriable REQUEST SENSE errors), do it only for STALL
errors on control pipe of the CBI devices. STALL on control pipe is just
a one of the ways to report error for CBI devices.

PR: usb/150401, usb/154593.
Reviewed by: hselasky
MFC after: 1 week

13 years agoGenerate opt_ah.h now for all ath tools, a recent HAL change of mine
Adrian Chadd [Mon, 11 Apr 2011 06:53:45 +0000 (06:53 +0000)]
Generate opt_ah.h now for all ath tools, a recent HAL change of mine
now requires it.

13 years ago - Refactor softdep_setup_freeblocks() into a set of functions to prepare
Jeff Roberson [Mon, 11 Apr 2011 01:43:59 +0000 (01:43 +0000)]
 - Refactor softdep_setup_freeblocks() into a set of functions to prepare
   for a new journal specific partial truncate routine.
 - Use dep_current[] in place of specific dependency counts.  This is
   automatically maintained when workitems are allocated and has
   less risk of becoming incorrect.

13 years agoAdd some cleanup code to the module unload operation for
Rick Macklem [Sun, 10 Apr 2011 20:43:07 +0000 (20:43 +0000)]
Add some cleanup code to the module unload operation for
the experimental NFS server, so that it doesn't leak memory
when unloaded. However, unloading the NFSv4 server is not
recommended, since all NFSv4 state will be lost by the unload
and clients will have to recover the state after a server
reload/restart as if the server crashed/rebooted.

MFC after: 2 weeks

13 years agoRename a misnamed structure field (hr_loginclass), and reorder priv(9)
Edward Tomasz Napierala [Sun, 10 Apr 2011 18:35:43 +0000 (18:35 +0000)]
Rename a misnamed structure field (hr_loginclass), and reorder priv(9)
constants to match the order and naming of syscalls.  No functional changes.

13 years agoSome callers of proc_reparent() already have the parent process locked.
Konstantin Belousov [Sun, 10 Apr 2011 17:07:02 +0000 (17:07 +0000)]
Some callers of proc_reparent() already have the parent process locked.
Detect the situation and avoid process lock recursion.

Reported by: Fabian Keil <freebsd-listen fabiankeil de>

13 years agoIn hast_proto_recv() remove unnecessary check. The size is checked
Mikolaj Golub [Sun, 10 Apr 2011 15:28:37 +0000 (15:28 +0000)]
In hast_proto_recv() remove unnecessary check. The size is checked
later in hast_proto_recv_data().

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

13 years agoIn hast_proto_recv_data() check that the size of the data to be
Mikolaj Golub [Sun, 10 Apr 2011 15:21:46 +0000 (15:21 +0000)]
In hast_proto_recv_data() check that the size of the data to be
received does not exceed the buffer size.

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

13 years agoFix a typo in comments.
Mikolaj Golub [Sun, 10 Apr 2011 15:11:19 +0000 (15:11 +0000)]
Fix a typo in comments.

Approved by: pjd (mentor)
MFC after: 3 days

13 years agohastd(8) maintains a map of dirty extents, not hastctl(8). Fix this.
Mikolaj Golub [Sun, 10 Apr 2011 15:07:54 +0000 (15:07 +0000)]
hastd(8) maintains a map of dirty extents, not hastctl(8). Fix this.

Approved by: pjd (mentor)
MFC after: 3 days

13 years agoFix a bug in the userland rpc library, where it would use a
Rick Macklem [Sun, 10 Apr 2011 14:11:07 +0000 (14:11 +0000)]
Fix a bug in the userland rpc library, where it would use a
negative return value from write to update its position in
a buffer. The patch, courtesy of Andrey Simonenko, also simplifies
a conditional by removing the "i != cnt" clause, since it is
always true at this point in the code. The bug caused problems
for mountd, when it generated a large reply to an exports RPC
request.

Submitted by: simon at comsys.ntu-kpi.kiev.ua
MFC after: 2 weeks

13 years agoModify the man pages to reflect the addition of a backup
Rick Macklem [Sun, 10 Apr 2011 13:45:46 +0000 (13:45 +0000)]
Modify the man pages to reflect the addition of a backup
stable restart file, as done by r220510.
This is a content change.

MFC after: 2 weeks

13 years agoRename 07.lpr to 07.lpd and re-connect to the build. This was
Ulrich Spörlein [Sun, 10 Apr 2011 12:43:13 +0000 (12:43 +0000)]
Rename 07.lpr to 07.lpd and re-connect to the build. This was
forgotten in r216178.

Submitted by: antoine
Pointyhat: uqs

13 years agoAdd link to rctl(8).
Edward Tomasz Napierala [Sun, 10 Apr 2011 10:17:01 +0000 (10:17 +0000)]
Add link to rctl(8).

13 years agoRemove stray semicolon.
Edward Tomasz Napierala [Sun, 10 Apr 2011 10:15:49 +0000 (10:15 +0000)]
Remove stray semicolon.

13 years agoUpdate recommendation for mergemaster. The -a and -i options are exclusive.
Doug Barton [Sun, 10 Apr 2011 03:53:06 +0000 (03:53 +0000)]
Update recommendation for mergemaster. The -a and -i options are exclusive.

PR: docs/156271
Submitted by: Fedor Dikarev <fedor.dikarev@gmail.com>

13 years agoFix a long standing SUJ performance problem:
Jeff Roberson [Sun, 10 Apr 2011 03:49:53 +0000 (03:49 +0000)]
Fix a long standing SUJ performance problem:

 - Keep a hash of indirect blocks that have recently been freed and are
   still referenced in the journal.
 - Lookup blocks in this hash before forcing a new block write to wait on
   the journal entry to hit the disk.  This is only necessary to avoid
   confusion between old identities as indirects and new identities as
   file blocks.
 - Don't free jseg structures until the journal has written a record that
   invalidates it.  This keeps the indirect block information around for
   as long as is required to be safe.
 - Force an empty journal block write when required to flush out stale
   journal data that is simply waiting for the oldest valid sequence
   number to advance beyond it.

13 years agoAdd support for a backup stable restart file to the nfsd,
Rick Macklem [Sun, 10 Apr 2011 01:54:42 +0000 (01:54 +0000)]
Add support for a backup stable restart file to the nfsd,
used for NFSv4 restart. This permits the nfsd to create
the stable restart file as required and minimizes the risk
of trouble if the file is lost.

Suggested by: Tim Kientzle
Reviewed by: jhb
MFC after: 2 weeks

13 years agoAdd a VOP_UNLOCK() for the directory, when that is not what
Rick Macklem [Sat, 9 Apr 2011 23:55:27 +0000 (23:55 +0000)]
Add a VOP_UNLOCK() for the directory, when that is not what
VOP_LOOKUP() returned. This fixes a bug in the experimental
NFS server for the case where VFS_VGET() fails returning EOPNOTSUPP
in the ReaddirPlus RPC, forcing the use of VOP_LOOKUP() instead.

MFC after: 2 weeks

13 years agoLinuxolator calls VOP_READDIR with ncookies pointer. Implement a
Konstantin Belousov [Sat, 9 Apr 2011 21:40:48 +0000 (21:40 +0000)]
Linuxolator calls VOP_READDIR with ncookies pointer. Implement a
workaround for fdescfs to not panic when ncookies is not NULL, similar
to the one committed as r152254, but simpler, due to fdescfs_readdir()
not calling vfs_read_dirent().

PR: kern/156177
MFC after: 1 week

13 years agoDon't hardcode assumptions about basic rates, similar to what the rt2661
Bernhard Schmidt [Sat, 9 Apr 2011 14:45:50 +0000 (14:45 +0000)]
Don't hardcode assumptions about basic rates, similar to what the rt2661
support code does. While here remove an unnecessary loop.

13 years agoAllow the user to use the live environment post-installation, as well
Nathan Whitehorn [Sat, 9 Apr 2011 14:25:58 +0000 (14:25 +0000)]
Allow the user to use the live environment post-installation, as well
as improving error handling.

13 years agoRename the "Reboot" option to "Exit", which reflects what it actually
Nathan Whitehorn [Sat, 9 Apr 2011 14:18:03 +0000 (14:18 +0000)]
Rename the "Reboot" option to "Exit", which reflects what it actually
does. The rc.local wrapper script will also soon grow an option to use the
live environment after installation, so an immediate reboot isn't even
necessarily implied.

13 years agoDocument SHA256/512 modes.
Mark Murray [Sat, 9 Apr 2011 14:09:46 +0000 (14:09 +0000)]
Document SHA256/512 modes.

MFC after: 1 month

13 years agoAdd SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't
Mark Murray [Sat, 9 Apr 2011 14:02:04 +0000 (14:02 +0000)]
Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't
hurt us.

PR: misc/124164
Submitted by: KIMURA Yasuhiro < yasu utahime org >
MFC after: 1 month

13 years agoAdd SHA512 (Actually, this is Colin Percival's code for SHA256, with
Mark Murray [Sat, 9 Apr 2011 13:56:29 +0000 (13:56 +0000)]
Add SHA512 (Actually, this is Colin Percival's code for SHA256, with
relevant constants changed).

While I'm here clean up the tests and Makefile.

PR: misc/124164
Submitted by: KIMURA Yasuhiro < yasu utahime org >
MFC after: 1 month

13 years agoFix make buildworld -DMODULES_WITH_WORLD on i386
Ulrich Spörlein [Sat, 9 Apr 2011 09:07:31 +0000 (09:07 +0000)]
Fix make buildworld -DMODULES_WITH_WORLD on i386

13 years agoMake it possible to use permission sets (full_set, modify_set, read_set
Edward Tomasz Napierala [Sat, 9 Apr 2011 07:42:25 +0000 (07:42 +0000)]
Make it possible to use permission sets (full_set, modify_set, read_set
and write_set) with setfacl(1).

PR: kern/154113
Submitted by: Shawn Webb <lattera at gmail dot com> (earlier version)
MFC after: 1 month

13 years agoRemove a check in udp6_send() that prevented v4-mapped v6 addresses from
Bjoern A. Zeeb [Sat, 9 Apr 2011 02:22:49 +0000 (02:22 +0000)]
Remove a check in udp6_send() that prevented v4-mapped v6 addresses from
working.  We store v4 and v6 addresses as a union but for v4-mapped
addresses only store the 32bits w/o the ::ffff: word.  That failed the
check as for example 127.0.0.1 would be ::7f00:1 rather than ::ffff:7f00:1
and the IN6_IS_ADDR_V4MAPPED() never worked here.  Given we can hardly get
here with an unbound local address or invalid inp_vflags remove the check.

Reported by: tuexen
Reviewed by: tuexen
MFC after: 3 days

13 years agoAfter r219579 and r219779 unbreak v4-mapped v6 sockets for UDP
Bjoern A. Zeeb [Sat, 9 Apr 2011 01:29:46 +0000 (01:29 +0000)]
After r219579 and r219779 unbreak v4-mapped v6 sockets for UDP
some more.  Similar to what we do for TCP check for v4-mapped
addresses and then handle them or the normal v6 address case.
For either set inp_vflags before calling into the pcb connect
function so that we have an unambiguous view in case we need to
set the local address or port.

Looked at: tuexen (as part of more)
MFC after: 3 days

13 years agoRemove setting of PCB_FULL_IRET at the places where we are going to call
Konstantin Belousov [Fri, 8 Apr 2011 21:27:31 +0000 (21:27 +0000)]
Remove setting of PCB_FULL_IRET at the places where we are going to call
update_gdt_{f,g}sbase. The functions set the flag when td == curthread,
and sysarch is always called with curthread.

Reviewed by: jhb, jkim
MFC after: 1 week

13 years agoDisable local interrupts before testing the PCB_FULL_IRET flag.
Konstantin Belousov [Fri, 8 Apr 2011 21:26:50 +0000 (21:26 +0000)]
Disable local interrupts before testing the PCB_FULL_IRET flag.
Thread might be preempted after testing, which causes the flag to be
cleared. If ast was not delivered, we will do sysret with potentially
wrong fs/gs bases.

Reviewed by: jhb, jkim
MFC after: 1 week (together with r220430, r220452)

13 years agoRefactor DELAYDEBUG as it is only useful for correcting i8254 frequency.
Jung-uk Kim [Fri, 8 Apr 2011 19:54:29 +0000 (19:54 +0000)]
Refactor DELAYDEBUG as it is only useful for correcting i8254 frequency.

13 years agoReintroduce the fix already discussed in r216805 (please check its history
Attilio Rao [Fri, 8 Apr 2011 18:48:57 +0000 (18:48 +0000)]
Reintroduce the fix already discussed in r216805 (please check its history
for a detailed explanation of the problems).

The only difference with the previous fix is in Solution2:
CPUBLOCK is no longer set when exiting from callout_reset_*() functions,
which avoid the deadlock (leading to r217161).
There is no need to CPUBLOCK there because the running-and-migrating
assumption is strong enough to avoid problems there.
Furthermore add a better !SMP compliancy (leading to shrinked code and
structures) and facility macros/functions.

Tested by: gianni, pho, dim
MFC after: 3 weeks

13 years ago- Add kern.cam.ada.X.write_cache tunables/sysctls to control write caching
Alexander Motin [Fri, 8 Apr 2011 14:42:29 +0000 (14:42 +0000)]
- Add kern.cam.ada.X.write_cache tunables/sysctls to control write caching
on per-device basis.
- While adding support for per-device sysctls, merge from graid branch
support for ADA_TEST_FAILURE kernel option, which opens few more sysctl,
allowing to simulate read and write errors for testing purposes.

13 years agoAdd tunables that mirror the functionality of sysctls machdep.panic_on_nmi
Ryan Stone [Fri, 8 Apr 2011 14:39:41 +0000 (14:39 +0000)]
Add tunables that mirror the functionality of sysctls machdep.panic_on_nmi
and machdep.kdb_on_nmi.

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

13 years agoFix a bug in the previous change to restore the fast path for syscall
John Baldwin [Fri, 8 Apr 2011 13:33:57 +0000 (13:33 +0000)]
Fix a bug in the previous change to restore the fast path for syscall
return.  The ast() function may cause a context switch in which case
PCB_FULL_IRET would be set in the pcb.  However, the code was not
rechecking the flag after ast() returned and would not properly restore
the FSBASE and GSBASE MSRs.  To fix, recheck the PCB_FULL_IRET flag after
ast() returns.

While here, trim an instruction (and memory access) from the doreti path
and fix a typo in a comment.

MFC after: 1 week

13 years agoCatch up to PCB_FULL_IRET becoming a pcb flag rather than a full field.
John Baldwin [Fri, 8 Apr 2011 13:30:48 +0000 (13:30 +0000)]
Catch up to PCB_FULL_IRET becoming a pcb flag rather than a full field.

MFC after: 3 days

13 years agoAdd reference to led(4), supported now.
Alexander Motin [Fri, 8 Apr 2011 12:46:47 +0000 (12:46 +0000)]
Add reference to led(4), supported now.
Add some details about supported chips.

13 years agoWhen specifying the -t option (send tag in front of message), this tag
Edwin Groothuis [Fri, 8 Apr 2011 12:33:07 +0000 (12:33 +0000)]
When specifying the -t option (send tag in front of message), this tag
should also be forwarded to the remote logging host, not only when the
logging is done locally.

PR: bin/154324
Submitted by: Callum Gibson <callumgibson@optusnet.com.au>
MFC after: 1 week

13 years agoPartially fix ZFS compat code for sparc64.
Martin Matuska [Fri, 8 Apr 2011 11:08:26 +0000 (11:08 +0000)]
Partially fix ZFS compat code for sparc64.
Some endianess bugs still need to be resolved.

Submitted by: marius (parts of the fix)
MFC after: 1 month

13 years agoRe-add the pad[2] I deleted by accident.
Adrian Chadd [Fri, 8 Apr 2011 09:56:31 +0000 (09:56 +0000)]
Re-add the pad[2] I deleted by accident.

13 years agoAdd initial support for MIMO statistics to net80211.
Adrian Chadd [Fri, 8 Apr 2011 09:20:45 +0000 (09:20 +0000)]
Add initial support for MIMO statistics to net80211.

This introduces struct ieee80211_rx_stats - which stores the various kinds
of RX statistics which a MIMO and non-MIMO 802.11 device can export.

It also fleshes out the mimo export to userland (node_getmimoinfo()).

It assumes that MIMO radios (for now) export both ctl and ext channels.
Non-11n MIMO radios are possible (and I believe Atheros made at least
one), so if that chipset support is added, extra flags to the
struct ieee80211_rx_stats can be added to extend this support.

Two new input functions have been added - ieee80211_input_mimo() and
ieee80211_input_mimo_all() - which MIMO-aware devices can call with
MIMO specific statistics.

802.11 devices calling the non-MIMO input functions will still function.

13 years agoFix the completely wrong types I used in the previous commit.
Adrian Chadd [Fri, 8 Apr 2011 08:49:50 +0000 (08:49 +0000)]
Fix the completely wrong types I used in the previous commit.

13 years agoBegin fleshing out a public HAL routine to export the per-chain
Adrian Chadd [Fri, 8 Apr 2011 07:44:00 +0000 (07:44 +0000)]
Begin fleshing out a public HAL routine to export the per-chain
ctl/ext noise floor values.

This routine doesn't check to see whether the radio is MIMO
capable - instead, it simply returns either the raw values,
the "nominal" values if the raw values aren't yet available
or are invalid, or '0' values if there's no valid channel/
no valid MIMO values.

Callers are expected to verify the radio is a MIMO radio
(which for now means it's an 11n chipset, there are non-11n
MIMO chipsets out there but I don't think we support them,
at least in MIMO mode) before exporting the MIMO values.

13 years agoExport the per-chain ctl/ext noise floor values, raw and uncut, to the
Adrian Chadd [Fri, 8 Apr 2011 06:58:01 +0000 (06:58 +0000)]
Export the per-chain ctl/ext noise floor values, raw and uncut, to the
upper-level HAL.

Right now the per-chain noise floor values aren't used anywhere in
the upper-level HAL, so the driver currently has no real reference
to compare the per-chain RSSI values to.

This is needed before per-chain RSSI values (for ctl and ext radios)
are can be thrown upstairs to the net80211 code.

13 years agoExtend the RX descriptor block to include two more EVM words.
Adrian Chadd [Fri, 8 Apr 2011 06:29:41 +0000 (06:29 +0000)]
Extend the RX descriptor block to include two more EVM words.

This will be needed for later AR93xx/AR94xx 3-stream devices.

13 years agoStripped '32' suffix from linux systrace module name on i386.
Artem Belevich [Fri, 8 Apr 2011 06:27:43 +0000 (06:27 +0000)]
Stripped '32' suffix from linux systrace module name on i386.

Approved by: avg

13 years agoUse atomic load & store for TSC frequency. It may be overkill for amd64 but
Jung-uk Kim [Thu, 7 Apr 2011 23:28:28 +0000 (23:28 +0000)]
Use atomic load & store for TSC frequency.  It may be overkill for amd64 but
safer for i386 because it can be easily over 4 GHz now.  More worse, it can
be easily changed by user with 'machdep.tsc_freq' tunable (directly) or
cpufreq(4) (indirectly).  Note it is intentionally not used in performance
critical paths to avoid performance regression (but we should, in theory).
Alternatively, we may add "virtual TSC" with lower frequency if maximum
frequency overflows 32 bits (and ignore possible incoherency as we do now).

13 years agou3g.4:
Glen Barber [Thu, 7 Apr 2011 23:14:33 +0000 (23:14 +0000)]
u3g.4:
- remove self-reference in SEE ALSO section (originally was to s/XR/Xr)

cxgbe.4:
- remove blank line
- add closing .El

Reported by: manlint
MFC after: 3 days

13 years agopcb_flags is an int, so use testl rather than testq.
John Baldwin [Thu, 7 Apr 2011 23:13:22 +0000 (23:13 +0000)]
pcb_flags is an int, so use testl rather than testq.

Pointy hat to: jhb
Submitted by: jkim
MFC after: 1 week

13 years agoIf a system call does not request a full interrupt return, use a fast
John Baldwin [Thu, 7 Apr 2011 21:32:25 +0000 (21:32 +0000)]
If a system call does not request a full interrupt return, use a fast
path via the sysretq instruction to return from the system call.  This was
removed in 190620 and not quite fully restored in 195486.  This resolves
most of the performance regression in system call microbenchmarks between
7 and 8 on amd64.

Reviewed by: kib
MFC after: 1 week

13 years agoRemove stale checks for RDTSC support. amd64 must have TSC support anyway.
Jung-uk Kim [Thu, 7 Apr 2011 21:29:34 +0000 (21:29 +0000)]
Remove stale checks for RDTSC support.  amd64 must have TSC support anyway.

13 years agoPort of the LRO fix from mxge driver to the generic
Jack F Vogel [Thu, 7 Apr 2011 21:20:26 +0000 (21:20 +0000)]
Port of the LRO fix from mxge driver to the generic
LRO code. Thanks to Andrew Gallatin for the change.

MFC after:  7 days

13 years ago- Fixed a problem when multiqueue mode was enabled which caused the CQ
David Christensen [Thu, 7 Apr 2011 20:15:36 +0000 (20:15 +0000)]
- Fixed a problem when multiqueue mode was enabled which caused the CQ
  chain to be corrupted.
- Removed many console print warnings and replaced with driver maintained
  counters.
- Several style(9) fixes.

MFC after:      One week.

13 years agoFix a bug in mxge's LRO which can cause dup acks to
Andrew Gallatin [Thu, 7 Apr 2011 13:49:44 +0000 (13:49 +0000)]
Fix a bug in mxge's LRO which can cause dup acks to
get aggregated & hence prevent TCP from entering
fast retransmit.

Pointed out by: jeff
Reviewed by: gnn
MFC after: 7 days

13 years agoAdd some more OS_MARK probes to the RX DMA setup/teardown code path.
Adrian Chadd [Thu, 7 Apr 2011 13:14:51 +0000 (13:14 +0000)]
Add some more OS_MARK probes to the RX DMA setup/teardown code path.

I'm trying to debug the RX DMA path and help the ath9k guys with
"RX dma abort stuck" issue that both our drivers have.

13 years ago- Adjust a comment to actual behaviour
Gabor Kovesdan [Thu, 7 Apr 2011 13:03:35 +0000 (13:03 +0000)]
- Adjust a comment to actual behaviour
- Makefile nit
- Add more CVS/SVN keywords to make it easier to track changes from NetBSD
  in case they add further improvements

Approved by: delphij (mentor)
Obtained from: The NetBSD Project

13 years ago- Simplify the fixed string pattern preprocessing code
Gabor Kovesdan [Thu, 7 Apr 2011 13:01:03 +0000 (13:01 +0000)]
- Simplify the fixed string pattern preprocessing code
- Improve readability

Approved by: delphij (mentor)
Obtained from: The NetBSD Project