Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1717889pxb; Mon, 13 Sep 2021 04:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGo/WLE1wV+TSpWvc39cvnPYNQMsLzlMmm4BZa4ncmo3AuVEfvsMbfJfXKO7m580zw8V2M X-Received: by 2002:a05:6e02:1ca6:: with SMTP id x6mr7461016ill.86.1631531159465; Mon, 13 Sep 2021 04:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631531159; cv=none; d=google.com; s=arc-20160816; b=1HIMYzJNWuKrnRQXG9XNYI/Ewj9xOKTKe4G55GXxeY7FPUpmdpz5/Ao8dfRCl+QE1R +6ICDFGndTs/zsvxirWmXnMEFvP7e4A5HMrxnYsg3055WrfwCiF3NoUkoG8EUuvBS3nJ kpNcFo2MxL5pDgKwoxCnZcGcgILau/pUeiT1bp9ieErVNa4CJFlWLtAxbgUR15swZj1U svgtipn1YbeF7DsHThZbB3b9rajR6eOx+azSbFQHquLXicZspXRAAm5T+Ye18yxpuiOf C2JbbAAN7xJCber9GGsDUgipRxGrGXg4gi/gIEL5SlhueQ5oG/Q0T6owUglJRHCmveTD RTYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :sensitivity:importance:date:subject:cc:to:from:message-id :mime-version:dkim-signature; bh=enkPblv3JSI7lFOyNgxfrC36aJr6jsxiPMbTanNGeRI=; b=a15bO0rhYYuvixn5l1wARUT/Y+ocgKzM1mfOtpxLf2zNwdxrosBDxiKuloT8k9y86Y VYIzS7wEU/UyukhrAQg9d4VofsAXR6iMpq9G57G+mLQYwZdgh6hmRVXuUpMcF6HMgITz gmNZKVeZHk4DhZwXfEQv6QVbTdjCkdJeFxVXv1jI9v1+Fooy59Idqpo9rmuaOZtPwVlU 0ckpVEHC1n0eENEXuUV88euVyN64sncre59xuNdWRX01bXJ45KWxW012VC4Sylh3smIc wdUihz6uv/28wjpfuUp7QJ8IT4juJ6ryisJvJkpPOHlwZPssR3IcT5QVw8r5PH6r4JgP CAsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Ax96Flym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si6850877ion.34.2021.09.13.04.05.26; Mon, 13 Sep 2021 04:05:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Ax96Flym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239365AbhIMLCw (ORCPT + 99 others); Mon, 13 Sep 2021 07:02:52 -0400 Received: from mout.gmx.net ([212.227.17.21]:50721 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239199AbhIMLCv (ORCPT ); Mon, 13 Sep 2021 07:02:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1631530880; bh=eIrDTDkLPLTBW/OcC8PfuBR6yO+OBkLQE9VB9awYepM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Ax96FlymwFLUehBPWfR+PSxLnv14Blz0tb1Y/R71C/MyDzgQN5ZAZYLxZVPInqshc qU5ZXil34LbRBOi+o2Bw6Qeht3eNSGR773vcFX1WFOvOx7tdEAZwadTe0aIc7I7jHY MVFzcucv18GKxKPf473r6lZcCRgWNtUmhRbwCtQQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [46.223.119.124] ([46.223.119.124]) by web-mail.gmx.net (3c-app-gmx-bs55.server.lan [172.19.170.139]) (via HTTP); Mon, 13 Sep 2021 13:01:20 +0200 MIME-Version: 1.0 Message-ID: From: Lino Sanfilippo To: Vladimir Oltean Cc: Andrew Lunn , Florian Fainelli , Saravana Kannan , "Rafael J. Wysocki" , p.rosenberger@kunbus.com, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, vivien.didelot@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Aw: Re: [PATCH 0/3] Fix for KSZ DSA switch shutdown Content-Type: text/plain; charset=UTF-8 Date: Mon, 13 Sep 2021 13:01:20 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20210913104400.oyib42rfq5x2vc56@skbuf> References: <8498b0ce-99bb-aef9-05e1-d359f1cad6cf@gmx.de> <2b316d9f-1249-9008-2901-4ab3128eed81@gmail.com> <5b899bb3-ed37-19ae-8856-3dabce534cc6@gmx.de> <20210909225457.figd5e5o3yw76mcs@skbuf> <35466c02-16da-0305-6d53-1c3bbf326418@gmail.com> <20210910145852.4te2zjkchnajb3qw@skbuf> <53f2509f-b648-b33d-1542-17a2c9d69966@gmx.de> <20210912202913.mu3o5u2l64j7mpwe@skbuf> <20210913104400.oyib42rfq5x2vc56@skbuf> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:iHqwnknc+/nK4ZdMIEpsKSBGr11E6sx9g/rX5WpEh2NjIqIeWmNUCNu58tsVnoEavMmTP dqMf3MNmPLD1LLIDngNxsABl3IISsGl4QxKmoPnYZCH35A76RQ4crnE4RMr1oFfOQmD691WJW1yF nF2fSn7f9HQQ0xQvmktxmJ0yqjkvvK1hO4mjWgIEuc59x72ngr3tDHMvCE+9IQiVtqYQUZc4E57F cbD0HzOvsasJV4AWIsm7NanRnxgIHIH9XwwdX4NuzzgVCuVzBEjVrzZBva3oJeCI3qm2vPmpFLol xA= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:x0t9OFEPTCY=:DezfFcSw/K7QJf2k7pGXpe Lbh5qXNK+rYUCoipxnFsV/fgsgqCCDVfeqlarKhIMIkFtyHQZWs4xB0fBqurDT7SKNO0lkoa1 Kz0YHBri/ygYqVRjJUFIK3fUUu+Lec+AqVNnqvphCxVGpycOiH49tLtGt1dp/sGOJ7+3MZ8up eeMQJ7mFyVULnT7YfqIw2nndm3/9q80tMHs5c/IW88FQjBIm5URxQmlqCwogwTweiE/ZWsmEE F4CR0xDKgiNzn2JO7FhKgB+CwYoAhx04nu+EJztSz/qidMk9RLgTTJImDPkkgT8rtOPp3YkGw IadmhbD+WNllpKPibFl65Gn5yo/fAv5L+tj9ClZxNPy/7ejE6mcxPJuKWAhuJilfTgA+e6OS4 V7iLq31zDN7y6zdMU1G33ivPDVZuG+oXguL7yOLPHJS4RWE610s5Xfr6Dw10jevgJB1QPW33m z88855p6aWioEYA/ZXvBk5o7mq2VaTXqrp3kItrrOtiAbHtKkFlj+P7yFUm09QcakHpKoLleN rCStxJP5GPQHBLE85mMZ4xPR5Fv0zH3d3/rkZpNZpEk14F8ezeKFXdbTDKUiMumQXPdUOJcNy A37AfMjpJUyVqtvwWs5QFdeFpvmKG+RqCLUBzonlquHkddko4EH50VM8Xngmh6xpXBYshQPcb jsZs3I3iSDbnaoRtCLb99PBat19JpLCV2qg5ht612j7S/Q+U+59sXW6HMuiPj+sqbYXlMx1lX GeHwrIMm2Aaog8ENCGh8LcNPk/lFeL5T2JPHf/L2WgmMNZOrptxueNzdL9rGvr67+od+Hl+ft BcnQD6L Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Gesendet: Montag, 13. September 2021 um 12:44 Uhr > Von: "Vladimir Oltean" > An: "Lino Sanfilippo" > Cc: "Andrew Lunn" , "Florian Fainelli" , "Saravana Kannan" , "Rafael J. Wysocki" , p.rosenberger@kunbus.com, woojung.huh@microchip.com, UNGLi= nuxDriver@microchip.com, vivien.didelot@gmail.com, davem@davemloft.net, ku= ba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org > Betreff: Re: [PATCH 0/3] Fix for KSZ DSA switch shutdown > > On Mon, Sep 13, 2021 at 12:32:14PM +0200, Lino Sanfilippo wrote: > > Hi, > > > > > Gesendet: Sonntag, 12. September 2021 um 22:29 Uhr > > > Von: "Vladimir Oltean" > > > An: "Lino Sanfilippo" > > > Cc: "Andrew Lunn" , "Florian Fainelli" , "Saravana Kannan" , "Rafael J. Wysocki" <= rafael@kernel.org>, p.rosenberger@kunbus.com, woojung.huh@microchip.com, U= NGLinuxDriver@microchip.com, vivien.didelot@gmail.com, davem@davemloft.net= , kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org > > > Betreff: Re: [PATCH 0/3] Fix for KSZ DSA switch shutdown > > > > > > On Sun, Sep 12, 2021 at 10:19:24PM +0200, Lino Sanfilippo wrote: > > > > > > > > Hi, > > > > > > > > On 10.09.21 at 16:58, Vladimir Oltean wrote: > > > > > On Fri, Sep 10, 2021 at 01:51:56PM +0200, Andrew Lunn wrote: > > > > >>> It does not really scale but we also don't have that many DSA = masters to > > > > >>> support, I believe I can name them all: bcmgenet, stmmac, bcms= ysport, enetc, > > > > >>> mv643xx_eth, cpsw, macb. > > > > >> > > > > >> fec, mvneta, mvpp2, i210/igb. > > > > > > > > > > I can probably double that list only with Freescale/NXP Ethernet > > > > > drivers, some of which are not even submitted to mainline. To na= me some > > > > > mainline drivers: gianfar, dpaa-eth, dpaa2-eth, dpaa2-switch, uc= c_geth. > > > > > Also consider that DSA/switchdev drivers can also be DSA masters= of > > > > > their own, we have boards doing that too. > > > > > > > > > > Anyway, I've decided to at least try and accept the fact that DS= A > > > > > masters will unregister their net_device on shutdown, and attemp= t to do > > > > > something sane for all DSA switches in that case. > > > > > > > > > > Attached are two patches (they are fairly big so I won't paste t= hem > > > > > inline, and I would like initial feedback before posting them to= the > > > > > list). > > > > > > > > > > As mentioned in those patches, the shutdown ordering guarantee i= s still > > > > > very important, I still have no clue what goes on there, what we= need to > > > > > do, etc. > > > > > > > > > > > > > I tested these patches with my 5.10 kernel (based on Gregs 5.10.27= stable > > > > kernel) and while I do not see the message "unregister_netdevice: = waiting > > > > for eth0 to become free. Usage count =3D 2." any more the shutdown= /reboot hangs, too. > > > > After a few attempts without any error messages on the console I w= as able to get a > > > > stack trace. Something still seems to go wrong in bcm2835_spi_shu= tdown() (see attachment). > > > > I have not had the time yet to investigate this further (or to tes= t the patches > > > > with a newer kernel). > > > > > > Could you post the full kernel output? The picture you've posted is > > > truncated and only shows a WARN_ON in rpi_firmware_transaction and i= s > > > probably a symptom and not the issue (which is above and not shown). > > > > > > > Unfortunately I dont see anything in the kernel log. The console outpu= t is all I get, > > thats why I made the photo. > > To clarify, are you saying nothing above this line gets printed? Because > the part of the log you've posted in the picture is pretty much > unworkable: > > [ 99.375389] [] (bcm2835_spi_shutdown [spi_bcm2835]) from [<= c0863ca0>] (platform_drv_shutdown+0x2c/0x30) > > How do you access the device's serial console? Use a program with a > scrollback buffer like GNU screen or something. > Ah no, this is not over a serial console. This is what I see via hdmi. I d= o not have a working serial connection yet. Sorry I know this trace part is not very useful, I will try to get a full = dump.