aic7xxx_osm.c (72670) | aic7xxx_osm.c (72811) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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$ 32 * | 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 --- 16 unchanged lines hidden (view full) --- 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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$ 32 * |
33 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.c 72670 2001-02-18 18:02:15Z markm $ | 33 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx_osm.c 72811 2001-02-21 20:50:36Z gibbs $ |
34 */ 35 36#include <dev/aic7xxx/aic7xxx_freebsd.h> 37#include <dev/aic7xxx/aic7xxx_inline.h> 38 39#ifndef AHC_TMODE_ENABLE 40#define AHC_TMODE_ENABLE 0 41#endif --- 218 unchanged lines hidden (view full) --- 260 261 CAM_DEBUG(scb->io_ctx->ccb_h.path, CAM_DEBUG_TRACE, 262 ("ahc_done - scb %d\n", scb->hscb->tag)); 263 264 ccb = scb->io_ctx; 265 LIST_REMOVE(scb, pending_links); 266 if ((scb->flags & SCB_UNTAGGEDQ) != 0) { 267 struct scb_tailq *untagged_q; | 34 */ 35 36#include <dev/aic7xxx/aic7xxx_freebsd.h> 37#include <dev/aic7xxx/aic7xxx_inline.h> 38 39#ifndef AHC_TMODE_ENABLE 40#define AHC_TMODE_ENABLE 0 41#endif --- 218 unchanged lines hidden (view full) --- 260 261 CAM_DEBUG(scb->io_ctx->ccb_h.path, CAM_DEBUG_TRACE, 262 ("ahc_done - scb %d\n", scb->hscb->tag)); 263 264 ccb = scb->io_ctx; 265 LIST_REMOVE(scb, pending_links); 266 if ((scb->flags & SCB_UNTAGGEDQ) != 0) { 267 struct scb_tailq *untagged_q; |
268 int target_offset; |
|
268 | 269 |
269 untagged_q = &ahc->untagged_queues[ccb->ccb_h.target_id]; | 270 target_offset = SCB_GET_TARGET_OFFSET(ahc, scb); 271 untagged_q = &ahc->untagged_queues[target_offset]; |
270 TAILQ_REMOVE(untagged_q, scb, links.tqe); 271 scb->flags &= ~SCB_UNTAGGEDQ; 272 ahc_run_untagged_queue(ahc, untagged_q); 273 } 274 275 untimeout(ahc_timeout, (caddr_t)scb, ccb->ccb_h.timeout_ch); 276 277 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { --- 940 unchanged lines hidden (view full) --- 1218 * We only allow one untagged transaction 1219 * per target in the initiator role unless 1220 * we are storing a full busy target *lun* 1221 * table in SCB space. 1222 */ 1223 if ((scb->hscb->control & (TARGET_SCB|TAG_ENB)) == 0 1224 && (ahc->flags & AHC_SCB_BTT) == 0) { 1225 struct scb_tailq *untagged_q; | 272 TAILQ_REMOVE(untagged_q, scb, links.tqe); 273 scb->flags &= ~SCB_UNTAGGEDQ; 274 ahc_run_untagged_queue(ahc, untagged_q); 275 } 276 277 untimeout(ahc_timeout, (caddr_t)scb, ccb->ccb_h.timeout_ch); 278 279 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { --- 940 unchanged lines hidden (view full) --- 1220 * We only allow one untagged transaction 1221 * per target in the initiator role unless 1222 * we are storing a full busy target *lun* 1223 * table in SCB space. 1224 */ 1225 if ((scb->hscb->control & (TARGET_SCB|TAG_ENB)) == 0 1226 && (ahc->flags & AHC_SCB_BTT) == 0) { 1227 struct scb_tailq *untagged_q; |
1228 int target_offset; |
|
1226 | 1229 |
1227 untagged_q = &(ahc->untagged_queues[ccb->ccb_h.target_id]); | 1230 target_offset = SCB_GET_TARGET_OFFSET(ahc, scb); 1231 untagged_q = &(ahc->untagged_queues[target_offset]); |
1228 TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe); 1229 scb->flags |= SCB_UNTAGGEDQ; 1230 if (TAILQ_FIRST(untagged_q) != scb) { 1231 ahc_unlock(ahc, &s); 1232 return; 1233 } 1234 } 1235 scb->flags |= SCB_ACTIVE; --- 663 unchanged lines hidden --- | 1232 TAILQ_INSERT_TAIL(untagged_q, scb, links.tqe); 1233 scb->flags |= SCB_UNTAGGEDQ; 1234 if (TAILQ_FIRST(untagged_q) != scb) { 1235 ahc_unlock(ahc, &s); 1236 return; 1237 } 1238 } 1239 scb->flags |= SCB_ACTIVE; --- 663 unchanged lines hidden --- |