Commit Graph

210627 Commits

Author SHA1 Message Date
Pedro F. Giffuni
9f915a92c7 ddb: for pointers replace 0 with NULL.
Mostly cosmetical, no functional change.

Found with devel/coccinelle.
2016-04-15 17:27:20 +00:00
Alan Somers
739f4ae3b1 Don't corrupt ZFS label's physpath attribute when booting while a disk is missing
Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach
prior to verifying the device's GUIDs.  vdev_geom_attach calls
vdev_geom_attrchange to set the physpath in the vdev object.  The result is
that if the disk could not be found, then the labels for other disks in the
same TLD would overwrite the missing disk's physpath with the physpath of
whichever disk currently has the same devname as the missing one used to
have.

MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
2016-04-15 16:36:17 +00:00
Pedro F. Giffuni
500ed14d6e compat/linux: for pointers replace 0 with NULL.
plvc is a pointer, no functional change.

Found with devel/coccinelle.
2016-04-15 16:21:13 +00:00
Pedro F. Giffuni
01b5c6f73e g_gate: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.
2016-04-15 16:18:07 +00:00
Pedro F. Giffuni
b85f65af68 kern: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.
2016-04-15 16:10:11 +00:00
Andrew Turner
59c3cb81c1 Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
independent code that needs to know about INTRNG such as PCI drivers.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-04-15 16:05:41 +00:00
Phil Shafer
a321cc5dc9 import libxo-0.4.7
Fix bug w/ {e:} in html, where no default encoding format was built
    docs: "t" == "trim" (typo) (cf svn commit: r290445 - head/contrib/libxo/libxo)

Reviewed by:	sjg
Approved by:	sjg (mentor)
2016-04-15 15:50:13 +00:00
Pedro F. Giffuni
99d628d577 netinet: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by:	ae. tuexen
2016-04-15 15:46:41 +00:00
Stanislav Galabov
915c6043b0 Make NIRQ configurable for MIPS
Submitted by:	kan
Reviewed by:	kan
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5964
2016-04-15 15:44:02 +00:00
Phil Shafer
4fde2bf0a5 Import libxo 0.4.7 2016-04-15 15:42:12 +00:00
Stanislav Galabov
89f8f24077 Import Mediatek/Ralink dtsi patches against OpenWRT dtsi files
This revision suggests dtsi patches to be used with the original OpenWRT
dtsi files so we can re-use what has already been done in OpenWRT for the
Mediatek/Ralink SoCs.

The only thing that is required after importing this revision should be
the following:
1. Import OpenWRT dts/dtsi files into sys/gnu/dts/mips
2. Run the following script in sys/gnu/dts/mips:
for f in `ls [mr]t*.dtsi`; do
printf "\n#include <fbsd-$f>\n" > $f
done

This will apply our dtsi patches to OpenWRT's dtsi files and will allow us
to re-use dts/dtsi files for ~170 Mediatek/Ralink boards.

Currently our drivers are not 100% compatible with OpenWRT's dts files, but
they're compatible enough.
We can add more functionality in the future that would better leverage the
OpenWRT work as well.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5965
2016-04-15 15:36:09 +00:00
Stanislav Galabov
fd868a25a8 Change the fdt_static_dtb.S dependency
fdt_static_dtb.S dependency in sys/conf/files is currently set as:
$S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE}

This is wrong, as what fdt_static_dtb.S actually uses is the DTB file
produced from the FDT_DTS_FILE.
In addition it also makes using DTS files stored in $S/gnu/dts/${MACHINE}/
impossible.

So, change the dependency to "fdt_dtb_file", which seems to be the right
option here anyway.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5963
2016-04-15 15:28:23 +00:00
Stanislav Galabov
1173c20679 Make mx25l compatible with jedec,spi-nor as well
A lot of dts files define the SPI flashes supported by mx25l as
compatible with 'jedec,spi-nor', so we add this to the mx25l
compat_data.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5962
2016-04-15 15:26:31 +00:00
Stanislav Galabov
c1300b5e37 Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitions
This revision gets our Mediatek/Ralink drivers closer to OpenWRT's dts
definitions, so we can reuse them with less modifications later in order
to bring support for a lot of boards at once.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5961
2016-04-15 15:24:42 +00:00
Stanislav Galabov
913b41b84e Remove unneeded initialization in mtk_xhci.c
This is actually initialized properly within xhci.c, so it's better to
not initialize it in mtk_xhci.c

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5935
2016-04-15 15:22:28 +00:00
Stanislav Galabov
3e4b91800a In order to build a kernel with one of these configs the user should do
the following:

