]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agozfs module: perform cleanup during shutdown in addition to module unload
Andriy Gapon [Wed, 24 Jul 2013 09:59:16 +0000 (09:59 +0000)]
zfs module: perform cleanup during shutdown in addition to module unload

- move init and fini code into separate functions (like it is done upstream)
- invoke fini code via shutdown_post_sync event hook

This should make zfs close its underlying devices during shutdown,
which may be important for their drivers.

MFC after: 20 days

11 years agozfsboottest: remove explicit -Werror
Andriy Gapon [Wed, 24 Jul 2013 09:50:44 +0000 (09:50 +0000)]
zfsboottest: remove explicit -Werror

Unfortunately sys/boot is compliled without -Werror at the moment.

MFC after: 7 days

11 years agorename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST
Andriy Gapon [Wed, 24 Jul 2013 09:45:31 +0000 (09:45 +0000)]
rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST

Also directly call swapper() at the end of mi_startup instead of
relying on swapper being the last thing in sysinits order.

Rationale:

- "RUN_SCHEDULER" was misleading, scheduling already takes place at that stage
- "scheduler" was misleading, the function swaps in the swapped out processes
- another SYSINIT(SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY) could never be
  invoked depending on its relative order with scheduler; this was not obvious
  and the bug actually used to exist

Reviewed by: kib (ealier version)
MFC after: 14 days

11 years agozfs: move vnode creation from zfs_znode_cache_constructor to zfs_znode_alloc
Andriy Gapon [Wed, 24 Jul 2013 09:15:59 +0000 (09:15 +0000)]
zfs: move vnode creation from zfs_znode_cache_constructor to zfs_znode_alloc

All other places where a znode is allocated do not need z_vnode at all.
These are:
- zfs_create_share_dir
- zfs_create_fs

This chnage ensures two things:
- VN_LOCK_ASHARE is not erroneously called for VFIFO vnodes
- vn_lock is called on a fully constructed vnode with correct v_ops

The change also allows to make zfs_znode_cache_constructor a normal
kmem_cache constructor again (as it is in upstream).
This allows to avoid a problem where zfs_znode_cache_destructor
may be called on un-constructed znodes.

MFC after: 17 days

11 years agonewvers.sh: add another git-svn fallback
Andriy Gapon [Wed, 24 Jul 2013 09:06:50 +0000 (09:06 +0000)]
newvers.sh: add another git-svn fallback

This time it is for a git mirror that stores svn revisions as
git notes, e.g. https://github.com/freebsd/freebsd

MFC after: 10 days
Sponsored by: HybridCluster

11 years agonewvers.sh: fix the fallback case of git-svn detection
Andriy Gapon [Wed, 24 Jul 2013 09:05:04 +0000 (09:05 +0000)]
newvers.sh: fix the fallback case of git-svn detection

MFC after: 5 days
Sponsored by: HybridCluster

11 years agoRemove duplicated parapgraph.
Stefan Eßer [Wed, 24 Jul 2013 08:36:29 +0000 (08:36 +0000)]
Remove duplicated parapgraph.

MFC after: 3 days

11 years agoRemove unused argument from vmem_add1().
Gleb Smirnoff [Wed, 24 Jul 2013 08:02:56 +0000 (08:02 +0000)]
Remove unused argument from vmem_add1().

Reviewed by: jeff

11 years agoSince r251709 a slab no longer use 8-bit indicies to manage items,
Gleb Smirnoff [Wed, 24 Jul 2013 06:13:00 +0000 (06:13 +0000)]
Since r251709 a slab no longer use 8-bit indicies to manage items,
thus remove a stale comment.

Reviewed by: jeff

11 years agoDecouple the UUID generator from network interfaces by having MAC
Marcel Moolenaar [Wed, 24 Jul 2013 04:24:21 +0000 (04:24 +0000)]
Decouple the UUID generator from network interfaces by having MAC
addresses added to the UUID generator using uuid_ether_add(). The
UUID generator keeps an arbitrary number of MAC addresses, under
the assumption that they are rarely removed (= uuid_ether_del()).
This achieves the following:
1.  It brings up closer to having the network stack as a loadable
    module.
2.  It allows the UUID generator to filter MAC addresses for best
    results (= highest chance of uniqeness).
3.  MAC addresses can come from anywhere, irrespactive of whether
    it's used for an interface or not.

A side-effect of the change is that when no MAC addresses have been
added, a random multicast MAC address is created once and re-used if
needed. Previusly, when a random MAC address was needed, it was
created for every call. Thus, a change in behaviour is introduced
for when no MAC addresses exist.

Obtained from: Juniper Networks, Inc.

11 years agoFix a bug in cp += SA_SIZE() in RTA_* loop. This could prevent
Hiroki Sato [Wed, 24 Jul 2013 04:05:48 +0000 (04:05 +0000)]
Fix a bug in cp += SA_SIZE() in RTA_* loop.  This could prevent
RTA_IFP from displaying correctly in route get subcommand.

Spotted by: dim

11 years agoIncrease the size of the OFW bounce buffer to 4 pages. With this I can now run
Justin Hibbits [Wed, 24 Jul 2013 02:01:01 +0000 (02:01 +0000)]
Increase the size of the OFW bounce buffer to 4 pages.  With this I can now run
'ofwdump -ap' on my quad G5.

MFC after: 9.2 branch

11 years ago - Remove the long obsolete 'vm_pageout_algorithm' experiment.
Jeff Roberson [Wed, 24 Jul 2013 01:25:56 +0000 (01:25 +0000)]
 - Remove the long obsolete 'vm_pageout_algorithm' experiment.

Discussed with: alc
Sponsored by: EMC / Isilon Storage Division

