Lines Matching full:smi
38 struct ipmi_smi_powernv *smi = send_info; in ipmi_powernv_start_processing() local
40 smi->intf = intf; in ipmi_powernv_start_processing()
44 static void send_error_reply(struct ipmi_smi_powernv *smi, in send_error_reply() argument
51 ipmi_smi_msg_received(smi->intf, msg); in send_error_reply()
56 struct ipmi_smi_powernv *smi = send_info; in ipmi_powernv_send() local
74 spin_lock_irqsave(&smi->msg_lock, flags); in ipmi_powernv_send()
76 if (smi->cur_msg) { in ipmi_powernv_send()
82 opal_msg = smi->opal_msg; in ipmi_powernv_send()
93 smi->interface_id, opal_msg, size); in ipmi_powernv_send()
94 rc = opal_ipmi_send(smi->interface_id, opal_msg, size); in ipmi_powernv_send()
98 smi->cur_msg = msg; in ipmi_powernv_send()
99 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_send()
105 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_send()
107 send_error_reply(smi, msg, comp); in ipmi_powernv_send()
110 static int ipmi_powernv_recv(struct ipmi_smi_powernv *smi) in ipmi_powernv_recv() argument
119 smi->interface_id); in ipmi_powernv_recv()
121 spin_lock_irqsave(&smi->msg_lock, flags); in ipmi_powernv_recv()
123 if (!smi->cur_msg) { in ipmi_powernv_recv()
124 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_recv()
129 msg = smi->cur_msg; in ipmi_powernv_recv()
130 opal_msg = smi->opal_msg; in ipmi_powernv_recv()
134 rc = opal_ipmi_recv(smi->interface_id, in ipmi_powernv_recv()
143 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_recv()
147 smi->cur_msg = NULL; in ipmi_powernv_recv()
148 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_recv()
149 send_error_reply(smi, msg, IPMI_ERR_UNSPECIFIED); in ipmi_powernv_recv()
154 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_recv()
160 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_recv()
172 smi->cur_msg = NULL; in ipmi_powernv_recv()
173 spin_unlock_irqrestore(&smi->msg_lock, flags); in ipmi_powernv_recv()
174 ipmi_smi_msg_received(smi->intf, msg); in ipmi_powernv_recv()
189 struct ipmi_smi_powernv *smi = send_info; in ipmi_powernv_poll() local
191 ipmi_powernv_recv(smi); in ipmi_powernv_poll()
205 struct ipmi_smi_powernv *smi = data; in ipmi_opal_event() local
207 ipmi_powernv_recv(smi); in ipmi_opal_event()
266 dev_warn(dev, "IPMI SMI registration failed (%d)\n", rc); in ipmi_powernv_probe()
286 struct ipmi_smi_powernv *smi = dev_get_drvdata(&pdev->dev); in ipmi_powernv_remove() local
288 ipmi_unregister_smi(smi->intf); in ipmi_powernv_remove()
289 free_irq(smi->irq, smi); in ipmi_powernv_remove()
290 irq_dispose_mapping(smi->irq); in ipmi_powernv_remove()