]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC: r342619, r342626
Toomas Soome [Sun, 13 Jan 2019 07:25:55 +0000 (07:25 +0000)]
MFC: r342619, r342626

loader: create bio_alloc and bio_free for bios bounce buffer

We do have 16KB buffer space defined in pxe.c, move it to bio.c and implement
bio_alloc()/bio_free() interface to make it possible to use this space for
other BIOS calls (notably, from biosdisk.c).

5 years agoi386_parsedev() needs to support fd devices
Toomas Soome [Sun, 13 Jan 2019 07:22:16 +0000 (07:22 +0000)]
i386_parsedev() needs to support fd devices

After introduction of fd device list to BIOS loader, the i386_parsedev()
needs to recognize fd devices.

5 years agoloader.efi: update memmap command to recognize new attributes
Toomas Soome [Sun, 13 Jan 2019 07:19:20 +0000 (07:19 +0000)]
loader.efi: update memmap command to recognize new attributes

Also move memory type to string translation to libefi for later use.

5 years agoWith buggy int13 ah=15, we can mis-identify the floppy devices.
Toomas Soome [Sun, 13 Jan 2019 07:12:50 +0000 (07:12 +0000)]
With buggy int13 ah=15, we can mis-identify the floppy devices.

We have no option than trust INT13 ah=08 return code during the init phase.

PR: 234460
Reported by: Oleh Hushchenkov

5 years agoMFC r342823:
Konstantin Belousov [Sun, 13 Jan 2019 02:36:58 +0000 (02:36 +0000)]
MFC r342823:
Clamp tuklib_physmem() return value to SIZE_T_MAX.

5 years agoMFC r342810:
Andriy Voskoboinyk [Sun, 13 Jan 2019 02:19:01 +0000 (02:19 +0000)]
MFC r342810:
powerd(8): allow to force a method of battery state query

This change allows to determine power source via sysctl or /dev/apm
when devd(8) is running (used by default).

Based on patch from PR; other changes on top of it:
- '-f' (force) -> '-s' (source) parameter renaming;
- allow 'apm' -> 'devd' transition when '-s devd' is set
(if APM is enabled);
- man page update.

PR: 125707
Submitted by: Konstantin Stepanov <milezv@yandex.ru>
Reviewed by: bcr, imp
Differential Revision: https://reviews.freebsd.org/D18742

5 years agoMFC r342787:
Mark Johnston [Sat, 12 Jan 2019 17:00:54 +0000 (17:00 +0000)]
MFC r342787:
Add a bounds check to the tws(4) passthrough ioctl handler.

admbug: 825

5 years agoMFC r342888:
Mark Johnston [Sat, 12 Jan 2019 16:58:32 +0000 (16:58 +0000)]
MFC r342888:
Complete the removal of obsolete ioctl handlers.

PR: 234706

5 years agoMFC r342886
Vincenzo Maffione [Sat, 12 Jan 2019 08:26:58 +0000 (08:26 +0000)]
MFC r342886

netmap: fix bridge example in netmap(4)

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194872
Reported by:    adrian

5 years agonetmap: fix sysctl variable in vale(4)
Vincenzo Maffione [Sat, 12 Jan 2019 08:25:49 +0000 (08:25 +0000)]
netmap: fix sysctl variable in vale(4)

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212333

5 years agoMFC r342784:
Kristof Provost [Sat, 12 Jan 2019 05:38:48 +0000 (05:38 +0000)]
MFC r342784:

pf: Remove references to pflow from the pf.conf man page

pflow no longer exists. It was removed as part of a pf update back in 2012
(r240233).

PR: 223957

5 years agoMFC r342597:
Enji Cooper [Sat, 12 Jan 2019 00:39:42 +0000 (00:39 +0000)]
MFC r342597:

Remove legacy rc.d infrastructure references from rc(8)

Legacy rc.d scripts (.sh extension) have not been supported since
r193118. Remove the outdated references to the legacy format, as they
are no longer valid.

Bug: 193936
Approved by: emaste (earlier version, mentor), jtl (mentor)
Differential Revision: https://reviews.freebsd.org/D18804

5 years agoMFC r342575, r342580: ar: detect and error out on 32-bit symbol table overflow
Ed Maste [Fri, 11 Jan 2019 19:49:19 +0000 (19:49 +0000)]
MFC r342575, r342580: ar: detect and error out on 32-bit symbol table overflow

BSD ar currently does not support the /SYM64/ 64-bit symbol table, and
previously truncated to 32-bits, silently producing corrupted archives
larger than 4GB.

PR: 234454

5 years agoMFC r342525: MFV r342469: 9630 add lzc_rename and lzc_destroy to libzfs_core
Andriy Gapon [Fri, 11 Jan 2019 11:49:35 +0000 (11:49 +0000)]
MFC r342525: MFV r342469: 9630 add lzc_rename and lzc_destroy to libzfs_core

Relnotes: maybe

5 years agoMFC r342541: MFV r342532: 5882 Temporary pool names
Andriy Gapon [Fri, 11 Jan 2019 11:45:30 +0000 (11:45 +0000)]
MFC r342541: MFV r342532: 5882 Temporary pool names