1. Give the appropriate board dts file to be used by either:
1.1. edit the SoC kernel config required (e.g., MT7620A_FDT) and include
the required FDT_DTS_FILE makeoption; or
1.2. simply supply FDT_DTS_FILE="xx.dts" on the command line when building
the kernel
Of course, the user can also create a completely new kernel config to
match the desired board and include the SoC kernel config from within
it.

If required, edit the MEDIATEK config file, which includes optional
drivers and comment out the unneeded ones.
2.1. this would only make sense if kernel size is a concern. Even if we
build the kernel with all drivers, if we lzma it and package it as a uImage,
its size is still around 1.1MiB.

The user will have to choose a dts file (or create a new one) from
sys/gnu/dts/mips , where all Mediatek/Ralink dts files will be imported via
a later revision.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5966
2016-04-15 15:20:41 +00:00
Konstantin Belousov
9e297f96d4 Always calculate divisor for the counter mode of LAPIC timer. Even if
initially configured in the TSC deadline mode, eventtimer subsystem
can be switched to periodic, and then DCR register is loaded with
unitialized value.

Reset the LAPIC eventtimer frequency and min/max periods when changing
between deadline and counted periodic modes.

Reported and tested by:	Vladimir Zakharov <zakharov.vv@gmail.com>
Sponsored by:	The FreeBSD Foundation
2016-04-15 14:36:38 +00:00
Pedro F. Giffuni
41b610a8ee arm: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.
2016-04-15 14:30:40 +00:00
Andrew Turner
2049b03cc8 Add a flag field to struct gic_irqsrc and use it to mark when we should
write to the End of Interrupt (EOI) register before handling the interrupt.
This should be a noop as it will be set for all edge triggered interrupts,
however this will not be the case for MSI interrupts. These are also edge
triggered, however we should not write to the EOI register until later in
arm_gic_pre_ithread.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-04-15 14:28:34 +00:00
Pedro F. Giffuni
7b6cea2b01 mips: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by:	adrian
2016-04-15 14:26:24 +00:00
Pedro F. Giffuni
26f0e234f7 powerpc: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by:	jhibbits
2016-04-15 14:25:13 +00:00
Andrew Turner
e2d4ce8aef Add initial GICv2m support to the arm GIC driver. This will be used to
support MSI and MSI-X interrupts, however intrng needs updates before this
can happen.

For now we just attach the driver until the MSI API is ready.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5950
2016-04-15 14:19:25 +00:00
Edward Tomasz Napierala
23e6fff29d Allocate RACCT/RCTL zones without UMA_ZONE_NOFREE; no idea why it was there
in the first place.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-04-15 13:34:59 +00:00
Konstantin Belousov
dfaa65fc8d Sync cam.ko module source list with the static kernel file list.
Sponsored by:	The FreeBSD Foundation
2016-04-15 12:55:40 +00:00
Pedro F. Giffuni
7a6ab8f19e netpfil: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

Reviewed by:	ae
2016-04-15 12:24:01 +00:00
Pedro F. Giffuni
8806325ade sparc64: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.
2016-04-15 12:17:34 +00:00
Pedro F. Giffuni
d4a2eaef39 ofed: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change.

Found with devel/coccinelle.
Reviewed by:	hselasky
2016-04-15 12:16:15 +00:00
Edward Tomasz Napierala
c1a43e73c5 Sort variable declarations.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-04-15 11:55:29 +00:00
Roger Pau Monné
9b44287ce5 busdma/bounce: revert r292255
Revert r292255 because it can create bounced regions without contiguous
page offsets, which is needed for USB devices.

Another solution would be to force bouncing the full buffer always (even
when only one page requires bouncing), but this seems overly complicated and
unnecessary, and it will probably involve using more bounce pages than the
current code.

Reported by: phk
2016-04-15 09:21:50 +00:00
Konstantin Belousov
16952e289f Avoid NULL pointer dereference, for a process which is not (yet) a
member of a process group, e.g. during the system bootstrap.

