Commit Graph

170259 Commits

Author SHA1 Message Date
Michael Tuexen
e06b67c756 Add support for the sac_info field in struct sctp_assoc_change
as required by RFC 6458.

MFC after: 3 days
2012-05-06 13:09:13 +00:00
Alexander Motin
eb3b1cd0de Plug small memory leaks. 2012-05-06 12:55:20 +00:00
Edward Tomasz Napierala
deb35287b3 Fix offset calculation to actually rewrite the _last_ block. 2012-05-06 11:48:37 +00:00
Ulrich Spörlein
a8e5e7c520 Fix make depend 2012-05-06 11:41:00 +00:00
Michael Tuexen
3f826ed2f3 Remove debug code.
MFC after: 3 days
2012-05-06 11:37:41 +00:00
Alexander Motin
8f12ca2ee1 Add support for RAID5R. Slightly improve support for RAIDMDF. 2012-05-06 11:32:36 +00:00
Michael Tuexen
9935403ae1 Add support for SCTP_SEND_FAILED_EVENT as required by RFC 6458.
MFC after: 3 days
2012-05-06 11:02:53 +00:00
Juli Mallett
ffbec96825 Add a driver for the GXemul test machine's disk controller and disk devices.
Prefer it to using an md device in the GXEMUL kernel configuration.

Requested by:	rwatson, theraven
2012-05-06 08:28:08 +00:00
Warner Losh
6787a7875a Fix the MACHINE_ARCH for big endian arm to be armeb. 2012-05-06 07:20:48 +00:00
Alexander Motin
e231bbbaa3 Add description for GEOM RAID tunables/sysctls.
MFC after:	1 week
2012-05-06 06:25:17 +00:00
Juli Mallett
a0f00447fb Get the memory size from the gxemul mp device. Don't dump the environment if
it is not present.
2012-05-06 05:58:56 +00:00
Alexander Motin
c0b1ef6661 Fix gmultipath configure for big-endian machines.
MFC after:	1 week
2012-05-06 05:49:23 +00:00
David Xu
173943ace3 Fix mis-merged line, move SC_LOOKUP() call to
upper level.
2012-05-05 23:51:24 +00:00
Michael Tuexen
d426064666 Provide the flags in the SCTP stream reconfig related notification
as specified in RFC 6525.

MFC after: 3 days
2012-05-05 21:41:16 +00:00
Michael Tuexen
f3ebe64c9e Honor SCTP_ENABLE_STREAM_RESET socket option when processing incoming
requests. Fix also the provided result in the response and use names
as specified in RFC 6525.

MFC after: 3 days
2012-05-05 20:07:33 +00:00
Alexander Leidinger
19e252baeb - >500 static DTrace probes for the linuxulator
- DTrace scripts to check for errors, performance, ...
  they serve mostly as examples of what you can do with the static probe;s
  with moderate load the scripts may be overwhelmed, excessive lock-tracing
  may influence program behavior (see the last design decission)

Design decissions:
 - use "linuxulator" as the provider for the native bitsize; add the
   bitsize for the non-native emulation (e.g. "linuxuator32" on amd64)
 - Add probes only for locks which are acquired in one function and released
   in another function. Locks which are aquired and released in the same
   function should be easy to pair in the code, inter-function
   locking is more easy to verify in DTrace.
 - Probes for locks should be fired after locking and before releasing to
   prevent races (to provide data/function stability in DTrace, see the
   man-page of "dtrace -v ..." and the corresponding DTrace docs).
2012-05-05 19:42:38 +00:00
Warner Losh
15efbb17a8 I need to change uname -p, not uname -m, so back this out.
Also, fix a couple of style(9) issues while I'm here.

Submitted by:	nathanw, bde
2012-05-05 17:20:12 +00:00
Isabell Long
d2b79d58ec - Add my mentor/mentee relationship to committers-doc.dot.
(where me = issyl0)

Approved by:	gabor (mentor)
2012-05-05 16:50:12 +00:00
Baptiste Daroussin
5c98f30724 open the resolved path
fix debug message

