diff options
Diffstat (limited to 'drivers/net/can/ti_hecc.c')
-rw-r--r-- | drivers/net/can/ti_hecc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index f7bbde9eb2cb..2adc294f512a 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/skbuff.h> | 46 | #include <linux/skbuff.h> |
47 | #include <linux/platform_device.h> | 47 | #include <linux/platform_device.h> |
48 | #include <linux/clk.h> | 48 | #include <linux/clk.h> |
49 | #include <linux/io.h> | ||
49 | 50 | ||
50 | #include <linux/can/dev.h> | 51 | #include <linux/can/dev.h> |
51 | #include <linux/can/error.h> | 52 | #include <linux/can/error.h> |
@@ -503,9 +504,9 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
503 | spin_unlock_irqrestore(&priv->mbx_lock, flags); | 504 | spin_unlock_irqrestore(&priv->mbx_lock, flags); |
504 | 505 | ||
505 | /* Prepare mailbox for transmission */ | 506 | /* Prepare mailbox for transmission */ |
507 | data = cf->can_dlc | (get_tx_head_prio(priv) << 8); | ||
506 | if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ | 508 | if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ |
507 | data |= HECC_CANMCF_RTR; | 509 | data |= HECC_CANMCF_RTR; |
508 | data |= get_tx_head_prio(priv) << 8; | ||
509 | hecc_write_mbx(priv, mbxno, HECC_CANMCF, data); | 510 | hecc_write_mbx(priv, mbxno, HECC_CANMCF, data); |
510 | 511 | ||
511 | if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */ | 512 | if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */ |
@@ -923,6 +924,7 @@ static int ti_hecc_probe(struct platform_device *pdev) | |||
923 | priv->can.do_get_state = ti_hecc_get_state; | 924 | priv->can.do_get_state = ti_hecc_get_state; |
924 | priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES; | 925 | priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES; |
925 | 926 | ||
927 | spin_lock_init(&priv->mbx_lock); | ||
926 | ndev->irq = irq->start; | 928 | ndev->irq = irq->start; |
927 | ndev->flags |= IFF_ECHO; | 929 | ndev->flags |= IFF_ECHO; |
928 | platform_set_drvdata(pdev, ndev); | 930 | platform_set_drvdata(pdev, ndev); |