summaryrefslogtreecommitdiff
path: root/drivers/net/ipg.c
AgeCommit message (Collapse)Author
2010-11-18ipg.c: remove id [SUNDANCE, 0x1021]Ken Kawasaki
ipg.c: The id [SUNDANCE, 0x1021] (=[0x13f0, 0x1021]) is defined at dl2k.h and ipg.c. But this device works better with dl2k driver. This problem is similar with the commit [25cca5352712561fba97bd37c495593d641c1d39 ipg: Remove device claimed by dl2k from pci id table] at 11 Feb 2010. Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-02drivers/net: avoid some skb->ip_summed initializationsEric Dumazet
fresh skbs have ip_summed set to CHECKSUM_NONE (0) We can avoid setting again skb->ip_summed to CHECKSUM_NONE in drivers. Introduce skb_checksum_none_assert() helper so that we keep this assertion documented in driver sources. Change most occurrences of : skb->ip_summed = CHECKSUM_NONE; by : skb_checksum_none_assert(skb); Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-11Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/stmmac/stmmac_main.c drivers/net/wireless/wl12xx/wl1271_cmd.c drivers/net/wireless/wl12xx/wl1271_main.c drivers/net/wireless/wl12xx/wl1271_spi.c net/core/ethtool.c net/mac80211/scan.c
2010-04-03net: convert multicast list to list_headJiri Pirko
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-30drivers/net/ipg: Remove invalid IPG_DDEBUG_MSG uses, neatenJoe Perches
Some no longer valid IPG_DDEBUG_MSG uses are removed Validate IPG_DDEBUG_MSG arguments when not #defined Neaten #defines marco/macro typo correction Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-02-22net: convert multiple drivers to use netdev_for_each_mc_addr, part4Jiri Pirko
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17ipg: Remove device claimed by dl2k from pci id tableJeff Mahoney
This patch removes D-Link DGE-550T PCI ID (1186:4000) from the ipg driver. The ipg driver is for IP2000-based cards and the DGE-550T is a DL2000-based card. The driver loads and works for a few moments, but once a real workload is applied it stops operating. The ipg driver claimed this ID since it was introduced in 2.6.24 and it's forced many users to blacklist it. The correct driver for this hardware is the dl2k driver, which has been claiming this PCI ID since the 2.4 days. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko
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-01-07drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan
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>
2009-11-18drivers/net/ipg.c: remove exceptional & on function nameJulia Lawall
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-13net: Use netdev_alloc_skb_ip_align()Eric Dumazet
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02netdev: drivers should make ethtool_ops constStephen Hemminger
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>
2009-09-01netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger
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-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang
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-04-07dma-mapping: replace all DMA_40BIT_MASK macro with DMA_BIT_MASK(40)Yang Hongyang
Replace all DMA_40BIT_MASK macro with DMA_BIT_MASK(40) 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-01-07ipg: update to net_device_opsStephen Hemminger
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ixgbe/ixgbe_main.c include/net/mac80211.h net/phonet/af_phonet.c
2008-11-19net: ipg.c fix bracing on endian swappingHarvey Harrison
rxfd->frag_info is a __le64, IPG_RFI_FRAGLEN is a cpu-endian constant and wants to be outside of the le64_to_cpu. Fixed in multiple places. Also an occurrence where le64_to_cpu was used instead of cpu_to_le64 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> 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>
2008-07-04ipg: run-time configurable jumbo frame supportPekka Enberg
Make jumbo frame support configurable via ifconfig mtu option as suggested by Stephen Hemminger. Cc: Stephen Hemminger <stephen.hemminger@vyatta.com> Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04ipg: per-device max_rxframe_sizePekka Enberg
Add a ->max_rxframe member to struct ipg_nic_private and convert the users of IPG_MAX_RXFRAME_SIZE to use it instead to enable per-device jumbo frame configuration. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04ipg: per-device rxsupport_sizePekka Enberg
Add a ->max_rxframe member to struct ipg_nic_private and convert the users of IPG_RXSUPPORT_SIZE to use it instead to enable per-device jumbo frame configuration. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04ipg: per-device rxfrag_sizePekka Enberg
Add a ->max_rxframe member to struct ipg_nic_private and convert the users of IPG_RXFRAG_SIZE to use it instead to enable per-device jumbo frame configuration. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04ipg: remove jumbo frame #ifdef from mtuPekka Enberg
Remove JUMBO_FRAME #ifdef from dev->mtu setting in ipg_nic_open() so that we can make IPG_TXFRAG_SIZE configurable. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-04ipg: always compile in jumbo frame supportPekka Enberg
Add a ->is_jumbo boolean to struct ipg_nic_private and fix up ipg_interrupt_handler() to call the jumbo frame version of ipg_nic_rx() if the boolean is set to true. Also remove the JUMBO_FRAME #ifdefs so we can always compile in support for jumbo frames. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27ipg: use NULL, not zero, for pointersPekka Enberg
Fixes a sparse warning in a code block that's hidden under JUMBO_FRAME #ifdef. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27ipg: fix jumbo frame compilationPekka Enberg
Make jumbo frame support compile again. It was broken by the cleanup series before the merge because the code is hidden under JUMBO_FRAME #ifdef. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-11ipg: fix receivemode IPG_RM_RECEIVEMULTICAST{,HASH} in ↵Roel Kluin
ipg_nic_set_multicast_list() The branches are dead code. even when dev->flag IFF_MULTICAST (defined 0x1000) is set, dev->flags & IFF_MULTICAST & [boolean] always evaluates to 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-03-17drivers/net/ipg.c: remove unused variableJulia Lawall
The variable gig is initialized but never used otherwise. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-17ipg fixAl Viro
spurious cpu_to_le64() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28ipg: add __devexit annotationAdrian Bunk
ipg_remove() can become __devexit. Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-01-28ipg: fix checkpatch reported errorsPekka Enberg
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28ipg: naming convention fixesPekka Enberg
This changes some camel-case names to follow proper kernel naming convention. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28ipg: remove some internal commentsPekka Enberg
This removes some now useless comments that were added when the driver was developed out-of-tree. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28ipg: remove commented out codePekka Enberg
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28ipg: remove driver versionPekka Enberg
The driver is in mainline now so there's no need to maintain a separate version number. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-28ipg: remove IPG_DEV_KFREE_SKB macroPekka Enberg
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw>
2008-01-17ipg: fix Tx completion irq requestFrancois Romieu
The current logic will only request an ack for the first pending packet. No irq is triggered as soon as the CPU submits a few packets a bit quickly. Let's request an irq for every packet instead. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-17ipg: fix queue stop condition in the xmit handlerFrancois Romieu
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-17ipg: plug Tx completion leakFrancois Romieu
The Tx skb release could not free more than one skb per call. Add it to the fact that the xmit handler does not check for a queue full condition and you have a recipe to leak quickly. Let's release every pending Tx descriptor which has been given back to the host CPU by the network controller. The xmit handler suggests that it is done through the IPG_TFC_TFDDONE bit. Remove the former "curr" computing: it does not produce anything usable in its current form. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-17ipg: balance locking in irq handlerFrancois Romieu
Spotted-by: <linux@horizon.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-10-25drivers/net/ipg.c: cleanupsAdrian Bunk
This patch contains the following cleanups: - make ipg_nic_get_stats() static - move DefaultPhyParam[] from ipg.h to ipg.c and make it static Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-14ipg: endianness fixesAl Viro
if your mask is host-endian, you should apply it after le64_to_cpu(); if it's little-endian - before. Doing both (for the same mask and little-endian value) is broken. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-10ipg.c doesn't compile with with CONFIG_HIGHMEM64Gtrem
I've tried to compile 2.6.23-rc8-mm2, but it fails on ipg.c with the error : ERROR: "__udivdi3" [drivers/net/ipg.ko] undefined! I've instigated a bit, and I've found this code in ipg.c : static void ipg_nic_txfree(struct net_device *dev) { struct ipg_nic_private *sp = netdev_priv(dev); void __iomem *ioaddr = sp->ioaddr; const unsigned int curr = ipg_r32(TFD_LIST_PTR_0) - (sp->txd_map / sizeof(struct ipg_tx)) - 1; unsigned int released, pending; sp->txd_map is an u64 because : dma_addr_t txd_map; And in asm-i386/types.h, I see : #ifdef CONFIG_HIGHMEM64G typedef u64 dma_addr_t; #else typedef u32 dma_addr_t; #endif I my config, I use CONFIG_HIGHMEM64G sizeof(struct ipg_tx) is an u32 So the div failed on i386 because of u64 / u32. [akpm@linux-foundation.org: cleanups] Cc: Sorbica Shieh <sorbica@icplus.com.tw> Cc: Jesse Huang <jesse@icplus.com.tw> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[IPG]: add IP1000A driver to kernel treeFrancois Romieu
Signed-off-by: Jesse Huang <jesse@icplus.com.tw> Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>