From owner-svn-src-all@FreeBSD.ORG Sun May 4 00:57:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02274B9; Sun, 4 May 2014 00:57:39 +0000 (UTC) Received: from svn.freebsd.org (svn.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 C895F1908; Sun, 4 May 2014 00:57:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440vcQn074259; Sun, 4 May 2014 00:57:38 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440vcu0074257; Sun, 4 May 2014 00:57:38 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040057.s440vcu0074257@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 00:57:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265301 - in stable/9/sys/dev/virtio: block scsi X-SVN-Group: stable-9 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.17 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, 04 May 2014 00:57:39 -0000 Author: bryanv Date: Sun May 4 00:57:38 2014 New Revision: 265301 URL: http://svnweb.freebsd.org/changeset/base/265301 Log: MFC r260582, r260583: - Add unmapped IO support to virtio_blk(4) - Add unmapped IO support to virtio_scsi(4) Modified: stable/9/sys/dev/virtio/block/virtio_blk.c stable/9/sys/dev/virtio/scsi/virtio_scsi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- stable/9/sys/dev/virtio/block/virtio_blk.c Sun May 4 00:45:00 2014 (r265300) +++ stable/9/sys/dev/virtio/block/virtio_blk.c Sun May 4 00:57:38 2014 (r265301) @@ -687,7 +687,7 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp->d_name = VTBLK_DISK_NAME; dp->d_unit = device_get_unit(dev); dp->d_drv1 = sc; - dp->d_flags = DISKFLAG_CANFLUSHCACHE; + dp->d_flags = DISKFLAG_CANFLUSHCACHE | DISKFLAG_UNMAPPED_BIO; dp->d_hba_vendor = virtio_get_vendor(dev); dp->d_hba_device = virtio_get_device(dev); dp->d_hba_subvendor = virtio_get_subvendor(dev); @@ -892,10 +892,11 @@ vtblk_execute_request(struct vtblk_softc sglist_append(sg, &req->vbr_hdr, sizeof(struct virtio_blk_outhdr)); if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) { - error = sglist_append(sg, bp->bio_data, bp->bio_bcount); - if (error || sg->sg_nseg == sg->sg_maxseg) + error = sglist_append_bio(sg, bp); + if (error || sg->sg_nseg == sg->sg_maxseg) { panic("%s: data buffer too big bio:%p error:%d", __func__, bp, error); + } /* BIO_READ means the host writes into our buffer. */ if (bp->bio_cmd == BIO_READ) Modified: stable/9/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 00:45:00 2014 (r265300) +++ stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 00:57:38 2014 (r265301) @@ -878,7 +878,7 @@ vtscsi_cam_path_inquiry(struct vtscsi_so cpi->version_num = 1; cpi->hba_inquiry = PI_TAG_ABLE; cpi->target_sprt = 0; - cpi->hba_misc = PIM_SEQSCAN; + cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED; if (vtscsi_bus_reset_disable != 0) cpi->hba_misc |= PIM_NOBUSRESET; cpi->hba_eng_cnt = 0; @@ -946,6 +946,9 @@ vtscsi_sg_append_scsi_buf(struct vtscsi_ (vm_paddr_t) dseg->ds_addr, dseg->ds_len); } break; + case CAM_DATA_BIO: + error = sglist_append_bio(sg, (struct bio *) csio->data_ptr); + break; default: error = EINVAL; break;