diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-20 18:13:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-20 18:13:56 -0400 |
commit | f8fc0c9a5f7f4f5a3d2e7dd58147e30053cc5dd8 (patch) | |
tree | 92244b2aabeefcbf791205ff6bfe213c9b5c9d5f /drivers | |
parent | a1821f774d4600727edf71005f259a9fdb73981e (diff) | |
parent | 49fbd3f1c3a67b99c053600a1cd7e5d0be48bed6 (diff) |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/mei/interrupt.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/main.c | 9 | ||||
-rw-r--r-- | drivers/misc/mei/wd.c | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 93936f1b75eb..23f5463d4cae 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -835,7 +835,7 @@ static int _mei_irq_thread_read(struct mei_device *dev, s32 *slots, | |||
835 | struct mei_cl *cl, | 835 | struct mei_cl *cl, |
836 | struct mei_io_list *cmpl_list) | 836 | struct mei_io_list *cmpl_list) |
837 | { | 837 | { |
838 | if ((*slots * sizeof(u32)) >= (sizeof(struct mei_msg_hdr) + | 838 | if ((*slots * sizeof(u32)) < (sizeof(struct mei_msg_hdr) + |
839 | sizeof(struct hbm_flow_control))) { | 839 | sizeof(struct hbm_flow_control))) { |
840 | /* return the cancel routine */ | 840 | /* return the cancel routine */ |
841 | list_del(&cb_pos->cb_list); | 841 | list_del(&cb_pos->cb_list); |
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index c70333228337..7de13891e49e 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -982,7 +982,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, | |||
982 | err = request_threaded_irq(pdev->irq, | 982 | err = request_threaded_irq(pdev->irq, |
983 | NULL, | 983 | NULL, |
984 | mei_interrupt_thread_handler, | 984 | mei_interrupt_thread_handler, |
985 | 0, mei_driver_name, dev); | 985 | IRQF_ONESHOT, mei_driver_name, dev); |
986 | else | 986 | else |
987 | err = request_threaded_irq(pdev->irq, | 987 | err = request_threaded_irq(pdev->irq, |
988 | mei_interrupt_quick_handler, | 988 | mei_interrupt_quick_handler, |
@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, | |||
992 | if (err) { | 992 | if (err) { |
993 | dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", | 993 | dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", |
994 | pdev->irq); | 994 | pdev->irq); |
995 | goto unmap_memory; | 995 | goto disable_msi; |
996 | } | 996 | } |
997 | INIT_DELAYED_WORK(&dev->timer_work, mei_timer); | 997 | INIT_DELAYED_WORK(&dev->timer_work, mei_timer); |
998 | if (mei_hw_init(dev)) { | 998 | if (mei_hw_init(dev)) { |
@@ -1023,8 +1023,8 @@ release_irq: | |||
1023 | mei_disable_interrupts(dev); | 1023 | mei_disable_interrupts(dev); |
1024 | flush_scheduled_work(); | 1024 | flush_scheduled_work(); |
1025 | free_irq(pdev->irq, dev); | 1025 | free_irq(pdev->irq, dev); |
1026 | disable_msi: | ||
1026 | pci_disable_msi(pdev); | 1027 | pci_disable_msi(pdev); |
1027 | unmap_memory: | ||
1028 | pci_iounmap(pdev, dev->mem_addr); | 1028 | pci_iounmap(pdev, dev->mem_addr); |
1029 | free_device: | 1029 | free_device: |
1030 | kfree(dev); | 1030 | kfree(dev); |
@@ -1101,6 +1101,8 @@ static void __devexit mei_remove(struct pci_dev *pdev) | |||
1101 | 1101 | ||
1102 | pci_release_regions(pdev); | 1102 | pci_release_regions(pdev); |
1103 | pci_disable_device(pdev); | 1103 | pci_disable_device(pdev); |
1104 | |||
1105 | misc_deregister(&mei_misc_device); | ||
1104 | } | 1106 | } |
1105 | #ifdef CONFIG_PM | 1107 | #ifdef CONFIG_PM |
1106 | static int mei_pci_suspend(struct device *device) | 1108 | static int mei_pci_suspend(struct device *device) |
@@ -1216,7 +1218,6 @@ module_init(mei_init_module); | |||
1216 | */ | 1218 | */ |
1217 | static void __exit mei_exit_module(void) | 1219 | static void __exit mei_exit_module(void) |
1218 | { | 1220 | { |
1219 | misc_deregister(&mei_misc_device); | ||
1220 | pci_unregister_driver(&mei_driver); | 1221 | pci_unregister_driver(&mei_driver); |
1221 | 1222 | ||
1222 | pr_debug("unloaded successfully.\n"); | 1223 | pr_debug("unloaded successfully.\n"); |
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index 6be5605707b4..e2ec0505eb5c 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c | |||
@@ -341,7 +341,7 @@ static const struct watchdog_ops wd_ops = { | |||
341 | }; | 341 | }; |
342 | static const struct watchdog_info wd_info = { | 342 | static const struct watchdog_info wd_info = { |
343 | .identity = INTEL_AMT_WATCHDOG_ID, | 343 | .identity = INTEL_AMT_WATCHDOG_ID, |
344 | .options = WDIOF_KEEPALIVEPING, | 344 | .options = WDIOF_KEEPALIVEPING | WDIOF_ALARMONLY, |
345 | }; | 345 | }; |
346 | 346 | ||
347 | static struct watchdog_device amt_wd_dev = { | 347 | static struct watchdog_device amt_wd_dev = { |