Commit Graph

193549 Commits

Author SHA1 Message Date
Hans Petter Selasky
f80ccb40c7 Refine support for disabling USB enumeration to allow device detach
and suspend and resume of existing devices.

MFC after:	2 weeks
2014-10-09 06:24:06 +00:00
Xin LI
15f3c56e3d MFV r272802:
- Limit ARC for zdb at 256MB.  zdb do not typically revisit data
   in the ARC.
 - Increase default max_inflight from 200 to 1000 (can be overriden
   by -I) so we can queue more I/Os when doing scrubbing.
 - Print status while loading meataslabs for leak detection.

Illumos issues:

    5169 zdb should limit its ARC size
    5170 zdb -c should create more scrub i/os by default
    5171 zdb should print status while loading metaslabs for leak detection

MFC after:	2 weeks
2014-10-09 06:02:53 +00:00
Alexander Motin
840a5dd447 Use proper variable when looping through periphs with CAM_PERIPH_FREE.
PR:		194256
Submitted by:	Scott M. Ferris <smferris@gmail.com>
MFC after:	3 days
Sponsored by:	EMC/Isilon Storage Division
2014-10-09 05:53:58 +00:00
Xin LI
def3a5442c 5169 zdb should limit its ARC size
5170 zdb -c should create more scrub i/os by default
5171 zdb should print status while loading metaslabs for leak detection

Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Bayard Bell <Bayard.Bell@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@06be98028b
2014-10-09 05:48:06 +00:00
Bryan Venteicher
514929b193 Move the calls to u_tun_func() into udp6_append()
A similar cleanup for UDPv4 was performed in r220620.

Phabricator:	https://reviews.freebsd.org/D383
Reviewed by:	gnn
MFC after:	1 month
2014-10-09 05:42:07 +00:00
Adrian Chadd
fc4f524a6e Missing from previous commit - keep the VM domain -> PXM mapping
array and use it to map PXM -> VM domain when needed.

Differential Revision:	D906
Reviewed by:	jhb
2014-10-09 05:34:28 +00:00
Adrian Chadd
ffcf962dab Add a bus method to fetch the VM domain for the given device/bus.
* Add a bus_if.m method - get_domain() - returning the VM domain or
  ENOENT if the device isn't in a VM domain;
* Add bus methods to print out the domain of the device if appropriate;
* Add code in srat.c to save the PXM -> VM domain mapping that's done and
  expose a function to translate VM domain -> PXM;
* Add ACPI and ACPI PCI methods to check if the bus has a _PXM attribute
  and if so map it to the VM domain;
* (.. yes, this works recursively.)
* Have the pci bus glue print out the device VM domain if present.

Note: this is just the plumbing to start enumerating information -
it doesn't at all modify behaviour.

Differential Revision:	D906
Reviewed by:	jhb
Sponsored by:	Norse Corp
2014-10-09 05:33:25 +00:00
Bryan Venteicher
c19f98eb74 Check for mbuf copy failure when there are multiple multicast sockets
This partitular case is the only path where the mbuf could be NULL.
udp_append() checked for a NULL mbuf only after invoking the tunneling
callback. Our only in tree tunneling callback - SCTP - assumed a non
NULL mbuf, and it is a bit odd to make the callbacks responsible for
checking this condition.

This also reduces the differences between the IPv4 and IPv6 code.

MFC after:	1 month
2014-10-09 05:17:47 +00:00
Bryan Venteicher
1298fd9af4 Add M_FLOWID to M_COPYFLAGS
The M_FLOWID flag should be propagated to the new mbuf pkthdr in
m_move_pkthdr() and m_dup_pkthdr(). The new mbuf already got the
existing flowid value, but would be ignored since the flag was
not set.

Phabricator:	https://reviews.freebsd.org/D914
Reviewed by:	adrian
Obtained from:	NetApp
MFC after:	1 week
2014-10-09 04:40:19 +00:00
Marcel Moolenaar
383f423be1 Fix draining in ttydev_leave():
1.  ERESTART is not only returned when the revoke count changed. It
    is also returned when a signal is received. While a change in
    the revoke count should be ignored, a signal should not.
2.  Waiting until the output queue is entirely drained can cause a
    hang when the underlying device is stuck or broken.

Have tty_drain() take care of this by telling it when we're leaving.
When leaving, tty_drain() will use a timed wait to address point 2
above and it will check the revoke count to handle point 1 above.
The timeout is set to 1 second, which is arbitrary and long enough
to expect a change in the output queue.

