diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-10-04 06:09:31 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-10-18 09:19:55 -0400 |
commit | 9c473fc33915ddb14b71a4929c838c22b20a24ce (patch) | |
tree | d361dea60572ae6417089e566518e1db940fbade /drivers/net/can | |
parent | beab675cb45f28a4a76780e43fd03e33bc773555 (diff) |
can: mcp251x: optimize 2515, rx int gets cleared automatically
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/mcp251x.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index 7f8aa4ce02c5..c664be261e98 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c | |||
@@ -793,15 +793,20 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id) | |||
793 | /* receive buffer 0 */ | 793 | /* receive buffer 0 */ |
794 | if (intf & CANINTF_RX0IF) { | 794 | if (intf & CANINTF_RX0IF) { |
795 | mcp251x_hw_rx(spi, 0); | 795 | mcp251x_hw_rx(spi, 0); |
796 | /* Free one buffer ASAP */ | 796 | /* |
797 | mcp251x_write_bits(spi, CANINTF, intf & CANINTF_RX0IF, | 797 | * Free one buffer ASAP |
798 | 0x00); | 798 | * (The MCP2515 does this automatically.) |
799 | */ | ||
800 | if (mcp251x_is_2510(spi)) | ||
801 | mcp251x_write_bits(spi, CANINTF, CANINTF_RX0IF, 0x00); | ||
799 | } | 802 | } |
800 | 803 | ||
801 | /* receive buffer 1 */ | 804 | /* receive buffer 1 */ |
802 | if (intf & CANINTF_RX1IF) { | 805 | if (intf & CANINTF_RX1IF) { |
803 | mcp251x_hw_rx(spi, 1); | 806 | mcp251x_hw_rx(spi, 1); |
804 | clear_intf |= CANINTF_RX1IF; | 807 | /* the MCP2515 does this automatically */ |
808 | if (mcp251x_is_2510(spi)) | ||
809 | clear_intf |= CANINTF_RX1IF; | ||
805 | } | 810 | } |
806 | 811 | ||
807 | /* any error or tx interrupt we need to clear? */ | 812 | /* any error or tx interrupt we need to clear? */ |