From patchwork Thu Jan 3 11:57:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 154712 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp573057ljp; Thu, 3 Jan 2019 03:56:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN5pObUulF5IVW33pSmTj40+PtepbhwS15NZjv7o72od1xYyIkIq+1x7atjhMa8Zjgin6T7M X-Received: by 2002:a62:6385:: with SMTP id x127mr48595106pfb.15.1546516570461; Thu, 03 Jan 2019 03:56:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546516570; cv=none; d=google.com; s=arc-20160816; b=wYqMji4oPIB9R6Luic0mBMso6epIVNf7g3UxYKzFe5hmLvnrKKxZA3PUObo1vM6k84 Wk2ngbvvQQOzOLaBmSJxfvkATJSIO8YgjgIWp058xA/FgHSteBNCWDzxdonrq2DGLqzQ bKEQee6PDx4SkvWxFEfYBf5OSvKDegq/3lx0q4/DcFqRNSJxWHwgjSK5F5Dm/KNq+pxU PrghPU2Q5lWkK9itOvbjhBv+h3r966w8XBAPIBdc1AiTTtZpzjHimwfU3spDMMXCLnaL D9fgYbjYOtbDKWFaN1WFZjhWepLDoF+xlF7IBwuFmIyhTQOop3zJvqwRReBKI5UldCmf 2B5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=pFckbaw49bR6ALZPQybMmxd4Nca/x2o6AUJ29AbHEzw=; b=eST+v82zjsWCsCvPF+U48OyA2g4CmYeZ/ARw3fT4YdOv5kDkSFIz6iE3jFPNfLRSB7 WITTYPh0XUvFxZnH56RPIjSbLuRd9/kBzHL3U6nEk2Hno7rCALYc+7CyI4LOedr1j8yt +G0Q1UlwXV4w+feOQjCcKFnDmYrCMl+fC+3YZMJR3ImfEj79ez359Pim0YbR1x8/vT0n zwIfrotGr0WHuGC5HzG1ADGDDQn9r7clImIiakzP5JiiZEBVbyHtu/T/GvDBMu70KpHa FjBNnF5rAJqVPkmakIcTfT6nk3vbZaWDHIizFJieF92yIKDysoiu7aDs9veKVosISD1I puGw== 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 k5si6901188pfi.176.2019.01.03.03.56.10; Thu, 03 Jan 2019 03:56:10 -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; 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 S1730628AbfACL4J (ORCPT + 31 others); Thu, 3 Jan 2019 06:56:09 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:17078 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728474AbfACL4I (ORCPT ); Thu, 3 Jan 2019 06:56:08 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 28A3FB6F09603; Thu, 3 Jan 2019 19:56:05 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Thu, 3 Jan 2019 19:55:58 +0800 From: John Garry To: CC: , , , John Garry Subject: [PATCH] HISI LPC: Don't fail probe for unrecognised child devices Date: Thu, 3 Jan 2019 19:57:02 +0800 Message-ID: <1546516622-46343-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently for ACPI-based FW we fail the probe for an unrecognised child HID. However, there is FW in the field with LPC child devices having fake HIDs, namely "IPI0002", which was an IPMI device invented to support the initial out-of-tree LPC host driver, different from the final mainline version. To provide compatibility support for these dodgy FWs, just discard the unrecognised HIDs instead of failing the probe altogether. Tested-by: Zengruan Ye Signed-off-by: John Garry -- 1.9.1 diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index d5f8545..19d7b6f 100644 --- a/drivers/bus/hisi_lpc.c +++ b/drivers/bus/hisi_lpc.c @@ -522,10 +522,9 @@ static int hisi_lpc_acpi_probe(struct device *hostdev) if (!found) { dev_warn(hostdev, - "could not find cell for child device (%s)\n", + "could not find cell for child device (%s), discarding\n", hid); - ret = -ENODEV; - goto fail; + continue; } pdev = platform_device_alloc(cell->name, PLATFORM_DEVID_AUTO);