summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
Commit message (Collapse)AuthorAgeFilesLines
* WAN: bit and/or confusionroel kluin2009-08-301-4/+4
| | | | | | | Fix the tests that check whether Frame* bits are not set Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* WAN/LMC: Fix type_trans().Krzysztof Halasa2009-08-291-1/+1
| | | | | | | Fix lmc_proto_type() invocation. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* lmc: Read outside array boundsroel kluin2009-08-131-3/+4
| | | | | | | | If dev_alloc_skb() fails on the first iteration of the allocation loop, then we end up writing before the start of the array. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-08-123-7/+7
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: arch/microblaze/include/asm/socket.h
| * Remove multiple KERN_ prefixes from printk formatsJoe Perches2009-07-083-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up handling of log-levels and newlines") changed printk semantics. printk lines with multiple KERN_<level> prefixes are no longer emitted as before the patch. <level> is now included in the output on each additional use. Remove all uses of multiple KERN_<level>s in formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | net: convert remaining non-symbolic return values in ndo_start_xmit() functionsPatrick McHardy2009-07-055-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining occurences of raw return values to their symbolic counterparts in ndo_start_xmit() functions that were missed by the previous automatic conversion. Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero is changed to explicitly use NETDEV_TX_OK. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy2009-07-054-11/+11
| | | | | | | | | | | | | | | | | | | | | | 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>
* | net: remove NET_RX_BAD and NET_RX_CN* definesFlorian Westphal2009-07-051-19/+0
|/ | | | | | | | almost no users in the tree; and the few that use them treat them like NET_RX_DROP. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fix network drivers ndo_start_xmit() return valuesPatrick McHardy2009-06-171-11/+5
| | | | | | | | | | | | | | Fix up remaining drivers returning a magic or an errno value from their ndo_start_xmit() functions that were missed in the first pass: - isdn_net: missed conversion - bpqether: missed conversion: skb is freed, so return NETDEV_TX_OK - hp100: intention appears to be to resubmit skb once resources are available, but due to no queue handling it is dropped for now. - lapbether: skb is freed, so return NETDEV_TX_OK Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-06-151-5/+6
|\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/scsi/fcoe/fcoe.c net/core/drop_monitor.c net/core/net-traces.c
| * IXP4xx: Change QMgr function names to qmgr_stat_*_watermark and clean the ↵Krzysztof Hałasa2009-05-251-5/+4
| | | | | | | | | | | | comments. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
| * IXP4xx: Ethernet and WAN drivers now support "high" hardware queues.Krzysztof Hałasa2009-05-231-4/+6
| | | | | | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* | net: use symbolic values for ndo_start_xmit() return codesPatrick McHardy2009-06-133-5/+5
| | | | | | | | | | | | | | | | | | | | Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively. 0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases where its in direct proximity to one of the other values. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: fix network drivers ndo_start_xmit() return values (part 4)Patrick McHardy2009-06-131-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>
* | net: replace dma_sync_single with dma_sync_single_for_cpuFUJITA Tomonori2009-05-291-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>
* | net: release dst entry in dev_hard_start_xmit()Eric Dumazet2009-05-181-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>
* | Merge branch 'master' of ↵David S. Miller2009-05-181-2/+2
|\ \ | |/ | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/scsi/fcoe/fcoe.c
| * IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.Krzysztof Hałasa2009-05-091-2/+2
| | | | | | | | | | | | ENOSYS makes modutils complain about missing kernel module support. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
* | wan/pc300_drv: convert to net_device_opsAlexander Beregalov2009-04-171-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>
* dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28)Yang Hongyang2009-04-071-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>
* dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang2009-04-071-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>
* trivial: fix typo "varaible" -> "variable"Uwe Kleine-Koenig2009-03-301-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>
* wan: convert sdla driver to net_device_opsStephen Hemminger2009-03-271-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>
* Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6Linus Torvalds2009-03-261-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
| * Rationalize fasync return valuesJonathan Corbet2009-03-161-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>
* | sbni: convert to net_device_opsStephen Hemminger2009-03-211-6/+14
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sbni: use internal net_device_statsStephen Hemminger2009-03-211-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>
* | labether: convert to net_device_opsStephen Hemminger2009-03-211-4/+8
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | lapbether: convert to internal net_device_statsStephen Hemminger2009-03-211-16/+4
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cycx: convert to net_device_opsStephen Hemminger2009-03-211-20/+21
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | dlci: convert to net_device_opsStephen Hemminger2009-03-211-10/+12
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | dlci: convert to internal net_device_statsStephen Hemminger2009-03-211-21/+11
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | x25_asy: convert to net_device_opsStephen Hemminger2009-03-211-5/+9
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | x25_asy: convert to internal net_device_statsStephen Hemminger2009-03-212-23/+11
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: convert usage of packet_type to read_mostlyStephen Hemminger2009-03-102-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>
* | wan: remove some pointless conditionals before kfree_skb()Wei Yongjun2009-02-261-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>
* | lapb: get rid of non-const printk warningStephen Hemminger2009-02-261-1/+1
| | | | | | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | drivers/net/wan: fix sparse warning: symbol shadows an earlier oneHannes Eder2009-02-171-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>
* | drivers/net/wan: fix warning: format not a string literal and no ...Hannes Eder2009-02-172-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>
* | net: replace uses of __constant_{endian}Harvey Harrison2009-02-016-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>
* | net: Remove redundant NAPI functionsBen Hutchings2009-01-212-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>
* | WAN: Convert generic HDLC drivers to netdev_ops.Krzysztof Hałasa2009-01-2120-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>
* | WAN: Allow hw HDLC drivers to override dev->get_stats.Krzysztof Hałasa2009-01-211-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>
* | WAN: Generic HDLC now uses IFF_WAN_HDLC private flag.Krzysztof Hałasa2009-01-211-1/+2
|/ | | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* WAN: Fix NAPI interface in IXP4xx HSS driver.Krzysztof Hałasa2009-01-121-3/+3
| | | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Fix more NAPI interface netdev argument drop fallout.Kamalesh Babulal2008-12-291-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>
* drivers/net/wan/z85230.c: fix sparse warnings: un-EXPORT symbolsHannes Eder2008-12-261-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>
* drivers/net/wan: fix sparse warning: make symbol staticHannes Eder2008-12-261-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>
* drivers/net/wan: fix sparse warnings: make do-while a compound statementHannes Eder2008-12-261-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>
* Merge branch 'for-david' of ↵David S. Miller2008-12-254-5/+1339
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6
OpenPOWER on IntegriCloud