]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoBring over AR5416 specific RX filter get/set routines.
Adrian Chadd [Sat, 30 Jul 2011 13:25:11 +0000 (13:25 +0000)]
Bring over AR5416 specific RX filter get/set routines.

This in particular fixes radar PHY handling - on the AR5212
NIC, one enables the AR_PHY_ERR_RADAR bit in AR_PHY_ERR;
the AR5416 and later also needs a bit set in AR_RX_FILTER.

A follow-up commit is needed to convert the AR5416 ANI code
to use this particular method, as it's currently using the
AR5212 methods directly.

Obtained from: Atheros
Approved by: re (kib)

12 years agoMFprojects/hid:
Alexander Motin [Sat, 30 Jul 2011 13:22:44 +0000 (13:22 +0000)]
MFprojects/hid:
 - Fix usbhidctl and usbhidaction to handle HID devices with multiple
report ids, such as multimedia keyboards.
 - Add collection type and report id to the `usbhidctl -r` output. They
are important for proper device understanding and debugging.
 - Fix usbhidaction tool to properly handle items having report_count
more then 1.

Approved by: re (kib)
MFC after: 2 weeks

12 years agoI noticed that the Merlin NICs I had (AR9220, AR9280) never completed
Adrian Chadd [Sat, 30 Jul 2011 13:21:33 +0000 (13:21 +0000)]
I noticed that the Merlin NICs I had (AR9220, AR9280) never completed
the ADC calibrations if the NIC is in 5ghz 11a or 5ghz HT/20 modes.
I've been told that the dual-ADC is only engaged in turbo/40mhz modes.

Since Sowl (AR9160) seems to return valid-looking calibration data
in 5ghz 20MHz modes, I'm only disabling it for Merlin for now.
It may turn out I can disable it for all chipsets and only enable
it for 40MHz modes.

Approved by: re (kib)

12 years agoFix the AR9280 initial AGC calibration code.
Adrian Chadd [Sat, 30 Jul 2011 13:18:48 +0000 (13:18 +0000)]
Fix the AR9280 initial AGC calibration code.

It looks like this was mixed up with the AR9285 calibration code.
This code is now more in line with what Linux ath9k and Atheros
reference drivers do.

Obtained from: Atheros
Approved by: re (kib)

12 years agoAdd new device id of D-Link DGE-530T Rev. C controller. DGE-503T
Pyun YongHyeon [Sat, 30 Jul 2011 01:06:12 +0000 (01:06 +0000)]
Add new device id of D-Link DGE-530T Rev. C controller.  DGE-503T
Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C
controller is re-branded RealTek 8169 controller.

PR: kern/159116
Approved by: re (kib)

12 years agoFix an error that could cause sysctl -a to enter an infinite loop in the
Nathan Whitehorn [Sat, 30 Jul 2011 00:52:13 +0000 (00:52 +0000)]
Fix an error that could cause sysctl -a to enter an infinite loop in the
event of a broken or busy fan due to returning incorrect error codes from
the FCU sysctl handler.

Reported by: Path Mather <paul at gromit dot dlib dot vt dot edu>1
Approved by: re (kib)

12 years agoMount memsticks read-only by default to prevent them being filled by
Nathan Whitehorn [Sat, 30 Jul 2011 00:51:36 +0000 (00:51 +0000)]
Mount memsticks read-only by default to prevent them being filled by
user modifications and subsequently preventing a functioning installation.

Approved by: re (kib)

12 years agoUpdate to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEP
Kirk McKusick [Sat, 30 Jul 2011 00:43:18 +0000 (00:43 +0000)]
Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEP
is set so that mount can revert back to using MNT_NOWAIT when doing
getmntinfo.

Approved by: re (kib)

12 years agoReset the NIC if ANI is enabled or disabled.
Adrian Chadd [Fri, 29 Jul 2011 23:55:17 +0000 (23:55 +0000)]
Reset the NIC if ANI is enabled or disabled.

Although this may not be what the original sysctl was designed to do,
it feels a bit more "expected".

Before, if ANI is disabled, the initial ANI parameters are still written
to the hardware, even if they're not enabled. "ANI enabled" would then
adjust the noise immunity parameters dynamically. Disabling ANI would
simply leave the existing noise immunity parameters where they are,
and disable the dynamic part.

The problem is that disabling ANI doesn't leave the hardware in
a consistent, predictable state - so asking a user to disable ANI
wouldn't actually reset the NIC to a consistent set of PHY signal
detection parameters, resulting in an unpredictable/unreliable outcome.
This makes it difficult to get reliable debugging information from
the user.

Approved by: re (kib)

12 years agoMake ums(4) driver more picky, not attaching to "mouses" with absolute
Alexander Motin [Fri, 29 Jul 2011 20:38:06 +0000 (20:38 +0000)]
Make ums(4) driver more picky, not attaching to "mouses" with absolute
coordinates, such as digitizers and touch-screens, leaving these devices
to uhid(4) and user-level. Specially patched xf86-input-mouse driver can
handle them, that isn't done and can't be done properly with ums(4)
because of mouse(4) protocol limitations.

Approved by: re (kib)

12 years agoIn some cases, at least on Marvell 88SE912x controllers, Current Command
Alexander Motin [Fri, 29 Jul 2011 20:35:23 +0000 (20:35 +0000)]
In some cases, at least on Marvell 88SE912x controllers, Current Command
Slot field of the PxCMD register may point to an empty command slot.
That breaks command timeout detection logic, making impossible to find
what command actually caused timeout, and leading to infinite wait.
Workaround that by checking whether pointed command slot is really used
and can timeout in its time. And if not, fallback to the dumb algorithm
used with FBS -- let all commands to time out and then fail all of them.

Approved by: re (kib)
MFC after: 1 week

