aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2011-06-18 22:34:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-04 21:58:31 -0700
commit565af28bfba187fabda9bccf065e2009356aaae5 (patch)
tree1204dc90b3903cfdda9bc105c94d3edb2b375855 /drivers/staging/rtl8192e
parentefa73f1334e339902993bb4894da47242f0c4173 (diff)
downloadkernel_samsung_smdk4412-565af28bfba187fabda9bccf065e2009356aaae5.zip
kernel_samsung_smdk4412-565af28bfba187fabda9bccf065e2009356aaae5.tar.gz
kernel_samsung_smdk4412-565af28bfba187fabda9bccf065e2009356aaae5.tar.bz2
staging: r8192e_pci: Handle duplicate PCI ID 0x10ec:0x8192 conflict with rtl8192se
commit 1c50bf7e415cf6ce9545dbecc2ac0d89d3916c53 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: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/r8192E_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c
index 58d800f..cd98f89 100644
--- a/drivers/staging/rtl8192e/r8192E_core.c
+++ b/drivers/staging/rtl8192e/r8192E_core.c
@@ -4532,6 +4532,7 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
u8 unit = 0;
int ret = -ENODEV;
unsigned long pmem_start, pmem_len, pmem_flags;
+ u8 revisionid;
RT_TRACE(COMP_INIT,"Configuring chip resources\n");
@@ -4592,6 +4593,11 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
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_write_config_byte(pdev, 0x05, unit & (~0x04));