* [PATCH] net: dsa: Fix Marvell Egress Trailer check
@ 2015-09-22 9:28 Neil Armstrong
2015-09-22 15:12 ` Guenter Roeck
2015-09-23 0:37 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Neil Armstrong @ 2015-09-22 9:28 UTC (permalink / raw)
To: David S. Miller, Guenter Roeck; +Cc: netdev, linux-kernel
The Marvell Egress rx trailer check must be fixed to
correctly detect bad bits in the third byte of the
Eggress trailer as described in the Table 28 of the
88E6060 datasheet.
The current code incorrectly omits to check the third
byte and checks the fourth byte twice.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
net/dsa/tag_trailer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
index e268f9d..d0526a9 100644
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
@@ -84,7 +84,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev,
trailer = skb_tail_pointer(skb) - 4;
if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
- (trailer[3] & 0xef) != 0x00 || trailer[3] != 0x00)
+ (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
goto out_drop;
source_port = trailer[1] & 7;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: Fix Marvell Egress Trailer check
2015-09-22 9:28 [PATCH] net: dsa: Fix Marvell Egress Trailer check Neil Armstrong
@ 2015-09-22 15:12 ` Guenter Roeck
2015-09-23 0:37 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2015-09-22 15:12 UTC (permalink / raw)
To: Neil Armstrong, David S. Miller; +Cc: netdev, linux-kernel
On 09/22/2015 02:28 AM, Neil Armstrong wrote:
> The Marvell Egress rx trailer check must be fixed to
> correctly detect bad bits in the third byte of the
> Eggress trailer as described in the Table 28 of the
> 88E6060 datasheet.
> The current code incorrectly omits to check the third
> byte and checks the fourth byte twice.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Nice catch.
Acked-by: Guenter Roeck <linux@roeck-us.net>
> ---
> net/dsa/tag_trailer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
> index e268f9d..d0526a9 100644
> --- a/net/dsa/tag_trailer.c
> +++ b/net/dsa/tag_trailer.c
> @@ -84,7 +84,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev,
>
> trailer = skb_tail_pointer(skb) - 4;
> if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
> - (trailer[3] & 0xef) != 0x00 || trailer[3] != 0x00)
> + (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
> goto out_drop;
>
> source_port = trailer[1] & 7;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: Fix Marvell Egress Trailer check
2015-09-22 9:28 [PATCH] net: dsa: Fix Marvell Egress Trailer check Neil Armstrong
2015-09-22 15:12 ` Guenter Roeck
@ 2015-09-23 0:37 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-09-23 0:37 UTC (permalink / raw)
To: narmstrong; +Cc: linux, netdev, linux-kernel
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Tue, 22 Sep 2015 11:28:14 +0200
> The Marvell Egress rx trailer check must be fixed to
> correctly detect bad bits in the third byte of the
> Eggress trailer as described in the Table 28 of the
> 88E6060 datasheet.
> The current code incorrectly omits to check the third
> byte and checks the fourth byte twice.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-23 0:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22 9:28 [PATCH] net: dsa: Fix Marvell Egress Trailer check Neil Armstrong
2015-09-22 15:12 ` Guenter Roeck
2015-09-23 0:37 ` 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).