|
@@ -924,6 +924,27 @@ static struct miscdevice mei_misc_device = {
|
|
|
.minor = MISC_DYNAMIC_MINOR,
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * mei_quirk_probe - probe for devices that doesn't valid ME interface
|
|
|
+ * @pdev: PCI device structure
|
|
|
+ * @ent: entry into pci_device_table
|
|
|
+ *
|
|
|
+ * returns true if ME Interface is valid, false otherwise
|
|
|
+ */
|
|
|
+static bool __devinit mei_quirk_probe(struct pci_dev *pdev,
|
|
|
+ const struct pci_device_id *ent)
|
|
|
+{
|
|
|
+ u32 reg;
|
|
|
+ if (ent->device == MEI_DEV_ID_PBG_1) {
|
|
|
+ pci_read_config_dword(pdev, 0x48, ®);
|
|
|
+ /* make sure that bit 9 is up and bit 10 is down */
|
|
|
+ if ((reg & 0x600) == 0x200) {
|
|
|
+ dev_info(&pdev->dev, "Device doesn't have valid ME Interface\n");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+}
|
|
|
/**
|
|
|
* mei_probe - Device Initialization Routine
|
|
|
*
|
|
@@ -939,6 +960,12 @@ static int __devinit mei_probe(struct pci_dev *pdev,
|
|
|
int err;
|
|
|
|
|
|
mutex_lock(&mei_mutex);
|
|
|
+
|
|
|
+ if (!mei_quirk_probe(pdev, ent)) {
|
|
|
+ err = -ENODEV;
|
|
|
+ goto end;
|
|
|
+ }
|
|
|
+
|
|
|
if (mei_device) {
|
|
|
err = -EEXIST;
|
|
|
goto end;
|