11 years agoAdd support for emulation of the "or r/m, imm8" instruction.
Neel Natu [Tue, 23 Jul 2013 23:43:00 +0000 (23:43 +0000)]
Add support for emulation of the "or r/m, imm8" instruction.

Submitted by: Zhixiang Yu (zxyu.core@gmail.com)
Obtained from: GSoC 2013 (AHCI device emulation for bhyve)

11 years ago - Correct a stale comment. We don't have vclean() anymore. The work is
Jeff Roberson [Tue, 23 Jul 2013 22:52:38 +0000 (22:52 +0000)]
 - Correct a stale comment.  We don't have vclean() anymore.  The work is
   done by vgonel() and destroy_vobject() should only be called once from
   VOP_INACTIVE().

Sponsored by: EMC / Isilon Storage Division

11 years agoFix a bug introduced in r252646 that causes a page with the PG_PTE_PAT bit set
Neel Natu [Tue, 23 Jul 2013 22:17:00 +0000 (22:17 +0000)]
Fix a bug introduced in r252646 that causes a page with the PG_PTE_PAT bit set
to be interpreted as a superpage. This is because PG_PTE_PAT is at the same
bit position in PTE as PG_PS is in a PDE.

This caused a number of regressions on amd64 systems: panic when starting
X applications, freeze during shutdown etc.

Pointy hat to: me
Tested by: gperez@entel.upc.edu, joel, dumbbell
Reviewed by: kib

11 years agowordexp(): Fix syntax validation for backslashes in single-quotes.
Jilles Tjoelker [Tue, 23 Jul 2013 21:09:26 +0000 (21:09 +0000)]
wordexp(): Fix syntax validation for backslashes in single-quotes.

11 years agoGenerate debug data release dist sets
Ed Maste [Tue, 23 Jul 2013 19:34:09 +0000 (19:34 +0000)]
Generate debug data release dist sets

If WITH_DEBUG_FILES is set the standalone debug data will be excluded
from each ${dist}.txz and placed in a ${dist}.debug.txz.

Submitted by: gjb
Reviewed by: brooks

11 years agotmpfs works perfectly fine with -o union -- there is no reason to exclude it
Nathan Whitehorn [Tue, 23 Jul 2013 14:48:37 +0000 (14:48 +0000)]
tmpfs works perfectly fine with -o union -- there is no reason to exclude it
from the list of options.

11 years agoAdd the support for 802.1q and port based vlans for arswitch.
Luiz Otavio O Souza [Tue, 23 Jul 2013 14:24:22 +0000 (14:24 +0000)]
Add the support for 802.1q and port based vlans for arswitch.

Tested on: RB450G (standalone ar8316), RSPRO (standalone ar8316) and
TPLink MR-3220 (ar724x integrated switch).

Approved by: adrian (mentor)
Obtained from: zrouter

11 years agoRemove the large part of struct ipsecstat. Only few fields of this
Andrey V. Elsukov [Tue, 23 Jul 2013 14:14:24 +0000 (14:14 +0000)]
Remove the large part of struct ipsecstat. Only few fields of this
structure is used, but they already have equal fields in the struct
newipsecstat, that was introduced with FAST_IPSEC and then was merged
together with old ipsecstat structure.

This fixes kernel stack overflow on some architectures after migration
ipsecstat to PCPU counters.

Reported by: Taku YAMAMOTO, Maciej Milewski

11 years agoFix the arswitch instability problem. It turns out that the
Luiz Otavio O Souza [Tue, 23 Jul 2013 14:02:38 +0000 (14:02 +0000)]
Fix the arswitch instability problem.  It turns out that the
arswitch_writereg() routine was writing the registers in the wrong order.

Revert -r241918 as the root problem is now fixed. Remove another workaround
from arswitch_ar7240.c.

Simplify and fix the code on arswitch_writephy() by using
arswitch_writereg().

While here remove a redundant declaration from arswitchvar.h.

Approved by: adrian (mentor)

11 years agoAdd a new flag (ETHERSWITCH_VID_VALID) to say what vlangroups are in use.
Luiz Otavio O Souza [Tue, 23 Jul 2013 13:56:38 +0000 (13:56 +0000)]
Add a new flag (ETHERSWITCH_VID_VALID) to say what vlangroups are in use.
This fix the case when etherswitch is printing the information of port 0
vlan group (in port based vlan mode) with no member ports.

Add the ETHERSWITCH_VID_VALID support to ip17x driver.

Add the ETHERSWITCH_VID_VALID support to rt8366 driver.

arswitch doesn't need to be updated as it doesn't support vlans management
yet.

Approved by: adrian (mentor)

11 years agoFix the usage error message. The valid range is up to max. vlan - 1 since vlangroups...
Luiz Otavio O Souza [Tue, 23 Jul 2013 13:40:26 +0000 (13:40 +0000)]
Fix the usage error message.  The valid range is up to max. vlan - 1 since vlangroups starts at 0.

Approved by: adrian (mentor)

11 years agoRemove ftp2.tr.freebsd.org, it is out of date.
Gavin Atkinson [Tue, 23 Jul 2013 12:20:27 +0000 (12:20 +0000)]
Remove ftp2.tr.freebsd.org, it is out of date.

MFC after: 3 days

11 years agoRevert r249590 and in case if mp_ncpus isn't initialized use MAXCPU. This
Gleb Smirnoff [Tue, 23 Jul 2013 11:16:40 +0000 (11:16 +0000)]
Revert r249590 and in case if mp_ncpus isn't initialized use MAXCPU. This
allows us to init counter zone at early stage of boot.

Reviewed by: kib
Tested by: Lytochkin Boris <lytboris gmail.com>

