Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp503521yba; Mon, 1 Apr 2019 10:36:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9SKHYtxGIiGINU71ZtfUOTRMNFCtt+927j/AsbkFd032UwgiTPM6iK0c9H1CPZbQQyZDK X-Received: by 2002:a65:6656:: with SMTP id z22mr59519004pgv.95.1554140178178; Mon, 01 Apr 2019 10:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554140178; cv=none; d=google.com; s=arc-20160816; b=PDSx8NVtdZcylp58h2B5OkD2yUa9dE6sPgZfDN0IvbxAKm6UqHcsWrudvy+sSiCmps mSzXetBR6kyR16wH4iTA2JZYKcyJjf6dl3w1sTedwRMeY44mOKwZiNL/kwTBm0PAmdjo EZfAH6WR54+FjYfxJdz52e0Vc0RPnYOKPIHmZFnvPO+xctrAZywiGIdGIcM4EQsFnwpW RGBlLbte1GkIkYM09ixBZ2eNyYTNta/uB4hjeaHmx0zcemMcRT3WV7AaoM+o2bbrVwJU 1G/SzuGY84KenaWaXcWWag3YYElaNnYOVuzdnguXkG9brg4uJNiTcH6x71gNcSd5VA+K ACuA== 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=sM4kydR0DdSZ+deiThmkNvPU2yQ6I3fpAoQdXhjBdmI=; b=pryJnENxwdx4li1k8bB9L4G0BgftboAh0W/u/6IVx1vk06f0UVGP7TyFWwN8wI4M/W Ae3Sbp9gzBIrBHf1/eeej05jbYDtDCgzldJrd2qOI399g0ZgCejjXs1NyrGFUnXPQaK3 wvdtiee85pzztiyvFYWc3wALne90YL8VS71WtzY5V0M/Lrf0qpiKpggFATaYASrhXwN1 Z/9T0Peix7dtOHrMlZQf4K59u4qrxpqY14ujYgpHq5PWyhEJTZZuunBazoOO6byv3Lpg rPyYPQTzQdxnJi3Tvft0/RHJaF73p+WCwlF2J94vd4aeSOego1IXZjFRW22WIz4kWF0P I5FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iSaQwCGw; 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 60si9678001plf.122.2019.04.01.10.36.02; Mon, 01 Apr 2019 10:36:18 -0700 (PDT) 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=iSaQwCGw; 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 S1733256AbfDAReK (ORCPT + 99 others); Mon, 1 Apr 2019 13:34:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:43722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733061AbfDAReH (ORCPT ); Mon, 1 Apr 2019 13:34:07 -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 BFB9620896; Mon, 1 Apr 2019 17:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554140047; bh=Bi+8sXMQe46BQuM7cV0Ot4Bj2WS4Kkg8lJZgPKUyUfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iSaQwCGwrlz5IT5M85bGIBtCGsYSfAri7kRaqCBNY5kK8Ev+ragmMJyzD34BVwDX0 ShukT9w89s5QHa2kEV4iAflwkRIaJWtaTN8QxIg/XU8e5lPPtiIwNVhborW/uYnSHw xYA9OAfI6zz0WaGIcCoFBh9y62FH9QQNs6sEhSAE= 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.4 091/131] mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S Date: Mon, 1 Apr 2019 19:02:41 +0200 Message-Id: <20190401170059.597133350@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170051.645954551@linuxfoundation.org> References: <20190401170051.645954551@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.4-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 @@ -4370,7 +4370,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);