Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3099446ybi; Thu, 18 Jul 2019 21:01:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcQMqA2zOsrTgkicwZXHRjXIHOwJjmQZkc84VjUr4eqCUOv7jxoq3gp4x8SlpkcbgLPrLq X-Received: by 2002:a17:90b:95:: with SMTP id bb21mr55774144pjb.8.1563508892281; Thu, 18 Jul 2019 21:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508892; cv=none; d=google.com; s=arc-20160816; b=kjNUiGDIHtExneyVJ4tjoFpKEUBMMLQJDHP7va2pvMM2yyasaAoUp3gqQFo8LP3rH0 2nwhab5Ipnj3W5V3xLMOw/Ju4bFUuRuGkuk39rvOHySRM+P4PQQ/4mvv4hgWQZMHz+6i 7stTBMStVyUwHBN2AOES8x+qMihYxD5fR7HtR5fkSkJUAa+XFvU4JGSQ4u47YI0MgDmy dhL+1Y7LOOldJcNQh7Mfsuj6chjkpG6qmOv6qp1oATBwpOmhtrmh6enUEXNca70SiPKb nby3u7QmVTrWO66RYLt70KTDS0MIWV4a9PtZwGNIYF8OTKvj1hXB3pYjzd5Vzvjqsxxv ipag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CLnAGJ0/vgrwErb3/P1eabVNuqo40igmsthjRLKUNCA=; b=ijVG6dvBO60qFepqA9MeO5jBjgg9vRkSHWt3KBKrDvMPoKKV+mfaY8FHeIZ4fArxcW dVMuScWtsnybdmH5M4fUEc5t6JiPAdS3BlixNolk2mUz8bpZ0UtOVx6KpBBppIBW/YOZ hT649zBkqWN0qRpklo1LtRm6Qdpu2Hmw/wG6EawvLAUNH96FFL8hj1ZIwV5FafNHzhM5 KzqgRre+0fp2OTCqbjVKnEYPTlG/w8zjSOTnkOVozEozbIsxMPGtF0qC/75ZEmrvjLL6 1TuzXkEABZtY8jcmaN+My9Ru+2HQfGPh1yhWL2bBMIg7u5KN0pk4/LPtfvmw7jv+IABq 7MoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=klUOyINq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o21si225099pll.169.2019.07.18.21.01.17; Thu, 18 Jul 2019 21:01:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=klUOyINq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728413AbfGSD7B (ORCPT + 99 others); Thu, 18 Jul 2019 23:59:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:58340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728348AbfGSD64 (ORCPT ); Thu, 18 Jul 2019 23:58:56 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B222B21851; Fri, 19 Jul 2019 03:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508735; bh=ESrqzieqi3LyW8vnKAIeIHKfzQXB44HReBLi5IaOldc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=klUOyINqefKtlLAjLYVaILf8/gy179a2wxVZScRitAddhvWkUJvuR+gwJMqy0QX/F jEj6dOe6LyVfMqXlPEzYVm+dcohzxITmtmwOQXb36TqMsYgaK1kxUL/wmO79jei8HL r9C+5dQiM8TVL04uAxXFzbxKCH36HyYVijdYsJ5E= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: John Paul Adrian Glaubitz , "David S . Miller" , Sasha Levin , sparclinux@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH AUTOSEL 5.2 058/171] sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg Date: Thu, 18 Jul 2019 23:54:49 -0400 Message-Id: <20190719035643.14300-58-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Paul Adrian Glaubitz [ Upstream commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ] In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS" to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged. This results in the hypervisor console device to be listed as "ttyHV0" under /proc/consoles while the device node is still named "ttyS0": root@osaka:~# cat /proc/consoles ttyHV0 -W- (EC p ) 4:64 tty0 -WU (E ) 4:1 root@osaka:~# readlink /sys/dev/char/4:64 ../../devices/root/f02836f0/f0285690/tty/ttyS0 root@osaka:~# This means that any userland code which tries to determine the name of the device file of the hypervisor console device can not rely on the information provided by /proc/consoles. In particular, booting current versions of debian- installer inside a SPARC LDOM will fail with the installer unable to determine the console device. After renaming the device in struct uart_ops sunhv_pops to "ttyHV" as well, the inconsistency is fixed and it is possible again to determine the name of the device file of the hypervisor console device by reading the contents of /proc/console: root@osaka:~# cat /proc/consoles ttyHV0 -W- (EC p ) 4:64 tty0 -WU (E ) 4:1 root@osaka:~# readlink /sys/dev/char/4:64 ../../devices/root/f02836f0/f0285690/tty/ttyHV0 root@osaka:~# With this change, debian-installer works correctly when installing inside a SPARC LDOM. Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/tty/serial/sunhv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index 63e34d868de8..f8503f8fc44e 100644 --- a/drivers/tty/serial/sunhv.c +++ b/drivers/tty/serial/sunhv.c @@ -397,7 +397,7 @@ static const struct uart_ops sunhv_pops = { static struct uart_driver sunhv_reg = { .owner = THIS_MODULE, .driver_name = "sunhv", - .dev_name = "ttyS", + .dev_name = "ttyHV", .major = TTY_MAJOR, }; -- 2.20.1