Discussed with: jilles@
Reported by: Yamagi Burmeister <lists@yamagi.org>
2014-10-09 02:30:38 +00:00
Enji Cooper
cdfd89cea1 Integrate usr.bin/gzip/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2014-10-09 02:24:34 +00:00
Enji Cooper
9752f4a74f Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests
Sponsored by: EMC / Isilon Storage Division
2014-10-09 02:07:34 +00:00
Marcel Moolenaar
75c2b79df8 Apply r269126 to tty_timedwait():
Don't return ERESTART when the device is gone.
2014-10-09 01:59:25 +00:00
Marcel Moolenaar
511037bd43 Properly NUL-terminate the on-stack buffer for reading /boot.config
or /boot/config. In qemu, on a warm boot, the stack is not all zeroes
and we parse beyond the file's contents.

Obtained from:	Juniper Networks, Inc.
2014-10-09 01:54:32 +00:00
Enji Cooper
1e7075e0a4 Integrate usr.bin/grep/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2014-10-09 01:53:23 +00:00
Enji Cooper
48e0fbc3f9 Integrate usr.bin/cut/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2014-10-09 01:46:31 +00:00
Enji Cooper
6186fd1857 Integrate bin/sleep/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2014-10-09 01:39:07 +00:00
Enji Cooper
17313006a0 Integrate usr.bin/dirname/tests from NetBSD into atf/kyua
In collaboration with: pho, sjg
Sponsored by: EMC / Isilon Storage Division
2014-10-09 00:55:04 +00:00
Enji Cooper
0306a0a804 Integrate usr.bin/cmp/tests from NetBSD into atf/kyua
In collaboration with: sjg
Sponsored by: EMC / Isilon Storage Division
2014-10-09 00:50:33 +00:00
Enji Cooper
0be0d5f339 Integrate usr.sbin/basename/tests from NetBSD into atf/kyua
In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-09 00:41:42 +00:00
Enji Cooper
d192d44ab4 Set the autoindent to 4 spaces with vim in BSD.tests.dist
This will prevent vim users from accidentally checking in buggy mtree files
(mixed tabs/spaces).

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2014-10-09 00:37:58 +00:00
Enji Cooper
56695221dd Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua
In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-09 00:32:33 +00:00
John Baldwin
3ec056ef7d Forgot to bump Dd.
Pointy hat to:	jhb
2014-10-08 21:56:00 +00:00
John Baldwin
958e30b890 Rewrite timeout(9) to be callout(9)-centric instead. Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.

Differential Revision:	https://reviews.freebsd.org/D847
Reviewed by:	wblock, bjk
MFC after:	1 week
2014-10-08 21:53:24 +00:00
Andrey V. Elsukov
5b7a43f546 When tunneling interface is going to insert mbuf into netisr queue after stripping
outer header, consider it as new packet and clear the protocols flags.

This fixes problems when IPSEC traffic goes through various tunnels and router
doesn't send ICMP/ICMPv6 errors.

PR:		174602
Obtained from:	Yandex LLC
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2014-10-08 21:23:34 +00:00
Baptiste Daroussin
315e69cb63 Import byacc 20141006 2014-10-08 20:46:38 +00:00
Baptiste Daroussin
c021d7a622 Import byacc 20140906 2014-10-08 20:41:56 +00:00
Mark Johnston
5eaae1411f Pass up the error status of minidumpsys() to its callers.
PR:		193761
Submitted by:	Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by:	EMC / Isilon Storage Division
2014-10-08 20:25:21 +00:00
Alexander Motin
3b4ae4621f Remove one second wait for threads exit from icl_conn_close().
Switch it from polling with pause() to using cv_wait()/cv_signal().
2014-10-08 19:54:42 +00:00
Gavin Atkinson
c5dcd62615 It looks like an entry for the R215 is not required in cdce(4) after all. 2014-10-08 19:49:10 +00:00
Mark Johnston
9f08174d47 If we fail to send a signal after rotation, print the pidfile from which
the corresponding PID was obtained.

PR:		194143
Submitted by:	Lyndon Nerenberg <lyndon@orthanc.ca>
MFC after:	1 week
2014-10-08 17:44:30 +00:00
Ed Maste
599df3ef01 Correct scale factor for T terabyte suffix
PR:		194250
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-10-08 17:40:58 +00:00
Konstantin Belousov
07a92f34d6 Add an argument to the x86 pmap_invalidate_cache_range() to request
forced invalidation of the cache range regardless of the presence of
self-snoop feature.  Some recent Intel GPUs in some modes are not
coherent, and dirty lines in CPU cache must be flushed before the
pages are transferred to GPU domain.

