From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8WNv-0005Gy-Q0 for qemu-devel@nongnu.org; Thu, 12 Nov 2009 04:54:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8WNq-0005GV-Qh for qemu-devel@nongnu.org; Thu, 12 Nov 2009 04:54:34 -0500 Received: from [199.232.76.173] (port=34981 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8WNq-0005GS-MT for qemu-devel@nongnu.org; Thu, 12 Nov 2009 04:54:30 -0500 Received: from cantor.suse.de ([195.135.220.2]:45627 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8WNq-0004Sb-7u for qemu-devel@nongnu.org; Thu, 12 Nov 2009 04:54:30 -0500 Message-ID: <4AFBDB53.7020400@suse.de> Date: Thu, 12 Nov 2009 10:54:27 +0100 From: Hannes Reinecke MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [sneak preview] major scsi overhaul References: <4AF4ACA5.2090701@redhat.com> <4AFA9E36.3030507@redhat.com> <4AFAA58B.6090907@suse.de> <4AFAB5F8.50209@redhat.com> <4AFABC65.7050308@suse.de> <4AFACC40.3010509@redhat.com> In-Reply-To: <4AFACC40.3010509@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: "qemu-devel@nongnu.org" Gerd Hoffmann wrote: > On 11/11/09 14:30, Hannes Reinecke wrote: >> Gerd Hoffmann wrote: >>> How about sticking a 'void *hba_private' element into SCSIRequest >>> instead? >>> >> Would work for me, too. >=20 > Pushed (scsi.v7 now). >=20 Okay, I've converted the driver. Works so far. One minor nitpick, though: diff --git a/dma-helpers.c b/dma-helpers.c index 712ed89..0c57648 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -12,7 +12,10 @@ =20 void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint) { - qsg->sg =3D qemu_malloc(alloc_hint * sizeof(ScatterGatherEntry)); + if (alloc_hint > 0) + qsg->sg =3D qemu_malloc(alloc_hint * sizeof(ScatterGatherEntry)); + else + qsg->sg =3D NULL; qsg->nsg =3D 0; qsg->nalloc =3D alloc_hint; qsg->size =3D 0; For some commands (eg TUR) alloc_hint would be '0' here, causing qemu to barf. Can you include this patch, too? Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: Markus Rex, HRB 16746 (AG N=FCrnberg)