mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: minyard@acm.org
To: openipmi-developer@lists.sourceforge.net
Cc: Andrew Manley <andrew.manley@sealingtech.com>,
	linux-kernel@vger.kernel.org, Corey Minyard <cminyard@mvista.com>,
	Corey Minyard <minyard@acm.org>
Subject: [PATCH 4/5] ipmi: Add docs for IPMB direct addressing
Date: Mon,  4 Oct 2021 19:40:18 -0500	[thread overview]
Message-ID: <20211005004019.2670691-5-minyard@acm.org> (raw)
In-Reply-To: <20211005004019.2670691-1-minyard@acm.org>

From: Corey Minyard <cminyard@mvista.com>

Describe the addressing mechanism and how to use it.

Signed-off-by: Corey Minyard <minyard@acm.org>
Tested-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Andrew Manley <andrew.manley@sealingtech.com>
---
 Documentation/driver-api/ipmi.rst | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/Documentation/driver-api/ipmi.rst b/Documentation/driver-api/ipmi.rst
index bc281f10ce4b..c9cb5669bc4c 100644
--- a/Documentation/driver-api/ipmi.rst
+++ b/Documentation/driver-api/ipmi.rst
@@ -166,8 +166,8 @@ and the type is IPMI_SYSTEM_INTERFACE_ADDR_TYPE.  This is used for talking
 straight to the BMC on the current card.  The channel must be
 IPMI_BMC_CHANNEL.
 
-Messages that are destined to go out on the IPMB bus use the
-IPMI_IPMB_ADDR_TYPE address type.  The format is::
+Messages that are destined to go out on the IPMB bus going through the
+BMC use the IPMI_IPMB_ADDR_TYPE address type.  The format is::
 
   struct ipmi_ipmb_addr
   {
@@ -181,6 +181,23 @@ The "channel" here is generally zero, but some devices support more
 than one channel, it corresponds to the channel as defined in the IPMI
 spec.
 
+There is also an IPMB direct address for a situation where the sender
+is directly on an IPMB bus and doesn't have to go through the BMC.
+You can send messages to a specific management controller (MC) on the
+IPMB using the IPMI_IPMB_DIRECT_ADDR_TYPE with the following format::
+
+  struct ipmi_ipmb_direct_addr
+  {
+	int           addr_type;
+	short         channel;
+	unsigned char slave_addr;
+	unsigned char rq_lun;
+	unsigned char rs_lun;
+  };
+
+The channel is always zero.  You can also receive commands from other
+MCs that you have registered to handle and respond to them, so you can
+use this to implement a management controller on a bus..
 
 Messages
 --------
@@ -348,6 +365,10 @@ user may be registered for each netfn/cmd/channel, but different users
 may register for different commands, or the same command if the
 channel bitmasks do not overlap.
 
+To respond to a received command, set the response bit in the returned
+netfn, use the address from the received message, and use the same
+msgid that you got in the receive message.
+
 From userland, equivalent IOCTLs are provided to do these functions.
 
 
-- 
2.25.1


  parent reply	other threads:[~2021-10-05  0:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05  0:40 [PATCH 0/5] Add support for access through an IPMB bus minyard
2021-10-05  0:40 ` [PATCH 1/5] ipmi: Export ipmb_checksum() minyard
2021-10-05  0:40 ` [PATCH 2/5] ipmi: Add support for IPMB direct messages minyard
2021-10-05  0:40 ` [PATCH 3/5] ipmi:ipmb: Add initial support for IPMI over IPMB minyard
2021-10-05  1:27   ` Randy Dunlap
2021-10-05 11:43     ` Corey Minyard
2021-10-05  0:40 ` minyard [this message]
2021-10-05  0:40 ` [PATCH 5/5] ipmi: Add docs for the IPMI IPMB driver minyard

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=20211005004019.2670691-5-minyard@acm.org \
    --to=minyard@acm.org \
    --cc=andrew.manley@sealingtech.com \
    --cc=cminyard@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®