Deleted Added
sdiff udiff text old ( 165102 ) new ( 168752 )
full compact
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 165102 2006-12-11 18:28:31Z mjacob $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/module.h>
34#include <sys/bus.h>
35#include <sys/malloc.h>
36
37#include <cam/cam.h>
38#include <cam/cam_ccb.h>
39#include <cam/cam_sim.h>
40#include <cam/cam_xpt_sim.h>
41#include <cam/cam_debug.h>
42#include <cam/cam_periph.h>

--- 112 unchanged lines hidden (view full) ---

155 ** about our bus.
156 */
157 devq = cam_simq_alloc(/*maxopenings*/1);
158 /* XXX What about low-level detach on error? */
159 if (devq == NULL)
160 return (ENXIO);
161
162 vpo->sim = cam_sim_alloc(vpo_action, vpo_poll, "vpo", vpo,
163 device_get_unit(dev),
164 /*untagged*/1, /*tagged*/0, devq);
165 if (vpo->sim == NULL) {
166 cam_simq_free(devq);
167 return (ENXIO);
168 }
169
170 if (xpt_bus_register(vpo->sim, /*bus*/0) != CAM_SUCCESS) {
171 cam_sim_free(vpo->sim, /*free_devq*/TRUE);

--- 298 unchanged lines hidden ---