freebsd-src/sys
Warner Losh e30fceb89b mps: Use 64-bit chain structures
According to Broadcom, mixing 64-bit SGEs with 32-bit chain entries can
lead to IOC Fault code 0x40000d04. This fault code has been observed to
suddenly increase on certain machines when the OCA firmware images are
deployed. The hardware interprets all elements of a 64-bit SGE, even
ones marked as 32-bit. Depending on the other bits, this will just work,
but sometimes generate the above fault. Broadcom recommends this
practice, and the Linux and NetBSD drivers follow it.

Rework the chaining code to use MPI2_SGE_CHAIN64 instead of
MPI2_SGE_CHAIN32. Adjust MPS_SGC_SIZE from 8 to 12 to match the size of
the new structure. Flag the structure as being 64-bits now. Since
MPS_SGE64_SIZE and MPS_SGC_SIZE are the same now, mps_push_sge could be
simplified (after the same fashion of mpr). The different number of
cases collapse to whether or not there's room for the segments and if
not we need a chain, however these changes haven't been made yet as the
current code handles those cases properly with the new defines.

Made chain_busaddr 64-bits, even though we ask for all allocations to be
below 4GB for this tag. Use it to set both parts of the CHAIN64 address
rather than baking the 4GB assumption. Add asserts around the allocation
to detect and BUSDMA bugs in allocation.

Remove asserts and associated comment in mpi_pre_fw_download and
mpi_pre_fw_upload. The code does not, it seems, depend on this
invariant. The mpr driver has similar code, no asserts and also doesn't
depend on this.

Adjust comments to reflect the updated size.

Sponsored by:		Netflix
Reviewed by:		scottl, mav
Differential Revision:	https://reviews.freebsd.org/D34016
2022-02-02 22:35:33 -07:00
..
amd64 amd64: micro-optimize vptopte()/vtopde() further 2022-02-02 11:40:04 +02:00
arm Add PT_GETREGSET 2022-01-27 11:40:34 +00:00
arm64 arm64, riscv: handle RB_KDB 2022-02-01 13:59:54 -04:00
bsm
cam iscsi: Allocate a dummy PDU for the internal nexus reset task. 2022-01-28 13:07:04 -08:00
cddl Teach DTrace about BTI on arm64 2022-01-19 12:07:35 +00:00
compat linux: Provide dummy seccomp(2) 2022-01-28 11:45:41 +00:00
conf Disable -Wunused-function for {ed,x}25519_ref10.c in libsodium. 2022-02-02 12:25:16 -08:00
contrib zfs: Fix zvol_cdev_open locking 2022-01-26 18:37:52 +00:00
crypto crypto: Add an API supporting curve25519. 2022-01-24 15:27:39 -08:00
ddb ddb: Remove SOFTWARE_SSTEP support 2022-01-07 09:25:33 -07:00
dev mps: Use 64-bit chain structures 2022-02-02 22:35:33 -07:00
dts add overlay for enabling spi0 on allwinner h3 2022-01-26 11:42:20 +02:00
fs unionfs: do not force LK_NOWAIT if VI_OWEINACT is set 2022-02-02 21:08:17 -06:00
gdb gdb(4): Do not use run length encoding for 3-symbol repetitions 2022-01-22 14:46:06 -05:00
geom In GEOM debugging output, show consumer for cloned and duplicated bio's. 2022-01-30 17:21:13 -08:00
gnu
i386 Add PT_GETREGSET 2022-01-27 11:40:34 +00:00
isa sys/isa: Use C99 fixed-width integer types. 2021-12-28 09:41:57 -08:00
kern Add GB_NOWITNESS flag 2022-02-01 06:54:50 +02:00
kgssapi
libkern sys/libkern: Use C99 fixed-width integer types. 2021-12-28 09:42:11 -08:00
modules Disable -Wunused-function for {ed,x}25519_ref10.c in libsodium. 2022-02-02 12:25:16 -08:00
net pflog: align header to 4 bytes, not 8 2022-02-01 18:17:44 +01:00
net80211 net80211: ieee80211_dump_node() cosmetics 2022-01-17 00:01:46 +00:00
netgraph domains: make domain_init() initialize only global state 2022-01-03 10:15:22 -08:00
netinet ip_mroute: refactor epoch-basd locking 2022-02-02 06:48:05 +01:00
netinet6 Fix a memory leak when ip_output_send() returns EAGAIN due to send tag issues 2022-01-27 10:34:34 -05:00
netipsec IPsec: Use protocol-specific malloc types instead of M_XDATA. 2022-01-24 15:27:39 -08:00
netpfil ipfilter: Correct a typo in a comment 2022-02-01 19:55:56 -08:00
netsmb
nfs
nfsclient
nfsserver
nlm sys/nlm: Use C99 fixed-width integer types. 2021-12-28 09:42:42 -08:00
ofed domains: init with standard SYSINIT(9) or VNET_SYSINIT() 2022-01-03 10:15:22 -08:00
opencrypto opencrypto/xform_*.h: Trim scope of included headers. 2022-01-25 15:21:22 -08:00
powerpc Add PT_GETREGSET 2022-01-27 11:40:34 +00:00
riscv arm64, riscv: handle RB_KDB 2022-02-01 13:59:54 -04:00
rpc sys/rpc: Use C99 fixed-width integer types. 2021-12-28 09:43:15 -08:00
security
sys <sys/bitstring.h>: Cast _BITSTR_BITS to int in a ternary operator. 2022-02-01 09:45:11 -08:00
teken
tests
tools Revert "syscallarg_t: Add a type for system call arguments" 2022-01-12 23:29:20 +00:00
ufs ufs, msdosfs: do not record witness order when creating vnode 2022-02-01 10:51:55 +02:00
vm vmmeter(): Fix detection of the named swap objects 2022-02-02 11:39:58 +02:00
x86 atrtc: Install address space handler for \_SB and its descendant. 2022-01-21 15:32:30 +09:00
xdr sys/xdr: Use C99 fixed-width integer types. 2021-12-28 09:43:26 -08:00
xen
Makefile Fix 'make cscope' with ALL_ARCH defined 2022-01-07 11:53:52 -04:00