Commit Graph

60 Commits

Author SHA1 Message Date
Kip Macy
c0fdfb956d Fix build warnings
Submitted by: mjacob@
2007-06-15 20:02:02 +00:00
Kip Macy
ef72318f0e - import new common code for the T304
- update to firmware version 4.1.0

- switch over to standard method for initializing cdevs (contributed by scottl@)
- break out timer_reclaim_task to be per-port
- move msix teardown into separate function
- fix bus_setup_intr for msi-x for the multi-port case so that msi-x resources
  are not corrupted on unload
- handle 10/100/1000 base-T media and auto negotiation
- bind qset to cpu even for singleq case
- white space cleanups
- remove recursive PORT_LOCK
- move mtu setting to separate function
- stop and re-init port when changing mtu
- replace all direct references to m_data with calls to mtod
- handle attach failure better by not trying to de-initialize
  taskqueues when they have not been allocated
- no longer default to jumbo frames

Sponsored by: Chelsio
MFC after: 3 days
2007-06-13 05:36:00 +00:00
Kip Macy
f3ec953c8d remove pointless recursive acquisition of port lock in cxgb_init_locked 2007-06-02 03:02:36 +00:00
Kip Macy
cebf6b9f64 Fix case of setting OACTIVE erroneously 2007-05-29 04:18:21 +00:00
Kip Macy
f0a542f819 Fix interrupt setup for the non-MSI-X case 2007-05-29 03:13:53 +00:00
Kip Macy
10faa56870 When building cxgb as a module make include paths relative to the driver's root.
This will make it possible to build the module out of tree against an older src tree.

MFC after: 3 days
2007-05-28 22:57:27 +00:00
Kip Macy
04ad339002 Tuning for small packet handling
- Double the number of descriptors that a single call to send can use
- Quadruple the number of descriptors that can be reclaimed per pass
- only run reclaim twice per second
- increase coalesce timer from 3.5us to 5us

fix printf warning on 64-bit platforms
2007-05-27 22:07:47 +00:00
Kip Macy
5dfb4c0b24 Don't bind queue to cpus if only one queue is in use 2007-05-27 22:04:30 +00:00
Kip Macy
077ff26cbc fix compile warning by removing redundant LOG_ERR define 2007-05-27 04:39:29 +00:00
Kip Macy
b2dda71e61 set IFF_OACTIVE to avoid hangs when the tx ring fills up 2007-05-27 04:39:07 +00:00
Kip Macy
d1b41c9b16 add missed header 2007-05-25 18:29:17 +00:00
Kip Macy
dbda4d7734 update license headers 2007-05-25 16:42:25 +00:00
Kip Macy
5e51a65917 add toe device header missed by previous commit 2007-05-25 16:17:59 +00:00
Kip Macy
d722cab49a (MFp4)
- upgrade to reflect state of 1.0.0.86
        - move from firmware rev 3.2 to 4.0.0
        - import driver bits for offload functionality
	- remove binary distribution clause from top level files as it
	  runs counter to the intent of purely supporting the hardware

MFC after: 3 days
2007-05-25 09:48:20 +00:00
Kip Macy
64c43db51c Default to using a single queue as this is currently the only way to achieve
line rate
2007-04-26 08:38:00 +00:00
Kip Macy
ea5143feaf Disable mbuf chain collapsing - it is currently causing an mbuf leak 2007-04-26 08:36:59 +00:00
Kip Macy
5f1e4ae331 Free cluster if we fail to create the dmamap.
Fixes CID 1829
Found by: Coverity
2007-04-20 05:16:42 +00:00
Kip Macy
527888d7c0 Eliminate CID 1842 by comparing against (type != EXT_MBUF) => refcnt != NULL 2007-04-20 05:12:54 +00:00
Kip Macy
f297a9d336 Fix memory leak in m_collapse (CID 1843)
Found by: Coverity
Submitted by: jhb
2007-04-20 05:06:02 +00:00
Kip Macy
d302816a12 PHYS_TO_VM_PAGE requires explicit vm_page.h include on sparc64 2007-04-15 22:17:10 +00:00
Matt Jacob
07589439e5 Use %j and args cast to uintmax_t to print bus_addr_t && length args. 2007-04-15 19:03:45 +00:00
Kip Macy
2b6dbb2afa Add pmap includes needed by i386 2007-04-15 15:30:45 +00:00
Kip Macy
ba68b814cc suck in more of busdma to enable more efficient mappings
kill redundant INVARIANTS check
2007-04-15 05:46:34 +00:00
Kip Macy
d43f50b93a Add sysctl for disabling/enabling mbuf chain collapsing
remove map creation before calling bus_dmamap_load_mvec_sg
2007-04-15 05:45:10 +00:00
Kip Macy
52c81add3c Implement ZERO_COPY_SOCKETS check in a way that doesn't make LINT unhappy 2007-04-15 04:55:39 +00:00
Kip Macy
51580731ae Add support for mbuf iovec in the TX path 2007-04-14 20:40:22 +00:00
Kip Macy
642046797b add reference count pointer to mbuf iovec
implement robust version of m_collapse
add support for sf_buf
add fix for m_iovappend
add calls to m_sanity under INVARIANTS
fix m_freem_vec to correctly travese the mbuf iovec chain
2007-04-14 20:38:38 +00:00
Kip Macy
aa84193acf restore sense to get_imm_packet
MFC after: 3 days
2007-04-12 04:48:54 +00:00
Kip Macy
98d6fba71d switch over to per-txq dma tag to facilitate parallelism on TX
MFC after: 3 days
2007-04-12 04:31:44 +00:00
Kip Macy
dd782506d8 explicitly check TSO flag
don't clear and then set M_PKTHDR, m_gethdr sets it correctly
improve error handling on m_gethdr failure

