[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/23] e1000: move e1000_autoneg_timer() to after set
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 10/23] e1000: move e1000_autoneg_timer() to after set_ics() |
Date: |
Mon, 23 Jun 2014 18:53:39 +0300 |
From: "Gabriel L. Somlo" <address@hidden>
Enable calling set_ics() from within e1000_autoneg_timer() without
the need for a forward declaration.
This patch contains no functional changes.
Signed-off-by: Gabriel Somlo <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/net/e1000.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index d20f8c8..8ee5225 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -204,19 +204,6 @@ set_phy_ctrl(E1000State *s, int index, uint16_t val)
}
}
-static void
-e1000_autoneg_timer(void *opaque)
-{
- E1000State *s = opaque;
- if (!qemu_get_queue(s->nic)->link_down) {
- e1000_link_up(s);
- s->phy_reg[PHY_LP_ABILITY] |= MII_LPAR_LPACK;
- s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
- DBGOUT(PHY, "Auto negotiation is completed\n");
- set_ics(s, 0, E1000_ICS_LSC); /* signal link status change to guest */
- }
-}
-
static void (*phyreg_writeops[])(E1000State *, int, uint16_t) = {
[PHY_CTRL] = set_phy_ctrl,
};
@@ -348,6 +335,19 @@ set_ics(E1000State *s, int index, uint32_t val)
set_interrupt_cause(s, 0, val | s->mac_reg[ICR]);
}
+static void
+e1000_autoneg_timer(void *opaque)
+{
+ E1000State *s = opaque;
+ if (!qemu_get_queue(s->nic)->link_down) {
+ e1000_link_up(s);
+ s->phy_reg[PHY_LP_ABILITY] |= MII_LPAR_LPACK;
+ s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
+ DBGOUT(PHY, "Auto negotiation is completed\n");
+ set_ics(s, 0, E1000_ICS_LSC); /* signal link status change to guest */
+ }
+}
+
static int
rxbufsize(uint32_t v)
{
--
MST
- [Qemu-devel] [PULL 00/23] pc,pci,vhost,net fixes, enhancements, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 01/23] vhost: block migration if backend does not log memory, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 02/23] vhost: fix resource leak in error handling, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 03/23] qapi/hmp: use 'backend' instead of 'device' with memory backend, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 04/23] libqemustub: add more stubs for qemu-char, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 05/23] qtest: fix qtest for vhost-user, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 06/23] qtest: fix vhost-user-test unbalanced mutex locks, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 08/23] e1000: improve auto-negotiation reporting via mii-tool, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 07/23] e1000: emulate auto-negotiation during external link status change, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 09/23] e1000: signal guest on successful link auto-negotiation, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 10/23] e1000: move e1000_autoneg_timer() to after set_ics(),
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 11/23] e1000: factor out checking for auto-negotiation availability, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 13/23] qemu-char: fix qemu_chr_fe_get_msgfd(), Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 12/23] qapi/string-output-visitor: fix human output, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 14/23] qemu-char: avoid leaking unused fds in tcp_get_msgfds(), Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 15/23] virtio-pci: Report an error when msix vectors init fails, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 16/23] q35: Use PC_Q35_COMPAT_1_4 on pc-q35-1.4 compat_props, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 17/23] hw/pcie: correct debug message, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 18/23] hw/pcie: implement power controller functionality, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 19/23] hw/pcie: better hotplug/hotunplug support, Michael S. Tsirkin, 2014/06/23
- [Qemu-devel] [PULL 20/23] pcie: coding style tweak, Michael S. Tsirkin, 2014/06/23