freebsd-dev/sys
Warner Losh e64f3dee49 Work around devices which return all zeros for reads of existing MSI-X
table VCTRL registers.

Unconditionally program the MSI-X vector control Mask field for MSI-X
table entries without regarud for Mask's previous value. Some devices
return all zeros on reads of the VCTRL registers, which would cause us
to skip disabling interrupts. This fixes the Samsung SM961/PM961 SSDs
which are return zero starting from offset 0x3084 within the memory
region specified by BAR0, even when they are active MSI-X vectors.

The Illumos kernel writes these unconditionally to 0 or 1. However,
section 6.8.2.9 of the PCI Local Bus 3.0 spec (dated Feb 3, 2004)
states for bits 31::01:
	After reset, the state of these bits must be 0. However, for
	potential future use, software must preserve the value of
	these reserved bits when modifying the value of other Vector
	Control bits. If software modifies the value of these reserved
	bits, the result is undefined."
so we always set or clear the Mask bit, but otherwise preserves the
old value.

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211713
Reviewed By: imp, jhb
Submitted by: Ka Ho Ng
MFC After: 1 week
Differential Revision: https://reviews.freebsd.org/D20873
2019-07-08 19:38:49 +00:00
..
amd64 Add support for PTRACE_O_TRACEEXIT to linuxulator ptrace(2). 2019-07-04 19:46:58 +00:00
arm Implement missing MMCBR ivars 2019-07-04 14:15:04 +00:00
arm64 Three changes to pmap_enter(): 2019-07-07 06:06:48 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Remove the CDIOCREADSUBCHANNEL_SYSSPACE ioctl. 2019-07-03 00:10:01 +00:00
cddl Avoid extra taskq_dispatch() calls by DMU. 2019-06-25 18:35:23 +00:00
compat Update Linux compat version to 2.6.36 2019-07-04 20:42:08 +00:00
conf Fix build error introduced by r349596. 2019-07-03 01:40:29 +00:00
contrib Update frtuc struct comments. It not only defines TCP things we are 2019-07-08 19:11:49 +00:00
crypto aesni(4): Fix trivial type typo 2019-05-27 00:47:51 +00:00
ddb ddb show proc typo 2019-06-22 05:35:23 +00:00
dev Work around devices which return all zeros for reads of existing MSI-X 2019-07-08 19:38:49 +00:00
dts arm64: Add support for NanoPI NEO2 2019-05-02 12:56:13 +00:00
fs Add additional check for 'blocks per group' and 'fragments per group' superblock fields. 2019-07-07 08:58:02 +00:00
gdb
geom g_mirror_taste: avoid deadlock, always clear tasting flag 2019-07-01 22:06:36 +00:00
gnu dts: Import files from Linux 5.1 2019-05-08 19:27:30 +00:00
i386 Add driver for NTB in AMD SoC. 2019-07-02 05:25:18 +00:00
isa
kern Change blist_next_leaf_alloc so that it can examine more than one leaf 2019-07-06 06:15:03 +00:00
kgssapi Make the warning intervals for deprecated crypto algorithms tunable. 2019-06-11 23:00:55 +00:00
libkern Separate kernel crc32() implementation to its own header (gsb_crc32.h) and 2019-06-17 19:49:08 +00:00
mips Implement missing MMCBR ivars 2019-07-04 14:15:04 +00:00
modules Add driver for NTB in AMD SoC. 2019-07-02 05:25:18 +00:00
net Support IFCAP_NOMAP in vlan(4). 2019-06-29 00:51:38 +00:00
net80211 Enhance the comment ieee80211_add_channel() to avoid a 2019-06-10 14:31:18 +00:00
netgraph Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info. 2019-03-14 22:30:05 +00:00
netinet Add an external mbuf buffer type that holds multiple unmapped pages. 2019-06-29 00:48:33 +00:00
netinet6 Add an external mbuf buffer type that holds multiple unmapped pages. 2019-06-29 00:48:33 +00:00
netipsec netipsec key_register: check for M_NOWAIT alloc failure 2019-06-25 15:43:52 +00:00
netpfil Convert all IPv4 and IPv6 multicast memberships into using a STAILQ 2019-06-25 11:54:41 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Fix prio vs. nonprio tagged traffic in RDMACM 2019-06-04 06:21:31 +00:00
opencrypto Move declaration of warninterval out from under COMPAT_FREEBSD32. 2019-06-11 23:28:07 +00:00
powerpc [PPC] Add missing SLB allocation KASSERT 2019-07-08 13:01:54 +00:00
riscv Merge r349526 from amd64. When we protect an L3 entry, we only call 2019-07-05 05:23:23 +00:00
rpc Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled. 2019-04-04 01:23:06 +00:00
security Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
sparc64 sys: Remove DEV_RANDOM device option 2019-06-21 00:16:30 +00:00
sys Remove the CDIOCREADSUBCHANNEL_SYSSPACE ioctl. 2019-07-03 00:10:01 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools Add SDIO support. 2019-06-08 16:26:56 +00:00
ufs Add a new "untrusted" option to the mount command. Its purpose 2019-07-01 23:22:26 +00:00
vm Elide the vm_reserv_free_page() call when PG_PCPU_CACHE is set. 2019-07-08 19:02:40 +00:00
x86 Currently, MCA entries remain on an every-growing linked list. This means 2019-06-08 18:26:48 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile