qemu-stable
[Top][All Lists]
Advanced

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

Re: [Qemu-stable] [PATCH] megasas: fix mapped frame size


From: Hannes Reinecke
Subject: Re: [Qemu-stable] [PATCH] megasas: fix mapped frame size
Date: Thu, 4 Apr 2019 16:24:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 4/4/19 2:10 PM, Peter Lieven wrote:
the current value of 1024 bytes (16 * MFI_FRAME_SIZE) we map is not enough to 
hold
the maximum number of scatter gather elements we advertise. We actually need a
maximum of 2048 bytes. This is 128 max sg elements * 16 bytes (sizeof (union 
mfi_sgl)).

Cc: address@hidden
Signed-off-by: Peter Lieven <address@hidden>
---
  hw/scsi/megasas.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index a56317e026..5ad762de23 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -477,7 +477,7 @@ static MegasasCmd *megasas_enqueue_frame(MegasasState *s,
  {
      PCIDevice *pcid = PCI_DEVICE(s);
      MegasasCmd *cmd = NULL;
-    int frame_size = MFI_FRAME_SIZE * 16;
+    int frame_size = MEGASAS_MAX_SGE * sizeof(union mfi_sgl);
      hwaddr frame_size_p = frame_size;
      unsigned long index;
Indeed.

Reviewed-by: Hannes Reinecke <address@hidden>

Cheers,

Hannes



reply via email to

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