Note that this commit brings only formatting changes that were done
during the final review of the illumos change, because FreeBSD got the
main changes before illumos.

5 years agoMFC r342169: add a knob that disables detection of write protected disks
Andriy Gapon [Fri, 11 Jan 2019 11:42:25 +0000 (11:42 +0000)]
MFC r342169: add a knob that disables detection of write protected disks

PR: 225794

5 years agoMFC r340337:
Emmanuel Vadot [Fri, 11 Jan 2019 05:41:46 +0000 (05:41 +0000)]
MFC r340337:

Update our devicetree to 4.19 for arm and arm64

5 years agoMFC r342768:
Mark Johnston [Fri, 11 Jan 2019 03:50:51 +0000 (03:50 +0000)]
MFC r342768:
Support MSG_DONTWAIT in send*(2).

5 years agoMFC r342769, r342775:
Konstantin Belousov [Fri, 11 Jan 2019 02:08:06 +0000 (02:08 +0000)]
MFC r342769, r342775:
i386: Use atomic 64bit load to read PDE value from PAE pagetables in
pmap_kextract().

5 years agoMFC r342551, r342574:
Konstantin Belousov [Thu, 10 Jan 2019 10:37:19 +0000 (10:37 +0000)]
MFC r342551, r342574:
Bump sys_errlist size to keep ABI backward-compatible for some time.

5 years agoMFC r342737
Vincenzo Maffione [Thu, 10 Jan 2019 08:52:50 +0000 (08:52 +0000)]
MFC r342737

netmap: unit tests: fix issues found by coverity scan

Reported by:    asomers
Sponsored by:   Sunny Valley Networks

5 years agoMFC r342686:
Mark Johnston [Wed, 9 Jan 2019 17:39:15 +0000 (17:39 +0000)]
MFC r342686:
Avoid setting PG_U unconditionally in pmap_enter_quick_locked().

5 years agoMFC r342687:
Mark Johnston [Wed, 9 Jan 2019 17:38:47 +0000 (17:38 +0000)]
MFC r342687:
Use g_handleattr() to reply to GEOM::candelete queries.

5 years agoMFC r342649, r342650
Vincenzo Maffione [Tue, 8 Jan 2019 09:40:09 +0000 (09:40 +0000)]
MFC r342649, r342650

netmap: add suite of unit tests

Import the unit tests from upstream (https://github.com/luigirizzo/netmap
ba02539859d46d33), and make them ready for use with Kyua.
There are currently 38 regression tests, which test the kernel control ABI
exposed by netmap to userspace applications:

  1: test for port info get
  2-5: tests for basic port registration
  6-9: tests for VALE
  10-11: tests for getting netmap allocator info
  12-15: tests for netmap pipes
  16: test on polling mode
  17-18: tests on options
  19-27: tests for sync-kloop subsystem
  28-39: tests for null ports
  31-38: tests for the legacy NIOCREGIF registers

Reviewed by:    ngie
Sponsored by: Sunny Valley Networks
Differential Revision:  https://reviews.freebsd.org/D18490

5 years agoMFC r342113:
Michal Meloun [Mon, 7 Jan 2019 11:03:08 +0000 (11:03 +0000)]
MFC r342113:

  Improve R_AARCH64_TLSDESC relocation.  The original code did not support
  dynamically loaded libraries and used suboptimal access to TLS variables.
  New implementation removes lazy resolving of TLS relocation - due to flaw in
  TLSDESC design is impossible to switch resolver function at runtime without
  expensive locking.

5 years agoMFC r340359:
Xin LI [Mon, 7 Jan 2019 07:12:51 +0000 (07:12 +0000)]
MFC r340359:

Make outfile constant.

5 years agoMFC r341641: Reduce number of DNS queries in mountd.
Sean Eric Fagan [Mon, 7 Jan 2019 05:58:55 +0000 (05:58 +0000)]
MFC r341641: Reduce number of DNS queries in mountd.

Approved by: mav
Sponsored by: iXsystems Inc.

5 years agoMFC r342703:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:31:40 +0000 (05:31 +0000)]
MFC r342703:
rtwn_usb(4): add USB id for TP-LINK TL-WN821N v5.

It is already mentioned in manpage, but was missing from the driver.

5 years agoMFC r342702:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:28:00 +0000 (05:28 +0000)]
MFC r342702:
rtwn(4): refresh manpages.

- Add 'device rtwn' to rtwn_pci(4) and rtwn_usb(4) config sample;
kernel will not compile otherwise.
- Refresh devices list in rtwn_usb(4); add 'chipset' column.
- Bump Dd after this commit and r342835.

MFC r342714:
rtwnfw(4): refresh this manpage too (add rtwn-rtl8188eefw module).

5 years agoMFC r342684:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:20:24 +0000 (05:20 +0000)]
MFC r342684:
Refresh sys/conf/files after recent rtwn(4) update.

5 years agoMFC r342759:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:17:34 +0000 (05:17 +0000)]
MFC r342759:
rtwn_pci(4): sync r88ee_power_on() with OpenBSD