11 years agoAdd constant for PPP-Max-PayLoad tag.
Gleb Smirnoff [Tue, 23 Jul 2013 10:25:34 +0000 (10:25 +0000)]
Add constant for PPP-Max-PayLoad tag.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

11 years agoAdd isnan() and isinf() to the global namespace in libstdc++'s <cmath>.
David Chisnall [Tue, 23 Jul 2013 10:23:43 +0000 (10:23 +0000)]
Add isnan() and isinf() to the global namespace in libstdc++'s <cmath>.

The standard (n3242, section 17.6.1.1, paragraph 4) says that, because these are
declared as macros in the C specification (even though they are
implemented as functions in the C++ library) they should be in the global
namespace.

A surprising number of configure checks rely on this.  It was broken by recent
cleanups to math.h.

11 years agoIn pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and
Marcel Moolenaar [Tue, 23 Jul 2013 03:03:17 +0000 (03:03 +0000)]
In pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and
bus number into the bus argument. The bus number occupies the least
significant 8 bits. The PCI domain occupies the most significant 24
bits.

On the Altix 350, the PCI domain is a required parameter, but
changing the prototype of the pci_cfgreg*() functions to include a
separate domain argument has wide-spread consequences across the
supported architectures. We'd be changing a known interface.

Multiplexing is an acceptable kluge to give us what we need with
manageable impact. Note that the PCI bus number fits in 8 bits,
so the multiplexing of the domain is a backward compatible change.

11 years agoIn ia64_mca_init(), don't limit the allocation of the info block to
Marcel Moolenaar [Tue, 23 Jul 2013 02:38:23 +0000 (02:38 +0000)]
In ia64_mca_init(), don't limit the allocation of the info block to
fall within the first 256MB of memory. The origin/reason for that
limitation is not known, but it's not believed to be required for
proper initialization. What is known is that the Altix 350 does not
have physical memory at that address (by virtue of the address space
bits).

Keep the boundary at 256MB so that the info block will be covered
by a single direct-mapped translation.

While here, change the flags to M_NOWAIT to eliminate confusion. It
does not change the behaviour of contigmalloc(). What is does is
makes the flags argument explicitly say what the actual behaviour
is.

11 years agoIn pmap_mapdev(), if the physical memory range is not covered by an EFI
Marcel Moolenaar [Tue, 23 Jul 2013 02:11:22 +0000 (02:11 +0000)]
In pmap_mapdev(), if the physical memory range is not covered by an EFI
memory descriptor, don't return NULL as the virtual address, return the
direct-mapped uncacheable virtual address for it. At first, this was
needed only for the Altix 350, but now even some high-end HP machines
have devices mapped to physical addresses that aren't covered by the
EFI memory map.

11 years agoFix previous commit when option RACCT is not used.
Jeremie Le Hen [Mon, 22 Jul 2013 22:16:47 +0000 (22:16 +0000)]
Fix previous commit when option RACCT is not used.

MFC after: 7 days

11 years agoFix a panic in the racct code when munlock(2) is called with incorrect values.
Jeremie Le Hen [Mon, 22 Jul 2013 21:47:14 +0000 (21:47 +0000)]
Fix a panic in the racct code when munlock(2) is called with incorrect values.

The racct code in sys_munlock() assumed that the boundaries provided by the
userland were correct as long as vm_map_unwire() returned successfully.
However the latter contains its own logic and sometimes manages to do something
out of those boundaries, even if they are buggy.  This change makes the racct
code to use the accounting done by the vm layer, as it is done in other places
such as vm_mlock().

Despite fixing the panic, Alan Cox pointed that this code is still race-y
though: two simultaneous callers will produce incorrect values.

Reviewed by: alc
MFC after: 7 days

11 years agoAdd TP-LINK TL-WDN4800.
Sergey Kandaurov [Mon, 22 Jul 2013 19:32:42 +0000 (19:32 +0000)]
Add TP-LINK TL-WDN4800.

PR: docs/180743
Reviewed by: adrian

11 years agoUpdate chipset support list for ath_hal.
Sergey Kandaurov [Mon, 22 Jul 2013 19:21:28 +0000 (19:21 +0000)]
Update chipset support list for ath_hal.
This adds "device ath_ar9300".

PR: docs/180743
Reviewed by: adrian

11 years agoMerge in phase 14+ -> 16 mps driver fixes from LSI:
Kenneth D. Merry [Mon, 22 Jul 2013 18:41:53 +0000 (18:41 +0000)]
Merge in phase 14+ -> 16 mps driver fixes from LSI:

---------------------------------------------------------------
System panics during a Port reset with ouststanding I/O
---------------------------------------------------------------
It is possible to call mps_mapping_free_memory after this
memory is already freed, causing a panic. Removed this extra
call to mps_mappiing_free_memory and call mps_mapping_exit
in place of the mps_mapping_free_memory call so that any
outstanding mapping items can be flushed before memory is
freed.

---------------------------------------------------------------
Correct memory leak during a Port reset with ouststanding I/O
---------------------------------------------------------------
In mps_reinit function, the mapping memory was not being
freed before being re-allocated. Added line to call the
memory free function for mapping memory.

---------------------------------------------------------------
Use CAM_SIM_QUEUED flag in Driver IO path.
---------------------------------------------------------------
This flag informs the XPT that successful abort of a CCB
requires an abort ccb to be issued to the SIM.  While
processing SCSI IO's, set the CAM_SIM_QUEUED flag in the
status for the IO. When the command completes, clear this
flag.

