Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351688
b: refs/heads/master
c: d7ff5aa
h: refs/heads/master
v: v3
  • Loading branch information
Fabio Baltieri authored and Marc Kleine-Budde committed Jan 26, 2013
1 parent dc85079 commit a5d9adc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4723f2b8a12b6170e1835082d8c73fa932306846
refs/heads/master: d7ff5aae6ce3670afc1e000c08ea238712d70fae
10 changes: 10 additions & 0 deletions trunk/drivers/net/can/ti_hecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/led.h>
#include <linux/can/platform/ti_hecc.h>

#define DRV_NAME "ti_hecc"
Expand Down Expand Up @@ -593,6 +594,7 @@ static int ti_hecc_rx_pkt(struct ti_hecc_priv *priv, int mbxno)
spin_unlock_irqrestore(&priv->mbx_lock, flags);

stats->rx_bytes += cf->can_dlc;
can_led_event(priv->ndev, CAN_LED_EVENT_RX);
netif_receive_skb(skb);
stats->rx_packets++;

Expand Down Expand Up @@ -796,6 +798,7 @@ static irqreturn_t ti_hecc_interrupt(int irq, void *dev_id)
stats->tx_bytes += hecc_read_mbx(priv, mbxno,
HECC_CANMCF) & 0xF;
stats->tx_packets++;
can_led_event(ndev, CAN_LED_EVENT_TX);
can_get_echo_skb(ndev, mbxno);
--priv->tx_tail;
}
Expand Down Expand Up @@ -851,6 +854,8 @@ static int ti_hecc_open(struct net_device *ndev)
return err;
}

can_led_event(ndev, CAN_LED_EVENT_OPEN);

ti_hecc_start(ndev);
napi_enable(&priv->napi);
netif_start_queue(ndev);
Expand All @@ -869,6 +874,8 @@ static int ti_hecc_close(struct net_device *ndev)
close_candev(ndev);
ti_hecc_transceiver_switch(priv, 0);

can_led_event(ndev, CAN_LED_EVENT_STOP);

return 0;
}

Expand Down Expand Up @@ -961,6 +968,9 @@ static int ti_hecc_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "register_candev() failed\n");
goto probe_exit_clk;
}

devm_can_led_init(ndev);

dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%u)\n",
priv->base, (u32) ndev->irq);

Expand Down

0 comments on commit a5d9adc

Please sign in to comment.