Submitted by:	John Marino <draco@marino.st>
Approved by:	des (mentor)
2012-05-05 16:37:14 +00:00
Dimitry Andric
acf4e8ef71 Make sure a few new internal clang headers get installed, I missed these
in the last import.  They are sometimes needed when you want to use
advanced instructions.

Also, add clang's internal stdalign.h header to ObsoleteFiles.inc, since
it is redundant: we already have a stdalign.h header in /usr/include.

Pointy hat to:	dim
PR:		kern/167574
Submitted by:	jkim
Reported by:	Oliver Hartmann <ohartman@zedat.fu-berlin.de>
MFC after:	2 weeks
2012-05-05 15:35:22 +00:00
Michael Tuexen
f6faece611 Do error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,
and SCTP_ADD_STREAMS socket options as specified by RFC 6525.

MFC after: 3 days
2012-05-05 14:06:15 +00:00
Konstantin Belousov
eb6910ccca Work around a situation where symlook_obj() could be called for the
object for which digest_dynamic1() was not done yet. Just return
EINVAL and do not try to dereference NULL buckets hash array.

This seems to happen on ia64 for rtld object itself, where the
R_IA_64_FPTR64LSB relocations require symbol lookup. The dynamic
linker itself does not rely on identity of the C-level function
pointers (i.e. function descriptors).

Reported and reviewed by:	marcel
MFC after:   8 days
2012-05-05 11:26:08 +00:00
Sergey Kandaurov
54d642ad7d Fix mount mutex handling missed in r234386. 2012-05-05 09:34:35 +00:00
Warner Losh
6593be0158 Big endian arm boxes need to have a uname -m of armeb, not arm, so
that the bootstrap from source works correctly.

MFC after:	4 days
2012-05-05 07:15:34 +00:00
Jim Harris
e0e3e85dc0 Fix off-by-one error in sati_inquiry_block_device_translate_data(). Bug would
result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data
instead of 64 during SCSI/ATA translation.

Sponsored by: Intel
Approved by: scottl
MFC after: 1 week
2012-05-04 23:45:34 +00:00
Marcel Moolenaar
a48b6a8585 Don't assume we have legacy PICs (i.e. 8259A in cascade) at the legacy
I/O port addresses. Even if we do, this is hardly the place to mask
interrupts. It's not clear that this was at all needed. The code came
with CVS revision 1.2 of nexus.c when interrupt support was first added.
What is known is that ia64 has always been designed around the IOSAPIC,
and that doing I/O like this prevents Altix from booting.
2012-05-04 23:16:29 +00:00
Doug Ambrisko
93fba01290 Fix the returns in mfi_tbolt_sync_map_info. I forgot to change
them to cleanup and goto out when acknowledging the LD's.  Check
for failure on malloc.  Remove a couple of extra lines and remove
the spurious return.

Prompted by:	Petr Lampa
MFC after:	3 days
2012-05-04 22:54:54 +00:00
Xin LI
0426af06b1 Update FREEBSD-vendor to reflect the current version. 2012-05-04 21:06:53 +00:00
Xin LI
ac3ea9104e Merge from OpenBSD 5.1.
MFC after:	3 weeks
2012-05-04 21:03:39 +00:00
Xin LI
74882260fa Add ToS definitions for DiffServ Codepoints as per RFC2474.
Obtained from:	OpenBSD
MFC after:	2 weeks
2012-05-04 21:00:32 +00:00
Adrian Chadd
96ff26ff5d Fix a couple of sc_ac2q[] mappings that were using the TID, not the AC.
PR:		kern/167588
2012-05-04 20:31:27 +00:00
Andrey V. Elsukov
ceeac1ac05 Don't ignore start offset value when user specifies it together
with alignment.

PR:		bin/167567
Tested by:	Warren Block
MFC after:	1 week
2012-05-04 19:49:24 +00:00
Jung-uk Kim
92fa7e24cb Complete commit message for r235024:
Use MADT to match ACPI Processor objects to CPUs.  MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems, 'debug.acpi.cpu_unordered' tunable is added.
Set this to a non-zero value to restore the old behavior.
Many thanks to jhb for pointing me to the right direction and the manual
page change.

