]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoBoth linux ath9k and the reference driver initialises the PLL here
adrian [Sat, 14 Apr 2012 04:40:11 +0000 (04:40 +0000)]
Both linux ath9k and the reference driver initialises the PLL here
during chip wakeup.

Obtained from: Linux ath9k, Atheros

12 years agoAdd a driver for the NXP (Philips) PCF8563 RTC.
marius [Fri, 13 Apr 2012 23:07:32 +0000 (23:07 +0000)]
Add a driver for the NXP (Philips) PCF8563 RTC.

Obtained from: NetBSD (pcf8563reg.h)

12 years agoMerge from x86:
marius [Fri, 13 Apr 2012 22:58:23 +0000 (22:58 +0000)]
Merge from x86:

r233961:

Fix interrupt load balancing regression, introduced in revision
222813, that left all un-pinned interrupts assigned to CPU 0.
In intr_shuffle_irqs(), remove CPU_SETOF() call that initialized
the "intr_cpus" cpuset to only contain CPU0.

This initialization is too late and nullifies the results of calls
to the intr_add_cpu() that occur much earlier in the boot process.

r234074 (partial):

The BSP is not added to the mask of valid target CPUs for interrupts.
Fix this by adding the BSP as an interrupt target directly in

r234105:

Fix !SMP build after r234074.

MFC after: 3 days

12 years agoEliminate an unused parameter of static method igmp_stats_live_old().
delphij [Fri, 13 Apr 2012 22:35:53 +0000 (22:35 +0000)]
Eliminate an unused parameter of static method igmp_stats_live_old().

MFC after: 1 month

12 years agoThe scandir(3) function expects fourth parameter, compar, be in type of:
delphij [Fri, 13 Apr 2012 22:34:01 +0000 (22:34 +0000)]
The scandir(3) function expects fourth parameter, compar, be in type of:

int (*compar)(const struct dirent **, const struct dirent **)

The current code defines sortq() to accept two void *, then cast them
to const struct dirent **.  Because the code does not really need this
cast, we can eliminate the casts by changing the function prototype
to match scandir(3) expectation.

MFC after: 1 month

12 years agofix build with -Wformat -Wmissing-prototypes
luigi [Fri, 13 Apr 2012 22:24:57 +0000 (22:24 +0000)]
fix build with -Wformat -Wmissing-prototypes

12 years agoAdded myself to committers-src.dot.
jasone [Fri, 13 Apr 2012 20:58:01 +0000 (20:58 +0000)]
Added myself to committers-src.dot.

12 years agoFlesh out the rest of the AP96 board/config.
adrian [Fri, 13 Apr 2012 20:23:32 +0000 (20:23 +0000)]
Flesh out the rest of the AP96 board/config.

12 years agoChange SIGUSR1 to SIGTHR to properly wake up a process that is being
gnn [Fri, 13 Apr 2012 20:22:08 +0000 (20:22 +0000)]
Change SIGUSR1 to SIGTHR to properly wake up a process that is being
traced.  The use of SIGUSR1 caused traced processes (those attached to
with dtrace -p) to exit when dtrace exited.

MFC in: 1 week

12 years agoUpdate to version 2.3.1.0
jpaetzel [Fri, 13 Apr 2012 18:21:56 +0000 (18:21 +0000)]
Update to version 2.3.1.0

Obtained from: Daniel Braniss <danny@cs.huji.ac.il>

12 years ago* Enable ATH_EEPROM_FIRMWARE, now that it's a compile time option
adrian [Fri, 13 Apr 2012 18:01:53 +0000 (18:01 +0000)]
* Enable ATH_EEPROM_FIRMWARE, now that it's a compile time option
* Tidy up things a bit.

12 years agoUpgrade ATH_EEPROM_FIRMWARE to a configuration option.
adrian [Fri, 13 Apr 2012 18:00:48 +0000 (18:00 +0000)]
Upgrade ATH_EEPROM_FIRMWARE to a configuration option.

12 years agoAdd myself as a new committer and add adrian as my mentor.
monthadar [Fri, 13 Apr 2012 16:53:00 +0000 (16:53 +0000)]
Add myself as a new committer and add adrian as my mentor.

Approved by: adrian (mentor)

12 years agoProperly disable crc stripping when operating in netmap mode.
luigi [Fri, 13 Apr 2012 16:42:54 +0000 (16:42 +0000)]
Properly disable crc stripping when operating in netmap mode.

Contrarily to what i wrote in my previous commit, the 82599
does include the CRC in the length. The operating mode is
reset in ixgbe_init_locked() and so we need to hook into
the places where the two registers (HLREG0 and RDRXCTL) are
modified.

12 years agoadd the new memory allocator for netmap, which allocates memory
luigi [Fri, 13 Apr 2012 16:32:33 +0000 (16:32 +0000)]
add the new memory allocator for netmap, which allocates memory
in small clusters instead of one big contiguous chunk.
This was already enabled in the previous commit.

