Commit 565af28b authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8192e_pci: Handle duplicate PCI ID 0x10ec:0x8192 conflict with rtl8192se

commit 1c50bf7e upstream.

There are two devices with PCI ID 0x10ec:0x8192, namely RTL8192E and
RTL8192SE. The method of distinguishing them is by the revision ID
at offset 0x8 of the PCI configuration space. If the value is 0x10,
then the device uses rtl8192se for a driver.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent efa73f13
...@@ -4532,6 +4532,7 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev, ...@@ -4532,6 +4532,7 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
u8 unit = 0; u8 unit = 0;
int ret = -ENODEV; int ret = -ENODEV;
unsigned long pmem_start, pmem_len, pmem_flags; unsigned long pmem_start, pmem_len, pmem_flags;
u8 revisionid;
RT_TRACE(COMP_INIT,"Configuring chip resources\n"); RT_TRACE(COMP_INIT,"Configuring chip resources\n");
...@@ -4592,6 +4593,11 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev, ...@@ -4592,6 +4593,11 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
pci_write_config_byte(pdev, 0x41, 0x00); pci_write_config_byte(pdev, 0x41, 0x00);
pci_read_config_byte(pdev, 0x08, &revisionid);
/* If the revisionid is 0x10, the device uses rtl8192se. */
if (pdev->device == 0x8192 && revisionid == 0x10)
goto fail1;
pci_read_config_byte(pdev, 0x05, &unit); pci_read_config_byte(pdev, 0x05, &unit);
pci_write_config_byte(pdev, 0x05, unit & (~0x04)); pci_write_config_byte(pdev, 0x05, unit & (~0x04));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment