From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C74B6C43381 for ; Mon, 1 Apr 2019 17:56:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E6432084B for ; Mon, 1 Apr 2019 17:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554141365; bh=1Q2gR3ux/GXc791eE5BDNeHOdX0L/1tPPVTiw2Eytgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mbYDE9K+4MoXEECip/87ewLZ4SC8HhHcjV1JHd9zLrHgm4M9/Kxl/R1GZmtdTYjgr WL+tBTUFhR5iGrEs6CvJZy7uU6ObqRxWjFjImldM6bbRhPkGoklDs1s5+0RZzEiWeN i4FVwKevSyMbfzu6k7lg9oJmoAKN5wYfGwbkkMIw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731947AbfDARWM (ORCPT ); Mon, 1 Apr 2019 13:22:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:51296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731526AbfDARWL (ORCPT ); Mon, 1 Apr 2019 13:22:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 B8C98206C0; Mon, 1 Apr 2019 17:22:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554139331; bh=1Q2gR3ux/GXc791eE5BDNeHOdX0L/1tPPVTiw2Eytgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=swmh8Teob6ZQE0G+pHzS06My6EFqlT6TinYpa5TYpDrJiX2OS5hb3L8SyPvpMbjp3 wncdJrm3D3Z34cpZMlUXugGg9oUebmyfDrEB/BFFGgaDyPxbH7rDHvklWoLHV302bt 5YHNGav54U4BICp1lhJWpjaSpCFbzEVzPYj89O9k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Helgaas , "David S. Miller" Subject: [PATCH 4.14 007/107] mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S Date: Mon, 1 Apr 2019 19:01:22 +0200 Message-Id: <20190401170046.110535799@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170045.246405031@linuxfoundation.org> References: <20190401170045.246405031@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: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bjorn Helgaas [ Upstream commit fae846e2b7124d4b076ef17791c73addf3b26350 ] The device ID alone does not uniquely identify a device. Test both the vendor and device ID to make sure we don't mistakenly think some other vendor's 0xB410 device is a Digium HFC4S. Also, instead of the bare hex ID, use the same constant (PCI_DEVICE_ID_DIGIUM_HFC4S) used in the device ID table. No functional change intended. Signed-off-by: Bjorn Helgaas Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/isdn/hardware/mISDN/hfcmulti.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -4367,7 +4367,8 @@ setup_pci(struct hfc_multi *hc, struct p if (m->clock2) test_and_set_bit(HFC_CHIP_CLOCK2, &hc->chip); - if (ent->device == 0xB410) { + if (ent->vendor == PCI_VENDOR_ID_DIGIUM && + ent->device == PCI_DEVICE_ID_DIGIUM_HFC4S) { test_and_set_bit(HFC_CHIP_B410P, &hc->chip); test_and_set_bit(HFC_CHIP_PCM_MASTER, &hc->chip); test_and_clear_bit(HFC_CHIP_PCM_SLAVE, &hc->chip);