MFC r253274 and r253368:

  r253274 | ken | 2013-07-12 11:09:50 -0600 (Fri, 12 Jul 2013) | 40 lines

  Fix a problem with READ ELEMENT STATUS that occurs on some
  changers that don't support the DVCID and CURDATA bits that were
  introduced in the SMC spec.

  These changers will return an Illegal Request type error if the
  bits are set.  This causes "chio status" to fail.

  The fix is two-fold.  First, for changers that claim to be SCSI-2
  or older, don't set the DVCID and CURDATA bits for READ ELEMENT
  STATUS.  For newer changers (SCSI-3 and newer), we default to
  setting the new bits, but back off and try the READ ELEMENT STATUS
  without the bits if we get an Illegal Request type error.

  This has been tested on a Qualstar TLS-8211, which is a SCSI-2
  changer that does not support the new bits, and a Spectra T-380,
  which is a SCSI-3 changer that does support the new bits.  In the
  absence of a SCSI-3 changer that does not support the bits, I
  tested that with some error injection code.  (The SMC spec says
  that support for CURDATA is mandatory, and DVCID is optional.)

  scsi_ch.c:	Add a new quirk, CH_Q_NO_DVCID that gets set for
  		SCSI-2 and older libraries, or newer libraries that
  		report errors when the DVCID/CURDATA bits are set.

  		In chgetelemstatus(), use the new quirk to
  		determine whether or not to set DVCID and CURDATA.
  		If we get an error with the bits set, back off and
  		try without the bits.  Set the quirk flag if the
  		read element status succeeds without the bits set.

  		Increase the READ ELEMENT STATUS timeout to 60
  		seconds after testing with a Spectra T-380.  The
  		previous value was 10 seconds, and too short for
  		the T-380.  This may be decreased later after
  		some additional testing and investigation.

  Tested by:	Andre Albsmeier <Andre.Albsmeier@siemens.com>
  Sponsored by:	Spectra Logic

  ------------------------------------------------------------------------
  r253368 | ken | 2013-07-15 10:38:48 -0600 (Mon, 15 Jul 2013) | 5 lines

  Fix an argument reversal in calls to scsi_read_element_status().

  Reported by:	Ulrich Spoerlein <uqs@FreeBSD.org>

Approved by:	re (kib)
MFC of 253330

When fiddling with options of which registers to copy out for
a mailbox command and which registers to copy back in when
the command completes, the bits being set need to not only
specify what bits you want to add from the default from the
table but also what bits you want *subtract* (mask) from the
default from the table.

A failing ISP2200 command pointed this out.

Approved by:	re
Merge r244451 from head (originally by pjd):
  Use correct file permissions when looking for available core file if
  kern.corefile contains %I.

Discussed with:	pjd (some time ago)
Approved by:	re (kib)
MFC: r253284, r253285, r253303:

Correct the Intel network driver module builds. They were not
defining INET or INET6, and in the case of ixgbe this will cause
a panic in the TSO setup code, but in all cases the ioctl behavior
is different, this change makes the module and static consistent.

Approved by: re
Merge remote-tracking branch 'upstream-github/stable/9' into stable/9