This patch adds the support for initialization of the counters
tx->head and tx->tail properly.
Signed-off-by: Mousumi Jana <mousumij@xilinx.com>
Reviewed-by: Kedareswara Rao appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
priv->read_reg(priv, XCAN_SR_OFFSET));
priv->can.state = CAN_STATE_ERROR_ACTIVE;
+ priv->tx_head = 0;
+ priv->tx_tail = 0;
+
return 0;
}
}
priv->reg_base = addr;
priv->tx_max = tx_max;
+ priv->tx_head = 0;
+ priv->tx_tail = 0;
/* Get IRQ for the device */
ndev->irq = platform_get_irq(pdev, 0);