From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org
Cc: "Corey Minyard" <cminyard@mvista.com>,
"Jeremy Kerr" <jk@codeconstruct.com.au>,
"Klaus Jensen" <its@irrelevant.dk>,
qemu-arm@nongnu.org, "Peter Delevoryas" <peter@pjd.dev>,
"Keith Busch" <kbusch@kernel.org>,
"Cédric Le Goater" <clg@kaod.org>,
"Jason Wang" <jasowang@redhat.com>,
"Lior Weintraub" <liorw@pliops.com>,
qemu-block@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Matt Johnston" <matt@codeconstruct.com.au>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Klaus Jensen" <k.jensen@samsung.com>
Subject: [PATCH v2 2/3] i2c/mctp: Allow receiving messages to dest eid 0
Date: Tue, 25 Apr 2023 08:35:39 +0200 [thread overview]
Message-ID: <20230425063540.46143-3-its@irrelevant.dk> (raw)
In-Reply-To: <20230425063540.46143-1-its@irrelevant.dk>
From: Matt Johnston <matt@codeconstruct.com.au>
The Null Destination ID, 0, is used for MCTP control messages when
addressing by physical ID. That is used for Get Endpoint ID and
Set Endpoint ID when querying/assigning an EID to an endpoint.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
---
hw/i2c/mctp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/i2c/mctp.c b/hw/i2c/mctp.c
index 0f4045d0d685..db42dc72264b 100644
--- a/hw/i2c/mctp.c
+++ b/hw/i2c/mctp.c
@@ -242,7 +242,8 @@ static int i2c_mctp_event_cb(I2CSlave *i2c, enum i2c_event event)
goto drop;
}
- if (pkt->mctp.hdr.eid.dest != mctp->my_eid) {
+ if (!(pkt->mctp.hdr.eid.dest == mctp->my_eid ||
+ pkt->mctp.hdr.eid.dest == 0)) {
trace_i2c_mctp_drop_invalid_eid(pkt->mctp.hdr.eid.dest,
mctp->my_eid);
goto drop;
--
2.40.0
next prev parent reply other threads:[~2023-04-25 6:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 6:35 [PATCH v2 0/3] hw/{i2c, nvme}: mctp endpoint, nvme management interface model Klaus Jensen
2023-04-25 6:35 ` [PATCH v2 1/3] hw/i2c: add mctp core Klaus Jensen
2023-04-25 15:19 ` Corey Minyard
2023-04-26 7:11 ` Klaus Jensen
2023-04-26 11:52 ` Corey Minyard
2023-05-25 11:27 ` Jonathan Cameron via
2023-05-25 11:33 ` Klaus Jensen
2023-04-25 6:35 ` Klaus Jensen [this message]
2023-05-25 11:29 ` [PATCH v2 2/3] i2c/mctp: Allow receiving messages to dest eid 0 Jonathan Cameron via
2023-04-25 6:35 ` [PATCH v2 3/3] hw/nvme: add nvme management interface model Klaus Jensen
2023-05-25 11:34 ` Jonathan Cameron via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230425063540.46143-3-its@irrelevant.dk \
--to=its@irrelevant.dk \
--cc=Jonathan.Cameron@huawei.com \
--cc=clg@kaod.org \
--cc=cminyard@mvista.com \
--cc=jasowang@redhat.com \
--cc=jk@codeconstruct.com.au \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=liorw@pliops.com \
--cc=matt@codeconstruct.com.au \
--cc=peter.maydell@linaro.org \
--cc=peter@pjd.dev \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).