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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 8F424C282C4 for ; Tue, 12 Feb 2019 18:42:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 601982190B for ; Tue, 12 Feb 2019 18:42:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SwATJR2O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731979AbfBLSmv (ORCPT ); Tue, 12 Feb 2019 13:42:51 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51838 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbfBLSmu (ORCPT ); Tue, 12 Feb 2019 13:42:50 -0500 Received: by mail-wm1-f67.google.com with SMTP id b11so4179421wmj.1 for ; Tue, 12 Feb 2019 10:42:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2pXo/mu9lrAVdp2+qrymbEfRcaakhVHkMUiu9nvhH8M=; b=SwATJR2OLL8eWsFFHyB/glp5e5U9X6ivdH0n8F0518Ee4zFR7XJQwzZ3uru4htEuDT Da5vWS2cQeKIh0d7v7fi5tZgUAqRBjQDatn3bij7yKCVaaWJvQ9LNC/KoKmrz7RemfeW vLLjVnl9HK0kFRY0hZzfBLKSbXRME7V8/t2TTuKjKl65Nb+SWVqRoKcoL5USvzDAL6TU XHIh9pYaIUyAC2v+BwBQtDlPrLh/4JpyCCkyRn6cmSbYbCL8UQNLiv2d+UUMZ5TdKj5f TQyJRO+NM8SwNCyjCGdLfE27yD5yedoxqJjRVZuoR0jdMx0H7TiC/jcDfLMhKLnM+IYx 25iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2pXo/mu9lrAVdp2+qrymbEfRcaakhVHkMUiu9nvhH8M=; b=Uj2AYXVMW1WiW5BnNFVStx1oh8Q3dxUH7yTU5Dq3OPDcaJpTRSTKDVL9fG4Zryeaos Tjd2DNlKmsg2Qy1XZE8h9I3zNtGxSG/M+exm8Vt/pCxrkCQFaWsoJofVXLhvFIt1vUfs wIjYMm4uwasV6SBAuocKrZJJUBxeKD+tGtdZiCGAFw4IRQBXEoH2yPDZqtsfqf7D+hr6 1amCkCKC139yw11bSqROWreo6kUFNPlqHRpxIn7R10Itc8oR6r7PiJgv7lmP6NaO7jse PaF/iLTdM94u1f34Xq4K8an0X+xSu7Z5UzJr7GUP+ibIVlihLbQbpKOEHS3N5Y6vj/o4 RWOg== X-Gm-Message-State: AHQUAubg15YK0aQG2we0sCLFDmJMoouOJ9viekFflNwXaG1JuzOyaSb+ ZbwV8dYNw8I5awM6DWQPNALBqq+N X-Google-Smtp-Source: AHgI3IZwtwas0ihe8zK4a31d70KNU0R1SS1k8oBdCsTaUleJksZcppxeKDdc3NKv9GIUS13GKIhJmQ== X-Received: by 2002:a1c:2408:: with SMTP id k8mr209667wmk.110.1549996967852; Tue, 12 Feb 2019 10:42:47 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:788d:bad3:281d:6cd0? (p200300EA8BF1E200788DBAD3281D6CD0.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:788d:bad3:281d:6cd0]) by smtp.googlemail.com with ESMTPSA id r14sm10669814wrv.77.2019.02.12.10.42.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 10:42:47 -0800 (PST) Subject: Re: [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit To: Andrew Lunn Cc: John David Anglin , Russell King , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org References: <20190130223846.GB30115@lunn.ch> <9415d82e-965b-7777-0ad0-f23d6c9f177e@bell.net> <53b49df8-53ed-704f-9197-230b18d83090@bell.net> <824d011b-3692-69c3-5e2c-58e950a80abf@bell.net> <6a1ebc61-3505-beb8-21cb-ea42ad9fe67e@bell.net> <20190211233327.GB8591@lunn.ch> <2b6bbb4c-1346-461b-ff7a-cb96b4142f7a@bell.net> <20190212035806.GE19023@lunn.ch> <13c1e6d5-c287-0091-3b24-1978f9a18e7e@gmail.com> <20190212125644.GA7527@lunn.ch> From: Heiner Kallweit Message-ID: <6f439afe-5dc2-161f-2074-98f680eec072@gmail.com> Date: Tue, 12 Feb 2019 19:42:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190212125644.GA7527@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 12.02.2019 13:56, Andrew Lunn wrote: > On Tue, Feb 12, 2019 at 07:51:05AM +0100, Heiner Kallweit wrote: >> On 12.02.2019 04:58, Andrew Lunn wrote: >>>>> Hi David >>>>> >>>>> I just tested this on one of my boards. It loops endlessly: >>>>> >>>>> [ 47.173396] mv88e6xxx_g1_irq_thread_work: c881 a8 80 >>>>> [ 47.182108] mv88e6xxx_g1_irq_thread_work: c881 a8 80 >>>>> [ 47.190820] mv88e6xxx_g1_irq_thread_work: c881 a8 80 >>>>> [ 47.199535] mv88e6xxx_g1_irq_thread_work: c881 a8 80 >>>>> [ 47.208254] mv88e6xxx_g1_irq_thread_work: c881 a8 80 >>>>> >>>>> These are reg, ctl1, reg & ctl1. >>>>> >>>>> So there is an unhandled device interrupt. >>> >>> Hi Heiner >>> >>> Your patch Fixes: 2b3e88ea6528 ("net: phy: improve phy state >>> checking") is causing me problems with interrupts for the Marvell >>> switches. >>> >> Hi Andrew, >> >> what kernel version is it? > > It is a little bit old, 5.0-rc1 net-next. I should rebase and > retest. I'm testing on a ZII board which is not fully in mainline So i > need some patches. > Thanks, Andrew. Indeed 5.0 needs a fix, as also pointed out by Russell. I think I will simply remove the following: if (!phy_is_started(phydev)) return IRQ_NONE; Then we basically do the same like phy_mac_interrupt(), we always run the state machine. If it has nothing to do, then it does nothing. Therefore also state HALTED doesn't need a special handling. This way we handle interrupts (incl. spurious ones) gracefully. >> And the PHY driver in use is "Marvell 88E6390" ? > > Yes, the marvell 1G driver. > > Andrew > . > Heiner