summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/eth1394.c
Commit message (Collapse)AuthorAgeFilesLines
* ieee1394: remove unused variablesStefan Richter2010-06-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which caused gcc 4.6 to warn about variable 'XYZ' set but not used. sbp2.c, unit_characteristics: The underlying problem which was spotted here --- an incomplete implementation --- is already 50% fixed in drivers/firewire/sbp2.c which observes mgt_ORB_timeout but not yet ORB_size. raw1394.c, length_conflict; dv1394.c, ts_off: Impossible to tell why these variables are there. We can safely remove them though because we don't need a compiler warning to realize that we are dealing with (at least stylistically) flawed code here. dv1394.c, packet_time: This was used in debug macro that is only compiled in with DV1394_DEBUG_LEVEL >= 2 defined at compile-time. Just drop it since nobody debugs dv1394 anymore. Avoids noise in regular kernel builds. dv1394.c, ohci; eth1394.c, priv: These variables clearly can go away. Somebody wanted to use them but then didn't (or not anymore). Note, all of this code is considered to be at its end of life and is thus not really meant to receive janitorial updates anymore. But if we can easily remove noisy warnings from kernel builds, we should. Reported-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* drivers: Kill now superfluous ->last_rx storesEric Dumazet2009-09-021-1/+0
| | | | | | | | | | The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Neil Horman <nhorman@txudriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: drivers should make ethtool_ops constStephen Hemminger2009-09-021-2/+2
| | | | | | | No need to put ethtool_ops in data, they should be const. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: convert pseudo-devices to netdev_tx_tStephen Hemminger2009-09-011-10/+4
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ieee1394: remove driver_data direct access of struct deviceGreg Kroah-Hartman2009-06-151-9/+7
| | | | | | | | | | | | | | In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: linux1394-devel@lists.sourceforge.net Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Ben Collins <ben.collins@ubuntu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ieee1394: constify device ID tablesStefan Richter2009-03-241-1/+1
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: Storage class should be before const qualifierTobias Klauser2009-03-241-1/+1
| | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Merge branch 'master' of ↵David S. Miller2009-01-081-14/+14
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * ieee1394: eth1394: trivial sparse annotationsHarvey Harrison2009-01-041-13/+13
| | | | | | | | | | | | | | Mostly annotations of ether_type as a be16. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| * ieee1394: mark all hpsb_address_ops instances as constStefan Richter2009-01-041-1/+1
| | | | | | | | | | | | These are never modified. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* | ieee1394: use internal network device statsStephen Hemminger2009-01-061-22/+16
| | | | | | | | | | | | | | | | Use the network_device_stats field in network_device. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ieee1394: remove unneeded last_rxStephen Hemminger2009-01-061-2/+0
| | | | | | | | | | | | | | | | Last_rx is now done if needed inside bonding. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ieee1394: convert to net_device_opsStephen Hemminger2009-01-061-6/+10
|/ | | | | | | | Convert to net_device_ops. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* ieee1394: Use DIV_ROUND_UPJulia Lawall2008-10-151-1/+1
| | | | | Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: fix lock imbalanceStefan Richter2007-10-161-9/+5
| | | | | | bad_proto can be reached from points which did not take priv->lock. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: superfluous local variableStefan Richter2007-10-161-2/+0
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* [NET]: Move hardware header operations out of netdevice.Stephen Hemminger2007-10-101-17/+23
| | | | | | | | | Since hardware header operations are part of the protocol class not the device instance, make them into a separate object and save memory. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Wrap hard_header_parseStephen Hemminger2007-10-101-5/+5
| | | | | | | | Wrap the hard_header_parse function to simplify next step of header_ops conversion. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle2007-10-101-1/+0
| | | | | | | | | | | | It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mm: Remove slab destructors from kmem_cache_create().Paul Mundt2007-07-201-1/+1
| | | | | | | | | | | | | | Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* ieee1394: eth1394: revert parent device to that in 2.6.20Stefan Richter2007-07-101-3/+1
| | | | | | | | | | | After ieee1394 was converted away from class_device like the networking subsystem was already in 2.6.21, eth1394's device may point to the fw-host device as its parent again like in 2.6.20. This affects userspace tools which examine the sysfs representation of eth1394's device. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: fix to ether1394_tx in ether1394.cCarlos E. Ugarte2007-06-161-6/+15
| | | | | | | | | | | | This patch fixes a problem that occurs when packets cannot be sent across the ieee1394 bus and we return NETDEV_TX_BUSY in the net driver "hard start xmit" routine ether1394_tx. When we return NETDEV_TX_BUSY the stack will call ether1394_tx again with the same skb. So we need to restore the header to look like it did before we munged it for xmit over ieee1394. [Stefan Richter: changed whitespace, deleted a local variable] Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: bring back a parent deviceStefan Richter2007-05-271-4/+3
| | | | | | | | | | | | | | | | This adds a real parent device to eth1394's ethX device like in Linux 2.6.20 and older. However, due to unfinished conversion of the ieee1394 away from class_device, we now refer to the FireWire controller's PCI device as the parent, not to the ieee1394 driver's fw-host device. Having a real parent device instead of a virtual one allows udev scripts to distinguish eth1394 interfaces from networking bridges, bondings and the likes. Fixes a regression since 2.6.21: https://bugs.gentoo.org/show_bug.cgi?id=177199 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: handle tlabel exhaustionStefan Richter2007-05-271-17/+63
| | | | | | | | | | | | | When eth1394 was unable to acquire a transaction label, it just dropped outgoing packets without attempt to resend them later. The transmit queue is now halted if no tlabel is available to ->hard_start_xmit(). A workqueue job is then scheduled to catch the moment when ieee1394 recycled the next lot of tlabels. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=8402 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: remove bogus netif_wake_queueStefan Richter2007-05-271-4/+0
| | | | | | When we are within hard_start_xmit, the queue is already awake. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: send async streams at S100 on 1394b busesStefan Richter2007-04-301-5/+13
| | | | | | | eth1394 did not work on buses consisting of S100B...S400B hardware because it attempted to send GASP packets at S800. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: fix error path in module_initAkinobu Mita2007-04-301-3/+12
| | | | | | | | | | This patch fixes some error handlings in eth1394: - check return value of kmem_cache_create() - cleanup resources if hpsb_register_protocol() fails Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace)
* ieee1394: eth1394: correct return codes in hard_start_xmitStefan Richter2007-04-301-18/+16
| | | | | | | | | | This patch actually doesn't change anything because there was always 0 == NETDEV_TX_OK returned before. TODO: Return NETDEV_TX_BUSY in error case and test in different error conditions. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: hard_start_xmit is called in atomic contextStefan Richter2007-04-301-3/+2
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: some conditions are unlikelyStefan Richter2007-04-301-4/+4
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: clean up fragment_overlapStefan Richter2007-04-301-4/+4
| | | | | | | | offset > fi->offset + fi->len - 1 == !(offset < fi->offset + fi->len) offset + len - 1 < fi->offset == !(offset + len > fi->offset) !(A || B) == (!A && !B) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: don't use alloc_etherdevStefan Richter2007-04-301-15/+5
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: omit useless set_mac_address callbackStefan Richter2007-04-301-13/+1
| | | | | | We can't reconfigure the MAC address, hence we don't need the callback. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: CONFIG_INET is always definedStefan Richter2007-04-301-12/+4
| | | | | | because CONFIG_IEEE1394_ETH1394 depends on it. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: allow MTU bigger than 1500Stefan Richter2007-04-301-15/+19
| | | | | | | | | | RFC 2734 says: "IP-capable nodes may operate with an MTU size larger than the default [1500 octets], but the means by which a larger MTU is configured are beyond the scope of this document." Allow users to set an MTU bigger than 1500. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: contain host resetStefan Richter2007-04-301-4/+2
| | | | | | | | | | Call only eth1394's own host reset handler from .tx_timeout, not the reset hooks of all other IEEE 1394 drivers. A minor drawback of this patch is that ether1394_host_reset by timeout is not serialized against ether1394_host_reset by bus reset. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: shorter error messagesStefan Richter2007-04-301-24/+16
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: correct a memset argumentStefan Richter2007-04-301-1/+1
| | | | | | The old argument calculated the correct value in a wrong way. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: refactor .probe and .updateStefan Richter2007-04-301-32/+16
| | | | | | | Move common code into an extra function. This implicitly adds a missing node_info->fifo = CSR1212_INVALID_ADDR_SPACE; to .update. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: .probe and .update may sleepStefan Richter2007-04-301-8/+4
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: coding styleStefan Richter2007-04-301-227/+199
| | | | | | | Adjust white space and line wraps. Remove unnecessary parentheses and braces, unused macros, and some of the more redundant comments. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: Move common recv_init code to helper functionJean Delvare2007-04-301-40/+31
| | | | | | | | | There is some common code between ether1394_open and ether1394_add_host which can be moved to a separate helper function for a slightly smaller eth1394 driver (-160 bytes on i386.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: don't autoload by hotplug when ohci1394 startsStefan Richter2007-04-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, ieee1394 put an IP-over-1394 capability entry into each new host's config ROM. As soon as the controller was initialized --- i.e. right after modprobe ohci1394 --- this entry triggered a hotplug event which typically caused auto-loading of eth1394. This irritated or annoyed many users and distributors. Of course they could blacklist eth1394, but then ieee1394 wrongly advertized IP-over- 1394 capability to the FireWire bus. Therefore - remove the offending kernel config option IEEE1394_CONFIG_ROM_IP1394, - let eth1394 add the ROM entry by itself, i.e. only after eth1394 was loaded. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7793 . To emulate the behaviour of older kernels, simply add the following to to /etc/modprobe.conf: install ohci1394 /sbin/modprobe eth1394; \ /sbin/modprobe --ignore-install ohci1394 Note, autoloading of eth1394 when an _external_ IP-over-1394 capable device is discovered is _not_ affected by this patch. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: reduce excessive function inliningStefan Richter2007-04-301-38/+36
| | | | | | | | | Shrinks eth1394.ko by about 5%. Many of these functions have only one caller and are therefore auto- inlined anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: clean up host removalStefan Richter2007-04-301-17/+10
| | | | | | ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: eth1394: unregister address space in failure caseStefan Richter2007-04-301-7/+6
| | | | | | | Warn if hpsb_allocate_and_register_addrspace() failed. Unregister the address space if something else failed. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* [SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iphArnaldo Carvalho de Melo2007-04-251-1/+1
| | | | | Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SK_BUFF]: Introduce skb_reset_mac_header(skb)Arnaldo Carvalho de Melo2007-04-251-1/+1
| | | | | | | | | | | | For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in 64bit land while possibly keeping it as a pointer on 32bit. This one touches just the most simple case, next will handle the slightly more "complex" cases. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ieee1394: fix oops on "modprobe -r ohci1394" after network class_device ↵Stefan Richter2007-03-231-0/+3
| | | | | | | | | | | | | | | | conversion The networking subsystem has been converted from class_device to device but ieee1394 hasn't. This results in a 100% reproducible NULL pointer dereference if the ohci1394 driver module is unloaded while the eth1394 module is still loaded. http://lkml.org/lkml/2006/11/16/147 http://lkml.org/lkml/2007/3/14/4 This is a regression in 2.6.21-rc1. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Tested-by: Ismail Dönmez <ismail@pardus.org.tr>
* [PATCH] remove many unneeded #includes of sched.hTim Schmielau2007-02-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud