[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 19/20] pseries: Reset vscsi properly
From: |
Andreas Färber |
Subject: |
[Qemu-ppc] [PATCH 19/20] pseries: Reset vscsi properly |
Date: |
Sun, 15 Apr 2012 20:39:03 +0200 |
From: David Gibson <address@hidden>
Currently the PAPR vscsi implementation does not properly clear its table
of request tags when the system is reset. This patch adds a reset hook
to do so.
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
hw/spapr_vscsi.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c
index 3530a38..538e0b7 100644
--- a/hw/spapr_vscsi.c
+++ b/hw/spapr_vscsi.c
@@ -893,16 +893,20 @@ static const struct SCSIBusInfo vscsi_scsi_info = {
.cancel = vscsi_request_cancelled
};
-static int spapr_vscsi_init(VIOsPAPRDevice *dev)
+static void spapr_vscsi_reset(VIOsPAPRDevice *dev)
{
VSCSIState *s = DO_UPCAST(VSCSIState, vdev, dev);
int i;
- /* Initialize qemu request tags */
memset(s->reqs, 0, sizeof(s->reqs));
for (i = 0; i < VSCSI_REQ_LIMIT; i++) {
s->reqs[i].qtag = i;
}
+}
+
+static int spapr_vscsi_init(VIOsPAPRDevice *dev)
+{
+ VSCSIState *s = DO_UPCAST(VSCSIState, vdev, dev);
dev->crq.SendFunc = vscsi_do_crq;
@@ -952,6 +956,7 @@ static void spapr_vscsi_class_init(ObjectClass *klass, void
*data)
VIOsPAPRDeviceClass *k = VIO_SPAPR_DEVICE_CLASS(klass);
k->init = spapr_vscsi_init;
+ k->reset = spapr_vscsi_reset;
k->devnode = spapr_vscsi_devnode;
k->dt_name = "v-scsi";
k->dt_type = "vscsi";
--
1.7.7
- Re: [Qemu-ppc] [PATCH 08/20] target-ppc: Add hooks for handling tcg and kvm limitations, (continued)
- [Qemu-ppc] [PATCH 15/20] pseries: Fix RTAS based config access, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 17/20] pseries: Remove old hcalls hook stub, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 20/20] pseries: Fix reset of VIO network device, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 18/20] pseries: Correctly use the device model reset hooks, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 14/20] target-ppc/machine.c: Drop unnecessary ifdefs, Andreas Färber, 2012/04/15
- Re: [Qemu-ppc] [Qemu-devel] [PULL] ppc patch queue 2012-04-15, Andreas Färber, 2012/04/15
- Re: [Qemu-ppc] [PULL] ppc patch queue 2012-04-15, Blue Swirl, 2012/04/15
- [Qemu-ppc] [PATCH 02/20] pseries: Clean up hcall_dprintf() debugging messages, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 06/20] pseries: Consolidate hack for RTAS display-character usage, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 19/20] pseries: Reset vscsi properly,
Andreas Färber <=
- [Qemu-ppc] [PATCH 16/20] pseries: Remove old debug leftovers from spapr_vscsi, Andreas Färber, 2012/04/15