]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
11 years agoMFC r240060, r240062:
pfg [Sun, 16 Sep 2012 00:34:04 +0000 (00:34 +0000)]
MFC r240060, r240062:

Rename __rpc_xdr with XDR. This fixes at least one C++ application and
matches what upstream (Solaris) has done on their xdr.h header.

PR: 137443

git-svn-id: svn://svn.freebsd.org/base/stable/8@240543 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239829:
pluknet [Fri, 14 Sep 2012 15:09:59 +0000 (15:09 +0000)]
MFC r239829:
  Follow r239818 and remove no more relevant vslock() ENOMEM error.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240504 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240026:
zont [Fri, 14 Sep 2012 14:24:21 +0000 (14:24 +0000)]
MFC r240026:
- Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz
  and kern.sgrowsiz sysctls writable.

MFC r240068:
- Mark some sysctls with CTLFLAG_TUN flag instead of CTLFLAG_RDTUN.

MFC r240069:
- After r240026 sgrowsiz should be used in a safer maner.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239818:
zont [Fri, 14 Sep 2012 13:57:34 +0000 (13:57 +0000)]
MFC r239818:
- Don't take an account of locked memory for current process in vslock(9).

There are two consumers of vslock(9): sysctl code and drm driver.  These
consumers are using locked memory as transient memory, it doesn't belong
to a process's memory.

MFC r239895:
- Remove accounting of locked memory from vsunlock(9) that I missed in r239818.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240500 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240328:
eadler [Fri, 14 Sep 2012 00:37:12 +0000 (00:37 +0000)]
MFC r240328:
Follow up to doc r39516:

Update the Vendor Relations Team information to reflect that
incoming email is now handled by core@ and the Foundation.

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC of 240457, tzdata2012f
edwin [Thu, 13 Sep 2012 10:25:30 +0000 (10:25 +0000)]
MFC of 240457, tzdata2012f

 - Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
 - Fix offset for Pacific/Tokelau.
 - Gaza and West Bank had DST from 29 March to 28 September 2012.
 - Syria has DST from April till October
 - Morocco had DST from April to September 2012 except for 20 July to 20 August.
 - Cuba changed to DST from 1 April 2012 only.
 - Haiti has DST between 8 March and 1 November in 2012.

  Obtained from:  ftp://ftp.iana.org/tz/releases/

git-svn-id: svn://svn.freebsd.org/base/stable/8@240460 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240293:
eadler [Thu, 13 Sep 2012 01:05:29 +0000 (01:05 +0000)]
MFC r240293:
Sync access file date recommendation
Change from CVS to svn for canconical source of information

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r237676,r237677,r237680,r240294,r240318,r240324:
eadler [Thu, 13 Sep 2012 01:02:56 +0000 (01:02 +0000)]
MFC r237676,r237677,r237680,r240294,r240318,r240324:
Update organization.dot to reflect reality

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240436 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240163: Fix "Corrupted DWARF expression" from (k)gdb.
emaste [Thu, 13 Sep 2012 01:02:42 +0000 (01:02 +0000)]
MFC r240163: Fix "Corrupted DWARF expression" from (k)gdb.

  Google turned up Debian bug 405116, which describes the problem in
  sufficient detail to identify the overflowing variables.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240435 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240316:
eadler [Thu, 13 Sep 2012 00:54:23 +0000 (00:54 +0000)]
MFC r240316:
We moved to subversion ages ago.

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239254:
mav [Thu, 13 Sep 2012 00:39:44 +0000 (00:39 +0000)]
MFC r239254:
Fix multichannel input signals tracing on some CODECs like ALC260.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239872:
dim [Wed, 12 Sep 2012 18:16:40 +0000 (18:16 +0000)]
MFC r239872:

Teach libdwarf about the DW_FORM_flag_present dwarf attribute, so
programs using libdwarf (such as ctfconvert) don't error out on files
containing the attribute.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239870:
dim [Wed, 12 Sep 2012 17:57:52 +0000 (17:57 +0000)]
MFC r239870:

Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't
error out on files that contain it.  (This attribute can be emitted by
newer versions of clang.)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235777: Make dumptid non-static. It is used by libkvm.
avg [Tue, 11 Sep 2012 05:59:19 +0000 (05:59 +0000)]
MFC r235777: Make dumptid non-static. It is used by libkvm.

PR: kern/167671
MFC slacker: harti

git-svn-id: svn://svn.freebsd.org/base/stable/8@240338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r239663, r239664
bapt [Sun, 9 Sep 2012 22:12:15 +0000 (22:12 +0000)]
MFC: r239663, r239664

