diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-11-30 02:25:05 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-12-13 14:39:14 -0500 |
commit | 2dd5bed59356e03610bebe1a37c397788df50b9b (patch) | |
tree | c1d069389a923d3b33ead320003e39d19ee86975 /drivers/firewire | |
parent | 5b06db166c4d38638980283505259fa165d4f369 (diff) |
firewire: ohci: optimize iso context checks in the interrupt handler
When the isochRx/isochTx bit is clear, we do not need to read the
corresponding iso interrupt event register.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/ohci.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 29259f3a30bb..01b3bc9154a6 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -1813,22 +1813,28 @@ static irqreturn_t irq_handler(int irq, void *data) | |||
1813 | if (event & OHCI1394_respTxComplete) | 1813 | if (event & OHCI1394_respTxComplete) |
1814 | tasklet_schedule(&ohci->at_response_ctx.tasklet); | 1814 | tasklet_schedule(&ohci->at_response_ctx.tasklet); |
1815 | 1815 | ||
1816 | iso_event = reg_read(ohci, OHCI1394_IsoRecvIntEventClear); | 1816 | if (event & OHCI1394_isochRx) { |
1817 | reg_write(ohci, OHCI1394_IsoRecvIntEventClear, iso_event); | 1817 | iso_event = reg_read(ohci, OHCI1394_IsoRecvIntEventClear); |
1818 | 1818 | reg_write(ohci, OHCI1394_IsoRecvIntEventClear, iso_event); | |
1819 | while (iso_event) { | 1819 | |
1820 | i = ffs(iso_event) - 1; | 1820 | while (iso_event) { |
1821 | tasklet_schedule(&ohci->ir_context_list[i].context.tasklet); | 1821 | i = ffs(iso_event) - 1; |
1822 | iso_event &= ~(1 << i); | 1822 | tasklet_schedule( |
1823 | &ohci->ir_context_list[i].context.tasklet); | ||
1824 | iso_event &= ~(1 << i); | ||
1825 | } | ||
1823 | } | 1826 | } |
1824 | 1827 | ||
1825 | iso_event = reg_read(ohci, OHCI1394_IsoXmitIntEventClear); | 1828 | if (event & OHCI1394_isochTx) { |
1826 | reg_write(ohci, OHCI1394_IsoXmitIntEventClear, iso_event); | 1829 | iso_event = reg_read(ohci, OHCI1394_IsoXmitIntEventClear); |
1830 | reg_write(ohci, OHCI1394_IsoXmitIntEventClear, iso_event); | ||
1827 | 1831 | ||
1828 | while (iso_event) { | 1832 | while (iso_event) { |
1829 | i = ffs(iso_event) - 1; | 1833 | i = ffs(iso_event) - 1; |
1830 | tasklet_schedule(&ohci->it_context_list[i].context.tasklet); | 1834 | tasklet_schedule( |
1831 | iso_event &= ~(1 << i); | 1835 | &ohci->it_context_list[i].context.tasklet); |
1836 | iso_event &= ~(1 << i); | ||
1837 | } | ||
1832 | } | 1838 | } |
1833 | 1839 | ||
1834 | if (unlikely(event & OHCI1394_regAccessFail)) | 1840 | if (unlikely(event & OHCI1394_regAccessFail)) |