diff options
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r-- | drivers/misc/mei/hw-me-regs.h | 5 | ||||
-rw-r--r-- | drivers/misc/mei/interrupt.c | 3 | ||||
-rw-r--r-- | drivers/misc/mei/main.c | 3 | ||||
-rw-r--r-- | drivers/misc/mei/pci-me.c | 30 |
4 files changed, 30 insertions, 11 deletions
diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h index 66f411a6e8ea..cabc04383685 100644 --- a/drivers/misc/mei/hw-me-regs.h +++ b/drivers/misc/mei/hw-me-regs.h | |||
@@ -115,6 +115,11 @@ | |||
115 | #define MEI_DEV_ID_LPT_HR 0x8CBA /* Lynx Point H Refresh */ | 115 | #define MEI_DEV_ID_LPT_HR 0x8CBA /* Lynx Point H Refresh */ |
116 | 116 | ||
117 | #define MEI_DEV_ID_WPT_LP 0x9CBA /* Wildcat Point LP */ | 117 | #define MEI_DEV_ID_WPT_LP 0x9CBA /* Wildcat Point LP */ |
118 | |||
119 | /* Host Firmware Status Registers in PCI Config Space */ | ||
120 | #define PCI_CFG_HFS_1 0x40 | ||
121 | #define PCI_CFG_HFS_2 0x48 | ||
122 | |||
118 | /* | 123 | /* |
119 | * MEI HW Section | 124 | * MEI HW Section |
120 | */ | 125 | */ |
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 29b5af8efb71..4e3cba6da3f5 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -455,8 +455,7 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list) | |||
455 | 455 | ||
456 | cl->status = 0; | 456 | cl->status = 0; |
457 | list_del(&cb->list); | 457 | list_del(&cb->list); |
458 | if (MEI_WRITING == cl->writing_state && | 458 | if (cb->fop_type == MEI_FOP_WRITE && |
459 | cb->fop_type == MEI_FOP_WRITE && | ||
460 | cl != &dev->iamthif_cl) { | 459 | cl != &dev->iamthif_cl) { |
461 | cl_dbg(dev, cl, "MEI WRITE COMPLETE\n"); | 460 | cl_dbg(dev, cl, "MEI WRITE COMPLETE\n"); |
462 | cl->writing_state = MEI_WRITE_COMPLETE; | 461 | cl->writing_state = MEI_WRITE_COMPLETE; |
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index b35594dbf52f..147413145c97 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -644,8 +644,7 @@ static unsigned int mei_poll(struct file *file, poll_table *wait) | |||
644 | goto out; | 644 | goto out; |
645 | } | 645 | } |
646 | 646 | ||
647 | if (MEI_WRITE_COMPLETE == cl->writing_state) | 647 | mask |= (POLLIN | POLLRDNORM); |
648 | mask |= (POLLIN | POLLRDNORM); | ||
649 | 648 | ||
650 | out: | 649 | out: |
651 | mutex_unlock(&dev->device_lock); | 650 | mutex_unlock(&dev->device_lock); |
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index 1c8fd3a3e135..95889e2e31ff 100644 --- a/drivers/misc/mei/pci-me.c +++ b/drivers/misc/mei/pci-me.c | |||
@@ -97,15 +97,31 @@ static bool mei_me_quirk_probe(struct pci_dev *pdev, | |||
97 | const struct pci_device_id *ent) | 97 | const struct pci_device_id *ent) |
98 | { | 98 | { |
99 | u32 reg; | 99 | u32 reg; |
100 | if (ent->device == MEI_DEV_ID_PBG_1) { | 100 | /* Cougar Point || Patsburg */ |
101 | pci_read_config_dword(pdev, 0x48, ®); | 101 | if (ent->device == MEI_DEV_ID_CPT_1 || |
102 | /* make sure that bit 9 is up and bit 10 is down */ | 102 | ent->device == MEI_DEV_ID_PBG_1) { |
103 | if ((reg & 0x600) == 0x200) { | 103 | pci_read_config_dword(pdev, PCI_CFG_HFS_2, ®); |
104 | dev_info(&pdev->dev, "Device doesn't have valid ME Interface\n"); | 104 | /* make sure that bit 9 (NM) is up and bit 10 (DM) is down */ |
105 | return false; | 105 | if ((reg & 0x600) == 0x200) |
106 | } | 106 | goto no_mei; |
107 | } | 107 | } |
108 | |||
109 | /* Lynx Point */ | ||
110 | if (ent->device == MEI_DEV_ID_LPT_H || | ||
111 | ent->device == MEI_DEV_ID_LPT_W || | ||
112 | ent->device == MEI_DEV_ID_LPT_HR) { | ||
113 | /* Read ME FW Status check for SPS Firmware */ | ||
114 | pci_read_config_dword(pdev, PCI_CFG_HFS_1, ®); | ||
115 | /* if bits [19:16] = 15, running SPS Firmware */ | ||
116 | if ((reg & 0xf0000) == 0xf0000) | ||
117 | goto no_mei; | ||
118 | } | ||
119 | |||
108 | return true; | 120 | return true; |
121 | |||
122 | no_mei: | ||
123 | dev_info(&pdev->dev, "Device doesn't have valid ME Interface\n"); | ||
124 | return false; | ||
109 | } | 125 | } |
110 | /** | 126 | /** |
111 | * mei_probe - Device Initialization Routine | 127 | * mei_probe - Device Initialization Routine |