Commit Graph

172261 Commits

Author SHA1 Message Date
Matt Jacob
94dff77179 More rototilling with target mode in an attemp to get multiple
CCB at a time outstanding reliable. It's not there yet, but this
is the direction to go in so might as well commit. So far,
multiple at a time CCBs work (see ISP_INTERNAL_TARGET test mode),
but it fails if there are more downstream than the SIM wants
to handle and SRR is sort of confused when this happens, plus
it is not entirely quite clear what one does if a CCB/CTIO fails
and you have more in flight (that don't fail, say) and more queued
up at the SIM level that haven't been started yet.

Some of this is driven because there apparently is no flow control
to requeue XPT_CONTINUE_IO requests like there are for XPT_SCSI_IO
requests. It is also more driven in that the few target mode
periph drivers there are are not really set up for handling pushback-
heck most of them don't even check for errors (and what would they
really do with them anyway? It's the initiator's problem, really....).

The data transfer arithmetic has been worked over again to handle
multiple outstanding commands, so you have a notion of what's been
moved already as well as what's currently in flight. It turns that
this led to uncovering a REPORT_LUNS bug in the ISP_INTERNAL_TARGET
code which was sending back 24 bytes of rpl data instead of the
specified 16. What happened furthermore here is that sending back
16 bytes and reporting an overrun of 8 bytes made the initiator
(running FC-Tape aware f/w) mad enough to request, and keep
requesting, another FCP response (I guess it didn't like the answer
so kept asking for it again).

Sponsored by: Spectralogic
MFC after:	1 month
2012-08-08 18:24:33 +00:00
Adrian Chadd
2a72e4b222 Fix an incorrect comment. 2012-08-08 17:16:06 +00:00
Ed Maste
0bf8895411 Fix whitespace (missing newline) 2012-08-08 15:28:29 +00:00
Ed Maste
24e57ec96d Clarify comments about number of tx / rx rings 2012-08-08 15:27:01 +00:00
Ed Maste
ef63ce395a Round displayed pps (instead of truncating) 2012-08-08 13:54:26 +00:00
Andrew Turner
fdc8ba5e71 Import compiler-rt r160957.
This is mostly a no-op other than for ARM where it adds missing
__aeabi_mem* and __aeabi_*divmod functions. Even on ARM these will remain
unused until the rest of the ARM EABI code is merged.
2012-08-08 09:42:44 +00:00
Alan Cox
663f8700d4 The assertion that I added in r238889 could legitimately fail when a
debugger creates a breakpoint.  Replace that assertion with a narrower
one that still achieves my objective.

Reported and tested by:	kib
2012-08-08 05:28:30 +00:00
Konstantin Belousov
c0c6e95f7f Always initialize pl_event.
Submitted by:	Andrey Zonov <andrey@zonov.org>
MFC after:	3 days
2012-08-08 00:20:30 +00:00
Adrian Chadd
0a1a3230b6 Commit device IDs for the (eventually upcoming) AR9380 HAL.
Obtained from:	Qualcomm Atheros, Linux ath9k
2012-08-07 23:45:43 +00:00
Jim Harris
7bfcb3bb9b During TSC synchronization test, use rdtsc() rather than rdtsc32(), to
protect against 32-bit TSC overflow while the sync test is running.

On dual-socket Xeon E5-2600 (SNB) systems with up to 32 threads, there
is non-trivial chance (2-3%) that TSC synchronization test fails due to
32-bit TSC overflow while the synchronization test is running.

Sponsored by: Intel
Reviewed by: jkim
Discussed with: jkim, kib
2012-08-07 23:16:11 +00:00
Jim Harris
82a6ae1009 Clone BIO_ORDERED flag, for disk drivers (namely CAM) that try to
consume it.

Sponsored by: Intel
Discussed with: gibbs, scottl
2012-08-07 20:16:10 +00:00
Mikolaj Golub
1d9db37c77 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
MFC after:	3 days
2012-08-07 18:50:33 +00:00
Ed Maste
6337d82014 Minor style(9) improvement 2012-08-07 13:11:47 +00:00
John Baldwin
1710852ebd 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.

MFC after:	2 weeks
2012-08-07 12:40:31 +00:00
Andrey V. Elsukov
06f2b92916 As it turned out, there are some installations, where BSD label
contains partitions with type zero. And it has worked.
So, allow detect these partitions.

Reported by:	glebius
2012-08-07 09:22:46 +00:00
Warner Losh
b7e39c683a Fix obvious problem with emulate_fp sysctl.
Submitted by:	Paul Ambrose <ambrosehua@gmail.com>
2012-08-07 08:37:35 +00:00
Konstantin Belousov
65211d02c4 Do not apply errata 721 workaround when under hypervisor, since
typical hypervisor does not implement access to the required MSR,
causing #GP on boot.

