]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/misdn-hfcpci-test-both-vendor-device-id-for-digium-hfc4s.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / misdn-hfcpci-test-both-vendor-device-id-for-digium-hfc4s.patch
CommitLineData
b247c0e3
GKH
1From foo@baz Thu Mar 28 23:13:19 CET 2019
2From: Bjorn Helgaas <bhelgaas@google.com>
3Date: Mon, 18 Mar 2019 08:51:06 -0500
4Subject: mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S
5
6From: Bjorn Helgaas <bhelgaas@google.com>
7
8[ Upstream commit fae846e2b7124d4b076ef17791c73addf3b26350 ]
9
10The device ID alone does not uniquely identify a device. Test both the
11vendor and device ID to make sure we don't mistakenly think some other
12vendor's 0xB410 device is a Digium HFC4S. Also, instead of the bare hex
13ID, use the same constant (PCI_DEVICE_ID_DIGIUM_HFC4S) used in the device
14ID table.
15
16No functional change intended.
17
18Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 drivers/isdn/hardware/mISDN/hfcmulti.c | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
26+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
27@@ -4370,7 +4370,8 @@ setup_pci(struct hfc_multi *hc, struct p
28 if (m->clock2)
29 test_and_set_bit(HFC_CHIP_CLOCK2, &hc->chip);
30
31- if (ent->device == 0xB410) {
32+ if (ent->vendor == PCI_VENDOR_ID_DIGIUM &&
33+ ent->device == PCI_DEVICE_ID_DIGIUM_HFC4S) {
34 test_and_set_bit(HFC_CHIP_B410P, &hc->chip);
35 test_and_set_bit(HFC_CHIP_PCM_MASTER, &hc->chip);
36 test_and_clear_bit(HFC_CHIP_PCM_SLAVE, &hc->chip);