From owner-svn-src-stable-10@FreeBSD.ORG Mon Oct 20 08:08:44 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F29E7B1C; Mon, 20 Oct 2014 08:08:43 +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 DEB56C18; Mon, 20 Oct 2014 08:08:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9K88hEQ089459; Mon, 20 Oct 2014 08:08:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9K88htU089458; Mon, 20 Oct 2014 08:08:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410200808.s9K88htU089458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Oct 2014 08:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273324 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 08:08:44 -0000 Author: mav Date: Mon Oct 20 08:08:43 2014 New Revision: 273324 URL: https://svnweb.freebsd.org/changeset/base/273324 Log: MFC r273046: Don't confuse frontend with zero length data moves, just return immediately. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 20 08:07:29 2014 (r273323) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 20 08:08:43 2014 (r273324) @@ -10823,15 +10823,9 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio } ctsio->scsi_status = SCSI_STATUS_OK; - if (ctsio->kern_data_len > 0) { - ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; - ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); - } else { - ctsio->io_hdr.status = CTL_SUCCESS; - ctl_done((union ctl_io *)ctsio); - } - + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -12903,6 +12897,12 @@ ctl_datamove(union ctl_io *io) return; } + /* Don't confuse frontend with zero length data move. */ + if (io->scsiio.kern_data_len == 0) { + io->scsiio.be_move_done(io); + return; + } + /* * If we're in XFER mode and this I/O is from the other shelf * controller, we need to send the DMA to the other side to