12 years agoAdd control for ATA disk read-ahead, alike to the previously added write
Alexander Motin [Fri, 29 Jul 2011 20:32:27 +0000 (20:32 +0000)]
Add control for ATA disk read-ahead, alike to the previously added write
cache control. Some controller BIOS'es tend to disable read-ahead, that
dramatically reduces read performance. Previously ata(4) always enabled
read-ahead unconditionally.

Approved by: re (kib)

12 years agoIn some cases failed SATA disks may report their presence, but don't
Alexander Motin [Fri, 29 Jul 2011 20:30:28 +0000 (20:30 +0000)]
In some cases failed SATA disks may report their presence, but don't
respond to any commands. I've found that because of multiple command
retries, each of which cause 30s timeout, bus reset and another retry or
requeue for many commands, it may take ages to eventually drop the
failed device. The odd thing is that those retries continue even after
XPT considered device as dead and invalidated it.

This patch makes cam_periph_error() to block any command retries after
periph was marked as invalid. With that patch all activity completes in
1-2 minutes, just after several timeouts, required to consider device
death. This should make ZFS, gmirror, graid, etc. operation more robust.

Reviewed by: mjacob@ on scsi@

Approved by: re (kib)

12 years agoProperly initialize an error variable to avoid returning uninitialized
John Baldwin [Fri, 29 Jul 2011 20:24:04 +0000 (20:24 +0000)]
Properly initialize an error variable to avoid returning uninitialized
data when 'show drives' succeeds, often resulting in a failing exit code
even though the command worked fine.

Reviewed by: bz
Approved by: re (kib)
MFC after: 3 days

12 years ago- Send the RELSIM_ADJUST_OPENINGS in response to a MPI_EVENT_QUEUE_FULL using
Marius Strobl [Fri, 29 Jul 2011 18:38:31 +0000 (18:38 +0000)]
- Send the RELSIM_ADJUST_OPENINGS in response to a MPI_EVENT_QUEUE_FULL using
  the right SIM in case the HBA is RAID-capable but the target in question is
  not a hot spare or member of a RAID volume.
- Report the loss and addition of SAS and SATA targets detected via PHY link
  status changes and signalled by MPI_EVENT_SAS_DEVICE_STATUS_CHANGE to cam(4)
  as lost devices and trigger rescans as appropriate. Without this it can take
  quite some time until a lost device actually is no longer tried to be used,
  if it ever stops. [1]
- Handle MPI_EVENT_IR2, MPI_EVENT_LOG_ENTRY_ADDED, MPI_EVENT_SAS_DISCOVERY
  and MPI_EVENT_SAS_PHY_LINK_STATUS silently as these serve no additional
  purpose beyond adding cryptic entries to logs.

Thanks to Hans-Joerg Sirtl for providing one of the HBAs these changes were
developed with and RIP to the mainboard that didn't survive testing them.

PR: 157534 [1]
Approved by: re (kib)
MFC after: 2 weeks

12 years ago- Staticize functions as appropriate and comment out unused ones.
Marius Strobl [Fri, 29 Jul 2011 18:35:10 +0000 (18:35 +0000)]
- Staticize functions as appropriate and comment out unused ones.
- Sprinkle some const where appropriate.
- Consistently use target_id_t for the target parameter of mpt_map_physdisk()
  and mpt_is_raid_volume().
- Fix some whitespace bugs.

Approved by: re (kib)

12 years agoRevert my last change to this file, as BETA1 is not announced yet.
Benedict Reuschling [Thu, 28 Jul 2011 12:23:32 +0000 (12:23 +0000)]
Revert my last change to this file, as BETA1 is not announced yet.

Pointed out by: kib
Pointy hat to:  me
Approved by: re (kib, implicit)

12 years agoAdd a section to the jail chapter that explains why it is not
Benedict Reuschling [Thu, 28 Jul 2011 11:41:55 +0000 (11:41 +0000)]
Add a section to the jail chapter that explains why it is not
recommended to allow root users in the jail to access the host system.

PR: docs/156853
Submitted by: crees
Patch by: crees
Approved by: re (kib) for BETA1

12 years agoTo inet or not two inet. Unbreak static IPv4 configuration. If you tried
Bjoern A. Zeeb [Thu, 28 Jul 2011 03:01:22 +0000 (03:01 +0000)]
To inet or not two inet.  Unbreak static IPv4 configuration.  If you tried
you were stuck in an endless loop.

Reported by: kensmith
Approved by: re (kib) for BETA1
Pointy hat to: bz - wonder why I had not tested legacy IP thoroughly..

12 years agoLooks like we're ready for 9.0-BETA1 builds.
Ken Smith [Tue, 26 Jul 2011 04:00:00 +0000 (04:00 +0000)]
Looks like we're ready for 9.0-BETA1 builds.

Approved by: re (implicit)

12 years agoDocument the tftp.blksize variable added in src/lib/libstand/tftp.c.
Craig Rodrigues [Mon, 25 Jul 2011 21:52:17 +0000 (21:52 +0000)]
Document the tftp.blksize variable added in src/lib/libstand/tftp.c.

Approved by: re (kib)
Requested by: maxim

12 years agoThis a follow up commit from r224216 for powerpc 32-bit. Increase
Andreas Tobler [Mon, 25 Jul 2011 20:10:01 +0000 (20:10 +0000)]
This a follow up commit from r224216 for powerpc 32-bit. Increase
the storage size for sintrcnt/sintrnames to .long.

Reviewed by: nwhitehorn
Approved by: re (kib)

12 years agoremove RESTARTABLE_PANICS option
Andriy Gapon [Mon, 25 Jul 2011 09:12:48 +0000 (09:12 +0000)]
remove RESTARTABLE_PANICS option

