Received: by 10.192.165.156 with SMTP id m28csp22984imm; Tue, 10 Apr 2018 15:34:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/2up77LpV0CT1K2WpzU+NnEvgGPWp20W358XLpKVh8k9M/jtPGOts7OCp9adIkQOO92x2e X-Received: by 2002:a17:902:d03:: with SMTP id 3-v6mr2291824plu.245.1523399690070; Tue, 10 Apr 2018 15:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523399690; cv=none; d=google.com; s=arc-20160816; b=w0Ku2Npqg3EGH21Yr4c0Y+we/atvV+FvnaYKBhEm/XANu0L6nFibQ8+eAEOgWmL8Ye w+oyK9R6VN69H2CKUp7tS2umaTK7ZL9Sm1xhOGzlO8a/KU0AdU01WRJx+j8b4h21TGyb lKKOCn2VHEAD8l0adxCMuk06xQ0+F0ZC8PSentQrq1Z7shqZZ0J753rNMP78tAIexLau 9eWx2nO7VcTRGjAmSlJ1v3oB/aajvEM5CgEpZ/YbD8c12N1yTpWb5Vfk8EsEdeCn1StH L/VcmWHut3OwKVjbOFGfRMvtQnbxcQVI8UC3AwST1/eZX0Xw8j8Sc/asyB7wGUhjlLmv XxtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=oqYhObxK3X1SGTAkxFnS52CbwKl1iAPVpAkXFAkylew=; b=tNR8W65gjSt9Hy1UrKO/P2bRv9he8nbd//sBkGoeDastWC21kKGy81rqWPc/34+Uv7 TwsFOrUe9V6dTUgPuDcM6pdahcKw1fWiD+1SUWOyuV7uBiloweK6nZ3UdFR7/r+vpp9s +HGj5H4EjTGsF028jQvupn7iqRqvI3tYuruWF/GYyMEjKKxIn7r+cauTmvCQ7uMaT2Nz 4UsxlKacr01/3eapq7GNTczM9l4+K+0OOXS2AznphCCXtoCMobgPI0adHXuw3W7Ihg7l T+qja6jlgg9C2mhnfhP4h+s0gk99wECLBrCBIxd+rUOgaS0t/sZVWtKvbiG2lL0va32O n1VQ== ARC-Authentication-Results: i=1; mx.google.com; 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 a86si2853972pfc.207.2018.04.10.15.34.13; Tue, 10 Apr 2018 15:34:50 -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; 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 S1754367AbeDJW3l (ORCPT + 99 others); Tue, 10 Apr 2018 18:29:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39626 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754334AbeDJW3e (ORCPT ); Tue, 10 Apr 2018 18:29:34 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2D00FD59; Tue, 10 Apr 2018 22:29:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Johan Hovold , Sasha Levin Subject: [PATCH 4.15 084/168] serdev: Fix serdev_uevent failure on ACPI enumerated serdev-controllers Date: Wed, 11 Apr 2018 00:23:46 +0200 Message-Id: <20180410212803.843359055@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans de Goede [ Upstream commit 7d09995dcb0577b4a56aad7f2bb56f28604e8f1a ] ACPI enumerated serdev-controllers do not have an ACPI companion, the ACPI companion belongs to the serdev-device child of the serdev-controller, not to the controller itself. This was causing serdev_uevent to always return -ENODEV when called on a serdev-controller leading to errors like these: kernel: serial serial0: uevent: failed to send synthetic uevent being logged. This commit modifies serdev_uevent to directly return 0 when called on an ACPI enumerated serdev-controller fixing this. Note: I do not think that setting a modalias on a devicetree enumerated serdev-controller makes sense either. So perhaps the !dev->of_node part of the check can be dropped too, but I'm not entirely sure that doing this on devicetree too is correct. Signed-off-by: Hans de Goede Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serdev/core.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -54,6 +54,11 @@ static int serdev_uevent(struct device * int rc; /* TODO: platform modalias */ + + /* ACPI enumerated controllers do not have a modalias */ + if (!dev->of_node && dev->type == &serdev_ctrl_type) + return 0; + rc = acpi_device_uevent_modalias(dev, env); if (rc != -ENODEV) return rc;