summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYuan Zhaoming <yuanzm2@lenovo.com>2026-04-17 17:13:40 +0300
committerJakub Kicinski <kuba@kernel.org>2026-04-20 21:46:57 +0300
commita663bac71a2f0b3ac6c373168ca57b2a6e6381aa (patch)
tree845ed2aa9fbf5af19f50c7c70bc5a1476b2685b1 /include
parent5638504a2aa9e1b9d72af9060df1a160cce2d379 (diff)
downloadlinux-a663bac71a2f0b3ac6c373168ca57b2a6e6381aa.tar.xz
net: mctp: fix don't require received header reserved bits to be zero
From the MCTP Base specification (DSP0236 v1.2.1), the first byte of the MCTP header contains a 4 bit reserved field, and 4 bit version. On our current receive path, we require those 4 reserved bits to be zero, but the 9500-8i card is non-conformant, and may set these reserved bits. DSP0236 states that the reserved bits must be written as zero, and ignored when read. While the device might not conform to the former, we should accept these message to conform to the latter. Relax our check on the MCTP version byte to allow non-zero bits in the reserved field. Fixes: 889b7da23abf ("mctp: Add initial routing framework") Signed-off-by: Yuan Zhaoming <yuanzm2@lenovo.com> Cc: stable@vger.kernel.org Acked-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20260417141340.5306-1-yuanzhaoming901030@126.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/mctp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/mctp.h b/include/net/mctp.h
index e1e0a69afdce..d8bf9074110d 100644
--- a/include/net/mctp.h
+++ b/include/net/mctp.h
@@ -26,6 +26,9 @@ struct mctp_hdr {
#define MCTP_VER_MIN 1
#define MCTP_VER_MAX 1
+/* Definitions for ver field */
+#define MCTP_HDR_VER_MASK GENMASK(3, 0)
+
/* Definitions for flags_seq_tag field */
#define MCTP_HDR_FLAG_SOM BIT(7)
#define MCTP_HDR_FLAG_EOM BIT(6)