This is done per request/suggestion from John Baldwin
who introduced the option.  Trying to resume normal
system operation after a panic is very unpredictable
and dangerous.  It will become even more dangerous
when we allow a thread in panic(9) to penetrate all
lock contexts.
I understand that the only purpose of this option was
for testing scenarios potentially resulting in panic.

Suggested by: jhb
Reviewed by: attilio, jhb
X-MFC-After: never
Approved by: re (kib)

12 years agoMove the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flag
Kirk McKusick [Sun, 24 Jul 2011 18:27:09 +0000 (18:27 +0000)]
Move the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flag
so that it is visible to userland programs. This change enables
the `mount' command with no arguments to be able to show if a
filesystem is mounted using journaled soft updates as opposed
to just normal soft updates.

Approved by: re (bz)

12 years agoThis update changes the mnt_flag field in the mount structure from
Kirk McKusick [Sun, 24 Jul 2011 17:43:09 +0000 (17:43 +0000)]
This update changes the mnt_flag field in the mount structure from
32 bits to 64 bits and eliminates the unused mnt_xflag field.  The
existing mnt_flag field is completely out of bits, so this update
gives us room to expand. Note that the f_flags field in the statfs
structure is already 64 bits, so the expanded mnt_flag field can
be exported without having to make any changes in the statfs structure.

Approved by: re (bz)

12 years agoDocument the potential for jail escape.
Glen Barber [Sun, 24 Jul 2011 03:34:38 +0000 (03:34 +0000)]
Document the potential for jail escape.

Submitted by: Vedad KAJTAZ (vedad % kajtaz net)
PR: 142341
Reviewed by: bz, rwatson
Rewording by: rwatson
Approved by: re (kensmith)
MFC after: 3 days

12 years agoFix various broken links in manual pages.
Glen Barber [Sat, 23 Jul 2011 22:55:32 +0000 (22:55 +0000)]
Fix various broken links in manual pages.

Submitted by: Michiel Overtoom (motoom % xs4all nl)
PR: 159130 159131 159132 159133 159134
159135 159136 159137 158138 159144
Approved by: re (kib)
MFC after: 3 days

12 years agoDo not try to execute FLUSHCACHE on close and print extra messages for
Alexander Motin [Sat, 23 Jul 2011 22:11:40 +0000 (22:11 +0000)]
Do not try to execute FLUSHCACHE on close and print extra messages for
invalidated (considered lost) ada device. Exactly same already done for
the da devices.

Approved by: re (kib)
MFC after: 1 week

12 years agoRevert the apparently-unecessary module_path twiddling from r223917
Doug Barton [Fri, 22 Jul 2011 21:08:19 +0000 (21:08 +0000)]
Revert the apparently-unecessary module_path twiddling from r223917

Approved by: re (kib)

12 years agoDefault debugging error messages to off for journaled soft updates sysctls.
Kirk McKusick [Fri, 22 Jul 2011 18:03:33 +0000 (18:03 +0000)]
Default debugging error messages to off for journaled soft updates sysctls.
Delete limiting on output of these sysctls.

Approved by: re (kib)

12 years agoFix the following bugs related to the SCTP support of netstat:
Michael Tuexen [Fri, 22 Jul 2011 16:42:12 +0000 (16:42 +0000)]
Fix the following bugs related to the SCTP support of netstat:
* Correctly handle -a.
* -A isn't supported.
* Show all closed 1-to-1 and 1-to-many style sockets.
* Show all listening 1-to-many style sockets.
* Use consistent formatting for -W.

PR: 150642
Approved by: re@
MFC after: 4 weeks.

12 years ago - Use mutex to serialize index/data register pair usage, when
Alexander Motin [Fri, 22 Jul 2011 16:37:04 +0000 (16:37 +0000)]
 - Use mutex to serialize index/data register pair usage, when
accessing SATA registers. Unserialized access under heavy load caused
wrong speed reporting and potentially could cause device loss.
 - To free memory and other resources (including above), allocated
during chipinit() method call on attach, add new chipdeinit() method,
called during driver detach.

Submitted by:   Andrew Boyer <aboyer@averesystems.com> (initial version)
Approved by: re (kib)
MFC after: 1 week

12 years agoAdd missing XHCI early takeover code. The XHCI takeover code
Hans Petter Selasky [Fri, 22 Jul 2011 15:37:23 +0000 (15:37 +0000)]
Add missing XHCI early takeover code. The XHCI takeover code
is supposed to disable the BIOS from using the XHCI controller
after bootup.

Approved by: re (kib)
Reported by: Mike Tancsa
MFC after: 1 week

12 years agoTurn on AUDIT_ARG_RIGHTS() for cap_new(2).
Jonathan Anderson [Fri, 22 Jul 2011 12:50:21 +0000 (12:50 +0000)]
Turn on AUDIT_ARG_RIGHTS() for cap_new(2).

Now that the code is in place to audit capability method rights, start
using it to audit the 'rights' argument to cap_new(2).

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc

12 years agoImplement a basic radar parameter API in the dfs_null module.
Adrian Chadd [Fri, 22 Jul 2011 09:39:49 +0000 (09:39 +0000)]
Implement a basic radar parameter API in the dfs_null module.

Since no actual radar data is ever handled, this won't
do anything. It's mostly here as a reference for those who
wish to experiment with radar detection.

Approved by: re (kib)

12 years agoAdd athradar, an implementation of the radar parameter diagnostic
Adrian Chadd [Fri, 22 Jul 2011 09:34:31 +0000 (09:34 +0000)]
Add athradar, an implementation of the radar parameter diagnostic
API.

This is a reimplementation from scratch.

Approved by: re (kib)

12 years agoDeclare more capability method rights.
Jonathan Anderson [Thu, 21 Jul 2011 21:08:33 +0000 (21:08 +0000)]
Declare more capability method rights.

This is a complete set of rights that can be held in a capability's
rights mask.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc

12 years agoAllow non-fixed endpoints for a producer address range if the length of
John Baldwin [Thu, 21 Jul 2011 20:43:43 +0000 (20:43 +0000)]
Allow non-fixed endpoints for a producer address range if the length of
the resource covers the entire range.  Some BIOSes appear to mark
endpoints as non-fixed incorrectly (non-fixed endpoints are supposed to
be used in _PRS when OSPM is allowed to allocate a certain chunk of
address space within a larger range, I don't believe it is supposed to be
used for _CRS).

Approved by: re (kib)

12 years agoRemove incorrect attribution.
George V. Neville-Neil [Thu, 21 Jul 2011 20:06:14 +0000 (20:06 +0000)]
Remove incorrect attribution.

Approved by: re (kib)
Pointed out by: brueffer
Pointy hat to: gnn

12 years agoBring the code more in-line with OpenSolaris source to
Xin LI [Thu, 21 Jul 2011 20:02:22 +0000 (20:02 +0000)]
Bring the code more in-line with OpenSolaris source to
ease future port.

Reviewed by: pjd, mm
Approved by: re (kib)

12 years agoA different implementation of r224231 proposed by pjd@,
Xin LI [Thu, 21 Jul 2011 20:01:51 +0000 (20:01 +0000)]
A different implementation of r224231 proposed by pjd@,
which does not require change in the znode structure.
Specifically, it queries rdev from the znode in the
same sa_bulk_lookup already done in zfs_getattr().

Submitted by: pjd (with some revisions)
Reviewed by: pjd, mm
Approved by: re (kib)

12 years agoFix `diskinfo -t` operation for disks smaller then 8GB or bigger then 2TB.
Alexander Motin [Thu, 21 Jul 2011 19:39:40 +0000 (19:39 +0000)]
Fix `diskinfo -t` operation for disks smaller then 8GB or bigger then 2TB.
Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array.

Approved by: re (kib)

12 years agoMake both stpcpy and strcpy be assembly language implementations
George V. Neville-Neil [Thu, 21 Jul 2011 16:32:13 +0000 (16:32 +0000)]
Make both stpcpy and strcpy be assembly language implementations
on amd64.

Submitted by: Guillaume Morin (guillaume at morinfr.org)
Reviewed by: kib, jhb
Approved by: re (bz)
MFC after: 1 month

12 years agoThis links in the ath dfs ioctl into the driver and defines the
Adrian Chadd [Thu, 21 Jul 2011 14:25:12 +0000 (14:25 +0000)]
This links in the ath dfs ioctl into the driver and defines the
ioctl interface for DFS modules to use.

Since there's no open source dfs code yet, this doesn't introduce any
operational changes.

Approved by: re (kib)

12 years agoModify the radar API a little to be easier to "change" via run-time
Adrian Chadd [Thu, 21 Jul 2011 14:16:42 +0000 (14:16 +0000)]
Modify the radar API a little to be easier to "change" via run-time
tools.

* introduce pe_enabled, which (will) indicate whether the radar
  detection stuff is enabled or not. Right now it's incorrectly
  set, based on something previously written. I'll sort it out
  later.

* Don't set HAL_PHYERR_PARAM_ENABLE in pe_relstep to say whether
  radar detection is on.

* Return whether blockradar, fir128 and enmaxrssi is enabled.

* Change some of the phyerr params to be integers rather than
  HAL_BOOL so they can be set to the NOPARAM value when the
  setup function is called. This is in line with other radar
  parameters.

* Add new configuration parameters for fir128, blockradar and
  enmaxrssi, rather than defaulting to off, on and on respectively.

Approved by: re (kib)

12 years agoBreak out the PLL setup into (mostly) per-chip methods, rather than
Adrian Chadd [Thu, 21 Jul 2011 08:35:10 +0000 (08:35 +0000)]
Break out the PLL setup into (mostly) per-chip methods, rather than
polluting the AR5416 code with later chipset support.

Note: ar9280InitPLL() supports Merlin (AR9280) and later (AR9285, AR9287.)

Submitted by: ssgriffonuser@gmail.com
Approved by: re (kib)

12 years agoThis re-enables HT40 channels for use when DFS is enabled.
Adrian Chadd [Thu, 21 Jul 2011 08:31:55 +0000 (08:31 +0000)]
This re-enables HT40 channels for use when DFS is enabled.

These should be disabled for the AR5416 in hostap/mesh/ibss mode,
as the AR5416 doesn't have support for radar detection on the
ext channel of a HT40 setup. Later chips do.

Approved by: re (kib)

12 years agoAdd new USB ID to u3g driver.
Hans Petter Selasky [Thu, 21 Jul 2011 06:55:43 +0000 (06:55 +0000)]
Add new USB ID to u3g driver.

Approved by: re (kib)
Submitted by: Nick Hibma
MFC after: 3 days

12 years agoMerge from r224217:
Marius Strobl [Wed, 20 Jul 2011 18:51:18 +0000 (18:51 +0000)]
Merge from r224217:
Bump MAXCPU to 64.

Approved by: re (kib)

12 years agoAdd a new field to in-core znode, z_rdev, to represent device nodes.
Xin LI [Wed, 20 Jul 2011 16:53:32 +0000 (16:53 +0000)]
Add a new field to in-core znode, z_rdev, to represent device nodes.

PR: kern/159010
Reviewed by: mm@
Approved by: re (kib)
MFC after: 2 weeks

12 years agoNote that the "kernel" variable in loader.conf is the name of a directory
John Baldwin [Wed, 20 Jul 2011 15:18:24 +0000 (15:18 +0000)]
Note that the "kernel" variable in loader.conf is the name of a directory
containing a kernel under /boot and that it's default value is "kernel"
not "/boot/kernel/kernel".

PR: docs/158992
Reported by: Wayne Mitchell  wayne.mitchell.iz at gmail
Approved by: re (kib)
MFC after: 1 week

12 years agoAdd cap_new(2) and cap_getrights(2) symbols to libc.
Jonathan Anderson [Wed, 20 Jul 2011 13:29:39 +0000 (13:29 +0000)]
Add cap_new(2) and cap_getrights(2) symbols to libc.

These system calls have already been implemented in the kernel; now we
hook up libc symbols so userspace can drive them.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc

12 years agoThese two are ath_hal regulatory domain updates from the Atheros
Adrian Chadd [Wed, 20 Jul 2011 12:46:58 +0000 (12:46 +0000)]
These two are ath_hal regulatory domain updates from the Atheros
reference driver.

* Australia should use FCC3_WORLD
* Add some new SKUs; these are just the EEPROM values and haven't been
  fully defined yet. As such they won't affect anything.

Obtained from: Atheros
Approved by: re (kib)

12 years agoExport capability information via sysctls.
Jonathan Anderson [Wed, 20 Jul 2011 09:53:35 +0000 (09:53 +0000)]
Export capability information via sysctls.

When reporting on a capability, flag the fact that it is a capability,
but also unwrap to report all of the usual information about the
underlying file.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc

12 years agoThis patch removes a check in ifconfig which disables HT/40 channels
Adrian Chadd [Wed, 20 Jul 2011 05:59:28 +0000 (05:59 +0000)]
This patch removes a check in ifconfig which disables HT/40 channels
on frequency bands with DFS. All Atheros chipsets >= AR9001 support
radar event detection on HT40 extension channels.

This should be a chipset specific item rather than enforced in the
regulatory domain database.

In addition, it's irrelevant for STA mode, as the radar detection is
done by the access point, not the STA.

Approved by: re (kib)

12 years agoFix brokenness introduced by my last commit.
Adrian Chadd [Wed, 20 Jul 2011 00:36:47 +0000 (00:36 +0000)]
Fix brokenness introduced by my last commit.

Approved by: re (implicit)

13 years agoRemove explicit MAXCPU usage from sys/pcpu.h avoiding a namespace
Attilio Rao [Tue, 19 Jul 2011 16:50:55 +0000 (16:50 +0000)]
Remove explicit MAXCPU usage from sys/pcpu.h avoiding a namespace
pollution.  That is a step further in the direction of building correct
policies for userland and modules on how to deal with the number of
maxcpus at runtime.

Reported by: jhb
Reviewed and tested by: pluknet
Approved by: re (kib)

13 years agoThis sets the BSS channel for each VAP for the given interface.
Adrian Chadd [Tue, 19 Jul 2011 15:24:44 +0000 (15:24 +0000)]
This sets the BSS channel for each VAP for the given interface.
It's only relevant in STA mode.

The CSA forces a channel switch for the interface, but doesn't update
the VAP channel.

Approved by: re (bz)

13 years agoThis patch enables listing DFS related flags when 'ifconfig -v wlanX
Adrian Chadd [Tue, 19 Jul 2011 15:22:35 +0000 (15:22 +0000)]
This patch enables listing DFS related flags when 'ifconfig -v wlanX
list channel' is run. The following new options are introduced:

* D: channel requires DFS
* R: channel has a radar event
* I: channel has detected inteference
* C: the CAC period has completed on a channel that requires it (ie,
  DFS + PASSIVE.)

It's relevant for developing, debugging and using the DFS and
interference options.

Approved by: re (bz)

13 years agoRemove pc_name member of struct pcpu.
Attilio Rao [Tue, 19 Jul 2011 14:57:59 +0000 (14:57 +0000)]
Remove pc_name member of struct pcpu.
pc_name is only included when KTR option is and it does introduce a
subdle KBI breakage that totally breaks vmstat when world and kernel are
not in sync.
Besides, it is not used somewhere.

In collabouration with: pluknet
Reviewed by: jhb
Approved by: re (kib)

13 years agoBump MAXCPU for amd64, ia64 and XLP mips appropriately.
Attilio Rao [Tue, 19 Jul 2011 13:00:30 +0000 (13:00 +0000)]
Bump MAXCPU for amd64, ia64 and XLP mips appropriately.
From now on, default values for FreeBSD will be 64 maxiumum supported
CPUs on amd64 and ia64 and 128 for XLP. All the other architectures
seem already capped appropriately (with the exception of sparc64 which
needs further support on jalapeno flavour).

Bump __FreeBSD_version in order to reflect KBI/KPI brekage introduced
during the infrastructure cleanup for supporting MAXCPU > 32. This
covers cpumask_t retiral too.

The switch is considered completed at the present time, so for whatever
bug you may experience that is reconducible to that area, please report
immediately.

Requested by: marcel, jchandra
Tested by: pluknet, sbruno
Approved by: re (kib)

13 years agoOn 64 bit architectures size_t is 8 bytes, thus it should use an 8 bytes
Attilio Rao [Tue, 19 Jul 2011 12:41:57 +0000 (12:41 +0000)]
On 64 bit architectures size_t is 8 bytes, thus it should use an 8 bytes
storage.
Fix the sintrcnt/sintrnames specification.

No MFC is previewed for this patch.

Reported, reviewed and tested by: marcel
Approved by: re (kib)

13 years agoAdd the possibility to specify from kernel configs MAXCPU value.
Attilio Rao [Tue, 19 Jul 2011 00:37:24 +0000 (00:37 +0000)]
Add the possibility to specify from kernel configs MAXCPU value.
This patch is going to help in cases like mips flavours where you
want a more granular support on MAXCPU.

No MFC is previewed for this patch.

Tested by: pluknet
Approved by: re (kib)

13 years agoRework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'
John Baldwin [Mon, 18 Jul 2011 21:15:47 +0000 (21:15 +0000)]
Rework the dynamic per-CPU stats code a bit.  Always set 'statics->ncpus'
to the maximum number of CPUs to ensure that lcpustates[] array is always
allocated to the maximum size.  Previously, if top was started without
per-CPU stats it would allocate a smaller lcpustates[] array.  When
per-CPU stats were then enabled, it would overflow the array and trash
the cpustates_columns[] array causing the CPU stats to be printed in the
wrong locations.

Approved by: re (kib)
MFC after: 1 week

13 years agoTweak the interactive description of CPU vs WCPU.
John Baldwin [Mon, 18 Jul 2011 21:08:14 +0000 (21:08 +0000)]
Tweak the interactive description of CPU vs WCPU.

PR: bin/158819
Submitted by: arundel
Approved by: re (kib)

13 years agoConstantly print the command name and if set include the thread
Bjoern A. Zeeb [Mon, 18 Jul 2011 20:57:43 +0000 (20:57 +0000)]
Constantly print the command name and if set include the thread
name in per-thread mode.

Discussed with: jhb
Obtained from: Ed Maste at Sandvine Incorporated
Sponsored by: Sandvine Incorporated
MFC after: 1 week
Approved by: re (kib)

13 years agoFix building of 32-bit compat libraries on amd64 with clang, and using
Dimitry Andric [Mon, 18 Jul 2011 20:07:29 +0000 (20:07 +0000)]
Fix building of 32-bit compat libraries on amd64 with clang, and using
-g, by reverting r219139.  The LLVM PR referenced in that revision was
fixed in the mean time, and we imported a clang snapshot soon
afterwards, so the temporary workaround of disabling clang's integrated
assembler is no longer needed.

In this particular case, using e.g. DEBUG_FLAGS=-g causes clang to
output certain directives into assembly that our version of GNU as
chokes on.

Reported by: dougb
Approved by: re (kib)

13 years agoRename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
Bjoern A. Zeeb [Mon, 18 Jul 2011 20:06:15 +0000 (20:06 +0000)]
Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
Provide backward compatibility defines under BURN_BRIDGES.

Suggested by: jhb
Reviewed by: emaste
Sponsored by: Sandvine Incorporated
Approved by: re (kib)

13 years agosintrcnt/sintrnames is the address of the size, not the actual size.
Sergey Kandaurov [Mon, 18 Jul 2011 19:42:18 +0000 (19:42 +0000)]
sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size.
That fixes vmstat -i with kvm backend.

Submitted by: peter
Approved by: re (kib)

13 years agoDisable gvmat64.S, the assembler version of longest_match for now.
Xin LI [Mon, 18 Jul 2011 19:23:50 +0000 (19:23 +0000)]
Disable gvmat64.S, the assembler version of longest_match for now.

PR: kern/154073
MFC after: 3 days
Approved by: re (kib)

13 years ago- Export each thread's individual resource usage in in struct kinfo_proc's
John Baldwin [Mon, 18 Jul 2011 17:33:08 +0000 (17:33 +0000)]
- Export each thread's individual resource usage in in struct kinfo_proc's
  ki_rusage member when KERN_PROC_INC_THREAD is passed to one of the
  process sysctls.
- Correctly account for the current thread's cputime in the thread when
  doing the runtime fixup in calcru().
- Use TIDs as the key to lookup the previous thread to compute IO stat
  deltas in IO mode in top when thread display is enabled.

Reviewed by: kib
Approved by: re (kib)

13 years ago- Remove the eintrcnt/eintrnames usage and introduce the concept of
Attilio Rao [Mon, 18 Jul 2011 15:19:40 +0000 (15:19 +0000)]
- Remove the eintrcnt/eintrnames usage and introduce the concept of
  sintrcnt/sintrnames which are symbols containing the size of the 2
  tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
  This area can be widely improved by applying the same to other
  architectures and likely finding an unified approach among them and
  move the whole code to be MI. More work in this area is expected to
  happen fairly soon.

No MFC is previewed for this patch.

Tested by: pluknet
Reviewed by: jhb
Approved by: re (kib)

13 years agoEnable NEW_PCIB by default on ia64.
John Baldwin [Mon, 18 Jul 2011 14:05:14 +0000 (14:05 +0000)]
Enable NEW_PCIB by default on ia64.

Approved by: re (kib), marcel

13 years agoImplement bus_adjust_resource() for the ia64 nexus driver.
John Baldwin [Mon, 18 Jul 2011 14:04:37 +0000 (14:04 +0000)]
Implement bus_adjust_resource() for the ia64 nexus driver.

Reviewed by: marcel
Approved by: re (kib)

13 years agoProvide ability to audit cap_rights_t arguments.
Jonathan Anderson [Mon, 18 Jul 2011 12:58:18 +0000 (12:58 +0000)]
Provide ability to audit cap_rights_t arguments.

We wish to be able to audit capability rights arguments; this code
provides the necessary infrastructure.

This commit does not, of itself, turn on such auditing for any
system call; that should follow shortly.

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc

13 years agoOnly the USB root HUB thread is allowed to attach and detach drivers
Hans Petter Selasky [Mon, 18 Jul 2011 12:03:58 +0000 (12:03 +0000)]
Only the USB root HUB thread is allowed to attach and detach drivers
to and from USB devices. Remove related DEVMETHOD() lines from USB
drivers.

Reported by: YongHyeon PYUN
MFC after: 3 days

13 years agoIf compiling RESCUE always ignore feature_present(3) calls so that
Bjoern A. Zeeb [Mon, 18 Jul 2011 10:29:16 +0000 (10:29 +0000)]
If compiling RESCUE always ignore feature_present(3) calls so that
a /rescue/ifconfig more modern than the kernel could still configure
IPv4 or IPv6 addresses.

Reported by: Andrzej Tobola (ato iem.pw.edu.pl)
Reported by: gcooper
MFC after: 1 day
X-MFC: will not MFC any time soon, just reminder for r222527

13 years agoZFS tries to allocate blocks evenly across all devices. This means when
Martin Matuska [Mon, 18 Jul 2011 08:29:49 +0000 (08:29 +0000)]
ZFS tries to allocate blocks evenly across all devices. This means when
devices are imbalanced zfs will lots of CPU searching for space on devices
which tend to be pretty full. It should instead fail quickly on the full
devices and move onto devices which have more availability.

New loader tunable: vfs.zfs.mg_alloc_failures (min = 8)

Illumos-gate changeset: 13379:4df42cc92254

Obtained from: Illumos (Bug #1051)
MFC after: 2 weeks

13 years agoThe named.reload script is no longer useful in the age of rc.d
Doug Barton [Mon, 18 Jul 2011 08:10:49 +0000 (08:10 +0000)]
The named.reload script is no longer useful in the age of rc.d

13 years agoResurrect the ZFS "aclmode" property
Martin Matuska [Mon, 18 Jul 2011 07:16:44 +0000 (07:16 +0000)]
Resurrect the ZFS "aclmode" property
Change default of "aclmode" to "discard".

Illumos-gate changeset: 13370:8c04143bd318

Obtained from: Illumos (Feature #742)
MFC after: 2 weeks

13 years agocddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
Justin T. Gibbs [Mon, 18 Jul 2011 03:18:06 +0000 (03:18 +0000)]
cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
cddl/contrib/opensolaris/cmd/zpool/zpool.8:
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c:
Add the "zpool labelclear" command.  This command can be
used to wipe the label data from a drive that is not
active in a pool.  The optional "-f" argument can be
used to treat an exported or foreign vdev as "inactive"
thus allowing its label information to be cleared.

13 years agoCorrect reporting of missing leaf vdevs so that the GUID required to
Justin T. Gibbs [Mon, 18 Jul 2011 03:00:59 +0000 (03:00 +0000)]
Correct reporting of missing leaf vdevs so that the GUID required to
perform pool actions is always displayed.

cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
The "zpool status" command reports the "last seen at"
device node path when the vdev name is being reported
by GUID.  Augment this code to assume a GUID is reported
when a device goes missing after initial boot in addition
to the previous behavior of doing this for devices that
aren't seen at boot.

cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c:
In zpool_vdev_name(), report recently missing devices
by GUID.  There is no guarantee they will return at
their previous location.

13 years agocddl/contrib/opensolaris/lib/libzfs/common/libzfs.h:
Justin T. Gibbs [Mon, 18 Jul 2011 02:13:21 +0000 (02:13 +0000)]
cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h:
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c:
o Add zpool_pool_state_to_name() API to libzfs which converts a
  pool_state_t into a user consumable string.
o While here, correct constness of make zpool_state_to_name()
  and zpool_label_disk().

MFD after: 1 week

13 years agoDefine two new sysctl node flags: CTLFLAG_CAPRD and CTLFLAG_CAPRW, which
Robert Watson [Sun, 17 Jul 2011 23:05:24 +0000 (23:05 +0000)]
Define two new sysctl node flags: CTLFLAG_CAPRD and CTLFLAG_CAPRW, which
may be jointly referenced via the mask CTLFLAG_CAPRW.  Sysctls with these
flags are available in Capsicum's capability mode; other sysctl nodes are
not.

Flag several useful sysctls as available in capability mode, such as memory
layout sysctls required by the run-time linker and malloc(3).  Also expose
access to randomness and available kernel features.

A few sysctls are enabled to support name->MIB conversion; these may leak
information to capability mode by virtue of providing resolution on names
not flagged for access in capability mode.  This is, generally, not a huge
problem, but might be something to resolve in the future.  Flag these cases
with XXX comments.

Submitted by: jonathan
Sponsored by: Google, Inc.

13 years agoFix accidential commit part:
Martin Matuska [Sun, 17 Jul 2011 21:57:10 +0000 (21:57 +0000)]
Fix accidential commit part:
Include "bsdtar_platform.h" instead of "lafe_platform.h"

MFC after: 2 weeks

13 years agoRevert r222135 by allowing controller reinitialization. Due to
Pyun YongHyeon [Sun, 17 Jul 2011 21:54:51 +0000 (21:54 +0000)]
Revert r222135 by allowing controller reinitialization.  Due to
unknown reason Apple UniNorth2 gem(4) device required manual
interface down/up operation after r222135.  Even though this is not
correct thing and I don't like to revert it but it would be better
than breaking gem(4) on PPC.  This should be revisited.

PR: kern/157405

13 years agoFix a LOR between hwpmc and the kernel linker. When a system-wide
Ryan Stone [Sun, 17 Jul 2011 21:53:42 +0000 (21:53 +0000)]
Fix a LOR between hwpmc and the kernel linker.  When a system-wide
sampling mode PMC is allocated, hwpmc calls linker_hwpmc_list_objects()
while already holding an exclusive lock on pmc-sx lock.  list_objects()
tries to acquire an exclusive lock on the kld_sx lock.  When a KLD module
is loaded or unloaded successfully, kern_kld(un)load calls into the pmc
hook while already holding an exclusive lock on the kld_sx lock.  Calling
the pmc hook requires acquiring a shared lock on the pmc-sx lock.

Fix this by only acquiring a shared lock on the kld_sx lock in
linker_hwpmc_list_objects(), and also downgrading to a shared lock on the
kld_sx lock in kern_kld(un)load before calling into the pmc hook.  In
kern_kldload this required moving some modifications of the linker_file_t
to happen before calling into the pmc hook.

This fixes the deadlock by ensuring that the hwpmc -> list_objects() case
is always able to proceed.  Without this patch, I was able to deadlock a
multicore system within minutes by constantly loading and unloading an KLD
module while I simultaneously started a sampling mode PMC in a loop.

MFC after: 1 month

13 years agoAppend to CPIO_SRCS instead of using TAR_SRCS,
Martin Matuska [Sun, 17 Jul 2011 21:52:55 +0000 (21:52 +0000)]
Append to CPIO_SRCS instead of using TAR_SRCS,
the variable name is misleading

MFC after: 2 weeks

13 years agoUpdate bsdcpio to 2.8.4
Martin Matuska [Sun, 17 Jul 2011 21:42:22 +0000 (21:42 +0000)]
Update bsdcpio to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by: kientzle
MFC after: 2 weeks

13 years agoUpdate bsdtar to 2.8.4
Martin Matuska [Sun, 17 Jul 2011 21:33:15 +0000 (21:33 +0000)]
Update bsdtar to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by: kientzle
MFC after: 2 weeks

13 years ago- Update libarchive to 2.8.4
Martin Matuska [Sun, 17 Jul 2011 21:27:38 +0000 (21:27 +0000)]
- Update libarchive to 2.8.4
- Add support for extracting xar and rpm archives
- Add libarchive_fe subdir (common code for tar and cpio)

Approved by: kientzle
MFC after: 2 weeks

13 years agoAdd spares to the network stack for FreeBSD-9:
Bjoern A. Zeeb [Sun, 17 Jul 2011 21:15:20 +0000 (21:15 +0000)]
Add spares to the network stack for FreeBSD-9:
- TCP keep* timers
- TCP UTO (adjust from what was there already)
- netmap
- route caching
- user cookie (temporary to allow for the real fix)

Slightly re-shuffle struct ifnet moving fields out of the middle
of spares and to better align.

Discussed with: rwatson (slightly earlier version)

13 years agoThe MBR uses a 32-bit unsigned integer to store the size of a slice, but
Ryan Stone [Sun, 17 Jul 2011 21:08:16 +0000 (21:08 +0000)]
The MBR uses a 32-bit unsigned integer to store the size of a slice, but
fdisk(1) internally uses a signed int.  Should a user attempt to specify
a slice containing more than 2^31 - 1 sectors, an error will be reported
on systems with sizeof(long) == 4 and the slice size will be silently
truncated on systems with sizeof(long) > 4.

Instead use an unsigned long to store the slice size in fdisk(1).  This
allows the user to specify a slice size up to the maximum permitted by
the MBR on-disk format and does not have any problems with silent
truncation should the use specify an slice size larger than 2^32 on systems
with sizeof(long) > 4.

Submitted by: Mark Johnston (markjdb AT gmail DOT com)
MFC after: 2 weeks

13 years agoAdd a closing '.El' tag.
Glen Barber [Sun, 17 Jul 2011 20:47:34 +0000 (20:47 +0000)]
Add a closing '.El' tag.

Found by: manlint

13 years agoAdd some spare fields to the g_class and g_geom structures needed to implement
Pawel Jakub Dawidek [Sun, 17 Jul 2011 20:35:30 +0000 (20:35 +0000)]
Add some spare fields to the g_class and g_geom structures needed to implement
direct I/O handling and provider's property changes handling.

13 years agoUpgrade our copy of llvm/clang to r135360, from upstream's trunk.
Dimitry Andric [Sun, 17 Jul 2011 19:51:40 +0000 (19:51 +0000)]
Upgrade our copy of llvm/clang to r135360, from upstream's trunk.

13 years ago- Improve interface list handling. The rtadvd(8) now supports dynamically-
Hiroki Sato [Sun, 17 Jul 2011 19:24:54 +0000 (19:24 +0000)]
- Improve interface list handling.  The rtadvd(8) now supports dynamically-
  added/removed interfaces in a more consistent manner and reloading the
  configuration file.

- Implement burst unsolicited RA sending into the internal RA timer framework
  when AdvSendAdvertisements and/or configuration entries are changed as
  described in RFC 4861 6.2.4.  This fixes issues that make termination of the
  rtadvd(8) daemon take very long time.

  An interface now has three internal states, UNCONFIGURED, TRANSITIVE, or
  CONFIGURED, and the burst unsolicited sending happens in TRANSITIVE.
  See rtadvd.h for the details.

- rtadvd(8) now accepts non-existent interfaces as well in the command line.

- Add control socket support and rtadvctl(8) utility to show the RA information
  in rtadvd(8).  Dumping by SIGUSR1 has been removed in favor of it.

13 years agoComment out KDB/DDB related options for N32 kernel.
Jayachandran C. [Sun, 17 Jul 2011 18:51:51 +0000 (18:51 +0000)]
Comment out KDB/DDB related options for N32 kernel.

DDB files have warnings in this ABI which will break the kernel build
unless Werror is ignored

Reported by: bz

13 years agoCorrect the description of struct pfioc_state_kill.
Bjoern A. Zeeb [Sun, 17 Jul 2011 17:33:39 +0000 (17:33 +0000)]
Correct the description of struct pfioc_state_kill.

PR: kern/158997
Submitted by: ohauer

13 years agoCorrect small typo in a do{}while(0) define
Dmitry Morozovsky [Sun, 17 Jul 2011 17:12:17 +0000 (17:12 +0000)]
Correct small typo in a do{}while(0) define

Approved by: kib
MFC after: 2 weeks