Submitted by: Farhan Khan <khanzf@gmail.com>
Differential Revision: https://reviews.freebsd.org/D18727

5 years agoMFC r342682:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:58:10 +0000 (04:58 +0000)]
MFC r342682:
rtwn_pci(4): add support for RTL8188EE chipset.

Initially based on https://reviews.freebsd.org/D15692;
later deduplicated and improved a bit (Tx reports, IQ calibration support).

Submitted by: Farhan Khan <khanzf@gmail.com>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D15692

5 years agoMFC r342681:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:41:50 +0000 (04:41 +0000)]
MFC r342681:
rtwn(4): rename set_name -> set_rom_opts method and reuse it for RTL8188E*

5 years agoMFC r342680:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:38:50 +0000 (04:38 +0000)]
MFC r342680:
rtwn(4): rename common RTL8188E* structures.

No functional change intended.

5 years agoMFC r342679:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:34:15 +0000 (04:34 +0000)]
MFC r342679:
rtwn(4): do not try to start RTL8188E* MCU during device shutdown.

5 years agoMFC r342678:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:31:41 +0000 (04:31 +0000)]
MFC r342678:
Move USB-specific parts from rtwn(4) to rtwn_usb(4)

5 years agoMFC r342677:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:23:06 +0000 (04:23 +0000)]
MFC r342677:
rtwn_pci(4): add support for event-based Tx reports.

It will be used for RTL8188EE (and, probably, others).

MFC r342700:
rtwn_pci(4): fix panic with INVARIANTS (due to inverted assertion logic)

5 years agoMFC r342674:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:10:54 +0000 (04:10 +0000)]
MFC r342674:
rtwn(4): add IQ calibration support for RTL8188E*

MFC r342675:
rtwn(4): drop obsolete comment + use 'nop' function for 92eu calibration

RTL8192EU was not tested with previously added code.

5 years agoMFC r342673:
Andriy Voskoboinyk [Mon, 7 Jan 2019 03:47:28 +0000 (03:47 +0000)]
MFC r342673:
rtwn(4): provide register definitions for RTL8188CE calibration routines.

No functional change intended.

5 years agoMFC r342672:
Andriy Voskoboinyk [Mon, 7 Jan 2019 03:36:33 +0000 (03:36 +0000)]
MFC r342672:
rtwn_pci: fix excessive packet loss on Tx with RTL8188EE.

Use proper flags for bus_dmamap_sync() in Tx path.

MFC r342676:
rtwn_pci(4): use proper bus_dmamap_sync flags after Tx.

5 years agoMFC r342767:
Konstantin Belousov [Mon, 7 Jan 2019 00:29:02 +0000 (00:29 +0000)]
MFC r342767:
x86: Report per-cpu IPI TLB shootdown generation in ddb 'show pcpu' output.

5 years agoMFC of 342135 and 342290
Kirk McKusick [Sun, 6 Jan 2019 22:48:56 +0000 (22:48 +0000)]
MFC of 342135 and 342290

Properly respond to error from VFS_ROOT() during mount.

Sponsored by: Netflix

5 years agoMFC of 342548
Kirk McKusick [Sun, 6 Jan 2019 22:30:27 +0000 (22:30 +0000)]
MFC of 342548

When loading an inode from disk, verify that its mode is valid.
Sponsored by: Netflix

5 years agoMFC r342362-r342363: config(8) duplicate option handling
Kyle Evans [Sun, 6 Jan 2019 02:12:55 +0000 (02:12 +0000)]
MFC r342362-r342363: config(8) duplicate option handling

r342362:
config(8): Allow duplicate options to be specified

config(8)'s option handling has been written to allow duplicate options; if
the value changes, then the latest value is used and an informative message
is printed to stderr like so:

/usr/src/sys/amd64/conf/TEST: option "VERBOSE_SYSINIT" redefined from 0 to 1

Currently, this is only a possibility for cpu types, MAXUSERS, and
MACHINE_ARCH. Anything else duplicated in a config file will use the first
value set and error about duplicated options on subsequent appearances,
which is arguably unfriendly since one could specify:

include GENERIC
nooptions VERBOSE_SYSINIT
options VERBOSE_SYSINIT

to redefine the value later anyways.

Reported by: mmacy

r342363:
config(8): Remove all instances of an option when opting out

Quick follow-up to r342362: options can appear multiple times now, so
clean up all of them as needed. For non-OPTIONS options, this has no effect
since they're already de-duplicated.

5 years agoMFC r342628, r342670 (by cem):
Konstantin Belousov [Sun, 6 Jan 2019 00:52:53 +0000 (00:52 +0000)]
MFC r342628, r342670 (by cem):
Fix linux_destroy_dev() behaviour when there are still files open from
the destroying cdev.

Also bump __FreeBSD_version since struct linux_cdev size on i386 increased
(this is unmergeable r342629 on HEAD).

5 years agoMFC r342627:
Konstantin Belousov [Sun, 6 Jan 2019 00:45:41 +0000 (00:45 +0000)]
MFC r342627:
Implement zap_vma_ptes() for managed device objects.

