Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2681340imj; Mon, 11 Feb 2019 06:58:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IYIM0n73uMLt2DBCKDpURTSCw9hcLE4dI+FU0RW2A7ktSn7Z97zDiVG/bM1mJpuakTwq93D X-Received: by 2002:a62:2c4d:: with SMTP id s74mr36761036pfs.6.1549897098023; Mon, 11 Feb 2019 06:58:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897098; cv=none; d=google.com; s=arc-20160816; b=JzP5TPXp/bXx/dyKtQasLBm1/8nyuX2qnN9ZdSBigNYzxYOAHMv0Kwpt01Fa5tW9MA fDyt9kj0KvX8YSybSEDkXryB9/6HVSY8F5rAIIWD71oKhnh4XsACzUDd7gM55oVVvuTy ICMtNDCrmXJ6stCTSgJ2NowZJedR4BX3XGOYp3aB5UPAwCoeaUJfm/fuXaUmYqdStGex dmjHYt17T7nZI9MEKBsaeqH9OfLwAdQKuzHilgBrWZT3GMkkR22qF0dl1soEFwCF3OKE QFjrep2Cff2MXb4oG2bdHN5+PsEs3NQA8cRhz+7ZN5uMCfiFsahXZ56aoHga3RajYkpH A4FA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eLBncw/EhUsogJ/pzWxTOYdZw8kpi21MdKny4sHe9UU=; b=GGrZRIJceLtZfORnzv1bvtb4Fg6c5ghwEa9DNyWUo77jUh7gXruYrfZyz/ymV9JUdH O0kDNsI5rRgIrXHcOBexRdorj9RVVm8l0+uC8nIkGJ65dX7CTt0yDQgH1D8UYxhIdSQA hCXcsPYQ9GlytSb1beVEBLS2gJgvqmhQyWJch+oonfwuOde1FLMLyuIoEenrErBnp247 WLqv5QrgA6cElcw6jCsZTCnyBM0qDQrXzh6o4B5pAcZgcRJ2+RyIHEF+iW6emotXC/4V CkyuqFwxWlApVttpt2qKWPEYNlU0Cy1dp1xXSqjfGvd6XH725UeNp4rjbvvb+aCLM13b M7fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wMGVk6M6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4si10293328pls.45.2019.02.11.06.58.02; Mon, 11 Feb 2019 06:58:18 -0800 (PST) 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=wMGVk6M6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389057AbfBKOzv (ORCPT + 99 others); Mon, 11 Feb 2019 09:55:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:42874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389038AbfBKOzr (ORCPT ); Mon, 11 Feb 2019 09:55:47 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 D636520700; Mon, 11 Feb 2019 14:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549896947; bh=8Iki6BDd+uME8ppEftSLuKhGZtMXkag4HPqqlmFY+9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wMGVk6M6xi6lu5gmU8Rk66HF6DtVenD+Vs2LFD9uMw9bFZvX8lcEG+HjQtg63f+Gi h7nOfLoYioZPiqxbEQ2SU4kgcqD6/s3zaAsqtIoSkSHyl4+0q6zGse85xdZdw1/vCh VFsZaS3+5zxHh14R3bEHBiE6D3+5MmDfl6jujkKY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Prarit Bhargava , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 040/205] ACPI: SPCR: Consider baud rate 0 as preconfigured state Date: Mon, 11 Feb 2019 15:17:18 +0100 Message-Id: <20190211141830.647894436@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit b413b1abeb21b4a152c0bf8d1379efa30759b6e3 ] Since SPCR 1.04 [1] the baud rate of 0 means a preconfigured state of UART. Assume firmware or bootloader configures console correctly. [1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table Signed-off-by: Andy Shevchenko Reviewed-by: Prarit Bhargava Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/spcr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c index 324b35bfe781..f567fa5f0148 100644 --- a/drivers/acpi/spcr.c +++ b/drivers/acpi/spcr.c @@ -148,6 +148,13 @@ int __init parse_spcr(bool earlycon) } switch (table->baud_rate) { + case 0: + /* + * SPCR 1.04 defines 0 as a preconfigured state of UART. + * Assume firmware or bootloader configures console correctly. + */ + baud_rate = 0; + break; case 3: baud_rate = 9600; break; @@ -196,6 +203,10 @@ int __init parse_spcr(bool earlycon) * UART so don't attempt to change to the baud rate state * in the table because driver cannot calculate the dividers */ + baud_rate = 0; + } + + if (!baud_rate) { snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype, table->serial_port.address); } else { -- 2.19.1