From patchwork Mon May 31 01:43:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 103179 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4V1glV9018408 for ; Mon, 31 May 2010 01:42:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755312Ab0EaBmp (ORCPT ); Sun, 30 May 2010 21:42:45 -0400 Received: from smtp127.sbc.mail.sp1.yahoo.com ([69.147.65.186]:46996 "HELO smtp127.sbc.mail.sp1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755298Ab0EaBmo (ORCPT ); Sun, 30 May 2010 21:42:44 -0400 Received: (qmail 87483 invoked from network); 31 May 2010 01:42:44 -0000 Received: from adsl-70-231-238-2.dsl.snfc21.sbcglobal.net (nab@70.231.238.2 with login) by smtp127.sbc.mail.sp1.yahoo.com with SMTP; 30 May 2010 18:42:44 -0700 PDT X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: LoshYEQVM1mgwGHn6v8Q5_WhAYBW1329lSBdnQA70HFTsU7U3D2MAxUn_uPVATXh7LAN_rqBnFCc0Y4njSCo.ADiUSS8bxB0sqigUET2acU5UPtUa3rjaNMzKJtTbuqlnN1VK9JvUzoupnOOyY75yKRu_x2iFm8zsehTNMHQe9xAsgqLI2qTR22Kl9b3oVJ.RRVqVLnA0OnA.SVBjMW83RIeApgQMXSHweArmSO5zSk.ivnqNtoGQLsj15fxx8puJVQPIPNoCova7asRIdtggo0sCICgUWeIFHzw15d3W1mhUSWHoDxkQ7QEcldqxKeyRH.1qtb2CmqXQzxdgdbyR0UFofmLyVETr81Mg1GhVH6vTw-- X-Yahoo-Newman-Property: ymail-3 From: "Nicholas A. Bellinger" To: Kevin Wolf , Gerd Hoffmann Cc: Christoph Hellwig , Hannes Reinecke , Paul Brook , kvm-devel , qemu-devel , Nicholas Bellinger Subject: [PATCH 1/2] [scsi-bus]: Add PR-OUT and PR-IN case for SCSIRequest xfer and xfer_mode setup Date: Sun, 30 May 2010 18:43:01 -0700 Message-Id: <1275270181-10992-1-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.5.6.5 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 31 May 2010 01:42:54 +0000 (UTC) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index b8e4b71..75ec74e 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -325,6 +325,10 @@ static int scsi_req_length(SCSIRequest *req, uint8_t *cmd) case INQUIRY: req->cmd.xfer = cmd[4] | (cmd[3] << 8); break; + case PERSISTENT_RESERVE_OUT: + case PERSISTENT_RESERVE_IN: + req->cmd.xfer = cmd[8] | (cmd[7] << 8); + break; } return 0; } @@ -389,6 +393,7 @@ static void scsi_req_xfer_mode(SCSIRequest *req) case MEDIUM_SCAN: case SEND_VOLUME_TAG: case WRITE_LONG_2: + case PERSISTENT_RESERVE_OUT: req->cmd.mode = SCSI_XFER_TO_DEV; break; default: