Skip to content

Commit

Permalink
Merge tag 'char-misc-3.5-rc4' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/gregkh/char-misc

Pull misc tree updates from Greg Kroah-Hartman:
 "Here are some drivers/misc bugfixes (really just drivers/misc/mei/
  fixes) for a few problems that have been reported.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'char-misc-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  misc: mei: set WDIOF_ALARMONLY on mei watchdog
  misc: mei: Disable MSI when IRQ registration fails
  misc: mei: fix stalled read
  misc: mei: unregister misc device in pci_remove function
  misc: mei: set IRQF_ONESHOT for msi request_threaded_irq
  • Loading branch information
Linus Torvalds committed Jun 20, 2012
2 parents a1821f7 + 49fbd3f commit f8fc0c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/misc/mei/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ static int _mei_irq_thread_read(struct mei_device *dev, s32 *slots,
struct mei_cl *cl,
struct mei_io_list *cmpl_list)
{
if ((*slots * sizeof(u32)) >= (sizeof(struct mei_msg_hdr) +
if ((*slots * sizeof(u32)) < (sizeof(struct mei_msg_hdr) +
sizeof(struct hbm_flow_control))) {
/* return the cancel routine */
list_del(&cb_pos->cb_list);
Expand Down
9 changes: 5 additions & 4 deletions drivers/misc/mei/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
err = request_threaded_irq(pdev->irq,
NULL,
mei_interrupt_thread_handler,
0, mei_driver_name, dev);
IRQF_ONESHOT, mei_driver_name, dev);
else
err = request_threaded_irq(pdev->irq,
mei_interrupt_quick_handler,
Expand All @@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
if (err) {
dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
pdev->irq);
goto unmap_memory;
goto disable_msi;
}
INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
if (mei_hw_init(dev)) {
Expand Down Expand Up @@ -1023,8 +1023,8 @@ static int __devinit mei_probe(struct pci_dev *pdev,
mei_disable_interrupts(dev);
flush_scheduled_work();
free_irq(pdev->irq, dev);
disable_msi:
pci_disable_msi(pdev);
unmap_memory:
pci_iounmap(pdev, dev->mem_addr);
free_device:
kfree(dev);
Expand Down Expand Up @@ -1101,6 +1101,8 @@ static void __devexit mei_remove(struct pci_dev *pdev)

pci_release_regions(pdev);
pci_disable_device(pdev);

misc_deregister(&mei_misc_device);
}
#ifdef CONFIG_PM
static int mei_pci_suspend(struct device *device)
Expand Down Expand Up @@ -1216,7 +1218,6 @@ module_init(mei_init_module);
*/
static void __exit mei_exit_module(void)
{
misc_deregister(&mei_misc_device);
pci_unregister_driver(&mei_driver);

pr_debug("unloaded successfully.\n");
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mei/wd.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ static const struct watchdog_ops wd_ops = {
};
static const struct watchdog_info wd_info = {
.identity = INTEL_AMT_WATCHDOG_ID,
.options = WDIOF_KEEPALIVEPING,
.options = WDIOF_KEEPALIVEPING | WDIOF_ALARMONLY,
};

static struct watchdog_device amt_wd_dev = {
Expand Down

0 comments on commit f8fc0c9

Please sign in to comment.