Unlock IPMI sc while performing requests via KCS and SMIC interfaces.

It is already done in SSIF interface code.
This reduces contention/spinning reported by many users.

PR:		kern/172166
Submitted by:	Eric van Gyzen <eric at vangyzen.net>
MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2013-03-25 14:30:34 +00:00
parent 6a740c4a4f
commit 58e8e6e6bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248705
2 changed files with 4 additions and 0 deletions

View file

@ -456,6 +456,7 @@ kcs_loop(void *arg)
IPMI_LOCK(sc);
while ((req = ipmi_dequeue_request(sc)) != NULL) {
IPMI_UNLOCK(sc);
ok = 0;
for (i = 0; i < 3 && !ok; i++)
ok = kcs_polled_request(sc, req);
@ -463,6 +464,7 @@ kcs_loop(void *arg)
req->ir_error = 0;
else
req->ir_error = EIO;
IPMI_LOCK(sc);
ipmi_complete_request(sc, req);
}
IPMI_UNLOCK(sc);

View file

@ -362,6 +362,7 @@ smic_loop(void *arg)
IPMI_LOCK(sc);
while ((req = ipmi_dequeue_request(sc)) != NULL) {
IPMI_UNLOCK(sc);
ok = 0;
for (i = 0; i < 3 && !ok; i++)
ok = smic_polled_request(sc, req);
@ -369,6 +370,7 @@ smic_loop(void *arg)
req->ir_error = 0;
else
req->ir_error = EIO;
IPMI_LOCK(sc);
ipmi_complete_request(sc, req);
}
IPMI_UNLOCK(sc);