scsi_pass.c (249466) | scsi_pass.c (249582) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998, 2000 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: --- 12 unchanged lines hidden (view full) --- 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 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, 1998, 2000 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: --- 12 unchanged lines hidden (view full) --- 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 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_pass.c 249466 2013-04-14 09:28:14Z mav $"); | 29__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_pass.c 249582 2013-04-17 11:40:10Z gabor $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/types.h> 35#include <sys/bio.h> 36#include <sys/malloc.h> 37#include <sys/fcntl.h> --- 651 unchanged lines hidden (view full) --- 689 /* 690 * We only attempt to map the user memory into kernel space 691 * if they haven't passed in a physical memory pointer, 692 * and if there is actually an I/O operation to perform. 693 * cam_periph_mapmem() supports SCSI, ATA, SMP, ADVINFO and device 694 * match CCBs. For the SCSI, ATA and ADVINFO CCBs, we only pass the 695 * CCB in if there's actually data to map. cam_periph_mapmem() will 696 * do the right thing, even if there isn't data to map, but since CCBs | 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/types.h> 35#include <sys/bio.h> 36#include <sys/malloc.h> 37#include <sys/fcntl.h> --- 651 unchanged lines hidden (view full) --- 689 /* 690 * We only attempt to map the user memory into kernel space 691 * if they haven't passed in a physical memory pointer, 692 * and if there is actually an I/O operation to perform. 693 * cam_periph_mapmem() supports SCSI, ATA, SMP, ADVINFO and device 694 * match CCBs. For the SCSI, ATA and ADVINFO CCBs, we only pass the 695 * CCB in if there's actually data to map. cam_periph_mapmem() will 696 * do the right thing, even if there isn't data to map, but since CCBs |
697 * without data are a reasonably common occurance (e.g. test unit | 697 * without data are a reasonably common occurrence (e.g. test unit |
698 * ready), it will save a few cycles if we check for it here. 699 * 700 * XXX What happens if a sg list is supplied? We don't filter that 701 * out. 702 */ 703 if (((ccb->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) 704 && (((ccb->ccb_h.func_code == XPT_SCSI_IO || 705 ccb->ccb_h.func_code == XPT_ATA_IO) --- 63 unchanged lines hidden --- | 698 * ready), it will save a few cycles if we check for it here. 699 * 700 * XXX What happens if a sg list is supplied? We don't filter that 701 * out. 702 */ 703 if (((ccb->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) 704 && (((ccb->ccb_h.func_code == XPT_SCSI_IO || 705 ccb->ccb_h.func_code == XPT_ATA_IO) --- 63 unchanged lines hidden --- |