summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3
Commit message (Collapse)AuthorAgeFilesLines
* cxgb3: Allow 64KB firmware images.Steve Wise2008-07-291-1/+1
| | | | | | | Starting with FW version 7.0, the driver needs to allow larger images. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* dma-mapping: add the device argument to dma_mapping_error()FUJITA Tomonori2008-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER architecture does: This enables us to cleanly fix the Calgary IOMMU issue that some devices are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423). I think that per-device dma_mapping_ops support would be also helpful for KVM people to support PCI passthrough but Andi thinks that this makes it difficult to support the PCI passthrough (see the above thread). So I CC'ed this to KVM camp. Comments are appreciated. A pointer to dma_mapping_ops to struct dev_archdata is added. If the pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's NULL, the system-wide dma_ops pointer is used as before. If it's useful for KVM people, I plan to implement a mechanism to register a hook called when a new pci (or dma capable) device is created (it works with hot plugging). It enables IOMMUs to set up an appropriate dma_mapping_ops per device. The major obstacle is that dma_mapping_error doesn't take a pointer to the device unlike other DMA operations. So x86 can't have dma_mapping_ops per device. Note all the POWER IOMMUs use the same dma_mapping_error function so this is not a problem for POWER but x86 IOMMUs use different dma_mapping_error functions. The first patch adds the device argument to dma_mapping_error. The patch is trivial but large since it touches lots of drivers and dma-mapping.h in all the architecture. This patch: dma_mapping_error() doesn't take a pointer to the device unlike other DMA operations. So we can't have dma_mapping_ops per device. Note that POWER already has dma_mapping_ops per device but all the POWER IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device argument. [akpm@linux-foundation.org: fix sge] [akpm@linux-foundation.org: fix svc_rdma] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: fix bnx2x] [akpm@linux-foundation.org: fix s2io] [akpm@linux-foundation.org: fix pasemi_mac] [akpm@linux-foundation.org: fix sdhci] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: fix sparc] [akpm@linux-foundation.org: fix ibmvscsi] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'master' of ↵David S. Miller2008-07-185-6/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: Documentation/powerpc/booting-without-of.txt drivers/atm/Makefile drivers/net/fs_enet/fs_enet-main.c drivers/pci/pci-acpi.c net/8021q/vlan.c net/iucv/iucv.c
| * RDMA/cxgb3: Fixes for zero STagSteve Wise2008-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling the zero STag in receive work request requires some extra logic in the driver: - Only set the QP_PRIV bit for kernel mode QPs. - Add a zero STag build function for recv wrs. The uP needs a PBL allocated and passed down in the recv WR so it can construct a HW PBL for the zero STag S/G entries. Note: we need to place a few restrictions on zero STag usage because of this: 1) all SGEs in a recv WR must either be zero STag or not. No mixing. 2) an individual SGE length cannot exceed 128MB for a zero-stag SGE. This should be OK since it's not really practical to allocate such a large chunk of pinned contiguous DMA mapped memory. - Add an optimized non-zero-STag recv wr format for kernel users. This is needed to optimize both zero and non-zero STag cracking in the recv path for kernel users. - Remove the iwch_ prefix from the static build functions. - Bump required FW version. Signed-off-by: Steve Wise <swise@opengridcomputing.com>
| * RDMA/cxgb3: Add support for protocol statisticsSteve Wise2008-07-142-0/+8
| | | | | | | | | | | | | | | | | | | | | | - Add a new rdma ctl command called RDMA_GET_MIB to the cxgb3 low level driver to obtain the protocol mib from the rnic hardware. - Add new iw_cxgb3 provider method to get the MIB from the low level driver. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * cxgb3: treat firmware data as constDavid Woodhouse2008-07-102-5/+7
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | cxgb3 - Add iscsi supportKaren Xie2008-07-115-8/+59
| | | | | | | | | | | | | | Add iSCSI (S3xx) support. Signed-off-by: Karen Xie <kxie@chelsio.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | vlan: move struct vlan_dev_info to private headerPatrick McHardy2008-07-081-1/+1
| | | | | | | | | | | | | | | | | | Hide struct vlan_dev_info from drivers to prevent them from growing more creative ways to use it. Provide accessors for the two drivers that currently use it. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cxgb3 - add missing adapter type for RDMADivy Le Ray2008-06-242-2/+22
| | | | | | | | | | | | | | T3C added support is now reflected to the RDMA driver. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | cxgb3 - Add LRO supportDivy Le Ray2008-05-226-12/+267
| | | | | | | | | | | | | | Add LRO support. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | cxgb3 - Add page support to jumbo frame Rx queueDivy Le Ray2008-05-222-35/+84
| | | | | | | | | | | | | | Add page support to Jumbo frame Rx queues. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | cxgb3 - Fix dma mapping error pathDivy Le Ray2008-05-221-12/+41
|/ | | | | | | Take potential dma mapping errors in account. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* cxgb3 - fix EEHDivy Le Ray2008-05-135-6/+70
| | | | | | | | | Reset the chip when the PCI link goes down. Preserve the napi structure when a sge qset's resources are freed. Replay only HW initialization when the chip comes out of reset. Signed-off-by: Divy Le ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* cxgb3 - fix port up/down error pathDivy Le Ray2008-05-132-15/+18
| | | | | | | | Fix faiures path when ports are stopped and restarted in EEH recovery. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* cxgb3: Use CAP_SYS_RAWIO for firmwareAlan Cox2008-05-061-2/+2
| | | | | | | | | | | | | | | Otherwise theoretically at least CAP_NET_ADMIN Reload new firmware Wait.. Firmware patches kernel So it should be CAY_SYS_RAWIO - not that I suspect this is in fact a credible attack vector! Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* RDMA/cxgb3: Support peer-2-peer connection setupSteve Wise2008-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Open MPI, Intel MPI and other applications don't respect the iWARP requirement that the client (active) side of the connection send the first RDMA message. This class of application connection setup is called peer-to-peer. Typically once the connection is setup, _both_ sides want to send data. This patch enables supporting peer-to-peer over the chelsio RNIC by enforcing this iWARP requirement in the driver itself as part of RDMA connection setup. Connection setup is extended, when the peer2peer module option is 1, such that the MPA initiator will send a 0B Read (the RTR) just after connection setup. The MPA responder will suspend SQ processing until the RTR message is received and reply-to. In the longer term, this will be handled in a standardized way by enhancing the MPA negotiation so peers can indicate whether they want/need the RTR and what type of RTR (0B read, 0B write, or 0B send) should be sent. This will be done by standardizing a few bits of the private data in order to negotiate all this. However this patch enables peer-to-peer applications now and allows most of the required firmware and driver changes to be done and tested now. Design: - Add a module option, peer2peer, to enable this mode. - New firmware support for peer-to-peer mode: - a new bit in the rdma_init WR to tell it to do peer-2-peer and what form of RTR message to send or expect. - process _all_ preposted recvs before moving the connection into rdma mode. - passive side: defer completing the rdma_init WR until all pre-posted recvs are processed. Suspend SQ processing until the RTR is received. - active side: expect and process the 0B read WR on offload TX queue. Defer completing the rdma_init WR until all pre-posted recvs are processed. Suspend SQ processing until the 0B read WR is processed from the offload TX queue. - If peer2peer is set, driver posts 0B read request on offload TX queue just after posting the rdma_init WR to the offload TX queue. - Add CQ poll logic to ignore unsolicitied read responses. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* net: Remove unnecessary inclusions of asm/semaphore.hMatthew Wilcox2008-04-182-2/+0
| | | | | | | | | None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* cxgb3: Fix __must_check warning with dev_dbg.Dan Noe2008-04-171-2/+2
| | | | | | | | | | | | | | | Fix the warning: drivers/net/cxgb3/cxgb3_main.c: In function ‘offload_open’: drivers/net/cxgb3/cxgb3_main.c:936: warning: ignoring return value of ‘sysfs_create_group’, declared with attribute warn_unused_result Now the return value is checked; if sysfs_create_group() returns failure, a warning is printed using dev_dbg, and the code continues as before. Use of dev_dbg ensures printk is not needlessly included unless desired for debugging. Signed-off-by: Dan Noe <dpn@isomerica.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Merge branch 'master' of ↵David S. Miller2008-03-271-9/+9
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/usb/rndis_host.c drivers/net/wireless/b43/dma.c net/ipv6/ndisc.c
| * cxgb3: Fix lockdep problems with sge.reg_lockRoland Dreier2008-03-251-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using iWARP with a Chelsio T3 NIC generates the following lockdep warning: ================================= [ INFO: inconsistent lock state ] 2.6.25-rc6 #50 --------------------------------- inconsistent {softirq-on-W} -> {in-softirq-W} usage. swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes: (&adap->sge.reg_lock){-+..}, at: [<ffffffff880e5ee2>] cxgb_offload_ctl+0x3af/0x507 [cxgb3] The problem is that reg_lock is used with plain spin_lock() in drivers/net/cxgb3/sge.c but is used with spin_lock_irqsave() in drivers/net/cxgb3/cxgb3_offload.c. This is technically a false positive, since the uses in sge.c are only in the initialization and cleanup paths and cannot overlap with any use in interrupt context. The best fix is probably just to use spin_lock_irq() with reg_lock in sge.c. Even though it's not strictly required for correctness, it avoids triggering lockdep and the extra overhead of disabling interrupts is not important at all in the initialization and cleanup slow paths. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | annotate cxgb3 (ab)uses of skb->priority/skb->csumAl Viro2008-03-261-3/+19
| | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | Merge branch 'master' of ↵David S. Miller2008-03-181-3/+9
|\ \ | |/ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/rt2x00/rt2x00dev.c net/8021q/vlan_dev.c
| * cxgb3: Fix transmit queue stop mechanismDivy Le Ray2008-03-171-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last change in the Tx queue stop mechanism opens a window where the Tx queue might be stopped after pending credits returned. Tx credits are returned via a control message generated by the HW. It returns tx credits on demand, triggered by a completion bit set in selective transmit packet headers. The current code can lead to the Tx queue stopped with all pending credits returned, and the current frame not triggering a credit return. The Tx queue will then never be awaken. The driver could alternatively request a completion for packets that stop the queue. It's however safer at this point to go back to the pre-existing behaviour. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | [NET] NEIGHBOUR: Remove unpopular neigh_is_connected().YOSHIFUJI Hideaki2008-03-041-1/+1
|/ | | | | | | | neigh_is_connected() is not popular at all, and the only user drivers/net/cxgb3/l2t.c:t3_l2t_update() also have raw (expanded) expression. Let's expand it and remove the inline function. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* cxgb3: Handle ARP completions that mark neighbors stale.Steve Wise2008-02-111-1/+1
| | | | | | | | | | | | When ARP completes due to a request rather than a reply the neighbor is marked NUD_STALE instead of reachable (see arp_process()). The handler for the resulting netevent needs to check also for NUD_STALE. Failure to use the arp entry can cause RDMA connection failures. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Acked-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Optimize cxgb3 xmit path (a bit)Krishna Kumar2008-02-111-20/+15
| | | | | | | | | | | | | | | 1. Add common code for stopping queue. 2. No need to call netif_stop_queue followed by netif_wake_queue (and infact a netif_start_queue could have been used instead), instead call stop_queue if required, and remove code under USE_GTS macro. 3. There is no need to check for netif_queue_stopped, as the network core guarantees that for us (I am sure every driver could remove that check, eg e1000 - I have tested that path a few billion times with about a few hundred thousand qstops but the condition never hit even once). Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* is_vmalloc_addr(): Check if an address is within the vmalloc boundariesChristoph Lameter2008-02-051-3/+1
| | | | | | | | | | | | | | Checking if an address is a vmalloc address is done in a couple of places. Define a common version in mm.h and replace the other checks. Again the include structures suck. The definition of VMALLOC_START and VMALLOC_END is not available in vmalloc.h since highmem.c cannot be included there. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cxgb3: Remove incorrect __devinit annotationsRoland Dreier2008-02-033-14/+12
| | | | | | | | | | | | | | When PCI error recovery was added to cxgb3, a function t3_io_slot_reset() was added. This function can call back into t3_prep_adapter() at any time, so t3_prep_adapter() can no longer be marked __devinit. This patch removes the __devinit annotation from t3_prep_adapter() and all the functions that it calls, which fixes WARNING: drivers/net/cxgb3/built-in.o(.text+0x2427): Section mismatch in reference from the function t3_io_slot_reset() to the function .devinit.text:t3_prep_adapter() Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* annotate cxgb3Al Viro2008-01-284-24/+26
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [VLAN]: Turn VLAN_DEV_INFO into inline functionPatrick McHardy2008-01-281-1/+1
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3 - Fix EEH, missing softirq blockingDivy Le Ray2008-01-282-11/+10
| | | | | | | | | set_pci_drvdata() stores a pointer to the adapter, not the net device. Add missing softirq blocking in t3_mgmt_tx. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - parity initialization for T3C adapters.Divy Le Ray2008-01-286-29/+472
| | | | | | | Add parity initialization for T3C adapters. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* drivers/net/cxgb3: trim trailing whitespaceJeff Garzik2008-01-285-31/+31
| | | | Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* cxgb3 - Fix I/O synchronizationDivy Le Ray2008-01-281-2/+5
| | | | | | | | Synchronize memory access before ringing the Tx door bell. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - HW set up updatesDivy Le Ray2008-01-283-4/+44
| | | | | | | | | Disable PEX errors. The HW generates false positives. Update RSS hash function to a symmetric algorithm. Update T3C HW support Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - sysfs methods clean upDivy Le Ray2008-01-281-10/+9
| | | | | | | Remove unused argument in sysfs methods Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - fix interaction with pktgenDivy Le Ray2008-01-281-42/+40
| | | | | | | | Do not use skb->cb to stash unmap info, save the info to the descriptor state. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - FW upgradeDivy Le Ray2008-01-282-5/+9
| | | | | | | | Bump up FW version to 5.0. Do not downgrade FW within the same major version range. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - Add EEH supportDivy Le Ray2008-01-281-0/+107
| | | | | | | Add PCI recovery support Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - Fix resources release.Divy Le Ray2008-01-281-4/+4
| | | | | | | Remove sysfs entries before unregistering the net devices. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - Use wild card for PCI subdevice ID matchDivy Le Ray2008-01-281-12/+12
| | | | | | | | Subdevice ID is not necessarily set to 1. Use wild card for PCI device matching Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - fix MSI-X failure pathDivy Le Ray2008-01-281-1/+2
| | | | | | | Return error code when msi-x settings fail. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* drivers/net/cxgb3: Add missing "space"Joe Perches2008-01-281-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - T3C support updateDivy Le Ray2007-12-073-19/+58
| | | | | | | | | Update GPIO mapping for T3C. Update xgmac for T3C support. Fix typo in mtu table. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriateJeff Garzik2007-10-232-4/+2
| | | | | | | Rather than hand-rolling our own prototype, make the code more future-proof by using the standard irq_handler_t typedef. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* remove asm/bitops.h includesJiri Slaby2007-10-191-1/+1
| | | | | | | | | | | | | remove asm/bitops.h includes including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly. Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cxgb3 sparse warning fixesStephen Hemminger2007-10-105-33/+31
| | | | | | | | Fix warnings from sparse related to shadowed variables and routines that should be declared static. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* drivers/net/cxgb3/xgmac.c: remove dead codeAdrian Bunk2007-10-101-4/+1
| | | | | | | | | This patch removes dead code ("tx_xcnt" can never be != 0 at this place) spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3: trivial endianness annotationsAl Viro2007-10-102-5/+5
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_countJeff Garzik2007-10-101-3/+8
| | | | | | | These have been superceded by the new ->get_sset_count() hook. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud