netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s2io: fix inconsistent hardware VLAN tagging during driver init
@ 2007-12-06 19:57 Andy Gospodarek
  2007-12-07 21:02 ` Ramkrishna Vepa
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Gospodarek @ 2007-12-06 19:57 UTC (permalink / raw)
  To: netdev; +Cc: ram.vepa, santosh.rastapur, sivakumar.subramani,
	sreenivasa.honnur


The s2io driver keeps a local variable around (vlan_strip_flag) to keep
track of the current state of the hardware and whether or not it will
strip VLAN tags on incoming packets.  It seems as though the hardware
default is to strip them, but that variable is not set correctly during
initialization if the default setup is used.  This check ensures
vlan_strip_flag and the hardware setting are in sync.

These variables were introduced by this patch:

commit 926930b202d56c3dfb6aea0a0c6bfba2b87a8c03
Author: Sivakumar Subramani <Sivakumar.Subramani@neterion.com>
Date:   Sat Feb 24 01:59:39 2007 -0500

so this problem hasn't been around forever.

Recent patches from Ramkrishna Vepa <ram.vepa@neterion.com> removed this
variable and would have worked around the problem, but they were not
accepted.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>

---

 s2io.c |    5 +++++
 1 files changed, 5 insertions(+)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 8b9f0ea..08c08de 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -2151,6 +2151,11 @@ static int start_nic(struct s2io_nic *nic)
 		val64 &= ~RX_PA_CFG_STRIP_VLAN_TAG;
 		writeq(val64, &bar0->rx_pa_cfg);
 		vlan_strip_flag = 0;
+	} else {
+		val64 = readq(&bar0->rx_pa_cfg);
+		val64 |= RX_PA_CFG_STRIP_VLAN_TAG;
+		writeq(val64, &bar0->rx_pa_cfg);
+		vlan_strip_flag = 1;
 	}
 
 	/*

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] s2io: fix inconsistent hardware VLAN tagging during driver init
  2007-12-06 19:57 [PATCH] s2io: fix inconsistent hardware VLAN tagging during driver init Andy Gospodarek
@ 2007-12-07 21:02 ` Ramkrishna Vepa
  2007-12-07 21:17   ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Ramkrishna Vepa @ 2007-12-07 21:02 UTC (permalink / raw)
  To: Andy Gospodarek, netdev, Jeff Garzik
  Cc: Rastapur Santosh, Sivakumar Subramani, Sreenivasa Honnur

Jeff,
This patch looks good. Please accept.

Ram
> -----Original Message-----
> From: Andy Gospodarek [mailto:andy@greyhouse.net]
> Sent: Thursday, December 06, 2007 11:57 AM
> To: netdev@vger.kernel.org
> Cc: ram.vepa@neterion.com; Rastapur Santosh; Sivakumar Subramani;
> Sreenivasa Honnur
> Subject: [PATCH] s2io: fix inconsistent hardware VLAN tagging during
> driver init
> 
> 
> The s2io driver keeps a local variable around (vlan_strip_flag) to
keep
> track of the current state of the hardware and whether or not it will
> strip VLAN tags on incoming packets.  It seems as though the hardware
> default is to strip them, but that variable is not set correctly
during
> initialization if the default setup is used.  This check ensures
> vlan_strip_flag and the hardware setting are in sync.
> 
> These variables were introduced by this patch:
> 
> commit 926930b202d56c3dfb6aea0a0c6bfba2b87a8c03
> Author: Sivakumar Subramani <Sivakumar.Subramani@neterion.com>
> Date:   Sat Feb 24 01:59:39 2007 -0500
> 
> so this problem hasn't been around forever.
> 
> Recent patches from Ramkrishna Vepa <ram.vepa@neterion.com> removed
this
> variable and would have worked around the problem, but they were not
> accepted.
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> 
> ---
> 
>  s2io.c |    5 +++++
>  1 files changed, 5 insertions(+)
> 
> diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
> index 8b9f0ea..08c08de 100644
> --- a/drivers/net/s2io.c
> +++ b/drivers/net/s2io.c
> @@ -2151,6 +2151,11 @@ static int start_nic(struct s2io_nic *nic)
>  		val64 &= ~RX_PA_CFG_STRIP_VLAN_TAG;
>  		writeq(val64, &bar0->rx_pa_cfg);
>  		vlan_strip_flag = 0;
> +	} else {
> +		val64 = readq(&bar0->rx_pa_cfg);
> +		val64 |= RX_PA_CFG_STRIP_VLAN_TAG;
> +		writeq(val64, &bar0->rx_pa_cfg);
> +		vlan_strip_flag = 1;
>  	}
> 
>  	/*

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s2io: fix inconsistent hardware VLAN tagging during driver init
  2007-12-07 21:02 ` Ramkrishna Vepa
@ 2007-12-07 21:17   ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-12-07 21:17 UTC (permalink / raw)
  To: Ramkrishna Vepa
  Cc: Andy Gospodarek, netdev, Rastapur Santosh, Sivakumar Subramani,
	Sreenivasa Honnur

Ramkrishna Vepa wrote:
> Jeff,
> This patch looks good. Please accept.
> 
> Ram
>> -----Original Message-----
>> From: Andy Gospodarek [mailto:andy@greyhouse.net]
>> Sent: Thursday, December 06, 2007 11:57 AM
>> To: netdev@vger.kernel.org
>> Cc: ram.vepa@neterion.com; Rastapur Santosh; Sivakumar Subramani;
>> Sreenivasa Honnur
>> Subject: [PATCH] s2io: fix inconsistent hardware VLAN tagging during
>> driver init


queued for my next patch run...




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-07 21:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 19:57 [PATCH] s2io: fix inconsistent hardware VLAN tagging during driver init Andy Gospodarek
2007-12-07 21:02 ` Ramkrishna Vepa
2007-12-07 21:17   ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).