summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/sja1000
Commit message (Collapse)AuthorAgeFilesLines
* can: sja1000: fix/add miniPCIe/cPCI PC/104Plus PCI/104e PEAK-System boardsStephane Grosjean2012-10-241-2/+11
| | | | | | | | | | | | | | | | | | | This patch adds the support for 4 new PCI boards based on the SJA1000 CAN controller, from PEAK-System Technik: . PCAN-miniPCIe (PCI-Express Mini slots, available as single or dual-channel) . PCAN-cPCI (CompactPCI format, available as single or dual-channel) . PCAN-PC/104-Plus (PC/104-Plus system, av. as 1, 2 or 4 channels) . PCAN-PCI/104-Express (PCI/104-Express system, av. as 1 or 2 channels) This patch also fixes a typo in existing "PEAK_MPCI_DEVICE_ID" identifier (missing "e" for Express). Finally, it also changes the author as well as it updates the module supported devices list. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: peak_pcmcia: fix error return codePeter Senna Tschudin2012-10-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: peak_pci: fix error return codePeter Senna Tschudin2012-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: sja1000: Add support for listen-only mode and one-shot modeAndreas Larsson2012-09-221-7/+24
| | | | | | | | | | | One-shot mode uses the TCS bit of the status register to discern whether a transmission was successful or not. On a failed transmission, the frame is not echoed back. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: sja1000_platform: fix wrong flag IRQF_SHARED for interrupt sharingSven Schmitt2012-08-241-1/+3
| | | | | | | | | | | | | The sja1000 platform driver wrongly assumes that a shared IRQ is indicated with the IRQF_SHARED flag in irq resource flags. This patch changes the driver to handle the correct flag IORESOURCE_IRQ_SHAREABLE instead. There are no mainline users of the platform driver which wrongly make use of IRQF_SHARED. Signed-off-by: Sven Schmitt <sven.schmitt@volkswagen.de> Acked-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: mark bittiming_const pointer in struct can_priv as constMarc Kleine-Budde2012-07-201-1/+1
| | | | | | | | This patch marks the bittiming_const pointer as in the struct can_pric as "const". This allows us to mark the struct can_bittiming_const in the CAN drivers as "const", too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* Merge branch 'for-linus' of ↵Linus Torvalds2012-05-221-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial updates from Jiri Kosina: "As usual, it's mostly typo fixes, redundant code elimination and some documentation updates." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits) edac, mips: don't change code that has been removed in edac/mips tree xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer lib: Change mail address of Oskar Schirmer net: Change mail address of Oskar Schirmer arm/m68k: Change mail address of Sebastian Hess i2c: Change mail address of Oskar Schirmer net: Fix tcp_build_and_update_options comment in struct tcp_sock atomic64_32.h: fix parameter naming mismatch Kconfig: replace "--- help ---" with "---help---" c2port: fix bogus Kconfig "default no" edac: Fix spelling errors. qla1280: Remove redundant NULL check before release_firmware() call remoteproc: remove redundant NULL check before release_firmware() qla2xxx: Remove redundant NULL check before release_firmware() call. aic94xx: Get rid of redundant NULL check before release_firmware() call tehuti: delete redundant NULL check before release_firmware() qlogic: get rid of a redundant test for NULL before call to release_firmware() bna: remove redundant NULL test before release_firmware() tg3: remove redundant NULL test before release_firmware() call typhoon: get rid of redundant conditional before all to release_firmware() ...
| * Fix "the the" in various KconfigMasanari Iida2012-04-181-1/+1
| | | | | | | | | | | | | | Fix typo "the the" in various Kconfig. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | net/can: use module_pci_driverAxel Lin2012-04-164-48/+4
|/ | | | | | | | | | | | This patch converts the drivers in drivers/net/can/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-can@vger.kernel.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: sja1000: add support for PEAK-System PCMCIA cardStephane Grosjean2012-03-033-0/+763
| | | | | | | | | | | This patch adds support to the PCAN-PC Card PCMCIA card from PEAK-System Technik (www.peak-system.com). This card is a CAN interface for the PC Card slot. It is available as a single or dual-channel version. Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: peak_pci: add support of some new PEAK-System PCI cardsStephane Grosjean2012-03-032-17/+506
| | | | | | | | | | | | | | | | This patch adds the support of some new PEAK-System PCI cards in the CAN network sub-system. These are: PCAN-PCIeC (PCI-ExpressCard) PCAN-mminiPCI (mini-PCI) PCAN-PCI (PCI next-gen) This patch also adds the control of the blinking leds of the PCAN-PCIeC. Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-02-261-1/+12
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/sfc/rx.c Overlapping changes in drivers/net/ethernet/sfc/rx.c, one to change the rx_buf->is_page boolean into a set of u16 flags, and another to adjust how ->ip_summed is initialized. Signed-off-by: David S. Miller <davem@davemloft.net>
| * can: sja1000: fix isr hang when hw is unplugged under loadOliver Hartkopp2012-02-201-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | In the case of hotplug enabled devices (PCMCIA/PCIeC) the removal of the hardware can cause an infinite loop in the common sja1000 isr. Use the already retrieved status register to indicate a possible hardware removal and double check by reading the mode register in sja1000_is_absent. Cc: stable@kernel.org [3.2+] Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | Merge branch 'master' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller2012-02-043-11/+31
|\ \ | |/ |/| | | | | | | | | Conflicts: drivers/net/can/usb/ems_usb.c Minor dev_warn --> netdev_warn conversion conflicts.
| * can: replace the dev_dbg/info/err/... with the new netdev_xxx macrosWolfgang Grandegger2012-02-031-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | Cc: uclinux-dist-devel@blackfin.uclinux.org Cc: Anant Gole <anantgole@ti.com> Cc: Chris Elston <celston@katalix.com> Cc: Sebastian Haas <haas@ems-wuensche.com> Cc: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Sebastian Haas <dev@sebastianhaas.info> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * can: plx_pci: add support for IXXAT PCI cardsJames Kime2012-02-032-1/+22
| | | | | | | | | | | | | | | | This patch adds support for IXXAT passive CAN controllers Signed-off-by: James Kime <kime@ixxat.de> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | can: peak_pci: Fix the way channels are linked togetherStephane Grosjean2012-02-031-14/+9
|/ | | | | | | | | Change the way channels objects are linked together by peak_pci_probe() avoiding any kernel oops when driver is removed. Side effect is that the list is now browsed from last to first channel. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: sja1000_isa: convert to platform driver to support x86_64 systemsWolfgang Grandegger2011-11-292-30/+65
| | | | | | | | | | This driver is currently not supported on x86_64 systems because the "isa_driver" interface is used (CONFIG_ISA=y). To overcome this limitation, the driver is converted to a platform driver, similar to the serial 8250 driver. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: sja1000_isa: fix "limited range" compiler warningsWolfgang Grandegger2011-11-291-12/+12
| | | | | | | | | | This patch fixes the compiler warnings: "comparison is always false due to limited range of data type" by using "0xff" instead of "-1" for unsigned values. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/can: convert drivers/net/can/* to use module_platform_driver()Axel Lin2011-11-292-23/+2
| | | | | | | | | | | | | | | | | | | This patch converts the drivers in drivers/net/can/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Bhupesh Sharma <bhupesh.sharma@st.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Anatolij Gustschin <agust@denx.de> Cc: Paul Bolle <pebolle@tiscali.nl> Cc: Kurt Van Dijck <kurt.van.dijck@eia.be> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net, sja1000: Don't include version.h in peak_pci.c when not neededJesper Juhl2011-11-211-1/+0
| | | | | | | | | | It was pointed out by "make versioncheck" that we do not need to include version.h in drivers/net/can/sja1000/peak_pci.c This patch removes the unneeded include. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2011-10-256-4/+638
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits) dp83640: free packet queues on remove dp83640: use proper function to free transmit time stamping packets ipv6: Do not use routes from locally generated RAs |PATCH net-next] tg3: add tx_dropped counter be2net: don't create multiple RX/TX rings in multi channel mode be2net: don't create multiple TXQs in BE2 be2net: refactor VF setup/teardown code into be_vf_setup/clear() be2net: add vlan/rx-mode/flow-control config to be_setup() net_sched: cls_flow: use skb_header_pointer() ipv4: avoid useless call of the function check_peer_pmtu TCP: remove TCP_DEBUG net: Fix driver name for mdio-gpio.c ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces ipv4: fix ipsec forward performance regression jme: fix irq storm after suspend/resume route: fix ICMP redirect validation net: hold sock reference while processing tx timestamps tcp: md5: add more const attributes Add ethtool -g support to virtio_net ... Fix up conflicts in: - drivers/net/Kconfig: The split-up generated a trivial conflict with removal of a stale reference to Documentation/networking/net-modules.txt. Remove it from the new location instead. - fs/sysfs/dir.c: Fairly nasty conflicts with the sysfs rb-tree usage, conflicting with Eric Biederman's changes for tagged directories.
| * can: remove references to berlios mailinglistMarc Kleine-Budde2011-10-172-4/+0
| | | | | | | | | | | | | | | | | | The BerliOS project, which currently hosts our mailinglist, will close with the end of the year. Now take the chance and remove all occurrences of the mailinglist address from the source files. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * can/sja1000: add driver for EMS PCMCIA cardOliver Hartkopp2011-09-283-0/+339
| | | | | | | | | | | | | | | | | | This patch adds the driver for the SJA1000 based PCMCIA card 'CPC-Card' from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de). Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Markus Plessing <plessing@ems-wuensche.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * can/sja1000: driver for PEAK PCAN PCI/PCIe cardsWolfgang Grandegger2011-09-213-0/+299
| | | | | | | | | | | | | | | | | | | | This patch add the peak_pci driver for the PCAN PCI/PCIe cards (1, 2, 3 or 4 channels) from PEAK Systems (http://www.peak-system.com). Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | doc: fix broken referencesPaul Bolle2011-09-271-1/+1
|/ | | | | | | | | | | | | There are numerous broken references to Documentation files (in other Documentation files, in comments, etc.). These broken references are caused by typo's in the references, and by renames or removals of the Documentation files. Some broken references are simply odd. Fix these broken references, sometimes by dropping the irrelevant text they were part of. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* drivers/net/can/sja1000/plx_pci.c: eliminate double freeJulia Lawall2011-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | In this code, the failure_cleanup label calls the function plx_pci_del_card, which frees everything in the card->net_dev array. dev is placed in this array immediately after allocation, so the two subsequent jumps to failure_cleanup should not also call free_sja1000dev, but the second one does. If plx_pci_check_sja1000 fails, then free_sja1000dev is also called on dev. Because dev is already in the card->net_dev array, this implies that when plx_pci_del_card is later called, it may get freed again. So that entry is reset to NULL after the free. Finally, if there is a problem with one channel, there will be a hole in the array. card->channels counts the number of channels that have succeeded, and does not keep track of the index of the largest element in the array that is valid. So the loop in plx_pci_del_card is changed to go up to PLX_PCI_MAX_CHAN, which is only 2. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: include io.h in sja1000_of_platform.c for iounmap etcStephen Rothwell2011-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | fixes these build errors: drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg': drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8' drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg': drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8' drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove': drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap' drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe': drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache' drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast Caused by commit b7f080cfe223 ("net: remove mm.h inclusion from netdevice.h"). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: remove interrupt.h inclusion from netdevice.hAlexey Dobriyan2011-06-061-0/+1
| | | | | | | | * remove interrupt.g inclusion from netdevice.h -- not needed * fixup fallout, add interrupt.h and hardirq.h back where needed. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: fix SJA1000 dlc for RTR packetsKurt Van Dijck2011-05-051-1/+1
| | | | | | | | | RTR frames do have a valid data length code on CAN. The driver for SJA1000 did not handle that situation properly. Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* dt/net: Eliminate users of of_platform_{,un}register_driverGrant Likely2011-02-281-5/+4
| | | | | | | | | Get rid of users of of_platform_driver in drivers/net. The of_platform_{,un}register_driver functions are going away, so the users need to be converted to using the platform_bus_type directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* drivers/net/*/: Use static constJoe Perches2010-12-211-1/+1
| | | | | | | Using static const generally increases object text and decreases data size. It also generally decreases overall object size. Signed-off-by: Joe Perches <joe@perches.com>
* drivers/net/can/sja1000: Use printf extension %pR for struct resourceJoe Perches2010-11-171-6/+2
| | | | | | | Using %pR standardizes the struct resource output. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: tscan1: add driver for TS-CAN1 boardsAndre B. Oliveira2010-10-243-0/+229
| | | | | | | | | Add driver for Technologic Systems TS-CAN1 PC104 peripheral boards. Signed-off-by: Andre B. Oliveira <anbadeol@gmail.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* of/device: Replace struct of_device with struct platform_deviceGrant Likely2010-08-061-2/+2
| | | | | | | | | | | | | | | | of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2010-05-251-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (63 commits) drivers/net/usb/asix.c: Fix pointer cast. be2net: Bug fix to avoid disabling bottom half during firmware upgrade. proc_dointvec: write a single value hso: add support for new products Phonet: fix potential use-after-free in pep_sock_close() ath9k: remove VEOL support for ad-hoc ath9k: change beacon allocation to prefer the first beacon slot sock.h: fix kernel-doc warning cls_cgroup: Fix build error when built-in macvlan: do proper cleanup in macvlan_common_newlink() V2 be2net: Bug fix in init code in probe net/dccp: expansion of error code size ath9k: Fix rx of mcast/bcast frames in PS mode with auto sleep wireless: fix sta_info.h kernel-doc warnings wireless: fix mac80211.h kernel-doc warnings iwlwifi: testing the wrong variable in iwl_add_bssid_station() ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs() ath9k_htc: dereferencing before check in hif_usb_tx_cb() rt2x00: Fix rt2800usb TX descriptor writing. rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions. ...
| * can: SJA1000 add missing spin_lock_init()Oliver Hartkopp2010-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | As remarked by Sam Ravnborg the spin_lock variable, that has been introduced in commit 57c8a456640fa3ca777652f11f2db4179a3e66b6 ("can: Fix SJA1000 command register writes on SMP systems") has not been initialized properly. This patch adds the initialization to allow spinlock debugging. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> CC: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge remote branch 'origin' into secretlab/next-devicetreeGrant Likely2010-05-229-30/+204
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * can: Fix SJA1000 command register writes on SMP systemsOliver Hartkopp2010-05-182-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SJA1000 command register is concurrently written in the rx-path to free the receive buffer _and_ in the tx-path to start the transmission. The SJA1000 data sheet, 6.4.4 COMMAND REGISTER (CMR) states: "Between two commands at least one internal clock cycle is needed in order to proceed. The internal clock is half of the external oscillator frequency." On SMP systems the current implementation leads to a write stall in the tx-path, which can be solved by adding some general locking and some time to settle the write_reg() operation for the command register. Thanks to Klaus Hitschler for the original fix and detailed problem description. This patch applies on net-2.6 and (with some offsets) on net-next-2.6 . Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * can: sja1000 platform data fixesWolfgang Grandegger2010-05-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The member "clock" of struct "sja1000_platform_data" is documented as "CAN bus oscillator frequency in Hz" but it's actually used as the CAN clock frequency, which is half of it. To avoid further confusion, this patch fixes it by renaming the member to "osc_freq". That way, also non mainline users will notice the change. The platform code for the relevant boards is updated accordingly. Furthermore, pre-defined values are now used for the members "ocr" and "cdr". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: trans_start cleanupsEric Dumazet2010-05-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Fix some #includes in CAN drivers (rebased for net-next-2.6)Hans J. Koch2010-04-137-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | In the current implementation, CAN drivers need to #include <linux/can.h> _before_ they #include <linux/can/dev.h>, which is both ugly and unnecessary. Fix this by including <linux/can.h> in <linux/can/dev.h> and remove the #include <linux/can.h> lines from drivers. Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * can: Add esd board support to plx_pci CAN driverMatthias Fuchs2010-04-132-12/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for SJA1000 based PCI CAN interface cards from electronic system design gmbh. Some changes have been done on the common code: - esd boards must not have the 2nd local interupt enabled (PLX9030/9050) - a new path for PLX9056/PEX8311 chips has been added - new plx9056 reset function has been implemented - struct plx_card_info got a reset function entry In detail the following additional boards are now supported: CAN-PCI/200 (PCI) CAN-PCI/266 (PCI) CAN-PMC266 (PMC module) CAN-PCIe/2000 (PCI Express) CAN-CPCI/200 (Compact PCI, 3U) CAN-PCI104 (PCI104) Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Merge branch 'master' of ↵David S. Miller2010-04-112-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/stmmac/stmmac_main.c drivers/net/wireless/wl12xx/wl1271_cmd.c drivers/net/wireless/wl12xx/wl1271_main.c drivers/net/wireless/wl12xx/wl1271_spi.c net/core/ethtool.c net/mac80211/scan.c
| * | can: sja1000: add read/write routines for 8, 16 and 32-bit register accessYegor Yefremov2010-03-211-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add routines for 8, 16 and 32-bit access like in drivers/i2c/busses/i2c-pca-platform.c Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | can: sja1000: allow shared interrupt definitionYegor Yefremov2010-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | extend the AND mask, so that IRQF_SHARED flag remains Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | of: Remove duplicate fields from of_platform_driverGrant Likely2010-05-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com>
* | | of: Always use 'struct device.of_node' to get device node pointer.Grant Likely2010-05-181-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-302-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
OpenPOWER on IntegriCloud