5 years agoMFC r342625, r342631:
Konstantin Belousov [Sun, 6 Jan 2019 00:44:32 +0000 (00:44 +0000)]
MFC r342625, r342631:
Use IDX_TO_OFF().

5 years agoMFC r342739:
Konstantin Belousov [Sun, 6 Jan 2019 00:40:31 +0000 (00:40 +0000)]
MFC r342739:
Fix typo in r342710.

5 years agoMFC r342630:
Konstantin Belousov [Sun, 6 Jan 2019 00:37:14 +0000 (00:37 +0000)]
MFC r342630:
Add 'v' modifier to the ddb 'show pginfo' command to display vm_page
backing the provided kernel virtual address.

5 years agoMFC r342711:
Konstantin Belousov [Sun, 6 Jan 2019 00:34:43 +0000 (00:34 +0000)]
MFC r342711:
Fix typo, use boolean operator instead of bit-wise.

5 years agoMFC r342605:
Cy Schubert [Sun, 6 Jan 2019 00:32:14 +0000 (00:32 +0000)]
MFC r342605:

TCP_PAWS_IDLE is does not exist in NetBSD and illumos. In FreeBSD
TCP_PAWS_IDLE is defined in netinet/tcp_seq.h, however this header
isn't included explicitly or implicitly at this point therefore
as far ipfilter is concerned TCP_PAWS_IDLE is not defined. Remove
the #ifdef and include netinet/tcp.h unconditionally.

5 years agoMFC r342688:
Mark Johnston [Sat, 5 Jan 2019 15:09:50 +0000 (15:09 +0000)]
MFC r342688:
Typo.

5 years agoMFC r341101-r341103, r341148, r341391, r341422-r341423, r341454, r341780-r341781...
Justin Hibbits [Sat, 5 Jan 2019 05:20:36 +0000 (05:20 +0000)]
MFC r341101-r341103, r341148, r341391, r341422-r341423, r341454, r341780-r341781, r341805, r342026

Make powerpc booke kernels boot from ubldr.

r341101: powerpcspe: Don't crash the loader on ubldr with SPE instructions.
r341102: powerpc: Prepare Book-E kernels for KERNBASE != run base
r341103: powerpc: Fix the powerpc64 build post-r341102
r341148: powerpc: Don't include KERNBASE in genassym, it's unnecessary
r341391: ubldr: Force 'usefdt' variable to 1 for powerpc
r341422: powerpc/booke: Check for the metadata address by physical address
r341423: powerpc: Check for a fdt in the metadata if it doesn't already exist
r341454: powerpc: preload_addr_relocate is no longer necessary for booke
r341780: powerpc/ubldr: Teach powerpc's ubldr to boot 64-bit kernels
r341781: powerpc/booke: Replace a logical equivalent of pmap_kextract() with a
         real call
r341805: powerpc/booke: Don't get and use the load offset for TOC on APs
r342026: powerpc/booke: Change KERNBASE to be physical load address

5 years agoMFC r341751-r341752, r342025, r342107
Justin Hibbits [Sat, 5 Jan 2019 04:43:22 +0000 (04:43 +0000)]
MFC r341751-r341752, r342025, r342107

r341751:
powerpc/SPE: Reload vector registers after efdabs/efdnabs/efdneg

r341752:
powerpc/SPE: Copy lower part of source register to target for
efdabs/efdnabs/efdneg

r342025:
powerpcspe: Fix GPR handling in SPE exception handler

r342107:
powerpcspe: Don't require FPU_EMU for powerpcspe IEEE emulation

5 years agoMFC r342595:
Konstantin Belousov [Sat, 5 Jan 2019 00:38:22 +0000 (00:38 +0000)]
MFC r342595:
For hw.{physmem,realmem,usermem} MIBs, clamp instead of truncating.

5 years agoMFC r342046: nda(4) fix check for Dataset Management support
Chuck Tuffli [Fri, 4 Jan 2019 21:05:40 +0000 (21:05 +0000)]
MFC r342046: nda(4) fix check for Dataset Management support

Reported by: yuripv@yuripv.net
Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D18746

5 years agoMFC r342218:
David Bright [Fri, 4 Jan 2019 02:50:55 +0000 (02:50 +0000)]
MFC r342218:

asmc: Add support for MacPro1,1

PR: 203431
Submitted by: jjr@alisa.org & holindho@saunalahti.fi
Reported by: jjr@alisa.org

5 years agoMFC r342171:
David Bright [Fri, 4 Jan 2019 02:21:00 +0000 (02:21 +0000)]
MFC r342171:

asmc: Add support for mid-2011 Macmini 5,2

PR: 225911
Submitted by: trev <fbsdbugs4@sentry.org>
Reported by: trev <fbsdbugs4@sentry.org>

5 years agoMFC 340022: Add support for port unit wiring to cxgbe(4).
John Baldwin [Fri, 4 Jan 2019 01:19:23 +0000 (01:19 +0000)]
MFC 340022: Add support for port unit wiring to cxgbe(4).

- Add a bus_child_location_str method to the nexus drivers that prints
  out 'port=N' as the location string exported via devinfo and the
  '%location' sysctl node.

