From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7993C46475 for ; Tue, 23 Oct 2018 12:37:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7ABEC20651 for ; Tue, 23 Oct 2018 12:37:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ABEC20651 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728132AbeJWVAv (ORCPT ); Tue, 23 Oct 2018 17:00:51 -0400 Received: from mout02.posteo.de ([185.67.36.142]:47357 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbeJWVAv (ORCPT ); Tue, 23 Oct 2018 17:00:51 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2B7E92400FB for ; Tue, 23 Oct 2018 14:37:31 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 42fXw81Pxbz9rxV; Tue, 23 Oct 2018 14:37:28 +0200 (CEST) Subject: Re: CRC errors between mvneta and macb To: Andrew Lunn Cc: Willy Tarreau , linux-kernel@vger.kernel.org, Thomas Petazzoni , Antoine Tenart , Gregory CLEMENT , Yelena Krivosheev , Maxime Chevallier , Nicolas Ferre , netdev@vger.kernel.org References: <20181019154439.GC24045@1wt.eu> <31385a3b-2196-94d0-7f4f-52e37ee07a28@sorico.fr> <20181022181918.GF24112@lunn.ch> From: Richard Genoud Message-ID: <302ebc5c-0c07-dc4e-73ed-6a4adb9cbee4@sorico.fr> Date: Tue, 23 Oct 2018 14:37:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181022181918.GF24112@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 22/10/2018 à 20:19, Andrew Lunn a écrit : >> I dug more on the subject, and I think I found what Marvell's PHY/MAC >> doesn't like. > > Hi Richard > > What PHY is being used? > >> After analyzing the ethernet frame on the Davicom PHY's output (pin >> TX+), I find out that the FCS errors occurs when the ethernet preamble >> is longer than 56bits. (something like 58 or 60 bits) > > Some Marvell PHYs have a register bit which might be of interest: Page > 2, register 16, bit 6. > > 0 = Pad odd nibble preambles in copper receive packets. > 1 = Pass as is and do not pad odd nibble preambles in It doesn't seem to change anything. But the problem really seems to be between the 88E1512 and mvneta. In mvneta_rx_swbm() I dumped the data received, in both cases, I've got the same thing: 0000 0000 0000 0000 0004 a3d2 a7ef 0800 dead beef 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 8a86 ce78 The 2 first bytes are the marvell header, and 4 last the CRC In one case the MVNETA_RXD_ERR_SUMMARY status bit is set, and not in the other case. But I don't have access to the Marvell documentation to know exactly what is the status "MVNETA_RXD_ERR_CRC". Richard