mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, kys@microsoft.com,
	olaf@aepfle.de, linux-kernel@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org
Subject: Re: [PATCH net-next] hv_netvsc: Fix the list processing for network change event
Date: Fri, 22 Apr 2016 10:49:19 +0200	[thread overview]
Message-ID: <87y486yqnk.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <1461280381-17530-1-git-send-email-haiyangz@microsoft.com> (Haiyang Zhang's message of "Thu, 21 Apr 2016 16:13:01 -0700")

Haiyang Zhang <haiyangz@microsoft.com> writes:

> RNDIS_STATUS_NETWORK_CHANGE event is handled as two "half events" --
> media disconnect & connect. The second half should be added to the list
> head, not to the tail. So all events are processed in normal order.
>

Thanks,

this matters when we get some other events in between these two halves.

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>

> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
>  drivers/net/hyperv/netvsc_drv.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index bfdb568a..ba3f3f3 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -1125,7 +1125,7 @@ static void netvsc_link_change(struct work_struct *w)
>  			netif_tx_stop_all_queues(net);
>  			event->event = RNDIS_STATUS_MEDIA_CONNECT;
>  			spin_lock_irqsave(&ndev_ctx->lock, flags);
> -			list_add_tail(&event->list, &ndev_ctx->reconfig_events);
> +			list_add(&event->list, &ndev_ctx->reconfig_events);
>  			spin_unlock_irqrestore(&ndev_ctx->lock, flags);
>  			reschedule = true;
>  		}

-- 
  Vitaly

  reply	other threads:[~2016-04-22  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 23:13 Haiyang Zhang
2016-04-22  8:49 ` Vitaly Kuznetsov [this message]
2016-04-25  3:28 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y486yqnk.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=davem@davemloft.net \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome