All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Hayes Wang <hayeswang@realtek.com>
Cc: netdev@vger.kernel.org, nic_swsd@realtek.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] r8169: fix the default setting of rx vlan
Date: Fri, 12 Sep 2014 21:40:14 +0200	[thread overview]
Message-ID: <20140912194014.GA15496@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1394712342-15778-39-Taiwan-albertk@realtek.com>

Hayes Wang <hayeswang@realtek.com> :
> If the parameter "features" of __rtl8169_set_features() is equal to
> dev->features, the variable "changed" is alwayes 0, and nothing would
> be changed.
[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 91652e7..f3ce284 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -6707,7 +6707,12 @@ static int rtl_open(struct net_device *dev)
>  
>  	rtl8169_init_phy(dev, tp);
>  
> -	__rtl8169_set_features(dev, dev->features);
> +	if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
> +		tp->cp_cmd |= RxVlan;
> +	else
> +		tp->cp_cmd &= ~RxVlan;
> +
> +	RTL_W16(CPlusCmd, tp->cp_cmd);

Damn good catch.

The same fix should be relevant for NETIF_F_RXCSUM. You may thus as
well remove the "changed" test in __rtl8169_set_features and keep
everything there.

The commit message could notify the driver don't behave as expected since
6bbe021d405fff46b64a08dca51b06897b897a67 ("r8169: Support RX-ALL flag.")
to ease stable people's work.

-- 
Ueimor

  reply	other threads:[~2014-09-12 19:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  3:35 [PATCH net 0/2] r8169: fix rx vlan Hayes Wang
2014-09-12  3:35 ` [PATCH net 1/2] r8169: fix the default setting of " Hayes Wang
2014-09-12 19:40   ` Francois Romieu [this message]
2014-09-15  3:22     ` Hayes Wang
2014-09-16  0:03       ` Francois Romieu
2014-09-16  3:23         ` Hayes Wang
2014-09-16  3:40         ` [PATCH net] r8169: adjust __rtl8169_set_features Hayes Wang
2014-09-16 19:56           ` David Miller
2014-09-12  3:35 ` [PATCH net 2/2] r8169: fix setting rx vlan Hayes Wang
2014-09-13 20:53 ` [PATCH net 0/2] r8169: fix " 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=20140912194014.GA15496@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=hayeswang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.