Reviewed by:	alc (previous version)
Tested by:	pho (amd64)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-10-08 16:48:03 +00:00
John Baldwin
232e8b52b0 Add schedgraph traces for callout handlers. Specifically, a callwheel logs
a running event each time it executes a callout function.  The event
includes the function pointer, argument, and whether or not it was run from
hardware interrupt context.  The callwheel is marked idle when each handler
completes.  This effectively logs the duration of each callout routine in
the graph.
2014-10-08 16:22:59 +00:00
Alexander Motin
82315915e0 Properly report 12Gbps connection rate.
Reviewed by:	kadesai, slm
MFC after:	1 week
2014-10-08 16:22:26 +00:00
Michael Tuexen
9ba6106020 Ensure that the list of streams sent in a stream reset parameter fits
in an mbuf-cluster.
Thanks to Peter Bostroem for drawing my attention to this part of the code.
2014-10-08 15:30:59 +00:00
Michael Tuexen
e29127de2e Ensure that the number of stream reported in srs_number_streams is
consistent with the amount of data provided in the SCTP_RESET_STREAMS
socket option.
Thanks to Peter Bostroem from Google for drawing my attention to
this part of the code.
2014-10-08 15:29:49 +00:00
Andrey V. Elsukov
5c6af4bbf5 Fix comment.
MFC after:	1 week
2014-10-08 12:33:31 +00:00
Alexander Motin
5396f4d279 Implement software (mode page) and hardware (config) write protection. 2014-10-08 12:24:24 +00:00
Andrey V. Elsukov
a62c8c6a99 Revert r156046. We support setting dumpdev via loader tunable again.
Also change default disk name to ada.

MFC after:	3 weeks
2014-10-08 12:19:48 +00:00
Andrey V. Elsukov
0478dc0c16 Add an ability to set dumpdev via loader(8) tunable.
MFC after:	3 weeks
2014-10-08 12:18:16 +00:00
Kashyap D Desai
8e72737119 No logical code change in this pathc.
Only Style 9 changes for mrsas driver.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2014-10-08 10:14:37 +00:00
Edward Tomasz Napierala
5d28b9ed32 Simplify; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-08 09:44:02 +00:00
Kashyap D Desai
7efff25b10 Driver version upgrade.
Bring head mrsas same as internal Phase 6.5.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2014-10-08 09:39:18 +00:00
Kashyap D Desai
839ee02531 In the passthru IOCTL path, the mfi command pool was freely accessible N times
where as there are limited number(32) of mfi commands in the pool.
The mfi command pool is now restricted to 27 simultaneous accesses by using
a counting semaphore while calling the passthru function.

In the mrsas_cam.c source file there was a same function name mrsas_poll(),
which was same as the mrsas_poll() implemented in the mrsas.c file for the
polling interface.
To clearly distinguish the functionality by usage we have renamed the former
as mrsas_cam_poll().

In the passthru function let's say it has got an mfi command from the pool
but it has failed in one of the DMA function call which will lead to leak
an mfi command because in the ERROR case it directly returns and not freeing up
the occupied mfi command.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2014-10-08 09:37:47 +00:00
Kashyap D Desai
da01111344 d_poll() callback function is the entry point for poll system call for the application.
It is meant to notify the applications which will be waiting for some
controller events to be occured.

Reviewed by:	ambrisko
MFC after:	2 weeks
Sponsored by:	AVAGO Technologies
2014-10-08 09:35:52 +00:00
Kashyap D Desai
d18d1b472d Extended MSI-x vectors support for Invader and Fury(12Gb/s HBA).
This Driver will create multiple MSI-x vector depending upon what FW expose.
As of now 12 Gbp/s MR controller (Invader and Fury) expose 96 msix vector.
As of now 6 Gbp/s MR controller (Thunderbolt) expose 16 msix vector.

Reviewed by:	ambrisko
MFC after:		2 weeks
Sponsored by:	AVAGO Technologies
2014-10-08 09:34:25 +00:00
Kashyap D Desai
90012054d6 Fix the minor svn add issue. $FreeBSD$ expands at the time of
snv add, so I have added $FreeBSD$ as comment.

This commit is contininous of last mrsas commit, so that compilation
does not break.

Obtained from:	AVAGO Technologies
MFC after: 2 weeks
2014-10-08 09:30:35 +00:00
Kashyap D Desai
536094dc79 This is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
machine, for which 32bit compatibilty code has been added.
As in linux there is only one device entry that is used to fire IOCTL commands,
a new device entry megaraid_sas_ioctl_node is added for solely this
purpose.

From one dev node i.e mrgaraid_sa_ioctl_node we have to find out the
controller instance in case of multicontroller, for which one management info
structure has been added.

Reviewed by:	ambrisko
MFC after:		2 weeks
Sponsored by:	AVAGO Technologies
2014-10-08 09:19:35 +00:00
Ruslan Bukin
fdbf76c383 Always wait 'command done' interrupt status bit before proceeding next command.
Sponsored by:	DARPA, AFRL
2014-10-08 08:51:05 +00:00