qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [sneak preview] major scsi overhaul


From: Hannes Reinecke
Subject: Re: [Qemu-devel] Re: [sneak preview] major scsi overhaul
Date: Thu, 12 Nov 2009 10:54:27 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

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.
> 
> Pushed (scsi.v7 now).
> 
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 @@
 
 void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint)
 {
-    qsg->sg = qemu_malloc(alloc_hint * sizeof(ScatterGatherEntry));
+    if (alloc_hint > 0)
+       qsg->sg = qemu_malloc(alloc_hint * sizeof(ScatterGatherEntry));
+    else
+       qsg->sg = NULL;
     qsg->nsg = 0;
     qsg->nalloc = alloc_hint;
     qsg->size = 0;

For some commands (eg TUR) alloc_hint would be '0' here,
causing qemu to barf.

Can you include this patch, too?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
address@hidden                        +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]