From owner-svn-src-all@freebsd.org Sun Sep 20 10:40:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECBF6A0223A; Sun, 20 Sep 2015 10:40:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDA591D45; Sun, 20 Sep 2015 10:40:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8KAeWO6033766; Sun, 20 Sep 2015 10:40:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8KAeVZs033760; Sun, 20 Sep 2015 10:40:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509201040.t8KAeVZs033760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 20 Sep 2015 10:40:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288020 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2015 10:40:33 -0000 Author: mav Date: Sun Sep 20 10:40:30 2015 New Revision: 288020 URL: https://svnweb.freebsd.org/changeset/base/288020 Log: Remove couple excess SGLIST I/O flags. Those flags duplicated respective (sg_entries > 0) values. Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_frontend_ioctl.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_tpc_local.c head/sys/cam/ctl/ctl_util.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sun Sep 20 04:59:01 2015 (r288019) +++ head/sys/cam/ctl/ctl_backend_block.c Sun Sep 20 10:40:30 2015 (r288020) @@ -1649,7 +1649,7 @@ ctl_be_block_dispatch(struct ctl_be_bloc io->scsiio.kern_data_len = beio->io_len; io->scsiio.kern_data_resid = 0; io->scsiio.kern_sg_entries = beio->num_segs; - io->io_hdr.flags |= CTL_FLAG_ALLOCATED | CTL_FLAG_KDPTR_SGLIST; + io->io_hdr.flags |= CTL_FLAG_ALLOCATED; /* * For the read case, we need to read the data into our buffers and Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Sun Sep 20 04:59:01 2015 (r288019) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Sun Sep 20 10:40:30 2015 (r288020) @@ -321,7 +321,6 @@ ctl_backend_ramdisk_continue(union ctl_i sg_entries[i].len = MIN(PAGE_SIZE, len - len_filled); len_filled += sg_entries[i].len; } - io->io_hdr.flags |= CTL_FLAG_KDPTR_SGLIST; } else { sg_filled = 0; len_filled = len; Modified: head/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_ioctl.c Sun Sep 20 04:59:01 2015 (r288019) +++ head/sys/cam/ctl/ctl_frontend_ioctl.c Sun Sep 20 10:40:30 2015 (r288020) @@ -149,7 +149,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio * To simplify things here, if we have a single buffer, stick it in * a S/G entry and just make it a single entry S/G list. */ - if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) { + if (ctsio->ext_sg_entries > 0) { int len_seen; ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist); Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Sun Sep 20 04:59:01 2015 (r288019) +++ head/sys/cam/ctl/ctl_io.h Sun Sep 20 10:40:30 2015 (r288020) @@ -88,8 +88,6 @@ typedef enum { CTL_FLAG_DATA_OUT = 0x00000002, /* DATA OUT */ CTL_FLAG_DATA_NONE = 0x00000003, /* no data */ CTL_FLAG_DATA_MASK = 0x00000003, - CTL_FLAG_KDPTR_SGLIST = 0x00000008, /* kern_data_ptr is S/G list*/ - CTL_FLAG_EDPTR_SGLIST = 0x00000010, /* ext_data_ptr is S/G list */ CTL_FLAG_DO_AUTOSENSE = 0x00000020, /* grab sense info */ CTL_FLAG_USER_REQ = 0x00000040, /* request came from userland */ CTL_FLAG_ALLOCATED = 0x00000100, /* data space allocated */ Modified: head/sys/cam/ctl/ctl_tpc_local.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc_local.c Sun Sep 20 04:59:01 2015 (r288019) +++ head/sys/cam/ctl/ctl_tpc_local.c Sun Sep 20 10:40:30 2015 (r288020) @@ -162,7 +162,7 @@ tpcl_datamove(union ctl_io *io) * To simplify things here, if we have a single buffer, stick it in * a S/G entry and just make it a single entry S/G list. */ - if (ctsio->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) { + if (ctsio->ext_sg_entries > 0) { int len_seen; ext_sglist = (struct ctl_sg_entry *)ctsio->ext_data_ptr; Modified: head/sys/cam/ctl/ctl_util.c ============================================================================== --- head/sys/cam/ctl/ctl_util.c Sun Sep 20 04:59:01 2015 (r288019) +++ head/sys/cam/ctl/ctl_util.c Sun Sep 20 10:40:30 2015 (r288020) @@ -882,7 +882,7 @@ ctl_data_print(union ctl_io *io) return; if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) return; - if (io->io_hdr.flags & CTL_FLAG_EDPTR_SGLIST) /* XXX: Implement */ + if (io->scsiio.ext_sg_entries > 0) /* XXX: Implement */ return; ctl_scsi_path_string(io, path_str, sizeof(path_str)); len = min(io->scsiio.kern_data_len, 4096);