aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/gianfar.c
AgeCommit message (Collapse)Author
2009-05-25Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/iwlwifi/iwl3945-base.c
2009-05-25gianfar: fix BUG under load after introduction of skb recyclingLennert Buytenhek
Since commit 0fd56bb5be6455d0d42241e65aed057244665e5e ("gianfar: Add support for skb recycling"), gianfar puts skbuffs that are in the rx ring back onto the recycle list as-is in case there was a receive error, but this breaks the following invariant: that all skbuffs on the recycle list have skb->data = skb->head + NET_SKB_PAD. The RXBUF_ALIGNMENT realignment done in gfar_new_skb() will be done twice on skbuffs recycled in this way, causing there not to be enough room in the skb anymore to receive a full packet, eventually leading to an skb_over_panic from gfar_clean_rx_ring() -> skb_put(). Resetting the skb->data pointer to skb->head + NET_SKB_PAD before putting the skb back onto the recycle list restores the mentioned invariant, and should fix this issue. Reported-by: Michael Guntsche <mike@it-loops.com> Tested-by: Michael Guntsche <mike@it-loops.com> Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-28gianfar: Use memset instead of cacheable_memzeroKumar Gala
cacheable_memzero() is completely overkill for the clearing out the FCB block which is only 8-bytes. The compiler should easily optimize this with memset. Additionally, cacheable_memzero() only exists on ppc32 and thus breaks builds of gianfar on ppc64. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-27net: Rework gianfar driver to use of_mdio infrastructure.Grant Likely
This patch simplifies the driver by making use of more common code. Tested on Freescale MPC8349emitxgp eval board Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-15gianfar: stop send queue before resetting gianfarMarkus Brunner
After a transmit timed out, the reset task will be called, which will free the allocated resources(stop_gfar). If gfar_poll will be called before the resources get allocated again gfar_clean_tx_ring will call dev_kfree_skb_any(NULL). Example crash: ops: Kernel access of bad area, sig: 11 [#1] PREEMPT RSBBA100 Modules linked in: NIP: c01a10c4 LR: c013b254 CTR: c013c038 REGS: c02e7d20 TRAP: 0300 Not tainted (2.6.27.20) MSR: 00001032 <ME,IR,DR> CR: 24000082 XER: 20000000 DAR: 000000a0, DSISR: 20000000 TASK = c02ce578[0] 'swapper' THREAD: c02e6000 GPR00: 000000a0 c02e7dd0 c02ce578 00000000 00000040 00000001 c02ec1c0 00001032 GPR08: c080d1e0 df9ea800 00000000 00000000 24000082 ffffffff 0404f000 00000000 GPR16: ffffffbf ffffffff ffffffff ffdff7ff ffffffff c02d0fd4 00100100 00200200 GPR24: c031220c 00000001 00000001 00000000 00000000 df849800 ff109000 df849b80 NIP [c01a10c4] dev_kfree_skb_irq+0x18/0x70 LR [c013b254] gfar_clean_tx_ring+0x70/0x11c Call Trace: [c02e7dd0] [c003e978] update_wall_time+0x730/0x744 (unreliable) [c02e7df0] [c013b254] gfar_clean_tx_ring+0x70/0x11c [c02e7e10] [c013c07c] gfar_poll+0x44/0x150 [c02e7e30] [c01a064c] net_rx_action+0xa8/0x19c [c02e7e70] [c00251d4] __do_softirq+0x64/0xc0 [c02e7e90] [c0006384] do_softirq+0x40/0x58 [c02e7ea0] [c00250a8] irq_exit+0x40/0x9c [c02e7eb0] [c000642c] do_IRQ+0x90/0xac [c02e7ec0] [c0010ab4] ret_from_except+0x0/0x14 --- Exception: 501 at cpu_idle+0x9c/0xf8 LR = cpu_idle+0x9c/0xf8 [c02e7f80] [c0009820] cpu_idle+0x58/0xf8 (unreliable) [c02e7fa0] [c01fb8c8] __got2_end+0x7c/0x90 [c02e7fc0] [c026c794] start_kernel+0x2c0/0x2d4 [c02e7ff0] [00003438] 0x3438 Instruction dump: 7fa00124 80010024 bba10014 38210020 7c0803a6 4e800020 9421ffe0 7c0802a6 7c6b1b78 90010024 380300a0 bfa10014 <7d200028> 3129ffff 7d20012d 40a2fff4 Kernel panic - not syncing: Fatal exception in interrupt This Patch calls netif_stop_queue before calling stop_gfar. Signed-off-by: Markus Brunner <super.firetwister@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-29gianfar: Fix use-after-of_node_put() in gfar_of_init().David S. Miller
We can't put 'mdio' until after we've used it in the fsl_pq_mdio_bus_name() call. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-27gianfar: only check headroom when FCB is neededLi Yang
Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-27gianfar: Fix kfree(skb)David S. Miller
Noticed by Li Yang. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-27gianfar: fix headroom expansion codeStephen Hemminger
The code that was added to increase headroom was wrong. It doesn't handle the case where gfar_add_fcb() changes the skb. Better to do check at start of transmit (outside of lock), where error handling is better anyway. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-25gianfar: reallocate skb when headroom is not enough for fcbLi Yang
Gianfar uses a hardware header FCB for offloading. However when used with bridging or IP forwarding, TX skb might not have enough headroom for the FCB. Reallocate skb for such cases. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21gianfar: Fix build with CONFIG_PM enabledAnton Vorontsov
commit 4826857f1bf07f9c0f1495e9b05d125552c88a85 ("gianfar: pass the proper dev to DMA ops") introduced this build breakage: CC drivers/net/gianfar.o drivers/net/gianfar.c: In function 'gfar_suspend': drivers/net/gianfar.c:552: error: 'struct gfar_private' has no member named 'dev' drivers/net/gianfar.c: In function 'gfar_resume': drivers/net/gianfar.c:601: error: 'struct gfar_private' has no member named 'dev' make[2]: *** [drivers/net/gianfar.o] Error 1 Fix this by converting suspend and resume routines to use gfar_private->ndev. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-18gianfar: pass the proper dev to DMA opsKumar Gala
We need to be passing the of_platform device struct into the DMA ops as its the one that has the archdata setup to know which low-level DMA ops we should be using (not the net_device one). This isn't an issue until we expect the archdata to be setup correctly. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13gianfar: Convert to use netdev_opsAndy Fleming
Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-01Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-tx.c net/8021q/vlan_core.c net/core/dev.c
2009-02-27gianfar: Do right check on num_txbdfreeRini van Zetten
This patch fixes a wrong check on num_txbdfree. It could lead to num_txbdfree become nagative. Result was that the gianfar stops sending data. Changes from first version : - removed a space between parens (David Millers comment) - full email address in signed off line Signed-off-by: Rini van Zetten <rini@arvoo.nl> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/gianfar.c
2009-02-09gianfar: Fix boot hangs while bringing up gianfar ethernetJarek Poplawski
Ira Snyder found that commit 8c7396aebb68994c0519e438eecdf4d5fa9c7844 "gianfar: Merge Tx and Rx interrupt for scheduling clean up ring" can cause hangs. It's because there was removed clearing of interrupts in gfar_schedule_cleanup() (which is called by an interrupt handler) in case when netif scheduling has been disabled. This patch brings back this action and a comment. Reported-by: Ira Snyder <iws@ovro.caltech.edu> Reported-by: Peter Korsgaard <jacmet@sunsite.dk> Bisected-by: Ira Snyder <iws@ovro.caltech.edu> Tested-by: Peter Korsgaard <jacmet@sunsite.dk> Tested-by: Ira Snyder <iws@ovro.caltech.edu> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-04Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2009-02-04gianfar: Fix stashing supportAndy Fleming
Stashing is only supported on the 85xx (e500-based) SoCs. The 83xx and 86xx chips don't have a proper cache for this. U-Boot has been updated to add stashing properties to the device tree nodes of gianfar devices on 85xx. So now we modify Linux to keep stashing off unless those properties are there. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-04gianfar: Add support for skb recyclingAndy Fleming
Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-04netdev: Merge UCC and gianfar MDIO bus driversAndy Fleming
The MDIO bus drivers for the UCC and gianfar ethernet controllers are essentially the same. There's no reason to duplicate that much code. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-04gianfar: Fix potential soft reset raceAndy Fleming
SOFT_RESET must be asserted for at least 3 TX clocks in order for it to work properly. The syncs in the gfar_write() commands have been hiding this, but we need to guarantee it. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01gianfar: Fix sparse warningsAnton Vorontsov
This patch fixes following sparse warnings: CHECK gianfar_ethtool.c gianfar_ethtool.c:610:26: warning: symbol 'gfar_ethtool_ops' was not declared. Should it be static? CHECK gianfar_mii.c gianfar_mii.c:108:35: warning: cast adds address space to expression (<asn:2>) gianfar_mii.c:119:35: warning: cast adds address space to expression (<asn:2>) gianfar_mii.c:128:35: warning: cast adds address space to expression (<asn:2>) gianfar_mii.c:272:5: warning: cast removes address space of expression gianfar_mii.c:271:15: warning: cast adds address space to expression (<asn:2>) gianfar_mii.c:340:11: warning: cast adds address space to expression (<asn:2>) CHECK gianfar_sysfs.c gianfar_sysfs.c:84:1: warning: symbol 'dev_attr_bd_stash' was not declared. Should it be static? gianfar_sysfs.c:133:1: warning: symbol 'dev_attr_rx_stash_size' was not declared. Should it be static? gianfar_sysfs.c:175:1: warning: symbol 'dev_attr_rx_stash_index' was not declared. Should it be static? gianfar_sysfs.c:213:1: warning: symbol 'dev_attr_fifo_threshold' was not declared. Should it be static? gianfar_sysfs.c:250:1: warning: symbol 'dev_attr_fifo_starve' was not declared. Should it be static? gianfar_sysfs.c:287:1: warning: symbol 'dev_attr_fifo_starve_off' was not declared. Should it be static? Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01gianfar: Implement proper, per netdevice wakeup managementAnton Vorontsov
This patch implements wakeup management for the gianfar driver. The driver should set wakeup enable if WOL is enabled, so that phylib won't power off an attached PHY. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-26Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2009-01-26gianfar: Revive VLAN supportAnton Vorontsov
commit 77ecaf2d5a8bfd548eed3f05c1c2e6573d5de4ba ("gianfar: Fix VLAN HW feature related frame/buffer size calculation") wrongly removed priv->vlgrp assignment, and now priv->vlgrp is always NULL. This patch fixes the issue, plus fixes following sparse warning introduced by the same commit: gianfar.c:1406:13: warning: context imbalance in 'gfar_vlan_rx_register' - wrong count at exit gfar_vlan_rx_register() checks for "if (old_grp == grp)" and tries to return w/o dropping the lock. According to net/8021q/vlan.c VLAN core issues rx_register() callback: 1. In register_vlan_dev() only on a newly created group; 2. In unregister_vlan_dev() only if the group becomes empty. Thus the check in the gianfar driver isn't needed. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21net: Remove redundant NAPI functionsBen Hutchings
Following the removal of the unused struct net_device * parameter from the NAPI functions named *netif_rx_* in commit 908a7a1, they are exactly equivalent to the corresponding *napi_* functions and are therefore redundant. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-12gianfar: Fix soft lockup with multi-interrupt TSECsAnton Vorontsov
This patch fixes following bug: BUG: soft lockup - CPU#0 stuck for 61s! [S03mountvirtfs-:922] Modules linked in: NIP: c006505c LR: c00675f0 CTR: c0020438 REGS: c7a1db90 TRAP: 0901 Not tainted (2.6.28-rc8-01311-g8c7396a) MSR: 00009032 <EE,ME,IR,DR> CR: 28248442 XER: 20000000 TASK = c7a288a0[922] 'S03mountvirtfs-' THREAD: c7a1c000 GPR00: 00009032 c7a1dc40 c7a288a0 00000024 c79a1840 00000000 00000300 00000020 GPR08: c035f97c 00000000 00004008 c04d5210 00000000 NIP [c006505c] handle_IRQ_event+0x34/0xb0 LR [c00675f0] handle_level_irq+0xa8/0x144 Call Trace: [c7a1dc40] [c00204d8] ipic_mask_irq+0xa0/0xb4 (unreliable) [c7a1dc60] [c00675f0] handle_level_irq+0xa8/0x144 [c7a1dc80] [c00067f8] do_IRQ+0x78/0x108 [c7a1dc90] [c0014d7c] ret_from_except+0x0/0x14 --- Exception: 501 at gfar_schedule_cleanup+0x54/0x7c LR = gfar_transmit+0x14/0x28 [c7a1dd50] [c0352a3c] _spin_unlock_irqrestore+0x18/0x30 (unreliable) [c7a1dd60] [c01f49a8] gfar_transmit+0x14/0x28 [c7a1dd70] [c0065084] handle_IRQ_event+0x5c/0xb0 [c7a1dd90] [c00675f0] handle_level_irq+0xa8/0x144 [c7a1ddb0] [c00067f8] do_IRQ+0x78/0x108 [c7a1ddc0] [c0014d7c] ret_from_except+0x0/0x14 --- Exception: 501 at up_read+0x10/0x48 LR = do_page_fault+0x2b0/0x3e0 [c7a1de80] [c7a177e8] 0xc7a177e8 (unreliable) [c7a1de90] [c0017964] do_page_fault+0x2b0/0x3e0 [c7a1df40] [c0014b14] handle_page_fault+0xc/0x80 --- Exception: 301 at 0xfe98b7c LR = 0xfe989c0 Instruction dump: 7c0802a6 bf810010 7c9f2378 7c7c1b78 90010024 80040004 70090020 40820010 7c0000a6 60008000 7c000124 3bc00000 <3ba00000> 48000010 83ff0014 2f9f0000 The bug introduced by commit 8c7396aebb68994c0519e438eecdf4d5fa9c7844 ("gianfar: Merge Tx and Rx interrupt for scheduling clean up ring"). The commit merged TX and RX interrupt code into a single routine that schedules NAPI, but no locks were introduced. This causes irq races, so when irqs are enabled and netif_rx_schedule_prep() returns 0, nobody disable the interrupts again. This leads to interrupt storm and finally to the lockup. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-11netdev: gianfar: add MII ioctl handlerClifford Wolf
This is the same kind of wrapper that can also be found in many other network device drivers. Tested with a freescale MPC8349E host CPU: Toggled the interface LEDs on a DP83865 PHY. Signed-off-by: Clifford Wolf <clifford@clifford.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08gianfar: Fixup use of BUS_ID_SIZEKumar Gala
Commit b31a1d8b41513b96e9c7ec2f68c5734cef0b26a4 ("gianfar: Convert gianfar to an of_platform_driver") went back to using BUS_ID_SIZE instead of sizeof() as per the larger patch series that will remove "char bus_id[20]" from struct device. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-06gianfar: ensure ECNTRL[R100] is cleared on link state changeLi Yang
When changing the link between 100Mbps and 1Gbps in SGMII mode it was found out that the link would stop working. The issue is that ECNTRL[R100] needs to be cleared when in 1Gbps mode. Older reference manuals didn't require the explicitly clearing but has since been found it that it is needed. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22net: Remove unused netdev arg from some NAPI interfaces.Neil Horman
When the napi api was changed to separate its 1:1 binding to the net_device struct, the netif_rx_[prep|schedule|complete] api failed to remove the now vestigual net_device structure parameter. This patch cleans up that api by properly removing it.. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17gianfar: Continue polling until both tx and rx are emptyAndy Fleming
gfar_poll would declare polling done once the rx queue was empty, but the tx queue could still have packets left. Stolen mostly from the e1000 driver. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17gianfar: Merge Tx and Rx interrupt for scheduling clean up ringDai Haruki
No clean up function is executed in the interrupt context by this patch. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17gianfar: Use interface name in interrupt name to distinguish the source.Dai Haruki
Interface name (ex. eth0) is used as the prefix for the interrupt name, with _rx, _tx, and _er appended to distinguish multiple interrupts on the same interface. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17gianfar: Add Scatter Gather supportDai Haruki
Scatter Gather support in gianfar driver to handle fragmented frames on the transmit side. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17gianfar: Fix packet drop when out of memoryAndy Fleming
The patch which fixed gianfar so it drops packets when it runs out of memory left in the code which frees the skb when it drops packets. Change the code so that we only free the skb if the new skb was successfully created. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Make all BD status writes 32-bitDai Haruki
Whenever we want to update the status field in a BD, we usually want to update the length field, too. By combining them into one 32-bit field, we reduce the number of stores to memory shared with the controller, and we eliminate the need for order-enforcement, as the length and "READY" bit are now updated atomically at the same time. Signed-off-by: Dai Haruki <Dai.Haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Add macros for stepping through BDsAndy Fleming
This code is based strongly on code from Dai Haruki <Dai.Haruki@freescale.com>. The gianfar Buffer Descriptors are arranged in a circular array, the end of which is denoted by setting the "WRAP" bit in the descriptor. However, the software knows the end of the ring because it knows how many descriptors are there. Rather than check each descriptor for whether the WRAP bit is set, use pointer math to determine where the next BD is. This is also useful for when we want to look at BDs other than the very next one (for Scatter-Gather). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Remove unused gfar_add_fcb() function parameterDai Haruki
- Also, use cacheable_memzero instead of memset for performance reasons. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Enable padding and Optimize the frame prepended bytes handlingDai Haruki
The eTSEC can prepend up to 32 bytes to a received frame, usually for the purpose of aligning the IP address to a word boundary, so this turns it on. While we're in there, make the handling of the pre-frame bytes (padding and Frame Control Block) cleaner. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Fix VLAN HW feature related frame/buffer size calculation.Dai Haruki
Optimize the VLAN checking logic as well. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Fix eTSEC configuration procedureDai Haruki
Fix some bugs in the ethtool configuration functions: * gfar_clean_rx_ring should not be called with interrupts disabled. * Update last transmission time to avoid tx timeout. * Delete redundant NETIF_F_IP_CSUM check in gfar_start_xmit * Use netif_tx_lock_bh when reconfiguring the tx csum Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Optimize interrupt coalescing configurationDai Haruki
Store the interrupt coalescing values in the form in which they will be written to the interrupt coalescing registers. This puts a little overhead into the ethtool configuration, and takes it out of the interrupt handler Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Convert gianfar to an of_platform_driverAndy Fleming
Does the same for the accompanying MDIO driver, and then modifies the TBI configuration method. The old way used fields in einfo, which no longer exists. The new way is to create an MDIO device-tree node for each instance of gianfar, and create a tbi-handle property to associate ethernet controllers with the TBI PHYs they are connected to. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16gianfar: Use gfar_halt to stop DMA in gfar_probeAndy Fleming
gfar_halt does everything we want to do there, including disabling TX/RX. It also doesn't unnecessarily enable DMA if it's already stopped. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
2008-11-14gianfar: Fix DMA unmap invocationsAndy Fleming
We weren't unmapping DMA memory, which will break when gianfar gets used on systems with more than 32-bits of memory. Also, it's just plain wrong. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-11-10net: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller
The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller <davem@davemloft.net>