aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/sja1000
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-20 21:58:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-20 21:58:50 -0500
commita0b1c42951dd06ec83cc1bc2c9788131d9fefcd8 (patch)
treea572f1523cf904c93020c9cdb32f3bc84ec3ac16 /drivers/net/can/sja1000
parent8ec4942212a6d337982967778a3dc3b60aea782e (diff)
parentecd9883724b78cc72ed92c98bcb1a46c764fff21 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking update from David Miller: 1) Checkpoint/restarted TCP sockets now can properly propagate the TCP timestamp offset. From Andrey Vagin. 2) VMWARE VM VSOCK layer, from Andy King. 3) Much improved support for virtual functions and SR-IOV in bnx2x, from Ariel ELior. 4) All protocols on ipv4 and ipv6 are now network namespace aware, and all the compatability checks for initial-namespace-only protocols is removed. Thanks to Tom Parkin for helping deal with the last major holdout, L2TP. 5) IPV6 support in netpoll and network namespace support in pktgen, from Cong Wang. 6) Multiple Registration Protocol (MRP) and Multiple VLAN Registration Protocol (MVRP) support, from David Ward. 7) Compute packet lengths more accurately in the packet scheduler, from Eric Dumazet. 8) Use per-task page fragment allocator in skb_append_datato_frags(), also from Eric Dumazet. 9) Add support for connection tracking labels in netfilter, from Florian Westphal. 10) Fix default multicast group joining on ipv6, and add anti-spoofing checks to 6to4 and 6rd. From Hannes Frederic Sowa. 11) Make ipv4/ipv6 fragmentation memory limits more reasonable in modern times, rearrange inet frag datastructures for better cacheline locality, and move more operations outside of locking. From Jesper Dangaard Brouer. 12) Instead of strict master <--> slave relationships, allow arbitrary scenerios with "upper device lists". From Jiri Pirko. 13) Improve rate limiting accuracy in TBF and act_police, also from Jiri Pirko. 14) Add a BPF filter netfilter match target, from Willem de Bruijn. 15) Orphan and delete a bunch of pre-historic networking drivers from Paul Gortmaker. 16) Add TSO support for GRE tunnels, from Pravin B SHelar. Although this still needs some minor bug fixing before it's %100 correct in all cases. 17) Handle unresolved IPSEC states like ARP, with a resolution packet queue. From Steffen Klassert. 18) Remove TCP Appropriate Byte Count support (ABC), from Stephen Hemminger. This was long overdue. 19) Support SO_REUSEPORT, from Tom Herbert. 20) Allow locking a socket BPF filter, so that it cannot change after a process drops capabilities. 21) Add VLAN filtering to bridge, from Vlad Yasevich. 22) Bring ipv6 on-par with ipv4 and do not cache neighbour entries in the ipv6 routes, from YOSHIFUJI Hideaki. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1538 commits) ipv6: fix race condition regarding dst->expires and dst->from. net: fix a wrong assignment in skb_split() ip_gre: remove an extra dst_release() ppp: set qdisc_tx_busylock to avoid LOCKDEP splat atl1c: restore buffer state net: fix a build failure when !CONFIG_PROC_FS net: ipv4: fix waring -Wunused-variable net: proc: fix build failed when procfs is not configured Revert "xen: netback: remove redundant xenvif_put" net: move procfs code to net/core/net-procfs.c qmi_wwan, cdc-ether: add ADU960S bonding: set sysfs device_type to 'bond' bonding: fix bond_release_all inconsistencies b44: use netdev_alloc_skb_ip_align() xen: netback: remove redundant xenvif_put net: fec: Do a sanity check on the gpio number ip_gre: propogate target device GSO capability to the tunnel device ip_gre: allow CSUM capable devices to handle packets bonding: Fix initialize after use for 3ad machine state spinlock bonding: Fix race condition between bond_enslave() and bond_3ad_update_lacp_rate() ...
Diffstat (limited to 'drivers/net/can/sja1000')
-rw-r--r--drivers/net/can/sja1000/Kconfig14
-rw-r--r--drivers/net/can/sja1000/ems_pci.c1
-rw-r--r--drivers/net/can/sja1000/peak_pci.c5
-rw-r--r--drivers/net/can/sja1000/peak_pcmcia.c1
-rw-r--r--drivers/net/can/sja1000/plx_pci.c1
-rw-r--r--drivers/net/can/sja1000/sja1000.c17
6 files changed, 24 insertions, 15 deletions
diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
index 92f73c708a3d..b39ca5b3ea7f 100644
--- a/drivers/net/can/sja1000/Kconfig
+++ b/drivers/net/can/sja1000/Kconfig
@@ -1,6 +1,6 @@
1menuconfig CAN_SJA1000 1menuconfig CAN_SJA1000
2 tristate "Philips/NXP SJA1000 devices" 2 tristate "Philips/NXP SJA1000 devices"
3 depends on CAN_DEV && HAS_IOMEM 3 depends on HAS_IOMEM
4 4
5if CAN_SJA1000 5if CAN_SJA1000
6 6
@@ -99,11 +99,11 @@ config CAN_TSCAN1
99 tristate "TS-CAN1 PC104 boards" 99 tristate "TS-CAN1 PC104 boards"
100 depends on ISA 100 depends on ISA
101 help 101 help
102 This driver is for Technologic Systems' TSCAN-1 PC104 boards. 102 This driver is for Technologic Systems' TSCAN-1 PC104 boards.
103 http://www.embeddedarm.com/products/board-detail.php?product=TS-CAN1 103 http://www.embeddedarm.com/products/board-detail.php?product=TS-CAN1
104 The driver supports multiple boards and automatically configures them: 104 The driver supports multiple boards and automatically configures them:
105 PLD IO base addresses are read from jumpers JP1 and JP2, 105 PLD IO base addresses are read from jumpers JP1 and JP2,
106 IRQ numbers are read from jumpers JP4 and JP5, 106 IRQ numbers are read from jumpers JP4 and JP5,
107 SJA1000 IO base addresses are chosen heuristically (first that works). 107 SJA1000 IO base addresses are chosen heuristically (first that works).
108 108
109endif 109endif
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
index 036a326836b2..36d298da2af6 100644
--- a/drivers/net/can/sja1000/ems_pci.c
+++ b/drivers/net/can/sja1000/ems_pci.c
@@ -238,7 +238,6 @@ static int ems_pci_add_card(struct pci_dev *pdev,
238 /* Allocating card structures to hold addresses, ... */ 238 /* Allocating card structures to hold addresses, ... */
239 card = kzalloc(sizeof(struct ems_pci_card), GFP_KERNEL); 239 card = kzalloc(sizeof(struct ems_pci_card), GFP_KERNEL);
240 if (card == NULL) { 240 if (card == NULL) {
241 dev_err(&pdev->dev, "Unable to allocate memory\n");
242 pci_disable_device(pdev); 241 pci_disable_device(pdev);
243 return -ENOMEM; 242 return -ENOMEM;
244 } 243 }
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
index 600ac7226e5c..d1e7f1006ddd 100644
--- a/drivers/net/can/sja1000/peak_pci.c
+++ b/drivers/net/can/sja1000/peak_pci.c
@@ -450,11 +450,8 @@ static int peak_pciec_probe(struct pci_dev *pdev, struct net_device *dev)
450 } else { 450 } else {
451 /* create the bit banging I2C adapter structure */ 451 /* create the bit banging I2C adapter structure */
452 card = kzalloc(sizeof(struct peak_pciec_card), GFP_KERNEL); 452 card = kzalloc(sizeof(struct peak_pciec_card), GFP_KERNEL);
453 if (!card) { 453 if (!card)
454 dev_err(&pdev->dev,
455 "failed allocating memory for i2c chip\n");
456 return -ENOMEM; 454 return -ENOMEM;
457 }
458 455
459 card->cfg_base = chan->cfg_base; 456 card->cfg_base = chan->cfg_base;
460 card->reg_base = priv->reg_base; 457 card->reg_base = priv->reg_base;
diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c
index f1175142b0a0..1a7020ba37f5 100644
--- a/drivers/net/can/sja1000/peak_pcmcia.c
+++ b/drivers/net/can/sja1000/peak_pcmcia.c
@@ -660,7 +660,6 @@ static int pcan_probe(struct pcmcia_device *pdev)
660 660
661 card = kzalloc(sizeof(struct pcan_pccard), GFP_KERNEL); 661 card = kzalloc(sizeof(struct pcan_pccard), GFP_KERNEL);
662 if (!card) { 662 if (!card) {
663 dev_err(&pdev->dev, "couldn't allocate card memory\n");
664 err = -ENOMEM; 663 err = -ENOMEM;
665 goto probe_err_2; 664 goto probe_err_2;
666 } 665 }
diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
index 11d1062a9449..a042cdc260dc 100644
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -508,7 +508,6 @@ static int plx_pci_add_card(struct pci_dev *pdev,
508 /* Allocate card structures to hold addresses, ... */ 508 /* Allocate card structures to hold addresses, ... */
509 card = kzalloc(sizeof(*card), GFP_KERNEL); 509 card = kzalloc(sizeof(*card), GFP_KERNEL);
510 if (!card) { 510 if (!card) {
511 dev_err(&pdev->dev, "Unable to allocate memory\n");
512 pci_disable_device(pdev); 511 pci_disable_device(pdev);
513 return -ENOMEM; 512 return -ENOMEM;
514 } 513 }
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index 83ee11eca0e2..daf4013a8fc7 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -60,6 +60,7 @@
60 60
61#include <linux/can/dev.h> 61#include <linux/can/dev.h>
62#include <linux/can/error.h> 62#include <linux/can/error.h>
63#include <linux/can/led.h>
63 64
64#include "sja1000.h" 65#include "sja1000.h"
65 66
@@ -368,6 +369,8 @@ static void sja1000_rx(struct net_device *dev)
368 369
369 stats->rx_packets++; 370 stats->rx_packets++;
370 stats->rx_bytes += cf->can_dlc; 371 stats->rx_bytes += cf->can_dlc;
372
373 can_led_event(dev, CAN_LED_EVENT_RX);
371} 374}
372 375
373static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status) 376static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
@@ -521,6 +524,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
521 can_get_echo_skb(dev, 0); 524 can_get_echo_skb(dev, 0);
522 } 525 }
523 netif_wake_queue(dev); 526 netif_wake_queue(dev);
527 can_led_event(dev, CAN_LED_EVENT_TX);
524 } 528 }
525 if (isrc & IRQ_RI) { 529 if (isrc & IRQ_RI) {
526 /* receive interrupt */ 530 /* receive interrupt */
@@ -575,6 +579,8 @@ static int sja1000_open(struct net_device *dev)
575 /* init and start chi */ 579 /* init and start chi */
576 sja1000_start(dev); 580 sja1000_start(dev);
577 581
582 can_led_event(dev, CAN_LED_EVENT_OPEN);
583
578 netif_start_queue(dev); 584 netif_start_queue(dev);
579 585
580 return 0; 586 return 0;
@@ -592,6 +598,8 @@ static int sja1000_close(struct net_device *dev)
592 598
593 close_candev(dev); 599 close_candev(dev);
594 600
601 can_led_event(dev, CAN_LED_EVENT_STOP);
602
595 return 0; 603 return 0;
596} 604}
597 605
@@ -639,6 +647,8 @@ static const struct net_device_ops sja1000_netdev_ops = {
639 647
640int register_sja1000dev(struct net_device *dev) 648int register_sja1000dev(struct net_device *dev)
641{ 649{
650 int ret;
651
642 if (!sja1000_probe_chip(dev)) 652 if (!sja1000_probe_chip(dev))
643 return -ENODEV; 653 return -ENODEV;
644 654
@@ -648,7 +658,12 @@ int register_sja1000dev(struct net_device *dev)
648 set_reset_mode(dev); 658 set_reset_mode(dev);
649 chipset_init(dev); 659 chipset_init(dev);
650 660
651 return register_candev(dev); 661 ret = register_candev(dev);
662
663 if (!ret)
664 devm_can_led_init(dev);
665
666 return ret;
652} 667}
653EXPORT_SYMBOL_GPL(register_sja1000dev); 668EXPORT_SYMBOL_GPL(register_sja1000dev);
654 669