Reported by:	Harris, James R (james dot r dot harris at intel dot com)
Tested by:	Harris, James R (james dot r dot harris at intel dot com)
Reviewed by:	jhb
MFC after:	1 month
2012-05-04 18:54:51 +00:00
Xin LI
4e1e6f2641 Vendor import of netcat as of OPENBSD_5_1. 2012-05-04 18:29:32 +00:00
Jung-uk Kim
e5751426ad Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may
list CPUs in different orders, especially for disabled logical cores.  Now
we match ACPI IDs from the MADT with Processor objects, strictly order CPUs
accordingly, and ignore disabled cores.  This prevents us from executing
methods for other CPUs, e. g., _PSS for disabled logical core, which may not
exist.  Unfortunately, it is known that there are a few systems with buggy
BIOSes that do not have unique ACPI IDs for MADT and Processor objects.  To
work around these problems
2012-05-04 18:24:38 +00:00
Michael Tuexen
cdedb5425c Add support for the SCTP_ENABLE_STREAM_RESET socket option to
getsockopt(). This improves the support of RFC 6525.

MFC after: 3 days
2012-05-04 17:18:02 +00:00
Doug Ambrisko
52d5baa245 Some style improvements. 2012-05-04 16:22:13 +00:00
Doug Ambrisko
ddbffe7f70 First fix pr 167226:
ThunderBolt cannot read sector >= 2^32 or 2^21
with supplied patch.

Second the bigger change, fix RAID operation on ThunderBolt base
card such as physically removing a disk from a RAID and replacing
it.  The current situation is the RAID firmware effectively hangs
waiting for an acknowledgement from the driver.  This is due to
the firmware support of the driver actually accessing the RAID
from under the firmware.  This is an interesting feature that
the FreeBSD driver does not use.  However, when the firmare
detects the driver has attached it then expects the driver will
synchronize LD's with the firmware.  If the driver does not sync.
then the management part of the firmware will hang waiting for
it so a pulled driver will listed as still there.

The fix for this problem isn't extremely difficult.  However,
figuring out why some of the code was the way it was and then
redoing it was involved.  Not have a spec. made it harder to
try to figure out.  The existing driver would send a
MFI_DCMD_LD_MAP_GET_INFO command in write mode to acknowledge
a LD state change.  In read mode it gets the RAID map from the
firmware.  The FreeBSD driver doesn't do that currently.  It
could be added in the future with the appropriate structures.
To simplify things, get the current LD state and then build
the MFI_DCMD_LD_MAP_GET_INFO/write command so that it sends
an acknowledgement for each LD.  The map would probably state
which LD's changed so then the driver could probably just
acknowledge the LD's that changed versus all.  This doesn't seem
to be a problem.  When a MFI_DCMD_LD_MAP_GET_INFO/write command
is sent to the firmware, it will complete later when a change
to the LD's happen.  So it is very much like an AEN command
returning when something happened.  When the
MFI_DCMD_LD_MAP_GET_INFO/write command completes, we refire the
sync'ing of the LD state.  This needs to be done in as an event
so that MFI_DCMD_LD_GET_LIST can wait for that command to
complete before issuing the MFI_DCMD_LD_MAP_GET_INFO/write.
The prior code didn't use the call-back function and tried
to intercept the MFI_DCMD_LD_MAP_GET_INFO/write command when
processing an interrupt.  This added a bunch of code complexity
to the interrupt handler.  Using the call-back that is done
for other commands got rid of this need.  So the interrupt
handler is greatly simplified.  It seems that even commands
that shouldn't be acknowledged end up in the interrupt handler.
To deal with this, code was added to check to see if a command
is in the busy queue or not.  This might have contributed to the
interrupt storm happening without MSI enabled on these cards.

Note that MFI_DCMD_LD_MAP_GET_INFO/read returns right away.

