+ ipmi-fix-request-events.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     IPMI: fix request events
has been added to the -mm tree.  Its filename is
     ipmi-fix-request-events.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: IPMI: fix request events
From: Corey Minyard <minyard@xxxxxxx>

When the IPMI message handler requested that the interface look for events,
the ipmi_si driver would request flags, see if the event buffer full flag was
set, then request events.  It's better to just send the request for events, as
it cuts one message out of the transaction if there happens to be events, and
it will fetch events even if the event buffer was not full.

Signed-off-by: Corey Minyard <minyard@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/char/ipmi/ipmi_si_intf.c |   24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff -puN drivers/char/ipmi/ipmi_si_intf.c~ipmi-fix-request-events drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c~ipmi-fix-request-events
+++ a/drivers/char/ipmi/ipmi_si_intf.c
@@ -684,22 +684,24 @@ static enum si_sm_result smi_event_handl
 	{
 		/* We are idle and the upper layer requested that I fetch
 		   events, so do so. */
-		unsigned char msg[2];
-
-		spin_lock(&smi_info->count_lock);
-		smi_info->flag_fetches++;
-		spin_unlock(&smi_info->count_lock);
-
 		atomic_set(&smi_info->req_events, 0);
-		msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
-		msg[1] = IPMI_GET_MSG_FLAGS_CMD;
+
+		smi_info->curr_msg = ipmi_alloc_smi_msg();
+		if (!smi_info->curr_msg)
+			goto out;
+
+		smi_info->curr_msg->data[0] = (IPMI_NETFN_APP_REQUEST << 2);
+		smi_info->curr_msg->data[1] = IPMI_READ_EVENT_MSG_BUFFER_CMD;
+		smi_info->curr_msg->data_size = 2;
 
 		smi_info->handlers->start_transaction(
-			smi_info->si_sm, msg, 2);
-		smi_info->si_state = SI_GETTING_FLAGS;
+			smi_info->si_sm,
+			smi_info->curr_msg->data,
+			smi_info->curr_msg->data_size);
+		smi_info->si_state = SI_GETTING_EVENTS;
 		goto restart;
 	}
-
+ out:
 	return si_sm_result;
 }
 
_

Patches currently in -mm which might be from minyard@xxxxxxx are

ipmi-fix-device-model-name.patch
ipmi-remove-interface-number-limits.patch
ipmi-pass-sysfs-name-from-lower-level-driver.patch
ipmi-allow-hot-system-interface-remove.patch
ipmi-add-maintenance-mode.patch
ipmi-fix-request-events.patch
ipmi-add-poll-delay.patch
ipmi-system-interface-hotplug.patch
ipmi-add-pigeonpoint-poweroff.patch
ipmi-fix-pci-warning.patch
ipmi-fix-bt-long-busy.patch
ipmi-increase-kcs-message-size.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux