From patchwork Thu May 13 21:38:51 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: 99437 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 o4DLjhMJ011904 for ; Thu, 13 May 2010 21:45:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755378Ab0EMVpk (ORCPT ); Thu, 13 May 2010 17:45:40 -0400 Received: from smtp106.sbc.mail.gq1.yahoo.com ([67.195.14.109]:29717 "HELO smtp106.sbc.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754485Ab0EMVpj (ORCPT ); Thu, 13 May 2010 17:45:39 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 13 May 2010 21:45:44 +0000 (UTC) X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Thu, 13 May 2010 17:45:39 EDT Received: (qmail 89216 invoked from network); 13 May 2010 21:38:59 -0000 Received: from adsl-70-231-246-220.dsl.snfc21.sbcglobal.net (nab@70.231.246.220 with plain) by smtp106.sbc.mail.gq1.yahoo.com with SMTP; 13 May 2010 14:38:58 -0700 PDT X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: IdA1EfIVM1nUNYZNYqxQTiSW.uMlJ3NlMhuLeWhBbVDmmG6ZytW5rn0PKVs.MUwNwdOt_TwRXxP5wk4FwN4KnBUoiIJplhzdsE93pGKHVqfRX7PTmH5YvPWwZDeiaTIi29AV1IGhrJ8IIsOwYJaUMxbjsMdW152dIg4bN40H1VEpyBwRI4ixYBp7xj0DmH_mFtVRRcQKFp.GRx0kAUjsaS09lk6fbMGUoJFyaVsD2QuvUbXjzO7scZATGiTCkEgp1KPD_.RXc2deN4LHlOricQ7ZUEY3Iu4DKdXacVYcadlDUxVfMpq0Dya1gXhktLalhUwjy2hCzJR6ZYkLR72qnDRP7zqO6kDndqUE2dPuYulse_WHvu4oSPtxDBMTr9c6e.YW76ZNbaDlCg3E_n8RXmRMjyA06kuRUA-- X-Yahoo-Newman-Property: ymail-3 Subject: [QEMU-KVM]: Megasas + TCM_Loop + SG_IO into Windows XP guests From: "Nicholas A. Bellinger" To: Hannes Reinecke , Gerd Hoffmann , Christoph Hellwig , FUJITA Tomonori , Mike Christie , Douglas Gilbert , James Bottomley Cc: kvm-devel , qemu-devel , linux-scsi Date: Thu, 13 May 2010 14:38:51 -0700 Message-Id: <1273786731.13658.49.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index 6c58742..aa1eb83 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -140,6 +140,7 @@ static int execute_command_run(SCSIGenericReq *r, { BlockDriverState *bdrv = r->req.dev->conf.dinfo->bdrv; SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev); + int ret; r->io_header.interface_id = 'S'; r->io_header.dxfer_direction = sgdir[r->req.cmd.mode]; @@ -161,11 +162,16 @@ static int execute_command_run(SCSIGenericReq *r, printf("\n"); } #endif +#if 0 r->req.aiocb = bdrv_aio_ioctl(bdrv, SG_IO, &r->io_header, complete, r); if (r->req.aiocb == NULL) { BADF("execute_command: read failed !\n"); return -1; } +#else + ret = bdrv_ioctl(bdrv, SG_IO, &r->io_header); + complete((void *)r, ret); +#endif * return 0; }