History

ipmi: Fix how the lower layers are told to watch for messages

The IPMI driver has a mechanism to tell the lower layers it needs to watch for messages, commands, and watchdogs (so it doesn't needlessly poll). However, it needed some extensions, it needed a way to tell what is being waited for so it could set the timeout appropriately. The update to the lower layer was also being done once a second at best because it was done in the main timeout handler. However, if a command is sent and a response message is coming back, it needed to be started immediately. So modify the code to update immediately if it needs to be enabled. Disable is still lazy.

Corey Minyard committed 8 years ago

Commit c65ea991 parent a1466ec4 files · +134 −52Browse files

Unified · Split

4 files
  1. drivers/char/ipmi/ipmi_msghandler.c +85 −34
  2. drivers/char/ipmi/ipmi_si_intf.c +4 −1
  3. drivers/char/ipmi/ipmi_ssif.c +16 −10
  4. include/linux/ipmi_smi.h +29 −7
drivers/char/ipmi/ipmi_msghandler.c+85−34
@@ -529,9 +529,22 @@ struct ipmi_smi { · 528 unmodified lines
529 unsigned int waiting_events_count; /* How many events in queue? */529 unsigned int waiting_events_count; /* How many events in queue? */
530 char delivering_events;530 char delivering_events;
531 char event_msg_printed;531 char event_msg_printed;
532
533 /* How many users are waiting for events? */
532 atomic_t event_waiters;534 atomic_t event_waiters;
533 unsigned int ticks_to_req_ev;535 unsigned int ticks_to_req_ev;
534 int last_needs_timer;536
537 /* How many users are waiting for commands? */
538 atomic_t command_waiters;
539
540 /* How many users are waiting for watchdogs? */
541 atomic_t watchdog_waiters;
542
543 /*
544 * Tells what the lower layer has last been asked to watch for,
545 * messages and/or watchdogs. Protected by xmit_msgs_lock.
546 */
547 unsigned int last_watch_mask;
535 548
536 /*549 /*
537 * The event receiver for my BMC, only really used at panic550 * The event receiver for my BMC, only really used at panic
@@ -1078,6 +1091,29 @@ static int intf_err_seq(struct ipmi_smi *intf, · 540 unmodified lines
1078 return rv;1091 return rv;
1079}1092}
1080 1093
1094/* Must be called with xmit_msgs_lock held. */
1095static void smi_tell_to_watch(struct ipmi_smi *intf,
1096 unsigned int flags,
1097 struct ipmi_smi_msg *smi_msg)
1098{
1099 if (flags & IPMI_WATCH_MASK_CHECK_MESSAGES) {
1100 if (!smi_msg)
1101 return;
1102
1103 if (!smi_msg->needs_response)
1104 return;
1105 }
1106
1107 if (!intf->handlers->set_need_watch)
1108 return;
1109
1110 if ((intf->last_watch_mask & flags) == flags)
1111 return;
1112
1113 intf->last_watch_mask |= flags;
1114 intf->handlers->set_need_watch(intf->send_info,
1115 intf->last_watch_mask);
1116}
1081 1117
1082int ipmi_create_user(unsigned int if_num,1118int ipmi_create_user(unsigned int if_num,
1083 const struct ipmi_user_hndl *handler,1119 const struct ipmi_user_hndl *handler,
@@ -1141,8 +1177,9 @@ int ipmi_create_user(unsigned int if_num, · 57 unmodified lines
1141 spin_unlock_irqrestore(&intf->seq_lock, flags);1177 spin_unlock_irqrestore(&intf->seq_lock, flags);
1142 if (handler->ipmi_watchdog_pretimeout) {1178 if (handler->ipmi_watchdog_pretimeout) {
1143 /* User wants pretimeouts, so make sure to watch for them. */1179 /* User wants pretimeouts, so make sure to watch for them. */
1144 if (atomic_inc_return(&intf->event_waiters) == 1)1180 if (atomic_inc_return(&intf->watchdog_waiters) == 1)
1145 need_waiter(intf);1181 smi_tell_to_watch(intf, IPMI_WATCH_MASK_CHECK_WATCHDOG,
1182 NULL);
1146 }1183 }
1147 srcu_read_unlock(&ipmi_interfaces_srcu, index);1184 srcu_read_unlock(&ipmi_interfaces_srcu, index);
1148 *user = new_user;1185 *user = new_user;
@@ -1214,7 +1251,7 @@ static void _ipmi_destroy_user(struct ipmi_user *user) · 65 unmodified lines
1214 user->handler->shutdown(user->handler_data);1251 user->handler->shutdown(user->handler_data);
1215 1252
1216 if (user->handler->ipmi_watchdog_pretimeout)1253 if (user->handler->ipmi_watchdog_pretimeout)
1217 atomic_dec(&intf->event_waiters);1254 atomic_dec(&intf->watchdog_waiters);
1218 1255
1219 if (user->gets_events)1256 if (user->gets_events)
1220 atomic_dec(&intf->event_waiters);1257 atomic_dec(&intf->event_waiters);
@@ -1569,8 +1606,8 @@ int ipmi_register_for_cmd(struct ipmi_user *user, · 348 unmodified lines
1569 goto out_unlock;1606 goto out_unlock;
1570 }1607 }
1571 1608
1572 if (atomic_inc_return(&intf->event_waiters) == 1)1609 if (atomic_inc_return(&intf->command_waiters) == 1)
1573 need_waiter(intf);1610 smi_tell_to_watch(intf, IPMI_WATCH_MASK_CHECK_COMMANDS, NULL);
1574 1611
1575 list_add_rcu(&rcvr->link, &intf->cmd_rcvrs);1612 list_add_rcu(&rcvr->link, &intf->cmd_rcvrs);
1576 1613
@@ -1620,7 +1657,7 @@ int ipmi_unregister_for_cmd(struct ipmi_user *user, · 43 unmodified lines
1620 synchronize_rcu();1657 synchronize_rcu();
1621 release_ipmi_user(user, index);1658 release_ipmi_user(user, index);
1622 while (rcvrs) {1659 while (rcvrs) {
1623 atomic_dec(&intf->event_waiters);1660 atomic_dec(&intf->command_waiters);
1624 rcvr = rcvrs;1661 rcvr = rcvrs;
1625 rcvrs = rcvr->next;1662 rcvrs = rcvr->next;
1626 kfree(rcvr);1663 kfree(rcvr);
@@ -1737,22 +1774,21 @@ static struct ipmi_smi_msg *smi_add_send_msg(struct ipmi_smi *intf, · 110 unmodified lines
1737 return smi_msg;1774 return smi_msg;
1738}1775}
1739 1776
1740
1741static void smi_send(struct ipmi_smi *intf,1777static void smi_send(struct ipmi_smi *intf,
1742 const struct ipmi_smi_handlers *handlers,1778 const struct ipmi_smi_handlers *handlers,
1743 struct ipmi_smi_msg *smi_msg, int priority)1779 struct ipmi_smi_msg *smi_msg, int priority)
1744{1780{
1745 int run_to_completion = intf->run_to_completion;1781 int run_to_completion = intf->run_to_completion;
1782 unsigned long flags = 0;
1746 1783
1747 if (run_to_completion) {1784 if (!run_to_completion)
1748 smi_msg = smi_add_send_msg(intf, smi_msg, priority);
1749 } else {
1750 unsigned long flags;
1751
1752 spin_lock_irqsave(&intf->xmit_msgs_lock, flags);1785 spin_lock_irqsave(&intf->xmit_msgs_lock, flags);
1753 smi_msg = smi_add_send_msg(intf, smi_msg, priority);1786 smi_msg = smi_add_send_msg(intf, smi_msg, priority);
1787
1788 smi_tell_to_watch(intf, IPMI_WATCH_MASK_CHECK_MESSAGES, smi_msg);
1789
1790 if (!run_to_completion)
1754 spin_unlock_irqrestore(&intf->xmit_msgs_lock, flags);1791 spin_unlock_irqrestore(&intf->xmit_msgs_lock, flags);
1755 }
1756 1792
1757 if (smi_msg)1793 if (smi_msg)
1758 handlers->sender(intf->send_info, smi_msg);1794 handlers->sender(intf->send_info, smi_msg);
@@ -1950,6 +1986,9 @@ static int i_ipmi_req_ipmb(struct ipmi_smi *intf, · 191 unmodified lines
1950 ipmb_seq, broadcast,1986 ipmb_seq, broadcast,
1951 source_address, source_lun);1987 source_address, source_lun);
1952 1988
1989 /* We will be getting a response in the BMC message queue. */
1990 smi_msg->needs_response = true;
1991
1953 /*1992 /*
1954 * Copy the message into the recv message data, so we1993 * Copy the message into the recv message data, so we
1955 * can retransmit it later if necessary.1994 * can retransmit it later if necessary.
@@ -2137,6 +2176,7 @@ static int i_ipmi_request(struct ipmi_user *user, · 181 unmodified lines
2137 goto out;2176 goto out;
2138 }2177 }
2139 }2178 }
2179 smi_msg->needs_response = false;
2140 2180
2141 rcu_read_lock();2181 rcu_read_lock();
2142 if (intf->in_shutdown) {2182 if (intf->in_shutdown) {
@@ -3351,6 +3391,8 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers, · 1208 unmodified lines
3351 INIT_LIST_HEAD(&intf->hp_xmit_msgs);3391 INIT_LIST_HEAD(&intf->hp_xmit_msgs);
3352 spin_lock_init(&intf->events_lock);3392 spin_lock_init(&intf->events_lock);
3353 atomic_set(&intf->event_waiters, 0);3393 atomic_set(&intf->event_waiters, 0);
3394 atomic_set(&intf->watchdog_waiters, 0);
3395 atomic_set(&intf->command_waiters, 0);
3354 intf->ticks_to_req_ev = IPMI_REQUEST_EV_TIME;3396 intf->ticks_to_req_ev = IPMI_REQUEST_EV_TIME;
3355 INIT_LIST_HEAD(&intf->waiting_events);3397 INIT_LIST_HEAD(&intf->waiting_events);
3356 intf->waiting_events_count = 0;3398 intf->waiting_events_count = 0;
@@ -4365,6 +4407,9 @@ static void smi_recv_tasklet(unsigned long val) · 1008 unmodified lines
4365 intf->curr_msg = newmsg;4407 intf->curr_msg = newmsg;
4366 }4408 }
4367 }4409 }
4410
4411 smi_tell_to_watch(intf, IPMI_WATCH_MASK_CHECK_MESSAGES, newmsg);
4412
4368 if (!run_to_completion)4413 if (!run_to_completion)
4369 spin_unlock_irqrestore(&intf->xmit_msgs_lock, flags);4414 spin_unlock_irqrestore(&intf->xmit_msgs_lock, flags);
4370 if (newmsg)4415 if (newmsg)
@@ -4492,7 +4537,7 @@ static void check_msg_timeout(struct ipmi_smi *intf, struct seq_table *ent, · 121 unmodified lines
4492 struct list_head *timeouts,4537 struct list_head *timeouts,
4493 unsigned long timeout_period,4538 unsigned long timeout_period,
4494 int slot, unsigned long *flags,4539 int slot, unsigned long *flags,
4495 unsigned int *waiting_msgs)4540 unsigned int *watch_mask)
4496{4541{
4497 struct ipmi_recv_msg *msg;4542 struct ipmi_recv_msg *msg;
4498 4543
@@ -4504,7 +4549,7 @@ static void check_msg_timeout(struct ipmi_smi *intf, struct seq_table *ent, · 5 unmodified lines
4504 4549
4505 if (timeout_period < ent->timeout) {4550 if (timeout_period < ent->timeout) {
4506 ent->timeout -= timeout_period;4551 ent->timeout -= timeout_period;
4507 (*waiting_msgs)++;4552 *watch_mask |= IPMI_WATCH_MASK_CHECK_MESSAGES;
4508 return;4553 return;
4509 }4554 }
4510 4555
@@ -4523,7 +4568,7 @@ static void check_msg_timeout(struct ipmi_smi *intf, struct seq_table *ent, · 12 unmodified lines
4523 struct ipmi_smi_msg *smi_msg;4568 struct ipmi_smi_msg *smi_msg;
4524 /* More retries, send again. */4569 /* More retries, send again. */
4525 4570
4526 (*waiting_msgs)++;4571 *watch_mask |= IPMI_WATCH_MASK_CHECK_MESSAGES;
4527 4572
4528 /*4573 /*
4529 * Start with the max timer, set to normal timer after4574 * Start with the max timer, set to normal timer after
@@ -4575,13 +4620,13 @@ static unsigned int ipmi_timeout_handler(struct ipmi_smi *intf, · 45 unmodified lines
4575 struct ipmi_recv_msg *msg, *msg2;4620 struct ipmi_recv_msg *msg, *msg2;
4576 unsigned long flags;4621 unsigned long flags;
4577 int i;4622 int i;
4578 unsigned int waiting_msgs = 0;4623 unsigned int watch_mask = 0;
4579 4624
4580 if (!intf->bmc_registered) {4625 if (!intf->bmc_registered) {
4581 kref_get(&intf->refcount);4626 kref_get(&intf->refcount);
4582 if (!schedule_work(&intf->bmc_reg_work)) {4627 if (!schedule_work(&intf->bmc_reg_work)) {
4583 kref_put(&intf->refcount, intf_free);4628 kref_put(&intf->refcount, intf_free);
4584 waiting_msgs++;4629 watch_mask |= IPMI_WATCH_MASK_INTERNAL;
4585 }4630 }
4586 }4631 }
4587 4632
@@ -4601,7 +4646,7 @@ static unsigned int ipmi_timeout_handler(struct ipmi_smi *intf, · 13 unmodified lines
4601 for (i = 0; i < IPMI_IPMB_NUM_SEQ; i++)4646 for (i = 0; i < IPMI_IPMB_NUM_SEQ; i++)
4602 check_msg_timeout(intf, &intf->seq_table[i],4647 check_msg_timeout(intf, &intf->seq_table[i],
4603 &timeouts, timeout_period, i,4648 &timeouts, timeout_period, i,
4604 &flags, &waiting_msgs);4649 &flags, &watch_mask);
4605 spin_unlock_irqrestore(&intf->seq_lock, flags);4650 spin_unlock_irqrestore(&intf->seq_lock, flags);
4606 4651
4607 list_for_each_entry_safe(msg, msg2, &timeouts, link)4652 list_for_each_entry_safe(msg, msg2, &timeouts, link)
@@ -4632,7 +4677,7 @@ static unsigned int ipmi_timeout_handler(struct ipmi_smi *intf, · 24 unmodified lines
4632 4677
4633 tasklet_schedule(&intf->recv_tasklet);4678 tasklet_schedule(&intf->recv_tasklet);
4634 4679
4635 return waiting_msgs;4680 return watch_mask;
4636}4681}
4637 4682
4638static void ipmi_request_event(struct ipmi_smi *intf)4683static void ipmi_request_event(struct ipmi_smi *intf)
@@ -4652,37 +4697,43 @@ static atomic_t stop_operation; · 13 unmodified lines
4652static void ipmi_timeout(struct timer_list *unused)4697static void ipmi_timeout(struct timer_list *unused)
4653{4698{
4654 struct ipmi_smi *intf;4699 struct ipmi_smi *intf;
4655 int nt = 0, index;4700 unsigned int watch_mask = 0;
4701 int index;
4702 unsigned long flags;
4656 4703
4657 if (atomic_read(&stop_operation))4704 if (atomic_read(&stop_operation))
4658 return;4705 return;
4659 4706
4660 index = srcu_read_lock(&ipmi_interfaces_srcu);4707 index = srcu_read_lock(&ipmi_interfaces_srcu);
4661 list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {4708 list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
4662 int lnt = 0;
4663
4664 if (atomic_read(&intf->event_waiters)) {4709 if (atomic_read(&intf->event_waiters)) {
4665 intf->ticks_to_req_ev--;4710 intf->ticks_to_req_ev--;
4666 if (intf->ticks_to_req_ev == 0) {4711 if (intf->ticks_to_req_ev == 0) {
4667 ipmi_request_event(intf);4712 ipmi_request_event(intf);
4668 intf->ticks_to_req_ev = IPMI_REQUEST_EV_TIME;4713 intf->ticks_to_req_ev = IPMI_REQUEST_EV_TIME;
4669 }4714 }
4670 lnt++;4715 watch_mask |= IPMI_WATCH_MASK_INTERNAL;
4671 }4716 }
4672 4717
4673 lnt += ipmi_timeout_handler(intf, IPMI_TIMEOUT_TIME);4718 if (atomic_read(&intf->watchdog_waiters))
4719 watch_mask |= IPMI_WATCH_MASK_CHECK_WATCHDOG;
4674 4720
4675 lnt = !!lnt;4721 if (atomic_read(&intf->command_waiters))
4676 if (lnt != intf->last_needs_timer &&4722 watch_mask |= IPMI_WATCH_MASK_CHECK_COMMANDS;
4677 intf->handlers->set_need_watch)4723
4678 intf->handlers->set_need_watch(intf->send_info, lnt);4724 watch_mask |= ipmi_timeout_handler(intf, IPMI_TIMEOUT_TIME);
4679 intf->last_needs_timer = lnt;
4680 4725
4681 nt += lnt;4726 spin_lock_irqsave(&intf->xmit_msgs_lock, flags);
4727 if (watch_mask != intf->last_watch_mask &&
4728 intf->handlers->set_need_watch)
4729 intf->handlers->set_need_watch(intf->send_info,
4730 watch_mask);
4731 intf->last_watch_mask = watch_mask;
4732 spin_unlock_irqrestore(&intf->xmit_msgs_lock, flags);
4682 }4733 }
4683 srcu_read_unlock(&ipmi_interfaces_srcu, index);4734 srcu_read_unlock(&ipmi_interfaces_srcu, index);
4684 4735
4685 if (nt)4736 if (watch_mask)
4686 mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);4737 mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
4687}4738}
4688 4739
drivers/char/ipmi/ipmi_si_intf.c+4−1
@@ -1060,10 +1060,13 @@ static void request_events(void *send_info) · 1059 unmodified lines
1060 atomic_set(&smi_info->req_events, 1);1060 atomic_set(&smi_info->req_events, 1);
1061}1061}
1062 1062
1063static void set_need_watch(void *send_info, bool enable)1063static void set_need_watch(void *send_info, unsigned int watch_mask)
1064{1064{
1065 struct smi_info *smi_info = send_info;1065 struct smi_info *smi_info = send_info;
1066 unsigned long flags;1066 unsigned long flags;
1067 int enable;
1068
1069 enable = !!(watch_mask & ~IPMI_WATCH_MASK_INTERNAL);
1067 1070
1068 atomic_set(&smi_info->need_watch, enable);1071 atomic_set(&smi_info->need_watch, enable);
1069 spin_lock_irqsave(&smi_info->si_lock, flags);1072 spin_lock_irqsave(&smi_info->si_lock, flags);
drivers/char/ipmi/ipmi_ssif.c+16−10
@@ -93,8 +93,8 @@ · 92 unmodified lines
93/*93/*
94 * Timeout for the watch, only used for get flag timer.94 * Timeout for the watch, only used for get flag timer.
95 */95 */
96#define SSIF_WATCH_TIMEOUT_MSEC 10096#define SSIF_WATCH_MSG_TIMEOUT msecs_to_jiffies(10)
97#define SSIF_WATCH_TIMEOUT_JIFFIES msecs_to_jiffies(SSIF_WATCH_TIMEOUT_MSEC)97#define SSIF_WATCH_WATCHDOG_TIMEOUT msecs_to_jiffies(250)
98 98
99enum ssif_intf_state {99enum ssif_intf_state {
100 SSIF_NORMAL,100 SSIF_NORMAL,
@@ -276,7 +276,7 @@ struct ssif_info { · 175 unmodified lines
276 struct timer_list retry_timer;276 struct timer_list retry_timer;
277 int retries_left;277 int retries_left;
278 278
279 bool need_watch; /* Need to look for flags? */279 long watch_timeout; /* Timeout for flags check, 0 if off. */
280 struct timer_list watch_timer; /* Flag fetch timer. */280 struct timer_list watch_timer; /* Flag fetch timer. */
281 281
282 /* Info from SSIF cmd */282 /* Info from SSIF cmd */
@@ -578,9 +578,9 @@ static void watch_timeout(struct timer_list *t) · 295 unmodified lines
578 return;578 return;
579 579
580 flags = ipmi_ssif_lock_cond(ssif_info, &oflags);580 flags = ipmi_ssif_lock_cond(ssif_info, &oflags);
581 if (ssif_info->need_watch) {581 if (ssif_info->watch_timeout) {
582 mod_timer(&ssif_info->watch_timer,582 mod_timer(&ssif_info->watch_timer,
583 jiffies + SSIF_WATCH_TIMEOUT_JIFFIES);583 jiffies + ssif_info->watch_timeout);
584 if (SSIF_IDLE(ssif_info)) {584 if (SSIF_IDLE(ssif_info)) {
585 start_flag_fetch(ssif_info, flags); /* Releases lock */585 start_flag_fetch(ssif_info, flags); /* Releases lock */
586 return;586 return;
@@ -1121,17 +1121,23 @@ static void request_events(void *send_info) · 534 unmodified lines
1121 * Upper layer is changing the flag saying whether we need to request1121 * Upper layer is changing the flag saying whether we need to request
1122 * flags periodically or not.1122 * flags periodically or not.
1123 */1123 */
1124static void ssif_set_need_watch(void *send_info, bool enable)1124static void ssif_set_need_watch(void *send_info, unsigned int watch_mask)
1125{1125{
1126 struct ssif_info *ssif_info = (struct ssif_info *) send_info;1126 struct ssif_info *ssif_info = (struct ssif_info *) send_info;
1127 unsigned long oflags, *flags;1127 unsigned long oflags, *flags;
1128 long timeout = 0;
1129
1130 if (watch_mask & IPMI_WATCH_MASK_CHECK_MESSAGES)
1131 timeout = SSIF_WATCH_MSG_TIMEOUT;
1132 else if (watch_mask & ~IPMI_WATCH_MASK_INTERNAL)
1133 timeout = SSIF_WATCH_WATCHDOG_TIMEOUT;
1128 1134
1129 flags = ipmi_ssif_lock_cond(ssif_info, &oflags);1135 flags = ipmi_ssif_lock_cond(ssif_info, &oflags);
1130 if (enable != ssif_info->need_watch) {1136 if (timeout != ssif_info->watch_timeout) {
1131 ssif_info->need_watch = enable;1137 ssif_info->watch_timeout = timeout;
1132 if (ssif_info->need_watch)1138 if (ssif_info->watch_timeout)
1133 mod_timer(&ssif_info->watch_timer,1139 mod_timer(&ssif_info->watch_timer,
1134 jiffies + SSIF_WATCH_TIMEOUT_JIFFIES);1140 jiffies + ssif_info->watch_timeout);
1135 }1141 }
1136 ipmi_ssif_unlock_cond(ssif_info, flags);1142 ipmi_ssif_unlock_cond(ssif_info, flags);
1137}1143}
include/linux/ipmi_smi.h+29−7
@@ -30,6 +30,17 @@ struct device; · 29 unmodified lines
30/* Structure for the low-level drivers. */30/* Structure for the low-level drivers. */
31struct ipmi_smi;31struct ipmi_smi;
32 32
33/*
34 * Flags for set_check_watch() below. Tells if the SMI should be
35 * waiting for watchdog timeouts, commands and/or messages. There is
36 * also an internal flag for the message handler, SMIs should ignore
37 * it.
38 */
39#define IPMI_WATCH_MASK_INTERNAL (1 << 0)
40#define IPMI_WATCH_MASK_CHECK_MESSAGES (1 << 1)
41#define IPMI_WATCH_MASK_CHECK_WATCHDOG (1 << 2)
42#define IPMI_WATCH_MASK_CHECK_COMMANDS (1 << 3)
43
33/*44/*
34 * Messages to/from the lower layer. The smi interface will take one45 * Messages to/from the lower layer. The smi interface will take one
35 * of these to send. After the send has occurred and a response has46 * of these to send. After the send has occurred and a response has
@@ -55,8 +66,16 @@ struct ipmi_smi_msg { · 19 unmodified lines
55 int rsp_size;66 int rsp_size;
56 unsigned char rsp[IPMI_MAX_MSG_LENGTH];67 unsigned char rsp[IPMI_MAX_MSG_LENGTH];
57 68
58 /* Will be called when the system is done with the message69 /*
59 (presumably to free it). */70 * There should be a response message coming back in the BMC
71 * message queue.
72 */
73 bool needs_response;
74
75 /*
76 * Will be called when the system is done with the message
77 * (presumably to free it).
78 */
60 void (*done)(struct ipmi_smi_msg *msg);79 void (*done)(struct ipmi_smi_msg *msg);
61};80};
62 81
@@ -105,12 +124,15 @@ struct ipmi_smi_handlers { · 42 unmodified lines
105 124
106 /*125 /*
107 * Called by the upper layer when some user requires that the126 * Called by the upper layer when some user requires that the
108 * interface watch for events, received messages, watchdog127 * interface watch for received messages and watchdog
109 * pretimeouts, or not. Used by the SMI to know if it should128 * pretimeouts (basically do a "Get Flags", or not. Used by
110 * watch for these. This may be NULL if the SMI does not129 * the SMI to know if it should watch for these. This may be
111 * implement it.130 * NULL if the SMI does not implement it. watch_mask is from
131 * IPMI_WATCH_MASK_xxx above. The interface should run slower
132 * timeouts for just watchdog checking or faster timeouts when
133 * waiting for the message queue.
112 */134 */
113 void (*set_need_watch)(void *send_info, bool enable);135 void (*set_need_watch)(void *send_info, unsigned int watch_mask);
114 136
115 /*137 /*
116 * Called when flushing all pending messages.138 * Called when flushing all pending messages.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t