mei: use non cached hcsr for interrupt enablement
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
adfba3220b
commit
9ea73ddd4f
|
@ -106,8 +106,9 @@ void mei_hcsr_set(struct mei_device *dev)
|
||||||
*/
|
*/
|
||||||
void mei_clear_interrupts(struct mei_device *dev)
|
void mei_clear_interrupts(struct mei_device *dev)
|
||||||
{
|
{
|
||||||
if ((dev->host_hw_state & H_IS) == H_IS)
|
u32 hcsr = mei_hcsr_read(dev);
|
||||||
mei_reg_write(dev, H_CSR, dev->host_hw_state);
|
if ((hcsr & H_IS) == H_IS)
|
||||||
|
mei_reg_write(dev, H_CSR, hcsr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,8 +118,10 @@ void mei_clear_interrupts(struct mei_device *dev)
|
||||||
*/
|
*/
|
||||||
void mei_enable_interrupts(struct mei_device *dev)
|
void mei_enable_interrupts(struct mei_device *dev)
|
||||||
{
|
{
|
||||||
dev->host_hw_state |= H_IE;
|
u32 hcsr = mei_hcsr_read(dev);
|
||||||
mei_hcsr_set(dev);
|
hcsr |= H_IE;
|
||||||
|
hcsr &= ~H_IS;
|
||||||
|
mei_reg_write(dev, H_CSR, hcsr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,8 +131,10 @@ void mei_enable_interrupts(struct mei_device *dev)
|
||||||
*/
|
*/
|
||||||
void mei_disable_interrupts(struct mei_device *dev)
|
void mei_disable_interrupts(struct mei_device *dev)
|
||||||
{
|
{
|
||||||
dev->host_hw_state &= ~H_IE;
|
u32 hcsr = mei_hcsr_read(dev);
|
||||||
mei_hcsr_set(dev);
|
hcsr &= ~H_IE;
|
||||||
|
hcsr &= ~H_IS;
|
||||||
|
mei_reg_write(dev, H_CSR, hcsr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -691,7 +691,6 @@ irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id)
|
||||||
/* initialize our complete list */
|
/* initialize our complete list */
|
||||||
mutex_lock(&dev->device_lock);
|
mutex_lock(&dev->device_lock);
|
||||||
mei_io_list_init(&complete_list);
|
mei_io_list_init(&complete_list);
|
||||||
dev->host_hw_state = mei_hcsr_read(dev);
|
|
||||||
|
|
||||||
/* Ack the interrupt here
|
/* Ack the interrupt here
|
||||||
* In case of MSI we don't go through the quick handler */
|
* In case of MSI we don't go through the quick handler */
|
||||||
|
@ -710,6 +709,7 @@ irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dev->host_hw_state = mei_hcsr_read(dev);
|
||||||
/* check if we need to start the dev */
|
/* check if we need to start the dev */
|
||||||
if ((dev->host_hw_state & H_RDY) == 0) {
|
if ((dev->host_hw_state & H_RDY) == 0) {
|
||||||
if ((dev->me_hw_state & ME_RDY_HRA) == ME_RDY_HRA) {
|
if ((dev->me_hw_state & ME_RDY_HRA) == ME_RDY_HRA) {
|
||||||
|
|
|
@ -915,8 +915,6 @@ static int mei_probe(struct pci_dev *pdev,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
release_irq:
|
release_irq:
|
||||||
/* disable interrupts */
|
|
||||||
dev->host_hw_state = mei_hcsr_read(dev);
|
|
||||||
mei_disable_interrupts(dev);
|
mei_disable_interrupts(dev);
|
||||||
flush_scheduled_work();
|
flush_scheduled_work();
|
||||||
free_irq(pdev->irq, dev);
|
free_irq(pdev->irq, dev);
|
||||||
|
|
Loading…
Reference in New Issue