- We can't use a bus_hint_device_unit to wire the unit numbers of
  devices with a fixed devclass as the device gets assigned a unit in
  make_device() before the device creator can set softc, etc.
  Instead, when adding a child device, use a helper function much like
  a bus_hint_device_unit method to look for wiring hints or to return
  -1 to let the system choose a unit number.  This function requires
  an "at" hint for the port pointing to the nexus device and a "port"
  hint listing the port number.  For example:

hint.cxl.4.at="t5nex0"
hint.cxl.4.port="0"

  wires cxl4 to the first port on the t5nex0 adapter.

5 years agoMFC 340021: Assert that reclaim_tx_descs() is always making forward progress.
John Baldwin [Fri, 4 Jan 2019 00:06:30 +0000 (00:06 +0000)]
MFC 340021: Assert that reclaim_tx_descs() is always making forward progress.

5 years agoMFC 340018: Compile cryptocheck with in-tree openssl again.
John Baldwin [Thu, 3 Jan 2019 22:51:14 +0000 (22:51 +0000)]
MFC 340018: Compile cryptocheck with in-tree openssl again.

5 years agoMFC 339890: Add support for "plain" (non-HMAC) SHA digests.
John Baldwin [Thu, 3 Jan 2019 22:48:59 +0000 (22:48 +0000)]
MFC 339890: Add support for "plain" (non-HMAC) SHA digests.

5 years agoMFC 339666: Support the SHA224 HMAC algorithm in ccr(4).
John Baldwin [Thu, 3 Jan 2019 22:42:16 +0000 (22:42 +0000)]
MFC 339666: Support the SHA224 HMAC algorithm in ccr(4).

5 years agoMFC 339665: Add sha224 to the authctx union.
John Baldwin [Thu, 3 Jan 2019 22:32:12 +0000 (22:32 +0000)]
MFC 339665: Add sha224 to the authctx union.

5 years agoMFC r340722-r340723, r342466: bectl(8)/libbe(3) fixes
Kyle Evans [Thu, 3 Jan 2019 18:30:36 +0000 (18:30 +0000)]
MFC r340722-r340723, r342466: bectl(8)/libbe(3) fixes

r340722 (0mp): libbe(3): Put each error value in separate line.

As requested by a TODO in the source code.

r340723 (0mp): Cross-reference libbe(3) and bectl(8).

Those two manual pages are already referencing each other in the HISTORY
sections, which people might skip. Mention those manual pages explicitly in
the SEE ALSO sections.  Also, remove a reference to be(1) from libbe(3).

r342466: bectl: use jail id as the default jail name for a boot environment

By default, bectl is setting the jail 'name' parameter to the boot
environment name, which causes an error when the boot environment name is
not a valid jail name. With the attached fix, when no name is supplied, the
default jail name will be the jail id - this is is the same behavior as the
jail command.

Additionally, this commit addresses two other bugs that prevented unjailing
in scenarios where the jail name does not match the boot environment name:

1. In 'bectl_locate_jail', 'mountpoint' is used to resolve the boot
  environment path, but really 'mounted' should be used. 'mountpoint' is the
  path where the zfs dataset will be mounted. 'mounted' is the path where
  the dataset is actually mounted.

2. in 'bectl_search_jail_paths', 'jail_getv' would fail after the first
  call. Which is fine, if the boot environment you're unjailing is the next
  one up. According to 'man jail_getv', it's expecting name and value
  strings. 'jail_getv' is being passed an integer for the lastjid, so amend
  that to use a string instead.

Test cases have been amended to reflect the bugs found.

PR: 233637

5 years agoMFC r342549:
Hans Petter Selasky [Thu, 3 Jan 2019 09:26:45 +0000 (09:26 +0000)]
MFC r342549:
Add USB quirk for SPL Crimson Rev 1.

PR: 234380
Sponsored by: Mellanox Technologies

5 years agoMFC r342456:
Hans Petter Selasky [Thu, 3 Jan 2019 09:23:35 +0000 (09:23 +0000)]
MFC r342456:
Fix reading of USB sample rate descriptor for SPL Crimson Rev 1.

Read first one entry, then try to read the full rate descriptor table.

PR: 234380
Sponsored by: Mellanox Technologies

5 years agoMFC r342537-r342540
Kashyap D Desai [Thu, 3 Jan 2019 08:03:43 +0000 (08:03 +0000)]
MFC r342537-r342540

r342537

This patch will add support for latest generation MegaRAID adapters- Aero(39xx).
Driver will throw a warning message when a Configurable secure type controller is
encountered.

r342538

This patch will add support for 32 bit atomic request descriptor for Aero adapters.

For Aero adapters-
1. Driver will use 32 bit atomic descriptor to fire IOs and DCMDs.
2. Driver will use 64 bit request descriptor to fire IOC INIT.
3. If Aero firmware supports 32 bit atomic descriptor, then only driver will use it
otherwise driver will use 64 bit request descriptor.

For rest of adapters(Ventura, Invader and Thunderbolt), driver will use 64 bit request
descriptors only.

