Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324303
b: refs/heads/master
c: 9a123f1
h: refs/heads/master
i:
  324301: 27fdf75
  324299: dbbea79
  324295: 12bd646
  324287: 901c993
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Aug 16, 2012
1 parent af69c64 commit cfe2e18
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07b509b7943e5594f3f228e5b62a49cf6a033709
refs/heads/master: 9a123f19832702753805afe0e93db26799b91b07
27 changes: 27 additions & 0 deletions trunk/drivers/misc/mei/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,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, &reg);
/* 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
*
Expand All @@ -920,6 +941,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;
Expand Down

0 comments on commit cfe2e18

Please sign in to comment.