diff options
author | Corey Minyard <cminyard@mvista.com> | 2008-04-29 04:01:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:14 -0400 |
commit | 87ebd06f2f362acc3fd866f28a917b53c0ff560a (patch) | |
tree | 6664ec6f7494788bad9e5a46ec4f40bccbe4078d /drivers | |
parent | 5956dce1485efe3816febc24aa52490dcb2be837 (diff) |
ipmi: don't print event queue full on every event
Don't print out that the event queue is full on every event, only
print something out when it becomes full or becomes not full.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 8b71f5638b60..b75e2c549720 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -253,7 +253,8 @@ struct ipmi_smi | |||
253 | spinlock_t events_lock; /* For dealing with event stuff. */ | 253 | spinlock_t events_lock; /* For dealing with event stuff. */ |
254 | struct list_head waiting_events; | 254 | struct list_head waiting_events; |
255 | unsigned int waiting_events_count; /* How many events in queue? */ | 255 | unsigned int waiting_events_count; /* How many events in queue? */ |
256 | int delivering_events; | 256 | char delivering_events; |
257 | char event_msg_printed; | ||
257 | 258 | ||
258 | /* The event receiver for my BMC, only really used at panic | 259 | /* The event receiver for my BMC, only really used at panic |
259 | shutdown as a place to store this. */ | 260 | shutdown as a place to store this. */ |
@@ -1083,6 +1084,11 @@ int ipmi_set_gets_events(ipmi_user_t user, int val) | |||
1083 | list_for_each_entry_safe(msg, msg2, &intf->waiting_events, link) | 1084 | list_for_each_entry_safe(msg, msg2, &intf->waiting_events, link) |
1084 | list_move_tail(&msg->link, &msgs); | 1085 | list_move_tail(&msg->link, &msgs); |
1085 | intf->waiting_events_count = 0; | 1086 | intf->waiting_events_count = 0; |
1087 | if (intf->event_msg_printed) { | ||
1088 | printk(KERN_WARNING PFX "Event queue no longer" | ||
1089 | " full\n"); | ||
1090 | intf->event_msg_printed = 0; | ||
1091 | } | ||
1086 | 1092 | ||
1087 | intf->delivering_events = 1; | 1093 | intf->delivering_events = 1; |
1088 | spin_unlock_irqrestore(&intf->events_lock, flags); | 1094 | spin_unlock_irqrestore(&intf->events_lock, flags); |
@@ -3261,11 +3267,12 @@ static int handle_read_event_rsp(ipmi_smi_t intf, | |||
3261 | copy_event_into_recv_msg(recv_msg, msg); | 3267 | copy_event_into_recv_msg(recv_msg, msg); |
3262 | list_add_tail(&(recv_msg->link), &(intf->waiting_events)); | 3268 | list_add_tail(&(recv_msg->link), &(intf->waiting_events)); |
3263 | intf->waiting_events_count++; | 3269 | intf->waiting_events_count++; |
3264 | } else { | 3270 | } else if (!intf->event_msg_printed) { |
3265 | /* There's too many things in the queue, discard this | 3271 | /* There's too many things in the queue, discard this |
3266 | message. */ | 3272 | message. */ |
3267 | printk(KERN_WARNING PFX "Event queue full, discarding an" | 3273 | printk(KERN_WARNING PFX "Event queue full, discarding" |
3268 | " incoming event\n"); | 3274 | " incoming events\n"); |
3275 | intf->event_msg_printed = 1; | ||
3269 | } | 3276 | } |
3270 | 3277 | ||
3271 | out: | 3278 | out: |