From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59208 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLXTK-0006YN-Ey for qemu-devel@nongnu.org; Thu, 25 Nov 2010 03:46:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLXTI-0000Sn-3N for qemu-devel@nongnu.org; Thu, 25 Nov 2010 03:46:30 -0500 Received: from gate.crashing.org ([63.228.1.57]:44352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLXTH-0000RN-SH for qemu-devel@nongnu.org; Thu, 25 Nov 2010 03:46:28 -0500 Subject: Re: [Qemu-devel] Re: [PATCH] scsi-generic: bugfixes for 'SCSIRequest' conversion From: Benjamin Herrenschmidt In-Reply-To: <4CECED12.5020109@suse.de> References: <1290586723-8724-1-git-send-email-nab@linux-iscsi.org> <4CECD36E.50401@suse.de> <4CECD50F.9060501@redhat.com> <4CECE609.7080600@suse.de> <4CECEA2A.40008@redhat.com> <4CECED12.5020109@suse.de> Content-Type: text/plain; charset="UTF-8" Date: Thu, 25 Nov 2010 19:46:14 +1100 Message-ID: <1290674774.32570.106.camel@pasglop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: Kevin Wolf , Stefan Hajnoczi , qemu-devel , "Nicholas A. Bellinger" , Gerd Hoffmann , Paolo Bonzini , linux-iscsi-target-dev@googlegroups.com On Wed, 2010-11-24 at 11:46 +0100, Hannes Reinecke wrote: > >> - when a read is aborted due to a mark/EOF/EOD/EOM, the len > reported to > >> controller can be 0. LSI controller emulation doesn't know how to > manage > >> this. A workaround found is to call the completion routine with > >> SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with > len=0. > > > > Are you sure that it's not needed any more? > > > Don't ask me. I didn't do the patch, and my knowledge of lsi HBA > internals is scanty. > Nic, can you comment here? Well, writing an HBA myself, it took me a while to figure out what I'm supposed to expect from the layer :-) So far tho, it appears that I can (at least with scsi-disk) rely on always been eventually called with SCSI_REASON_DONE so my code (and maybe the usb-msd code too, I haven't verified) relies on that to complete requests... Is that incorrect ? Cheers, Ben.