svn commit: r273046 - head/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Mon Oct 13 16:15:33 UTC 2014
Author: mav
Date: Mon Oct 13 16:15:32 2014
New Revision: 273046
URL: https://svnweb.freebsd.org/changeset/base/273046
Log:
Don't confuse frontend with zero length data moves, just return immediately.
MFC after: 1 week
Modified:
head/sys/cam/ctl/ctl.c
Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c Mon Oct 13 16:12:28 2014 (r273045)
+++ head/sys/cam/ctl/ctl.c Mon Oct 13 16:15:32 2014 (r273046)
@@ -10821,15 +10821,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);
}
@@ -12901,6 +12895,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
More information about the svn-src-all
mailing list