scsi_target.c (246713) | scsi_target.c (249582) |
---|---|
1/*- 2 * Generic SCSI Target Kernel Mode Driver 3 * 4 * Copyright (c) 2002 Nate Lawson. 5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Generic SCSI Target Kernel Mode Driver 3 * 4 * Copyright (c) 2002 Nate Lawson. 5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_target.c 246713 2013-02-12 16:57:20Z kib $"); | 31__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_target.c 249582 2013-04-17 11:40:10Z gabor $"); |
32 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/conf.h> 38#include <sys/malloc.h> 39#include <sys/poll.h> --- 689 unchanged lines hidden (view full) --- 729 /* 730 * We only attempt to map the user memory into kernel space 731 * if they haven't passed in a physical memory pointer, 732 * and if there is actually an I/O operation to perform. 733 * Right now cam_periph_mapmem() only supports SCSI and device 734 * match CCBs. For the SCSI CCBs, we only pass the CCB in if 735 * there's actually data to map. cam_periph_mapmem() will do the 736 * right thing, even if there isn't data to map, but since CCBs | 32 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/conf.h> 38#include <sys/malloc.h> 39#include <sys/poll.h> --- 689 unchanged lines hidden (view full) --- 729 /* 730 * We only attempt to map the user memory into kernel space 731 * if they haven't passed in a physical memory pointer, 732 * and if there is actually an I/O operation to perform. 733 * Right now cam_periph_mapmem() only supports SCSI and device 734 * match CCBs. For the SCSI CCBs, we only pass the CCB in if 735 * there's actually data to map. cam_periph_mapmem() will do the 736 * right thing, even if there isn't data to map, but since CCBs |
737 * without data are a reasonably common occurance (e.g. test unit | 737 * without data are a reasonably common occurrence (e.g. test unit |
738 * ready), it will save a few cycles if we check for it here. 739 */ 740 if (((ccb_h->flags & CAM_DATA_MASK) == CAM_DATA_VADDR) 741 && (((ccb_h->func_code == XPT_CONT_TARGET_IO) 742 && ((ccb_h->flags & CAM_DIR_MASK) != CAM_DIR_NONE)) 743 || (ccb_h->func_code == XPT_DEV_MATCH))) { 744 745 error = cam_periph_mapmem(ccb, mapinfo); --- 423 unchanged lines hidden --- | 738 * ready), it will save a few cycles if we check for it here. 739 */ 740 if (((ccb_h->flags & CAM_DATA_MASK) == CAM_DATA_VADDR) 741 && (((ccb_h->func_code == XPT_CONT_TARGET_IO) 742 && ((ccb_h->flags & CAM_DIR_MASK) != CAM_DIR_NONE)) 743 || (ccb_h->func_code == XPT_DEV_MATCH))) { 744 745 error = cam_periph_mapmem(ccb, mapinfo); --- 423 unchanged lines hidden --- |