MFC after: 3 days
2007-04-12 03:33:30 +00:00
Kip Macy
23ed7b513f Add ETHER_HDR_LEN to hardware accepted mtu
MFC after: 3 days
2007-04-12 03:07:24 +00:00
John Baldwin
e403490aa6 Fix m_freem_vec() to actually traverse the mbuf chain. This avoids
double free's and an infinite loop.

CID:		1834
Found by:	Coverity Prevent (tm)
2007-04-11 13:47:24 +00:00
Kip Macy
a53b1c1753 throw sun4v into the check while we're at it 2007-04-09 17:05:54 +00:00
Kip Macy
3a0a4ac13d busdma tags are opaque on all architectures except sparc64
for now simply don't compile/use on sparc64
2007-04-09 17:01:23 +00:00
Kip Macy
dc5a36e241 Add missing paren 2007-04-08 22:56:18 +00:00
Kip Macy
cae1990513 remove stale variable reference 2007-04-08 18:02:37 +00:00
Kip Macy
db2faf119f add busdma function for mapping mbuf iovecs
change m_collapse to return an error code
2007-04-08 15:59:07 +00:00
Kip Macy
c0a24dd4aa Convert driver RX path over to using mbuf iovec 2007-04-08 15:04:19 +00:00
Kip Macy
a8d9a363f5 Add driver private mbuf iovec support routines 2007-04-08 14:56:16 +00:00
Kip Macy
fa0521c0e9 Make DMA tags per-queue to facilate parallel mappings
Defer mbuf allocation and initialization until after data has already been
received in a cluster

This reduces cpu utilization somewhat, but it only improves the rx path.
Recent changes to TCP appear to make us rate limited by the TX path.

This is the first step in reducing mbuf management overhead for manipulating
clusters.

MFC after: 3 days
2007-04-04 05:29:18 +00:00
Kip Macy
ac6b4cf110 bus_size_t is a bad cross-architectural type with respect to printf, use uint32_t instead 2007-03-24 04:28:33 +00:00
Kip Macy
20fe52b816 - Increase coalesce_nsecs
- commit fixes for the following coverity warnings: 1765, 1760, 1758, 1756
2007-03-23 22:03:55 +00:00
Kip Macy
f309e60da0 commit missed change 2007-03-23 22:02:11 +00:00
Kip Macy
fc01c613c5 Check PCI-e link width to avoid foot shooting with 4x links
MFC after: 3 days
2007-03-23 20:18:07 +00:00
Kip Macy
24cdd0676c move call to t3_prep_adapter earlier in attach before msi-x setup occurs
this works around the fact that pci_config_{save,restore} doesn't adequately
restore state for msi-x

MFC after: 3 days
2007-03-21 16:40:37 +00:00
Kip Macy
94f7a09823 allocate 9 messages in all cases 2007-03-21 09:16:10 +00:00
Kip Macy
693d746cc1 make MSI-X the default and allocate up to mp_ncpus queues per port
MFC after: 3 days
2007-03-21 07:25:40 +00:00
Kip Macy
577e9bbe3e Synchronize with version 1.0.071 of Chelsio's common code
(with the notable exception of improvements for using multiple TX queues)

This adds support for the T3B2 ASIC rev

Obtained from: Chelsio
MFC after: 3 days
2007-03-20 21:43:32 +00:00
Kip Macy
77f07749f3 cxgb_stop is only called from cxgb_ioctl so:
- don't acquire port lock, already held in ioctl
- rename to cxgb_stop_locked
- switch callout_drain to callout_stop to avoid a hang from having the port lock held
2007-03-20 06:21:47 +00:00
Kip Macy
8db477416c move inline function above use so that -O works 2007-03-17 05:23:45 +00:00