From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH 0/2] Setup scsi-bus xfer and xfer_mode for PR IN/OUT and Maintenance IN/OUT Date: Mon, 31 May 2010 11:55:22 +0200 Message-ID: <4C03878A.8080805@redhat.com> References: <1275270173-10973-1-git-send-email-nab@linux-iscsi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Kevin Wolf , Christoph Hellwig , Hannes Reinecke , Paul Brook , kvm-devel , qemu-devel To: "Nicholas A. Bellinger" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46788 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755985Ab0EaJzk (ORCPT ); Mon, 31 May 2010 05:55:40 -0400 In-Reply-To: <1275270173-10973-1-git-send-email-nab@linux-iscsi.org> Sender: kvm-owner@vger.kernel.org List-ID: On 05/31/10 03:42, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > Greetings Gerd, Kevin and Co, > > Attached are two patches to add the necesary CDB parsing to determine SCSIRequest->cmd.xfer > (length) and SCSIRequest->cmd.mode (direction) for Persistent Reservation IN/OUT > CDBs and for Maintenance IN/OUT CDBs used for Asymmetric Logical Unit Access, et al. > There is a special case for the latter Maintenance CDBs with TYPE_ROM that has been > included in scsi_req_length(). > > Also, I should mention this is a temporary measure in order to ensure that we can actually > do passthrough of these CDBs into KVM Guest for lsi and megaraid HBA emulation. What will > need to eventually happen is to get rid of scsi_req_xfer_mode() all together and just setup > SCSIRequest->cmd.mode based on CDB type in scsi_req_length(), instead of having to have another > switch(cdb[0]) statement for every SCSI WRITE CDB on the planet to set SCSI_XFER_TO_DEV. > > Anyways, I will look at doing this conversion in scsi_req_length() at some point, but please > apply these for the moment so folks can get access to their SPC-4 Port LUNs with QEMU. ;) Patches look fine to me. Acked-by: Gerd Hoffmann cheers, Gerd