Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AAD7C77B61 for ; Tue, 25 Apr 2023 02:18:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BE3C1861C5; Tue, 25 Apr 2023 04:18:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="a+1WnaQW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 518EA8619F; Tue, 25 Apr 2023 04:18:52 +0200 (CEST) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 56662861B3 for ; Tue, 25 Apr 2023 04:18:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-b8f34bca001so7336875276.3 for ; Mon, 24 Apr 2023 19:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1682389127; x=1684981127; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fr6/Znic411sOpJgWnVHOqO1eN99fcSsffyJAOry7Z0=; b=a+1WnaQWF/bXqez3qfSmYX8CFOFLnPbayR4eWlg4tE6MJkvCm2dEpjNcXoD9IK595E /mFBUKQfyr0azEjAdg2IbPtFdJTc4dRLzIceCgUgwKvXdeZ8Q4nhKtNo16FvuDmHDTmC KNUQcOvZeSp85BTICPwbX9Ltw7TUgVJKA+o1A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682389127; x=1684981127; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fr6/Znic411sOpJgWnVHOqO1eN99fcSsffyJAOry7Z0=; b=MnGbADKmLns/1x5KtUfdvUth2Tj3w8wjo8IfVY/GjLqL/Ao9fiMxWIWIL24d59Fuoe IJ1+kzfW4LmMN+v/BpcX8DHJ2Vd6rSiXBjHIHJiqHhCovu8NIuVPBXjWaXm4pVI6PE1O vSTbviJGFZFRdFwuKatnA0qj762gnclwV0fQkJ4nJcMv3uL1C4NIaMz4R/NP3aMtUDkv 2qyZt4OS5HDzQfefuriTLACn9sGwy6/fB+cyD24p7M5BSauoOBOmIMpCI77qQjJ6RkNR 8EBnjTRmhgTF8dhJpptIemibNQZ2PJeInYPgg1zkDqGT+x/ZDv/Agqnp3Nn5ZKvbdwip sfzw== X-Gm-Message-State: AAQBX9c40NS0esejn+Aliz2+KiLp05H7Q5cYn6gSLlbiNY3WxRTFDtYn 52PniUhRG8dwpeXvo3jI4xQWEg== X-Google-Smtp-Source: AKy350acIIbjlic1o38rR70O46PMaAatUfNzR9UifBM0OiE9JUuFeg78fGP229DVV97Ttd7cwmVKoA== X-Received: by 2002:a25:aacb:0:b0:b8f:3a83:a16c with SMTP id t69-20020a25aacb000000b00b8f3a83a16cmr10453080ybi.58.1682389127011; Mon, 24 Apr 2023 19:18:47 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-d6db-313f-1939-7d14.res6.spectrum.com. [2603:6081:7b00:6400:d6db:313f:1939:7d14]) by smtp.gmail.com with ESMTPSA id b129-20020a816787000000b0054fb2ab8782sm3320196ywc.50.2023.04.24.19.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 19:18:46 -0700 (PDT) Date: Mon, 24 Apr 2023 22:18:44 -0400 From: Tom Rini To: Tony Dinh Cc: Simon Glass , Joe Hershberger , Ramon Fried , Pali =?iso-8859-1?Q?Roh=E1r?= , Stefan Roese , U-Boot Mailing List , Daniel Golle , Sean Anderson Subject: Re: [RESEND PATCH v2] netconsole: various improvements Message-ID: <20230425021844.GT1134230@bill-the-cat> References: <20230403214152.20225-1-mibodhi@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RFT9dy2UiXrGz0Ea" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --RFT9dy2UiXrGz0Ea Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 24, 2023 at 07:06:08PM -0700, Tony Dinh wrote: > Hi Simon, >=20 > On Mon, Apr 24, 2023 at 12:43=E2=80=AFPM Simon Glass w= rote: > > > > Hi Tony, > > > > On Wed, 19 Apr 2023 at 21:55, Tony Dinh wrote: > > > > > > On Wed, Apr 19, 2023 at 6:22=E2=80=AFPM Tony Dinh = wrote: > > > > > > > > HI Simon, > > > > > > > > On Tue, Apr 18, 2023 at 6:46=E2=80=AFPM Simon Glass wrote: > > > > > > > > > > Hi Tony, > > > > > > > > > > On Mon, 3 Apr 2023 at 15:42, Tony Dinh wrote: > > > > > > > > > > > > Use CONFIG_CONSOLE_MUX for netconsole. When netconsole is runni= ng, > > > > > > stdin/stdout/stder must be set to some primary console, in addt= ion to nc. > > > > > > For example, stdin=3Dserial,nc. Some recent Linux kernels will = not boot with > > > > > > only nc on the stdout list, ie. stdout=3Dnc. When netconsole ex= its, remove > > > > > > nc from the list of devices in stdin/stdout/stderr. > > > > > > > > > > > > Signed-off-by: Tony Dinh > > > > > > --- > > > > > > > > > > > > Changes in v2: > > > > > > - Select CONFIG_CONSOLE_MUX if CONFIG_NETCONSOLE is enabled > > > > > > - Add new functions in netconsole driver to support CONSOLE_MUX > > > > > > - Add new function to encapsulate the process of stopping netco= nsole > > > > > > from bootm > > > > > > - Remove unecessary net_timeout initial value =3D 1 > > > > > > - Resend to correct missing include in bootm.c > > > > > > > > > > > > boot/bootm.c | 14 +++++++--- > > > > > > drivers/net/Kconfig | 10 +++++++ > > > > > > drivers/net/netconsole.c | 60 ++++++++++++++++++++++++++++++++= ++++++++ > > > > > > include/stdio_dev.h | 1 + > > > > > > 4 files changed, 81 insertions(+), 4 deletions(-) > > > > > > > > > > This seems OK to me but for a few thoughts below. > > > > > > > > > > But can we use this opportunity to move this to driver model? The > > > > > netconsole driver could be bound in eth_post_bind() and the code = in > > > > > netconsole.c converted to be a driver. > > > > > > > > > > I think that would be better than building on an out-of-date driv= er. > > > > > > > > I'd agree that converting to a driver model is the logical next ste= p. > > > > My motivation is to fix the booting problem for the Linux kernel fi= rst > > > > (I'm having problems booting some kernels without this patch). And > > > > then in the next go round, I'll convert netconsole to a driver. Most > > > > of the code in this small patch will be needed whether it is an old > > > > driver or DM anyway. > > > > This crosses the line to a feature, IMO... >=20 > My initial patch would be a pure bug fix. But it also breaks other > boards like Nokia, as Pali has pointed out. So in the v2 patch, > Console Mux is introduced to cover all boards. I don't think that we > are adding any features here. >=20 > It's just that I'm using netconsole often so I noticed the booting > problem with recent Linux kernels. It's kind of a catch-22, without a > serial console I cannot debug Linux early booting problems, and with > serial console active there is no booting problem. Yes, we should fix functionality then work on clean-ups. --=20 Tom --RFT9dy2UiXrGz0Ea Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRHOH4ACgkQFHw5/5Y0 tyx7Rwv+NWlsLGtidyebJ8RcyYSdrDp+KfpewaIWtYW7lbQDGRxODwHJ4+zfRkUO v4Yp6C/OOJCeioWaz3xk/8Zqs4xNqEtIUIVxmy0Xgbo33ziAoz/zSpQCATv3Ugh/ T24SNBxVS2oZbGHB3N4IL7Anku8CJFhOYmvdCryfn2/viL/CSzX46qE0Hdd5TR2f SylbJ5QUPpaf7cWAngahbtf0G167mTg0g/ZQmeQinRAxl208ZlZvs2v+IXaeTCpi bpy5JdPRRSOZr53Vz1BhUVTP3CiyEjlwjS6lVuPz//T+e9acQRdKHDn++7mI0vSu LE1KXYptLQ3/inuBqioy+IKM/++mtpLELvfY0w973gva+0xvKLjoD/ay0Vs8Lmkm UrPDhJE78sK2aNOzmLsm7bAHOsoG7ZH+vQnxNPT1QkJYNt1+YiAeMbIyeXU6cLje 391S4HTPI3SXsz9WWt/XeFweuu7mGY/n48DyEbfQD8glIxU+0UxgLV1PCPpbjtG9 OxyIEygC =MZ++ -----END PGP SIGNATURE----- --RFT9dy2UiXrGz0Ea--