[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 20/20] pseries: Fix reset of VIO network device
From: |
Andreas Färber |
Subject: |
[Qemu-ppc] [PATCH 20/20] pseries: Fix reset of VIO network device |
Date: |
Sun, 15 Apr 2012 20:39:04 +0200 |
From: David Gibson <address@hidden>
Currently, the PAPR VIO network device does not have a reset handler. This
means that after a hard reset, H_REGISTER_LOGICAL_LAN will return an error
when the new guest boot attempts to initialize the device.
This patch corrects this, adding a suitable reset hook.
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
hw/spapr_llan.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/spapr_llan.c b/hw/spapr_llan.c
index 32dce17..e18d2eb 100644
--- a/hw/spapr_llan.c
+++ b/hw/spapr_llan.c
@@ -182,6 +182,15 @@ static NetClientInfo net_spapr_vlan_info = {
.receive = spapr_vlan_receive,
};
+static void spapr_vlan_reset(VIOsPAPRDevice *sdev)
+{
+ VIOsPAPRVLANDevice *dev = DO_UPCAST(VIOsPAPRVLANDevice, sdev, sdev);
+
+ dev->buf_list = 0;
+ dev->rx_bufs = 0;
+ dev->isopen = 0;
+}
+
static int spapr_vlan_init(VIOsPAPRDevice *sdev)
{
VIOsPAPRVLANDevice *dev = (VIOsPAPRVLANDevice *)sdev;
@@ -335,9 +344,7 @@ static target_ulong h_free_logical_lan(CPUPPCState *env,
sPAPREnvironment *spapr
return H_RESOURCE;
}
- dev->buf_list = 0;
- dev->rx_bufs = 0;
- dev->isopen = 0;
+ spapr_vlan_reset(sdev);
return H_SUCCESS;
}
@@ -484,6 +491,7 @@ static void spapr_vlan_class_init(ObjectClass *klass, void
*data)
VIOsPAPRDeviceClass *k = VIO_SPAPR_DEVICE_CLASS(klass);
k->init = spapr_vlan_init;
+ k->reset = spapr_vlan_reset;
k->devnode = spapr_vlan_devnode;
k->dt_name = "l-lan";
k->dt_type = "network";
--
1.7.7
- [Qemu-ppc] [PATCH 05/20] pseries: Remove unused fields from VIOsPAPRBus structure, (continued)
- [Qemu-ppc] [PATCH 05/20] pseries: Remove unused fields from VIOsPAPRBus structure, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 07/20] target-ppc: Drop cpu_ppc_close(), Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 11/20] target-ppc: QOM'ify CPU reset, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 09/20] target-ppc: QOM'ify CPU, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 12/20] target-ppc: Fix type casts for w64 (uintptr_t), Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 10/20] target-ppc: Start QOM'ifying CPU init, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 13/20] target-ppc: Init dcache and icache size for e500 user mode, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 08/20] target-ppc: Add hooks for handling tcg and kvm limitations, Andreas Färber, 2012/04/15
- [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 <=
- [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, 2012/04/15
- [Qemu-ppc] [PATCH 16/20] pseries: Remove old debug leftovers from spapr_vscsi, Andreas Färber, 2012/04/15