]> git.proxmox.com Git - qemu.git/commit
spapr-vscsi: fix SOLNT bit in SRP_RSP
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 29 Jul 2013 04:48:39 +0000 (14:48 +1000)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 29 Jul 2013 15:37:09 +0000 (10:37 -0500)
commitdbd94f8e4a0a3c4164af7be5bbf6d4e907f3cc03
treee7789d1c9d46a88a3c38a24bdee106d70cf54df1
parentc04d6cfa3f17a335942f430a3d40e6041100f0c2
spapr-vscsi: fix SOLNT bit in SRP_RSP

The driver calculates SOLNT bit from UCSOLNT and  SCSOLNT bits from
the request. The iu pointer has a type of srp_iu* which points to a union,
so cmd and rsp overlap. As the vscsi_send_rsp function calls
memset(iu, 0, sizeof(rsp)), it clears first 36 bytes of both cmd and rsp
so cmd.sol_not is always zero at the moment of calculating rsp.sol_not.

This fixes the bug.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1375073319-17488-1-git-send-email-aik@ozlabs.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/scsi/spapr_vscsi.c