Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2745880imj; Mon, 11 Feb 2019 07:52:59 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ/71/pLgxWRIuuKBan83qVqhMsOli1MVT23gASt81JwAZedpVTdQ6YhZgWkZbHqmnaVCeV X-Received: by 2002:a62:8c11:: with SMTP id m17mr37310092pfd.224.1549900379785; Mon, 11 Feb 2019 07:52:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900379; cv=none; d=google.com; s=arc-20160816; b=fvQbA0x98peGLMtOTqfzDGwIyrquFw+G1oE5DCFP7xhORcXAK1cdcBnlv6eSC3RF3e hUfFJwqAU6DFqpuFDqupPxTfoWh9fWAU60x9sWthj6B2QkAwWx+DvGhKYE6cEAhrSzms DyMwYKwCpj61Tqb0GF3si7mt5jc+7C7E0p08HIf4SQYv4YkN4EVp0HVCIyzGFfdfDXEu sISy7YSlbUNdq8sgzga5Rmn3U7bLPC3dSMFRoZ0tuGwbW4mGEsbln1a+1sVp5Sae4vNq 1yviNRB+s4mQqipX/QAPiMy5vOCbwuXst4UNcb7d3sGcmVzD4Q4ucSNnktW1j6k5HXpl fchA== 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=vlPr/TvLno9dtQ4Hy5ZnySIEMv9xZ6A3d45e1c2Y8Fw=; b=VWxGyiPPMur4jkzb3b+hqYzaCPBNCoFEMtwg95v/5Cf1xNEKcsG/edyOmzu8vjtNEu luSeTawK2/ir+UF4C/ELBVnFqJpbZefjOUhVzG8QM+ARaPsg06mT8NfpL9DtXCwVtKFb 1lSluweFMTQz3MmFxtkDT5VsRk41N5s1wQNtE4JL7m7lCp6w+vrUS8V/Ubs/dChvwg4A KNlZprVsO4LnIdXPN/jqbWtTbnqNFRnJESYICuiLueji4RXFDQh+v6JWIkYS4Icrz7O+ q+c7Mm36VPoHwK51lfcTHsA3mINV6LMVrJdaWtjKnrnuIBQBGxZ5i2h1KuJR/FrrZV3N eezA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ne6GTqCh; 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 o8si1006508pgn.469.2019.02.11.07.52.43; Mon, 11 Feb 2019 07:52:59 -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=Ne6GTqCh; 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 S1731522AbfBKOhr (ORCPT + 99 others); Mon, 11 Feb 2019 09:37:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:47238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731495AbfBKOhp (ORCPT ); Mon, 11 Feb 2019 09:37:45 -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 33C462081B; Mon, 11 Feb 2019 14:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895864; bh=XPq9tnauJO2O7snXEN3LE2xe4cpVSixs0PPoyTpdR1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ne6GTqChegBtm4NZ13QVG3oD/bdzYS/dEURk8PNuAjgmZXpYY31t/JGIHKwZcCO0P GUWP6nzp7a/MNzE9QfxdVuL0QNVYSHr3klUtXExcM5GvidjnCdH2dHGmGnrtt0pM90 yiTbQidfhVScP6KeQwzrmPOnSkm/5T0K0rOyTyOA= 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.20 349/352] serial: 8250_pci: Make PCI class test non fatal Date: Mon, 11 Feb 2019 15:19:36 +0100 Message-Id: <20190211141909.382962797@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@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.20-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 @@ -3420,6 +3420,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? @@ -3647,10 +3652,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;