From: Andrej Ota <andrej@ota.si>
To: romieu@fr.zoreil.com
Cc: linux-kernel@vger.kernel.org, davem@davemloft.net
Subject: [PATCH] via-rhine: fix VLAN receive handling error in 4.2.x
Date: Sun, 4 Oct 2015 22:05:08 +0200 [thread overview]
Message-ID: <20151004200603.380C4F4DA@mta2.toshio.eu> (raw)
In-Reply-To: <20151003214708.GA32210@electric-eye.fr.zoreil.com>
Fixes commit 810f19bcb862 ("via-rhine: add consistent memory barrier in
vlan receive code.") which broke VLAN tag parsing on receive.
Because eth_type_trans() consumes ethernet header worth of bytes, a call
to read TCI from packet using rhine_rx_vlan_tag() no longer works as it's
reading from an invalid offset.
Tested to be working on PCEngines Alix board.
Fixes: 810f19bcb862 ("via-rhine: add consistent memory barrier in vlan receive code.")
Signed-off-by: Andrej Ota <andrej@ota.si>
---
drivers/net/ethernet/via/via-rhine.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index a832637..2b7550c 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -2134,10 +2134,11 @@ static int rhine_rx(struct net_device *dev, int limit)
}
skb_put(skb, pkt_len);
- skb->protocol = eth_type_trans(skb, dev);
rhine_rx_vlan_tag(skb, desc, data_size);
+ skb->protocol = eth_type_trans(skb, dev);
+
netif_receive_skb(skb);
u64_stats_update_begin(&rp->rx_stats.syncp);
--
2.4.3
next prev parent reply other threads:[~2015-10-04 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-03 17:21 Andrej
2015-10-03 21:47 ` Francois Romieu
2015-10-04 20:05 ` Andrej Ota [this message]
2015-10-06 7:34 ` [PATCH] " Francois Romieu
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=20151004200603.380C4F4DA@mta2.toshio.eu \
--to=andrej@ota.si \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=romieu@fr.zoreil.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®