change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8)
if not on a tty prompt about the missing pkg(8) but default on 'no' except if
ASSUME_ALWAYS_YES is set

git-svn-id: svn://svn.freebsd.org/base/stable/8@240291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236507, r237931, r238120, r238538:
trociny [Sun, 9 Sep 2012 08:40:44 +0000 (08:40 +0000)]
MFC r236507, r237931, r238120, r238538:

r236507 (pjd):

Simplify the code by using snprlcat().

r237931 (pjd):

Check if there is cmsg at all.

r238120 (pjd):

Make use of GEOM Gate direct reads feature. This allows HAST to serve
reads with native speed of the underlying provider.
There are three situations when direct reads are not used:
1. Data is being synchronized and synchronization source is the secondary
   node, which means secondary node has more recent data and we should read
   from it.
2. Local read failed and we have to try to read from the secondary node.
3. Local component is unavailable and all I/O requests are served from the
   secondary node.

Sponsored by: Panzura, http://www.panzura.com

r238538:

Metaflush on/off values don't need quotes.

Reviewed by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@240270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239987 (pjd):
trociny [Sun, 9 Sep 2012 08:30:22 +0000 (08:30 +0000)]
MFC r239987 (pjd):

Allow to pass providers with /dev/ prefix to g_provider_by_name().

git-svn-id: svn://svn.freebsd.org/base/stable/8@240268 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238119, r238868, r239131:
trociny [Sun, 9 Sep 2012 08:21:06 +0000 (08:21 +0000)]
MFC r238119, r238868, r239131:

r238119 (pjd):

Extend GEOM Gate class to handle read I/O requests directly within the kernel.
This will allow HAST to read directly from the local component without
even communicating userland daemon.

Sponsored by:   Panzura, http://www.panzura.com

r238868:

Reorder things in g_gate_create() so at the moment when g_new_geomf()
is called name is properly initialized.

Discussed with: pjd

r239131:

In g_gate_dumpconf() always check the result of g_gate_hold().

This fixes "Negative sc_ref" panic possible when sysctl_kern_geom_confxml()
is run simultaneously with destroying GATE device.

Reviewed by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@240266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240162:
mm [Sun, 9 Sep 2012 07:46:45 +0000 (07:46 +0000)]
MFC r240162:
Make r230454 more readable and vendor-like.

PR: kern/171380

git-svn-id: svn://svn.freebsd.org/base/stable/8@240259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239769:
zont [Sat, 8 Sep 2012 18:07:35 +0000 (18:07 +0000)]
MFC r239769:
- Don't allow watchdogd(8) to be swapped out.
  On machines with huge amount of swap and high IO activity,
  watchdogd(8) may wait for a swap memory longer than timeout and
  sometimes fires.

MFC r239896:
- It's also need to lock current memory.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240153:
gjb [Sat, 8 Sep 2012 04:42:33 +0000 (04:42 +0000)]
MFC r240153:
-  Typo fix and minor word swap.

PR: 171356

git-svn-id: svn://svn.freebsd.org/base/stable/8@240232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238202:
eadler [Sat, 8 Sep 2012 03:10:58 +0000 (03:10 +0000)]
MFC r238202:
Remove ancient vnconfig symlink

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge rev. 239673 from head to stable/8:
thomas [Fri, 7 Sep 2012 22:34:30 +0000 (22:34 +0000)]
Merge rev. 239673 from head to stable/8:
(g_multipath_rotate): Fix algorithm so that it does rotate over all good
providers, not just the last two.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240218 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r237244
rmacklem [Fri, 7 Sep 2012 20:57:36 +0000 (20:57 +0000)]
MFC: r237244
Fix the NFSv4 client for the case where mmap'd files are
written, but not msync'd by a process. A VOP_PUTPAGES()
called when VOP_RECLAIM() happens will usually fail, since
the NFSv4 Open has already been closed by VOP_INACTIVE().
Add a vm_object_page_clean() call to the NFSv4 client's
VOP_INACTIVE(), so that the write happens before the NFSv4
Open is closed. kib@ suggested using vgone() instead and
I will explore this, but this patch fixes things in the
meantime. For some reason, the VOP_PUTPAGES() is still
attempted in VOP_RECLAIM(), but having this fail doesn't
cause any problems except a "stateid0 in write" being logged.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240213 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239962:
dim [Fri, 7 Sep 2012 18:03:29 +0000 (18:03 +0000)]
MFC r239962:

Fix a twelve year old bug in readelf: when process_dynamic_segment()
encounters a DT_RUNPATH entry, the global dynamic_info[] array is
overrun, causing some other global variable to be overwritten.

