From mboxrd@z Thu Jan 1 00:00:00 1970 From: Otavio Salvador Subject: Re: Linux kernel hangs if using RV1108 with MSZ8863 switch with two ports connected Date: Sat, 17 Nov 2018 19:04:11 -0200 Message-ID: References: <20181116234044.GA752@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: netdev@vger.kernel.org, Heiko Stuebner , david.choi@micrel.com, Andy Yan To: andrew@lunn.ch Return-path: Received: from mail-oi1-f193.google.com ([209.85.167.193]:40970 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbeKRHW1 (ORCPT ); Sun, 18 Nov 2018 02:22:27 -0500 Received: by mail-oi1-f193.google.com with SMTP id j21so877462oii.8 for ; Sat, 17 Nov 2018 13:04:31 -0800 (PST) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com. [209.85.210.44]) by smtp.gmail.com with ESMTPSA id g38sm12065124otb.77.2018.11.17.13.04.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Nov 2018 13:04:29 -0800 (PST) Received: by mail-ot1-f44.google.com with SMTP id u3so19369162ota.5 for ; Sat, 17 Nov 2018 13:04:28 -0800 (PST) In-Reply-To: <20181116234044.GA752@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: Hi Andrew, On Fri, Nov 16, 2018 at 9:40 PM Andrew Lunn wrote: > On Fri, Nov 16, 2018 at 04:28:29PM -0200, Otavio Salvador wrote: > > RV1108 GMAC is connected to KSZ8863 port 3 and after kernel boots, I > > can put an Ethernet cable from my router to the uplink port of > > KSZ8863, which makes the RV1108 board and a Linux PC connected to the > > other KSZ8863 port to both get IP addresses. > > > > So in this usecase the setup is working fine. > > > > However, if the RV1108 board boots with both Ethernet cables to the > > KSZ8863 switch connected, then the kernel silently hangs. > > By silently, you mean it prints nothing at all? Yes, it prints but suddenly hangs. > I would try building the kernel with all the lock debugging turned > on. That might find something even with your working case, if there is > a potential deadlock. > > If the kernel dies very early, you might need to enable "kernel > low-level debugping print and EARLY_PRINTK, in order to see anything. The kernel starts booting normally and then hangs like this when two Ethernet cables are connected to the KSZ8863 switch: http://dark-code.bulix.org/3xexu5-507563 This has the lock detection, inside kernel hacking, enabled. Any hint? -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750