ipmi_kcs.c (182321) | ipmi_kcs.c (248705) |
---|---|
1/*- 2 * Copyright (c) 2006 IronPort Systems Inc. <ambrisko@ironport.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 IronPort Systems Inc. <ambrisko@ironport.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/ipmi/ipmi_kcs.c 182321 2008-08-28 02:11:04Z jhb $"); | 28__FBSDID("$FreeBSD: head/sys/dev/ipmi/ipmi_kcs.c 248705 2013-03-25 14:30:34Z melifaro $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/condvar.h> 34#include <sys/eventhandler.h> 35#include <sys/kernel.h> 36#include <sys/kthread.h> --- 414 unchanged lines hidden (view full) --- 451kcs_loop(void *arg) 452{ 453 struct ipmi_softc *sc = arg; 454 struct ipmi_request *req; 455 int i, ok; 456 457 IPMI_LOCK(sc); 458 while ((req = ipmi_dequeue_request(sc)) != NULL) { | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/condvar.h> 34#include <sys/eventhandler.h> 35#include <sys/kernel.h> 36#include <sys/kthread.h> --- 414 unchanged lines hidden (view full) --- 451kcs_loop(void *arg) 452{ 453 struct ipmi_softc *sc = arg; 454 struct ipmi_request *req; 455 int i, ok; 456 457 IPMI_LOCK(sc); 458 while ((req = ipmi_dequeue_request(sc)) != NULL) { |
459 IPMI_UNLOCK(sc); |
|
459 ok = 0; 460 for (i = 0; i < 3 && !ok; i++) 461 ok = kcs_polled_request(sc, req); 462 if (ok) 463 req->ir_error = 0; 464 else 465 req->ir_error = EIO; | 460 ok = 0; 461 for (i = 0; i < 3 && !ok; i++) 462 ok = kcs_polled_request(sc, req); 463 if (ok) 464 req->ir_error = 0; 465 else 466 req->ir_error = EIO; |
467 IPMI_LOCK(sc); |
|
466 ipmi_complete_request(sc, req); 467 } 468 IPMI_UNLOCK(sc); 469 kproc_exit(0); 470} 471 472static int 473kcs_startup(struct ipmi_softc *sc) --- 134 unchanged lines hidden --- | 468 ipmi_complete_request(sc, req); 469 } 470 IPMI_UNLOCK(sc); 471 kproc_exit(0); 472} 473 474static int 475kcs_startup(struct ipmi_softc *sc) --- 134 unchanged lines hidden --- |