Reported and tested by:	olgeni
PR:	amd64/170388
MFC after:	3 days
2012-08-07 08:36:10 +00:00
Luigi Rizzo
e5813a3bce s/lenght/length/ in comments 2012-08-07 07:52:25 +00:00
Sergey Kandaurov
16ec457aeb Remove duplicate header inclusion of <sys/sysent.h>
Discussed with:	bz
2012-08-07 05:46:36 +00:00
Alan Cox
18f55b0171 Never sleep on busy pages in vm_pageout_launder(), always skip them. Long
ago, sleeping on busy pages in vm_pageout_launder() made sense.  The call
to vm_pageout_flush() specified asynchronous I/O and sleeping on busy pages
blocked vm_pageout_launder() until the flush had completed.  However, in
CVS revision 1.35 of vm/vm_contig.c, the call to vm_pageout_flush() was
changed to request synchronous I/O, but the sleep on busy pages was not
removed.
2012-08-07 04:48:14 +00:00
Adrian Chadd
d2da554492 Correct re-initialise the link pointer to be the final descriptor in
the last buffer.

This fixes traffic stalls that were occuring with stuck beacon events.

PR:		kern/170433
2012-08-07 00:42:46 +00:00
Adrian Chadd
a176030864 Remove unnecessary debugging printf()s. 2012-08-06 22:54:10 +00:00
Davide Italiano
29f44c62f7 Remove a spurious bace which cause build fail in case BCE_DEBUG option
is turned on.

Reviewed by:		delphij
Approved by:		gnn (mentor)
Sponsored by:		Google Summer of Code 2012
MFC after:		1 week
2012-08-06 22:53:24 +00:00
Jack F Vogel
724f79462b Make the polling interface in igb able to handle
multiqueue, and correct the rxdone handling. Update
the polling man page to include igb as well.

Thanks to Mark Johnston for these changes.
2012-08-06 22:43:49 +00:00
Brooks Davis
12a14de08e MFP4 change 214967:
Make the process of embedding MDROOT images less perilous by
	makeing the target that links kernel and embedding the image
	depend on the image.  This means, if the image doesn't exist you
	find out before you try to boot from it and that if you change
	the image you don't have to touch some random source file to
	cause a rebuild.

	Don't hide that we're embedding the image.
2012-08-06 21:24:43 +00:00
Dimitry Andric
3283f9d4f5 Make sure the compiler knows g_gate_xvlog() and g_gate_xlog() do not
return.  This silences a warning from clang 3.2 about uninitialized use
of the variable 'mediasize' in sbin/ggate/shared/ggate.c.

Reviewed by:	pjd
MFC after:	1 week
2012-08-06 21:02:40 +00:00
Jack F Vogel
6aa4d618ca Correct the mq_start routine to avoid out-of-order
packet delivery, always enqueue when possible. Also
correct the DEPLETED test as multiple bits might be
set.  Thanks to Randall Stewart for the changes!
2012-08-06 20:44:05 +00:00
Dimitry Andric
d265aafb5a In sys/dev/aic7xxx/aic79xx_osm.c, function ahd_attach(), initialize the
'path' variable to NULL, to avoid using it uninitialized in certain
cases.

Found by:	clang
MFC after:	1 week
2012-08-06 20:01:32 +00:00
John Baldwin
ef8881526b 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.

Tested by:	Steve Polyack  korvus comcast net
MFC after:	2 weeks
2012-08-06 19:49:57 +00:00
Dimitry Andric
daccbb811d In sys/dev/cxgbe/firmware/t4fw_interface.h, change the enum
'fw_hdr_intfver' into an anonymous enum, which avoids a clang 3.2
warning about all the enum values being the same value.

Reviewed by:	np
MFC after:	1 week
2012-08-06 18:54:17 +00:00
Dimitry Andric
25982a6e2d In cxgb(4), in function iwch_reregister_phys_mem(), initialize the
'npages' variable to zero, to avoid using it uninitialized in certain
cases.

Found by:	clang
Reviewed by:	np
MFC after:	1 week
2012-08-06 18:51:14 +00:00
Dimitry Andric
1843e23c48 Fix an instance in pam_krb5(8), where the variable 'user' could be used
uninitialized.

Found by:	clang 3.2
Reviewed by:	des
MFC after:	1 week
2012-08-06 18:44:59 +00:00
Dimitry Andric
2251b30757 Fix two instances in pam_krb5(8), where the variable 'princ_name' could
be used uninitialized.

Found by:	clang 3.2
Reviewed by:	des
MFC after:	1 week
2012-08-06 18:40:14 +00:00
Alexander Kabaev
c9516c94b4 Do not add handler to event handlers list until ithread is created.
In rare event when fast and ithread interrupts share the same vector
and the fast handler was registered first, we can end up trying to
schedule the ithread that is not created yet. The kernel built with
INVARIANTS then triggers an assertion.