r342539

Problem statement:
Due to hardware errata in Aero controllers, reads to certain
fusion registers could intermittently return all zeroes.
This behavior is transient in nature and subsequent reads will return
valid value.

Fix:
For Aero controllers, any read will retry the read operations
from certain registers for maximum three times, if read returns zero.

r342540

Driver version upgrade.

5 years agoCompilation failure on ppc and mips due to Revision 342066.
Kashyap D Desai [Thu, 3 Jan 2019 07:56:19 +0000 (07:56 +0000)]
Compilation failure on ppc and mips due to Revision 342066.
Adding extra memset on chain frame.

5 years agoMFC r342059-r342069
Kashyap D Desai [Thu, 3 Jan 2019 07:42:32 +0000 (07:42 +0000)]
MFC r342059-r342069

r342059
This patch will add support for next generation(SAS3.5) of Tri mode(SAS, SATA, NVMe)
MegaRAID adapters.

r342060
This patch will add support for new Dynamic RaidMap to have different sizes
for different number of supported VDs for SAS3.5 MegaRAID adapters.

r342061
This patch will add support for divert bitmap in RAID map. Divert bitmap is supported for
SAS3.5 adapters only.

r342062
This patch will add new interface to support more than 256 JBODs.

r342063
Detect sequential Write IOs and pass the hint that it is part of sequential
stream to help HBA Firmware do the Full Stripe Writes. For read IOs on
certain RAID volumes like Read Ahead volumes,this will help driver to
send it to Firmware even if the IOs can potentially be sent to
hardware directly (called fast path) bypassing firmware.

Design: 8 streams are maintained per RAID volume as per the combined
firmware/driver design. When there is no stream detected the LRU stream
is used for next potential stream and LRU/MRU map is updated to make this
as MRU stream. Every time a stream is detected the MRU map
is updated to make the current stream as MRU stream.

r342064
To improve RAID 1/10 Write performance, OS drivers need to issue the
required Write IOs as Fast Path IOs (after the appropriate checks
allowing Fast Path to be used) to the appropriate physical drives
(translated from the OS logical IO) and wait for all Write IOs to complete.

Design: A write IO on RAID volume will be examined if it can be sent in
Fast Path based on IO size and starting LBA and ending LBA falling on to
a Physical Drive boundary. If the underlying RAID volume is a RAID 1/10,
driver issues two fast path write IOs one for each corresponding physical
drive after computing the corresponding start LBA for each physical drive.
Both write IOs will have the same payload and are posted to HW such that
replies land in the same reply queue.

If there are no resources available for sending two IOs, driver will send
the original IO from upper layer to RAID volume through the Firmware.

When both IOs are completed by HW, the resources will be released
and SCSI IO completion handler will be called.

r342065
This patch will add support for new DCMD to get PD information and a single data structure
to specify LD and JBOD.

r342066
This patch will add support for NVME PRPs creation by driver for fastpath
capable IOs. NVME specification supports specific type of scatter gather list
called as PRP (Physical Region Page) for IO data buffers. Since NVME drive is
connected behind SAS3.5 tri-mode adapter, MegaRAID driver/firmware has to convert
OS SGLs in native NVMe PRP format. For IOs sent to firmware, MegaRAID firmware
does this job of OS SGLs to PRP translation and send PRPs to backend NVME device.
For fastpath IOs, driver will do this OS SGLs to PRP translation.

r342067
Change IOC INIT wait time to 180 secs to keep it inline with timeout
used by internal DCMDs.

r342068
This patch will increase debug level as current logging level has
very minimal prints and even few important messages will not get logged.

r342069
Driver version upgrade 07.708.02.00-fbsd

5 years agoMFC r342604:
Andriy Voskoboinyk [Thu, 3 Jan 2019 02:59:12 +0000 (02:59 +0000)]
MFC r342604:
net80211: fix duplicate sequence number bump for non-AMPDU QoS frames.

This should be a part of r312972.

5 years agoMFC 339899: Make battery emptying rate available as sysctl variable.
John Baldwin [Thu, 3 Jan 2019 01:39:22 +0000 (01:39 +0000)]
MFC 339899: Make battery emptying rate available as sysctl variable.

Curiously, the in-kernel routines always use the design voltage to
convert from mA to mW, but acpiconf in userland uses the current
voltage.  As a result, this can report a different mW rate than
acpiconf.

5 years agoMFC r342653, r342654:
Konstantin Belousov [Thu, 3 Jan 2019 00:36:33 +0000 (00:36 +0000)]
MFC r342653, r342654:
Update comments: paging is initialized in pmap_cold().

5 years agoMFC 339894: Teach procstat -x about the AT_EHDRFLAGS ELF auxiliary vector.
John Baldwin [Wed, 2 Jan 2019 23:57:37 +0000 (23:57 +0000)]
MFC 339894: Teach procstat -x about the AT_EHDRFLAGS ELF auxiliary vector.

5 years agoMFC 341802: Validate the string size parameter passed to -s.
John Baldwin [Wed, 2 Jan 2019 20:49:41 +0000 (20:49 +0000)]
MFC 341802: Validate the string size parameter passed to -s.

