MFC r323824
1. ql_hw.c:
In ql_hw_send() return EINVAL when TSO framelength exceeds max
supported length by HW.(davidcs)
2. ql_os.c:
In qla_send() call bus_dmamap_unload before freeing mbuf or
recreating dmmamap.(davidcs)
In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING
Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing
mbuf.
marius [Fri, 22 Sep 2017 04:57:42 +0000 (04:57 +0000)]
- Akin r302691 in head, synchronize the build stripping for the disc1
image with that of the bootonly image (but similarly modulo games
and groff(1)) as the amd64 disc1 image is overflowing. This also
removes the defunct WITHOUT_ATF.
- Remove the misspelled WITHOUT_INSTALLIB (also in place with correct
spelling, i. e. WITHOUT_INSTALLLIB) from the bootonly image build
stripping.
This is a direct commit to stable/10 as the corresponding knobs have
different names in head and counterparts to e. g. MK_DEBUG_FILES and
MK_TESTS default to off in stable/10 in the first place.
marius [Thu, 21 Sep 2017 19:30:32 +0000 (19:30 +0000)]
MFC: r285215
remove _NORMAL flag which isn't suppose to be used w/ _alloc_ctx...
MFC: r285289
address an issue where consumers, like IPsec, can reuse the same
session in multiple threads w/o locking.. There was a single fpu
context shared per session, if multiple threads were using the session,
and both migrated away, they could corrupt each other's fpu context...
MFC: r285297
upon further examination, it turns out that _unregister_all already
provides the guarantee that no threads will be in the _newsession code..
marius [Wed, 20 Sep 2017 21:22:20 +0000 (21:22 +0000)]
Unbreak netmap(4) support in ixgbe(4) after r315333:
- Both ixgbe_netmap.c and ixv_netmap.c assumed a netmap(4) driver
newer than what's actually in stable/10.
- Additionally, at the bottom line ixv_netmap.c did exactly the same
as ixgbe_netmap.c, i. e. used IXGBE_TDH() as appropriate for PFs
only instead of IXGBE_VFTDH() and tried to configure CRC stripping
although the corresponding registers aren't available to VFs in the
first place.
With these changes, the netmap(4) support in ixgbe(4) is in line
again with the code in sys/dev/netmap/ixgbe_netmap.h as of r295008.
Breakage reported by: Slawa Olhovchenkov
Just like r315333 that never existed in head, this is a direct commit
to stable/10. However, ixgbe(4) in head has a related bug in that it
assumes a netmap(4) driver API older than what's in head and also
does the wrong things for VFs as it uses the PF-only ixgbe_netmap.c
for both PFs and VFs in the first place.
MFC 322270: Fix a NULL pointer dereference in mly_user_command().
If mly_user_command fails to allocate a command slot it jumps to an 'out'
label used for error handling. The error handling code checks for a data
buffer in 'mc->mc_data' to free before checking if 'mc' is NULL. Fix by
just returning directly if we fail to allocate a command and only using
the 'out' label for subsequent errors when there is actual cleanup to
perform.
MFC r323812:
Bootstrap etcupdate(8) and mergemaster(8) databases when creating
virtual machine images and embedded images, similar to what is
done when extracting base.txz to the target root filesystem in
a new installation.
Approved by: re (marius, insta-MFC)
Sponsored by: The FreeBSD Foundation
https://www.illumos.org/issues/8491
The zpool checkpoint feature in DxOS added a new field in the uberblock.
The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the
uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279).
As these two changes come from two different sources and once upstreamed and
deployed will introduce an incompatibility with each other we want
to upstream a change that will reserve the padding for both of them so
integration goes smoothly and everyone gets both features.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Olaf Faaland <faaland1@llnl.gov>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
https://www.illumos.org/issues/8377
The problem is that when dsl_bookmark_destroy_check() is executed from open
context (the pre-check), it fills in dbda_success based on the existence of the
bookmark.
But the bookmark (or containing filesystem as in this case) can be destroyed
before we get to syncing context. When we re-run dsl_bookmark_destroy_check()
in syncing
context, it will not add the deleted bookmark to dbda_success, intending for
dsl_bookmark_destroy_sync() to not process it. But because the bookmark is
still in dbda_success
from the open-context call, we do try to destroy it.
The fix is that dsl_bookmark_destroy_check() should not modify dbda_success
when called from open context.
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
The upstream change was made before we started to import upstream commits
individually. It was imported into the illumos vendor area as r242733.
That commit was MFV-ed in r260138, but as the commit message says
vdev_file.c was left intact.
This commit actually implements the parallel I/O for vdev_file using a
taskqueue with multiple thread. This implementation does not depend on
the illumos or FreeBSD bio interface at all, but uses zio_t to pass
around all the relevent data. So, the code looks a bit different from
the upstream.
This commit also incorporates ZoL commit
zfsonlinux/zfs/bc25c9325b0e5ced897b9820dad239539d561ec9 that fixed
https://github.com/zfsonlinux/zfs/issues/2270
We need to use a dedicated taskqueue for exactly the same reason as ZoL
as we do not implement TASKQ_DYNAMIC.
MFC r320151: remove bogus declaration of malloc from tcp_wrappers
The declaration was already inactive when INET6 was enabled
and it causes a build error in the other case because of
a conflict with the correct definition in stdlib.h.
MFV r320195: bhyveload: correctly query size of disks
On FreeBSD fstat(2) works fine for querying sizes of plain files,
but not so much for character devices.
So, use DIOCGMEDIASIZE to try to get the correct size for disks
and disk-like devices (e.g. zvols).
MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport
The motivation for this is two-fold.
1. Some old WD SATA disks may appear as if they need to be spun up
when they are already spinning. Those disks would respond with
an error to the spin-up request.
2. Even if we really fail to spin up the disk, we still can try to
proceed to the subsequent phases. If we fail later on, then no
difference. Otherwise we get a chance to communicate with the
disk which is better than completely ignoring it, because a user
can try to recover the disk.
https://www.illumos.org/issues/8269
It seems that currently normalization of stddev aggregation is done
incorrectly.
We divide both the sum of values and the sum of their squares by the
normalization factor. But we should divide the sum of squares by the
normalization factor squared to scale the original values properly.
FreeBSD note: the actual change was committed in r316853, this commit
adds the test files and record merge information.
krb5_err.h is generated from a .et file in kerberos5/lib/libkrb5.
As kerberos5/lib/krb5 include files are already referenced it makes
no sense to generate it again here.
marius [Sun, 17 Sep 2017 01:32:45 +0000 (01:32 +0000)]
MFC: r322669
In fetch_resolve() if the port number or service name is included
in the host argument (e. g. "www.freebsd.org:443"), correctly set
the service pointer accordingly. Previously, the service pointer
was set to the separator instead, causing getaddrinfo(3) to fail.
marius [Fri, 15 Sep 2017 00:32:22 +0000 (00:32 +0000)]
- Reset stable/10 back to -PRERELEASE status now that releng/10.4
has been branched.
- Update __FreeBSD_version to reflect the new -STABLE branch.
- Switch the pkg(8) configuration for the default installation and the
DVD image creation back to the latest set, i. e. revert r322737.
MFC r323448: bsdinstall: Ignore error return from newaliases(1)
This was originally added as "exit $SUCCESS" but with nothing to set the
SUCCESS variable. Thus it became an exit with no argument, which just
exits with the status of the preceding command.
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
marius [Wed, 13 Sep 2017 21:56:49 +0000 (21:56 +0000)]
MFC: r323382, MFV: r323381
Permit a deflateParams() parameter change as soon as possible.
This change fixes compression errors seen when the embedded Tomcat
web server of a UniFi Controller zlib compresses responses. Given
that Tomcat just uses Java/OpenJDK which in turn employs zlib for
its compression/decompression support, this bug might very well
affect other applications, too.
"pw usermod someuser -G ''" is supposed make sure that someuser
doesn't have any secondary group memberships.
Previouly it was a nop because split_groups() only intitialised
"groups" if at least one group was specified. As a result the
existing secondary group memberships were kept.
MFC r323002: zfs: do not advertise unsupported hash algorithms
illumos 4185 ("add new cryptographic checksums to ZFS: SHA-512, Skein,
Edon-R") was intentionally merged only partially in r289422, without
adding support for skein, sha512 and edonr on FreeBSD.
Support for skein and sha512 was added later on (in head), but none of
these are supported in stable/10. Prior to this commit zfs(8) correctly
rejected these algorithms, but with an error message that claimed
support:
fk@r500 ~ $zfs set checksum=edonr tank
cannot set property for 'tank': 'checksum' must be one of 'on | off |
fletcher2 | fletcher4 | sha256 | sha512 | skein | edonr'
(This commit removes sha512 and skein in addition to edonr from the
merge of head's r323002.)
marius [Fri, 8 Sep 2017 00:11:35 +0000 (00:11 +0000)]
- Ever since the workaround for the silicon bug of TSO4 causing MAC hangs
was committed in r295133 (MFCed to stable/10 in r295287), CSUM_TSO gets
always disabled by em(4) on the first invocation of em_init_locked() as
at that point no link is established, yet. In turn, this causes CSUM_TSO
also to be off when em(4) is used as a parent device for vlan(4), i. e.
besides IFCAP_TSO4, IFCAP_VLAN_HWTSO effectively doesn't work either.
In head an attempt to fix this was made with r308345, but that revision
had several problems on its own. One of which was that r308345 caused
IFCAP_TSO4 to also be cleared from both the interface capability and
capability enable bits. Thus, once a link switched from gigabit to a
lower speed, TSO no longer could be enabled, even not via ifconfig(8).
So this change moves the aforementioned WAR to em_update_link_status()
like r308345 did, but only alters the hardware assist bits accordingly,
leaving IFCAP_TSO4 flags alone.
Still, this isn't the only problem r308345 had. Another one is that there
just is no way to atomically flush TSO-using descriptors already queued
at the point in time a link speed switch to below GbE occurs. Thus, such
in-flight descriptors still may hang the MAC. Moreover, at least currently
there also is no way of triggering a reconfiguration of vlan(4) when the
state of IFCAP_VLAN_HWTSO support changes at runtime, causing vlan(4) to
continue employing TSO. Last but not least, testing shows that - despite
all the WARs for TSO-related silicon bugs in em(4) - at least 82579 still
may hang at gigabit speed with IFCAP_TSO4 enabled. Therefore, this change
further removes IFCAP_TSO4 and IFCAP_VLAN_HWTSO from interface capability
enable bits as set by em(4). While at it, the use of CSUM_TCP is replaced
with CSUM_IP_TSO as em(4) only implements support for IFCAP_TSO4 but not
IFCAP_TSO6 (although in principle available with a subset of the supported
MACs).
At the bottom line, this change allows IFCAP_TSO4 and IFCAP_VLAN_HWTSO to
be used again with em(4), but these hardware offloading capabilities now
need to be explicitly enabled via ifconfig(8). Beware that it's only
considered safe to do so (and also only may work) in environments where
the link speed is not to be expected to change from GbE. Moreover, em(4)
appears to still be missing some more TSO workarounds for at least some
models, specifically the 82579 (I could not find an errata sheet and
"specification update" respectively for these latter, though, and the
generic ICH8 one doesn't list any TSO related bugs).
- Let igb_tso_setup() handle EtherType protocols that are unsupported or
for which support hasn't been compiled in gracefully instead of calling
panic(9).
- Make em_allocate_{legacy,msix}() and lem_allocate_irq() match their
prototypes WRT static.
This is a direct commit to stable/10 as corresponding code is no longer
present in head.
MFC r322810 and r322830:
Add new mlx5ib(4) driver to the kernel source tree which supports
Remote DMA over Converged Ethernet, RoCE, for the ConnectX-4 series of
PCI express network cards.
There is currently no user-space support and this driver only supports
kernel side non-routable RoCE V1. The krping kernel module can be used
to test this driver. Full user-space support including RoCE V2 will be
added as part of the ongoing upgrade to ibcore from Linux 4.9. Otherwise
this driver is feature equivalent to mlx4ib(4). The mlx5ib(4) kernel
module will only be built when WITH_OFED=YES is specified.
Approved by: re (marius)
Sponsored by: Mellanox Technologies
dim [Tue, 5 Sep 2017 17:32:14 +0000 (17:32 +0000)]
MFC r323001:
In compiler-rt, a few assembler implementations for i386 floating point
conversion functions use SSE2 instructions, but these are not guarded by
#ifdef __SSE2__, and there is no implementation using general purpose
registers. For these functions, use the generic C variants instead,
otherwise they will cause SIGILL on older processors.
Approved by: re (kib)
Reported by: bsdpr@phoe.frmug.org
PR: 221733
MFC r323014:
Follow-up to r323001: if the actually selected CPUTYPE is capable of
SSE2 instructions, we can use them.
des [Fri, 1 Sep 2017 22:52:18 +0000 (22:52 +0000)]
Upgrade OpenSSH to 7.3p1.
This is the last version of OpenSSH which does not break compatibility
more than we can live with in a stable branch. Further commits will
follow to backport some bug fixes from newer versions.
The sshd breakage in the previous attempt was due to an upstream bug
(a 0 was changed to a 1 while refactoring send_rexec_state() in sshd.c)
which only manifested itself when sshd was built with SSH 1 support.
des [Fri, 1 Sep 2017 21:24:32 +0000 (21:24 +0000)]
Upgrade OpenSSH to 7.3p1.
This is the last version of OpenSSH which does not break compatibility
more than we can live with in a stable branch. Further commits will
follow to backport some bug fixes from newer versions.
marius [Thu, 31 Aug 2017 23:59:46 +0000 (23:59 +0000)]
MFC: r308643, r312427, r312641, r322986
- Update WOL support for newer em(4) devices. [1]
- Add support for Kaby Lake generation i219 (4) and i219 (5) devices.
- Enable WOL features also for the igb(4) class of devices. [1]
- Don't set any WOL enabling hardware bits if WOL isn't requested
according to the enabled interface capability bits.
davidcs [Mon, 28 Aug 2017 19:17:28 +0000 (19:17 +0000)]
MFC 322771
Upgrade FW to 5.4.66
sysctls to display stats, stats polled every 2 seconds
Modify QLA_LOCK()/QLA_UNLOCK() to not sleep after acquiring mtx_lock
Add support to turn OFF/ON error recovery following heartbeat failure for
debug purposes.
Set default max values to 32 Tx/Rx/SDS rings
davidcs [Thu, 24 Aug 2017 22:33:42 +0000 (22:33 +0000)]
MFC r322408
Performance enhancements to reduce CPU utililization for large number of
TCP connections (order of tens of thousands), with predominantly Transmits.
mckusick [Thu, 24 Aug 2017 21:44:23 +0000 (21:44 +0000)]
MFC of 276737, 322200, 322201, 322271, and 322297
276737: Remove old ioctl use and support
322200: Remove (broken) search for alternate superblocks
322201: Show differences when alternate superblock fails to match
322271: Cleanup for 322200.
322297: Restore fsck_ffs ability to find alternate superblocks
marius [Thu, 24 Aug 2017 20:52:28 +0000 (20:52 +0000)]
MFC: r322726
Bring back the much more readable unified format for differences in
/etc/{group,master.passwd}. This was originally turned on for all of
/etc/{aliases,group,master.passwd} in r55196, but then backed out
only for the latter two in r56697, as the adaption of the sed(1)ing
done in r56308 was incorrect. This left us with inconsistent diff(1)
formats in the daily output of periodic(8) ever since, despite in
r56697 having been promised to be revisited. So properly adapt the
password hash filtering to the unified format and turn the later on
again for /etc/{group,master.passwd}, too.
This change merges devctl notification for userland coredumps.
r278479 (rpaulo):
Notify devd(8) when a process crashed.
This change implements a notification (via devctl) to userland when
the kernel produces coredumps after a process has crashed.
devd can then run a specific command to produce a human readable crash
report. The command is most usually a helper that runs gdb/lldb
commands on the file/coredump pair. It's possible to use this
functionality for implementing automatic generation of crash reports.
devd(8) will be notified of the full path of the binary that crashed and
the full path of the coredump file.
r278494 (rpaulo):
Sanitise the coredump file names sent to devd.
While there, add a sysctl to turn this feature off as requested by kib@.
r278525 (rpaulo):
Remove a printf and an strlen() from the coredump code.
r278545 (rpaulo):
Restore the data array in coredump(), but use a different style to
calculate the length.
r278592 (rpaulo):
Remove check against NULL after M_WAITOK.
r279237 (kib):
Keep a reference on the coredump vnode for vn_fullpath() call. Do it
by moving vn_close() after the point where notification is sent.
r280410 (rpaulo):
Disable coredump_devctl because it could lead to leaking paths to jails.
gjb [Thu, 24 Aug 2017 13:39:24 +0000 (13:39 +0000)]
MFC r322770, r322796:
r322770:
Apply changes from bin/chmod/tests/chmod_test.sh, adding
atf_expect_fail() before chflags(8) is invoked if the filesystem
is ZFS, which does not support UF_IMMUTABLE.
r322796:
Revert part of r322770 in usr.sbin/chown/tests/chown_test.sh,
which incorrectly adds atf_expect_fail() where there is no
failure case.
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation
gjb [Wed, 23 Aug 2017 17:47:57 +0000 (17:47 +0000)]
MFC r322544:
Always expand the full path to the configuration file specified
with the '-c' flag. This fixes an issue where the configuration
file would not properly be located intermittently.
Approved by: re (kib, marius)
Sponsored by: The FreeBSD Foundation
mckusick [Tue, 22 Aug 2017 15:26:47 +0000 (15:26 +0000)]
MFC of 269692, 322179, 322463, and 322464:
269692: cswitch is unsigned, so don't compare it < 0
322179: Correct ordering of bio's in gjournal queue
322463: Eliminate a variable that is set-only in g_journal.c
322464: Correct check for reads in gjournal
Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
Discussed with: kib
Approved by: re (marius)
ken [Tue, 22 Aug 2017 14:40:56 +0000 (14:40 +0000)]
MFC r322410:
------------------------------------------------------------------------
r322410 | ken | 2017-08-11 12:43:52 -0600 (Fri, 11 Aug 2017) | 16 lines
Add historical notes on QIC tape drives and fix a couple of issues in mt(1).
o Density code 0x5 is also known as QIC-11, and should have a footnote
reference.
o Add notes on QIC tape drives from the bug report. These may help anyone
trying to use a QIC drive.
o Take out a "more more" instance found by igor.
o Bump the man page date.
The PR is 14 years old, so it's past time to retire it.
How network VF works with hn(4) on Hyper-V in transparent mode:
- Each network VF has a cooresponding hn(4).
- The network VF and the it's cooresponding hn(4) have the same hardware
address.
- Once the network VF is attached, the cooresponding hn(4) waits several
seconds to make sure that the network VF attach routing completes, then:
o Set the intersection of the network VF's if_capabilities and the
cooresponding hn(4)'s if_capabilities to the cooresponding hn(4)'s
if_capabilities. And adjust the cooresponding hn(4) if_capable and
if_hwassist accordingly. (*)
o Make sure that the cooresponding hn(4)'s TSO parameters meet the
constraints posed by both the network VF and the cooresponding hn(4).
(*)
o The network VF's if_input is overridden. The overriding if_input
changes the input packet's rcvif to the cooreponding hn(4). The
network layers are tricked into thinking that all packets are
neceived by the cooresponding hn(4).
o If the cooresponding hn(4) was brought up, bring up the network VF.
The transmission dispatched to the cooresponding hn(4) are
redispatched to the network VF.
o Bringing down the cooresponding hn(4) also brings down the network
VF.
o All IOCTLs issued to the cooresponding hn(4) are pass-through'ed to
the network VF; the cooresponding hn(4) changes its internal state
if necessary.
o The media status of the cooresponding hn(4) solely relies on the
network VF.
o If there are multicast filters on the cooresponding hn(4), allmulti
will be enabled on the network VF. (**)
- Once the network VF is detached. Undo all damages did to the
cooresponding hn(4) in the above item.
NOTE:
No operation should be issued directly to the network VF, if the
network VF transparent mode is enabled. The network VF transparent mode
can be enabled by setting tunable hw.hn.vf_transparent to 1. The network
VF transparent mode is _not_ enabled by default, as of this commit.
The benefit of the network VF transparent mode is that the network VF
attachment and detachment are transparent to all network layers; e.g. live
migration detaches and reattaches the network VF.
The major drawbacks of the network VF transparent mode:
- The netmap(4) support is lost, even if the VF supports it.
- ALTQ does not work, since if_start method cannot be properly supported.
(*)
These decisions were made so that things will not be messed up too much
during the transition period.
(**)
This does _not_ need to go through the fancy multicast filter management
stuffs like what vlan(4) has, at least currently:
- As of this write, multicast does not work in Azure.
- As of this write, multicast packets go through the cooresponding hn(4).
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11803
322483
hyperv/hn: Update VF's ibytes properly under transparent VF mode.
While, I'm here add comment about why updating VF's imcast stat is
not necessary.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11948
322485
hyperv/hn: Fix/enhance receiving path when VF is activated.
- Update hn(4)'s stats properly for non-transparent mode VF.
- Allow BPF tapping to hn(4) for non-transparent mode VF.
- Don't setup mbuf hash, if 'options RSS' is set.
In Azure, when VF is activated, TCP SYN and SYN|ACK go through hn(4)
while the rest of segments and ACKs belonging to the same TCP 4-tuple
go through the VF. So don't setup mbuf hash, if a VF is activated
and 'options RSS' is not enabled. hn(4) and the VF may use neither
the same RSS hash key nor the same RSS hash function, so the hash
value for packets belonging to the same flow could be different!
- Disable LRO.
hn(4) will only receive broadcast packets, multicast packets, TCP
SYN and SYN|ACK (in Azure), LRO is useless for these packet types.
For non-transparent, we definitely _cannot_ enable LRO at all, since
the LRO flush will use hn(4) as the receiving interface; i.e.
hn_ifp->if_input(hn_ifp, m).
While I'm here, remove unapplied comment and minor style change.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11978
322486
hyperv/hn: Minor cleanup
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11979
322487
hyperv/hn: Re-set datapath after synthetic parts reattached.
Do this even for non-transparent mode VF. Better safe than sorry.
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11981
Unbreak BCM2835/RPI-B support by bringing it in line with stable/11 and
head:
- Optimise reading of pending interrupt registers.
- Fix a bug where some DTS layouts could cause the premature ending of the
search (i.e. without returning any result) and you would end up with a
random MAC address.
- Reduce the diff between head and arm_intrng with the bcm2835 interrupt
controller.
- Allow the retrieving of the reserved pins state.
- Add support to the bcm2835 mailbox driver to work before interrupts are
enabled. This will be needed to enable the power on devices early on in the
boot process.
- Add support for enabling the USB on the Raspberry Pi boards when it hasn't
been done by U-Boot. This allows the USB to work when we load the kernel
directly.
- Call config_intrhook_disestablish on failure of the bcm2835 fb and fbd intr
hooks. With this we can get through the boot even if these functions fail.
- Add the structures needed to get/set the power state. These can be used
when, for example, we boot without U-Boot and wish to enable USB, or to
suspend an unneeded device.
- Add a mask to match only the relative base address of BSC controllers.
- Move the code to set the device power to the bcm2835 mailbox driver so it
can be reused by other drivers.
- Add the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the
former to std.bcm2835.
- Add a helper function to read clock frequencies from videocore and use this
to get the default frequency of the sdhci device.
- Add partial support for the Raspberry Pi 2.
- Remove a debug #error from the bcm2835 sdhci driver.
- Fetch the SDHCI frequency from videocore (our prefered source) and only if
it fails, fetch the clock-frequency from DTB. If both methods fail, use the
hardcoded default.
- Pass the supplied buffer length instead of a fixed size.
- Add the routines to query and setup the framebuffer state using the
BCM2835_MBOX_CHAN_PROP channel. The old channel (BCM2835_MBOX_CHAN_FB)
seems deprecated on recent firmware versions and is causing a freeze on
RPi 2.
- Fix DMA on RPi 2. BCM2836 has a different base address for peripherals.
- Enable DMA for sdhci on RPi 2 (BCM2836).
- Add a missing wakeup when releasing ownership of the SPI hardware.
- Fix framebuffer compatibility with new RPi firmware.
- Refactor bcm2835_cpufreq to use bcm2835_mbox_property API.
- Fix the sc(4) framebuffer driver on RPi 2.
- Fix the vt(4) framebuffer driver on RPi 2.
- Remove unused mutex and softc variables.
- Refactor mailbox property API to make it usable for /dev/vcio driver.
- Replace semaphore-base locking with sleep/wait synchronization.
- Fix infinite loop if response from VideoCore never received.
- Set have_message in interrupt to handle "response before READ" case.
- Serialize access to property channel when using bcm2835_mbox_property.
- Force framebuffer virtual viewport to be the same as physical.
- Use proper type of tag in bcm2835_mbox_fb_init.
- bcm2835_cpufreq: Only attach driver if we correcly match on the machine
compatible string.
- Add dev.fb.X.resync sysctl to resync ARM framebuffer with VideoCore.
- Do not use DMA channels used by GPU.
- Define local-intc for BCM2836 platform (RPI2) and make BCM2835 intc
a child of it.
- Fix build for Pi kernels with syscons enabled.
- Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer.
- Make intc driver compatible with upstream DTS.
- Make Rapsberry Pi watchdog driver compatible with upstream DTS.
- Make sure intc is attached before interrupt consumers.
- Make framebuffer driver compatible with upstream DT.
- Add one more heuristic to determine MAC address of the SMSC device.
Split the interrupt setup code into two parts: allocation and configuration.
Do the allocation before requesting the IOCFacts message. This triggers
the LSI firmware to recognize the multiqueue should be enabled if available.
Multiqueue isn't used by the driver yet, but this also fixes a problem with
the cached IOCFacts not matching latter checks, leading to potential problems
with error recovery.
As a side-effect, fetch the driver tunables as early as possible.
Change from using underbar function names to normal function names for
the informational print functions. Collapse the debug API a bit to be
more generic and not require as much code duplication. While here, fix
a bug in MPS that was already fixed in MPR.
Fix a logic bug in the split PCI interrupt code that slipped through
Reported by: Harry Schmalzbauer
------------------------------------------------------------------------
r322364 | ken | 2017-08-10 08:59:17 -0600 (Thu, 10 Aug 2017) | 39 lines
Changes to make mps(4) and mpr(4) handle reinit with reallocation.
When the mps(4) and mpr(4) drivers need to reinitialize the
firmware, they sometimes need to reallocate all of the memory
allocated by the driver. The reallocation happens whenever the IOC
Facts change. That should only happen after a firmware upgrade.
If the reinitialization happens as a result of a timed out command
sent to the card, the command that timed out and triggered the
reinit may have been freed if iocfacts_allocate() reallocated all
memory. If the caller attempts to access the command after that,
the kernel will panic because the caller will be dereferencing
freed memory.
The solution is to set a flag in the softc when we reallocate,
and avoid dereferencing the command strucure if we've reallocated.
The changes are largely the same in both drivers, since mpr(4) is a
derivative of mps(4).
o In iocfacts_allocate(), if the IOC Facts have changed and we
need to reallocate, set the REALLOCATED flag in the softc.
o Change wait_command() to take a struct mps_command ** instead of
a struct mps_command *. This allows us to NULL out the caller's
command pointer if we have to reinit the controller and the data
structures get reallocated. (The REALLOCATED flag will be set
in the softc if that has happened.)
o In every place that calls wait_command(), make sure we handle
the case where the command is NULL after the call.
o The mpr(4) driver has mpr_request_polled() which can also
reinitialize the card. Also check for reallocation there.
hselasky [Tue, 15 Aug 2017 13:37:04 +0000 (13:37 +0000)]
MFC r322250:
Count drop events due to lack of PCI bandwidth as queue drops and not as
input errors in the mlx5en(4) driver. This improves the sysadmin view of
physical port errors.
hselasky [Tue, 15 Aug 2017 09:21:46 +0000 (09:21 +0000)]
MFC r322248:
Fix for mlx4en(4) to properly call m_defrag().
The m_defrag() function can only defrag mbuf chains which have a valid
mbuf packet header. In r291699 when the mlx4en(4) driver was converted
into using BUSDMA(9), the call to m_defrag() was moved after the part
of the transmit routine which strips the header from the mbuf chain.
This effectivly disabled the mbuf defrag mechanism and such packets
simply got dropped.
This patch removes the stripping of mbufs from a chain and loads all
mbufs using busdma. If busdma finds there are no segments, unload
the DMA map and free the mbuf right away, because that means all
data in the mbuf has been inlined in the TX ring. Else proceed
as usual.
Add a per-ring rounter for the number of defrag attempts and
make sure the oversized_packets counter gets zeroed while at it.
The counters are per-ring to avoid excessive cache misses in the
TX path.