aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/vxge/vxge-traffic.c
AgeCommit message (Collapse)Author
2011-08-11s2io/vxge: Move the Exar driversJeff Kirsher
Move the Exar drivers into drivers/net/ethernet/neterion/ and make the necessary Kconfig and Makefile changes. CC: Jon Mason <jdmason@kudzu.us> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-21drivers/net: Remove casts of void *Joe Perches
Unnecessary casts of void * clutter the code. These are the remainder casts after several specific patches to remove netdev_priv and dev_priv. Done via coccinelle script (and a little editing): $ cat cast_void_pointer.cocci @@ type T; T *pt; void *pv; @@ - pt = (T *)pv; + pt = pv; Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-By: Chris Snook <chris.snook@gmail.com> Acked-by: Jon Mason <jdmason@kudzu.us> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-22Add appropriate <linux/prefetch.h> include for prefetch usersPaul Gortmaker
After discovering that wide use of prefetch on modern CPUs could be a net loss instead of a win, net drivers which were relying on the implicit inclusion of prefetch.h via the list headers showed up in the resulting cleanup fallout. Give them an explicit include via the following $0.02 script. ========================================= #!/bin/bash MANUAL="" for i in `git grep -l 'prefetch(.*)' .` ; do grep -q '<linux/prefetch.h>' $i if [ $? = 0 ] ; then continue fi ( echo '?^#include <linux/?a' echo '#include <linux/prefetch.h>' echo . echo w echo q ) | ed -s $i > /dev/null 2>&1 if [ $? != 0 ]; then echo $i needs manual fixup MANUAL="$i $MANUAL" fi done echo ------------------- 8\<---------------------- echo vi $MANUAL ========================================= Signed-off-by: Paul <paul.gortmaker@windriver.com> [ Fixed up some incorrect #include placements, and added some non-network drivers and the fib_trie.c case - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-01-19vxge: MSIX one shot modeJon Mason
To reduce the possibility of losing an interrupt in the handler due to a race between an interrupt processing and disable/enable of interrupts, enable MSIX one shot. Also, add support for adaptive interrupt coalesing Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-28vxge: remove duplicated part of checkDan Carpenter
This is just a cleanup to make the static checkers happy. We don't need to check "own" twice. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10vxge: code cleanup and reorganizationJon Mason
Move function locations to remove the need for internal declarations and other misc clean-ups. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Arpit Patel <arpit.patel@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-24vxge: make functions local and remove dead codestephen hemminger
Use results of make namespacecheck to make functions local and remove code that is not used. Also rename initialize_ethtool_ops to vxge_initialize_ethtool_ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-15vxge: Update copyright informationJon Mason
Update copyright information to reflect the Exar purchase of Neterion Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-15vxge: NETIF_F_LLTX removalJon Mason
NETIF_F_LLTX and it's usage of local transmit locks are depricated in favor of using the netdev queue's transmit lock. Remove the local lock and all references to it, and use the netdev queue transmit lock in the transmit completion handler. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-14drivers/net: Remove unnecessary returns from void function()sJoe Perches
This patch removes from drivers/net/ all the unnecessary return; statements that precede the last closing brace of void functions. It does not remove the returns that are immediately preceded by a label as gcc doesn't like that. It also does not remove null void functions with return. Done via: $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \ xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }' with some cleanups by hand. Compile tested x86 allmodconfig only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29vxge: Fixed MSIX interrupt configuration.Sreenivasa Honnur
- Fixed MSIX interrupt configuration to support non contiguous vpaths in functions. Four msi-x vectors are reserved per vpath internal to the chip. In all, there are 68 msi-x vectors for the 17 vpaths in the chip. In the multi function configurations, non-contiguous vpaths are configured to represent a function. For instance vpaths 0 and 8 can be configured to represent function zero. - If pci_enable_msix fails for the requested vectors, try with a lesser number vectors by reducing the vpath count. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29vxge: Fix a receive stall due to driver being out of synch with chip.Sreenivasa Honnur
- Fix a receive stall due to driver being out of synch with chip. In a corner case scenario the adapter's ring controller may return a RxD with transfer code of 0xC, while the host ownership bit is still set to the adapter. The driver needs to assume that this case where (host_ownership == 1 or adapter) and (transfer_code == 0xC) is valid, that is, this RxD has been returned by the receive ring controller but no frame data is associated with the rxd. - Restore the transfer code field of each newly replenished RxD to 0x0. - Code cleanup. Removed usage of magic numbers. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03drivers/net: Move && and || to end of previous lineJoe Perches
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-10-06vxge: Allow multiple functions with INTA.Sreenivasa Honnur
- Allow multiple functions with INTA. - Removed the condition to allow only one vpath with INTA - Ensure that the alarm bit in titan_mask_all_int register is cleared when driver exits. Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-06vxge: Fixed crash in PAE system due to wrong typecasting.Sreenivasa Honnur
- Fix a crash in PAE system due to wrong typecasting. - On PAE system size_t is unsigned int which is 32bit. Avoid casting 64 bit address to 32 bit Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-05vxge: prefetch RxD descriptorsBenjamin LaHaise
This patch prefetches RxD descriptors which helps to lower the latency of a cache miss in vxge_hw_ring_rxd_next_completed. This lowers the % of CPU time used by vxge_hw_ring_rxd_next_completed() where the descriptor is accessed in profiling netperf on a P4 Xeon from 1.5% to 1.0%. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-05vxge: improve tx performance by using mmiowb() instead of wmb()Benjamin LaHaise
wmb() is extremely heavy on x86. The semantics required in the driver are provided by mmiowb(), so use that and improve tx performance on P4 Xeons by 5-10%. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-05vxge: fix pktgen hangs (don't abuse skb->cb[])Benjamin LaHaise
This patch fixes a case in the transmit completion code which was resulting in pktgen hanging at the end of a run. The cause is due to the fact that the ->cb[] area of an skb cannot be used in a network driver's transmit path, as that area belongs to the network protocol. Pktgen hangs, as it sends out the same packet multiple times, and vxge's use of this area of the skb for a temporary list can only add the packet to the temporary list once (while it may be on the queue many times). The fix is to remove this abuse of skb->cb[]. Instead, skb pointers are placed into a temporary stack array, and then free outside of the tx lock. This retains the smp optimization of doing dev_kfree_skb() outside of the tx lock. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/scsi/fcoe/fcoe.c
2009-05-17Neterion: *FIFO1_DMA_ERR set twice, should 2nd be *FIFO2_DMA_ERR?roel kluin
FIFO1_DMA_ERR is set twice, the second should be FIFO2_DMA_ERR. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Ram Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-29Revert "vxge: use max() instead of VXGE_HW_SET_LEVEL"David S. Miller
This reverts commit 011983048a120e520147361be1067dd82343038e. Causes warnings in the build as reported by Stephen Rothwell. So this change is worse than what it's curing. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-27vxge: use max() instead of VXGE_HW_SET_LEVELAlexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Acked-by: Ram Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-27vxge: fix possible NULL dereference in vxge-traffic.cAlexander Beregalov
If vpath is NULL then hldev is NULL also. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Acked-by: Ram Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-02Neterion: New driver: Traffic & alarm handlerRamkrishna Vepa
This patch takes care of trafic handling related APIS. - Interrupt Enable and disable - Mask / Unmask Interrupt - Traffic Interrupt handling. - Alarm Interrupt handling. - Changes in this submission - - General clean up - removed redundant includes, defines and macros. - Changes in previous submissions - - General cleanup - removed unused functions and variables. - Use asserts where necessary - Reported by Andi Kleen - Fixed sparse warnings - Reported by Andi Kleen - Use a prefix, "__vxge" in front of hw functions to make them globally unique - Ben Hutchings Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>