---------------------------------------------------------------
Check for CAM_REQ_INPROG in I/O path.
---------------------------------------------------------------
Added a check in mpssas_action_scsiio for the In Progress
status for the IO. If this flag is set, the IO has already
been aborted by the upper layer (before CAM_SIM_QUEUED was
set) and there is no need to send the IO. The request will
be completed without error.

---------------------------------------------------------------
Improve "doorbell handshake method" for mps_get_iocfacts
---------------------------------------------------------------
Removed call to get Port Facts since this information is
not used currently.

Added mps_iocfacts_allocate function to allocate memory
that is based on IOC Facts data.  Added mps_iocfacts_free
function to free memory that is based on IOC Facts data.
Both of the functions are used when a Diag Reset is performed
or when the driver is attached/detached. This is needed in
case IOC Facts changes after a Diag Reset, which could
happen if FW is upgraded.

Moved call of mps_bases_static_config_pages from the attach
routine to after the IOC is ready to process accesses based
on the new memory allocations (instead of polling through
the Doorbell).

---------------------------------------------------------------
Set TimeStamp in INIT message in millisecond format Set the IOC
---------------------------------------------------------------

---------------------------------------------------------------
Prefer mps_wait_command to mps_request_polled
---------------------------------------------------------------
Instead of using mps_request_polled, call mps_wait_command
whenever possible. Change the mps_wait_command function to
check the current context and either use interrupt context
or poll if required by using the pause or DELAY function.
Added a check after waiting 50mSecs to see if the command
has timed out. This is only done if polliing, the msleep
command will automatically timeout if the command has taken
too long to complete.

---------------------------------------------------------------
Integrated RAID: Volume Activation Failed error message is
displayed though the volume has been activated.
---------------------------------------------------------------
Instead of failing an IOCTL request that does not have a
large enough buffer to hold the complete reply, copy as
much data from the reply as possible into the user's buffer
and log a message saying that the user's buffer was smaller
than the returned data.

---------------------------------------------------------------
mapping_add_new_device failure due to persistent table FULL
---------------------------------------------------------------
When a new device is added, if it is determined that the
device persistent table is being used and is full, instead
of displaying a message for this condition every time, only
log a message if the MPS_INFO bit is set in the debug_flags.

Submitted by: LSI
MFC after: 1 week

11 years agoCAM and mps(4) driver scanning changes.
Kenneth D. Merry [Mon, 22 Jul 2013 18:37:07 +0000 (18:37 +0000)]
CAM and mps(4) driver scanning changes.

Add a PIM_NOSCAN flag to the CAM path inquiry CCB.  This tells CAM
not to perform a rescan on a bus when it is registered.

We now use this flag in the mps(4) driver.  Since it knows what
devices it has attached, it is more efficient for it to just issue
a target rescan on the targets that are attached.

Also, remove the private rescan thread from the mps(4) driver in
favor of the rescan thread already built into CAM.  Without this
change, but with the change above, the MPS scanner could run before
or during CAM's initial setup, which would cause duplicate device
reprobes and announcements.

sys/param.h:
Bump __FreeBSD_version to 1000039 for the inclusion of the
PIM_RESCAN CAM path inquiry flag.

sys/cam/cam_ccb.h:
sys/cam/cam_xpt.c:
Added a PIM_NOSCAN flag.  If a SIM sets this in the path
inquiry ccb, then CAM won't rescan the bus in
xpt_bus_regsister.

sys/dev/mps/mps_sas.c
For versions of FreeBSD that have the PIM_NOSCAN path
inquiry flag, don't freeze the sim queue during scanning,
because CAM won't be scanning this bus.  Instead, hold
up the boot.  Don't call mpssas_rescan_target in
mpssas_startup_decrement; it's redundant and I don't
know why it was in there.

Set PIM_NOSCAN in path inquiry CCBs.

Remove methods related to the internal rescan daemon.

Always use async events to trigger a probe for EEDP support.
In older versions of FreeBSD where AC_ADVINFO_CHANGED is
not available, use AC_FOUND_DEVICE and issue the
necessary READ CAPACITY manually.

Provide a path to xpt_register_async() so that we only
receive events for our own SCSI domain.

Improve error reporting in cases where setup for EEDP
detection fails.

sys/dev/mps/mps_sas.h:
Remove softc flags and data related to the scanner thread.

sys/dev/mps/mps_sas_lsi.c:
Unconditionally rescan the target whenever a device is added.

Sponsored by: Spectra Logic
MFC after: 1 week

11 years agoDocument EINVAL error return from PT_LWPINFO
Ed Maste [Mon, 22 Jul 2013 18:18:21 +0000 (18:18 +0000)]
Document EINVAL error return from PT_LWPINFO

11 years agoFix build.
Gleb Smirnoff [Mon, 22 Jul 2013 14:23:46 +0000 (14:23 +0000)]
Fix build.

11 years agoSync-up with bsdinstall(8) FTP mirrorselect changes.
Devin Teske [Mon, 22 Jul 2013 13:56:35 +0000 (13:56 +0000)]
Sync-up with bsdinstall(8) FTP mirrorselect changes.

SVN r224656:
Add back ftp4, a new machine has taken its place. ftp2 and ftp8 are both
IPv6 capable mirrors.  cvsup4/ftp4 have already been added to the handbook.

NOTE: Except put IPv6 entries in IPv6 section at the top of the list

SVN r225467:
Add ftp4.se.freebsd.org to the IPv4 and IPv6 mirror lists.

SVN r235228:
Add the IPv6 tag to ftp4.fr.freebsd.org.

NOTE: Except dup entry into IPv6 section.

SVN r243832:
- Remove snapshots.se.freebsd.org [1]
- Add ftp6.se.freebsd.org

