Deleted Added
full compact
vpo.c (165102) vpo.c (168752)
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>
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 $");
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>
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>
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,
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,
163 device_get_unit(dev),
165 device_get_unit(dev), &Giant,
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 ---
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 ---