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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,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 89F71C433B4 for ; Fri, 14 May 2021 16:58:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67C406145A for ; Fri, 14 May 2021 16:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230488AbhENQ7s (ORCPT ); Fri, 14 May 2021 12:59:48 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:40674 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbhENQ7r (ORCPT ); Fri, 14 May 2021 12:59:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=skB8FOzbhvQvufWUzW63XRlh1hW+g9TPFkTho/bPVwk=; b=wjgmefZ4JoxuBAkEfJsORkh5ZK lU/uLsVOL4GEL6h49X5uTwgW15AGd4AdgUiGGp7uf4hyuEIYG6GeW8FMm1Un72Ofm9SrJMuLNHX1R 1PZhOOYDcZB86knq7depKfFRvmFp+D79k8Pg1bRParZG8ufWoQAWWZCfG+W0XfYmFBY8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lhb8x-004DEL-Kv; Fri, 14 May 2021 18:58:31 +0200 Date: Fri, 14 May 2021 18:58:31 +0200 From: Andrew Lunn To: Ansuel Smith Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Rob Herring , Heiner Kallweit , Russell King , "open list:NETWORKING DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [RFC PATCH net-next v5 18/25] net: dsa: qca8k: dsa: qca8k: protect MASTER busy_wait with mdio mutex Message-ID: References: <20210511020500.17269-1-ansuelsmth@gmail.com> <20210511020500.17269-19-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210511020500.17269-19-ansuelsmth@gmail.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, May 11, 2021 at 04:04:53AM +0200, Ansuel Smith wrote: > MDIO_MASTER operation have a dedicated busy wait that is not protected > by the mdio mutex. This can cause situation where the MASTER operation > is done and a normal operation is executed between the MASTER read/write > and the MASTER busy_wait. Rework the qca8k_mdio_read/write function to > address this issue by binding the lock for the whole MASTER operation > and not only the mdio read/write common operation. > > Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Andrew