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,URIBL_BLOCKED,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 D555FC43381 for ; Mon, 1 Apr 2019 18:11:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9AB202070D for ; Mon, 1 Apr 2019 18:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554142292; bh=FmtodEXQxZ0ySxeDrZ/xpCIVaGFpa9nbQdGngjrZ16A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cd3mmulAdm+yOBGyMO4E2XSspABopT4k/YdpK2BHYSLChGy0u3VIE2dEhpqA0+0UF KJpkgIC0uFEkfkZfMkPSSXO4HQzUDRGr1biWoJ+/YMqfzRNcDZ3dtsw6mWliMs9xNC QQwMSbiLtMWDUDb27eTfFWcz8vuuihXhKky/mhVg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729132AbfDARGF (ORCPT ); Mon, 1 Apr 2019 13:06:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:51490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729068AbfDARGE (ORCPT ); Mon, 1 Apr 2019 13:06:04 -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 791A421924; Mon, 1 Apr 2019 17:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554138364; bh=FmtodEXQxZ0ySxeDrZ/xpCIVaGFpa9nbQdGngjrZ16A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SFUkImwLsTaN1bF8VQ3nB06X89mgC4KPn5eDuz2fCYLN14zouBO5OygpRA9CU7ozo x8iYhtaEAGz0jrZiIQ/R7UmwXIiyDW6p5FN8VLHaQm1tx+Sc7/EYrS2YftGWdQXqM+ tU6ulVBi83QSAH4/0Pnamj69ZDmT71jcSo9jUDJ0= 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 5.0 009/146] mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S Date: Mon, 1 Apr 2019 19:00:21 +0200 Message-Id: <20190401170049.209572500@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170048.449559024@linuxfoundation.org> References: <20190401170048.449559024@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 5.0-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 @@ -4365,7 +4365,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);