]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd missing ;;
Max Khon [Thu, 24 Nov 2011 14:22:05 +0000 (14:22 +0000)]
Add missing ;;

12 years agoUse ${VAR} instead of $(VAR) consistently.
Max Khon [Thu, 24 Nov 2011 14:17:04 +0000 (14:17 +0000)]
Use ${VAR} instead of $(VAR) consistently.

12 years agoUtility script to build specific parts of the source tree on all arches
Max Khon [Thu, 24 Nov 2011 14:16:01 +0000 (14:16 +0000)]
Utility script to build specific parts of the source tree on all arches

12 years agoPort to new libdialog.
Max Khon [Thu, 24 Nov 2011 13:24:06 +0000 (13:24 +0000)]
Port to new libdialog.

12 years agoRevert r227841 and part of r227798. We still build libpam in two passes,
Dag-Erling Smørgrav [Thu, 24 Nov 2011 13:18:58 +0000 (13:18 +0000)]
Revert r227841 and part of r227798.  We still build libpam in two passes,
but we use STATIC_CFLAGS instead of our own private .c.o rule.

MFC after: 3 weeks

12 years agoAdd CTF magic to the new .c.o rule.
Dag-Erling Smørgrav [Thu, 24 Nov 2011 13:13:50 +0000 (13:13 +0000)]
Add CTF magic to the new .c.o rule.

MFC after: 3 weeks

12 years agoMove up the address to the top of the sctp_udencaps structure
Michael Tuexen [Thu, 24 Nov 2011 10:58:48 +0000 (10:58 +0000)]
Move up the address to the top of the sctp_udencaps structure
like in all other structures. This avoids alignment problems.

MFC after: 3 months.

12 years agoMove up the address to the top of the sctp_paddrthlds structure
Michael Tuexen [Thu, 24 Nov 2011 10:54:30 +0000 (10:54 +0000)]
Move up the address to the top of the sctp_paddrthlds structure
like in all other structures. This avoids alignment problems.

MFC after: 3 days.

12 years agoRemove unused code.
Max Khon [Thu, 24 Nov 2011 10:08:22 +0000 (10:08 +0000)]
Remove unused code.

12 years agoRemove unused code.
Max Khon [Thu, 24 Nov 2011 08:56:24 +0000 (08:56 +0000)]
Remove unused code.

12 years agoNow that I've brought up FreeBSD via flash, I've discovered that
Adrian Chadd [Thu, 24 Nov 2011 07:37:19 +0000 (07:37 +0000)]
Now that I've brought up FreeBSD via flash, I've discovered that
the second-last 64k seems to be the default firmware board configuration
area.

Since I have no idea whether uboot uses it or not - and it's prefixed
with an atheros eeprom signature (0xaa55), I figure the safest thing
to do is mark it as read-only.

I've modified my local tplink firmware building program to generate
a board configuration section - which is separate to this partition.
It's located in the 64k _before_ this particular 64k.

The firmware build program from OpenWRT never initialises those
values and the firmware images from tplink also leave it 0x0, so I
don't currently know what the exact, correct details should be.

