Commit f8fc0c9a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'char-misc-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/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
parents a1821f77 49fbd3f1
...@@ -835,7 +835,7 @@ static int _mei_irq_thread_read(struct mei_device *dev, s32 *slots, ...@@ -835,7 +835,7 @@ static int _mei_irq_thread_read(struct mei_device *dev, s32 *slots,
struct mei_cl *cl, struct mei_cl *cl,
struct mei_io_list *cmpl_list) 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))) { sizeof(struct hbm_flow_control))) {
/* return the cancel routine */ /* return the cancel routine */
list_del(&cb_pos->cb_list); list_del(&cb_pos->cb_list);
......
...@@ -982,7 +982,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, ...@@ -982,7 +982,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
err = request_threaded_irq(pdev->irq, err = request_threaded_irq(pdev->irq,
NULL, NULL,
mei_interrupt_thread_handler, mei_interrupt_thread_handler,
0, mei_driver_name, dev); IRQF_ONESHOT, mei_driver_name, dev);
else else
err = request_threaded_irq(pdev->irq, err = request_threaded_irq(pdev->irq,
mei_interrupt_quick_handler, mei_interrupt_quick_handler,
...@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, ...@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
if (err) { if (err) {
dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
pdev->irq); pdev->irq);
goto unmap_memory; goto disable_msi;
} }
INIT_DELAYED_WORK(&dev->timer_work, mei_timer); INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
if (mei_hw_init(dev)) { if (mei_hw_init(dev)) {
...@@ -1023,8 +1023,8 @@ static int __devinit mei_probe(struct pci_dev *pdev, ...@@ -1023,8 +1023,8 @@ static int __devinit mei_probe(struct pci_dev *pdev,
mei_disable_interrupts(dev); mei_disable_interrupts(dev);
flush_scheduled_work(); flush_scheduled_work();
free_irq(pdev->irq, dev); free_irq(pdev->irq, dev);
disable_msi:
pci_disable_msi(pdev); pci_disable_msi(pdev);
unmap_memory:
pci_iounmap(pdev, dev->mem_addr); pci_iounmap(pdev, dev->mem_addr);
free_device: free_device:
kfree(dev); kfree(dev);
...@@ -1101,6 +1101,8 @@ static void __devexit mei_remove(struct pci_dev *pdev) ...@@ -1101,6 +1101,8 @@ static void __devexit mei_remove(struct pci_dev *pdev)
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
misc_deregister(&mei_misc_device);
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int mei_pci_suspend(struct device *device) static int mei_pci_suspend(struct device *device)
...@@ -1216,7 +1218,6 @@ module_init(mei_init_module); ...@@ -1216,7 +1218,6 @@ module_init(mei_init_module);
*/ */
static void __exit mei_exit_module(void) static void __exit mei_exit_module(void)
{ {
misc_deregister(&mei_misc_device);
pci_unregister_driver(&mei_driver); pci_unregister_driver(&mei_driver);
pr_debug("unloaded successfully.\n"); pr_debug("unloaded successfully.\n");
......
...@@ -341,7 +341,7 @@ static const struct watchdog_ops wd_ops = { ...@@ -341,7 +341,7 @@ static const struct watchdog_ops wd_ops = {
}; };
static const struct watchdog_info wd_info = { static const struct watchdog_info wd_info = {
.identity = INTEL_AMT_WATCHDOG_ID, .identity = INTEL_AMT_WATCHDOG_ID,
.options = WDIOF_KEEPALIVEPING, .options = WDIOF_KEEPALIVEPING | WDIOF_ALARMONLY,
}; };
static struct watchdog_device amt_wd_dev = { static struct watchdog_device amt_wd_dev = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment