diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 03:25:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 18:27:10 -0400 |
commit | 8688cfcebf09b84385b5e2c461ae08fcde8a5d18 (patch) | |
tree | f0546182c06db34c271ba9a81b50e2e24afafb7b /drivers | |
parent | 479ceddd7baf3b387665c4d69a7398918b201ad0 (diff) |
[PATCH] lockdep: annotate forcedeth.c disable_irq()
nv_do_nic_poll() is called from timer softirqs, which has interrupts enabled,
but np->lock might also be taken by some other interrupt context.
The driver does disable_irq() to get around this problem, so annotate the
disable_irq()/enable_irq() calls for lockdep.
Has no effect on non-lockdep kernels.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/forcedeth.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 92740c66635d..037d870712ff 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2735,21 +2735,21 @@ static void nv_do_nic_poll(unsigned long data) | |||
2735 | 2735 | ||
2736 | if (!using_multi_irqs(dev)) { | 2736 | if (!using_multi_irqs(dev)) { |
2737 | if (np->msi_flags & NV_MSI_X_ENABLED) | 2737 | if (np->msi_flags & NV_MSI_X_ENABLED) |
2738 | disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); | 2738 | disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); |
2739 | else | 2739 | else |
2740 | disable_irq(dev->irq); | 2740 | disable_irq_lockdep(dev->irq); |
2741 | mask = np->irqmask; | 2741 | mask = np->irqmask; |
2742 | } else { | 2742 | } else { |
2743 | if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { | 2743 | if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { |
2744 | disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); | 2744 | disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); |
2745 | mask |= NVREG_IRQ_RX_ALL; | 2745 | mask |= NVREG_IRQ_RX_ALL; |
2746 | } | 2746 | } |
2747 | if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { | 2747 | if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { |
2748 | disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); | 2748 | disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); |
2749 | mask |= NVREG_IRQ_TX_ALL; | 2749 | mask |= NVREG_IRQ_TX_ALL; |
2750 | } | 2750 | } |
2751 | if (np->nic_poll_irq & NVREG_IRQ_OTHER) { | 2751 | if (np->nic_poll_irq & NVREG_IRQ_OTHER) { |
2752 | disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); | 2752 | disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); |
2753 | mask |= NVREG_IRQ_OTHER; | 2753 | mask |= NVREG_IRQ_OTHER; |
2754 | } | 2754 | } |
2755 | } | 2755 | } |
@@ -2763,21 +2763,21 @@ static void nv_do_nic_poll(unsigned long data) | |||
2763 | if (!using_multi_irqs(dev)) { | 2763 | if (!using_multi_irqs(dev)) { |
2764 | nv_nic_irq(0, dev, NULL); | 2764 | nv_nic_irq(0, dev, NULL); |
2765 | if (np->msi_flags & NV_MSI_X_ENABLED) | 2765 | if (np->msi_flags & NV_MSI_X_ENABLED) |
2766 | enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); | 2766 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); |
2767 | else | 2767 | else |
2768 | enable_irq(dev->irq); | 2768 | enable_irq_lockdep(dev->irq); |
2769 | } else { | 2769 | } else { |
2770 | if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { | 2770 | if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { |
2771 | nv_nic_irq_rx(0, dev, NULL); | 2771 | nv_nic_irq_rx(0, dev, NULL); |
2772 | enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); | 2772 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); |
2773 | } | 2773 | } |
2774 | if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { | 2774 | if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { |
2775 | nv_nic_irq_tx(0, dev, NULL); | 2775 | nv_nic_irq_tx(0, dev, NULL); |
2776 | enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); | 2776 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); |
2777 | } | 2777 | } |
2778 | if (np->nic_poll_irq & NVREG_IRQ_OTHER) { | 2778 | if (np->nic_poll_irq & NVREG_IRQ_OTHER) { |
2779 | nv_nic_irq_other(0, dev, NULL); | 2779 | nv_nic_irq_other(0, dev, NULL); |
2780 | enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); | 2780 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); |
2781 | } | 2781 | } |
2782 | } | 2782 | } |
2783 | } | 2783 | } |