12 years agoA bit of cleanup in the names of fields of netmap-related structures.
luigi [Fri, 13 Apr 2012 16:03:07 +0000 (16:03 +0000)]
A bit of cleanup in the names of fields of netmap-related structures.
Use the name 'ring' instead of 'queue' in all fields.
Bump NETMAP_API.

12 years agodo not use a deprecated field in a structure.
luigi [Fri, 13 Apr 2012 15:33:12 +0000 (15:33 +0000)]
do not use a deprecated field in a structure.

12 years agoBelatedly add my entry to the calendar file, now that 30 is here and gone.
gjb [Fri, 13 Apr 2012 09:54:36 +0000 (09:54 +0000)]
Belatedly add my entry to the calendar file, now that 30 is here and gone.

12 years agoThese are uboot, so mark them as such or booting from flash will not work.
adrian [Fri, 13 Apr 2012 08:56:23 +0000 (08:56 +0000)]
These are uboot, so mark them as such or booting from flash will not work.

12 years agoIntroduce configuration files for AP94 and AP96.
adrian [Fri, 13 Apr 2012 08:52:25 +0000 (08:52 +0000)]
Introduce configuration files for AP94 and AP96.

This uses the new firmware(9) method for squirreling away the EEPROM
contents from SPI flash so ath(4) can get to them later.

It won't work out of the box just yet - you have to add this to
if_ath_pci.c:

#define ATH_EEPROM_FIRMWARE

.. until I've added it as a configuration option and updated things.

12 years agoIntroduce the ability to grab local EEPROM data from the firmware(9)
adrian [Fri, 13 Apr 2012 08:48:38 +0000 (08:48 +0000)]
Introduce the ability to grab local EEPROM data from the firmware(9)
interface.

* Introduce a device hint, 'eeprom_firmware', which is the name of firmware
  to lookup.
* If the lookup succeeds, take a copy of it and use it as the eeprom data.

This isn't enabled by default - you have to define ATH_EEPROM_FIRMWARE.
I'll add it to the configuration variables in a later commit.

TODO:

* just keep a firmware reference in ath_softc, and remove the need to
  waste the extra memory in having sc_eepromdata be a malloc()ed block.

12 years ago(ab)Use the firmware API to store away EEPROM calibration data for
adrian [Fri, 13 Apr 2012 08:45:50 +0000 (08:45 +0000)]
(ab)Use the firmware API to store away EEPROM calibration data for
future use by the ath(4) driver.

These embedded devices put the calibration/PCI bootstrap data on the
on board SPI flash rather than on an EEPROM connected to the NIC.
For some boards, there's two NICs and two sets of EEPROM data in the
main SPI flash.

The particulars:

* Introduce ath_fixup_size, which is the size of the EEPROM area in
  bytes.
* Create a firmware image with a name based on the PCI device identifier
  (bus/slot/device/function).
* Hide some verbose debugging behind 'bootverbose'.

ath(4) can then use this to load in the EEPROM data.

This requires AR71XX_ATH_EEPROM to be defined.

12 years agoadd actual interrupt counters to back ipi_invlcache_counts
avg [Fri, 13 Apr 2012 07:18:19 +0000 (07:18 +0000)]
add actual interrupt counters to back ipi_invlcache_counts

Otherwise one could run into a panic with COUNT_IPIS when cache
invalidation actually happened.

Reviewed by: jhb
MFC after: 1 week

12 years agobump INTRCNT_COUNT values to reflect actual numbers of IPI counters
avg [Fri, 13 Apr 2012 07:15:40 +0000 (07:15 +0000)]
bump INTRCNT_COUNT values to reflect actual numbers of IPI counters

Maybe the numbers should be conditionalized on COUNT_IPIS

Reviewed by: jhb
MFC after: 1 week

12 years agoPartially implement zipinfo (-Z) support.
kevlo [Fri, 13 Apr 2012 06:15:51 +0000 (06:15 +0000)]
Partially implement zipinfo (-Z) support.
This fixes some test failures seen with perl 5.12 and 5.14.

PR: bin/166895
Submitted by: swills
MFC after: 3 days

12 years agoRemove an unused variable. Grr.
adrian [Fri, 13 Apr 2012 06:13:37 +0000 (06:13 +0000)]
Remove an unused variable. Grr.

12 years agoSync this code against what's in OpenWRT trunk.
adrian [Fri, 13 Apr 2012 06:11:24 +0000 (06:11 +0000)]
Sync this code against what's in OpenWRT trunk.

* the openwrt code doesn't treat 0/0/0 any differently
  from other bus/slot/func combinations.
* A "local write" function writes to the LCONF area, and
  so I've added it.
* The PCI workaround at attach time uses this LCONF code,
  which it already did ..
* .. but it is a 4 byte write, not a 2 byte write.
  Even though it's PCIR_COMMAND which is a two byte PCI register.

Tested on: AR7161
TODO: The other two AR71xx derivatives
TODO: More thoroughly stare at the datasheets I do have
and if it indeed is incorrect, push fixes to both
FreeBSD and Linux/OpenWRT.