SVN r243854:
Remove snapshots.jp.freebsd.org. It stopped working years ago.

SVN r253543:
Update mirror list to more closely match
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html

MFC after: 1 week

11 years agoAdd some USB gadget example drivers for USB audio, USB keyboard,
Hans Petter Selasky [Mon, 22 Jul 2013 13:39:33 +0000 (13:39 +0000)]
Add some USB gadget example drivers for USB audio, USB keyboard,
USB mouse and USB modem classes. Hopefully someone will find
these examples useful when implementing USB device side drivers
using the FreeBSD USB stack.

11 years agoUpdate mirror list to more closely match
Gavin Atkinson [Mon, 22 Jul 2013 12:56:50 +0000 (12:56 +0000)]
Update mirror list to more closely match
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html

MFC after: 1 week

11 years agoFor consistency with previous releases, name the cdrom install
Glen Barber [Mon, 22 Jul 2013 12:07:57 +0000 (12:07 +0000)]
For consistency with previous releases, name the cdrom install
cd 'disc1.iso'.

Discussed with: re@ team
Approved by: kib (mentor)
MFC after: 3 days
X-MFC-To: stable/9 only

11 years agoRemove weirdly-named autofoo file. This is not needed for the (FreeBSD)
Colin Percival [Mon, 22 Jul 2013 08:46:15 +0000 (08:46 +0000)]
Remove weirdly-named autofoo file.  This is not needed for the (FreeBSD)
build, and freebsd-update chokes on it.

9.2-RELEASE candidate.

Approved by: rwatson
MFC after: 3 days

11 years ago5725 family of devices corrupts TSO packets when TSO DMA buffers
Pyun YongHyeon [Mon, 22 Jul 2013 05:45:54 +0000 (05:45 +0000)]
5725 family of devices corrupts TSO packets when TSO DMA buffers
cross into regions which are within MSS bytes of a 4GB boundary.
If we encounter the condition, drop the packet.

Reviewed by: Geans Pin geanspin@Broacom

11 years agoThis file isn't derived from anything delivered by Berkeley, so remove
Warner Losh [Mon, 22 Jul 2013 03:55:15 +0000 (03:55 +0000)]
This file isn't derived from anything delivered by Berkeley, so remove
this statement.

11 years agoRemove cr_prison NULL check from proc_to_reap.
Mateusz Guzik [Mon, 22 Jul 2013 02:07:15 +0000 (02:07 +0000)]
Remove cr_prison NULL check from proc_to_reap.

Userspace processes always have a prison.

MFC after: 2 weeks

11 years agoRemove duplicate assertion from tdsendsignal.
Mateusz Guzik [Mon, 22 Jul 2013 00:44:37 +0000 (00:44 +0000)]
Remove duplicate assertion from tdsendsignal.

MFC after: 2 weeks

11 years agoFix an XHCI regression:
Hans Petter Selasky [Sun, 21 Jul 2013 20:45:23 +0000 (20:45 +0000)]
Fix an XHCI regression:

The Block Event Interrupts, BEI, feature does not
work like expected with the Renesas XHCI chipsets.
Revert feature.

While at it correct the TD SIZE computation in
case of Zero Length Packet, ZLP, in the end of a
multi frame USB transfer.

MFC after: 1 week
PR: usb/180726

11 years agoRegenerate.
Konstantin Belousov [Sun, 21 Jul 2013 19:44:53 +0000 (19:44 +0000)]
Regenerate.

11 years agoImplement compat32 wrappers for the ktimer_* syscalls.
Konstantin Belousov [Sun, 21 Jul 2013 19:43:52 +0000 (19:43 +0000)]
Implement compat32 wrappers for the ktimer_* syscalls.

Reported, reviewed and tested by: Petr Salinger <Petr.Salinger@seznam.cz>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

11 years agoWrap kmq_notify(2) for compat32 to properly consume struct sigevent32
Konstantin Belousov [Sun, 21 Jul 2013 19:40:30 +0000 (19:40 +0000)]
Wrap kmq_notify(2) for compat32 to properly consume struct sigevent32
argument.

Reviewed and tested by: Petr Salinger <Petr.Salinger@seznam.cz>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

11 years agoThe freebsd32_lio_listio() compat syscall takes the struct sigevent32.
Konstantin Belousov [Sun, 21 Jul 2013 19:36:53 +0000 (19:36 +0000)]
The freebsd32_lio_listio() compat syscall takes the struct sigevent32.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

11 years agoMove the convert_sigevent32() utility function into freebsd32_misc.c
Konstantin Belousov [Sun, 21 Jul 2013 19:33:48 +0000 (19:33 +0000)]
Move the convert_sigevent32() utility function into freebsd32_misc.c
for consumption outside the vfs_aio.c.

For SIGEV_THREAD_ID and SIGEV_SIGNAL notification delivery methods,
also copy in the sigev_value, since librt event pumping loop compares
note generation number with the value passed through sigev_value.

Tested by: Petr Salinger <Petr.Salinger@seznam.cz>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

11 years agoFix several warnings.
Konstantin Belousov [Sun, 21 Jul 2013 19:21:18 +0000 (19:21 +0000)]
Fix several warnings.
Fix crash in aio_pty_cleanup() by initializing the pointer before
dereferencing.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

11 years agoCosmetic change, use the same union name on the left and right sides
Konstantin Belousov [Sun, 21 Jul 2013 19:17:46 +0000 (19:17 +0000)]
Cosmetic change, use the same union name on the left and right sides
of the conversion.

Tested by: Petr Salinger <Petr.Salinger@seznam.cz>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

