Skip to contentSkip to conversation

ipmi in kernel 2.6.11

PATCH In review Bene Martin 3 participants 4 messages Mar 5, 2005 – Mar 6, 2005 IPMI

lore
Share & tools
lore
#0 lore raw

Hi Adrian,

bmcsensors package (reading hardware sensors provided by intel boards via ipmi) used to work fine with 2.6.10; no longer works with 2.6.11 because of removal of the ipmi_request function (+ exported symbol).

correct fix would be to use ipmi_request_settime with retries=-1 and retry_time_ms=0?

Thanks, Martin

#1 lore raw
Quoted 10 lines · Bene Martin

Hi Adrian,

bmcsensors package (reading hardware sensors provided by intel boards via ipmi) used to work fine with 2.6.10; no longer works with 2.6.11 because of removal of the ipmi_request function (+ exported symbol).

correct fix would be to use ipmi_request_settime with retries=-1 and retry_time_ms=0?

That fix should work fine. Sorry about that, I didn't know anyone was using that function, and the unused function police found it :).

-Corey

#2 lore raw

PATCH 1/1 readd ipmi_request

In reply to Bene Martin
Quoted 8 lines · Bene Martin

Hi Adrian,

bmcsensors package (reading hardware sensors provided by intel boards via ipmi) used to work fine with 2.6.10; no longer works with 2.6.11 because of removal of the ipmi_request function (+ exported symbol).

correct fix would be to use ipmi_request_settime with retries=-1 and retry_time_ms=0?

I didn't know about this, the patch below readds ipmi_request.

Quoted 1 line

Thanks, Martin

<-- snip -->

Readd ipmi_request because it's used by bmcsensors.

---

 drivers/char/ipmi/ipmi_msghandler.c |   21 +++++++++++++++++++++
 include/linux/ipmi.h                |   26 ++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
include/linux/ipmi.h renamed from include/linux/ipmi.h.old +26 -0
@@ -302,6 +302,32 @@
 unsigned char ipmi_get_my_LUN(ipmi_user_t user);
 
 /*
+ * Send a command request from the given user.  The address is the
+ * proper address for the channel type.  If this is a command, then
+ * the message response comes back, the receive handler for this user
+ * will be called with the given msgid value in the recv msg.  If this
+ * is a response to a command, then the msgid will be used as the
+ * sequence number for the response (truncated if necessary), so when
+ * sending a response you should use the sequence number you received
+ * in the msgid field of the received command.  If the priority is >
+ * 0, the message will go into a high-priority queue and be sent
+ * first.  Otherwise, it goes into a normal-priority queue.
+ * The user_msg_data field will be returned in any response to this
+ * message.
+ *
+ * Note that if you send a response (with the netfn lower bit set),
+ * you *will* get back a SEND_MSG response telling you what happened
+ * when the response was sent.  You will not get back a response to
+ * the message itself.
+ */
+int ipmi_request(ipmi_user_t      user,
+		 struct ipmi_addr *addr,
+		 long             msgid,
+		 struct kernel_ipmi_msg *msg,
+		 void             *user_msg_data,
+		 int              priority);
+
+/*
  * Like ipmi_request, but lets you specify the number of retries and
  * the retry time.  The retries is the number of times the message
  * will be resent if no reply is received.  If set to -1, the default
drivers/char/ipmi/ipmi_msghandler.c renamed from drivers/char/ipmi/ipmi_msghandler.c.old +21 -0
@@ -1339,6 +1339,27 @@
 	return rv;
 }
 
+int ipmi_request(ipmi_user_t      user,
+		 struct ipmi_addr *addr,
+		 long             msgid,
+		 struct kernel_ipmi_msg  *msg,
+		 void             *user_msg_data,
+		 int              priority)
+{
+	return i_ipmi_request(user,
+			      user->intf,
+			      addr,
+			      msgid,
+			      msg,
+			      user_msg_data,
+			      NULL, NULL,
+			      priority,
+			      user->intf->my_address,
+			      user->intf->my_lun,
+			      -1, 0);
+}
+EXPORT_SYMBOL(ipmi_request);
+
 int ipmi_request_settime(ipmi_user_t      user,
 			 struct ipmi_addr *addr,
 			 long             msgid,
#3 lore raw

Re: [2.6 patch] readd ipmi_request

Quoted 10 lines · Adrian Bunk
Quoted 6 lines · Bene Martin

Hi Adrian,

bmcsensors package (reading hardware sensors provided by intel boards via ipmi) used to work fine with 2.6.10; no longer works with 2.6.11 because of removal of the ipmi_request function (+ exported symbol).

Quoted 8 lines
Quoted 4 lines

correct fix would be to use ipmi_request_settime with retries=-1 and retry_time_ms=0?

I didn't know about this, the patch below readds ipmi_request.

IMHO, it's probably better to modify your patch to use ipmi_request_settime. That function is there is all recent kernels. Unfortunately, I can't magically re-add the ipmi_request function to 2.6.11, and it would be less confusing to have a new patch for bmcsensors that worked with stock 2.6.11.

Again, sorry about this.

-Corey