Use strtonum() to reject negative sizes instead of core dumping.

PR: 232206

5 years agoMFC 339620: Add a "live" mode to ktrdump.
John Baldwin [Wed, 2 Jan 2019 19:46:01 +0000 (19:46 +0000)]
MFC 339620: Add a "live" mode to ktrdump.

Support a "live" mode in ktrdump enabled via the -l flag.  In this
mode, ktrdump polls the kernel's trace buffer periodically (currently
hardcoded as a 50 millisecond interval) and dumps any newly added
entries.  Fancier logic for the timeout (e.g. a command line option or
some kind of backoff based on the time since the last entry) can be
added later as the need arises.

While here, fix some bugs from when this was Capsicum-ized:
- Use caph_limit_stream() for the output stream so that isatty() works
  and the output can be line-buffered (especially useful for live
  mode).
- Use caph_limit_stderr() to permit error messages to be displayed if
  an error occurs after cap_enter().

5 years agoMFC 341800: Don't report stale signal information in ptrace_lwpinfo.
John Baldwin [Wed, 2 Jan 2019 19:11:49 +0000 (19:11 +0000)]
MFC 341800: Don't report stale signal information in ptrace_lwpinfo.

Once a signal's siginfo was copied to 'td_si' as part of the signal
exchange in issignal(), it was never cleared.  This caused future
thread events that are reported as SIGTRAP events without signal
information to report the stale siginfo in 'td_si'.  For example, if a
debugger created a new process and used SIGSTOP to stop it after
PT_ATTACH, future system call entry / exit events would set PL_FLAG_SI
with the SIGSTOP siginfo in pl_siginfo.  This broke 'catch syscall' in
current versions of gdb as it assumed PL_FLAG_SI with SIGTRAP
indicates a breakpoint or single step trap.

5 years agoMFC r342221:
Mark Johnston [Wed, 2 Jan 2019 16:42:07 +0000 (16:42 +0000)]
MFC r342221:
Implement cpu_halt() for RISC-V.

5 years agoMFC r342223:
Mark Johnston [Wed, 2 Jan 2019 16:41:39 +0000 (16:41 +0000)]
MFC r342223:
Replace uses of sbadaddr with stval.

5 years agoMFC r342093:
Mark Johnston [Wed, 2 Jan 2019 16:40:54 +0000 (16:40 +0000)]
MFC r342093:
Clean up the riscv pmap_bootstrap() implementation.

PR: 231515

5 years agoMFC r342097:
Mark Johnston [Wed, 2 Jan 2019 16:36:46 +0000 (16:36 +0000)]
MFC r342097:
Add a QEMU config for RISC-V.

5 years agoMFC r342099:
Mark Johnston [Wed, 2 Jan 2019 16:34:36 +0000 (16:34 +0000)]
MFC r342099:
Avoid needless TLB invalidations in pmap_remove_pages().

5 years agoMFC r342100:
Mark Johnston [Wed, 2 Jan 2019 16:33:49 +0000 (16:33 +0000)]
MFC r342100:
Add some more checking to the RISC-V page fault handler.

5 years agoMFC r342098:
Mark Johnston [Wed, 2 Jan 2019 16:33:17 +0000 (16:33 +0000)]
MFC r342098:
Assume that pmap_l1() will return a PTE.

5 years agoMFC r342182:
Mark Johnston [Wed, 2 Jan 2019 16:11:02 +0000 (16:11 +0000)]
MFC r342182:
Remove UMS support code from radeonkms.

5 years agoMFC r342596:
Cy Schubert [Wed, 2 Jan 2019 15:13:08 +0000 (15:13 +0000)]
MFC r342596:

Remove duplicate include of sys/mbuf.h.

Reported by: Trond Endrest <Trond.Endrestol@ximalas.info>

5 years agoMFC r341438:
Toomas Soome [Wed, 2 Jan 2019 07:30:27 +0000 (07:30 +0000)]
MFC r341438:
zfs: we can boot from dataset with large_dnode enabled

loader has been supporting large_dnode for some time, no need to block the
feature for boot dataset.

Relnotes: yes

5 years agoMFC r342613: Import tzdata 2018h
Philip Paeps [Tue, 1 Jan 2019 10:04:49 +0000 (10:04 +0000)]
MFC r342613: Import tzdata 2018h
MFC r342644: Import tzdata 2018i

5 years agoMFC r342661: Happy New Year 2019!
Xin LI [Tue, 1 Jan 2019 00:35:26 +0000 (00:35 +0000)]
MFC r342661: Happy New Year 2019!

5 years agoMFC r342594:
Konstantin Belousov [Tue, 1 Jan 2019 00:28:00 +0000 (00:28 +0000)]
MFC r342594:
i386: Fix allocation of the KVA frame for pmap_quick_enter_page().

5 years agoMFC 340460: Convert the number of MSI IRQs on x86 from a constant to a tunable.
John Baldwin [Mon, 31 Dec 2018 22:09:08 +0000 (22:09 +0000)]
MFC 340460: Convert the number of MSI IRQs on x86 from a constant to a tunable.

