netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dsa: mv88e6171: Fix tag_protocol check
@ 2014-10-14 18:21 Guenter Roeck
  2014-10-14 18:23 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guenter Roeck @ 2014-10-14 18:21 UTC (permalink / raw)
  To: David S. Miller
  Cc: Florian Fainelli, netdev, linux-kernel, Guenter Roeck,
	Andrew Lunn

tag_protocol is now an enum, so drivers have to check against it.

Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/net/dsa/mv88e6171.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
index 6365e30..1020a7a 100644
--- a/drivers/net/dsa/mv88e6171.c
+++ b/drivers/net/dsa/mv88e6171.c
@@ -206,7 +206,7 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
 	 */
 	val = 0x0433;
 	if (dsa_is_cpu_port(ds, p)) {
-		if (ds->dst->tag_protocol == htons(ETH_P_EDSA))
+		if (ds->dst->tag_protocol == DSA_TAG_PROTO_EDSA)
 			val |= 0x3300;
 		else
 			val |= 0x0100;
-- 
1.9.1

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

* Re: [PATCH] dsa: mv88e6171: Fix tag_protocol check
  2014-10-14 18:21 [PATCH] dsa: mv88e6171: Fix tag_protocol check Guenter Roeck
@ 2014-10-14 18:23 ` Florian Fainelli
  2014-10-14 19:59 ` Andrew Lunn
  2014-10-14 20:23 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2014-10-14 18:23 UTC (permalink / raw)
  To: Guenter Roeck, David S. Miller; +Cc: netdev, linux-kernel, Andrew Lunn

On 10/14/2014 11:21 AM, Guenter Roeck wrote:
> tag_protocol is now an enum, so drivers have to check against it.

Good catch, this driver got merged right in the middle of my changes
from __be16 to an enum and this slipped through.

> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Fixes: 42f272539487e49c9ea830ad97db41eb9937d5dc ("net: DSA: Marvell
mv88e6171 switch driver")
Acked-by: Florian Fainelli <f.fainelli@gmail.com>

> ---
>  drivers/net/dsa/mv88e6171.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
> index 6365e30..1020a7a 100644
> --- a/drivers/net/dsa/mv88e6171.c
> +++ b/drivers/net/dsa/mv88e6171.c
> @@ -206,7 +206,7 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
>  	 */
>  	val = 0x0433;
>  	if (dsa_is_cpu_port(ds, p)) {
> -		if (ds->dst->tag_protocol == htons(ETH_P_EDSA))
> +		if (ds->dst->tag_protocol == DSA_TAG_PROTO_EDSA)
>  			val |= 0x3300;
>  		else
>  			val |= 0x0100;
> 

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

* Re: [PATCH] dsa: mv88e6171: Fix tag_protocol check
  2014-10-14 18:21 [PATCH] dsa: mv88e6171: Fix tag_protocol check Guenter Roeck
  2014-10-14 18:23 ` Florian Fainelli
@ 2014-10-14 19:59 ` Andrew Lunn
  2014-10-14 20:23 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2014-10-14 19:59 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: David S. Miller, Florian Fainelli, netdev, linux-kernel,
	Andrew Lunn

On Tue, Oct 14, 2014 at 11:21:04AM -0700, Guenter Roeck wrote:
> tag_protocol is now an enum, so drivers have to check against it.
> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: Andrew Lunn <andrew@lunn.ch>

Thanks for fixing this.

       Andrew

> ---
>  drivers/net/dsa/mv88e6171.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
> index 6365e30..1020a7a 100644
> --- a/drivers/net/dsa/mv88e6171.c
> +++ b/drivers/net/dsa/mv88e6171.c
> @@ -206,7 +206,7 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
>  	 */
>  	val = 0x0433;
>  	if (dsa_is_cpu_port(ds, p)) {
> -		if (ds->dst->tag_protocol == htons(ETH_P_EDSA))
> +		if (ds->dst->tag_protocol == DSA_TAG_PROTO_EDSA)
>  			val |= 0x3300;
>  		else
>  			val |= 0x0100;
> -- 
> 1.9.1
> 

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

* Re: [PATCH] dsa: mv88e6171: Fix tag_protocol check
  2014-10-14 18:21 [PATCH] dsa: mv88e6171: Fix tag_protocol check Guenter Roeck
  2014-10-14 18:23 ` Florian Fainelli
  2014-10-14 19:59 ` Andrew Lunn
@ 2014-10-14 20:23 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-10-14 20:23 UTC (permalink / raw)
  To: linux; +Cc: f.fainelli, netdev, linux-kernel, andrew

From: Guenter Roeck <linux@roeck-us.net>
Date: Tue, 14 Oct 2014 11:21:04 -0700

> tag_protocol is now an enum, so drivers have to check against it.
> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Applied, thanks.

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

end of thread, other threads:[~2014-10-14 20:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14 18:21 [PATCH] dsa: mv88e6171: Fix tag_protocol check Guenter Roeck
2014-10-14 18:23 ` Florian Fainelli
2014-10-14 19:59 ` Andrew Lunn
2014-10-14 20:23 ` David Miller

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).