aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb4vf (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-05-22Add appropriate <linux/prefetch.h> include for prefetch usersPaul Gortmaker1-0/+1
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-04-29ethtool: cosmetic: Use ethtool ethtool_cmd_speed APIDavid Decotigny1-1/+2
This updates the network drivers so that they don't access the ethtool_cmd::speed field directly, but use ethtool_cmd_speed() instead. For most of the drivers, these changes are purely cosmetic and don't fix any problem, such as for those 1GbE/10GbE drivers that indirectly call their own ethtool get_settings()/mii_ethtool_gset(). The changes are meant to enforce code consistency and provide robustness with future larger throughputs, at the expense of a few CPU cycles for each ethtool operation. All drivers compiled with make allyesconfig ion x86_64 have been updated. Tested: make allyesconfig on x86_64 + e1000e/bnx2x work Signed-off-by: David Decotigny <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-17net: cxgb4{,vf}: convert to hw_featuresMichał Mirosław3-57/+10
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller2-5/+5
Conflicts: drivers/net/smsc911x.c
2011-04-08cxgb4vf: drop phys_id interface and implement the newer set_phys_idDimitris Michailidis1-3/+12
Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-31Fix common misspellingsLucas De Marchi2-5/+5
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-02-14cxgb4vf: Use defined Mailbox TimeoutCasey Leedom1-1/+1
VF Driver should use mailbox command timeout specified in t4fw_interface.h rather than hard-coded value of 500ms. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-14cxgb4vf: Quiesce Virtual Interfaces on shutdown ...Casey Leedom1-0/+41
When a Virtual Machine is rebooted, KVM currently fails to issue a Function Level Reset against any "Attached PCI Devices" (AKA "PCI Passthrough"). In addition to leaving the attached device in a random state in the next booted kernel (which sort of violates the entire idea of a reboot reseting hardware state), this leaves our peer thinking that the link is still up. (Note that a bug has been filed with the KVM folks, #25332, but there's been no response on that as of yet.) So, we add a "->shutdown()" method for the Virtual Function PCI Device to handle administrative shutdowns like a reboot. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-14cxgb4vf: Behave properly when CONFIG_DEBUG_FS isn't defined ...Casey Leedom1-8/+8
When CONFIG_DEBUG_FS we get "ERR_PTR()"s back from the debugfs routines instead of NULL. Use the right predicates to check for this. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-14cxgb4vf: Check driver parameters in the right place ...Casey Leedom1-12/+11
Check module parameter validity in the module initialization routine instead of the PCI Device Probe routine. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-11cxgb4vf: recover from failure in cxgb4vf_open()Casey Leedom1-5/+10
If the Link Start fails in cxgb4vf_open(), we need to back out any state that we've built up ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-10cxgb4vf: fix mailbox data/control coherency domain raceCasey Leedom1-0/+11
For the VFs, the Mailbox Data "registers" are actually backed by T4's "MA" interface rather than PL Registers (as is the case for the PFs). Because these are in different coherency domains, the write to the VF's PL-register-backed Mailbox Control can race in front of the writes to the MA-backed VF Mailbox Data "registers". So we need to do a read-back on at least one byte of the VF Mailbox Data registers before doing the write to the VF Mailbox Control register. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-21drivers/net/*/: Use static constJoe Perches1-1/+1
Using static const generally increases object text and decreases data size. It also generally decreases overall object size. Signed-off-by: Joe Perches <joe@perches.com>
2010-12-17Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-4/+11
Conflicts: drivers/net/bnx2x/bnx2x.h drivers/net/wireless/iwlwifi/iwl-1000.c drivers/net/wireless/iwlwifi/iwl-6000.c drivers/net/wireless/iwlwifi/iwl-core.h drivers/vhost/vhost.c
2010-12-10cxgb4vf: Ingress Queue Entry Size needs to be 64 bytesCasey Leedom1-4/+11
Was using L1_CACHE_BYTES for the Ingress Queue Entry Size but it really needs to be 64 bytes in order to support the largest message sizes. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-08Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller2-63/+104
Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c net/llc/af_llc.c
2010-11-28cxgb4vf: fix setting unicast/multicast addresses ...Casey Leedom2-63/+104
We were truncating the number of unicast and multicast MAC addresses supported. Additionally, we were incorrectly computing the MAC Address hash (a "1 << N" where we needed a "1ULL << N"). Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-15cxgb4vf: Advertise NETIF_F_TSO_ECN.Casey Leedom1-3/+8
Advertise NETIF_F_TSO_ECN. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-15cxgb4vf: fix up "Section Mismatch" compiler warning.Casey Leedom1-2/+2
Fix up "Section Mismatch" compiler warning and mark another routine as __devinit. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-15cxgb4vf: add ethtool statistics for GRO.Casey Leedom1-0/+6
Add ethtool statistics for GRO. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-15cxgb4vf: minor comment/symbolic name cleanup.Casey Leedom4-13/+14
Minor cleanup of comments and symbolic constant names for clarity. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-12cxgb4vf: add call to Firmware to reset VF State.Casey Leedom3-0/+36
Add call to Firmware to reset its VF State when we first attach to the VF. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-12cxgb4vf: Fail open if link_start() fails.Casey Leedom1-1/+3
Fail open if link_start() fails. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-12cxgb4vf: flesh out PCI Device ID Table ...Casey Leedom1-0/+8
Add a bunch of T4 Device IDs for the VF Driver. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-12cxgb4vf: fix some errors in Gather List to skb conversionCasey Leedom1-47/+74
There were some errors in the way that internal Gather Lists were being translated into skb's. This also makes the VF Driver look more like the PF Driver to facilitate easier comarison. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-12cxgb4vf: fix bug in Generic Receive OffloadCasey Leedom1-0/+1
Fix botch in Generic Receive Offload (the Packet Gather List Total length field wasn't being initialized). Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-12cxgb4vf: don't implement trivial (and incorrect) ndo_select_queue()Casey Leedom1-14/+0
Don't implement (struct net_device_ops *)->ndo_select_queue() with simple call to skb_tx_hash(). This leads to non-persistent TX queue selection in the Linux dev_pick_tx() routine for TCP connections. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-01cxgb4vf: remove call to stop TX queues at load time.Divy Le Ray1-1/+0
Stopping TX queues at driver load time is not necessary. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-16cxgb4vf: make single bit signed bitfields unsignedHarvey Harrison1-13/+13
Single bit signed bitfields don't make a lot of sense, noticed by sparse: drivers/net/cxgb4vf/t4vf_common.h:135:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:136:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:137:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:138:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:139:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:140:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:141:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:142:35: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:143:35: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:154:27: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:155:26: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:156:27: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:157:26: error: dubious one-bit signed bitfield Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-27cxgb4vf: Use netif_set_real_num_{rx, tx}_queues()Ben Hutchings1-1/+4
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-02drivers/net: avoid some skb->ip_summed initializationsEric Dumazet1-1/+1
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-09-02net: another last_rx roundEric Dumazet1-1/+0
Kill last_rx use in l2tp and two net drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-04cxgb4vf: do not use PCI resources before pci_enable_device()Kulikov Vasiliy1-15/+16
IRQ and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. The semantic match that finds this problem is as follows: // <smpl> @@ identifier x; identifier request ~= "pci_request.*|pci_resource.*"; @@ ( * x->irq | * x->resource | * request(x, ...) ) ... *pci_enable_device(x) // </smpl> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-20cxgb4vf: Fix bug where we were only allocating one queue in MSI modeCasey Leedom1-4/+2
Fix bug in setup_sge_queues() where we were incorrectly only allocating a single "Queue Set" for MSI mode. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-20cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay arrayCasey Leedom1-1/+1
Fix off-by-one error in checking for the end of the mailbox response delay array. We ended up walking off the end and, if we were unlucky, we'd end up pulling in a 0 and never terminate the mailbox response delay loop ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-15cxgb4vf: fix SGE resource resource deallocation bugCasey Leedom1-1/+1
Fix SGE resource resource deallocation bug. Forgot to increment the RXQ and TXQ cursors in the loop ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-12cxgb4vf: fix TX Queue restartCasey Leedom2-28/+16
Fix up TX Queue Host Flow Control to cause an Egress Queue Status Update to be generated when we run out of TX Queue Descriptors. This will, in turn, allow us to restart a stopped TX Queue. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-08cxgb4vf: Implement "Unhandled Interrupts" statisticCasey Leedom2-3/+8
Implement "Unhandled Interrupts" statistic so we can detect when the hardware tells us that it things we have work to do but we don't find anything ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-08cxgb4vf: remove obsolete DECLARE_PCI_UNMAP_ADDR usageFUJITA Tomonori1-9/+5
We could use DEFINE_DMA_UNMAP_ADDR instead but using CONFIG_NEED_DMA_MAP_STATE is a simpler way to see if a platform does real DMA unmapping. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-30cxgb4vf: Use correct shift factor for extracting the SGE DMA Ingress Padding BoundaryCasey Leedom1-1/+1
Use correct shift factor for extracting the SGE DMA Ingress Padding Boundary. Was accidentally using the register field's shift which was close enough (4 instead of the propper value of 5) that it actually sort of worked for various packet sizes ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-30cxgb4vf: Remove obsolete comment about the lack of a TX Timer CallbackCasey Leedom1-12/+1
Remove obsolete comment about the lack of a TX Timer Callback -- which we now _do_ have ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-28cxgb4vf: Add new Makefile for T4 PCI-E SR-IOV Virtual Function driver cxgb4vfCasey Leedom1-0/+7
Add new Makefile for T4 PCI-E SR-IOV Virtual Function driver "cxgb4vf". Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-28cxgb4vf: Add main T4 PCI-E SR-IOV Virtual Function driver for cxgb4vfCasey Leedom2-0/+3446
Add main T4 PCI-E SR-IOV Virtual Function driver for "cxgb4vf". Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-28cxgb4vf: Add T4 Virtual Function Scatter-Gather Engine DMA codeCasey Leedom1-0/+2460
Add T4 Virtual Function Scatter-Gather Engine DMA code. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-28cxgb4vf: Add core T4 PCI-E SR-IOV Virtual Function hardware definitions and device communication codeCasey Leedom3-0/+1727
Add core T4 PCI-E SR-IOV Virtual Function hardware definitions and device communication code. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>