12 years agoFlip on AR71XX_ENV_UBOOT so the environment variables are properly
Adrian Chadd [Thu, 24 Nov 2011 07:33:41 +0000 (07:33 +0000)]
Flip on AR71XX_ENV_UBOOT so the environment variables are properly
processed. (Which is to say they're currently ignored.)

12 years agoIntroduce a new (global, sorry!) option which controls whether
Adrian Chadd [Thu, 24 Nov 2011 07:32:52 +0000 (07:32 +0000)]
Introduce a new (global, sorry!) option which controls whether
the ar71xx platform code should assume a uboot or redboot environment.

The current code gets very confused (and just crashes) on a uboot
environment, where each attribute=value pair is in a single entry.
Redboot on the other hand stores it as "attribute", "value", "attribute",
"value", ...

This allows the kernel to boot on a TP-LINK TL-WR1043ND from flash,
where the uboot environment gets setup. This didn't show up during a netboot
as "tftpboot" and "go" don't setup the uboot environment variables.

12 years agoDon't compile in the AR9130 embedded WMAC code into the HAL by default.
Adrian Chadd [Thu, 24 Nov 2011 06:27:47 +0000 (06:27 +0000)]
Don't compile in the AR9130 embedded WMAC code into the HAL by default.

This won't work unless AH_SUPPORT_AR9130 which can't be enabled - it
breaks the other 11n chipsets for now.

Sponsored by: Hobnob, Inc.

12 years agoFlesh out a geom_map setup, so the kernel can be squeezed _onto_ the device.
Adrian Chadd [Thu, 24 Nov 2011 04:39:01 +0000 (04:39 +0000)]
Flesh out a geom_map setup, so the kernel can be squeezed _onto_ the device.

The default flash layout gives only 1 megabyte for the kernel, gzipped.
The uboot firmware running on this device only supports gzip, not lzma, so
we actually _do_ have to try and slim the kernel down a bit.

But, since I can't actually do that at the present, I'm opting to:

* extend the kernel from 1mb to 2mb;
* have rootfs fill the rest of that, save 64k;
* eventually I'll hide a 64k config partition at the end, between the
  end of rootfs and the ART (radio configuration data.)

The uboot firmware doesn't care about the partition layout. It just
expects the kernel application image to sit at 0xbf020000 (right after
the 128k uboot image.) The uboot header isn't actually read either -
it's "faked" from a "tplink" flash image header. So as long as the
map configuration here matches what is being written out via the
tplink firmware generator, everything is a-ok.

12 years agoCompile in the right bits so the AR9130 WMAC support functions correctly.
Adrian Chadd [Thu, 24 Nov 2011 04:34:04 +0000 (04:34 +0000)]
Compile in the right bits so the AR9130 WMAC support functions correctly.

A previous commit disabled compiling the AR9130 support in the default
HAL build in the kernel. Since the AR9130 support won't actually function
without AH_SUPPORT_AR9130 (and that abomination needs to be undone at some
point, in order to allow USB 11n NICs to also work), we now have to
explicitly compile it in.

But since the 11n RF backends don't (currently) join the RF linker set,
one has to compile in _an_ RF backend for the HAL to compile.

12 years agoAdd a comment documenting where the WMAC hangs off of.
Adrian Chadd [Thu, 24 Nov 2011 04:23:42 +0000 (04:23 +0000)]
Add a comment documenting where the WMAC hangs off of.

At some point it would be nice to correctly update the bus glue to make
this "correct", including having the DDR flush occur in the right spot
(ie, any AHB interrupt.)

12 years agoFlip on these debugging options by default. This is -HEAD after all.
Adrian Chadd [Thu, 24 Nov 2011 04:21:19 +0000 (04:21 +0000)]
Flip on these debugging options by default. This is -HEAD after all.

12 years agoSlim the default build down a little:
Adrian Chadd [Thu, 24 Nov 2011 04:19:02 +0000 (04:19 +0000)]
Slim the default build down a little:

* Disable the NFS client, it's not needed for booting off of flash.
* Don't compile in softdep, snapshots, ufs acls and directory hashing.

12 years agoTo save more power, switch to 10/100Mbps link when controller is
Pyun YongHyeon [Wed, 23 Nov 2011 23:29:18 +0000 (23:29 +0000)]
To save more power, switch to 10/100Mbps link when controller is
put into suspend/shutdown.  Old PCI controllers performed that
operation in firmware but for RTL8111C or newer controllers, it's
responsibility of driver.  It's not clear whether the firmware of
RTL8111B still downgrades its speed to 10/100Mbps so leave it as it
was.

12 years agoMake sure to stop TX MAC before freeing queued TX frames.
Pyun YongHyeon [Wed, 23 Nov 2011 22:07:13 +0000 (22:07 +0000)]
Make sure to stop TX MAC before freeing queued TX frames.
For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART
register.  For RTL8402/8168E-VL/8168F/8411, wait until TX queue is
empty.

12 years agoWrap BCM5785 in #ifdef notyet for now. According to yongari@ there are
Marius Strobl [Wed, 23 Nov 2011 22:05:44 +0000 (22:05 +0000)]
Wrap BCM5785 in #ifdef notyet for now. According to yongari@ there are
issues probably needing workarounds in bge(4) when brgphy(4) handles this
PHY. Letting ukphy(4) handle it instead results in a working configuration,
although likely with performance penalties.

12 years ago- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than
Marius Strobl [Wed, 23 Nov 2011 21:43:51 +0000 (21:43 +0000)]
- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than
  duplicating it.
- In hptmv(4) and hptrr(4) use __FBSDID and DEVMETHOD_END.

12 years agoUse DEVMETHOD_END.
Marius Strobl [Wed, 23 Nov 2011 20:27:26 +0000 (20:27 +0000)]
Use DEVMETHOD_END.

12 years agoProbe the BCM5785.
Marius Strobl [Wed, 23 Nov 2011 20:09:34 +0000 (20:09 +0000)]
Probe the BCM5785.

Obtained from: NetBSD

12 years agoSync with NetBSD rev. 1.104
Marius Strobl [Wed, 23 Nov 2011 20:08:56 +0000 (20:08 +0000)]
Sync with NetBSD rev. 1.104

Obtained from: NetBSD

12 years agoRemove unused functions.
Max Khon [Wed, 23 Nov 2011 19:11:03 +0000 (19:11 +0000)]
Remove unused functions.

12 years ago- Remove unused old libdialog includes
Max Khon [Wed, 23 Nov 2011 19:06:30 +0000 (19:06 +0000)]
- Remove unused old libdialog includes
- Remove unused functions

12 years agoFix parsing of redirect_addr argument.
Gleb Smirnoff [Wed, 23 Nov 2011 18:38:08 +0000 (18:38 +0000)]
Fix parsing of redirect_addr argument.

PR: kern/162739
MFC after: 3 days

12 years agoAvoid double free creating a new RAID with invalid command line arguments.
Ed Maste [Wed, 23 Nov 2011 17:02:27 +0000 (17:02 +0000)]
Avoid double free creating a new RAID with invalid command line arguments.

Submitted by: Xin Huang <xhuang sandvine com>
Reviewed by: rstone@
MFC after: 1 week

12 years agosome tweaks to build picobsd for different architectures.
Luigi Rizzo [Wed, 23 Nov 2011 12:05:39 +0000 (12:05 +0000)]
some tweaks to build picobsd for different architectures.

12 years agoPlug fd leaks
Kevin Lo [Wed, 23 Nov 2011 10:27:18 +0000 (10:27 +0000)]
Plug fd leaks

12 years agofix formatting warning using casts. The numbers involved
Luigi Rizzo [Wed, 23 Nov 2011 09:45:48 +0000 (09:45 +0000)]
fix formatting warning using casts. The numbers involved
are small and these are debug statements, so there is no reason to
obfuscate the format string with PRIsomeKINDofINTEGER

12 years agoFix build without INVARIANTS.
Mikolaj Golub [Wed, 23 Nov 2011 08:11:04 +0000 (08:11 +0000)]
Fix build without INVARIANTS.

Discussed with: kib

12 years agoFix build, hopefully.
Mikolaj Golub [Wed, 23 Nov 2011 07:34:09 +0000 (07:34 +0000)]
Fix build, hopefully.

Reviewed by: kib

12 years agoRe-lock the ath lock after ath_reset() has been called.
Adrian Chadd [Wed, 23 Nov 2011 07:12:26 +0000 (07:12 +0000)]
Re-lock the ath lock after ath_reset() has been called.
The calibrate callout is done with the sc lock held.

This only showed up when using an older NIC (AR5212) whose
radio/phy requires the rfgain adjustment.

Pointy-hat-to: adrian
Sponsored by: Hobnob, Inc.

12 years agoRemove unused variable mii.
Kevin Lo [Wed, 23 Nov 2011 05:34:01 +0000 (05:34 +0000)]
Remove unused variable mii.
This variable is initialized but not used.

Reviewed by: yongari

12 years agoTidy up the statistic documentation.
Adrian Chadd [Wed, 23 Nov 2011 05:03:27 +0000 (05:03 +0000)]
Tidy up the statistic documentation.

Sponsored by: Hobnob, Inc.

12 years agoAdd the new statistics introduced in r227868.
Adrian Chadd [Wed, 23 Nov 2011 05:01:23 +0000 (05:01 +0000)]
Add the new statistics introduced in r227868.

Sponsored by: Hobnob, Inc.

12 years agoFlesh out the TX aggregation completion statistics.
Adrian Chadd [Wed, 23 Nov 2011 05:00:25 +0000 (05:00 +0000)]
Flesh out the TX aggregation completion statistics.

* Failall is now named just that.
* Add TX ok and TX fail, for aggregate frame sub-frames.

This will break athstats; a followup commit wil resolve this.

Sponsored by: Hobnob, Inc.

12 years agoDisable accepting frames in re_stop() to put RX MAC into idle state.
Pyun YongHyeon [Wed, 23 Nov 2011 02:08:05 +0000 (02:08 +0000)]
Disable accepting frames in re_stop() to put RX MAC into idle state.
Because there is no reliable way to know whether RX MAC is in
stopped state, rejecting all frames would be the only way to
minimize possible races.
Otherwise it's possible to receive frames while stop command
execution is in progress and controller can DMA the frame to freed
RX buffer during that period.
This was observed on recent PCIe controllers(i.e. RTL8111F).

While this change may not be required on old controllers it
wouldn't make negative effects on old controllers.  One side effect
of this change is disabling receive so driver reprograms RL_RXCFG
to receive WOL frames when it is put into suspend or shutdown.

This should address occasional 'memory modified free' errors seen
on recent RealTek controllers.

12 years agofdopendir(): Do not close the passed file descriptor on failure.
Jilles Tjoelker [Tue, 22 Nov 2011 23:46:56 +0000 (23:46 +0000)]
fdopendir(): Do not close the passed file descriptor on failure.

Reviewed by: delphij

12 years agoPerform media change after setting IFF_DRV_RUNNING flag. Without it,
Pyun YongHyeon [Tue, 22 Nov 2011 23:27:59 +0000 (23:27 +0000)]
Perform media change after setting IFF_DRV_RUNNING flag. Without it,
driver would ignore the first link state update if controller
already established a link such that it would have to take
additional link state handling in re_tick().

12 years agoWriting access to RL_CFG5 register also requires EEPROM write
Pyun YongHyeon [Tue, 22 Nov 2011 23:19:49 +0000 (23:19 +0000)]
Writing access to RL_CFG5 register also requires EEPROM write
access.
While I'm here, enable WOL through magic packet but disable waking
up system via unicast, multicast and broadcast frames.  Otherwise,
multicast or unicast frame(e.g. ICMP echo request) can wake up
system which is not probably wanted behavior on most environments.
This was not known as problem because RL_CFG5 register access had
not effect until this change.
The capability to wake up system with unicast/multicast frames
are still set in driver, default off, so users who need that
feature can still activate it with ifconfig(8).

12 years agoRename device_delete_all_children() into device_delete_children().
Hans Petter Selasky [Tue, 22 Nov 2011 21:56:55 +0000 (21:56 +0000)]
Rename device_delete_all_children() into device_delete_children().

Suggested by: jhb @ and marius @
MFC after: 1 week

12 years agos,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mention
Marius Strobl [Tue, 22 Nov 2011 21:55:40 +0000 (21:55 +0000)]
s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mention
of kobj(9) from device drivers.

12 years agoStyle change.
Hans Petter Selasky [Tue, 22 Nov 2011 21:53:19 +0000 (21:53 +0000)]
Style change.

Suggested by: jhb @ and marius @
MFC after: 1 week

12 years agoRemove yet another outdated note about procfs(5) being required.
Mikolaj Golub [Tue, 22 Nov 2011 21:53:06 +0000 (21:53 +0000)]
Remove yet another outdated note about procfs(5) being required.

Spotted by: arundel

12 years agoforgot to merge NETMAP entries in sys/conf !
Luigi Rizzo [Tue, 22 Nov 2011 21:50:38 +0000 (21:50 +0000)]
forgot to merge NETMAP entries in sys/conf !

12 years agoUpdate to use DEVMETHOD_END.
Marius Strobl [Tue, 22 Nov 2011 21:49:29 +0000 (21:49 +0000)]
Update to use DEVMETHOD_END.

12 years ago- There's no need to overwrite the default device method with the default
Marius Strobl [Tue, 22 Nov 2011 21:28:20 +0000 (21:28 +0000)]
- There's no need to overwrite the default device method with the default
  one. Interestingly, these are actually the default for quite some time
  (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
  since r52045) but even recently added device drivers do this unnecessarily.
  Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
  Discussed with: jhb
- Also while at it, use __FBSDID.

12 years agoFor IP1001 PHY, do not set multi-port device(MASTER). Ideally this
Pyun YongHyeon [Tue, 22 Nov 2011 21:22:06 +0000 (21:22 +0000)]
For IP1001 PHY, do not set multi-port device(MASTER).  Ideally this
bit should not affect link establishment process of auto-negotiation
if manual configuration is not used, which is true in auto-negotiation.
However it seems setting this bit interfere with IP1001 PHY's
down-shifting feature such that establishing a 10/100Mbps link failed
when 1000baseT link is not available during auto-negotiation process.

Tested by: Andrey Smagin <samspeed <> mail dot ru >

12 years agoRemove libpam from _prebuild_libs. This should unbreak the -jX build.
Dag-Erling Smørgrav [Tue, 22 Nov 2011 21:18:14 +0000 (21:18 +0000)]
Remove libpam from _prebuild_libs.  This should unbreak the -jX build.

MFC after: 3 weeks

12 years agoNo need in procfs(5).
Mikolaj Golub [Tue, 22 Nov 2011 21:14:46 +0000 (21:14 +0000)]
No need in procfs(5).

MFC after: 2 weeks

12 years agoNow kvm_getenvv() and kvm_getargv() don't need procfs(5).
Mikolaj Golub [Tue, 22 Nov 2011 21:12:28 +0000 (21:12 +0000)]
Now kvm_getenvv() and kvm_getargv() don't need procfs(5).

MFC after: 2 weeks

12 years agoAdd new options, -e and -x, to display process environment variables
Mikolaj Golub [Tue, 22 Nov 2011 20:59:52 +0000 (20:59 +0000)]
Add new options, -e and -x, to display process environment variables
and ELF auxiliary vectors.

MFC after: 2 weeks

12 years agoAnnounce flow control capability to underlying PHY driver.
Pyun YongHyeon [Tue, 22 Nov 2011 20:57:06 +0000 (20:57 +0000)]
Announce flow control capability to underlying PHY driver.
Pause timer value is initialized to 0xFFFF. Controller allows just
4 different TX pause thresholds. The lowest possible threshold
value looks too aggressive so use next available threshold value.

12 years agoRetire linprocfs_doargv(). Instead use new functions, proc_getargv()
Mikolaj Golub [Tue, 22 Nov 2011 20:45:11 +0000 (20:45 +0000)]
Retire linprocfs_doargv(). Instead use new functions, proc_getargv()
and proc_getenvv(), which were implemented using linprocfs_doargv() as
a reference.

Suggested by: kib
Reviewed by: kib
Approved by: des (linprocfs maintainer)
MFC after: 2 weeks

12 years agoRework link establishment and link state detection logic.
Pyun YongHyeon [Tue, 22 Nov 2011 20:45:09 +0000 (20:45 +0000)]
Rework link establishment and link state detection logic.
 - Remove MIIBUS statchg callback and program VGE_DIAGCTL before
   initiating link establishment.  Previously driver used to
   program VGE_DIAGCTL after getting a link in statchg callback.
   It seems the VGE_DIAGCTL register works like a kind of MII
   register such that it requires setting a 'to be' mode in advance
   rather than relying on resolved speed/duplex of established link.
   This means the statchg callback is not needed in driver.  In
   addition, if there was no link at the time of media change, this
   was not called at all.
 - Introduce vge_ifmedia_upd_locked() to change current media to
   configured one.  Actual media change is performed only after PHY
   reset and VGE_DIAGCTL setup.
 - In WOL configuration, make sure to clear forced mode such that
   controller can rely on auto-negotiation.
 - Unlike most other drivers that use miibus(4), vge(4) used
   controller's auto-polling feature for link state tracking via
   interrupt.  This came from controller's inefficient mechanism to
   access MII registers.  On link state change interrupt, vge(4)
   used to get current link state with series of MII register
   accesses.  Because vge(4) already enabled auto polling, read PHY
   status register to resolved speed/duplex/flow control parameters.

vge(4) still does not drive MII_TICK to reduce number of MII
register accesses which in turn means the driver does not know the
status of auto-negotiation.  This was a one of long standing
issue of vge(4).  Probably driver may be able to implement a timer
that keeps track of auto-negotiation state and restart
auto-negotiation when driver couldn't establish a link within a
specified period.  However the controller does not provide a
reliable way to detect auto-negotiation failure so I'm not sure
whether it's worth to implement it in driver.

Alternatively driver can completely disable MII auto-polling and
let miibus(4) poll link state by driving MII_TICK.  This may reduce
unnecessary overhead of stopping/restarting MII auto-polling of
controller.  Unfortunately it was known that some variants of
controller does not work correctly if MII auto-polling is disabled.

12 years agoIn procfs_doproccmdline() if arguments are not cashed read them from
Mikolaj Golub [Tue, 22 Nov 2011 20:43:03 +0000 (20:43 +0000)]
In procfs_doproccmdline() if arguments are not cashed read them from
the process stack.

Suggested by: kib
Reviewed by: kib
Tested by: pho
MFC after: 2 weeks

12 years agoAdd new sysctls, KERN_PROC_ENV and KERN_PROC_AUXV, to return
Mikolaj Golub [Tue, 22 Nov 2011 20:40:18 +0000 (20:40 +0000)]
Add new sysctls, KERN_PROC_ENV and KERN_PROC_AUXV, to return
environment strings and ELF auxiliary vectors from a process stack.

Make sysctl_kern_proc_args to read not cached arguments from the
process stack.

Export proc_getargv() and proc_getenvv() so they can be reused by
procfs and linprocfs.

Suggested by: kib
Reviewed by: kib
Discussed with: kib, rwatson, jilles
Tested by: pho
MFC after: 2 weeks

12 years agoImprove logging:
Gleb Smirnoff [Tue, 22 Nov 2011 19:42:17 +0000 (19:42 +0000)]
Improve logging:
- don't hardcode function name
- use LOG_DEBUG for such a debug message
- print error value

12 years agostyle(9) nit
Gleb Smirnoff [Tue, 22 Nov 2011 19:39:27 +0000 (19:39 +0000)]
style(9) nit

12 years agoFix SIOCDIFADDR semantics: if no address is specified, then delete first one.
Gleb Smirnoff [Tue, 22 Nov 2011 19:37:57 +0000 (19:37 +0000)]
Fix SIOCDIFADDR semantics: if no address is specified, then delete first one.

12 years ago- Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t'
Marius Strobl [Tue, 22 Nov 2011 19:31:43 +0000 (19:31 +0000)]
- Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t'
  and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from
  device drivers.
- Update the example in driver.9 to use DEVMETHOD_END.

Submitted by: jhb
MFC after: 3 days

12 years agoAlways start MII auto polling before accessing any MII registers.
Pyun YongHyeon [Tue, 22 Nov 2011 18:58:39 +0000 (18:58 +0000)]
Always start MII auto polling before accessing any MII registers.

12 years agoDefine __FreeBSD_kernel__ macro in sys/param.h.
Robert Millan [Tue, 22 Nov 2011 18:53:54 +0000 (18:53 +0000)]
Define __FreeBSD_kernel__ macro in sys/param.h.

__FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
which by definition is always true on FreeBSD. This macro is also defined
on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD.

It is tempting to use this macro in userland code when we want to enable
kernel-specific routines, and in fact it's fine to do this in code that
is part of FreeBSD itself.  However, be aware that as presence of this
macro is still not widespread (e.g. older FreeBSD versions, 3rd party
compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in
external applications without also checking for __FreeBSD__ as an
alternative.

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

12 years agoAppend unit number to the WMI status device name to allow attaching
Jaakko Heinonen [Tue, 22 Nov 2011 16:44:50 +0000 (16:44 +0000)]
Append unit number to the WMI status device name to allow attaching
multiple acpi_wmi(4) instances.

PR: kern/162491
Reviewed by: avg

12 years agoAvoid panics from recursive rename operations. Not a perfect patch but
Ivan Voras [Tue, 22 Nov 2011 16:18:12 +0000 (16:18 +0000)]
Avoid panics from recursive rename operations. Not a perfect patch but
good enough for now.

PR: kern/159418
Submitted by: Gleb Kurtsou
Reviewed by: kib
MFC after: 1 month

12 years agoFix a crash when trying to duplicate a locale that contains some implicit C locale...
David Chisnall [Tue, 22 Nov 2011 14:11:42 +0000 (14:11 +0000)]
Fix a crash when trying to duplicate a locale that contains some implicit C locale components.

Reported by: Michael Butler
Approved by: dim (mentor)

12 years agoPut all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.
Konstantin Belousov [Tue, 22 Nov 2011 13:30:36 +0000 (13:30 +0000)]
Put all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.
They are confusing to user, and not informative for general consumption.

MFC after: 1 week

12 years agoRemove the wrong comment about ufs not being loadable.
Konstantin Belousov [Tue, 22 Nov 2011 13:27:53 +0000 (13:27 +0000)]
Remove the wrong comment about ufs not being loadable.
Note that only root filesystem module needs to be available
before root is mounted.

MFC after: 1 week

12 years ago- Use ppb_assert_locked() rather than using explicit mtx_assert call
Attilio Rao [Tue, 22 Nov 2011 11:35:24 +0000 (11:35 +0000)]
- Use ppb_assert_locked() rather than using explicit mtx_assert call
- Make ppbus code agnostic in regard of INVARIANTS option

MFC after: 2 weeks

12 years ago- fix some style(9) nits with my last commit
Eitan Adler [Tue, 22 Nov 2011 02:50:24 +0000 (02:50 +0000)]
- fix some style(9) nits with my last commit
- add a comment explaining why I used '|' instead of '||'

Submitted by: danfe@
Approved by: emaste@

12 years agoThis patch enables the new/default NFS server's use of shared
Rick Macklem [Tue, 22 Nov 2011 00:35:30 +0000 (00:35 +0000)]
This patch enables the new/default NFS server's use of shared
vnode locking for read, readdir, readlink, getattr and access.
It is hoped that this will improve server performance for these
operations, since they will no longer be serialized for a given
file/vnode.

12 years ago- add check for pointer equality prior to performing the O(n) pass
Eitan Adler [Tue, 22 Nov 2011 00:07:53 +0000 (00:07 +0000)]
- add check for pointer equality prior to performing the O(n) pass
- while here change 's' to 's1' in strcoll

Submitted by: eadler@
Reviewed by: theraven@
Approved by: brooks@
MFC after: 2 weeks

12 years ago(Hopefully) Fix the build with clang by removing a typedef that's no longer needed.
David Chisnall [Mon, 21 Nov 2011 23:32:14 +0000 (23:32 +0000)]
(Hopefully) Fix the build with clang by removing a typedef that's no longer needed.

Approved by: brooks (mentor)

12 years agoUse the correct lock when calling msleep().
Adrian Chadd [Mon, 21 Nov 2011 22:57:28 +0000 (22:57 +0000)]
Use the correct lock when calling msleep().

This fixes panics that users have been seeing when operating in station mode,
where the interface undergoes a lot more resets then in hostap mode (ie whilst
doing channel scanning.)

Reported by: arundel, wblock@wonkity.com
Sponsored by: Hobnob, Inc.

12 years agoThe DC calibration result obtained during initialization can't be
Bernhard Schmidt [Mon, 21 Nov 2011 22:19:12 +0000 (22:19 +0000)]
The DC calibration result obtained during initialization can't be
passed over to the runtime firmware on 6050 devices. Instead let
the runtime firmware do the calibration itself. This fixes support
for the 6050 series devices.

Obtained from: OpenBSD
Submitted by: kevlo
Tested by: lx, Tz-Huan Huang(earlier version)

12 years agoFix some whitespace pollution.
Adrian Chadd [Mon, 21 Nov 2011 21:59:01 +0000 (21:59 +0000)]
Fix some whitespace pollution.

12 years agoRevert back to revision 227649 because of license uncertainity.
Martin Matuska [Mon, 21 Nov 2011 20:33:18 +0000 (20:33 +0000)]
Revert back to revision 227649 because of license uncertainity.

Manual pages from OpenSolaris svn_134 are still properly CDDL licensed
but I have been informed that the parts from s11ex are uncertain even
if they contain a CDDL header.

12 years agoImprove the way to calculate available pages in tmpfs:
Xin LI [Mon, 21 Nov 2011 20:26:22 +0000 (20:26 +0000)]
Improve the way to calculate available pages in tmpfs:

 - Don't deduct wired pages from total usable counts because it does not
   make any sense.  To make things worse, on systems where swap size is
   smaller than physical memory and use a lot of wired pages (e.g. ZFS),
   tmpfs can suddenly have free space of 0 because of this;
 - Count cached pages as available; [1]
 - Don't count inactive pages as available, technically we could but that
   might be too aggressive; [1]

[1] Suggested by kib@

MFC after: 1 week

12 years agoThis check isn't needed now, sanity checking done in the beginning.
Gleb Smirnoff [Mon, 21 Nov 2011 20:07:12 +0000 (20:07 +0000)]
This check isn't needed now, sanity checking done in the beginning.
Missed it in last commit.

12 years agoCorrect and expand BSD partitioning scheme description.
Warren Block [Mon, 21 Nov 2011 18:04:37 +0000 (18:04 +0000)]
Correct and expand BSD partitioning scheme description.
Correct GUID to GPT in RECOVERING section.

Reviewed by: ae
Approved by: gjb (mentor)
MFC after: 1 week

12 years agoDo dcache flush on CPU core before enabling threads.
Jayachandran C. [Mon, 21 Nov 2011 16:43:24 +0000 (16:43 +0000)]
Do dcache flush on CPU core before enabling threads.

The dcache flush has to be done using the core control registers before
splitting the L1D cache by enabling the hardware threads.

Also replace .word calls for mfcr/mtcr with a C macro.

In collaboration with: prabhath at netlogicmicro com

12 years agoSimplify the libpam build by removing the shared modules' dependency
Dag-Erling Smørgrav [Mon, 21 Nov 2011 16:40:39 +0000 (16:40 +0000)]
Simplify the libpam build by removing the shared modules' dependency
on the shared library.  The modules are loaded by the library, so we
know it'll be there when we need it.

MFC after: 3 weeks

12 years agoAs threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow a
Dag-Erling Smørgrav [Mon, 21 Nov 2011 16:35:57 +0000 (16:35 +0000)]
As threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow a
Makefile to specify different CFLAGS for shared and static libraries.

MFC after: 3 weeks

12 years agoClean up some cruft in the NFSv4 client left over from the
Rick Macklem [Mon, 21 Nov 2011 16:06:23 +0000 (16:06 +0000)]
Clean up some cruft in the NFSv4 client left over from the
OpenBSD port, so that it is more readable. No logic change
is made by this commit.

MFC after: 2 weeks

12 years agoFix mismerge in copyright of zpool(8).
Martin Matuska [Mon, 21 Nov 2011 15:33:37 +0000 (15:33 +0000)]
Fix mismerge in copyright of zpool(8).

MFC after: 4 days

12 years agoUpdate zfs(8) and zpool(8) manpages from CDDL-licensed sources [1].
Martin Matuska [Mon, 21 Nov 2011 15:26:20 +0000 (15:26 +0000)]
Update zfs(8) and zpool(8) manpages from CDDL-licensed sources [1].
Improved alignment for a maximum width of 80 characters.
Mark unsupported parts as such.

Reported to vendor: Illumos issue #1801

References:
https://www.illumos.org/issues/1801

Obtained from: OpenSolaris CDDL manual pages (snv_134, s11express) [1]
MFC after: 4 days

12 years agoFor now, remove MANFILTER from ZFS manpages (bad effect on html output).
Martin Matuska [Mon, 21 Nov 2011 14:50:17 +0000 (14:50 +0000)]
For now, remove MANFILTER from ZFS manpages (bad effect on html output).

MFC after: 4 days

12 years agoAdd history for setsockopt(2).
Sergey Kandaurov [Mon, 21 Nov 2011 14:36:19 +0000 (14:36 +0000)]
Add history for setsockopt(2).

PR: docs/162719
Submitted by: Niclas Zeising <niclas at zeising gmail>
MFC after: 1 week

12 years agoHistorically in_control() did not check sockaddrs supplied with
Gleb Smirnoff [Mon, 21 Nov 2011 14:10:13 +0000 (14:10 +0000)]
Historically in_control() did not check sockaddrs supplied with
structs ifreq/in_aliasreq and there've been several panics due
to that problem. All these panics were fixed just a couple of
lines above the panicing code.

Take a more general approach: sanity check sockaddrs supplied
with SIOCAIFADDR and SIOCSIF*ADDR at the beggining of the
function and drop all checks below.

One check is now disabled due to strange code in ifconfig(8)
that I've removed recently. I'm going to enable it with next
__FreeBSD_version bump.

Historically in_ifinit() was able to recover from an error
and restore old address. Nowadays this feature isn't working
for all error cases, but for some of them. I suppose no software
relies on this behavior, so I'd like to remove it, since this
simplifies code a lot.

Also, move if_scrub() earlier in the in_ifinit(). It is more
correct to wipe routes before removing address from local
address list, and interface address list.

Silence from: bz, brooks, andre, rwatson, 3 weeks

12 years agoBe more informative for "unknown hardware address format" message.
Gleb Smirnoff [Mon, 21 Nov 2011 13:40:35 +0000 (13:40 +0000)]
Be more informative for "unknown hardware address format" message.

Submitted by: Andrzej Tobola <ato iem.pw.edu.pl>

12 years ago- Add Pulse-Per-Second timestamping using raw ffcounter and corresponding
Lawrence Stewart [Mon, 21 Nov 2011 13:34:29 +0000 (13:34 +0000)]
- Add Pulse-Per-Second timestamping using raw ffcounter and corresponding
  ffclock time in seconds.

- Add IOCTL to retrieve ffclock timestamps from userland.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoIntroduce the same mutex-wise fix in r227758 for sx locks.
Attilio Rao [Mon, 21 Nov 2011 12:59:52 +0000 (12:59 +0000)]
Introduce the same mutex-wise fix in r227758 for sx locks.

The functions that offer file and line specifications are:
- sx_assert_
- sx_downgrade_
- sx_slock_
- sx_slock_sig_
- sx_sunlock_
- sx_try_slock_
- sx_try_xlock_
- sx_try_upgrade_
- sx_unlock_
- sx_xlock_
- sx_xlock_sig_
- sx_xunlock_

Now vm_map locking is fully converted and can avoid to know specifics
about locking procedures.
Reviewed by: kib
MFC after: 1 month

12 years agoBetter use pkill(1) in last commit.
Gleb Smirnoff [Mon, 21 Nov 2011 12:23:22 +0000 (12:23 +0000)]
Better use pkill(1) in last commit.

Submitted by: pjd

12 years agoRemove no more relevant XXXRW comments since accessing the vmspace is now
Sergey Kandaurov [Mon, 21 Nov 2011 12:21:00 +0000 (12:21 +0000)]
Remove no more relevant XXXRW comments since accessing the vmspace is now
properly done with the acquired vmspace reference.

Pointed out by: kib

12 years ago- Reduce severity for all ARP events, that can be triggered from remote
Gleb Smirnoff [Mon, 21 Nov 2011 12:07:18 +0000 (12:07 +0000)]
- Reduce severity for all ARP events, that can be triggered from remote
  machine to LOG_NOTICE. Exception left to "using my IP address".
- Fix multicast ARP warning: add newline and also log the bad MAC address.

Tested by: Alexander Wittig <wittigal msu.edu>

12 years agoUse the acquired reference to the vmspace instead of direct dereferencing
Sergey Kandaurov [Mon, 21 Nov 2011 10:36:57 +0000 (10:36 +0000)]
Use the acquired reference to the vmspace instead of direct dereferencing
of p->p_vmspace like it is done in sysctl_kern_proc_vmmap().