qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH] e1000: Preserve link state across device rese


From: Jan Kiszka
Subject: Re: [Qemu-trivial] [PATCH] e1000: Preserve link state across device reset
Date: Tue, 24 Jan 2012 13:50:12 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2012-01-24 13:47, Jan Kiszka wrote:
> A device reset does not affect the link state, only set_link does.
> 
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
>  hw/e1000.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/e1000.c b/hw/e1000.c
> index 86c5416..76e736f 100644
> --- a/hw/e1000.c
> +++ b/hw/e1000.c
> @@ -1133,6 +1133,11 @@ static void e1000_reset(void *opaque)
>      memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init);
>      d->rxbuf_min_shift = 1;
>      memset(&d->tx, 0, sizeof d->tx);
> +
> +    if (d->nic->nc.link_down) {
> +        d->mac_reg[STATUS] &= ~E1000_STATUS_LU;
> +        d->phy_reg[PHY_STATUS] &= ~MII_SR_LINK_STATUS;
> +    }
>  }
>  
>  static NetClientInfo net_e1000_info = {

May rather go via trivial, sorry.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

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