* [PATCH 1/1] sky2: fix YUKON FE+ rev. A0, ingress VLAN tagged frame problem
@ 2012-05-01 15:49 Michele Cucchi
2012-05-01 16:54 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Michele Cucchi @ 2012-05-01 15:49 UTC (permalink / raw)
To: Mirko Lindner, Stephen Hemminger; +Cc: netdev, Michele Cucchi
The cards based on chip YUKON FE+ revision A0, fails to correctly receive VLAN tagged frames. The ingress frames stays on raw physical interface and don't reach VLANS allocated interfaces.
The problem is the double call of __vlan_hwaccel_put_tag function, one in the sky2_skb_rx function and the other in the vlans global function vlan_untag.
Adding a check of card version and revision in the sky2_skb_rx function allow to skip the first time call of __vlan_hwaccel_put_tag and to fix the problem.
This fix is tested on 3.4-rc5.
Signed-off-by: Michele Cucchi <cucchimichele@tiscali.it>
---
drivers/net/ethernet/marvell/sky2.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index c9b504e..2be0351 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -2649,7 +2649,10 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
static inline void sky2_skb_rx(const struct sky2_port *sky2,
u32 status, struct sk_buff *skb)
{
- if (status & GMR_FS_VLAN)
+ /* Workaround for YUKON FE+ rev. A0, vlan untag problem */
+ if ((status & GMR_FS_VLAN) &&
+ (!(sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
+ sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0)))
__vlan_hwaccel_put_tag(skb, be16_to_cpu(sky2->rx_tag));
if (skb->ip_summed == CHECKSUM_NONE)
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] sky2: fix YUKON FE+ rev. A0, ingress VLAN tagged frame problem
2012-05-01 15:49 [PATCH 1/1] sky2: fix YUKON FE+ rev. A0, ingress VLAN tagged frame problem Michele Cucchi
@ 2012-05-01 16:54 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2012-05-01 16:54 UTC (permalink / raw)
To: Michele Cucchi; +Cc: Mirko Lindner, netdev
On Tue, 1 May 2012 17:49:00 +0200
Michele Cucchi <cucchimichele@tiscali.it> wrote:
> The cards based on chip YUKON FE+ revision A0, fails to correctly receive VLAN tagged frames. The ingress frames stays on raw physical interface and don't reach VLANS allocated interfaces.
> The problem is the double call of __vlan_hwaccel_put_tag function, one in the sky2_skb_rx function and the other in the vlans global function vlan_untag.
> Adding a check of card version and revision in the sky2_skb_rx function allow to skip the first time call of __vlan_hwaccel_put_tag and to fix the problem.
>
> This fix is tested on 3.4-rc5.
>
> Signed-off-by: Michele Cucchi <cucchimichele@tiscali.it>
> ---
> drivers/net/ethernet/marvell/sky2.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
> index c9b504e..2be0351 100644
> --- a/drivers/net/ethernet/marvell/sky2.c
> +++ b/drivers/net/ethernet/marvell/sky2.c
> @@ -2649,7 +2649,10 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
> static inline void sky2_skb_rx(const struct sky2_port *sky2,
> u32 status, struct sk_buff *skb)
> {
> - if (status & GMR_FS_VLAN)
> + /* Workaround for YUKON FE+ rev. A0, vlan untag problem */
> + if ((status & GMR_FS_VLAN) &&
> + (!(sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
> + sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0)))
> __vlan_hwaccel_put_tag(skb, be16_to_cpu(sky2->rx_tag));
>
> if (skb->ip_summed == CHECKSUM_NONE)
A better solution to this was started by Mirko and revised by me.
It is was posted yesterday.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-01 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-01 15:49 [PATCH 1/1] sky2: fix YUKON FE+ rev. A0, ingress VLAN tagged frame problem Michele Cucchi
2012-05-01 16:54 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox