NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-evbarm/49967: awge(4) should declare VLAN capability



>Number:         49967
>Category:       port-evbarm
>Synopsis:       awge(4) should declare VLAN capability
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-evbarm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 11 23:50:00 +0000 2015
>Originator:     Tobias Nygren
>Release:        7.99.18
>Organization:
>Environment:
Banana Pi M1
>Description:
vlan(4) on Allwinner SoCs does not work because the interface is not marked as VLAN MTU capable.
>How-To-Repeat:
Attempted to configure vlan(4) on a Banana Pi, resulted in vlan interfaces with mtu 1496 instead of 1500 and errors:
vlan1: discarding oversize frame (len=1514)

>Fix:
It seems to work fine to just add ETHERCAP_VLAN_MTU. Probably the hardware can do ETHERCAP_VLAN_HWTAGGING as well but that can be added later.

Index: dwc_gmac.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/dwc_gmac.c,v
retrieving revision 1.32
diff -u -r1.32 dwc_gmac.c
--- dwc_gmac.c	23 Feb 2015 19:05:17 -0000	1.32
+++ dwc_gmac.c	11 Jun 2015 23:43:38 -0000
@@ -238,6 +238,11 @@
         }
 
 	/*
+	 * We can support 802.1Q VLAN-sized frames.
+	 */
+	sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_MTU;
+
+	/*
 	 * Ready, attach interface
 	 */
 	if_attach(ifp);



Home | Main Index | Thread Index | Old Index