From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751086AbeAVVMl (ORCPT ); Mon, 22 Jan 2018 16:12:41 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:41112 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbeAVVMj (ORCPT ); Mon, 22 Jan 2018 16:12:39 -0500 Date: Mon, 22 Jan 2018 16:12:37 -0500 (EST) Message-Id: <20180122.161237.1482527198791478004.davem@davemloft.net> To: f.fainelli@gmail.com Cc: netdev@vger.kernel.org, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, maxime.ripard@free-electrons.com, wens@csie.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next v2] net: stmmac: Fix reception of Broadcom switches tags From: David Miller In-Reply-To: <20180118231222.19394-1-f.fainelli@gmail.com> References: <20180118231222.19394-1-f.fainelli@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli Date: Thu, 18 Jan 2018 15:12:21 -0800 > Broadcom tags inserted by Broadcom switches put a 4 byte header after > the MAC SA and before the EtherType, which may look like some sort of 0 > length LLC/SNAP packet (tcpdump and wireshark do think that way). With > ACS enabled in stmmac the packets were truncated to 8 bytes on > reception, whereas clearing this bit allowed normal reception to occur. > > In order to make that possible, we need to pass a net_device argument to > the different core_init() functions and we are dependent on the Broadcom > tagger padding packets correctly (which it now does). To be as little > invasive as possible, this is only done for gmac1000 when the network > device is DSA-enabled (netdev_uses_dsa() returns true). > > Signed-off-by: Florian Fainelli > --- > Changes in v2: > > - fixed build failure in dwmac4_core.c > - updated dwmac100_core.c to also clear the ASTP bit Applied, thanks Florian.