Commit 2dd5bed59356e03610bebe1a37c397788df50b9b
Committed by
Stefan Richter
1 parent
5b06db166c
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 19 additions and 13 deletions Side-by-side Diff
drivers/firewire/ohci.c
... | ... | @@ -1813,22 +1813,28 @@ |
1813 | 1813 | if (event & OHCI1394_respTxComplete) |
1814 | 1814 | tasklet_schedule(&ohci->at_response_ctx.tasklet); |
1815 | 1815 | |
1816 | - iso_event = reg_read(ohci, OHCI1394_IsoRecvIntEventClear); | |
1817 | - reg_write(ohci, OHCI1394_IsoRecvIntEventClear, iso_event); | |
1816 | + if (event & OHCI1394_isochRx) { | |
1817 | + iso_event = reg_read(ohci, OHCI1394_IsoRecvIntEventClear); | |
1818 | + reg_write(ohci, OHCI1394_IsoRecvIntEventClear, iso_event); | |
1818 | 1819 | |
1819 | - while (iso_event) { | |
1820 | - i = ffs(iso_event) - 1; | |
1821 | - tasklet_schedule(&ohci->ir_context_list[i].context.tasklet); | |
1822 | - iso_event &= ~(1 << i); | |
1820 | + while (iso_event) { | |
1821 | + i = ffs(iso_event) - 1; | |
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); | |
1826 | - reg_write(ohci, OHCI1394_IsoXmitIntEventClear, iso_event); | |
1828 | + if (event & OHCI1394_isochTx) { | |
1829 | + iso_event = reg_read(ohci, OHCI1394_IsoXmitIntEventClear); | |
1830 | + reg_write(ohci, OHCI1394_IsoXmitIntEventClear, iso_event); | |
1827 | 1831 | |
1828 | - while (iso_event) { | |
1829 | - i = ffs(iso_event) - 1; | |
1830 | - tasklet_schedule(&ohci->it_context_list[i].context.tasklet); | |
1831 | - iso_event &= ~(1 << i); | |
1832 | + while (iso_event) { | |
1833 | + i = ffs(iso_event) - 1; | |
1834 | + tasklet_schedule( | |
1835 | + &ohci->it_context_list[i].context.tasklet); | |
1836 | + iso_event &= ~(1 << i); | |
1837 | + } | |
1832 | 1838 | } |
1833 | 1839 | |
1834 | 1840 | if (unlikely(event & OHCI1394_regAccessFail)) |