Received: from eggs.gnu.org ([2001:4830:134:3::10]:37462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIeHz-0007xc-7Z for qemu-devel@nongnu.org; Thu, 30 Jun 2016 11:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIeHt-0007FA-A9 for qemu-devel@nongnu.org; Thu, 30 Jun 2016 11:54:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIeHt-0007F4-3J for qemu-devel@nongnu.org; Thu, 30 Jun 2016 11:53:57 -0400 References: <20160628161945.GA2022@ks392938.kimsufi.com> <70f633c5-c7d6-fcf9-7489-05e820e22ac8@redhat.com> <20160629173612.GA17059@ks392938.kimsufi.com> From: Paolo Bonzini Message-ID: Date: Thu, 30 Jun 2016 17:53:37 +0200 MIME-Version: 1.0 In-Reply-To: <20160629173612.GA17059@ks392938.kimsufi.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] scsi-bus: Add support for SCSI scanners List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jarkko Lavinen Cc: qemu-devel@nongnu.org On 29/06/2016 19:36, Jarkko Lavinen wrote: > On Tue, Jun 28, 2016 at 07:14:55PM +0200, Paolo Bonzini wrote: >> This is wrong, because INQUIRY's byte 3 is defined to be part of the >> length in modern SCSI standards. > >> This is wrong, because INQUIRY's byte 3 is defined to be part of the >> length in modern SCSI standards. > Ok. I was using outdated ANSI spec too pedantically. The first patch is > not needed at all. > >> SCAN conflicts with START_STOP. Add a comment please saying that >> START_STOP has cmd->xfer set to 0 in scsi_req_xfer for non-scanner >> devices. > Done. > > I also removed this: > > case GET_DATA_BUFFER_STATUS: > cmd->xfer = buf[8] | (buf[7] << 8); > > Since it is again unneedes and handled by scsi_cdb_xfer. > > I added longer sense buffer in Request Sense command for scanners. > Multi Pro has at least one sense bit in byte 18 and Minolta's own SW > uses 20 bytes as an allocation size in Request Sense command. > > The extra sense bit seems to be a kind of internal busy/film holder > moving status. After having this sense bit available scanning programs > have been very stable and every feature seems to be working. Thanks! Out of curiosity what HBA are you using on the host? Paolo