Commit Graph

10 Commits (01294d82622d6d9d64bde8e4530c7e2c6dbb6ee6)

Author SHA1 Message Date
Neil Turton fcfa060468 sfc: Use rmb() to ensure reads occur in order
Enabling write-combining may also enable read reordering.  The BIU is
only guaranteed to read from a 128-bit CSR or 64-bit SRAM word when
the host reads from its lowest address; otherwise the BIU may use the
latched value.  Therefore we need to reinstate the read memory
barriers after the first read operation for each CSR or SRAM word.

Signed-off-by; Ben Hutchings <bhutchings@solarflare.com>
2011-04-12 23:52:44 +01:00
Ben Hutchings 65f0b417de sfc: Use write-combining to reduce TX latency
Based on work by Neil Turton <nturton@solarflare.com> and
Kieran Mansley <kmansley@solarflare.com>.

The BIU has now been verified to handle 3- and 4-dword writes within a
single 128-bit register correctly.  This means we can enable write-
combining and only insert write barriers between writes to distinct
registers.

This has been observed to save about 0.5 us when pushing a TX
descriptor to an empty TX queue.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-03-04 17:58:42 +00:00
Ben Hutchings 0a6f40c66b sfc: Update copyright dates
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-02-28 23:57:24 +00:00
Ben Hutchings e506147271 sfc: Remove locking from implementation of efx_writeo_paged()
It is not necessary to serialise writes to the paged 128-bit
registers.  However, if we don't then we must always write the last
dword separately, not as part of a qword write.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06 22:58:41 +00:00
Ben Hutchings 1a29cc4011 sfc: Add compile-time checks for correctness of paged register writes
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06 22:55:33 +00:00
Ben Hutchings 494bdf1b0f sfc: Remove redundant memory barriers between MMIOs
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06 22:55:18 +00:00
Ben Hutchings 9f2f6cd07a sfc: Expand/correct comments on collector behaviour and function usage
Document exactly which registers and functions have special behaviour,
and why races on writes to descriptor pointers are safe.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06 22:55:00 +00:00
Ben Hutchings 62776d034c sfc: Implement message level control
Replace EFX_ERR() with netif_err(), EFX_INFO() with netif_info(),
EFX_LOG() with netif_dbg() and EFX_TRACE() and EFX_REGDUMP() with
netif_vdbg().

Replace EFX_ERR_RL(), EFX_INFO_RL() and EFX_LOG_RL() using explicit
calls to net_ratelimit().

Implement the ethtool operations to get and set message level flags,
and add a 'debug' module parameter for the initial value.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-24 22:13:22 -07:00
Ben Hutchings 5b98c1bfcf sfc: Implement ethtool register dump operation
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-24 22:13:14 -07:00
Ben Hutchings 12d00cadcc sfc: Rename register I/O header and functions used by both Falcon and Siena
While we're at it, use type suffixes of 'd', 'q' and 'o', consistent
with register type names.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-24 04:27:04 -07:00