Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2692765imj; Mon, 11 Feb 2019 07:06:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IZBPr1hdIh9998BUybPu1BmRRP7K8Xt6XCw5mTdIEKYXzecSpUEwvRN20L4RVPVkHyCyfkn X-Received: by 2002:a63:d547:: with SMTP id v7mr23789125pgi.339.1549897593734; Mon, 11 Feb 2019 07:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897593; cv=none; d=google.com; s=arc-20160816; b=Ps1ohxB7yVUQT05BKaYVLnL7gXtIxwpNC4/b8xBqNFrKDDtR6AHzz/yJaJtpg790kn C7M6e//sggnm+y/qpVGdsYnWLBzzYwNCr8Y+rBKCG2ONx3NWZuxVIT95+RJWw1EnRi+0 ySGEBUyrvk65O80wH5CLNEeYIzbVqaqKl8zpPYqefJjfJCTW01GjFGiZFOttgwB4JGMV JTM4VerpzcF6UzC1XL3Aa5yiojXDXsSbmYdkzt4BL4uaDECT14CrpcflXDy4OL8x0/zV OPExE4yPvDh8R4y9sTxibwHjZyyXD3Jqqwas0PFW4Kj/AwHpsqd4R7Wdnh/bD6l3G5V8 CtkA== 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=QvkrFa5k2MJwPDXaeT2qYDy4hMHRA6TRRSHZXa6pVi8=; b=M5VQ+EhzS4MToLx93gomwFYjMVLcVmskz7T7NUsS3axhPCvgoVwi4aU8XRuxTOWtO0 Djst3M45JS4h90o/6pKeHslGgPuar2oLUwVKRjaRoRS/lXkQKvvYPIifI8M5d8hPg9AH 4WIxpN4zXMZtA+Htf3ab3Q8TXNoBE/cqP80swcDaC8ey7pVCLJ4mMTJj++b0YkJXGfir fCF65ZiAs7suqfhlfQEce+t2381J307uxw6qF4r5kb33n4z2CQtLnJAgRa8PjIak83n0 MlfbRdO1Bh2Yq8Puz3pyyn5ryJsj1NEiC8eaM+Y7d6u584ODIpKRisjfdJnccalb8qn2 ygIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wH+uGULx; 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 s32si9540019pgk.401.2019.02.11.07.06.17; Mon, 11 Feb 2019 07:06:33 -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=wH+uGULx; 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 S2390680AbfBKPDy (ORCPT + 99 others); Mon, 11 Feb 2019 10:03:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:52600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390720AbfBKPDt (ORCPT ); Mon, 11 Feb 2019 10:03:49 -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 C72FD222A7; Mon, 11 Feb 2019 15:03:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897429; bh=qeqi5773CNN56zaOuH8CTP9AeAVCFgC/MNboz8ODRKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wH+uGULx8X/PdZKo27ABvHUeMcr4bAqzT5PtZo+fkTvQrzssA8igroZ4RLOW4948z ghJqCsSK++4qj9sO6HK4CIunb907ygYK5eGLQ5FuLqzGe+f8BUsUtYqCe97we8xN/m W75CCmMMgBBSTIHeUI5WIPUctijHvyJx0mvOYqCY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guan Yung Tseng , "KHUENY.Gerhard" , Andy Shevchenko Subject: [PATCH 4.14 201/205] serial: 8250_pci: Make PCI class test non fatal Date: Mon, 11 Feb 2019 15:19:59 +0100 Message-Id: <20190211141841.570503327@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. ------------------ From: Andy Shevchenko commit 824d17c57b0abbcb9128fb3f7327fae14761914b upstream. As has been reported the National Instruments serial cards have broken PCI class. The commit 7d8905d06405 ("serial: 8250_pci: Enable device after we check black list") made the PCI class check mandatory for the case when device is listed in a quirk list. Make PCI class test non fatal to allow broken card be enumerated. Fixes: 7d8905d06405 ("serial: 8250_pci: Enable device after we check black list") Cc: stable Reported-by: Guan Yung Tseng Tested-by: Guan Yung Tseng Tested-by: KHUENY.Gerhard Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -3425,6 +3425,11 @@ static int serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) { int num_iomem, num_port, first_port = -1, i; + int rc; + + rc = serial_pci_is_class_communication(dev); + if (rc) + return rc; /* * Should we try to make guesses for multiport serial devices later? @@ -3652,10 +3657,6 @@ pciserial_init_one(struct pci_dev *dev, board = &pci_boards[ent->driver_data]; - rc = serial_pci_is_class_communication(dev); - if (rc) - return rc; - rc = serial_pci_is_blacklisted(dev); if (rc) return rc;