qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFT PATCH v1 3/3] net: smc91c111: flush packets on RCR


From: Fam Zheng
Subject: Re: [Qemu-devel] [RFT PATCH v1 3/3] net: smc91c111: flush packets on RCR register changes
Date: Tue, 15 Sep 2015 10:19:43 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, 09/10 21:24, Peter Crosthwaite wrote:
> The SOFT_RST or RXEN in the control register can be used as a condition
> to unblock the net layer via can_receive(). So check for possible
> flushes on RCR changes. This will drop all pending packets on soft
> reset or disable which is the functional intent of the can_receive()
> logic.
> 
> Signed-off-by: Peter Crosthwaite <address@hidden>
> ---
> 
>  hw/net/smc91c111.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
> index 8fc3deb..c19cdd1 100644
> --- a/hw/net/smc91c111.c
> +++ b/hw/net/smc91c111.c
> @@ -331,6 +331,7 @@ static void smc91c111_writeb(void *opaque, hwaddr offset,
>              if (s->rcr & RCR_SOFT_RST) {
>                  smc91c111_reset(DEVICE(s));
>              }
> +            smc91c111_flush_queued_packets(s);
>              return;
>          case 10: case 11: /* RPCR */
>              /* Ignored */
> -- 
> 1.9.1
> 
> 

Reviewed-by: Fam Zheng <address@hidden>

This should be useful for other NICs too.

Fam



reply via email to

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