Deleted Added
full compact
aic7xxx_osm.c (166901) aic7xxx_osm.c (168752)
1/*-
2 * Bus independent FreeBSD shim for the aic7xxx based Adaptec SCSI controllers
3 *
4 * Copyright (c) 1994-2001 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.c#20 $
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Bus independent FreeBSD shim for the aic7xxx based Adaptec SCSI controllers
3 *
4 * Copyright (c) 1994-2001 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.c#20 $
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.c 166901 2007-02-23 12:19:07Z piso $");
35__FBSDID("$FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.c 168752 2007-04-15 08:49:19Z scottl $");
36
37#include <dev/aic7xxx/aic7xxx_osm.h>
38#include <dev/aic7xxx/aic7xxx_inline.h>
39
40#include <sys/kthread.h>
41
42#ifndef AHC_TMODE_ENABLE
43#define AHC_TMODE_ENABLE 0

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

191 if (devq == NULL)
192 goto fail;
193
194 /*
195 * Construct our first channel SIM entry
196 */
197 sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc,
198 device_get_unit(ahc->dev_softc),
36
37#include <dev/aic7xxx/aic7xxx_osm.h>
38#include <dev/aic7xxx/aic7xxx_inline.h>
39
40#include <sys/kthread.h>
41
42#ifndef AHC_TMODE_ENABLE
43#define AHC_TMODE_ENABLE 0

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

191 if (devq == NULL)
192 goto fail;
193
194 /*
195 * Construct our first channel SIM entry
196 */
197 sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc,
198 device_get_unit(ahc->dev_softc),
199 1, AHC_MAX_QUEUE, devq);
199 &Giant, 1, AHC_MAX_QUEUE, devq);
200 if (sim == NULL) {
201 cam_simq_free(devq);
202 goto fail;
203 }
204
205 if (xpt_bus_register(sim, bus_id) != CAM_SUCCESS) {
206 cam_sim_free(sim, /*free_devq*/TRUE);
207 sim = NULL;

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

222 csa.event_enable = AC_LOST_DEVICE;
223 csa.callback = ahc_async;
224 csa.callback_arg = sim;
225 xpt_action((union ccb *)&csa);
226 count++;
227
228 if (ahc->features & AHC_TWIN) {
229 sim2 = cam_sim_alloc(ahc_action, ahc_poll, "ahc",
200 if (sim == NULL) {
201 cam_simq_free(devq);
202 goto fail;
203 }
204
205 if (xpt_bus_register(sim, bus_id) != CAM_SUCCESS) {
206 cam_sim_free(sim, /*free_devq*/TRUE);
207 sim = NULL;

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

222 csa.event_enable = AC_LOST_DEVICE;
223 csa.callback = ahc_async;
224 csa.callback_arg = sim;
225 xpt_action((union ccb *)&csa);
226 count++;
227
228 if (ahc->features & AHC_TWIN) {
229 sim2 = cam_sim_alloc(ahc_action, ahc_poll, "ahc",
230 ahc, device_get_unit(ahc->dev_softc), 1,
230 ahc, device_get_unit(ahc->dev_softc),
231 &Giant, 1,
231 AHC_MAX_QUEUE, devq);
232
233 if (sim2 == NULL) {
234 printf("ahc_attach: Unable to attach second "
235 "bus due to resource shortage");
236 goto fail;
237 }
238

--- 1292 unchanged lines hidden ---
232 AHC_MAX_QUEUE, devq);
233
234 if (sim2 == NULL) {
235 printf("ahc_attach: Unable to attach second "
236 "bus due to resource shortage");
237 goto fail;
238 }
239

--- 1292 unchanged lines hidden ---