scsi_pass.c (56148) | scsi_pass.c (58934) |
---|---|
1/* 2 * Copyright (c) 1997, 1998 Justin T. Gibbs. 3 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright (c) 1997, 1998 Justin T. Gibbs. 3 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/cam/scsi/scsi_pass.c 56148 2000-01-17 06:27:37Z mjacob $ | 27 * $FreeBSD: head/sys/cam/scsi/scsi_pass.c 58934 2000-04-02 15:24:56Z phk $ |
28 */ 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/types.h> 34#include <sys/buf.h> 35#include <sys/malloc.h> --- 173 unchanged lines hidden (view full) --- 209 * Return all queued I/O with ENXIO. 210 * XXX Handle any transactions queued to the card 211 * with XPT_ABORT_CCB. 212 */ 213 while ((q_bp = bufq_first(&softc->buf_queue)) != NULL){ 214 bufq_remove(&softc->buf_queue, q_bp); 215 q_bp->b_resid = q_bp->b_bcount; 216 q_bp->b_error = ENXIO; | 28 */ 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/types.h> 34#include <sys/buf.h> 35#include <sys/malloc.h> --- 173 unchanged lines hidden (view full) --- 209 * Return all queued I/O with ENXIO. 210 * XXX Handle any transactions queued to the card 211 * with XPT_ABORT_CCB. 212 */ 213 while ((q_bp = bufq_first(&softc->buf_queue)) != NULL){ 214 bufq_remove(&softc->buf_queue, q_bp); 215 q_bp->b_resid = q_bp->b_bcount; 216 q_bp->b_error = ENXIO; |
217 q_bp->b_flags |= B_ERROR; | 217 q_bp->b_ioflags |= BIO_ERROR; |
218 biodone(q_bp); 219 } 220 splx(s); 221 222 if (bootverbose) { 223 xpt_print_path(periph->path); 224 printf("lost device\n"); 225 } --- 281 unchanged lines hidden (view full) --- 507 508 /* 509 * Schedule ourselves for performing the work. 510 */ 511 xpt_schedule(periph, /* XXX priority */1); 512 513 return; 514bad: | 218 biodone(q_bp); 219 } 220 splx(s); 221 222 if (bootverbose) { 223 xpt_print_path(periph->path); 224 printf("lost device\n"); 225 } --- 281 unchanged lines hidden (view full) --- 507 508 /* 509 * Schedule ourselves for performing the work. 510 */ 511 xpt_schedule(periph, /* XXX priority */1); 512 513 return; 514bad: |
515 bp->b_flags |= B_ERROR; | 515 bp->b_ioflags |= BIO_ERROR; |
516 517 /* 518 * Correctly set the buf to indicate a completed xfer 519 */ 520 bp->b_resid = bp->b_bcount; 521 biodone(bp); 522 return; 523} --- 33 unchanged lines hidden (view full) --- 557 * XXX JGibbs - 558 * Interpret the contents of the bp as a CCB 559 * and pass it to a routine shared by our ioctl 560 * code and passtart. 561 * For now, just biodone it with EIO so we don't 562 * hang. 563 */ 564 bp->b_error = EIO; | 516 517 /* 518 * Correctly set the buf to indicate a completed xfer 519 */ 520 bp->b_resid = bp->b_bcount; 521 biodone(bp); 522 return; 523} --- 33 unchanged lines hidden (view full) --- 557 * XXX JGibbs - 558 * Interpret the contents of the bp as a CCB 559 * and pass it to a routine shared by our ioctl 560 * code and passtart. 561 * For now, just biodone it with EIO so we don't 562 * hang. 563 */ 564 bp->b_error = EIO; |
565 bp->b_flags |= B_ERROR; | 565 bp->b_ioflags |= BIO_ERROR; |
566 bp->b_resid = bp->b_bcount; 567 biodone(bp); 568 bp = bufq_first(&softc->buf_queue); 569 splx(s); 570 571 xpt_action(start_ccb); 572 573 } --- 37 unchanged lines hidden (view full) --- 611 return; 612 } 613 614 /* 615 * XXX unfreeze the queue after we complete 616 * the abort process 617 */ 618 bp->b_error = error; | 566 bp->b_resid = bp->b_bcount; 567 biodone(bp); 568 bp = bufq_first(&softc->buf_queue); 569 splx(s); 570 571 xpt_action(start_ccb); 572 573 } --- 37 unchanged lines hidden (view full) --- 611 return; 612 } 613 614 /* 615 * XXX unfreeze the queue after we complete 616 * the abort process 617 */ 618 bp->b_error = error; |
619 bp->b_flags |= B_ERROR; | 619 bp->b_ioflags |= BIO_ERROR; |
620 } 621 622 if ((done_ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) 623 ds_flags = DEVSTAT_READ; 624 else if ((done_ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) 625 ds_flags = DEVSTAT_WRITE; 626 else 627 ds_flags = DEVSTAT_NO_DATA; --- 198 unchanged lines hidden --- | 620 } 621 622 if ((done_ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) 623 ds_flags = DEVSTAT_READ; 624 else if ((done_ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) 625 ds_flags = DEVSTAT_WRITE; 626 else 627 ds_flags = DEVSTAT_NO_DATA; --- 198 unchanged lines hidden --- |