Submitted by:	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
MFC after:	1 week
2016-04-15 09:13:01 +00:00
Sepherosa Ziehau
8310528673 hyperv/hn: Hide ring to channel linkage message under bootverbose
Suggested by:	Dexuan Cui <decui microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-15 08:17:55 +00:00
Sepherosa Ziehau
5f9b92f865 hyperv: No need to zero out softc
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-15 08:08:46 +00:00
Sepherosa Ziehau
a014f7e1a6 hyperv/stor: Use xpt_done_direct() upon I/O completion
Reviewed by:	mav
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5955
2016-04-15 08:01:07 +00:00
Sepherosa Ziehau
4a060c8407 hyperv/vmbus: Put multi-channel offer logging under bootverbose
Suggested by:	Dexuan Cui <decui microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-15 07:48:41 +00:00
Sepherosa Ziehau
97c4992c89 hyperv/stor: Temporary disable the wrongly done command timeout.
It will be reenabled once the request processing is corrected.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-15 07:39:43 +00:00
Warner Losh
acfc9b6862 Expand CAM_IO_STATS #ifdef to logical unit. 2016-04-15 05:10:39 +00:00
Warner Losh
5ede5b8cb5 Put function only used by CAM_NETFLIX_IOSCHED under that ifdef. 2016-04-15 05:10:32 +00:00
Warner Losh
b93ecd35e7 Out of an abundance of caution treat
* Samsung 843T Series SSDs (MZ7WD*)
 * Samsung PM851 Series SSDs (MZ7TE*)
 * Samsung PM853T Series SSDs (MZ7GE*)
as known having broken NCQ TRIM support as they appear to be based on
the same controller technology as the 840 and 850 series.

I've had at least one report of the PM853 being broken, so err on the
side of caution for the above drives. The PM863/SM863 appears to be
based on a newer controller, so give it the benefit of the doubt.
2016-04-15 05:10:31 +00:00
Warner Losh
a17433653c Add update. 2016-04-15 04:45:37 +00:00
Marcelo Araujo
b916534496 Use NULL instead of 0 for pointers.
fgetln(3) will returns NULL if cannot get a line from a stream.
strsep(3) it will returns NULL if the end of the string was reached.
jemalloc(3) malloc will returns NULL if it cannot allocate memory.
fgetln(3) it will returns NULL if it cannot get a line from a stream.

MFC after:	4 weeks
2016-04-15 04:10:47 +00:00
Marcelo Araujo
71866e627e Use NULL instead of 0 for pointers.
getenv(3) returns NULL if the variable name is not in the current
environment.
getservent(3) returns NULL on EOF or error

MFC after:	4 weeks
2016-04-15 03:50:33 +00:00
Cy Schubert
4bb37cd3af Static pointers need not be initialized.
MFC after:	4 weeks
2016-04-15 03:45:09 +00:00
Cy Schubert
ff34412a50 Use NULL instead of 0 for pointer comparison.
MFC after:	4 weeks
2016-04-15 03:43:16 +00:00
John Baldwin
6cd99ae86d Add a new PCI bus interface method to alloc the ivars (dinfo) for a device.
The ACPI and OFW PCI bus drivers as well as CardBus override this to
allocate the larger ivars to hold additional info beyond the stock PCI ivars.

This removes the need to pass the size to functions like pci_add_iov_child()
and pci_read_device() simplifying IOV and bus rescanning implementations.

As a result of this and earlier changes, the ACPI PCI bus driver no longer
needs its own device_attach and pci_create_iov_child methods but can use
the methods in the stock PCI bus driver instead.

Differential Revision:	https://reviews.freebsd.org/D5891
2016-04-15 03:42:12 +00:00
Marcelo Araujo
2c6167310e Use NULL instead of 0 for pointers.
fopen(3) returns NULL in case it can't open the STREAM.
fgetln(3) returns NULL if it can't get a line from a STREAM.
malloc returns NULL if it can't allocate memory.
2016-04-15 03:38:58 +00:00
Warner Losh
555bb680cc Add FCCT M500 to the NCQ black list. Linux added it in 4.2 (August
2015). Correct the M500 firmware versions. EU07 was the engineering
test version, not the release version with the fix. MU07 is the
release version. It's the only Micron firmware version to actually
work. Remove support for EU07.

This brings the blacklist into parity with the Linux blacklist as of
4.5, except for the Micron M500 MU07 entry. I personally tested the
MU07 firmware on 12 machines running 6 drives each with no corruption
in the past 6 months with Netflix production loads. Prior versions of
the M500 firmware wouldn't last more than a few days.

Sponsored by: Netflix, Inc.
2016-04-15 03:10:04 +00:00
Warner Losh
f3bea265e1 Use the new TUNABLE_INT64 to match the type of sbintime_t. 2016-04-15 03:09:58 +00:00
Warner Losh
15be49f5a1 Create wrappers for uint64_t and int64_t for the tunables. While not
strictly necessary, it is more convenient.
2016-04-15 03:09:55 +00:00
Enji Cooper
abea2d5a7e Set test_argv to NULL, not 0, if not executing a specific test
MFC after: 1 week
Submitted by: pfg
Sponsored by: EMC / Isilon Storage Division
2016-04-15 02:53:52 +00:00
Enji Cooper
da908789ee Fix typos (intenral -> internal) in comments 2016-04-15 02:36:14 +00:00