In my testcase, this was the section_headers variable, leading to
segfaults or jemalloc assertions when it was freed later on.

Thanks to Koop Mast for providing samples of a few "bad" .so files.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239908:
mav [Fri, 7 Sep 2012 14:10:22 +0000 (14:10 +0000)]
MFC r239908:
Add bunch of ATI HDMI HDA controller IDs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239907:
mav [Fri, 7 Sep 2012 14:05:08 +0000 (14:05 +0000)]
MFC r239907:
Add IDs for JMicron JMB360/JMB362 AHCI SATA controllers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240200 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r237200
rmacklem [Fri, 7 Sep 2012 13:17:18 +0000 (13:17 +0000)]
MFC: r237200
Move the nfsrpc_close() call in ncl_reclaim() for the NFSv4 client
to below the vnode_destroy_vobject() call, since that is where
writes are flushed.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240197 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoDirect commit to stable/8 to fix the mis-merge in r239983: in 8.x
trociny [Thu, 6 Sep 2012 10:10:56 +0000 (10:10 +0000)]
Direct commit to stable/8 to fix the mis-merge in r239983: in 8.x
read-locking of the inpcbinfo is not used in the TCP timer code.

Reported by: bz
Submitted by: rwatson

git-svn-id: svn://svn.freebsd.org/base/stable/8@240161 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC rev. 239012 to stable/8:
thomas [Thu, 6 Sep 2012 07:48:17 +0000 (07:48 +0000)]
MFC rev. 239012 to stable/8:
New command "gmultipath prefer" to force selection of a specified
provider in an Active/Passive configuration.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240160 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: less v451.
delphij [Wed, 5 Sep 2012 06:15:15 +0000 (06:15 +0000)]
MFC: less v451.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240127 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 239883:
emaste [Wed, 5 Sep 2012 02:26:13 +0000 (02:26 +0000)]
MFC 239883:

  Avoid passing uninitialized stack to addelem() if called with an empty
  arg.

PR: bin/171174

git-svn-id: svn://svn.freebsd.org/base/stable/8@240124 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239571:
jimharris [Tue, 4 Sep 2012 17:27:21 +0000 (17:27 +0000)]
MFC r239571:

Add -m option (for printing sampled PCs to a file) to pmcstat usage
message.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239889:
jimharris [Tue, 4 Sep 2012 17:13:52 +0000 (17:13 +0000)]
MFC r239889:

Do not call sati_check_data_io() for SATI_UNMAP sequences.

This routine is intended only for commands such as INQUIRY where
the controller may fill out a smaller amount of data than allocated
by the host.

The end result of this bug was that isci(4) would report non-zero
resid for successful SCSI_UNMAP commands.

Sponsored by:   Intel

git-svn-id: svn://svn.freebsd.org/base/stable/8@240091 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoRevert MFC of r238206 as this feature isn't available in stable/8
eadler [Sun, 2 Sep 2012 21:44:24 +0000 (21:44 +0000)]
Revert MFC of r238206 as this feature isn't available in stable/8

Approved by: cperciva (implicit)
Pointyhat to: me

git-svn-id: svn://svn.freebsd.org/base/stable/8@240061 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236596:
eadler [Sun, 2 Sep 2012 18:54:47 +0000 (18:54 +0000)]
MFC r236596:
Fix style nit: don't use leading zero for dates in .Dd

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240058 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r237178,r237180:
eadler [Sun, 2 Sep 2012 18:44:43 +0000 (18:44 +0000)]
MFC r237178,r237180:
Fix mdoc style nits

PR: kern/168910
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240055 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235251,r238205:
eadler [Sun, 2 Sep 2012 18:40:14 +0000 (18:40 +0000)]
MFC r235251,r238205:

Add Spanish Dvorak keyboard model to syscons.

(not verified to be accurate)

PR: conf/160235
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240052 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238199:
eadler [Sun, 2 Sep 2012 18:33:47 +0000 (18:33 +0000)]
MFC r238199:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238206:
eadler [Sun, 2 Sep 2012 18:19:37 +0000 (18:19 +0000)]
MFC r238206:
Add missing sleep stat increase

PR: kern/168211
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240044 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238201:
eadler [Sun, 2 Sep 2012 18:17:16 +0000 (18:17 +0000)]
MFC r238201:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240042 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238203:
eadler [Sun, 2 Sep 2012 18:13:18 +0000 (18:13 +0000)]
MFC r238203:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238221:
eadler [Sun, 2 Sep 2012 18:10:30 +0000 (18:10 +0000)]
MFC r238221:
Fix always 0 tautologly revealed by gcc46

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240036 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238399:
eadler [Sun, 2 Sep 2012 18:08:46 +0000 (18:08 +0000)]
MFC r238399:
Document the behavior of mount with failok specified.

