Deleted Added
full compact
aic7xxx_osm.c (170872) aic7xxx_osm.c (237601)
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 170872 2007-06-17 05:55:54Z scottl $");
35__FBSDID("$FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.c 237601 2012-06-26 14:51:35Z ken $");
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

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

563 }
564 if (ccb->ccb_h.flags & CAM_TAG_ACTION_VALID)
565 hscb->control |= ccb->csio.tag_action;
566
567 ahc_setup_data(ahc, sim, &ccb->csio, scb);
568 }
569 break;
570 }
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

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

563 }
564 if (ccb->ccb_h.flags & CAM_TAG_ACTION_VALID)
565 hscb->control |= ccb->csio.tag_action;
566
567 ahc_setup_data(ahc, sim, &ccb->csio, scb);
568 }
569 break;
570 }
571 case XPT_NOTIFY_ACK:
572 case XPT_IMMED_NOTIFY:
571 case XPT_NOTIFY_ACKNOWLEDGE:
572 case XPT_IMMEDIATE_NOTIFY:
573 {
574 struct ahc_tmode_tstate *tstate;
575 struct ahc_tmode_lstate *lstate;
576 cam_status status;
577
578 status = ahc_find_tmode_devs(ahc, sim, ccb, &tstate,
579 &lstate, TRUE);
580

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

1243static void
1244ahc_abort_ccb(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
1245{
1246 union ccb *abort_ccb;
1247
1248 abort_ccb = ccb->cab.abort_ccb;
1249 switch (abort_ccb->ccb_h.func_code) {
1250 case XPT_ACCEPT_TARGET_IO:
573 {
574 struct ahc_tmode_tstate *tstate;
575 struct ahc_tmode_lstate *lstate;
576 cam_status status;
577
578 status = ahc_find_tmode_devs(ahc, sim, ccb, &tstate,
579 &lstate, TRUE);
580

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

1243static void
1244ahc_abort_ccb(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
1245{
1246 union ccb *abort_ccb;
1247
1248 abort_ccb = ccb->cab.abort_ccb;
1249 switch (abort_ccb->ccb_h.func_code) {
1250 case XPT_ACCEPT_TARGET_IO:
1251 case XPT_IMMED_NOTIFY:
1251 case XPT_IMMEDIATE_NOTIFY:
1252 case XPT_CONT_TARGET_IO:
1253 {
1254 struct ahc_tmode_tstate *tstate;
1255 struct ahc_tmode_lstate *lstate;
1256 struct ccb_hdr_slist *list;
1257 cam_status status;
1258
1259 status = ahc_find_tmode_devs(ahc, sim, abort_ccb, &tstate,
1260 &lstate, TRUE);
1261
1262 if (status != CAM_REQ_CMP) {
1263 ccb->ccb_h.status = status;
1264 break;
1265 }
1266
1267 if (abort_ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO)
1268 list = &lstate->accept_tios;
1252 case XPT_CONT_TARGET_IO:
1253 {
1254 struct ahc_tmode_tstate *tstate;
1255 struct ahc_tmode_lstate *lstate;
1256 struct ccb_hdr_slist *list;
1257 cam_status status;
1258
1259 status = ahc_find_tmode_devs(ahc, sim, abort_ccb, &tstate,
1260 &lstate, TRUE);
1261
1262 if (status != CAM_REQ_CMP) {
1263 ccb->ccb_h.status = status;
1264 break;
1265 }
1266
1267 if (abort_ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO)
1268 list = &lstate->accept_tios;
1269 else if (abort_ccb->ccb_h.func_code == XPT_IMMED_NOTIFY)
1269 else if (abort_ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY)
1270 list = &lstate->immed_notifies;
1271 else
1272 list = NULL;
1273
1274 if (list != NULL) {
1275 struct ccb_hdr *curelm;
1276 int found;
1277

--- 216 unchanged lines hidden ---
1270 list = &lstate->immed_notifies;
1271 else
1272 list = NULL;
1273
1274 if (list != NULL) {
1275 struct ccb_hdr *curelm;
1276 int found;
1277

--- 216 unchanged lines hidden ---