Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2344628ima; Mon, 22 Oct 2018 08:16:17 -0700 (PDT) X-Google-Smtp-Source: AJdET5dsdZ/fwZQcug4dak7GekR3CxmAUAhdYHdD258wBCIAbzowCGrMulm4ySEPvIEYh82JTii6 X-Received: by 2002:a17:902:ac86:: with SMTP id h6-v6mr5694202plr.174.1540221377601; Mon, 22 Oct 2018 08:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540221377; cv=none; d=google.com; s=arc-20160816; b=pHg6kcsBluKrQx1/guej59b139aVWNVHGJQV2TjZSc2xlot/jPFoyI7L29ai5SZFIH EAmR5NQxrJyr6GO7Q3p+GjKgqkjDvu/cAEVYBfqZ67JqH6LSuIhAcRkcOo9JaYdrAyAj Pjle6XYbbsHxOjHNyEdR9KecPex6YGjdX/UqF4d8rovVen51yQbBZpvsy0sPW9bKiq+D b622JesbUAwxHdRyBGBjvnnKU33ZxoD9QnNl/1Ai2JkPp+LWnR+Cu8+hNpBExYeh0sOx mjFnJQThbFZ58Q5TZjh6K+WJEDHg9AQOV3l9c7DRKEVfoleoUJpvm9Fz56SYTk+46Nfp Ddnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=qDIq/Vr1+dyM00LkwruOfzNZ+d0jJVt54f2+CETbtSc=; b=PlpJVjK51YrbxGApj0EFtUhTuV8gyM1ko3+XYQlxV3LyWw4eMc/3iw5M+A8Okd6fuS DZYLGOJTxHL714ajQybYEMmJqrpNnHqiMeaeC5po0pSVaPY/OxdfcR5VWrz7+TXmiie3 7jsni0U71vA8E8c+KCB85y22nji0JNX0IbRyeozy3ifJPX4kgN4+ZKiK55DF5InQ2f2/ ZkbTNN3oU37I0VfpxFD98AxGoTQBV4z2fUh8LHPS1NxQ3kB0pgJJypf02cxqj6N02ZWQ VfRdXkO+si5fujFLCxh7LHH2uf/4IPayRhVM2hKctqD1IR3pYz3iqyTlC2kpK8f2si52 0Fdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be12-v6si32940820plb.347.2018.10.22.08.16.01; Mon, 22 Oct 2018 08:16:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728311AbeJVXeY (ORCPT + 99 others); Mon, 22 Oct 2018 19:34:24 -0400 Received: from mout01.posteo.de ([185.67.36.141]:46372 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728050AbeJVXeX (ORCPT ); Mon, 22 Oct 2018 19:34:23 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DFD6A20E25 for ; Mon, 22 Oct 2018 17:15:23 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 42f0Sp3vvdz6tmD; Mon, 22 Oct 2018 17:15:22 +0200 (CEST) Subject: Re: CRC errors between mvneta and macb To: Willy Tarreau Cc: 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> From: Richard Genoud Message-ID: <31385a3b-2196-94d0-7f4f-52e37ee07a28@sorico.fr> Date: Mon, 22 Oct 2018 17:15:21 +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: 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 à 08:51, Richard Genoud a écrit : > Le 19/10/2018 à 17:44, Willy Tarreau a écrit : >> On Fri, Oct 19, 2018 at 05:15:03PM +0200, Richard Genoud wrote: >>> When there's a CRC error, the TXCLK has its polarity inverted... >>> That's a clue ! >>> >>> But this TXCLK (25MHz) is not used on the g35-ek. >>> Only the REFCLK/XT2 (50MHz) is used to synchronise the PHY and the macb. >>> So I guess that the TXCLK has a role to play to generate TX+/TX- >> >> Well, just a stupid idea, maybe when this signal is inverted, the TX+/TX- >> are desynchronized by half a clock and are not always properly interpreted >> on the other side ? >> >> Willy >> > > I must admit that I'm not familiar with the PHY internals, I'll have to > dig into that. > > Richard. > I dug more on the subject, and I think I found what Marvell's PHY/MAC doesn't like. First of all, I forced the liaison at 10Mbits full duplex on both sides, as the Manchester code is "easier" to decode than the 4B5B-MLT3 used for fast ethernet. Fortunately, the FCS errors are still present on 10Mbits/s. 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) To say this in another way, instead of having 28 times 1-0 followed by the SFD (10101011), I see 29 or 30 times 1-0 followed by the SFD. (sometimes 29, sometimes 30) Should a longer preamble be considered as an FCS error ? It seems a little harsh since the point of the preamble is to synchronize the frame. I don't know what the 802.3 standard says about that. Regards, Richard.