aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/via-velocity.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-04-06Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/bonding/bond_main.c drivers/net/via-velocity.c drivers/net/wireless/iwlwifi/iwl-agn.c
2010-04-06via-velocity: remove private #defineFrancois Romieu1-57/+57
Registers and their bits from mii.h. Courtesy from ed. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-03net: convert multicast list to list_headJiri Pirko1-3/+3
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-25via-velocity: Fix FLOW_CNTL_TX_RX handling in set_mii_flow_control()David S. Miller1-1/+1
Clear, don't set, ANAR_ASMDIR in this case. Noticed by Roel Kluin. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-26net: convert multiple drivers to use netdev_for_each_mc_addr, part6Jiri Pirko1-3/+3
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17via-velocity: Enable scatter/gather IO by defaultSimon Kagstrom1-1/+1
Reduces CPU utilization significantly with sendfile for example. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-14Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-21/+20
Conflicts: net/mac80211/rate.c
2010-02-12net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko1-2/+4
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10via-velocity: Fix races on shared interruptsSimon Kagstrom1-11/+10
This patch fixes two potential races in the velocity driver: * Move the ACK and error handler to the interrupt handler. This fixes a potential race with shared interrupts when the other device interrupts before the NAPI poll handler has finished. As the velocity driver hasn't acked it's own interrupt, it will then steal the interrupt from the other device. * Use spin_lock_irqsave in velocity_poll. In the current code, the interrupt handler will deadlock if e.g., the NAPI poll handler is executing when an interrupt (for another device) comes in since it tries to take the already held lock. Also unlock the spinlock only after enabling the interrupt in velocity_poll. The error path is moved to the interrupt handler since this is where the ISR is checked now. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Anders Grafstrom <anders.grafstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10via-velocity: Take spinlock on set coalesceSimon Kagstrom1-0/+3
velocity_set_coalesce touches ISR and some other sensitive registers not covered by the rtnl lock, so take the velocity spinlock. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-10via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srvSimon Kagstrom1-10/+7
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-10Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-4/+4
Conflicts: drivers/net/benet/be_cmds.h include/linux/sysctl.h
2010-01-07drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan1-1/+1
Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section in every case. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-03via-velocity: Give RX descriptors to the NIC later on open or MTU changeBen Hutchings1-4/+4
velocity_open() calls velocity_give_many_rx_descs(), which gives RX descriptors to the NIC, before installing an interrupt handler or calling velocity_init_registers(). I think this is very unsafe and it appears to explain the bug report <http://bugs.debian.org/508527>. On MTU change, velocity_give_many_rx_descs() is again called before velocity_init_registers(). I'm not sure whether this is unsafe but it does look wrong. Therefore, move the calls to velocity_give_many_rx_descs() after request_irq() and velocity_init_registers(). Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-by: Jan Ceuleers <jan.ceuleers@computer.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-29drivers/net/via-velocity.c: use %pM to shown MAC addressH Hartley Sweeten1-4/+2
Use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03drivers/net: Move && and || to end of previous lineJoe Perches1-8/+8
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-26via-velocity: Set tx checksum from ethtool instead of module parameterSimon Kagstrom1-14/+4
Defaults to on (as before). Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-26via-velocity: Re-enable transmit scatter-gather supportSimon Kagstrom1-30/+53
The velocity hardware can handle up to 7 memory segments. This can be turned on and off via ethtool. The support was removed in commit 83c98a8cd04dd0f848574370594886ba3bf56750 but is re-enabled and cleaned up here. It's off by default. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-26via-velocity: Change DMA_LENGTH_DEF (from the VIA driver)Simon Kagstrom1-1/+1
The VIA driver has changed the default for the DMA_LENGTH_DEF parameter. Together with adaptive interrupt supression and NAPI support, this improves performance quite a bit Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-26via-velocity: Implement NAPI supportSimon Kagstrom1-35/+46
This patch adds NAPI support for VIA velocity. The new velocity_poll function also pairs tx/rx handling twice which improves perforamance on some workloads (e.g., netperf UDP_STREAM) significantly (that part is from the VIA driver). Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-26via-velocity: Add ethtool interrupt coalescing supportSimon Kagstrom1-1/+159
(Partially from the upstream VIA driver). Tweaking the number of frames-per-interrupt and timer-until-interrupt can reduce the amount of CPU work quite a lot. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-26via-velocity: Correct 64-byte alignment for rx buffersSimon Kagstrom1-1/+2
(From the VIA driver). The current code does not guarantee 64-byte alignment since it simply does int add = skb->data & 63; skb->data += add; (via skb_reserve). So for example, if the skb->data address would be 0x10, this would result in 32-byte alignment (0x10 + 0x10). Correct by adding 64 - (skb->data & 63) instead. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-18drivers/net/via-velocity.c: remove exceptional & on function nameJulia Lawall1-1/+1
In this file, function names are otherwise used as pointers without &. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28via-velocity: Remove private device listBen Hutchings1-36/+3
via-velocity maintains a list of its devices in order to determine whether a netdev notification applies to one of them. That can be determined simply by checking the netdev_ops pointer, so the list can be removed. Compile-tested only. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-13net: Use netdev_alloc_skb_ip_align()Eric Dumazet1-2/+1
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03netdev: Remove redundant checks for CAP_NET_ADMIN in MDIO implementationsBen Hutchings1-4/+0
dev_ioctl() already checks capable(CAP_NET_ADMIN) before calling the driver's implementation of MDIO ioctls. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/yellowfin.c
2009-09-01netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger1-1/+2
In a couple of cases collapse some extra code like: int retval = NETDEV_TX_OK; ... return retval; into return NETDEV_TX_OK; Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-14via-velocity: Fix test of mii_status bit VELOCITY_DUPLEX_FULLroel kluin1-1/+1
Test whether VELOCITY_DUPLEX_FULL bit is set in mii_status. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-23Remove unnecessary forward declarations from velocity NIC driver.Dave Jones1-1681/+1580
By moving functions to before their first call, we eliminate the need to define forward references. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-23Fix up CodingStyle problems in via-velocity.cDave Jones1-95/+80
Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-23Remove unused zero-copy code from velocity NIC driver.Dave Jones1-66/+11
This code hasn't been enabled in forever. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy1-1/+1
This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-21via-velocity: Fix velocity driver unmapping incorrect size.Dave Jones1-1/+1
When a packet is greater than ETH_ZLEN, we end up assigning the boolean result of a comparison to the size we unmap. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-18via-velocity : fix no link detection on bootSéguier Régis1-1/+3
on boot, link is always up. Signed-off-by: Seguier Regis <rseguier@e-teleport.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-27net: use netdev stats in b44, sundance, via-rhine and via-velocityEric Dumazet1-11/+11
Use struct net_device_stats provided in struct net_device instead of private ones. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-11via-velocity : fix compilation warning.Séguier Régis1-2/+2
Fix this warning: drivers/net/via-velocity.c:1924: warning: passing argument 2 of 'request_irq' from incompatible pointer type Signed-off-by: Seguier Regis <rseguier@e-teleport.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-13via-velocity: Fix DMA mapping length errors on transmit.Dave Jones1-8/+7
From: Dave Jones <davej@redhat.com> The dma-debug changes caught that this driver uses the wrong DMA mapping length when skb_padto() does something. With suggestions from Eric Dumazet. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-20via-velocity: fix hot spinroel kluin1-1/+1
while(--j >= 0) keeps spinning when j is unsigned: Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-11netdev: add missing set_mac_address hookStephen Hemminger1-0/+1
Many drivers lost the ability to set ethernet address accidently during the net_device_ops conversion. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20netdev: add more functions to netdevice opsStephen Hemminger1-1/+1
This patch moves neigh_setup and hard_start_xmit into the network device ops structure. For bisection, fix all the previously converted drivers as well. Bonding driver took the biggest hit on this. Added a prefetch of the hard_start_xmit in the fast path to try and reduce any impact this would have. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-19via-velocity: convert to net_device_opsStephen Hemminger1-10/+14
Convert this driver to network device ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-18Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
2008-11-16via-velocity: enable perfect filtering for multicast packetsJoey Zhuo1-1/+1
Signed-off-by: Joey Zhuo <joeyzhuo@via.com.tw> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller1-2/+0
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>
2008-10-27via-velocity: use driver string instead of dev->name before register_netdev()Sven Hartge1-4/+7
This patch corrects a message bug in the via-velocity driver which bothered me for some time. The messages printed during device init look like the following: [ 8.486422] eth%d: set value of parameter Wake On Lan options to 0 ^^! [ 8.487340] eth0: VIA Networking Velocity Family Gigabit Ethernet Adapter Note the unresolved format string. dev->name is unavailable before register_netdev, so use dev_driver_string(&pdev->dev), which is also consistent with other drivers. "char *devname" parameters had to be converted to "const char *devname" to be consistent with dev_driver_string return value. Signed-off-by: Sven Hartge <sven@svenhartge.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-13net: Rationalise email address: Network Specific PartsAlan Cox1-1/+1
Clean up the various different email addresses of mine listed in the code to a single current and valid address. As Dave says his network merges for 2.6.28 are now done this seems a good point to send them in where they won't risk disrupting real changes. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-08via-velocity: Fix warnings on sparc64.Francois Romieu1-2/+2
As reported by Meelis Roos. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31via-velocity: velocity_init_{rd/tx}_ring use kcalloc(..., GFP_KERNEL).Francois Romieu1-46/+86
Allocate and free everyting outside of the locked section. Spotted-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Fixed-by: Seguier Regis <rseguier@e-teleport.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-31via-velocity: separated struct allow wholesale copy during MTU changes.Francois Romieu1-86/+87
It should help people fix the bugs in my code :o) Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>