Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4405214rwl; Tue, 28 Mar 2023 06:47:53 -0700 (PDT) X-Google-Smtp-Source: AKy350Z4iO0fJsuIx0QSqcjQabDHvBXH2k8S09ollRO6NPKwzQXhHYEKdvL01W8VNFPCcpXlPfne X-Received: by 2002:a05:6402:1058:b0:4fb:1fa8:da25 with SMTP id e24-20020a056402105800b004fb1fa8da25mr14031277edu.36.1680011273586; Tue, 28 Mar 2023 06:47:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680011273; cv=pass; d=google.com; s=arc-20160816; b=lHQAnMAMItjUOhxSsEq2H8NBY43KWLVfDtQKR9HN/ThC9mdWsMLM7/8NcJCQGC6nHf Z7CNj69VvXdbQygYGTp9Jtx1+U7UPXsTic4S2ElXxrP/Oa6NCW8AtS48s7zMGYOse1jS 1T1E1+mozQ2GhsXZ9XXZPIYKWzCKa5yaQqEtwqOQCSAR4iNzTa3WoWBmWHftPYeoaUoD FtRFZ5f8F7mewVljjXafBCpIyAFGPDOxMC8+9tuAkSTp7vXFiHLFNoxUCpoIXERVxfGw pAAr8vF8XNSUtXZwF9ZnhzLB7CF/R0E7a99sSnAitMIR37IvVAF9d2hXOjA32tMo3dJ+ zJcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=Xq+hXiq3wsn4Aud9yHLvdm72Clljl8fb6hMrdil9KgU=; b=FhUXIe9+MZfSZYLF9wha7e3cqqnFj+jhFTe3BrOiZ/qX84InS6Ih/3qe7MFE//j/L4 /wQs+uo4hKJrvsK1RgAWAWjFJfFTDF0dbZhM2n7nIrwhP3zggIwhgr9vBeLNgDgAaYlZ 9JtkdzrOfY+Nc9pmlOtZ3bNnlBnjvW/UKFMcFANFeewG0Kyg3YTXy5XPtQmS5axhYO5U RBP5RuZFUUQVyovGZfUQslha0HsOHgbi/dB10PGL3D95I1gorgp8HU3s8Jmln19kv4vo nwJlDF7Y7NJ5LajRCI5ZAtJhzwvunKxgNvgBEC5v3kryJMstlFbaxGZW80rNGL+YKL50 I0GQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=GLrPlVv5; dkim=pass header.i=@axis365.onmicrosoft.com header.s=selector2-axis365-onmicrosoft-com header.b=lVVu3aQQ; arc=pass (i=1 spf=pass spfdomain=axis.com dkim=pass dkdomain=axis.com dmarc=pass fromdomain=axis.com); 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=axis.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d25-20020aa7d699000000b004fc8943f1ffsi9167795edr.211.2023.03.28.06.47.27; Tue, 28 Mar 2023 06:47:53 -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 (test mode) header.i=@axis.com header.s=axis-central1 header.b=GLrPlVv5; dkim=pass header.i=@axis365.onmicrosoft.com header.s=selector2-axis365-onmicrosoft-com header.b=lVVu3aQQ; arc=pass (i=1 spf=pass spfdomain=axis.com dkim=pass dkdomain=axis.com dmarc=pass fromdomain=axis.com); 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=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233304AbjC1Nky (ORCPT + 99 others); Tue, 28 Mar 2023 09:40:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232842AbjC1Nkn (ORCPT ); Tue, 28 Mar 2023 09:40:43 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3640C650; Tue, 28 Mar 2023 06:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1680010832; x=1711546832; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=Xq+hXiq3wsn4Aud9yHLvdm72Clljl8fb6hMrdil9KgU=; b=GLrPlVv5pQP8JxhaefokIFjmuO+jUi09bqFjztl+jEJhLH9JCb4SXZtC 6uhra89ZYRNV3fJcospF/0Rqyc/FNTjYUG9bgJXpfFKPtPTBLYRW1oD3+ 0xtCJRvEkHVfknPF9bIxmMawuYGapGD6oNng+3Juulet+Ngkn+doOdTGY X2SIQZCBhoilPcXry1fdSi+L4HWQg2jRT2WSqv2WXVHIhlFSNDy+aABLF s4GtflLrgIS8xxDw9SVuLMvkx2CbShZtIyRQA+z+5BEOR+gQjLidcEWzi Tl7r1Y7xRQn70mzQ7eLCm6S5f61pt4ZDQMSVMa0PT18i27/6OvCPb+cWH g==; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l3XMZjJ6/UiKeJF5hA6yptl4hDk8TsRFe09WPYUWzZJkyTlRmZP35agF6HmVX3Gt4Cbdq/22cmHmGRbpqFyGp/ngSxpy3b4PA0WjIQCd7uCZyKZv9uFqkQZZZ0z8XRNzrZEi85Pt41R4KISPTuA5JYaSgRmBM0ZHw5uqJUNWwxmIFAOnm6Uk/3cecG/Rpyf2+G4C50Jrj9lf6MsHsMfxcF8MwJQ65wR5rz51jetDkNkeJzCVibom8SBOF1Dmh6YT4EmvppQVmGwU0WO5Ruxn6XbG5U5SYwMJCwkV3uSF3Vy+BdJp4CasZQWZNGsNCNSXSQmCWpG2Yv9nR8pDbMIjNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xq+hXiq3wsn4Aud9yHLvdm72Clljl8fb6hMrdil9KgU=; b=MLvkkBOlBMeQteenqK7zWydGYMar5PvEzxeEAW0knHVt2nGtBIJZZWzu+LpbhXld0I9ugB7/m+w8I5Z1tgj2SSf7YlO4VMYcS7O7enK6sw3yZtyx4JP4AvblocubB5L9NQjFjqWfY4S18lXQAIMnGzj1HZ/aiRYCwux1scw7+a+2jt4yyiYik2/2g6sgED3qkdYwznHQ/V1fXzmr2yhTiiVDzBl/ZOVxEHaA0ofmAYOUyjQRS5HYG3swCRKeKpD92I5UQQD5JK91rCLDKtKx4jW+ZXM9waqTin/gSusD2x3ezkXGkP/61lGDNWULHDmol6Z+GSHtjkK1LRq+3hlkDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=axis.com; dmarc=pass action=none header.from=axis.com; dkim=pass header.d=axis.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis365.onmicrosoft.com; s=selector2-axis365-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xq+hXiq3wsn4Aud9yHLvdm72Clljl8fb6hMrdil9KgU=; b=lVVu3aQQ3aC/ydNi/I5g5WEMcgLC82USIO5d2e5B+sCnD5vqnOJZ/sCGxPb8kahEcB4F+Gf4TpXifLl2oXpH6UP8I+oMe/sXPki9hs40M/5y07tVFk1vuTDeiXt/wyRx1ncaRKkHDypaOrkUxKv6ZvJysbOCidKPBLqU/SbzrGs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axis.com; Message-ID: Date: Tue, 28 Mar 2023 15:34:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH net] net: dsa: mv88e6xxx: Reset mv88e6393x watchdog register Content-Language: en-US To: =?UTF-8?Q?Marek_Beh=c3=ban?= , Andrew Lunn CC: Gustav Ekelund , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , References: <20230328115511.400145-1-gustav.ekelund@axis.com> <20230328120604.zawfeskqs4yhlze6@kandell> <9ba1722a-8dd7-4d6d-bade-b4c702c8387f@lunn.ch> <20230328124754.oscahd3wtod6vkfy@kandell> From: Gustav Ekelund In-Reply-To: <20230328124754.oscahd3wtod6vkfy@kandell> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MM0P280CA0029.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:a::17) To AM0PR02MB4065.eurprd02.prod.outlook.com (2603:10a6:208:d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR02MB4065:EE_|PR3PR02MB6217:EE_ X-MS-Office365-Filtering-Correlation-Id: 17d82c5b-366f-41b6-ace1-08db2f9119dd X-LD-Processed: 78703d3c-b907-432f-b066-88f7af9ca3af,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XEhrIxM5ocIQVwiOWqfjejOYyeziNPCXW7c2sTxg96JB/Sw9XAe07umRB2SmhA7axRckfK9uWwmXx/dCVA6QV42dMXe/iRRlhDBe7fg9wTpOcACcS04Cb93TduLRCPV5kBKKEybvL48YxKFqSDmlxB1dVtxQ2HvHDPhPiwpwiQZxqisX/TXS87aB4U9tljksPPDxa1YLxlA6y1HtpkAzojbonrjY73FUtxF22YEzZb3ek/bhZPxSTOrjOHJRJbhivKU7V51DZq5S4OEsh19z16JqmjIMT2vJ30wH59Yw5yZffyGWTDsOK62Rqyge3sCMj8KKYiVNVvIZWfsAxmY8cY5Ro6owJwCxc+L/KlT8kNTUi0EsBhx+6EPqf9HPdNENjIAPyOLP+fBMIOH1wwqF3e8F4G9WBofDSYFYatcH6514Va/kndx3Ep51VM4vCC9FMgs4jkqwWBcyz0ZCU0ub6FcThXg5iR+odPrq1Y7g4gCE2KSIbLmrE9F9s2hz84P/v4ILWzzM4GM+Xzldx439t3hT48C01rp+ykeuERyb58kQTN27diPAwimXqq3j+0bfgKb1UOZSFP9oKgepqOz1qI0SD21VbIj7ESutF2TMObJwZaoshw15S2H0/BtigoIwafdX2gMrRxaYZwRbldK+kg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR02MB4065.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(366004)(346002)(39860400002)(396003)(451199021)(31686004)(36756003)(186003)(53546011)(6512007)(66574015)(41300700001)(6506007)(26005)(83380400001)(2616005)(8676002)(4326008)(5660300002)(66556008)(66946007)(66476007)(316002)(54906003)(110136005)(8936002)(7416002)(478600001)(38100700002)(2906002)(6486002)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Rmk3RnE5bjRlWDJYNXJibXJJb3VnL2JTdCtBdnhRVk5aYVlVMWRoM1ViOUo0?= =?utf-8?B?NUNJQVRVRUpaRWMyM2tyVG93aWpOMnlOdGZNNURaVzZuVkh1UGFRL3JMTS96?= =?utf-8?B?b3JuV3Y4R09PM0lOUzF2U0JsVDRNM29jazQveUJiYm54bWI3ZHRpejlwTGQ4?= =?utf-8?B?OWxMSyswR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=?utf-8?B?MzhGTnVSclFINGc5M0FPYURGR09NYXBZN0RrME85S1VUSWl0OUZFZ1l6ZDA2?= =?utf-8?B?NjVaYUZlRUZBMVBUdHVFZ1BZRjFxQjhVcjJoaXBqYUNUSlQ0MnhOQmVlRnk5?= =?utf-8?Q?UjG0=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 17d82c5b-366f-41b6-ace1-08db2f9119dd X-MS-Exchange-CrossTenant-AuthSource: AM0PR02MB4065.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2023 13:34:05.6122 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LXvUV8PLQlqa/qrenuVyQ9OjQKJC4+DUZtEMQljc9fXOOlzoXKKS7+ky4hkdD+FnXKEA5G3JYizTUU7gLdxCuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR02MB6217 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 On 3/28/23 14:47, Marek Behún wrote: > On Tue, Mar 28, 2023 at 02:30:37PM +0200, Andrew Lunn wrote: >>>> +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? > > OK I am looking at the func specs of 6390 and 6393x, at the table > descrinbing the Data Path Watch Dog Event register (index 0x12 of global > 2, which is the one being written), and the tables are exactly the same. > > For every non-reserved bit there is the following: > This bit is cleared by a SWReset (Global 1 offset 0x04). It will > automatically be cleared to zero if the SWReset on WD bit (index 0x13) > is set to a one and this event's Func bit is cleared to zero (index > 0x11). > > Moreover only bit 0 of this register (ForceWD Event) is RWR. Bits 1 to 3 > (EgressWD Event, QC WD Event and CT WD Event) are all RO. Bits 4-7 are > reserved. (Once again, exactly as in func spec of 6390.) > > So I am not exactly sure what is going on. The errata document I have > does not mention watch dog at all. > > Marek > >> 2) What about other interrupts? Is this the only one which has changed >> behaviour? >> >> Andrew 1) Marvell has confirmed that 6393x (Amethyst) differs from 6390 (Peridot) with quote: “I tried this on my board and see G2 offset 0x1B index 12 bit 0 does not clear, I also tried doing a SWReset and the bit is still 1. I did try the same on a Peridot board and it clears as advertised.” 2) Marvell are not aware of any other stuck bits, but has confirmed that the WD event bits are not cleared on SW reset which is indeed contradictory to what the data sheet suggests. Bug can be reproduced on 6393x with the Force WD event by writing 0x9201 to G2 offset 0x1b. Best regards Gustav