drivers: can: mcp2515: Fix interrupt bit tests for empty TX buffers

TX1 and TX2 buffer empty busy flags would have been cleared only for
TX0 empty interrupts and there would have been extra unwarranted
TX callbacks for TX1 and TX2 if the callbacks had previously been used.

Signed-off-by: Nick Ward <nick.ward@setec.com.au>
This commit is contained in:
Nick Ward 2019-08-02 00:38:31 +10:00 committed by Ioannis Glaropoulos
commit ea366e9aa3

View file

@ -461,11 +461,11 @@ static void mcp2515_handle_interrupts(struct device *dev)
mcp2515_tx_done(dev, 0); mcp2515_tx_done(dev, 0);
} }
if (canintf & MCP2515_CANINTF_TX0IF) { if (canintf & MCP2515_CANINTF_TX1IF) {
mcp2515_tx_done(dev, 1); mcp2515_tx_done(dev, 1);
} }
if (canintf & MCP2515_CANINTF_TX0IF) { if (canintf & MCP2515_CANINTF_TX2IF) {
mcp2515_tx_done(dev, 2); mcp2515_tx_done(dev, 2);
} }