The number of MSI IRQs still defaults to 512, but it can now be
changed at boot time via the machdep.num_msi_irqs tunable.

Relnotes: yes

5 years agoMFC 340465: Use sbsndptr_adv() instead of sbsndptr() for TOE TLS.
John Baldwin [Mon, 31 Dec 2018 21:55:12 +0000 (21:55 +0000)]
MFC 340465: Use sbsndptr_adv() instead of sbsndptr() for TOE TLS.

For TOE TLS, we just want to advance the send pointer to skip over the
record just sent to the TOE.  The recently added sbsndptr_adv() is
sufficient for that and is cheaper.

5 years agoMFC r342368, r342369
Vincenzo Maffione [Mon, 31 Dec 2018 10:59:30 +0000 (10:59 +0000)]
MFC r342368, r342369

netmap: fix bug in netmap_poll() optimization

The bug was introduced by r339639, although it is present in the upstream
netmap code since 2015. It is due to resetting the want_rx variable to
POLLIN, rather than resetting it to POLLIN|POLLRDNORM.
It only affects select(), which uses POLLRDNORM. poll() is not affected,
because it uses POLLIN.
Also, it only affects FreeBSD, because Linux skips the optimization
implemented by the piece of code where the bug occurs.
To check if txsync can be skipped, it is necessary to look for
unseen TX space. However, this means comparing ring->cur
against ring->tail, rather than ring->head against ring->tail
(like nm_ring_empty() does).

Sponsored by: Sunny Valley Networks

5 years agoMFC r342385:
Cy Schubert [Mon, 31 Dec 2018 03:53:33 +0000 (03:53 +0000)]
MFC r342385:

Remove an empty #if block.

The interesting thing is that looking through Darren's commit logs,
the line containing an extern ppsratecheck() definition was removed
from the v5-1-RELEASE branch but not from HEAD (I have taken his
CVS tree and converted it to GIT). There is a commit adding an
additional #if defined to the empty block. I can only assume that
this was intentional for something later. Looking through HEAD the
extern ppsratecheck() is there. However if we put it back it would
conflict with a static ppsratecheck() definition in fil.c when
building ipftest.

Therefore we remove this empty block.

ppsratecheck() is a function in the FreeBSD kernel. However ipftest
cannot call the ppsratecheck() in the kernel. Therefore one exists in
fil.c for use when building the userland ipftest utility which
approximates the packet filter in userland for testing of ipfilter
rules against packets captured with tcpdump.

5 years agoMFC r342382:
Konstantin Belousov [Sun, 30 Dec 2018 15:22:26 +0000 (15:22 +0000)]
MFC r342382:
nvdimm SPA geom: Update bio fields needed for devstat_end_transaction_bio().

5 years agoMFC r342381:
Konstantin Belousov [Sun, 30 Dec 2018 15:17:57 +0000 (15:17 +0000)]
MFC r342381:
Allocate v_object for the new snapshot vnode.

5 years agoMFC r342380:
Konstantin Belousov [Sun, 30 Dec 2018 15:17:00 +0000 (15:17 +0000)]
MFC r342380:
Properly test for vmio buffer in bnoreuselist().

5 years agoMFC r342151, r342161:
Toomas Soome [Sun, 30 Dec 2018 09:13:38 +0000 (09:13 +0000)]
MFC r342151, r342161:
loader: zfs reader should not probe partitionless disks

First of all, normal setups can not boot such pools as the tools
do not support installing boot programs.

Secondly, for proper pool configuration detection, we need to checks all
four label copies on disk, 2 from front and 2 from the end of the disk,
but zfs label does not contain the size of the disk - so we depend on
firmware to report the correct disk size or use information from the
partition table.

Without partition table, we only can rely on firmware to report and support
disk IO properly.

Relnotes: yes

5 years agoMFC r341329:
Toomas Soome [Sun, 30 Dec 2018 09:05:02 +0000 (09:05 +0000)]
MFC r341329:
loader.efi: fix EFI getchar() for multiple consoles

This fix is ported from illumos (issue #9970), the analysis and initial
implementation was done by John Levon.

See also: https://www.illumos.org/issues/9970

Currently, efi_cons_getchar() will wait for a key. While this seems to make
sense, the implementation of getchar() in common/console.c will loop across
getchar() for all consoles without doing ischar() first.

This means that if we've configured multiple consoles, we can't input into
the serial, as getchar() will be sat waiting for input only from efi_console.c

This patch does implement a bit more generic key buffer to support
translation of input keys, and we use generic efi_readkey() to reduce
duplication from calls from getchar() and poll().

Relnotes: yes

5 years agoMFC r341328:
Toomas Soome [Sun, 30 Dec 2018 08:58:31 +0000 (08:58 +0000)]
MFC r341328:
loader: create separate lists for fd, cd and hd, merge bioscd with biosdisk

Create unified block IO implementation in BIOS version, like it is done in UEFI
side. Implement fd, disk and cd device lists, this will split floppy devices
from disks and will allow us to have consistent, predictable device naming
(modulo BIOS issues).

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D17888