linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ipmi in kernel 2.6.11
@ 2005-03-05  9:41 Bene Martin
  2005-03-05 15:41 ` Corey Minyard
  2005-03-05 18:03 ` [2.6 patch] readd ipmi_request Adrian Bunk
  0 siblings, 2 replies; 4+ messages in thread
From: Bene Martin @ 2005-03-05  9:41 UTC (permalink / raw)
  To: bunk; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ipmi in kernel 2.6.11
  2005-03-05  9:41 ipmi in kernel 2.6.11 Bene Martin
@ 2005-03-05 15:41 ` Corey Minyard
  2005-03-05 18:03 ` [2.6 patch] readd ipmi_request Adrian Bunk
  1 sibling, 0 replies; 4+ messages in thread
From: Corey Minyard @ 2005-03-05 15:41 UTC (permalink / raw)
  To: Bene Martin; +Cc: bunk, linux-kernel

Bene Martin wrote:

>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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [2.6 patch] readd ipmi_request
  2005-03-05  9:41 ipmi in kernel 2.6.11 Bene Martin
  2005-03-05 15:41 ` Corey Minyard
@ 2005-03-05 18:03 ` Adrian Bunk
  2005-03-06 22:43   ` Corey Minyard
  1 sibling, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2005-03-05 18:03 UTC (permalink / raw)
  To: Bene Martin, minyard; +Cc: linux-kernel

On Sat, Mar 05, 2005 at 10:41:31AM +0100, Bene Martin wrote:

> 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.

> Thanks, Martin


<--  snip  -->


Readd ipmi_request because it's used by bmcsensors.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/char/ipmi/ipmi_msghandler.c |   21 +++++++++++++++++++++
 include/linux/ipmi.h                |   26 ++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

--- linux-2.6.11-mm1-full/include/linux/ipmi.h.old	2005-03-05 17:32:55.000000000 +0100
+++ linux-2.6.11-mm1-full/include/linux/ipmi.h	2005-03-05 17:43:14.000000000 +0100
@@ -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
--- linux-2.6.11-mm1-full/drivers/char/ipmi/ipmi_msghandler.c.old	2005-03-05 17:33:10.000000000 +0100
+++ linux-2.6.11-mm1-full/drivers/char/ipmi/ipmi_msghandler.c	2005-03-05 17:43:14.000000000 +0100
@@ -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,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [2.6 patch] readd ipmi_request
  2005-03-05 18:03 ` [2.6 patch] readd ipmi_request Adrian Bunk
@ 2005-03-06 22:43   ` Corey Minyard
  0 siblings, 0 replies; 4+ messages in thread
From: Corey Minyard @ 2005-03-06 22:43 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Bene Martin, minyard, linux-kernel

Adrian Bunk wrote:

>On Sat, Mar 05, 2005 at 10:41:31AM +0100, Bene Martin wrote:
>
>  
>
>>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.
>  
>
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-06 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-05  9:41 ipmi in kernel 2.6.11 Bene Martin
2005-03-05 15:41 ` Corey Minyard
2005-03-05 18:03 ` [2.6 patch] readd ipmi_request Adrian Bunk
2005-03-06 22:43   ` Corey Minyard

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).