Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp45814pxk; Tue, 15 Sep 2020 17:19:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTLudilM2b1dGKKpaEe0B+u54vxuaMDl97IyRl8cUQqc2Luapp9MYMg0OceEJnTvUubxdI X-Received: by 2002:a05:6402:1012:: with SMTP id c18mr24734187edu.77.1600215585851; Tue, 15 Sep 2020 17:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600215585; cv=none; d=google.com; s=arc-20160816; b=0J7DZceQh8vHadti62DTbG3mHITIj0Kdba8NOSohK5FG6cceun547CCFP1Xnq6OGJn Ki59IN4LXZLM3+Q2zIUsuL7UgsP9HAt0bvrfiO9z7F7TNQEQ7bwtgnn53il7FzD5Lv9F XbJaqeAQGAXWQlGkAzmMm91lpma9FgniAZ8PPfR83RjpVi8nXRb2qF6c37GSO+F9JEuo JzXuvOLFppVHxeIXif+fTmY3843w1a6ZBCWSRlTCY/yrh0IKVs4/QUzDBdi9Lb/lodyY eXGaF601mpyHk1biIs1wEZw1p+AKGXh0gJ7BUms6ErgzISmGj+UVgTYCbTa2Jm2cVAGG VyFA== 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=QXVb36ydP0HOYGr8VMTJAKyDVvrz74trvf465elU5vo=; b=xcolWboqH0z1qyNLlxjdqBjk9MJUpGe2c4E3FKmVo2fSyb29KkNFMHPQH7PSwR9dXB TXHy/MDZTqHxMnGRb1Bk/0r6cwMuQEc/tmOG5RYZGcpyT+/CYa/QZVx3t4Jxrh4oqRtY fdaxe0fAMAI+tkgBnnlnPg4w3tPEbvtWeg59eE41Xbsde61BBvyR+JY5oCENicjWf/wE nu3vPjHs08opYiTLv74oX3INQo8DiQYkwaKZqoXS5MySFqKuKuGgsTN2C22s89LnLu/+ sF8b8cFATSquXYO+/HfW/k2+yvPW8XUFTqflwFPuDj7qZ7dPTA9It3/0is1QZuZ47glV lxXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ORQvH7gO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si9352547ejz.216.2020.09.15.17.19.23; Tue, 15 Sep 2020 17:19:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ORQvH7gO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbgIPASk (ORCPT + 99 others); Tue, 15 Sep 2020 20:18:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:38304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726894AbgIOOWr (ORCPT ); Tue, 15 Sep 2020 10:22:47 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 2A812222B8; Tue, 15 Sep 2020 14:18:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179483; bh=miPX4RjeJn5w/r+hKoXTnbvZZrD4git9/cOHZbzQ3fQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ORQvH7gO/gnIOHufprZ1c6i0WJ+m861rPmNBqoJrLl9UXtRWHdGbszLNMi129Pm5V vmCfjIso/m5dnfjphqVK5AwFEvP7gjbVfzRYm5sbiD1IHaAWMRudAHmEcQGfGwLsah lz0rz0W357noFZ7wYExwFTyOYokxEp32s7AERVyQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heikki Krogerus Subject: [PATCH 4.19 78/78] usb: typec: ucsi: acpi: Check the _DEP dependencies Date: Tue, 15 Sep 2020 16:13:43 +0200 Message-Id: <20200915140637.507948901@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140633.552502750@linuxfoundation.org> References: <20200915140633.552502750@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Heikki Krogerus commit 1f3546ff3f0a1000971daef58406954bad3f7061 upstream. Failing probe with -EPROBE_DEFER until all dependencies listed in the _DEP (Operation Region Dependencies) object have been met. This will fix an issue where on some platforms UCSI ACPI driver fails to probe because the address space handler for the operation region that the UCSI ACPI interface uses has not been loaded yet. Fixes: 8243edf44152 ("usb: typec: ucsi: Add ACPI driver") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200904110918.51546-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/ucsi/ucsi_acpi.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/usb/typec/ucsi/ucsi_acpi.c +++ b/drivers/usb/typec/ucsi/ucsi_acpi.c @@ -64,11 +64,15 @@ static void ucsi_acpi_notify(acpi_handle static int ucsi_acpi_probe(struct platform_device *pdev) { + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); struct ucsi_acpi *ua; struct resource *res; acpi_status status; int ret; + if (adev->dep_unmet) + return -EPROBE_DEFER; + ua = devm_kzalloc(&pdev->dev, sizeof(*ua), GFP_KERNEL); if (!ua) return -ENOMEM;