1/*- 2 * Copyright (c) 1997, 1998, 1999 Nicolas Souchu 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 --- 12 unchanged lines hidden (view full) --- 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 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/ppbus/vpo.c 168752 2007-04-15 08:49:19Z scottl $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/module.h> 34#include <sys/bus.h> |
35#include <sys/lock.h> 36#include <sys/mutex.h> |
37#include <sys/malloc.h> 38 39#include <cam/cam.h> 40#include <cam/cam_ccb.h> 41#include <cam/cam_sim.h> 42#include <cam/cam_xpt_sim.h> 43#include <cam/cam_debug.h> 44#include <cam/cam_periph.h> --- 112 unchanged lines hidden (view full) --- 157 ** about our bus. 158 */ 159 devq = cam_simq_alloc(/*maxopenings*/1); 160 /* XXX What about low-level detach on error? */ 161 if (devq == NULL) 162 return (ENXIO); 163 164 vpo->sim = cam_sim_alloc(vpo_action, vpo_poll, "vpo", vpo, |
165 device_get_unit(dev), &Giant, |
166 /*untagged*/1, /*tagged*/0, devq); 167 if (vpo->sim == NULL) { 168 cam_simq_free(devq); 169 return (ENXIO); 170 } 171 172 if (xpt_bus_register(vpo->sim, /*bus*/0) != CAM_SUCCESS) { 173 cam_sim_free(vpo->sim, /*free_devq*/TRUE); --- 298 unchanged lines hidden --- |