aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/mcp251x.c13
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? */