ipmi_smic.c (172836) | ipmi_smic.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_smic.c 172836 2007-10-20 23:23:23Z julian $"); | 28__FBSDID("$FreeBSD: head/sys/dev/ipmi/ipmi_smic.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> --- 320 unchanged lines hidden (view full) --- 357smic_loop(void *arg) 358{ 359 struct ipmi_softc *sc = arg; 360 struct ipmi_request *req; 361 int i, ok; 362 363 IPMI_LOCK(sc); 364 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> --- 320 unchanged lines hidden (view full) --- 357smic_loop(void *arg) 358{ 359 struct ipmi_softc *sc = arg; 360 struct ipmi_request *req; 361 int i, ok; 362 363 IPMI_LOCK(sc); 364 while ((req = ipmi_dequeue_request(sc)) != NULL) { |
365 IPMI_UNLOCK(sc); |
|
365 ok = 0; 366 for (i = 0; i < 3 && !ok; i++) 367 ok = smic_polled_request(sc, req); 368 if (ok) 369 req->ir_error = 0; 370 else 371 req->ir_error = EIO; | 366 ok = 0; 367 for (i = 0; i < 3 && !ok; i++) 368 ok = smic_polled_request(sc, req); 369 if (ok) 370 req->ir_error = 0; 371 else 372 req->ir_error = EIO; |
373 IPMI_LOCK(sc); |
|
372 ipmi_complete_request(sc, req); 373 } 374 IPMI_UNLOCK(sc); 375 kproc_exit(0); 376} 377 378static int 379smic_startup(struct ipmi_softc *sc) --- 28 unchanged lines hidden --- | 374 ipmi_complete_request(sc, req); 375 } 376 IPMI_UNLOCK(sc); 377 kproc_exit(0); 378} 379 380static int 381smic_startup(struct ipmi_softc *sc) --- 28 unchanged lines hidden --- |