Date: Mon, 20 Oct 2014 08:08:43 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> 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 Message-ID: <201410200808.s9K88htU089458@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410200808.s9K88htU089458>