Change the order to create the ithread first and only then add the
handler that needs it to the interrupt event handlers list.

Reviewed by: jhb
2012-08-06 16:37:43 +00:00
Luigi Rizzo
17369272e4 move functions outside the SYSBEGIN/SYSEND block
(SYSBEGIN/SYSEND are specific to ipfw/dummynet and are used to
emulate sysctl on platforms that do not have them, and they work
by creating an array which contains all the sysctl-ed symbols.)
2012-08-06 11:02:23 +00:00
Luigi Rizzo
00c4633285 use FREE_PKT instead of m_freem to free an mbuf.
The former is the standard form used in ipfw/dummynet, so that
it is easier to remap it to different memory managers depending
on the platform.
2012-08-06 10:50:43 +00:00
Michael Tuexen
55b175e747 Fix a bug found by dim@:
Don't use an uninitilized variable, if INVARIANTS is on and an illegal
packet with destination 0 is received.

MFC after:	3 days
X-MFC with:	238003
2012-08-06 10:50:23 +00:00
Gleb Smirnoff
32fe943c32 Add supported device. 2012-08-06 08:59:39 +00:00
Marius Strobl
60df250ae1 - 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

MFC after:	3 days
2012-08-06 08:58:54 +00:00
Andrey V. Elsukov
a2bdef2a84 Fix start offset calculation for the EBR partitions. 2012-08-06 08:54:06 +00:00
Andrey V. Elsukov
23f180dfb1 Add to the debug output the offset from the parent partitioning scheme. 2012-08-06 08:39:29 +00:00
Xin LI
0af671184d Add PCI IDs for various new High Point RocketRAID 43xx and 3xxx devices.
Obtained from:	FreeNAS
MFC after:	3 days
2012-08-06 05:27:26 +00:00
Marius Strobl
55afc4edf1 Merge r236494 from x86:
Isolate the global TTE list lock from data and other locks to prevent false
sharing within the cache.

MFC after:	3 days
2012-08-05 22:03:13 +00:00
Eitan Adler
a6c38148a0 Add interactive option to override portsnap's automagical detection of
a terminal.

Submitted by:	Hannes h2+fbsdports@fsfe.org
Approved by:	cperciva
MFC after:	1 week
2012-08-05 21:13:21 +00:00
Marius Strobl
787c338407 Include <vm/vm_param.h> for PA_LOCK_COUNT in order to fix kernel build
with options ZFS after r239065.
2012-08-05 20:19:27 +00:00
Eitan Adler
0dfbbace0d Add support for SIIG Cyber Serial Dual PCI 16C850
Submitted by:	David Boyd David.Boyd@insightbb.com
Approved by:	cperciva
MFC after:	3 days
2012-08-05 19:37:18 +00:00
Mikolaj Golub
655f934b78 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.

Approved by:	net (silence)
MFC after:	2 weeks
2012-08-05 17:30:17 +00:00
Dimitry Andric
b0c39ce916 In usr.sbin/ctladm/ctladm.c, function cctl_error_inject(), initialize
the 'retval' variable to zero, to avoid returning garbage in several
cases.

This fixes the following clang 3.2 warnings:

  usr.sbin/ctladm/ctladm.c🔢6: error: variable 'retval' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
          if (ioctl(fd, CTL_ERROR_INJECT, &err_desc) == -1) {
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  usr.sbin/ctladm/ctladm.c:1243:10: note: uninitialized use occurs here
          return (retval);
                  ^~~~~~
  usr.sbin/ctladm/ctladm.c🔢2: note: remove the 'if' if its condition is always true
          if (ioctl(fd, CTL_ERROR_INJECT, &err_desc) == -1) {
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  usr.sbin/ctladm/ctladm.c:1161:7: error: variable 'retval' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
                  if (ioctl(fd, CTL_ERROR_INJECT_DELETE, &err_desc) == -1) {
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  usr.sbin/ctladm/ctladm.c:1243:10: note: uninitialized use occurs here
          return (retval);
                  ^~~~~~
  usr.sbin/ctladm/ctladm.c:1161:3: note: remove the 'if' if its condition is always true
                  if (ioctl(fd, CTL_ERROR_INJECT_DELETE, &err_desc) == -1) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  usr.sbin/ctladm/ctladm.c:1029:12: note: initialize the variable 'retval' to silence this warning
          int retval;
                    ^
                     = 0

MFC after:      1 week
2012-08-05 17:23:47 +00:00
Andrey V. Elsukov
3db1bfd80d Bump USERBOOT_VERSION.
Requested by:	dfr
2012-08-05 17:04:58 +00:00
Alan Cox
59fa03faa3 Shave off a few more cycles from the average execution time of pmap_enter()
by simplifying the control flow and reducing the live range of "om".
2012-08-05 16:59:02 +00:00