ctl_tpc_local.c (287724) | ctl_tpc_local.c (288020) |
---|---|
1/*- 2 * Copyright (c) 2014 Alexander Motin <mav@FreeBSD.org> 3 * Copyright (c) 2004, 2005 Silicon Graphics International Corp. 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 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2014 Alexander Motin <mav@FreeBSD.org> 3 * Copyright (c) 2004, 2005 Silicon Graphics International Corp. 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 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_tpc_local.c 287724 2015-09-12 20:45:09Z mav $"); | 29__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_tpc_local.c 288020 2015-09-20 10:40:30Z mav $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/types.h> 35#include <sys/lock.h> 36#include <sys/module.h> 37#include <sys/mutex.h> --- 119 unchanged lines hidden (view full) --- 157 */ 158 if (ctsio->ext_data_ptr == NULL) 159 goto bailout; 160 161 /* 162 * To simplify things here, if we have a single buffer, stick it in 163 * a S/G entry and just make it a single entry S/G list. 164 */ | 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/types.h> 35#include <sys/lock.h> 36#include <sys/module.h> 37#include <sys/mutex.h> --- 119 unchanged lines hidden (view full) --- 157 */ 158 if (ctsio->ext_data_ptr == NULL) 159 goto bailout; 160 161 /* 162 * To simplify things here, if we have a single buffer, stick it in 163 * a S/G entry and just make it a single entry S/G list. 164 */ |
165 if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) { | 165 if (ctsio->ext_sg_entries > 0) { |
166 int len_seen; 167 168 ext_sglist = (struct ctl_sg_entry *)ctsio->ext_data_ptr; 169 ext_sg_entries = ctsio->ext_sg_entries; 170 ext_sg_start = 0; 171 ext_offset = 0; 172 len_seen = 0; 173 for (i = 0; i < ext_sg_entries; i++) { --- 166 unchanged lines hidden --- | 166 int len_seen; 167 168 ext_sglist = (struct ctl_sg_entry *)ctsio->ext_data_ptr; 169 ext_sg_entries = ctsio->ext_sg_entries; 170 ext_sg_start = 0; 171 ext_offset = 0; 172 len_seen = 0; 173 for (i = 0; i < ext_sg_entries; i++) { --- 166 unchanged lines hidden --- |