Commit Graph

164755 Commits

Author SHA1 Message Date
Kirk McKusick
fddf7baebe 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)
2011-07-30 00:43:18 +00:00
Adrian Chadd
f9da901e77 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)
2011-07-29 23:55:17 +00:00
Alexander Motin
7ea00a6866 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)
2011-07-29 20:38:06 +00:00
Alexander Motin
2d33cc7688 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
2011-07-29 20:35:23 +00:00
Alexander Motin
1ed6aaf99e 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)
2011-07-29 20:32:27 +00:00
Alexander Motin
a07e846be0 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)
2011-07-29 20:30:28 +00:00
John Baldwin
c0ca022a34 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
2011-07-29 20:24:04 +00:00
Marius Strobl
ec3e6e77a1 - 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
2011-07-29 18:38:31 +00:00
Marius Strobl
87e255ac52 - 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)
2011-07-29 18:35:10 +00:00
Benedict Reuschling
76e54f993c 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)
2011-07-28 12:23:32 +00:00
Benedict Reuschling
f49a230f9c 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
2011-07-28 11:41:55 +00:00
Bjoern A. Zeeb
b5cb9d4fa6 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..
2011-07-28 03:01:22 +00:00
Ken Smith
d8048725e0 Looks like we're ready for 9.0-BETA1 builds.
Approved by:	re (implicit)
2011-07-26 04:00:00 +00:00
Craig Rodrigues
ded85b3037 Document the tftp.blksize variable added in src/lib/libstand/tftp.c.
Approved by: re	(kib)
Requested by: maxim
2011-07-25 21:52:17 +00:00
Andreas Tobler
42f2270475 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)
2011-07-25 20:10:01 +00:00
Andriy Gapon
7a0b13ed28 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)
2011-07-25 09:12:48 +00:00
Kirk McKusick
d716efa9f7 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)
2011-07-24 18:27:09 +00:00
Kirk McKusick
6beb3bb4eb 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)
2011-07-24 17:43:09 +00:00
Glen Barber
1f897ce116 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
2011-07-24 03:34:38 +00:00
Glen Barber
5d5140280b 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
2011-07-23 22:55:32 +00:00
Alexander Motin
c36bb43ca6 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
2011-07-23 22:11:40 +00:00
Doug Barton
ab1779e30e Revert the apparently-unecessary module_path twiddling from r223917
Approved by:	re (kib)
2011-07-22 21:08:19 +00:00
Kirk McKusick
2621f2c43f Default debugging error messages to off for journaled soft updates sysctls.
Delete limiting on output of these sysctls.

Approved by: re (kib)
2011-07-22 18:03:33 +00:00
Michael Tuexen
2e34c19b93 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.
2011-07-22 16:42:12 +00:00
Alexander Motin
dd60e051f7 - 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
2011-07-22 16:37:04 +00:00
Hans Petter Selasky
ff11fd7fa7 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
2011-07-22 15:37:23 +00:00
Jonathan Anderson
7a270867e7 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
2011-07-22 12:50:21 +00:00
Adrian Chadd
c5f2a23c79 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)
2011-07-22 09:39:49 +00:00
Adrian Chadd
9381916024 Add athradar, an implementation of the radar parameter diagnostic
API.

This is a reimplementation from scratch.

Approved by:	re (kib)
2011-07-22 09:34:31 +00:00
Jonathan Anderson
6b7a28575f 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
2011-07-21 21:08:33 +00:00
John Baldwin
e9f91b2b2a 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)
2011-07-21 20:43:43 +00:00
George V. Neville-Neil
a388fa6823 Remove incorrect attribution.
Approved by:	re (kib)
Pointed out by: brueffer
Pointy hat to: gnn
2011-07-21 20:06:14 +00:00
Xin LI
101b7b5daa Bring the code more in-line with OpenSolaris source to
ease future port.

Reviewed by:	pjd, mm
Approved by:	re (kib)
2011-07-21 20:02:22 +00:00
Xin LI
b447d101fa 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)
2011-07-21 20:01:51 +00:00
Alexander Motin
23454425b7 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)
2011-07-21 19:39:40 +00:00
George V. Neville-Neil
c03b5ad6a9 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
2011-07-21 16:32:13 +00:00
Adrian Chadd
f51c84eaf6 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)
2011-07-21 14:25:12 +00:00
Adrian Chadd
09ac182ca5 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)
2011-07-21 14:16:42 +00:00
Adrian Chadd
64d6d2d3fc 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)
2011-07-21 08:35:10 +00:00
Adrian Chadd
e8e6035991 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)
2011-07-21 08:31:55 +00:00
Hans Petter Selasky
14bd1ee52c Add new USB ID to u3g driver.
Approved by:	re (kib)
Submitted by:	Nick Hibma
MFC after:	3 days
2011-07-21 06:55:43 +00:00
Marius Strobl
1b57ae60a7 Merge from r224217:
Bump MAXCPU to 64.

Approved by:	re (kib)
2011-07-20 18:51:18 +00:00
Xin LI
b1ad061e42 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
2011-07-20 16:53:32 +00:00
John Baldwin
7b4f570ca1 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
2011-07-20 15:18:24 +00:00
Jonathan Anderson
1b7270658f 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
2011-07-20 13:29:39 +00:00
Adrian Chadd
e2e849485f 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)
2011-07-20 12:46:58 +00:00
Jonathan Anderson
c30b9b5169 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
2011-07-20 09:53:35 +00:00
Adrian Chadd
2168aaa506 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)
2011-07-20 05:59:28 +00:00
Adrian Chadd
6f16ec31f7 Fix brokenness introduced by my last commit.
Approved by:	re (implicit)
2011-07-20 00:36:47 +00:00
Attilio Rao
6338c57958 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)
2011-07-19 16:50:55 +00:00