Received: by 10.213.65.68 with SMTP id h4csp1854883imn; Mon, 19 Mar 2018 15:19:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELtRUlftAkFhMZigukGVvz1zpTw0qx4DimjJtGmukJAHQxbwrcVzPhTaNu3XiQX6yKL3Woqv X-Received: by 2002:a17:902:aa83:: with SMTP id d3-v6mr13837294plr.36.1521497975476; Mon, 19 Mar 2018 15:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521497975; cv=none; d=google.com; s=arc-20160816; b=KbborsL81McuS5cFFbzB36plG8O+UInSmm8Bg3kHcFu6+XNmHhDtlagINSPIXlW/oL DvlboS+8jXP8+5KpWlUYyfcqnO777HFdUM4T9BXHgPucTJzlRyASZxVvsG7C26nG6qo1 LjeAFxA9fpwQdHbbSg4n0FhqwBG8fhNn326GLTRpcWQ51v8cp7NHV4e1ihU+IltL14mW Tbz5QAiMx0X+wAQyy1DJoLKev0YoXKCbt7/N9rIJVW/S/V984qMpuvECnR/pkv3Z9lrG ZHMgNg1y8ZBOCp04qbHgIZcchXubClupLM3Lg7cGCD7vp0OQ0BANr/EZZh+kE34BqR0f oCFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=o1uq5Dx0CQm6bE7fIKdFhyqwO3CDbAUB8hhSE4bKgRQ=; b=A3xnTD0PjU6RjiETtR70Hux9cRGim5OdrppoTmMTMjJr6qUwakEBC78UEn4uzVXJi4 sKh4AzLO4afGcHGRdSXorBSixJ0GWOwM+XEb7Zo1Pn62zGZBYUD6YxwsXDYMrNqG5/iJ Vbl5N0K7xFTNTycCJByQWw0Olf/4/ArEhDAwUGj8jjPx70YNCahe+NVnppLmRprIrloA oVsoid1w85g+1lypW/9qXYVIW15McqsL9pGJi7ewqOgN70QQVQTf9pZcXmLB8Rf+P1Nt 65zchOME/3lnJsJYrjF69mDdi1GE4HqkUVHO749MIR1lJiZYjnOqS+H3M14QnAQJkVF0 YsbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=T4DqXvKY; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si158797pfe.186.2018.03.19.15.19.20; Mon, 19 Mar 2018 15:19:35 -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=@microsoft.com header.s=selector1 header.b=T4DqXvKY; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032484AbeCSWRl (ORCPT + 99 others); Mon, 19 Mar 2018 18:17:41 -0400 Received: from mail-sn1nam01on0118.outbound.protection.outlook.com ([104.47.32.118]:64697 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934006AbeCSPtr (ORCPT ); Mon, 19 Mar 2018 11:49:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=o1uq5Dx0CQm6bE7fIKdFhyqwO3CDbAUB8hhSE4bKgRQ=; b=T4DqXvKYSWTqgwSaQJTzYlTiuVrfAZeyi7gS48i6OnUy6C7o8D2LG+S2QPNOxkl3peqo+dOgZ5Gbm172WuFyY7/WOavlEhOxn0vs+q8p5lGxZEc18nzSs8DdZSbemUKzHMiQtkuiDuHWE3s8mkb5+BST75tEuIhwnqZEXO9gwRI= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0981.namprd21.prod.outlook.com (52.132.133.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 15:49:38 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:49:38 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Hans de Goede , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 094/124] serdev: Fix serdev_uevent failure on ACPI enumerated serdev-controllers Thread-Topic: [PATCH AUTOSEL for 4.15 094/124] serdev: Fix serdev_uevent failure on ACPI enumerated serdev-controllers Thread-Index: AQHTv5nD/wtkCbIRvEiH1m5dMI1GEg== Date: Mon, 19 Mar 2018 15:48:44 +0000 Message-ID: <20180319154645.11350-94-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0981;7:stF2aFwLFByq4dVxorlldfGOreUXfd1BDyOcZMkQ4z72chOE0hJFWtqffiTRiuzo1iT7pC8Rxvf3OAv19XTNy5gSEC6WUorZs4CGal2K7/RlNsxbsMPTY4xX4eMo89Sn4/CkcE/mnObOcDfp8rZ0WVOC3J9TTcSfQxvBFdFaUU/flYwqbFNuTnyEDWu3KC7rxkSXtMvK6zQybS5YvpLJ9raP0+CsRoHEwUAoKhbLiCCsZtUODed+/VkjguR/VaXD;20:/mIj2MSHifOjnBJ0LY5rParAC/RGFVRW5zhuW67ZUM/z8SVrXpvPWid9H7lArnV76suskyQJc1WL/0oNJGHPTEZ+rn7H5RyQmcryLa9VHNCr3PTaPV4PzAnBFJ3t35EtzRXZKgRGQUw3p24fMUhwbR8erIya682XqQ9+VM99XI0= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ccbfc3b6-6681-450d-e0d9-08d58db10584 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0981; x-ms-traffictypediagnostic: DM5PR2101MB0981: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0981;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0981; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(366004)(39860400002)(39380400002)(189003)(199004)(66066001)(6486002)(26005)(110136005)(5660300001)(54906003)(3280700002)(6512007)(68736007)(102836004)(6436002)(107886003)(10290500003)(53936002)(186003)(72206003)(14454004)(36756003)(6666003)(2950100002)(316002)(6506007)(22452003)(478600001)(10090500001)(106356001)(105586002)(99286004)(7736002)(3660700001)(86362001)(76176011)(305945005)(86612001)(2501003)(97736004)(5250100002)(4326008)(3846002)(6116002)(1076002)(8936002)(25786009)(81156014)(81166006)(8676002)(2900100001)(2906002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0981;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ZvyM7YJrFfhlzEdVv9I1beMrmJkf42hB39N6GAhgbUi0OJWLKJG8wnyNIYFDPRBQLClShm2w3XDPDnAjNxc9d5O9DIySjbuVFLIsxG1PcUJ90LDLMfpxxuPTLeIdp90VY9UmwMdmzRb+fW5CEmgFpHhJ8reFFYCujuC+sAlHARfJpYVa42tLO39hFLckp9qb7T/e17OQusQidgHAZW4p4fS1DjDzX1vnaYXRjQR6aMLl3jP2AzgxlI8gXjfbVcCiohYIMmTDRXpXc66fKJ4CDxpzve2GfkxEo4aKrP2kIviQXHw7lze8FzLqiDoCO8XiYcen2mFk0EGyza7eFrBicw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccbfc3b6-6681-450d-e0d9-08d58db10584 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:48:45.0012 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0981 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/tty/serdev/core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 1bef39828ca7..571ce1f69d8d 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -54,6 +54,11 @@ static int serdev_uevent(struct device *dev, struct kobj= _uevent_env *env) int rc; =20 /* TODO: platform modalias */ + + /* ACPI enumerated controllers do not have a modalias */ + if (!dev->of_node && dev->type =3D=3D &serdev_ctrl_type) + return 0; + rc =3D acpi_device_uevent_modalias(dev, env); if (rc !=3D -ENODEV) return rc; --=20 2.14.1