11 years agoDo not set ND6_IFF_ACCEPT_RTADV on if_bridge(4) interfaces when
Hiroki Sato [Sun, 21 Jul 2013 15:26:25 +0000 (15:26 +0000)]
Do not set ND6_IFF_ACCEPT_RTADV on if_bridge(4) interfaces when
ipv6_enable=yes.

MFC after: 3 days

11 years ago- Use getnameinfo() for both of AF_INET and AF_INET6 in routename().
Hiroki Sato [Sun, 21 Jul 2013 14:27:07 +0000 (14:27 +0000)]
- Use getnameinfo() for both of AF_INET and AF_INET6 in routename().
- Add missing "static".

11 years agoTeach siglongjmp about the VFP version of the setjmp buffer.
Andrew Turner [Sun, 21 Jul 2013 12:47:33 +0000 (12:47 +0000)]
Teach siglongjmp about the VFP version of the setjmp buffer.

This fixes a bug where a call to sigsetjmp followed by siglongjmp may fail
when run on a machine with VFP enabled.

11 years ago- Fix nflag in routename().
Hiroki Sato [Sun, 21 Jul 2013 11:59:41 +0000 (11:59 +0000)]
- Fix nflag in routename().
- Display a AF_LINK address in #linkN when sdl_{nlen,alen,slen) == 0 and
  sdl_index != 0.
- Reduce unnecessary loop in pmsg_addrs().
- Remove iso_ntoa().  This is not used.

11 years agomdoc nit
Dag-Erling Smørgrav [Sun, 21 Jul 2013 07:24:25 +0000 (07:24 +0000)]
mdoc nit

11 years agoUse the correct request syntax for proxied (tunneled) HTTPS requests.
Dag-Erling Smørgrav [Sun, 21 Jul 2013 06:59:56 +0000 (06:59 +0000)]
Use the correct request syntax for proxied (tunneled) HTTPS requests.

PR: bin/180666
MFC after: 3 days

11 years agoCreate memstick images with the '.img' filename extension.
Glen Barber [Sun, 21 Jul 2013 05:23:34 +0000 (05:23 +0000)]
Create memstick images with the '.img' filename extension.

Requested by: many
Approved by: kib (mentor)
MFC after: 3 days
X-MFC-To: stable/9 only

11 years agoAdd some initial board support for the AR934x and the Qualcomm Atheros
Adrian Chadd [Sun, 21 Jul 2013 04:00:48 +0000 (04:00 +0000)]
Add some initial board support for the AR934x and the Qualcomm Atheros
DB120 development board.

The AR934x SoCs are a MIPS74k based system with increased RAM addressing
space, some scratch-pad RAM, an improved gige switch PHY and 2x2 or 3x3
on-board dual-band wifi.

This support isn't complete by any stretch; it's just enough to bring
the board up for others to tinker with.  Notably, the MIPS74k support
is broken.  However it boots enough to echo some basic probe/attach
messages, before dying somewhere in the TLB code.

Thankyou to Qualcomm Atheros for their continued support of me doing
open source work with their hardware.

Tested:

* AR9344, mips74k

11 years agoImplement some initial AR934x support routines.
Adrian Chadd [Sun, 21 Jul 2013 03:56:57 +0000 (03:56 +0000)]
Implement some initial AR934x support routines.

This code reads the PLL configuration registers and correctly programs
things so the UART and such can come up.

There's MIPS74k platform issues that need fixing; but this at least brings
things up enough to echo stuff out the serial port and allow for interactive
debugging with ddb.

Tested:

* AR71xx SoCs
* AR933x SoC
* AR9344 board (DB120)

Obtained from: Qualcomm Atheros; Linux/OpenWRT

11 years agoTeach the GPIO code about the AR934x GPIO register and pin counts.
Adrian Chadd [Sun, 21 Jul 2013 03:55:18 +0000 (03:55 +0000)]
Teach the GPIO code about the AR934x GPIO register and pin counts.

11 years agoUse the UART frequency when programming the UART clock.
Adrian Chadd [Sun, 21 Jul 2013 03:54:39 +0000 (03:54 +0000)]
Use the UART frequency when programming the UART clock.

This allows the 16550 support to work correctly on the upcoming
AR934x support.

11 years agoInitialise the watchdog and UART frequencies.
Adrian Chadd [Sun, 21 Jul 2013 03:52:52 +0000 (03:52 +0000)]
Initialise the watchdog and UART frequencies.

For all pre-AR933x chips, the frequency is just the APB frequency.
For the AR933x, the UART frequency is different but we just hacked around
it.

For the AR934x, there's a different PLL setting for these, so they have
to be broken out.

11 years agoAdd two new CPU specific definitions - the watchdog clock frequency and
Adrian Chadd [Sun, 21 Jul 2013 03:51:24 +0000 (03:51 +0000)]
Add two new CPU specific definitions - the watchdog clock frequency and
the UART clock frequency.

The AR933x and AR934x have separate PLL settings for these.

11 years agoThe NFSv4 server incorrectly assumed that the high order words of
Rick Macklem [Sat, 20 Jul 2013 22:35:32 +0000 (22:35 +0000)]
The NFSv4 server incorrectly assumed that the high order words of
the attribute bitmap argument would be non-zero. This caused an
interoperability problem for a recent patch to the Linux NFSv4 client.
The Linux folks have changed their patch to avoid this, but this
patch fixes the problem on the server.

Reported and tested by: Andre Heider (a.heider@gmail.com)
MFC after: 3 days

11 years agoFix address range specification with ifconfig(8) options such as:
Hiroki Sato [Sat, 20 Jul 2013 16:58:17 +0000 (16:58 +0000)]
Fix address range specification with ifconfig(8) options such as:

