Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4298059rwl; Tue, 28 Mar 2023 05:32:10 -0700 (PDT) X-Google-Smtp-Source: AKy350YBhLwDW87oHlnZQOQAE4P2JJH894tngQgZ4pQP9yCUc4hVQji3c0jyTxsRtd9HDOMrHtIH X-Received: by 2002:a17:90b:4ace:b0:240:7c8a:5b91 with SMTP id mh14-20020a17090b4ace00b002407c8a5b91mr8286667pjb.23.1680006730232; Tue, 28 Mar 2023 05:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680006730; cv=none; d=google.com; s=arc-20160816; b=JN+phN98IMiRN5RJHVLomPvgqSK7+IWJwH3Pjte3tUhIa1y/YcGjTB3p0lc9jmJNX+ PxGJX8nXi8w+lED6hEaMstIuFYNSVjEesAJcnyuurz1nhjV9QV/WDzU9Qg3pqqk39ell gNZeGDHACywV+aMNEUb/T849zyU2icGXaKcrFcM8KbiUZafM1QwpYPrVLrdKHIijQ1sx +PJlxw8ZC3zXqABOQTmOnSgkTEc6PHbcx4jggJ7BP1ro8Stfx0Pa4Vgghwjj/pw4EYWc D2W/mgblgFFZ/LbtQWfzND3UD2ZgFUOdlpeNBN0cKw9dv+ImV9V7BuK74jbVnkYgmVQY C52g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=p1vueGhlFqaDJRo3Ow4NaqQoeuYHMXia7i1M7wo4oX0=; b=gT1s+gqX2G9usyuXlSv6zYRYvyESFD8WcqjvobjJZqDRrpZl9UO14tPGsSRAvaNfHj RqSRD9NW2VQumVzMina1Jn3dFoHkU8XmTTOk6agEWvH7Mtb0dKqHIV+7Ith4kOFcXAbB WmB4H5q2zw7K0yGeGwrozG3CV444nl11Uws40WegqHmZon2KaWmFx9Jk6j6DaBGafrMJ 711gOVaFvxsdomoJQCU8en7fW2/NXD82Y+dDaRq8IijcQXKQ7tIL9yXOEQ9PVbpguDyp gpQ4+vcsJNrjlyug2TBofPnmpbo41DPM5J99Pw7eFCJHF71boWfsVlrsGMl9Jk3BNteS s1RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=IWf53GWY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ck7-20020a17090afe0700b00233e8913e6bsi8092085pjb.173.2023.03.28.05.31.58; Tue, 28 Mar 2023 05:32:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=IWf53GWY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232322AbjC1Mau (ORCPT + 99 others); Tue, 28 Mar 2023 08:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjC1Mat (ORCPT ); Tue, 28 Mar 2023 08:30:49 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6EA186BE; Tue, 28 Mar 2023 05:30:47 -0700 (PDT) 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=p1vueGhlFqaDJRo3Ow4NaqQoeuYHMXia7i1M7wo4oX0=; b=IWf53GWYdLA9Up9WtqneknvJxX ztNLrBxlFPW0QeMFs36BDZewTV3YGh98GPqTbyplhKj3H7gS9BFnkTn44mJAlJBWfZNCpWXDkZ/IZ 5eyAwBA1jNo3833RCoi+FCliKJ/9copbULIfNCKPGbjJEQBopCeYwlMn+yO+TXpkAt6g=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ph8TF-008dwt-UM; Tue, 28 Mar 2023 14:30:37 +0200 Date: Tue, 28 Mar 2023 14:30:37 +0200 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Gustav Ekelund , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel@axis.com, Gustav Ekelund , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: dsa: mv88e6xxx: Reset mv88e6393x watchdog register Message-ID: <9ba1722a-8dd7-4d6d-bade-b4c702c8387f@lunn.ch> References: <20230328115511.400145-1-gustav.ekelund@axis.com> <20230328120604.zawfeskqs4yhlze6@kandell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230328120604.zawfeskqs4yhlze6@kandell> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +static int mv88e6393x_watchdog_action(struct mv88e6xxx_chip *chip, int irq) > > +{ > > + mv88e6390_watchdog_action(chip, irq); > > + > > + mv88e6xxx_g2_write(chip, MV88E6390_G2_WDOG_CTL, > > + MV88E6390_G2_WDOG_CTL_UPDATE | > > + MV88E6390_G2_WDOG_CTL_PTR_EVENT); > > + > > + return IRQ_HANDLED; > > +} > > Shouldn't this update be in .irq_setup() method? In the commit message > you're saying that the problem is that bits aren't cleared with SW > reset. So I would guess that the change should be in the setup of > watchdog IRQ, not in IRQ action? I think it is a bit more complex than that. At least for the 6352, which i just looked at the data sheet, the interrupt bits are listed as "ROC". Which is missing from the list of definitions, but seems to mean Read Only, Clear on read. So even if it was not cleared on software reset, it would only fire once, and then be cleared. The problem description here is that it does not clear on read, it needs an explicit write. Which suggests Marvell changed it for the 6393. So i have a couple of questions: 1) Is this new behaviour limited to the 6393, or does the 6390 also need this write? 2) What about other interrupts? Is this the only one which has changed behaviour? Andrew