Obtained from: Linux OpenWRT

12 years agoApply changes from r234103 to ext2fs:
jh [Fri, 13 Apr 2012 05:48:31 +0000 (05:48 +0000)]
Apply changes from r234103 to ext2fs:

Return EPERM from ext2_setattr() when an user without PRIV_VFS_SYSFLAGS
privilege attempts to toggle SF_SETTABLE flags.

Flags are now stored to ip->i_flags in one place after all checks.

Also, remove SF_NOUNLINK from the checks because ext2fs doesn't support
that flag.

Reviewed by: bde

12 years agoAdditional manual page updates for r234103.
jh [Fri, 13 Apr 2012 05:40:26 +0000 (05:40 +0000)]
Additional manual page updates for r234103.

Submitted by: bde

12 years agoUse strdup() on the name (and free it when it's done) so non-static names
adrian [Fri, 13 Apr 2012 04:22:42 +0000 (04:22 +0000)]
Use strdup() on the name (and free it when it's done) so non-static names
can be used in firmware_register().

12 years agoUpdate the ddb and gdb backends for the new 'trace_thread' hook.
jhb [Thu, 12 Apr 2012 21:34:58 +0000 (21:34 +0000)]
Update the ddb and gdb backends for the new 'trace_thread' hook.
It is implemented via db_trace_thread() for DDB and not implemented
for GDB.  This should have been part of r234190.

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

12 years agoAdd myself and my relation to my mentors.
madpilot [Thu, 12 Apr 2012 20:22:17 +0000 (20:22 +0000)]
Add myself and my relation to my mentors.

Approved by: crees

12 years agoComplete polled-mode operation by using a callout if the device will be
grehan [Thu, 12 Apr 2012 18:46:48 +0000 (18:46 +0000)]
Complete polled-mode operation by using a callout if the device will be
used in polled-mode. The callout invokes uart_intr, which rearms the timeout.
Implemented for bhyve, but generically useful for e.g. embedded bringup
when the interrupt controller hasn't been setup, or if it's not deemed
worthy to wire an interrupt line from a serial port.

Submitted by: neel
Reviewed by: marcel
Obtained from: NetApp
MFC after: 3 weeks

12 years agoAdd missing LibUSB 1.0 API function.
hselasky [Thu, 12 Apr 2012 18:06:30 +0000 (18:06 +0000)]
Add missing LibUSB 1.0 API function.

Reported by: lme @
MFC after: 1 week

12 years ago- Extend the KDB interface to add a per-debugger callback to print a
jhb [Thu, 12 Apr 2012 17:43:59 +0000 (17:43 +0000)]
- Extend the KDB interface to add a per-debugger callback to print a
  backtrace for an arbitrary thread (rather than the calling thread).
  A kdb_backtrace_thread() wrapper function uses the configured debugger
  if possible, otherwise it falls back to using stack(9) if that is
  available.
- Replace a direct call to db_trace_thread() in propagate_priority()
  with a call to kdb_backtrace_thread() instead.

MFC after: 1 week

12 years agoStyle.
trasz [Thu, 12 Apr 2012 16:55:48 +0000 (16:55 +0000)]
Style.

12 years agoUpdate the swi_add prototype after struct ithd was split up into
pluknet [Thu, 12 Apr 2012 16:02:45 +0000 (16:02 +0000)]
Update the swi_add prototype after struct ithd was split up into
struct intr_event and struct intr_thread.

PR: docs/166864
Reviewed by: jhb (older version)
MFC after: 1 week

12 years agoIf a linker file contains at least one module, but all of the modules
jhb [Thu, 12 Apr 2012 14:49:25 +0000 (14:49 +0000)]
If a linker file contains at least one module, but all of the modules
fail to load (the MOD_LOAD event fails) during a kldload(2), unload the
linker file and fail the kldload(2) with ENOEXEC.

Reported by: gcooper
MFC after: 1 week

12 years agoApparently the length field in advanced descriptors
luigi [Thu, 12 Apr 2012 14:06:05 +0000 (14:06 +0000)]
Apparently the length field in advanced descriptors
does not include the CRC irrespective of the setting
of CRCSTRIP. The 82599 data sheets (sec. 7.1.6) say differently.
Very strange. Need to check what happens on legacy descriptors,
but for the time being this restores functionality.

12 years agoFix error messages containing the executed command name
dumbbell [Thu, 12 Apr 2012 14:02:59 +0000 (14:02 +0000)]
Fix error messages containing the executed command name

Before, we took the first argument to pam_exec(8). With the addition of
options in front of the command, this could be wrong.

Now, options are parsed before calling _pam_exec() and messages contain
the proper command name.

While here, fix a warning.

Sponsored by: Yakaz (http://www.yakaz.com)

12 years agoAdd OFED and the associated options and drivers to x86 LINT builds:
jhb [Thu, 12 Apr 2012 14:01:06 +0000 (14:01 +0000)]
Add OFED and the associated options and drivers to x86 LINT builds:
- Mark 'sdp' as requiring 'inet'.
- Always include "opt_inet.h" and "opt_inet6.h" and modify the IB
  driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options
  to determine what should be enabled during a module build.
- Fix the mlxen(4) driver and the core IB code to compile without
  if INET is disabled (including when both INET and INET6 are disabled).

Reviewed by: bz
MFC after: 2 weeks

12 years agoDon't update if_obytes when transmitting packets. That is already done
jhb [Thu, 12 Apr 2012 13:53:49 +0000 (13:53 +0000)]
Don't update if_obytes when transmitting packets.  That is already done
in IFQ_HANDOFF() when the packet is passed to the start routine, so doing
it here resulted in double counting.

Reported by: Alex Tutubalin  lexa lexa ru
MFC after: 1 week

12 years agoRemove block reallocation used to make room for the cylinder group
trasz [Thu, 12 Apr 2012 13:43:43 +0000 (13:43 +0000)]
Remove block reallocation used to make room for the cylinder group
summary structure.  From now on, when there is no room for it,
we simply allocate new one in a newly added cylinder group.

This patch removes a conditional in updcsloc(), reindents some code
there, and removes unused routines.  I decided to do it this way instead
of disabling reallocation when the filesystem is live and leaving it
as it is otherwise, because this allows for removal of lots of complicated
and hard to test code.  Also, conditionally disabling it would result
in a different layout in filesystems resized online and offline, which
would look somewhat weird.

Reviewed by: mckusick
No objections from: kib
Sponsored by: The FreeBSD Foundation

12 years agoRefactor da(4) to remove one of two code paths used to query capacity
trasz [Thu, 12 Apr 2012 12:58:14 +0000 (12:58 +0000)]
Refactor da(4) to remove one of two code paths used to query capacity
data.

Reviewed by: ken, mav (earlier version)
Sponsored by: The FreeBSD Foundation

12 years agoRead backup GPT header from the last LBA only when primary GPT header and
ae [Thu, 12 Apr 2012 12:37:53 +0000 (12:37 +0000)]
Read backup GPT header from the last LBA only when primary GPT header and
table aren't valid. If they are ok, use hdr_lba_alt value to read backup
header. This will make gptboot happy when GPT used atop of some GEOM
provider, e.g. GEOM_MIRROR.

Reviewed by: pjd
MFC after: 2 weeks

12 years agoSome code restructuring to bring the memory allocator out of netmap.c
luigi [Thu, 12 Apr 2012 11:27:09 +0000 (11:27 +0000)]
Some code restructuring to bring the memory allocator out of netmap.c
and make it easier to replace it with a different implementation.
On passing, also fix indentation.

NOTE: I know that #include "foo.c" is ugly, but the alternative
(add another entry to sys/conf/files, add a separate header with
structs and prototypes, and expose functions that are meant to
be private) looks even worse to me.
We need a more modular way to specify dependencies and build options.

12 years agoKeep a copy of the original pointer returned by openpam_readline() so
des [Thu, 12 Apr 2012 11:23:24 +0000 (11:23 +0000)]
Keep a copy of the original pointer returned by openpam_readline() so
we can free it later, instead of trying to free a pointer that points
to the end of the buffer.

Committed to head because this code no longer exists upstream.

Submitted by: jasone@

12 years agoAdd thread-private flag to indicate that error value is already placed
kib [Thu, 12 Apr 2012 10:48:43 +0000 (10:48 +0000)]
Add thread-private flag to indicate that error value is already placed
in td_errno. Flag is supposed to be used by syscalls returning
EJUSTRETURN because errno was already placed into the usermode frame
by a call to set_syscall_retval(9). Both ktrace and dtrace get errno
value from td_errno if the flag is set.

Use the flag to fix sigsuspend(2) error return ktrace records.

Requested by: bde
MFC after: 1 week

12 years agoremove an unnecessary #define
luigi [Thu, 12 Apr 2012 10:32:34 +0000 (10:32 +0000)]
remove an unnecessary #define

12 years agoPropagate the current state of rtld_bind_lock to dlopen_object() calls
kib [Thu, 12 Apr 2012 10:32:22 +0000 (10:32 +0000)]
Propagate the current state of rtld_bind_lock to dlopen_object() calls
through the filter loading call chain. This fixes attempts to
write-lock the already locked rtld_bind_lock when filter loading is
initiated by relocation of dlopening dso.

Reported and tested by: Taku YAMAMOTO <taku tackymt homeip net>
MFC after: 1 week

12 years agouse correct selinfo pointer for the generic interrupt handler
luigi [Thu, 12 Apr 2012 08:54:01 +0000 (08:54 +0000)]
use correct selinfo pointer for the generic interrupt handler
(it is never used in current FreeBSD drivers).

12 years agouse getopt to parse options, add one option to set
luigi [Thu, 12 Apr 2012 08:38:56 +0000 (08:38 +0000)]
use getopt to parse options, add one option to set
the wait time for link-up events

12 years agoThe BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
dougb [Thu, 12 Apr 2012 01:53:33 +0000 (01:53 +0000)]
The BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
This change was noticed by ISC at:

https://lists.isc.org/pipermail/bind-users/2012-April/087345.html

and verified by me both by comparing the contents of the old and new
distfiles and by verifying the PGP signature on the new distfile.

12 years agoSet the proto to LAGG_PROTO_NONE before calling the detach routine so packets
thompsa [Thu, 12 Apr 2012 01:07:17 +0000 (01:07 +0000)]
Set the proto to LAGG_PROTO_NONE before calling the detach routine so packets
are discarded, this is an issue because lacp drops the lock which may allow
network threads to access freed memory. Expand the lock coverage so the
detach/attach happen atomically.

Submitted by: Andrew Boyer (earlier version)

12 years agoSort completions
eadler [Thu, 12 Apr 2012 00:12:17 +0000 (00:12 +0000)]
Sort completions
Add a new one for sysctl

Submitted by: rm (the new completion)
Approved by: cperciva (implicit)
MFC after: 3 days

12 years agoExport vinactive() from kern/vfs_subr.c (e.g., make it no longer
mckusick [Wed, 11 Apr 2012 23:01:11 +0000 (23:01 +0000)]
Export vinactive() from kern/vfs_subr.c (e.g., make it no longer
static and declare its prototype in sys/vnode.h) so that it can be
called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c)
instead of the body of vinactive() being cut and pasted into
process_deferred_inactive().

Reviewed by: kib
MFC after:   2 weeks

12 years agoWhitespace cleanup.
mckusick [Wed, 11 Apr 2012 22:43:40 +0000 (22:43 +0000)]
Whitespace cleanup.

12 years agoWe don't need kcopy() in any of the remaining places it is used, so
nwhitehorn [Wed, 11 Apr 2012 22:23:50 +0000 (22:23 +0000)]
We don't need kcopy() in any of the remaining places it is used, so
remove it.

MFC after: 2 weeks

12 years agoOnly manipulate the PGA_EXECUTABLE flag on managed pages. This is a proxy
nwhitehorn [Wed, 11 Apr 2012 21:56:55 +0000 (21:56 +0000)]
Only manipulate the PGA_EXECUTABLE flag on managed pages. This is a proxy
for whether the page is physical. On dense phys mem systems (32-bit),
VM_PHYS_TO_PAGE will not return NULL for device memory pages if device
memory is above physical memory even if there is no allocated vm_page.
Attempting to use the returned page could then cause either memory
corruption or a page fault.

12 years agoReapply r223198 which was reverted in the previous vendor import. Some
jhb [Wed, 11 Apr 2012 21:33:45 +0000 (21:33 +0000)]
Reapply r223198 which was reverted in the previous vendor import.  Some
portions were already reapplied in r233708:
- Use a dedicated task to handle deferred transmits from the if_transmit
  method instead of reusing the existing per-queue interrupt task.
  Reusing the per-queue interrupt task could result in both an interrupt
  thread and the taskqueue thread trying to handle received packets on a
  single queue resulting in out-of-order packet processing.
- Call ether_ifdetach() earlier in igb_detach().
- Drain tasks and free taskqueues during igb_detach().

MFC after: 1 week

12 years agoTrim stray blank line.
jhb [Wed, 11 Apr 2012 21:00:33 +0000 (21:00 +0000)]
Trim stray blank line.

12 years agoAllow device_busy() and device_unbusy() to be invoked while a device is
jhb [Wed, 11 Apr 2012 20:57:41 +0000 (20:57 +0000)]
Allow device_busy() and device_unbusy() to be invoked while a device is
being attached.  This is implemented by adding a new DS_ATTACHING state
while a device's DEVICE_ATTACH() method is being invoked.  A driver is
required to not fail an attach of a busy device.  The device's state will
be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked
busy during DEVICE_ATTACH().

Reviewed by: kib
MFC after: 1 week

12 years agoFix error in r233949. Synchronizing icaches on uncacheable pages turns out
nwhitehorn [Wed, 11 Apr 2012 20:28:05 +0000 (20:28 +0000)]
Fix error in r233949. Synchronizing icaches on uncacheable pages turns out
not to be a good idea, and of course the PV entry list for a page is never
empty after the page has been mapped.

12 years agoA couple of changes related to ixgbe operation in netmap mode:
luigi [Wed, 11 Apr 2012 16:11:08 +0000 (16:11 +0000)]
A couple of changes related to ixgbe operation in netmap mode:

- add a sysctl, dev.netmap.ix_crcstrip, to control whether ixgbe should
  strip the CRC on received frames. Defaults to 0, which keeps the CRC.
  and improves performance when receiving min-sized (64-byte) frames.
  This matters because  min-sized frames is one of the standard
  benchmarks for switches and routers, some chipsets seem to issue
  read-modify-write cycles for PCIe transactions that are not a
  full cache line, and a min-sized frame triggers the bug, resulting
  in reduced throughput -- 9.7 instead of 14.88 Mpps -- and heavy
  bus load.

- for the time being, always look for incoming packets on a select/poll
  even if there has not been an interrupt in the meantime. This is
  only a temporary workaround for a probable race condition in keeping
  track of rx interrupts.
  Add a couple of diagnostic vars to help studying the problem.

12 years agoRestore the blank line incorrectly removed in r234104.
jh [Wed, 11 Apr 2012 15:48:50 +0000 (15:48 +0000)]
Restore the blank line incorrectly removed in r234104.

Pointed out by: bde

12 years agoSupport percent-encoded user and password
emaste [Wed, 11 Apr 2012 15:42:02 +0000 (15:42 +0000)]
Support percent-encoded user and password

RFC 1738 specifies that any ":", "@", or "/" within a user name or
password in a URL is percent-encoded, to avoid ambiguity with the use
of those characters as URL component separators.

Reviewed by:    rstone@
MFC after: 1 month

12 years agoEnable prefetching of descriptors on the TX ring, using the same
luigi [Wed, 11 Apr 2012 15:02:14 +0000 (15:02 +0000)]
Enable prefetching of descriptors on the TX ring, using the same
values as in the Intel driver 3.8.21 for linux.  The fact that it
is standard in the above driver suggests that it has no bad side
effects.

But of course there must be a reason for enabling features, not
just "it does not harm", so here it is a good one:

Prefetching enables full line rate even using a single queue (14.88
Mpps, compared to ~12 Mpps without prefetch).  This in turn is
terribly useful when one wants to schedule traffic.

For obvious reasons the difference is only visible with netmap
or other high speed solutions, but presumably the advantage
should be in the order of a fraction of a microsecond when
starting transmission on an empty queue.

Discussed with Jack Vogel.

MFC after: 1 week

12 years agoFix typo (add a missing '%/' in sed)
eadler [Wed, 11 Apr 2012 14:36:05 +0000 (14:36 +0000)]
Fix typo (add a missing '%/' in sed)

Submitted by: jmallett
Approved by: cperciva (implicit)
MFC after: 3 days

12 years agos/Free Memory Pages/Free Memory/ to avoid confusion, since we're
eadler [Wed, 11 Apr 2012 14:18:18 +0000 (14:18 +0000)]
s/Free Memory Pages/Free Memory/ to avoid confusion, since we're
reporting a number of bytes rather than a number of pages

PR: misc/165208
Submitted by: Arnaud Lacombe <lacombar@gmail.com>
Approved by: cperciva
MFC after: 3 days

12 years ago- remove the length shortening on the path
eadler [Wed, 11 Apr 2012 14:13:22 +0000 (14:13 +0000)]
- remove the length shortening on the path
- make the default prompt a bit more like scp
- make the user show as root even when using 'su' instead of 'su -'
- the key bindings didn't hurt anything but likely hide a bug
- merge history instead of overwriting it

Submitted by: gavin, joel
Approved by: cperciva

12 years agoMake the item numbers match the crypt magic number
eadler [Wed, 11 Apr 2012 14:12:28 +0000 (14:12 +0000)]
Make the item numbers match the crypt magic number

PR: docs/166497
Submitted by: Mike Kelly <pioto@pioto.org>
Approved by: cperciva
MFC after: 1 week

12 years agoReturn EBADF instead of EMFILE from dup2 when the second argument is
eadler [Wed, 11 Apr 2012 14:08:09 +0000 (14:08 +0000)]
Return EBADF instead of EMFILE from dup2 when the second argument is
outside the range of valid file descriptors

PR: kern/164970
Submitted by: Peter Jeremy <peterjeremy@acm.org>
Reviewed by: jilles
Approved by: cperciva
MFC after: 1 week

12 years agoIt is a logical error that in carp_multicast_cleanup()
glebius [Wed, 11 Apr 2012 12:26:30 +0000 (12:26 +0000)]
It is a logical error that in carp_multicast_cleanup()
we look at count of addresses on a particular vhid, we
should account number of addresses on cif.

To achieve this we need to run carp_attach() and
carp_detach() under appropriate cif lock.

12 years agoIt seems that libdisk(3) incorrectly sets d_secperunit value.
ae [Wed, 11 Apr 2012 06:35:13 +0000 (06:35 +0000)]
It seems that libdisk(3) incorrectly sets d_secperunit value.
Automatically fix it like GEOM_PART_BSD does.

MFC after: 1 week

12 years agoBack out r228476.
yongari [Wed, 11 Apr 2012 06:34:25 +0000 (06:34 +0000)]
Back out r228476.
r228476 fixed superfluous link UP/DOWN messages but broke IPMI
access during boot.  It's not clear why r228476 breaks IPMI and
should be revisited.

Reported by: Paul Guyot <paulguyot <> ieee dot org >
MFC after: 1 week

12 years agouart_cpu_amd64.c and uart_cpu_i386.c (under sys/dev/uart) are
marcel [Wed, 11 Apr 2012 02:42:01 +0000 (02:42 +0000)]
uart_cpu_amd64.c and uart_cpu_i386.c (under sys/dev/uart) are
identical now that the bus spaces are unified under sys/x86.
Replace them with a single uart_cpu_x86.c.
o   delete uart_cpu_i386.c
o   move uart_cpu_amd64.c to uart_cpu_x86.c
o   update files.amd64 and files.i386 accordingly.

12 years agoFix the default, non-superg compile.
adrian [Wed, 11 Apr 2012 02:34:32 +0000 (02:34 +0000)]
Fix the default, non-superg compile.

Pointy-hat-to: adrian

12 years agoDo not restore the register holding the TLS pointer when doing various
nwhitehorn [Wed, 11 Apr 2012 00:00:40 +0000 (00:00 +0000)]
Do not restore the register holding the TLS pointer when doing various
usermode context switches (long jumps and ucontext operations). If these
are used across threads, multiple threads can end up with the same TLS base.
Madness will then result.

This makes behavior on PPC match that on x86 systems and on Linux.

MFC after: 10 days

12 years agoFix compilation with IEEE80211_ENABLE_SUPERG defined.
adrian [Tue, 10 Apr 2012 19:47:44 +0000 (19:47 +0000)]
Fix compilation with IEEE80211_ENABLE_SUPERG defined.

PR: kern/164951

12 years agoConvert the flags over to a set of bit flags.
adrian [Tue, 10 Apr 2012 19:25:43 +0000 (19:25 +0000)]
Convert the flags over to a set of bit flags.

12 years agoBack out r233646. Although it fixed most libgeom consumers under 32-bit
jmallett [Tue, 10 Apr 2012 17:37:24 +0000 (17:37 +0000)]
Back out r233646.  Although it fixed most libgeom consumers under 32-bit
compatibility, it broke programs using devstat, under 32-bit compatibility and
not.

It's very difficult to fix the identifiers used by devstat, so this change is
simply being backed out.  Since changes to 3rd-party code seem likely, and may be
necessary to properly fix 32-bit binaries on 64-bit kernel, it would seem better
to make more invasive changes to fix GEOM's problems with 32-bit compatibility in
general.

The right thing to do is to replace all of the use of pointers as opaque
identifiers with a fixed-size (64-bit or even 32-bit should be enough for tracking
unique GEOM elments) field.  That probably maintains source compatibility with
most GEOM consumers, and allows xml2tree to make better assumptions about how to
decode the identifiers.

Submitted by: Anton Yuzhaninov

12 years agoQueue CCBs internally instead of using CAM_REQUEUE_REQ status. This fixes
jimharris [Tue, 10 Apr 2012 16:33:19 +0000 (16:33 +0000)]
Queue CCBs internally instead of using CAM_REQUEUE_REQ status.  This fixes
problem where userspace apps such as smartctl fail due to CAM_REQUEUE_REQ
status getting returned when tagged commands are outstanding when smartctl
sends its I/O using the pass(4) interface.

Sponsored by: Intel
Found and tested by: Ravi Pokala <rpokala at panasas dot com>
Reviewed by: scottl
Approved by: scottl
MFC after: 1 week

12 years agoFix !SMP build after r234074.
marius [Tue, 10 Apr 2012 16:08:46 +0000 (16:08 +0000)]
Fix !SMP build after r234074.

Reviewed by: attilio, jhb

12 years agoApply changes from r233787 to ext2fs:
jh [Tue, 10 Apr 2012 16:05:52 +0000 (16:05 +0000)]
Apply changes from r233787 to ext2fs:

- Use more natural ip->i_flags instead of vap->va_flags in the final
  flags check.
- Style improvements.

No functional change intended.

MFC after: 2 weeks

12 years ago- Return EPERM from ufs_setattr() when an user without PRIV_VFS_SYSFLAGS
jh [Tue, 10 Apr 2012 15:59:37 +0000 (15:59 +0000)]
- Return EPERM from ufs_setattr() when an user without PRIV_VFS_SYSFLAGS
  privilege attempts to toggle SF_SETTABLE flags.
- Use the '^' operator in the SF_SNAPSHOT anti-toggling check.

Flags are now stored to ip->i_flags in one place after all checks.

Submitted by: bde

12 years agoParenthesize args in yyless() and unput() replacement text
schweikh [Tue, 10 Apr 2012 15:29:28 +0000 (15:29 +0000)]
Parenthesize args in yyless() and unput() replacement text
so they are safer when used with expressions.

MFC after: 1 week

12 years agoProperly parse 40G media types from newer Mellanox adapters that are
jhb [Tue, 10 Apr 2012 14:01:09 +0000 (14:01 +0000)]
Properly parse 40G media types from newer Mellanox adapters that are
40G capable.  For now, map all 40G links to 40GBase-CR4.

MFC after: 2 weeks

12 years agoAdd media types for 40G media that might be used with FreeBSD.
jhb [Tue, 10 Apr 2012 13:59:35 +0000 (13:59 +0000)]
Add media types for 40G media that might be used with FreeBSD.

Reviewed by: bz
MFC after: 2 weeks

12 years ago- Add rc.d script for kfd, kerberos forwarded tickets daemon.
stas [Tue, 10 Apr 2012 09:27:41 +0000 (09:27 +0000)]
- Add rc.d script for kfd, kerberos forwarded tickets daemon.

12 years agoBlank the aggregate stats whenever the zero ioctl is called.
adrian [Tue, 10 Apr 2012 07:27:42 +0000 (07:27 +0000)]
Blank the aggregate stats whenever the zero ioctl is called.

12 years agoSquirrel away SYNC interrupt debugging if it's enabled in the HAL.
adrian [Tue, 10 Apr 2012 07:23:37 +0000 (07:23 +0000)]
Squirrel away SYNC interrupt debugging if it's enabled in the HAL.

Bus errors will show up as various SYNC interrupts which will be passed
back up to ath_intr().

12 years agoRevert this for now - it may work for -8 and -9 and -HEAD, but not
adrian [Tue, 10 Apr 2012 07:16:28 +0000 (07:16 +0000)]
Revert this for now - it may work for -8 and -9 and -HEAD, but not
"-HEAD driver + net80211 on -9 kernel."

I'll figure this out at some later stage.

12 years agoSquirrel away the SYNC interrupt in case we're doing interrupt debugging.
adrian [Tue, 10 Apr 2012 07:11:33 +0000 (07:11 +0000)]
Squirrel away the SYNC interrupt in case we're doing interrupt debugging.

12 years agoM_DONTWAIT is a flag from historical mbuf(9)
glebius [Tue, 10 Apr 2012 06:52:39 +0000 (06:52 +0000)]
M_DONTWAIT is a flag from historical mbuf(9)
allocator, not malloc(9) or uma(9) flag.

12 years agoM_DONTWAIT is a flag from historical mbuf(9)
glebius [Tue, 10 Apr 2012 06:52:21 +0000 (06:52 +0000)]
M_DONTWAIT is a flag from historical mbuf(9)
allocator, not malloc(9) or uma(9) flag.

12 years ago* Since the API changed along the -CURRENT path (december 2011),
adrian [Tue, 10 Apr 2012 06:25:11 +0000 (06:25 +0000)]
* Since the API changed along the -CURRENT path (december 2011),
  add a FreeBSD_version check.  It should work fine for compiling
  on -HEAD, 9.x and 8.x.

* Conditionally compile the 11n options only when 11n is enabled.

The above changes allow the ath(4) driver to compile and run on
8.1-RELEASE (Hi old PC-BSD!) but with the 11n stuff disabled.

I've done a test against the net80211 and tools in 8.1-RELEASE.
The NIC used in testing is the AR2427 in an EEEPC.

Just to be clear - this change is to allow the -HEAD ath/hal/rate
code to run on 9.x _and_ 8.x with no source changes. However,
when running on earlier kernels, it should only be used for legacy
mode. (Don't define ATH_ENABLE_11N.)

12 years agoCARP should be capable to run on if_bridge(4). Unfortunately,
glebius [Tue, 10 Apr 2012 05:42:48 +0000 (05:42 +0000)]
CARP should be capable to run on if_bridge(4). Unfortunately,
this commit is not enough to enable CARP operation on
if_bridge(4), because the latter doesn't handle or even
initialize its ifp->if_link_state.

Reported by: Alexander Lunev <sol289 gmail.com>

12 years agoUpdate examples with corrections from the author
eadler [Tue, 10 Apr 2012 01:49:31 +0000 (01:49 +0000)]
Update examples with corrections from the author

PR: ports/160689
Submitted by: mickael.maillot@gmail.com
Approved by: cperciva (implicit)
MFC after: 1 days (with r233429)

12 years agoBSP is not added to the mask of valid target CPUs for interrupts
attilio [Mon, 9 Apr 2012 22:41:19 +0000 (22:41 +0000)]
BSP is not added to the mask of valid target CPUs for interrupts
in set_apic_interrupt_ids(). Besides, set_apic_interrupts_ids() is not
called in the !SMP case too.
Fix this by:
- Adding the BSP as an interrupt target directly in cpu_startup().
- Remove an obsolete optimization where the BSP are skipped in
  set_apic_interrupt_ids().

Reported by: jh
Reviewed by: jhb
MFC after: 3 days
X-MFC: r233961
Pointy hat to: me

12 years agoRemove unused and wrong SA_PROC internal signal property.
jilles [Mon, 9 Apr 2012 21:58:58 +0000 (21:58 +0000)]
Remove unused and wrong SA_PROC internal signal property.

The SA_PROC signal property indicated whether each signal number is directed
at a specific thread or at the process in general. However, that depends on
how the signal was generated and not on the signal number. SA_PROC was not
used.