- inet 192.0.2.1-10 netmask 255.255.255.0 (inet range spec + ifconfig options)
- inet6 2001:db8:1::1-f prefixlen 60 (inet6 range spec + ifconfig options)

If prefixlen or netmask option is specified with CIDR notation at
the same time, the option is used.

Tested by: Michael Grimm
MFC after: 3 days

11 years ago- Simplify getaddr() and print_getmsg() by using RTAX_* instead of RTA_*
Hiroki Sato [Sat, 20 Jul 2013 16:46:51 +0000 (16:46 +0000)]
- Simplify getaddr() and print_getmsg() by using RTAX_* instead of RTA_*
  as the argument.
- Reduce unnecessary loop in print_getmsg().

11 years agoShow "default" for the zero-filled address consistently when nflag == 0.
Hiroki Sato [Sat, 20 Jul 2013 15:58:43 +0000 (15:58 +0000)]
Show "default" for the zero-filled address consistently when nflag == 0.

11 years agoAdd cast to (void *) to the following cases to suppress warnings by
Hiroki Sato [Sat, 20 Jul 2013 15:23:42 +0000 (15:23 +0000)]
Add cast to (void *) to the following cases to suppress warnings by
-Wcast-align.  These do not increase the alignment requirement:

- rtm = (struct rt_msghdr *)(rtm + rtm->rtm_msglen)
- struct sockaddr *sa = &sa0; sX = (struct sockaddr_X *)sa

11 years agofuse: revert birthtime support.
Pedro F. Giffuni [Sat, 20 Jul 2013 14:50:35 +0000 (14:50 +0000)]
fuse: revert birthtime support.

The creation time support breaks the data structures used in linux
fuse.  libfuse carries it's own header.

Revert the changes for now. We will try to get an agreement with the
fuse  upstream maintainers to avoid having to patch the library
headers all the time.

11 years agoUse the right name for the vm_map_find(9) flag to specify shared
Konstantin Belousov [Sat, 20 Jul 2013 13:52:40 +0000 (13:52 +0000)]
Use the right name for the vm_map_find(9) flag to specify shared
mapping.  The MAP_SHARED and MAP_INHERIT_SHARE values are identical.

Noted by: alc
MFC after: 3 days

11 years agoRegenerate
Konstantin Belousov [Sat, 20 Jul 2013 13:40:03 +0000 (13:40 +0000)]
Regenerate

11 years agoid_t is 64bit, provide the compat32 wrapper for clock_getcpuclockid2(2).
Konstantin Belousov [Sat, 20 Jul 2013 13:39:41 +0000 (13:39 +0000)]
id_t is 64bit, provide the compat32 wrapper for clock_getcpuclockid2(2).

Reported and tested by: Petr Salinger <Petr.Salinger@seznam.cz>
PR: threads/180652
Sponsored by: The FreeBSD Foundation

11 years agoAllow the code to be compiled without warnings for any combination
Michael Tuexen [Sat, 20 Jul 2013 13:14:59 +0000 (13:14 +0000)]
Allow the code to be compiled without warnings for any combination
of INET, INET6 and SCTP_DEBUG defines.
The issue was reported by Lally Singh.

MFC after: 2 weeks

11 years agoStart adding support to build bits of our code using the Thumb-2
Andrew Turner [Sat, 20 Jul 2013 09:24:48 +0000 (09:24 +0000)]
Start adding support to build bits of our code using the Thumb-2
instruction set. Thumb-2 requires an if-then instruction to implement
conditional codes.

When building for ARM mode the it-then instructions do not generate any
assembled instruction as per the ARMv7-A Architecture Reference Manual, and
are safe to use.

While this allows the atomic instructions to be built, it doesn't mean we
fully support Thumb code. It works in small tests, but is still known to
fail in a large number of places.

While here add a check for the armv6t2 architecture.

11 years agoAdd support for upcoming BCM5725 (ASIC 5762) controller. This is a
Pyun YongHyeon [Sat, 20 Jul 2013 07:58:03 +0000 (07:58 +0000)]
Add support for upcoming BCM5725 (ASIC 5762) controller.  This is a
new 1Gb server controller chip that will be going into production
soon.
BCM5725 combines MAC with triple-speed PHY, a Network Controller
Sideband Interface (NC-SI) and on-chip memory buffer in a single
device.  BCM5725 has an Application Processing Engine (APE) that is
capable of on-chip management and offloading features.  BCM5725
supports high-precision clock, time stamp registers for
receive/transmit packets and programmable trigger inputs and
watchdog timeouts. These new features are not yet supported by
bge(4).
Many thanks to Broadcom for continuing to support FreeBSD!

Submitted by: Geans Pin geanspin@Broacom (initial version)
Reviewed by: Geans Pin geanspin@Broacom
H/W donated by: Broadcom

11 years agoRecognize BCM5725C PHY.
Pyun YongHyeon [Sat, 20 Jul 2013 07:24:01 +0000 (07:24 +0000)]
Recognize BCM5725C PHY.

11 years agoSetup the PCIE Fast Training Sequence (FTS) value to prevent
Pyun YongHyeon [Sat, 20 Jul 2013 07:09:50 +0000 (07:09 +0000)]
Setup the PCIE Fast Training Sequence (FTS) value to prevent
transmit hangs for 57766 and non Ax versions of 57765.
While here, correct definition of BGE_CHIPREV_57765_AX.

11 years agoAdjust outsizes:
Pedro F. Giffuni [Sat, 20 Jul 2013 03:55:56 +0000 (03:55 +0000)]
Adjust outsizes:

Recalculate FUSE_COMPAT_ENTRY_OUT_SIZE and COMPAT_ATTR_OUT_SIZE.
These were wrong in the previous commit. They are actually unused
in FreeBSD though.

