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 04D47C388F9 for ; Wed, 21 Oct 2020 13:38:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7D77208C3 for ; Wed, 21 Oct 2020 13:38:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442969AbgJUNiE (ORCPT ); Wed, 21 Oct 2020 09:38:04 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:38130 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410328AbgJUNiE (ORCPT ); Wed, 21 Oct 2020 09:38:04 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kVEJS-002p6h-RO; Wed, 21 Oct 2020 15:37:58 +0200 Date: Wed, 21 Oct 2020 15:37:58 +0200 From: Andrew Lunn To: Greg Ungerer Cc: Chris Heally , netdev@vger.kernel.org, Fugang Duan Subject: Re: [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO Message-ID: <20201021133758.GL139700@lunn.ch> References: <20201020024000.GV456889@lunn.ch> <9fa61ea8-11b4-ef3c-c04e-cb124490c9ae@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9fa61ea8-11b4-ef3c-c04e-cb124490c9ae@linux-m68k.org> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > + if (fep->quirks & FEC_QUIRK_CLEAR_SETUP_MII) { > + /* Clear MMFR to avoid to generate MII event by writing MSCR. > + * MII event generation condition: > + * - writing MSCR: > + * - mmfr[31:0]_not_zero & mscr[7:0]_is_zero & > + * mscr_reg_data_in[7:0] != 0 > + * - writing MMFR: > + * - mscr[7:0]_not_zero > + */ > + writel(0, fep->hwp + FEC_MII_DATA); > + } Hi Greg The last time we discussed this, we decided that if you cannot do the quirk, you need to wait around for an MDIO interrupt, e.g. call fec_enet_mdio_wait() after setting FEC_MII_SPEED register. > > writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); Andrew