aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-06-13net: fix network drivers ndo_start_xmit() return values (part 4)Patrick McHardy1-3/+3
Fix up WAN drivers that return an errno value to qdisc_restart(), causing qdisc_restart() to print a warning an requeue/retransmit the skb. - cycx_x25: intention appears to be to requeue the skb Does not compile cleanly for me even without this patch, so untested. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29net: replace dma_sync_single with dma_sync_single_for_cpuFUJITA Tomonori1-2/+2
This replaces dma_sync_single() with dma_sync_single_for_cpu() because dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says: /* Backwards compat, remove in 2.7.x */ #define dma_sync_single dma_sync_single_for_cpu #define dma_sync_sg dma_sync_sg_for_cpu Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-25IXP4xx: Change QMgr function names to qmgr_stat_*_watermark and clean the comments.Krzysztof Hałasa1-5/+4
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-05-23IXP4xx: Ethernet and WAN drivers now support "high" hardware queues.Krzysztof Hałasa1-4/+6
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-05-18net: release dst entry in dev_hard_start_xmit()Eric Dumazet1-0/+1
One point of contention in high network loads is the dst_release() performed when a transmited skb is freed. This is because NIC tx completion calls dev_kree_skb() long after original call to dev_queue_xmit(skb). CPU cache is cold and the atomic op in dst_release() stalls. On SMP, this is quite visible if one CPU is 100% handling softirqs for a network device, since dst_clone() is done by other cpus, involving cache line ping pongs. It seems right place to release dst is in dev_hard_start_xmit(), for most devices but ones that are virtual, and some exceptions. David Miller suggested to define a new device flag, set in alloc_netdev_mq() (so that most devices set it at init time), and carefuly unset in devices which dont want a NULL skb->dst in their ndo_start_xmit(). List of devices that must clear this flag is : - loopback device, because it calls netif_rx() and quoting Patrick : "ip_route_input() doesn't accept loopback addresses, so loopback packets already need to have a dst_entry attached." - appletalk/ipddp.c : needs skb->dst in its xmit function - And all devices that call again dev_queue_xmit() from their xmit function (as some classifiers need skb->dst) : bonding, vlan, macvlan, eql, ifb, hdlc_fr Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-18Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-2/+2
Conflicts: drivers/scsi/fcoe/fcoe.c
2009-05-09IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.Krzysztof Hałasa1-2/+2
ENOSYS makes modutils complain about missing kernel module support. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2009-04-17wan/pc300_drv: convert to net_device_opsAlexander Beregalov1-8/+12
On Fri, Apr 17, 2009 at 05:23:02AM +0400, Alexander Beregalov wrote: > > Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> > --- > drivers/net/wan/pc300_drv.c | 22 ++++++++++++++-------- > 1 files changed, 14 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c > index c23fde0..df10a4c 100644 > --- a/drivers/net/wan/pc300_drv.c > +++ b/drivers/net/wan/pc300_drv.c > @@ -225,6 +225,7 @@ static char rcsid[] = > #include <linux/skbuff.h> > #include <linux/if_arp.h> > #include <linux/netdevice.h> > +#include <linux/etherdevice.h> > #include <linux/spinlock.h> > #include <linux/if.h> > #include <net/arp.h> > @@ -3246,6 +3247,18 @@ static inline void show_version(void) > rcsvers, rcsdate, __DATE__, __TIME__); > } /* show_version */ > > +static const struct net_device_ops cpc_netdev_ops = { > + .ndo_init = NULL, > + .ndo_open = cpc_open, > + .ndo_stop = cpc_close, > + .ndo_tx_timeout = cpc_tx_timeout, > + .ndo_set_multicast_list = NULL, In this case ndo_init and ndo_set_multicast_list are not needed. >From 1507a5a797a5f0005696a9bf10e390caca9c3800 Mon Sep 17 00:00:00 2001 From: Alexander Beregalov <a.beregalov@gmail.com> Date: Fri, 17 Apr 2009 05:45:48 +0400 Subject: [PATCH] wan/pc300_drv: convert to net_device_ops Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-07dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28)Yang Hongyang1-2/+2
Replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang1-2/+2
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-30trivial: fix typo "varaible" -> "variable"Uwe Kleine-Koenig1-1/+1
This patch was created by git grep -l '[vV]araible' | xargs -r -t perl -p -i -e 's/\b([Vv]ar)ai(bles?)\b/$1ia$2/g' Signed-off-by: Uwe Kleine-Koenig <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-27wan: convert sdla driver to net_device_opsStephen Hemminger1-21/+15
Also use internal net_device_stats Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-26Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6Linus Torvalds1-2/+2
* 'bkl-removal' of git://git.lwn.net/linux-2.6: Rationalize fasync return values Move FASYNC bit handling to f_op->fasync() Use f_lock to protect f_flags Rename struct file->f_ep_lock
2009-03-21sbni: convert to net_device_opsStephen Hemminger1-6/+14
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21sbni: use internal net_device_statsStephen Hemminger1-42/+26
Convert to use existing net_device_stats. This driver, has bad style, of using commas, when brackets should be used... Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21labether: convert to net_device_opsStephen Hemminger1-4/+8
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21lapbether: convert to internal net_device_statsStephen Hemminger1-16/+4
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21cycx: convert to net_device_opsStephen Hemminger1-20/+21
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21dlci: convert to net_device_opsStephen Hemminger1-10/+12
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21dlci: convert to internal net_device_statsStephen Hemminger1-21/+11
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21x25_asy: convert to net_device_opsStephen Hemminger1-5/+9
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21x25_asy: convert to internal net_device_statsStephen Hemminger2-23/+11
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-16Rationalize fasync return valuesJonathan Corbet1-2/+2
Most fasync implementations do something like: return fasync_helper(...); But fasync_helper() will return a positive value at times - a feature used in at least one place. Thus, a number of other drivers do: err = fasync_helper(...); if (err < 0) return err; return 0; In the interests of consistency and more concise code, it makes sense to map positive return values onto zero where ->fasync() is called. Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2009-03-10net: convert usage of packet_type to read_mostlyStephen Hemminger2-2/+2
Protocols that use packet_type can be __read_mostly section for better locality. Elminate any unnecessary initializations of NULL. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26wan: remove some pointless conditionals before kfree_skb()Wei Yongjun1-2/+1
Remove some pointless conditionals before kfree_skb(). Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26lapb: get rid of non-const printk warningStephen Hemminger1-1/+1
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17drivers/net/wan: fix sparse warning: symbol shadows an earlier oneHannes Eder1-8/+9
Impact: Rename function scope variable and while being at it fix some coding style issues. Fix this sparse warning: drivers/net/wan/sbni.c:1526:14: warning: symbol 'num' shadows an earlier one drivers/net/wan/sbni.c:160:13: originally declared here Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-17drivers/net/wan: fix warning: format not a string literal and no ...Hannes Eder2-2/+4
Impact: Use 'static const char[]' instead of 'static char[]'. Fix this compilation warnings: drivers/net/wan/lapbether.c: In function 'lapbeth_init_driver': drivers/net/wan/lapbether.c:441: warning: format not a string literal and no format arguments drivers/net/wan/z85230.c: In function 'z85230_init_driver': drivers/net/wan/z85230.c:1782: warning: format not a string literal and no format arguments Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01net: replace uses of __constant_{endian}Harvey Harrison6-21/+21
Base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21net: Remove redundant NAPI functionsBen Hutchings2-8/+8
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-21WAN: Convert generic HDLC drivers to netdev_ops.Krzysztof Hałasa20-105/+137
Also remove unneeded last_rx update from Synclink drivers. Synclink part mostly by Stephen Hemminger. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21WAN: Allow hw HDLC drivers to override dev->get_stats.Krzysztof Hałasa1-11/+1
Use the internal get_stats() by default. Fixes LMC and wanXL drivers. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21WAN: Generic HDLC now uses IFF_WAN_HDLC private flag.Krzysztof Hałasa1-1/+2
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-12WAN: Fix NAPI interface in IXP4xx HSS driver.Krzysztof Hałasa1-3/+3
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29net: Fix more NAPI interface netdev argument drop fallout.Kamalesh Babulal1-1/+1
I hit similar build failure due to the change in the netif_rx_reschedule() drivers/net/ehea/ehea_main.c: In function 'ehea_poll': drivers/net/ehea/ehea_main.c:844: warning: passing argument 1 of 'netif_rx_reschedule' from incompatible pointer type drivers/net/ehea/ehea_main.c:844: error: too many arguments to function 'netif_rx_reschedule' make[3]: *** [drivers/net/ehea/ehea_main.o] Error 1 greping through the sources for the changes missed out, we have ./drivers/net/arm/ixp4xx_eth.c:507: netif_rx_reschedule(dev, napi)) { ./drivers/net/arm/ep93xx_eth.c:310: if (more && netif_rx_reschedule(dev, napi)) ./drivers/net/wan/ixp4xx_hss.c:657: netif_rx_reschedule(dev, napi)) { Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26drivers/net/wan/z85230.c: fix sparse warnings: un-EXPORT symbolsHannes Eder1-8/+2
The symbols are only references within the translation unit they are defined in, so un-EXPORT them und make them 'static'. Fix this sparse warnings: drivers/net/wan/z85230.c:604:25: warning: symbol 'z8530_dma_sync' was not declared. Should it be static? drivers/net/wan/z85230.c:613:25: warning: symbol 'z8530_txdma_sync' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26drivers/net/wan: fix sparse warning: make symbol staticHannes Eder1-1/+1
Fix this sparse warning: drivers/net/wan/x25_asy.c:623:5: warning: symbol 'x25_asy_esc' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26drivers/net/wan: fix sparse warnings: make do-while a compound statementHannes Eder1-4/+4
Fix this sparse warnings: drivers/net/wan/wanxl.c:414:3: warning: do-while statement is not a compound statement drivers/net/wan/wanxl.c:441:3: warning: do-while statement is not a compound statement Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-25Merge branch 'for-david' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6David S. Miller4-5/+1339
2008-12-25drivers/net/wan: Remove redundant testJulia Lawall1-3/+2
arg is checked not to be NULL a few lines before. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ... when forall return ...; } ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\) ( x@p2 == NULL | x@p2 != NULL ) // another path to the test that is not through p1? @s exists@ local idexpression r.x; position r.p1,r.p2; @@ ... when != x@p1 ( x@p2 == NULL | x@p2 != NULL ) @fix depends on !s@ position r.p1,r.p2; expression x,E; statement S1,S2; @@ ( - if ((x@p2 != NULL) || ...) S1 | - if ((x@p2 == NULL) && ...) S1 | - BUG_ON(x@p2 == NULL); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22net: Remove unused netdev arg from some NAPI interfaces.Neil Horman1-2/+2
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-22drivers/net/wan: Remove redundant testJulia Lawall1-3/+2
arg is checked not to be NULL a few lines before. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ... when forall return ...; } ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\) ( x@p2 == NULL | x@p2 != NULL ) // another path to the test that is not through p1? @s exists@ local idexpression r.x; position r.p1,r.p2; @@ ... when != x@p1 ( x@p2 == NULL | x@p2 != NULL ) @fix depends on !s@ position r.p1,r.p2; expression x,E; statement S1,S2; @@ ( - if ((x@p2 != NULL) || ...) S1 | - if ((x@p2 == NULL) && ...) S1 | - BUG_ON(x@p2 == NULL); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22HDLC_PPP: Fix Configure-Ack to return original options as required by the standard.Krzysztof Hałasa1-5/+6
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22IXP4xx: move common debugging from network drivers to QMGR module.Krzysztof Hałasa1-43/+11
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22WAN: Add IXP4xx HSS HDLC driver.Krzysztof Hałasa3-0/+1365
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-05tty: driverdata and discdata are void *Alan Cox1-5/+5
Remove all the extra casting while we are cleaning up Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05tty: Flags should be accessed via the foo_bit interfacesAlan Cox1-4/+4
We have various drivers that poke around directly and we need to clean this up before it causes problems. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25z85230: fix warning in drivers/net/wan/z85230.cIngo Molnar1-1/+1
this warning: drivers/net/wan/z85230.c: In function ‘z8530_interrupt’: drivers/net/wan/z85230.c:713: warning: ‘intr’ may be used uninitialized in this function is clearly bogus - annotate it. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-24netdevice sbni: Convert directly reference of netdev->privWang Chen1-47/+52
1. convert netdev->priv to netdev_priv(). 2. make sbni_pci_probe() be static. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-22WAN pc300too.c: Fix PC300-X.21 detectionKrzysztof Hałasa1-24/+24
pc300too driver works around a bug in PCI9050 bridge. Unfortunately it was doing that too late. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>