scsi_da.c (74841) | scsi_da.c (74890) |
---|---|
1/* 2 * Implementation of SCSI Direct Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1997 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 --- 11 unchanged lines hidden (view full) --- 20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/* 2 * Implementation of SCSI Direct Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1997 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 --- 11 unchanged lines hidden (view full) --- 20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/cam/scsi/scsi_da.c 74841 2001-03-27 06:24:08Z ps $ | 28 * $FreeBSD: head/sys/cam/scsi/scsi_da.c 74890 2001-03-28 01:37:29Z ps $ |
29 */ 30 31#ifdef _KERNEL 32#include "opt_hw_wdog.h" 33#endif /* _KERNEL */ 34 35#include <sys/param.h> 36 --- 678 unchanged lines hidden (view full) --- 715 CAM_SCSI_STATUS_ERROR) 716 scsi_sense_print(&csio); 717 else 718 printf("status == 0x%x, scsi status == 0x%x\n", 719 csio.ccb_h.status, csio.scsi_status); 720 return(EIO); 721 } 722 | 29 */ 30 31#ifdef _KERNEL 32#include "opt_hw_wdog.h" 33#endif /* _KERNEL */ 34 35#include <sys/param.h> 36 --- 678 unchanged lines hidden (view full) --- 715 CAM_SCSI_STATUS_ERROR) 716 scsi_sense_print(&csio); 717 else 718 printf("status == 0x%x, scsi status == 0x%x\n", 719 csio.ccb_h.status, csio.scsi_status); 720 return(EIO); 721 } 722 |
723 if (addr % (1024 * 1024) == 0) { 724#ifdef HW_WDOG 725 if (wdog_tickler) 726 (*wdog_tickler)(); 727#endif /* HW_WDOG */ 728 /* Count in MB of data left to write */ 729 printf("%d ", (num * softc->params.secsize) 730 / (1024 * 1024)); 731 } 732 | 723 if (dumpstatus(addr, (long)(num * softc->params.secsize)) < 0) 724 return (EINTR); 725 |
733 /* update block count */ 734 num -= blkcnt * dumppages; 735 blknum += blkcnt * dumppages; 736 addr += PAGE_SIZE * dumppages; | 726 /* update block count */ 727 num -= blkcnt * dumppages; 728 blknum += blkcnt * dumppages; 729 addr += PAGE_SIZE * dumppages; |
737 738 /* operator aborting dump? */ 739 if (cncheckc() == 0x03) 740 return (EINTR); 741 else 742 printf("[CTRL-C to abort] "); | |
743 } 744 745 /* 746 * Sync the disk cache contents to the physical media. 747 */ 748 if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) { 749 750 xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1); --- 915 unchanged lines hidden --- | 730 } 731 732 /* 733 * Sync the disk cache contents to the physical media. 734 */ 735 if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) { 736 737 xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1); --- 915 unchanged lines hidden --- |