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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 BAC1AC433ED for ; Mon, 26 Apr 2021 23:11:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93E6A6115B for ; Mon, 26 Apr 2021 23:11:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234781AbhDZXMh (ORCPT ); Mon, 26 Apr 2021 19:12:37 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:41916 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232022AbhDZXMg (ORCPT ); Mon, 26 Apr 2021 19:12:36 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lbAOH-001GWh-SV; Tue, 27 Apr 2021 01:11:45 +0200 Date: Tue, 27 Apr 2021 01:11:45 +0200 From: Andrew Lunn To: Chris Packham Cc: =?utf-8?B?5pu554Wc?= , "vivien.didelot@gmail.com" , Florian Fainelli , "olteanv@gmail.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: mv88e6171r and mv88e6161 switch not working properly after commit 0f3c66a3c7b4e8b9f654b3c998e9674376a51b0f Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Apr 26, 2021 at 09:25:42PM +0000, Chris Packham wrote: > Hi, > > On 23/04/21 7:57 pm, 曹煜 wrote: > > Hi, > > I've confirmed that the mv88e6171r and mv88e6161 switch run into > > MTU issue after that commit (from kernel 5.9.0 to kernel 5.12-rc): > Sorry to hear that. > > commit 0f3c66a3c7b4e8b9f654b3c998e9674376a51b0f > > Author: Chris Packham > > Date: Fri Jul 24 11:21:20 2020 +1200 > > > > net: dsa: mv88e6xxx: MV88E6097 does not support jumbo configuration > > > > The MV88E6097 chip does not support configuring jumbo frames. Prior to > > commit 5f4366660d65 only the 6352, 6351, 6165 and 6320 chips configured > > jumbo mode. The refactor accidentally added the function for the 6097. > > Remove the erroneous function pointer assignment. > > > Do you mean one of the other commits in that series? I think perhaps the > 88e6161 is missing from commit 1baf0fac10fb ("net: dsa: mv88e6xxx: Use > chip-wide max frame size for MTU"). I was doing that mostly from the > datasheets I had available so could have easily missed one. > > > After my modify: > > > > remove > > .port_set_jumbo_size = mv88e6165_port_set_jumbo_size, > > > > add > > .set_max_frame_size = mv88e6185_g1_set_max_frame_size, > > > > The issue is gone, so could you please commit a fix for these two chips? The datasheet i have for the 6161 shows that bits 13:12 control jumbo mode. So at least the code fits the datasheet. Also, when describing global 1 register 4, bit 10, it is reserved. However, the diagram at the beginning of the global1 section does list bit 10 as being MAX frame size. So your testing suggests the data sheet which Chris and I have is wrong. The change you suggest makes use of the older method of controlling the MTU. I will create a patch based on your suggestion. Andrew