PR: docs/163742
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239076:
eadler [Sun, 2 Sep 2012 18:04:27 +0000 (18:04 +0000)]
MFC r239076:
Add support for SIIG Cyber Serial Dual PCI 16C850

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240031 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239047:
eadler [Sun, 2 Sep 2012 18:00:57 +0000 (18:00 +0000)]
MFC r239047:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@240028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239383:
trociny [Sat, 1 Sep 2012 10:39:01 +0000 (10:39 +0000)]
MFC r239383:

In ip6_ctloutput() guard inp_flags modifications with INP_WLOCK.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239985 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239075:
trociny [Sat, 1 Sep 2012 10:33:53 +0000 (10:33 +0000)]
MFC r239075:

In tcp timers, check INP_DROPPED flag a little later, after
callout_deactivate(), so if INP_DROPPED is set we return with the
timer active flag cleared.

For me this fixes negative keep timer values reported by `netstat -x'
for connections in CLOSE state.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238309:
trociny [Sat, 1 Sep 2012 10:28:20 +0000 (10:28 +0000)]
MFC r238309:

In epair_clone_destroy(), when destroying the second half, we have to
switch to its vnet before calling ether_ifdetach(). Otherwise if the
second half resides in a different vnet, if_detach() silently fails
leaving a stale pointer in V_ifnet list, and the system crashes trying
to access this pointer later.

Another solution could be not to allow to destroy epair unless both
ends are in the home vnet.

Discussed with: bz
Tested by: delphij

git-svn-id: svn://svn.freebsd.org/base/stable/8@239981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238085:
trociny [Sat, 1 Sep 2012 10:21:56 +0000 (10:21 +0000)]
MFC r238085:

Fix KASSERT message.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238084:
trociny [Sat, 1 Sep 2012 10:00:37 +0000 (10:00 +0000)]
MFC r238084:

Don't check for ifp != NULL before KASSERT, as ifp may not be NULL here
(it is dereferenced below).

Discussed with: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/8@239977 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoRevert 239931 and 239932 until I figure out why it breaks on stable branches
delphij [Fri, 31 Aug 2012 06:42:51 +0000 (06:42 +0000)]
Revert 239931 and 239932 until I figure out why it breaks on stable branches
but not on -HEAD.

Noticed by: tinderbox
Pointy hat to: delphij

git-svn-id: svn://svn.freebsd.org/base/stable/8@239937 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238964:
delphij [Fri, 31 Aug 2012 00:34:48 +0000 (00:34 +0000)]
MFC r238964:

Teach md5(1) about sha512.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239932 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 239128:
jhb [Thu, 30 Aug 2012 20:43:01 +0000 (20:43 +0000)]
MFC 239128:
Don't try to stop the IPMI watchdog timer if it is not running.
Starting or stopping the IPMI watchdog is rather expensive with the
current implementation as all IPMI requests are bounced via thread.
This is not viable during shutdown or dumps, and this avoids headache
in the common case that the watchdog is not enabled.  The IPMI watchdog
should probably be reworked to not use a separate thread to fix this
in the case when the watchdog timer is enabled.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239921 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 239103:
jhb [Thu, 30 Aug 2012 19:47:15 +0000 (19:47 +0000)]
MFC 239103:
Explicitly enable busmastering on PCI-PCI bridges.  Transactions initiated
on the secondary side of a bridge will not be propagated to the primary
bus unless this is enabled.  Busmastering is not enabled by default (we
have relied on firmware to set this bit to date).  The OS needs to set it
for any bridges not configured by system firmware.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 238424:
jhb [Thu, 30 Aug 2012 18:30:08 +0000 (18:30 +0000)]
MFC 238424:
Make the interval timings for EVFILT_TIMER more accurate.  tvtohz() always
adds an extra tick to account for the current partial clock tick.  However,
that is not appropriate for a repeating timer when the exact tvtohz() value
should be used for subsequent intervals.  Fix repeating callouts for
EVFILT_TIMER by subtracting 1 tick from the tvtohz() result similar to the
fix used in realitexpire() for interval timers.

While here, update a few comments to note that if the EVFILT_TIMER code
were to move out of kern_event.c, it should move to kern_time.c (where the
interval timer code it mimics lives) rather than kern_timeout.c.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239916 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238972:
kib [Thu, 30 Aug 2012 11:00:00 +0000 (11:00 +0000)]
MFC r238972:
Add lfence().

git-svn-id: svn://svn.freebsd.org/base/stable/8@239903 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 238310:
jhb [Wed, 29 Aug 2012 20:50:01 +0000 (20:50 +0000)]
MFC 238310:
Partially revert r217515 so that the mem_range_softc variable is always
present on x86 kernels.  This fixes the build of kernels that include
'device acpi' but do not include 'device mem'.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239881 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 238024:
jhb [Wed, 29 Aug 2012 19:17:35 +0000 (19:17 +0000)]
MFC 238024:
Add a one second sleep before touching the spool directory.  If the touch
occurs in the same second as the earlier operations to create the temporary
file and the cron(8) daemon is rescans the spool directory during that
second, then the daemon may miss a cron edit and not properly update its
internal database.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239877 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 238000,239584:
jhb [Wed, 29 Aug 2012 19:12:53 +0000 (19:12 +0000)]
MFC 238000,239584:
Honor db_pager_quit in 'show malloc', 'show uma', and 'show witness'.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239875 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 238077:
jhb [Wed, 29 Aug 2012 17:36:31 +0000 (17:36 +0000)]
MFC 238077:
Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver.
The new driver changed the size of the mfi_dcmd_frame structure in such a
way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an
MFI_IOC_PASSTHRU32 ioctl in the new driver.  As a result, the user pointer
is treated as the buffer length.  mfi_user_command() doesn't have a bounds
check on the buffer length, so it passes a really big value to malloc()
which panics when it tries to exhaust the kmem_map.  Fix this two ways:
- Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set,
  otherwise treat it as an unknown ioctl.
- Add a bounds check on the buffer length passed by the user.  For now
  it fails any user attempts to use a buffer larger than 1MB.

While here, fix a few other nits:
- Remove an unnecessary check for a NULL return from malloc(M_WAITOK).
- Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239867 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238835:
kib [Wed, 29 Aug 2012 16:44:50 +0000 (16:44 +0000)]
MFC r238835:
Document F_DUP2FD_CLOEXEC.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238615:
kib [Wed, 29 Aug 2012 16:43:57 +0000 (16:43 +0000)]
MFC r238615:
Document F_DUPFD_CLOEXEC.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239862 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238834:
kib [Wed, 29 Aug 2012 16:42:26 +0000 (16:42 +0000)]
MFC r238834:
Add F_DUP2FD_CLOEXEC.

PR: standards/169962

git-svn-id: svn://svn.freebsd.org/base/stable/8@239861 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238614:
kib [Wed, 29 Aug 2012 16:37:48 +0000 (16:37 +0000)]
MFC r238614:
Implement F_DUPFD_CLOEXEC command for fcntl(2), specified by SUSv4.

MFC r238627:
Remove line which was accidentally kept in r238614.

PR: standards/169962

git-svn-id: svn://svn.freebsd.org/base/stable/8@239860 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r225538 from head:
gavin [Wed, 29 Aug 2012 12:52:04 +0000 (12:52 +0000)]
Merge r225538 from head:

  Include descriptions for keymaps missing from INDEX.keymaps.  This fixes
  the five keymaps referred to only by filename on the keymap selection
  screen of bsdinstall.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239828 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r239037,239050 from head:
gavin [Wed, 29 Aug 2012 12:47:00 +0000 (12:47 +0000)]
Merge r239037,239050 from head:
  Support multiple interface devices.  The driver had previously hardcoded
  support for only the first port, but the CP2105 can have multiple ports.
  Although without this change the the first port mostly worked on multi
  port devices, there could still be issues with this arrangement.

  Update the man page to reflect support for both ports and the CP2105.

  Many thanks to Silicon Labs (www.silabs.com) for providing a CP2105-EK
  dev board for testing.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239827 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238878:
bz [Wed, 29 Aug 2012 12:44:14 +0000 (12:44 +0000)]
MFC r238878:

  For consistency put the IPsec comment iside the #fidef section.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239824 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 237338:
jhb [Wed, 29 Aug 2012 12:35:50 +0000 (12:35 +0000)]
MFC 237338:
Don't return an error if a kld does not contain any modules (e.g. a
kld that only contained a sysctl).  The kernel linker allows such
modules, so the boot loader should not reject them.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239822 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r238803, r238804 from head:
gavin [Wed, 29 Aug 2012 12:18:42 +0000 (12:18 +0000)]
Merge r238803, r238804 from head:

  Add support for more devices to uslcom(4).  This commit syncronises the
  list of supported devices with the union of:

  NetBSD  src/sys/dev/usb/uslsa.c 1.18
  OpenBSD src/sys/dev/usb/uslcom.c 1.24
  Linux   source/drivers/usb/serial/cp210x.c HEAD

  Remove duplicate JABLOTRON PC60B entry.

  Note that some of the devices added here are multi-port devices.  The
  uslcom(4) driver currently only supports the first port on such devices.

  Update the man page to reflect the full list of supported devices.
  Remove two caveats from the CAVEATS section, as both listed caveats no
  longer apply.  Add a caveat about multi-port devices.

  Improve descriptions for several devices supported by uslcom(4).
  Correct the spelling of the company Telegesis.
  Move MpMan to the correct location alphabetically.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239820 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238229: acpi_cpu: we are able to handle _CST change notifications
avg [Wed, 29 Aug 2012 09:02:02 +0000 (09:02 +0000)]
MFC r238229:  acpi_cpu: we are able to handle _CST change notifications

git-svn-id: svn://svn.freebsd.org/base/stable/8@239816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238194: acpi_cpu_generic_cx_probe: for consistency set cpu_non_c3
avg [Wed, 29 Aug 2012 08:59:02 +0000 (08:59 +0000)]
MFC r238194: acpi_cpu_generic_cx_probe: for consistency set cpu_non_c3
here too

git-svn-id: svn://svn.freebsd.org/base/stable/8@239814 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238192: acpi_cpu_cx_cst: consistently use cpu_cx_count during state
avg [Wed, 29 Aug 2012 08:46:04 +0000 (08:46 +0000)]
MFC r238192: acpi_cpu_cx_cst: consistently use cpu_cx_count during state
enumeration

git-svn-id: svn://svn.freebsd.org/base/stable/8@239811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r215188: Create C1 state when _CST is valid but _CST does not have one.
avg [Wed, 29 Aug 2012 08:44:21 +0000 (08:44 +0000)]
MFC r215188: Create C1 state when _CST is valid but _CST does not have one.

On behalf of: jkim

git-svn-id: svn://svn.freebsd.org/base/stable/8@239810 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238418: acpi_cpu: separate a notion of current deepest
avg [Wed, 29 Aug 2012 08:34:16 +0000 (08:34 +0000)]
MFC r238418: acpi_cpu: separate a notion of current deepest
allowed+available Cx level from a user-set persistent limit on the said level

git-svn-id: svn://svn.freebsd.org/base/stable/8@239808 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 230782,237274:
jhb [Tue, 28 Aug 2012 18:45:20 +0000 (18:45 +0000)]
MFC 230782,237274:
Refine the implementation of POSIX_FADV_NOREUSE to perform
POSIX_FADV_DONTNEED requests on the currently accessed portion of the
file on each read(2) or write(2) rather than using direct I/O.  This
gives much better performance including read-ahead and write clustering
similar to normal read(2) and write(2) calls.

If subsequent read(2) and write(2) calls are sequential, then the
POSIX_FADV_DONTNEED requests will cover the entire sequentially-accessed
range.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238877:
bz [Tue, 28 Aug 2012 12:56:28 +0000 (12:56 +0000)]
MFC r238877:

  Fix a comment that we do not have an SA yet but need to acquire one.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239588:
kib [Tue, 28 Aug 2012 10:15:30 +0000 (10:15 +0000)]
MFC r239588:
Provide some compat32 shims for sysctl vfs.conflist. It is required
for getvfsbyname(3) operation when called from 32bit process, and
getvfsbyname(3) is used by recent bsdtar import.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239770 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 237646,237656,238020:
jhb [Mon, 27 Aug 2012 19:55:31 +0000 (19:55 +0000)]
MFC 237646,237656,238020:
- Add a new line to top that provides a brief summary of the ZFS ARC memory
  usage on hosts using ZFS.  The new line displays the total amount of RAM
  used by the ARC along with the size of MFU, MRU, anonymous (in flight),
  headers, and other (miscellaneous) sub-categories.  The line is not
  displayed on systems that are not using ZFS.
- Clarify that the cached file data pages included in the "Wired" count
  in top are the BIO-level cached data (i.e. "Buf"), since the previous
  phrase was a bit ambiguous with the "Cache" count.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239751 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239545, r239665:
jimharris [Mon, 27 Aug 2012 15:52:09 +0000 (15:52 +0000)]
MFC r239545, r239665:

Fix/add support for SCSI UNMAP to ATA DSM translation.

(Note: scsi_da does not support BIO_DELETE->SCSI_UNMAP on this
stable branch, but I am MFC'ing the changes to keep a
consistent driver across all stable releases.)

This addresses kernel panic observed when sending SCSI UNMAP
commands to SATA disks attached to isci(4).

1) Flesh out callback routines to allocate/free buffers needed for
translating SCSI UNMAP data to ATA DSM data.
2) Add controller-level pool for storing buffers previously allocated
for UNMAP translation, to lessen chance of no buffer available
under memory pressure.
3) Ensure driver properly handles case where buffer pool is empty
and contigmalloc returns NULL.
4) Clear freeze bit in isci_remote_device_release_lun_queue() before
calling xpt_release_devq to ensure that any ccbs which immediately
start during the call to xpt_release_devq() see an accurate picture
of the frozen_lun_mask.  This code path is extensively exercised
when tagged read/write commands mix with non-tagged DSM commands.

Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/8@239735 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r238778 from head:
gavin [Mon, 27 Aug 2012 13:50:01 +0000 (13:50 +0000)]
Merge r238778 from head:

  The baud rate on CP1201/2/3 devices can be set in one of two ways:
   - The USLCOM_SET_BAUD_DIV command (0x01)
   - The USLCOM_SET_BAUD_RATE command (0x13)

  Devices based on the CP1204 will only accept the latter command, and ignore
  the former.  As the latter command works on all chips that this driver
  supports, switch to always using it.

  A slight confusion here is that the previously used command was incorrectly
  named USLCOM_BAUD_RATE - even though we no longer use it, rename it to
  USLCOM_SET_BAUD_DIV to closer match the name used in the datasheet.

  This change reflects a similar change made in the Linux driver, which was
  submitted by preston.fick at silabs.com, and has been tested on all of the
  uslcom(4) devices I have to hand.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r238396 from head:
gavin [Mon, 27 Aug 2012 13:05:15 +0000 (13:05 +0000)]
Merge r238396 from head:

  Update to reflect new core team.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239729 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r238766, r238774 from head:
gavin [Mon, 27 Aug 2012 12:45:41 +0000 (12:45 +0000)]
Merge r238766, r238774 from head:
  Update the list of devices supported by uplcom.  Although this only adds
  one device (support for Motorola cables), this syncronises us with:

  OpenBSD src/sys/dev/usb/uplcom.c 1.56
  NetBSD  src/sys/dev/usb/uplcom.c 1.73
  Linux   kernel.org HEAD

git-svn-id: svn://svn.freebsd.org/base/stable/8@239726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239649:
bschmidt [Fri, 24 Aug 2012 14:22:47 +0000 (14:22 +0000)]
MFC r239649:
Document update of 802.11s IE identifiers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r231187:
bschmidt [Thu, 23 Aug 2012 17:09:58 +0000 (17:09 +0000)]
MFC r231187:
Update the 802.11s IE numbers to represent the latest 802.11 amendment
standard.

This update breaks compatibility with older mesh setups but is necessary as
the previous IDs are used by another amendment leading to unexpected results
when trying to associate with an accesspoint using the affected IDs.

Discussed with: re
Tested by: honestqiao at gmail dot com

git-svn-id: svn://svn.freebsd.org/base/stable/8@239616 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239464:
delphij [Thu, 23 Aug 2012 00:39:08 +0000 (00:39 +0000)]
MFC r239464:

As of r232844 we no longer need the maxpoll 9 workaround.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239247:
kib [Wed, 22 Aug 2012 20:34:23 +0000 (20:34 +0000)]
MFC r239247:
Adjust the r205536, by allowing a non-zero offset for anonymous
mappings for a.out binaries. Apparently, a.out ld.so from FreeBSD
1.1.5.1 can issue such requests.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239592 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238178, 238624, 238810:
pfg [Wed, 22 Aug 2012 20:07:10 +0000 (20:07 +0000)]
MFC     r238178, 238624, 238810:

Re-merge a couple of changes from NetBSD libedit.

bin/sh has been taught about el_gets setting the count to -1
on error, so now we can partially revert r238173 to reduce
differences with NetBSD's implementation.

Also fix some warnings to be more in sync with NetBSD.

Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@239590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238502:
mdf [Wed, 22 Aug 2012 17:16:05 +0000 (17:16 +0000)]
MFC r238502:

Fix a bug with memguard(9) on 32-bit architectures without a
VM_KMEM_MAX_SIZE.

The code was not taking into account the size of the kernel_map, which
the kmem_map is allocated from, so it could produce a sub-map size too
large to fit.  The simplest solution is to ignore VM_KMEM_MAX entirely
and base the memguard map's size off the kernel_map's size, since this
is always relevant and always smaller.

Found by: Justin Hibbits

git-svn-id: svn://svn.freebsd.org/base/stable/8@239566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234313,234315,234322,234351,234870,235726,238461
bapt [Wed, 22 Aug 2012 08:27:37 +0000 (08:27 +0000)]
MFC: r234313,234315,234322,234351,234870,235726,238461

add usr.sbin/pkg which is a bootstrap tool for pkgng.
it respects PACKAGESITE, PACKAGEROOT, and a new environment variable ABI (if a
user want to use a different API from the base one for its packages)
it has no man page on purpose to avoid hidding the pkg(8) man page from the
pkgng package.
for now uses pkgbeta.FreeBSD.org as default mirror to find its package
it respects MK_PKGTOOLS

git-svn-id: svn://svn.freebsd.org/base/stable/8@239563 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239125:
kib [Wed, 22 Aug 2012 05:38:06 +0000 (05:38 +0000)]
MFC r239125:
Do not apply errata 721 workaround when under hypervisor, since
typical hypervisor does not implement access to the required MSR,
causing #GP on boot.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239561 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239038:
kib [Wed, 22 Aug 2012 05:28:55 +0000 (05:28 +0000)]
MFC r239038:
Remove verbose unused commented out debugging printf.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239135:
kib [Wed, 22 Aug 2012 05:23:56 +0000 (05:23 +0000)]
MFC r239135:
Always initialize pl_event.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238377:
pfg [Tue, 21 Aug 2012 21:46:44 +0000 (21:46 +0000)]
MFC r238377:

Merge libedit adjustment from NetBSD.

On recent versions of NetBSD's libedit, el_gets
now sets el_len to -1 on error so we can
distinguish between a NULL string and an error.

This fixes sh from exiting with newer versions
of libedit now allowing EINTR to return.

Obtained from: NetBSD
Reviewed by: jilles

git-svn-id: svn://svn.freebsd.org/base/stable/8@239543 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 237817:
pfg [Tue, 21 Aug 2012 21:21:51 +0000 (21:21 +0000)]
MFC 237817:

Bump dtrace_helper_actions_max from 32 to 128

Dave Pacheco from Joyent (and Dtrace.org) bumped the cap to 1024 but,
according to his blog, 128 is the recommended minimum.

For now bump it safely to 128 although we may have to bump it further
if there is demand in the future.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239541 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 238457:
pfg [Tue, 21 Aug 2012 21:11:59 +0000 (21:11 +0000)]
MFC 238457:

1458 D compiler fails to generate error on sizeof() an undefined struct

Reference:
https://www.illumos.org/issues/1458

Obtained from: Illumos

git-svn-id: svn://svn.freebsd.org/base/stable/8@239539 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238558:
pfg [Tue, 21 Aug 2012 21:06:17 +0000 (21:06 +0000)]
MFC r238558:

Dtrace: improve handling of library paths.

Merge changes from illumos

906 dtrace depends_on pragma should search all library paths, not just the
current one

949 dtrace should only include the first instance of a library found on
its library path

Obtained from: Illumos

git-svn-id: svn://svn.freebsd.org/base/stable/8@239537 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238509:
pfg [Tue, 21 Aug 2012 21:01:24 +0000 (21:01 +0000)]
MFC     r238509:

Use libc's strndup() instead of Dtrace's reimplementation.

Corresponds partially to OpenSolaris change:
PSARC 2010/299 GNU/Linux/BSD compatibility functions
6901783 strndup would be nice.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239535 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r238673:
mav [Tue, 21 Aug 2012 11:43:01 +0000 (11:43 +0000)]
MFC r238673:
Use 16bit PIO instead of 32bit in case of misaligned buffer.
It fixes kernel panic during CD write with cdrecord on sparc64.

git-svn-id: svn://svn.freebsd.org/base/stable/8@239495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r239089
marius [Tue, 21 Aug 2012 10:30:57 +0000 (10:30 +0000)]
MFC: r239089

- Merge from NetBSD:
  When issuing a non-DMA command, make sure to set the "remaining length of
  command to be transferred via DMA" (sc_cmdlen) to zero up-front, otherwise
  we might get confused on command competition interrupt (no DMA active but
  still data left to transfer).
- Implement handling of MSG_IGN_WIDE_RESIDUE which some targets produce, as
  just rejecting these leads to a resend and disconnect loop.
  Reported and tested by: mjacob

git-svn-id: svn://svn.freebsd.org/base/stable/8@239490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f