scsi_sa.c (144430) | scsi_sa.c (145050) |
---|---|
1/*- 2 * Implementation of SCSI Sequential Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1999, 2000 Matthew Jacob 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 --- 13 unchanged lines hidden (view full) --- 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 29#include <sys/cdefs.h> | 1/*- 2 * Implementation of SCSI Sequential Access Peripheral driver for CAM. 3 * 4 * Copyright (c) 1999, 2000 Matthew Jacob 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 --- 13 unchanged lines hidden (view full) --- 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 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sa.c 144430 2005-03-31 21:43:19Z sam $"); | 30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sa.c 145050 2005-04-14 04:51:18Z mjacob $"); |
31 32#include <sys/param.h> 33#include <sys/queue.h> 34#ifdef _KERNEL 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#endif 38#include <sys/types.h> --- 766 unchanged lines hidden (view full) --- 805 if (error != 0) { 806 splx(s); 807 return (error); 808 } 809 didlockperiph = 1; 810 } 811 break; 812 | 31 32#include <sys/param.h> 33#include <sys/queue.h> 34#ifdef _KERNEL 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#endif 38#include <sys/types.h> --- 766 unchanged lines hidden (view full) --- 805 if (error != 0) { 806 splx(s); 807 return (error); 808 } 809 didlockperiph = 1; 810 } 811 break; 812 |
813 case MTIOCTOP: 814 { 815 struct mtop *mt = (struct mtop *) arg; 816 817 /* 818 * Check to make sure it's an OP we can perform 819 * with no media inserted. 820 */ 821 switch (mt->mt_op) { 822 case MTSETBSIZ: 823 case MTSETDNSTY: 824 case MTCOMP: 825 mt = NULL; 826 /* FALLTHROUGH */ 827 default: 828 break; 829 } 830 if (mt != NULL) { 831 break; 832 } 833 /* FALLTHROUGH */ 834 } |
|
813 case MTIOCSETEOTMODEL: | 835 case MTIOCSETEOTMODEL: |
814 case MTSETBSIZ: 815 case MTSETDNSTY: 816 case MTCOMP: | |
817 /* 818 * We need to acquire the peripheral here rather 819 * than at open time because we are sharing writable 820 * access to data structures. 821 */ 822 s = splsoftcam(); 823 error = cam_periph_lock(periph, PRIBIO|PCATCH); 824 if (error != 0) { --- 2762 unchanged lines hidden --- | 836 /* 837 * We need to acquire the peripheral here rather 838 * than at open time because we are sharing writable 839 * access to data structures. 840 */ 841 s = splsoftcam(); 842 error = cam_periph_lock(periph, PRIBIO|PCATCH); 843 if (error != 0) { --- 2762 unchanged lines hidden --- |