Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351686
b: refs/heads/master
c: adccadb
h: refs/heads/master
v: v3
  • Loading branch information
Fabio Baltieri authored and Marc Kleine-Budde committed Jan 26, 2013
1 parent c042e9d commit 93ce5fb
Show file tree
Hide file tree
Showing 2 changed files with 12 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: a1ef7bd9fce8aba8e4701e60208148fb3bc9bdd4
refs/heads/master: adccadb92f0571fd0f9b2ac8011057a7de9e3e63
11 changes: 11 additions & 0 deletions trunk/drivers/net/can/flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/led.h>
#include <linux/can/platform/flexcan.h>
#include <linux/clk.h>
#include <linux/delay.h>
Expand Down Expand Up @@ -564,6 +565,8 @@ static int flexcan_read_frame(struct net_device *dev)
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;

can_led_event(dev, CAN_LED_EVENT_RX);

return 1;
}

Expand Down Expand Up @@ -652,6 +655,7 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
if (reg_iflag1 & (1 << FLEXCAN_TX_BUF_ID)) {
stats->tx_bytes += can_get_echo_skb(dev, 0);
stats->tx_packets++;
can_led_event(dev, CAN_LED_EVENT_TX);
flexcan_write((1 << FLEXCAN_TX_BUF_ID), &regs->iflag1);
netif_wake_queue(dev);
}
Expand Down Expand Up @@ -865,6 +869,9 @@ static int flexcan_open(struct net_device *dev)
err = flexcan_chip_start(dev);
if (err)
goto out_close;

can_led_event(dev, CAN_LED_EVENT_OPEN);

napi_enable(&priv->napi);
netif_start_queue(dev);

Expand Down Expand Up @@ -893,6 +900,8 @@ static int flexcan_close(struct net_device *dev)

close_candev(dev);

can_led_event(dev, CAN_LED_EVENT_STOP);

return 0;
}

Expand Down Expand Up @@ -1092,6 +1101,8 @@ static int flexcan_probe(struct platform_device *pdev)
goto failed_register;
}

devm_can_led_init(dev);

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

Expand Down

0 comments on commit 93ce5fb

Please sign in to comment.