summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/adapter.h
Commit message (Collapse)AuthorAgeFilesLines
* cxgb3: map entire Rx page, feed map+offset to Rx ring.Divy Le Ray2009-03-271-0/+3
| | | | | | | | | | | DMA mapping can be expensive in the presence of iommus. Reduce the Rx iommu activity by mapping an entire page, and provide the H/W the mapped address + offset of the current page chunk. Reserve bits at the end of the page to track mapping references, so the page can be unmapped. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: start qset timers when setup succeededDivy Le Ray2009-03-271-0/+1
| | | | | | | | Start queue set reclaim timers after the queue sets have been allocated successfully. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: detect mac link faults.Divy Le Ray2009-03-131-0/+5
| | | | | | | | | | The driver currently ignores the local or remote link faults raised at the mac layer. This patch fixes it. Our mac however only advertizes link events, so wait for the phy to stabilize the link, then enable mac link events interrupts. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: separate TX and RX reclaim handlersDivy Le Ray2009-03-131-0/+1
| | | | | | | | Separate TX and RX reclaim handlers Don't disable interrupts in RX reclaim handler. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: ring rx door bell less frequentlyDivy Le Ray2009-03-131-0/+1
| | | | | | | | | Ring free lists door bell less frequently, specifically every quarter of the active FL size. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: Replace LRO with GROHerbert Xu2009-01-211-11/+2
| | | | | | | | | | | | | | | | | This patch makes cxgb3 invoke the GRO hooks instead of LRO. As GRO has a compatible external interface to LRO this is a very straightforward replacement. I've kept the ioctl controls for per-queue LRO switches. However, we should not encourage anyone to use these. Because of that, I've also kept the skb construction code in cxgb3. Hopefully we can phase out those per-queue switches and then kill this too. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: ease msi-x settings conditionsDivy Le Ray2009-01-211-0/+1
| | | | | | | | | | | The driver currently drops to line interrupt mode if it did not get all the msi-x vectors it requested. Allow msi-x settings when a minimal amount of vectors is provided. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: Keep LRO off if disabled when interface is downRoland Dreier2009-01-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | I have a system with a Chelsio adapter (driven by cxgb3) whose ports are part of a Linux bridge. Recently I updated the kernel and discovered that things stopped working because cxgb3 was doing LRO on packets that were passed into the bridge code for forwarding. (Incidentally, this problem manifested itself in a strange way that made debugging a bit interesting -- for some reason, the skb_warn_if_lro() check in bridge didn't trigger and these LROed packets were forwarded out a forcedeth interface, and caused the forcedeth transmit path to get stuck) This is because cxgb3 has no way of keeping state for the LRO flag until the interface is brought up, so if the bridging code disables LRO while the interface is down, then cxgb3_up() will just reenable LRO, and on my Debian system at least, the init scripts add interfaces to a bridge before bringing the interfaces up. Fix this by keeping track of each interface's LRO state in cxgb3 so that when bridge disables LRO, it stays disabled in cxgb3_up() when the interface is brought up. I did this by changing the rx_csum_offload flag into a pair of bit flags; the effect of this on the rx_eth() fast path is miniscule enough that it should be fine (eg on x86, a cmpb instruction becomes a testb instruction). Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: manage private iSCSI IP addressKaren Xie2008-12-181-0/+1
| | | | | | | | | | | The accelerated iSCSI traffic could use a private IP address unknown to the OS: - The IP address is required in both drivers to manage ARP requests and connection set up. - Added an control call to retrieve the ip address. - Reply to ARP requests dedicated to the private IP address. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Karen Xie <kxie@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: Add multiple Tx queue support.Divy Le Ray2008-12-161-1/+3
| | | | | | | | Implement NIC Tx multiqueue. Bump up driver version. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: extend copyrights to 2008Divy Le Ray2008-10-131-1/+1
| | | | | | | Update copyright banner to 2008. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: simplify port type struct and usageDivy Le Ray2008-10-081-1/+1
| | | | | | | | | | Second step in overall phy layer reorganization. Clean up the port_type_info structure. Support coextistence of clause 22 and clause 45 MDIO devices. Select the type of MDIO transaction on a per transaction basis. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: reset the adapter on fatal errorDivy Le Ray2008-10-081-0/+1
| | | | | | | | | | | when a fatal error occurs, bring ports down, reset the chip, and bring ports back up. Factorize code used for both EEH and fatal error recovery. Fix timer usage when bringing up/resetting sge queue sets. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [2.6.28,1/1] cxgb3 - fix race in EEHDivy Le Ray2008-10-081-0/+1
| | | | | | | | A SGE queue set timer might access registers while in EEH recovery, triggering an EEH error loop. Stop all timers early in EEH process. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: Use SKB list interfaces instead of home-grown implementation.David S. Miller2008-09-221-2/+1
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3 - Add LRO supportDivy Le Ray2008-05-221-0/+14
| | | | | | | 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-221-0/+4
| | | | | | | 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 port up/down error pathDivy Le Ray2008-05-131-0/+1
| | | | | | | | 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>
* net: Remove unnecessary inclusions of asm/semaphore.hMatthew Wilcox2008-04-181-1/+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 - parity initialization for T3C adapters.Divy Le Ray2008-01-281-0/+1
| | | | | | | Add parity initialization for T3C adapters. 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-231-3/+1
| | | | | | | 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>
* [NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger2007-10-101-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several devices have multiple independant RX queues per net device, and some have a single interrupt doorbell for several queues. In either case, it's easier to support layouts like that if the structure representing the poll is independant from the net device itself. The signature of the ->poll() call back goes from: int foo_poll(struct net_device *dev, int *budget) to int foo_poll(struct napi_struct *napi, int budget) The caller is returned the number of RX packets processed (or the number of "NAPI credits" consumed if you want to get abstract). The callee no longer messes around bumping dev->quota, *budget, etc. because that is all handled in the caller upon return. The napi_struct is to be embedded in the device driver private data structures. Furthermore, it is the driver's responsibility to disable all NAPI instances in it's ->stop() device close handler. Since the napi_struct is privatized into the driver's private data structures, only the driver knows how to get at all of the napi_struct instances it may have per-device. With lots of help and suggestions from Rusty Russell, Roland Dreier, Michael Chan, Jeff Garzik, and Jamal Hadi Salim. Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra, Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan. [ Ported to current tree and all drivers converted. Integrated Stephen's follow-on kerneldoc additions, and restored poll_list handling to the old style to fix mutual exclusion issues. -DaveM ] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3 - Fix dev->priv usageDivy Le Ray2007-08-311-0/+2
| | | | | | | | | | | | cxgb3 used netdev_priv() and dev->priv for different purposes. In 2.6.23, netdev_priv() == dev->priv, cxgb3 needs a fix. This patch is a partial backport of Dave Miller's changes in the net-2.6.24 git branch. Without this fix, cxgb3 crashes on 2.6.23. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - sge page managementDivy Le Ray2007-07-081-18/+20
| | | | | | | | Streamline sge page management. Fix dma mappings when buffers are recycled. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - Feed Rx free list with pagesDivy Le Ray2007-02-271-1/+8
| | | | | | | Populate Rx free list with pages. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - Recovery from HW starvation of response queue entries.Divy Le Ray2007-02-271-0/+2
| | | | | | | Improve the traffic recovery after the HW ran out of response queue entries. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - Add dual licensingDivy Le Ray2007-02-051-6/+27
| | | | | | | Dual licensing, needed for OFED 1.2 Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - Add <linux/mutex.h>Divy Le Ray2007-02-051-0/+1
| | | | | | | Include <linux/mutex.h> in adapter.h Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* cxgb3 - bind qsets on multiport adapterDivy Le Ray2007-02-051-0/+2
| | | | | | | Inform FW about the queue set->interface mapping. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Add support for the latest 1G/10G Chelsio adapter, T3.Divy Le Ray2007-02-051-0/+255
This driver is required by the Chelsio T3 RDMA driver posted by Steve Wise. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
OpenPOWER on IntegriCloud