Pointed out by: Jan Beich

11 years agoAdjust outsizes:
Pedro F. Giffuni [Sat, 20 Jul 2013 03:08:50 +0000 (03:08 +0000)]
Adjust outsizes:

When birthtime was added (r253331) we missed adding the weight
of the new fields in FUSE_COMPAT_ENTRY_OUT_SIZE and
COMPAT_ATTR_OUT_SIZE. Adjust them accordingly.

Pointed out by: Jan Beich

11 years agoThere's nothing to free if the unit wasn't allocated.
Navdeep Parhar [Fri, 19 Jul 2013 21:54:48 +0000 (21:54 +0000)]
There's nothing to free if the unit wasn't allocated.

11 years agoAdd message when nvd disks are attached and detached.
Jim Harris [Fri, 19 Jul 2013 21:40:57 +0000 (21:40 +0000)]
Add message when nvd disks are attached and detached.

As part of this commit, add an nvme_strvis() function which borrows
heavily from cam_strvis().  This will allow stripping of
leading/trailing whitespace and also handle unprintable characters
in model/serial numbers.  This function goes into a new nvme_util.c
file which is used by both the driver and nvmecontrol.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

11 years agoAdd new Coleto Creek device support: SATA, SMBus, and Watchdog devices.
Jack F Vogel [Fri, 19 Jul 2013 21:37:40 +0000 (21:37 +0000)]
Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices.

MFC after: 1 week

11 years agoFix nvme(4) and nvd(4) to support non 512-byte sector sizes.
Jim Harris [Fri, 19 Jul 2013 21:33:24 +0000 (21:33 +0000)]
Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.

Recent testing with QEMU that has variable sector size support for
NVMe uncovered some of these issues.  Chatham prototype boards supported
only 512 byte sectors.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

11 years agoDo not call disk_create() until we have completed all initialization of our
Jim Harris [Fri, 19 Jul 2013 21:30:53 +0000 (21:30 +0000)]
Do not call disk_create() until we have completed all initialization of our
internal disk structure.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days

11 years agoGet the code compiling without INET and INET6 being defined.
Michael Tuexen [Fri, 19 Jul 2013 21:16:59 +0000 (21:16 +0000)]
Get the code compiling without INET and INET6 being defined.
This is not possible in FreeBSD, but in the upstream code.

MFC after: 2 weeks

11 years agoBe more aggressive in using superpages in all mappings of objects:
John Baldwin [Fri, 19 Jul 2013 19:06:15 +0000 (19:06 +0000)]
Be more aggressive in using superpages in all mappings of objects:
- Add a new address space allocation method (VMFS_OPTIMAL_SPACE) for
  vm_map_find() that will try to alter the alignment of a mapping to match
  any existing superpage mappings of the object being mapped.  If no
  suitable address range is found with the necessary alignment,
  vm_map_find() will fall back to using the simple first-fit strategy
  (VMFS_ANY_SPACE).
- Change mmap() without MAP_FIXED, shmat(), and the GEM mapping ioctl to
  use VMFS_OPTIMAL_SPACE instead of VMFS_ANY_SPACE.

Reviewed by: alc (earlier version)
MFC after: 2 weeks

11 years agoSince there's no defined schema for the XML that's generated by the
Scott Long [Fri, 19 Jul 2013 06:42:15 +0000 (06:42 +0000)]
Since there's no defined schema for the XML that's generated by the
kern.geom.confxml sysctl, it's silly to warn about tags in libgeom,
especially since libgeom exists simply to build a tree out of the conf
information.

Obtained from: Netflix
MFC after: 3 days

11 years agoCorrect ELF note decoding for non-core files
Ed Maste [Fri, 19 Jul 2013 01:04:17 +0000 (01:04 +0000)]
Correct ELF note decoding for non-core files

Requested by: kib

11 years agoOverhaul error, information, and debug logging.
Scott Long [Fri, 19 Jul 2013 00:12:41 +0000 (00:12 +0000)]
Overhaul error, information, and debug logging.

Obtained from: Netflix
MFC after: 3 days

11 years agoUse _PATH_DEV (from paths.h) for the "/dev/" string, rather than
Jim Harris [Thu, 18 Jul 2013 23:25:57 +0000 (23:25 +0000)]
Use _PATH_DEV (from paths.h) for the "/dev/" string, rather than
hard-coding it.

Sponsored by: Intel
Suggested by: kib
Reviewed by: kib, carl
MFC after: 3 days

11 years agoSimplify open_dev() by returning errno values rather than just 0 or 1.
Jim Harris [Thu, 18 Jul 2013 23:12:44 +0000 (23:12 +0000)]
Simplify open_dev() by returning errno values rather than just 0 or 1.

Also remove stat() call and just rely on errno from open() call to discern
whether dev node exists or not.

Sponsored by: Intel
Reviewed by: kib, carl
MFC after: 3 days

11 years agoClose uniq(1) in the capability mode sandbox and limit descriptors using
Pawel Jakub Dawidek [Thu, 18 Jul 2013 22:11:27 +0000 (22:11 +0000)]
Close uniq(1) in the capability mode sandbox and limit descriptors using
capability rights.

11 years ago- Make localtime(3) to work in sandbox.
Pawel Jakub Dawidek [Thu, 18 Jul 2013 21:56:10 +0000 (21:56 +0000)]
- Make localtime(3) to work in sandbox.
- Move strerror(3) initialization to its own function.

11 years agoDecode PCIe ASPM capability and status.
Jung-uk Kim [Thu, 18 Jul 2013 20:59:58 +0000 (20:59 +0000)]
Decode PCIe ASPM capability and status.