From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54381 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiCAf-0003HQ-FX for qemu-devel@nongnu.org; Sun, 08 Aug 2010 16:08:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OiCAd-0007hS-Al for qemu-devel@nongnu.org; Sun, 08 Aug 2010 16:08:36 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:56480) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCAd-0007cl-8M for qemu-devel@nongnu.org; Sun, 08 Aug 2010 16:08:35 -0400 Received: by qwi4 with SMTP id 4so1685252qwi.4 for ; Sun, 08 Aug 2010 13:08:18 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4C5EACF8.1010101@redhat.com> References: <4C5EACF8.1010101@redhat.com> Date: Sun, 8 Aug 2010 21:08:18 +0100 Message-ID: Subject: Re: [Qemu-devel] [patch] fix scsi-generic From: adq Content-Type: multipart/mixed; boundary=0016e654254801617d048d5576de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org --0016e654254801617d048d5576de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 8 August 2010 14:11, Kevin Wolf wrote: > Am 07.08.2010 02:55, schrieb adq: >> Hi, I've been tracking down why scsi generic devices (using SG_IO) >> don't work any more. After adding debug, I can see that it actually >> submits the scsi CDB in hw/scsi-generic.c/execute_command(), but that >> the hw/scsi-generic.c/scsi_read_complete() callback is never called. >> >> This is because these are done with ioctls, and the posix async ioctl >> code is, I think, broken right now. Some more debugging, led me to >> posix-aio-compat.c/posix_aio_process_queue(): >> >> =A0 =A0 =A0 =A0 =A0 =A0 if (acb->async_context_id !=3D async_context_id)= { >> >> The async_context_ids don't match, so the request is never handled. >> This is because the acb->async_context_id field is not initialised in >> posix-aio-compat.c/paio_ioctl() (compare with >> posix-aio-compat.c/paio_submit()). The attached patch adds the missing >> line in. >> >> This seems to fix the problem. Of course, /now/ I'm getting other >> weird problems (as I'm trying to see if I can get slysoft anydvd >> working in a KVM winXP vm), but they need further investigation and >> likely other fixes. >> >> Please forgive me if I'm mistaken in this, I've only just started >> looking at the qemu code. > > The patch looks correct to me. > > Please use git format-patch to generate the patch, so that it contains a > decent commit message and I can apply it with git am. Also, please don't > forget the Signed-off-by line, otherwise we can't accept it. Hi, please find it attached; I've not used format-patch before, hope this is correct! --0016e654254801617d048d5576de Content-Type: text/x-patch; charset=US-ASCII; name="0001-Set-the-async_context_id-field-when-queuing-an-async.patch" Content-Disposition: attachment; filename="0001-Set-the-async_context_id-field-when-queuing-an-async.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gcmbrxwp0 RnJvbSBkYjNjZmE0ZjEyY2E3ZTNlZDMwMDMwNGJhOGE0ZGIxNWU0OWI0MTg5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmRyZXcgZGUgUXVpbmNleSA8YWRxQGxpZHNraWFsZi5uZXQ+ CkRhdGU6IFN1biwgOCBBdWcgMjAxMCAyMTowNDo1MCArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIFNl dCB0aGUgYXN5bmNfY29udGV4dF9pZCBmaWVsZCB3aGVuIHF1ZXVpbmcgYW4gYXN5bmMgaW9jdGwg Y2FsbAoKU2lnbmVkLW9mZi1ieTogQW5kcmV3IGRlIFF1aW5jZXkgPGFkcUBsaWRza2lhbGYubmV0 PgotLS0KIHBvc2l4LWFpby1jb21wYXQuYyB8ICAgIDEgKwogMSBmaWxlcyBjaGFuZ2VkLCAxIGlu c2VydGlvbnMoKyksIDAgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvcG9zaXgtYWlvLWNvbXBh dC5jIGIvcG9zaXgtYWlvLWNvbXBhdC5jCmluZGV4IGE2N2ZmZT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