From patchwork Wed May 13 09:44:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 225931 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=-9.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 63EA4CA90AF for ; Wed, 13 May 2020 10:03:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A516206D6 for ; Wed, 13 May 2020 10:03:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589364187; bh=2tnEjWCrgLT4v3MbFXgu5mRRqi54UgmsgKVou0IVCRk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=T3kvn+Ldzdy2VKf9j4TsekbUVlAaRUdBTSysaZTWfcumCgpcND5Xc/gK2bLfIox9E i1nLrs2rUm9ecfyw2Kgl6fP4h54SIHSceWqc0ps5qfLXBm3xquehjgWyuh/LuWnkuC ufsE5RqwkZOTyzlped7WutuhqRFxS9zYf35/mU+8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733239AbgEMJt0 (ORCPT ); Wed, 13 May 2020 05:49:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:48400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733215AbgEMJt0 (ORCPT ); Wed, 13 May 2020 05:49:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C084D23128; Wed, 13 May 2020 09:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589363365; bh=2tnEjWCrgLT4v3MbFXgu5mRRqi54UgmsgKVou0IVCRk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UAWnRMK2zmFYr8oFqS4Ir5LSaHflM00pN6DNNme/ZdbWMUUC0/IoITkjESZHgYRne Ugbh+wBs/OTKcU+xND7bW1Tf8El6q6Ns+FOyYHvuoEkcX0ejGCUXGsfc74SwnysiGt tzc2M2ExEz9wfgNHux+LJ2KiPPPD3T8QQikL63eE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shubhrajyoti Datta , Michal Simek , Sasha Levin Subject: [PATCH 5.4 09/90] tty: xilinx_uartps: Fix missing id assignment to the console Date: Wed, 13 May 2020 11:44:05 +0200 Message-Id: <20200513094410.133435073@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200513094408.810028856@linuxfoundation.org> References: <20200513094408.810028856@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shubhrajyoti Datta [ Upstream commit 2ae11c46d5fdc46cb396e35911c713d271056d35 ] When serial console has been assigned to ttyPS1 (which is serial1 alias) console index is not updated property and pointing to index -1 (statically initialized) which ends up in situation where nothing has been printed on the port. The commit 18cc7ac8a28e ("Revert "serial: uartps: Register own uart console and driver structures"") didn't contain this line which was removed by accident. Fixes: 18cc7ac8a28e ("Revert "serial: uartps: Register own uart console and driver structures"") Signed-off-by: Shubhrajyoti Datta Cc: stable Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/ed3111533ef5bd342ee5ec504812240b870f0853.1588602446.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/xilinx_uartps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index fe098cf14e6a2..3cb9aacfe0b2a 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1445,6 +1445,7 @@ static int cdns_uart_probe(struct platform_device *pdev) cdns_uart_uart_driver.nr = CDNS_UART_NR_PORTS; #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE cdns_uart_uart_driver.cons = &cdns_uart_console; + cdns_uart_console.index = id; #endif rc = uart_register_driver(&cdns_uart_uart_driver);