It would be interesting to see what other complexity could
be removed from the ThunderBolt driver that really isn't
needed in our mode of operation.  Letting the RAID firmware
do all of the I/O to disks is a lot faster since it can
use its caches.  It greatly simplifies what the driver has
to do and potential bugs if the driver and firmware are
not in sync.

Simplify the aen_abort/cm_map_abort and put it in the softc
versus in the command structure.

This should get merged to 9 before the driver is merged to
8.

PR:		167226
Submitted by:	Petr Lampa
MFC after:	3 days
2012-05-04 16:00:39 +00:00
Nathan Whitehorn
bc96dccc69 Fix final bugs in memory barriers on PowerPC:
- Use isync/lwsync unconditionally for acquire/release. Use of isync
  guarantees a complete memory barrier, which is important for serialization
  of bus space accesses with mutexes on multi-processor systems.
- Go back to using sync as the I/O memory barrier, which solves the same
  problem as above with respect to mutex release using lwsync, while not
  penalizing non-I/O operations like a return to sync on the atomic release
  operations would.
- Place an acquisition barrier around thread lock acquisition in
  cpu_switchin().
2012-05-04 16:00:22 +00:00
Michael Tuexen
88d935dad7 Add support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as
required by RFC 6525. This also fixes SCTP_STREAM_RESET_EVENT.

MFC after: 3 days
2012-05-04 15:49:08 +00:00
Josh Paetzel
1ad0b0d5fd Add bootcamp bootloader stamp
Submitted by:	kmoore
Obtained from:	PC-BSD
MFC after:	3 days
Sponsored by:	iXsystems
2012-05-04 15:39:41 +00:00
Josh Paetzel
9e8bf03252 Add powerpc / powerpc64 support to pc-sysinstall. This patch will
autodetect if on powerpc and use the APM gpart GEOM class
automaticaly.  At this time support for full disk installation is
the only supported scheme.

Submitted by:	kmoore
Obtained from:	PC-BSD
MFC after:	3 days
Sponsored by:	iXsystems
2012-05-04 15:36:51 +00:00
Josh Paetzel
eb2f2e8930 Use a unique zpool name during install, in the case of having another
PC-BSD / FreeBSD zpool on the system for another install.

Submitted by:	kmoore
Obtained from:	PC-BSD
MFC after:	3 days
Sponsored by:	iXsystems
2012-05-04 15:31:35 +00:00
Michael Tuexen
ff9452e199 Remove debug output.
MFC after: 3 days
2012-05-04 10:26:50 +00:00
Michael Tuexen
7d44bb8b14 Call panic() only under INVARIANTS.
MFC after: 3 days
2012-05-04 10:06:08 +00:00
Michael Tuexen
cd3fd53188 Use SCTP_PRINTF() instead of printf() in all SCTP sources.
MFC after: 3 days
2012-05-04 09:27:00 +00:00
Alexander Motin
86b0366909 Fix bug causing memory corruption and panics with big-endian metadata. 2012-05-04 08:59:19 +00:00
Alexander Motin
4b97ff6137 Implement read-only support for volumes in optimal state (without using
redundancy) for the following RAID levels: RAID4/5E/5EE/6/MDF.
2012-05-04 07:32:57 +00:00
Adrian Chadd
6632cb429f Disable setting the MII port speed.
This seems to break at least my test board here (AR71xx + AR8316 switch
PHY).  Since I do have a whole sleuth of "normal" PHY boards (with
an AR71xx on a normal PHY port), I'll do some further testing with those
to determine whether this is a general issue, or whether it's limited
to the behaviour of the "fake" dedicated PHY port mode on these atheros
switches.
2012-05-04 02:26:15 +00:00
Josh Paetzel
7053a07e66 Fix some issues creating zpool mirror / raidz1(2)(3) devices.
Fix issues stamping boot on other ZFS drives, now you can boot after removing
mirror drive.

Submitted by:	kmoore
Obtained from:	PC-BSD
MFC after:	3 days
Sponsored by:	iXsystems
2012-05-03 21:53:25 +00:00