aac_cam.c (111979) | aac_cam.c (112679) |
---|---|
1/* 2 * Copyright (c) 2002 Adaptec, Inc. 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 * | 1/* 2 * Copyright (c) 2002 Adaptec, Inc. 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 * $FreeBSD: head/sys/dev/aac/aac_cam.c 111979 2003-03-08 08:01:31Z phk $ | 26 * $FreeBSD: head/sys/dev/aac/aac_cam.c 112679 2003-03-26 17:50:11Z scottl $ |
27 */ 28 29/* 30 * CAM front-end for communicating with non-DASD devices 31 */ 32 33#include "opt_aac.h" 34 --- 219 unchanged lines hidden (view full) --- 254 xpt_done(ccb); 255 return; 256 } 257 case XPT_SET_TRAN_SETTINGS: 258 ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; 259 xpt_done(ccb); 260 return; 261 case XPT_RESET_BUS: | 27 */ 28 29/* 30 * CAM front-end for communicating with non-DASD devices 31 */ 32 33#include "opt_aac.h" 34 --- 219 unchanged lines hidden (view full) --- 254 xpt_done(ccb); 255 return; 256 } 257 case XPT_SET_TRAN_SETTINGS: 258 ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; 259 xpt_done(ccb); 260 return; 261 case XPT_RESET_BUS: |
262 if (!(sc->quirks & AAC_QUIRK_CAM_NORESET)) { | 262 if (!(sc->flags & AAC_FLAGS_CAM_NORESET)) { |
263 ccb->ccb_h.status = aac_cam_reset_bus(sim, ccb); 264 } else { 265 ccb->ccb_h.status = CAM_REQ_CMP; 266 } 267 xpt_done(ccb); 268 return; 269 case XPT_ABORT: 270 ccb->ccb_h.status = aac_cam_abort_ccb(sim, ccb); --- 90 unchanged lines hidden (view full) --- 361 srb->sg_map32.SgCount = 0; 362 srb->sg_map32.SgEntry[0].SgByteCount = 0; 363 srb->data_len = 0; 364 } 365 366 break; 367 } 368 case XPT_RESET_DEV: | 263 ccb->ccb_h.status = aac_cam_reset_bus(sim, ccb); 264 } else { 265 ccb->ccb_h.status = CAM_REQ_CMP; 266 } 267 xpt_done(ccb); 268 return; 269 case XPT_ABORT: 270 ccb->ccb_h.status = aac_cam_abort_ccb(sim, ccb); --- 90 unchanged lines hidden (view full) --- 361 srb->sg_map32.SgCount = 0; 362 srb->sg_map32.SgEntry[0].SgByteCount = 0; 363 srb->data_len = 0; 364 } 365 366 break; 367 } 368 case XPT_RESET_DEV: |
369 if (!(sc->quirks & AAC_QUIRK_CAM_NORESET)) { | 369 if (!(sc->flags & AAC_FLAGS_CAM_NORESET)) { |
370 srb->function = AAC_SRB_FUNC_RESET_DEVICE; 371 break; 372 } else { 373 ccb->ccb_h.status = CAM_REQ_CMP; 374 xpt_done(ccb); 375 return; 376 } 377 default: --- 93 unchanged lines hidden (view full) --- 471 (ccb->ccb_h.status == CAM_REQ_CMP)) { 472 device = ccb->csio.data_ptr[0] & 0x1f; 473 /* 474 * We want DASD and PROC devices to only be 475 * visible through the pass device. 476 */ 477 if ((device == T_DIRECT) || 478 (device == T_PROCESSOR) || | 370 srb->function = AAC_SRB_FUNC_RESET_DEVICE; 371 break; 372 } else { 373 ccb->ccb_h.status = CAM_REQ_CMP; 374 xpt_done(ccb); 375 return; 376 } 377 default: --- 93 unchanged lines hidden (view full) --- 471 (ccb->ccb_h.status == CAM_REQ_CMP)) { 472 device = ccb->csio.data_ptr[0] & 0x1f; 473 /* 474 * We want DASD and PROC devices to only be 475 * visible through the pass device. 476 */ 477 if ((device == T_DIRECT) || 478 (device == T_PROCESSOR) || |
479 (sc->quirks & AAC_QUIRK_CAM_PASSONLY)) | 479 (sc->flags & AAC_FLAGS_CAM_PASSONLY)) |
480 ccb->csio.data_ptr[0] = 481 ((device & 0xe0) | T_NODEVICE); 482 } 483 } 484 } 485 486 aac_release_command(cm); 487 --- 118 unchanged lines hidden --- | 480 ccb->csio.data_ptr[0] = 481 ((device & 0xe0) | T_NODEVICE); 482 } 483 } 484 } 485 486 aac_release_command(cm); 487 --- 118 unchanged lines hidden --- |