marius [Thu, 27 Jun 2013 09:21:22 +0000 (09:21 +0000)]
MFC: r248472
Correct the definition for Exar XR17V258IV: we must use a config_function
to specify the offset into the PCI memory spare at which each serial port
will find its registers. This was already done for other Exar PCI serial
devices; it was accidentally omitted for this specific device.
marius [Thu, 27 Jun 2013 09:14:50 +0000 (09:14 +0000)]
MFC: r251589
- The method introduced as part of r234898 (MFCed to stable/9 in r236076)
for not altering the boot path when booting from ZFS turned out to also
cause the boot path not being adjusted if booting from CD-ROM with firmware
versions that do not employ the "cdrom" alias in that case. So shuffle the
code around instead in order to achieve the original intent. Ideally, we
shouldn't fiddle with the boot path when booting from UFS on a disk either;
unfortunately, there doesn't seem to be an universal way of telling disks
and CD-ROMs apart, though. [1]
- Use NULL instead of 0 for pointers.
kib [Thu, 27 Jun 2013 07:27:08 +0000 (07:27 +0000)]
MFC r251684:
Fix two issues with the spin loops in the umtx(2) implementation.
- When looping, check for the pending suspension.
- Add missed checks for the faults from casuword*().
- Replace the beerware license on mdconfig(8) with standard 2-clause BSD.
- Rewrite option parsing in mdconfig(8). This makes it more user-friendly
by removing the ordering requirements and adding more descriptive error
messages; it also makes it more readable and maintainable.
- Add "-f file" support to listing mode (-l). When a -f option is
specified, only md(4) devices which have the specified file as backing
store are displayed.
- Use MD_NAME instead of "md".
- Use _PATH_DEV instead of "/dev/".
- Return -1 when the specified backing store file is not found in the md
device list.
pfg [Wed, 26 Jun 2013 04:34:16 +0000 (04:34 +0000)]
MFC r252103:
Define and use e2fs_lbn_t in ext2fs.
In line to what is done in UFS, define an internal type
e2fs_lbn_t for the logical block numbers.
This change is basically a no-op as the new type is unchanged
(int32_t) but it may be useful as bumping this may be required
for ext4fs.
Also, as pointed out by Bruce Evans:
-Use daddr_t for daddr in ext2_bmaparray(). This seems to
improve reliability with the reallocblks option.
- Add a cast to the fsbtodb() macro as in UFS.
gjb [Wed, 26 Jun 2013 00:38:40 +0000 (00:38 +0000)]
MFC r251652, r251811, r252101:
r251652:
Add new script to run release builds. The script is heavily based upon
the release/generate-release.sh script by nwhitehorn.
This script can use optional configuration file to override defaults,
making running multiple serialzied builds with different specific
configurations or architecture-specific tunings quite easy.
Sample overrideable options are included in the release.conf.sample
file.
r251811:
Fix OSVERSION variable within PBUILD_FLAGS.
r252101:
If MAKE_CONF and/or SRC_CONF are set and not character devices,
copy to chroot to use with release build.
jimharris [Tue, 25 Jun 2013 23:30:48 +0000 (23:30 +0000)]
MFC r240616, r240619, r240620:
Merge initial NVM Express (NVMe) commits to stable/9.
This only pulls the nvme(4), nvd(4) and nvmecontrol(8) code into stable/9.
A follow-up commit will link it into the build and merge all of the
additional commits made for NVMe over the last few months.
ken [Tue, 25 Jun 2013 21:43:49 +0000 (21:43 +0000)]
MFC: 249658, 249701
Update chio(1) and ch(4) to support reporting element designators.
This allows mapping a tape drive in a changer (as reported by
'chio status') to a sa(4) driver instance by comparing the
serial numbers.
The designators can be ASCII (which is printed out directly), binary
(which is printed in hex format) or UTF-8, which is printed in either
native UTF-8 format if the terminal can support it, or in %XX notation
for non-ASCII characters. Thanks to Hiroki Sato <hrs@> for the
explanation and example UTF-8 printing code.
chio.h: Modify the changer_element_status structure to add new
fields and definitions from the SMC3r16 spec.
Rename the original CHIOGSTATUS ioctl to OCHIOGTATUS and
define a new CHIOGSTATUS ioctl.
Clean up some tab/space issues.
chio.c: For the 'status' subcommand, print the designator field
if it is supplied by a device.
scsi_ch.h: Add new flags for DVCID and CURDATA to the READ
ELEMENT STATUS command structure.
Add a read_element_status_device_id structure
for the data fields in the new standard. Add new
unions, dt_or_obsolete and voltage_devid, to hold
and address data from either SCSI-2 or newer devices.
scsi_ch.c: Implement support for fetching device IDs with READ
ELEMENT STATUS data.
Add new arguments to scsi_read_element_status() to
allow the user to request the DVCID and CURDATA bits.
This isn't compiled into libcam (it's only an internal
kernel interface), so we don't need any special
handling for the API change.
If the user issues the new CHIOGSTATUS ioctl, copy all of
the available element status data out. If he issues the
OCHIOGSTATUS ioctl, we don't copy the new fields in the
structure.
Fix a bug in chopen() that would result in the peripheral
never getting unheld if chgetparams() failed.
mav [Tue, 25 Jun 2013 07:32:49 +0000 (07:32 +0000)]
MFC r249980:
Give periph validity flag own periph reference. That slightly simplifies
the release logic and covers hypothetical case if lock is dropped inside
the periph_oninval() method.
mav [Tue, 25 Jun 2013 07:27:23 +0000 (07:27 +0000)]
MFC r251792:
Restore use of polling mode for disk cache flush in case of kernel panic.
While I am not sure that any extra hardware access is a good idea after
panic, that is an existing behaviour that should better work correctly.
mav [Tue, 25 Jun 2013 07:17:10 +0000 (07:17 +0000)]
MFC r251743:
Improve firmware download status check. Previous check was insufficient for
ATA since it ignored transport errors like command timeouts, while for SCSI
it was just wrong.
mckusick [Mon, 24 Jun 2013 23:41:16 +0000 (23:41 +0000)]
MFC of 250891, 250892, 250894, 250895, 250897, and 250901
MFC 250891:
Properly spell sentinel (not sintenel or sentinal).
No functional changes.
Spotted by: kib
MFC 250892:
Remove a bogus check for a NULL buffer pointer.
Add a KASSERT that it is not NULL.
Found by: Coverity Scan, CID 1009114
Reviewed by: kib
MFC 250894:
Null a pointer after it is freed so that when it is returned
the return value is NULL. Based on the returned flags, the
return value should never be inspected in the case where NULL
is returned, but it is good coding practice not to return a
pointer to freed memory.
Found by: Coverity Scan, CID 1006096
Reviewed by: kib
MFC 250895:
Add missing 28th element to softdep types name array.
Found by: Coverity Scan, CID 1007621
Reviewed by: kib
MFC 250897:
Add missing buffer releases (brelse) after bread calls that return
an error. One could argue that returning a buffer even when it is
not valid is incorrect, but bread has always returned a buffer
valid or not.
Reviewed by: kib
MFC 250901:
Properly spell sentinel (missed in 250891)
No functional changes.
jhb [Mon, 24 Jun 2013 18:27:44 +0000 (18:27 +0000)]
MFC 251470:
Do not compare the existing mask of a cpuset with a new mask when changing
the mask of a cpuset. Also, change the cpuset's mask before updating the
masks of all children. Previously changing a cpuset's mask first required
setting the mask to a super-set of both the old and new masks and then
changing it a second time to the new mask.
jhb [Mon, 24 Jun 2013 16:04:59 +0000 (16:04 +0000)]
MFC 250223,250233:
Similar to 233760 and 236717, export some more useful info about the
kernel-based POSIX semaphore descriptors to userland via procstat(1) and
fstat(1):
- Change sem file descriptors to track the pathname they are associated
with and add a ksem_info() method to copy the path out to a
caller-supplied buffer.
- Use the fo_stat() method of shared memory objects and ksem_info() to
export the path, mode, and value of a semaphore via struct kinfo_file.
- Add a struct semstat to the libprocstat(3) interface along with a
procstat_get_sem_info() to export the mode and value of a semaphore.
- Teach fstat about semaphores and to display their path, mode, and value.
glebius [Mon, 24 Jun 2013 09:25:38 +0000 (09:25 +0000)]
Merge r248159:
Fix for quite a special case when userland emulates a netgraph node, and
userland can reply to a message with NGM_HASREPLY bit set. In this case
we should not wait for a response to a responce.
PR: 176771
Submitted by: Keith Reynolds <keith.reynolds tidalscale.com>
glebius [Mon, 24 Jun 2013 08:55:20 +0000 (08:55 +0000)]
Merge r243151:
o Remove meaningless PROTOCOLS section.
o Describe passing file descriptors as separate section.
- Descriptors can be passed through any protocol of the UNIX family,
not SOCK_STREAM and SOCK_SEQPACKET only. [1]
o Describe socket options as separate section.
- Move LOCAL_PEERCRED option to this section.
- Describe struct xucred.
- In LOCAL_CREDS section mention that credentials
are passed only on the first read on non-datagram
sockets.
o Xref all mentioned system calls.
delphij [Mon, 24 Jun 2013 05:00:31 +0000 (05:00 +0000)]
MFC r251478: MFV r251474:
* Illumos zfs issue #3137 L2ARC compression
Whether or not to compress buffers entering the L2ARC is
controlled by "compression" setting on the dataset, when
compression is not "off", L2ARC compression is enabled.
The compress method is always LZ4 for L2ARC when enabled
because it works best for the scenario.
pfg [Sat, 22 Jun 2013 21:31:59 +0000 (21:31 +0000)]
MFC r251809, r251952, r252012:
Re-sort ext2fs headers to make things easier to find.
In the ext2fs driver we have a mixture of headers:
- The ext2_ prefixed headers have strong influence from NetBSD
and are carry specific ext2/3/4 information.
- The unprefixed headers are inspired on UFS and carry implementation
specific information.
Do some small adjustments so that the information is easier to
find coming from either UFS or the NetBSD implementation.
Also
- Set MAXMNTLEN nearer to where it is used.
- Move EXT2_LINK_MAX to ext2_dir.h .
- Rename some prefixes in the Block Group Descriptor fields.
markj [Sat, 22 Jun 2013 05:32:11 +0000 (05:32 +0000)]
MFC r250599:
Add a remark to the effect that a manually started relearn will always
result in the battery being completely drained, even in transparent learning
mode.
markj [Sat, 22 Jun 2013 05:24:29 +0000 (05:24 +0000)]
MFC r246951:
Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held
unnecessarily by a user thread waiting to run on a specific CPU after
calling sched_bind().
markj [Sat, 22 Jun 2013 04:50:25 +0000 (04:50 +0000)]
MFC r251166:
Add macros which allow one to define SDT probes with six or seven arguments;
they are needed when porting some of the Solaris providers (ip, iscsi, and
tcp in particular).
dtrace_probe() only takes five arguments from the probe site, so we need to
add the appropriate cast to allow for more than five arguments. The extra
arguments are later copied out of dtrace_probe()'s stack frame by
dtrace_getarg() (or the provider-specific getarg method) as needed.
pfg [Sat, 22 Jun 2013 02:22:12 +0000 (02:22 +0000)]
MFC r251212, r251480:
GCC: bring back experimental support for amdfam10/barcelona CPUs.
This is a revised subset of the support initially brought in in r236962
and later reverted. The collateral efects seem to have disappeared but
it is still recommended to set the CPUTYPE with caution.
While here also install AMD intrinsics header ammintrin.h
gnn [Fri, 21 Jun 2013 21:38:48 +0000 (21:38 +0000)]
MFC: 249514
Point args[0] not at the thread that is ending but at the one that
is starting. This is in line with practice in OpenSolaris.
Note that this change is only in ULE and not in the 4BSD scheduler.
Once this change settles in (MFC timeout has expired) we'll try it out
on 4BSD as well.
rmacklem [Fri, 21 Jun 2013 20:16:41 +0000 (20:16 +0000)]
MFC: r251444, r251476
Add a "-v" (verbose) option to the gssd daemon, to help
with diagnosis of kerberized NFS mount problems. When set,
messages are sent to syslog() (or fprintf(stderr,...) if
"-d" is also specified) to indicate activity/results of
kgssapi upcalls.
jhb [Fri, 21 Jun 2013 19:28:58 +0000 (19:28 +0000)]
MFC 251637:
Borrow the algorithm from kvm_getprocs() to fix procstat_getprocs() to
handle the case where the process tables grows in between the calls to
fetch the size and fetch the table.
jhb [Thu, 20 Jun 2013 19:56:26 +0000 (19:56 +0000)]
MFC 251617:
Store a reference to the vnode associated with a file descriptor in the
linux_file structure and use it instead of directly accessing td_fpop
when destroying the linux_file structure. The td_fpop pointer is not
valid when a cdevpriv destructor is run, and the type-specific close
method has already been called, so f_vnode may not be valid (and the
vnode might have been recycled without our own reference).
gahr [Thu, 20 Jun 2013 16:51:25 +0000 (16:51 +0000)]
MFC: r249406
- Do not bail out if stat(2) fails with ENOENT in the spool directory. This
happens if another atrm process removes a job while we're scanning through
the directory.
- While at it, optimize a bit the directory scanning, so that we quit
looping as soon as all jobs specified in argv have been dealt with.
hrs [Thu, 20 Jun 2013 07:23:04 +0000 (07:23 +0000)]
MFC r250251:
Use FF02:0:0:0:0:2:FF00::/104 prefix for IPv6 Node Information Group
Address. Although KAME implementation used FF02:0:0:0:0:2::/96 based on
older versions of draft-ietf-ipngwg-icmp-name-lookup, it has been changed
in RFC 4620.
The kernel always joins the /104-prefixed address, and additionally does
/96-prefixed one only when net.inet6.icmp6.nodeinfo_oldmcprefix=1.
The default value of the sysctl is 1.
ping6(8) -N flag now uses /104-prefixed one. When this flag is specified
twice, it uses /96-prefixed one instead.
Reviewed by: ume
Based on work by: Thomas Scheffler
PR: conf/174957
jh [Wed, 19 Jun 2013 18:00:00 +0000 (18:00 +0000)]
MFC r251485:
Revert r238399.
The "failok" option doesn't have any effect at all unless specified in
fstab(5) and combined with the -a flag. The "failok" option is already
documented in fstab(5).
marius [Wed, 19 Jun 2013 15:12:10 +0000 (15:12 +0000)]
MFC: r238172 (partial)
Don't use Maxmem when the amount of memory is meant. Use realmem instead.
Maxmem is not only a MD variable, it represents the highest physical memory
address in use. On systems where memory is sparsely layed-out the highest
memory address and the amount of memory are not interchangeable. Scaling the
AGP aperture based on the actual amount of memory (= realmem) rather than
the available memory (= physmem) makes sure there's consistent behaviour
across architectures.
scottl [Wed, 19 Jun 2013 04:57:47 +0000 (04:57 +0000)]
Tweak the CAM_DATA flags that were added with r251874 to allow source
compatibility and almost 100% binary compatibility. The old
CAM_SG_LIST_PHYS flag is essentially lost in binary compatibility for
legacy SIM drivers. The use of this flag is excedingly rare.
gibbs [Tue, 18 Jun 2013 23:14:21 +0000 (23:14 +0000)]
MFC Xen fixes:
svn rev 250081 Author:gibbs Date:2013-04-29T23:08:13.552620Z
==============
xenstore/xenstore.c:
Prevent access to invalid memory region when listing an empty
directory in the XenStore.
Reported by: Bei Guan
svn rev 250913 Author:gibbs Date:2013-05-22T17:13:03.545339Z
==============
Correct panic on detach of Xen PV network interfaces.
dev/xen/netfront:
In netif_free(), properly stop the interface and drain any pending
timers prior to disconnecting from the backend device.
Remove all media and detach our interface object from the system
prior to deleting it.
svn rev 250917 Author:gibbs Date:2013-05-22T19:22:44.923351Z
==============
Fix loss of the emulated keyboard on Xen PV HVM domains.
xen/xenbus/xenbusb.c:
In xenbusb_probe_children(), do not modify the XenBus state of
devices for which we have no PV driver support. An emulated device
we do support may share this backend. Hide the node from XenBus
instead.
This prevents closing the vkbd device, which Qemu's emulated keyboard
device is using as the source for keyboard events.
Tested with qemu-xen-traditional, qemu-xen and qemu stubdomains, all
working as expected.
svn rev 251175 Author:gibbs Date:2013-05-31T04:43:19.944993Z
==============
Apply the ad* => ada* IDE device name transition to the Xen block
front driver.
svn rev 251729 Author:gibbs Date:2013-06-14T03:31:11.033200Z
==============
sys/dev/xen/netfront/netfront.c:
In netif_free(), call ifmedia_removeall() after ether_ifdetach()
so that bpf listeners are detached, any link state processing
is completed, and there is no chance for external reference to media
information.
marius [Tue, 18 Jun 2013 21:14:05 +0000 (21:14 +0000)]
MFC: r238184
Hide the creation of phys_avail behind an API to make it easier to do it
correctly. We now iterate the EFI memory descriptors once and collect all
the information in a single pass.
marius [Tue, 18 Jun 2013 15:17:29 +0000 (15:17 +0000)]
MFC: r245263
Clang complains about the comparision of fak < 0 always being
false. It is right. Delete it because on the next line we catch all
'negative' cases with the test > 2, since 'negative' numbers are just
really big unsigned numbers and we do an identical action.
marius [Tue, 18 Jun 2013 15:06:02 +0000 (15:06 +0000)]
MFC: r247264
Turn off fast posting for the ISP2100- I'd forgotten that it actually
might have been enabled for them- now that we use all 32 bits of handle.
Fast Posting doesn't pass the full 32 bits.
marius [Tue, 18 Jun 2013 14:35:09 +0000 (14:35 +0000)]
MFC: r247165
Fix command timeout caused by data underrun during fetching ATAPI sense
data, introduced by r246713 (MFC'ed to stable/9 in r251874). There are two
places where ata_request is filled in ATA_CAM: ata_cam_begin_transaction()
and ata_cam_request_sense(). In the first case DMA should be done for
addresses from the CCB. In second case, DMA should be done to the different
address, the address of the sense buffer inside the CCB structure itself.
marius [Tue, 18 Jun 2013 14:20:14 +0000 (14:20 +0000)]
MFC: r248804
deferal -> deferral
MFC: r248891
Pass correct parameter to CTR5() in bus_dmamap_load_uio.
MFC: r248892
Do not add 1 to nsegs before passing to CTR5(), since nsegs
has already been incremented before these calls.
MFC: r248893
Add CTR5() to bus_dmamap_load_ccb, similar to other bus_dmamap_load_*
functions.
MFC: r248896
Add bus_dmamap_load_bio for non-CAM disk drivers that wish to enable
unmapped I/O.
MFC: r249025
Add support for XPT_CONT_TARGET_IO CCBs in _bus_dmamap_load_ccb().
Declare CCB types in their respective switch blocks.
MFC: r249538
Some compilers issue a warning when wider integer is casted to narrow
pointer. Supposedly shut down the warning by casting through
uintptr_t.
MFC: r251221
Move an assertion to the right spot; only bus_dmamap_load_mbuf(9)
requires a pkthdr being present but that's not the case for either
_bus_dmamap_load_mbuf_sg() or bus_dmamap_load_mbuf_sg(9).