]>
Commit | Line | Data |
---|---|---|
38568109 GKH |
1 | From foo@baz Thu Mar 28 21:54:17 CET 2019 |
2 | From: Bjorn Helgaas <bhelgaas@google.com> | |
3 | Date: Mon, 18 Mar 2019 08:51:06 -0500 | |
4 | Subject: mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S | |
5 | ||
6 | From: Bjorn Helgaas <bhelgaas@google.com> | |
7 | ||
8 | [ Upstream commit fae846e2b7124d4b076ef17791c73addf3b26350 ] | |
9 | ||
10 | The device ID alone does not uniquely identify a device. Test both the | |
11 | vendor and device ID to make sure we don't mistakenly think some other | |
12 | vendor's 0xB410 device is a Digium HFC4S. Also, instead of the bare hex | |
13 | ID, use the same constant (PCI_DEVICE_ID_DIGIUM_HFC4S) used in the device | |
14 | ID table. | |
15 | ||
16 | No functional change intended. | |
17 | ||
18 | Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> | |
19 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
20 | Signed-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 | @@ -4365,7 +4365,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); |