History log of /drivers/net/ethernet/sfc/net_driver.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
58f7e57d11b99575ddb0a3ee9baf7551f10bc3dd 29-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Remove efx_channel::last_eventq_read_ptr

This member has never been used in a production version of the driver.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
dd40781e3a4e9d3177a548c389232ee9496dae8e 29-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Run event/IRQ self-test asynchronously when interface is brought up

Generate a test event on each event queue whenever the interface is
brought up, then after 1 second check that we have either handled a
test event or handled another IRQ for each event queue.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
73e0026fb2bee4f2ca85c702040e143ec504eaa6 23-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Correct efx_for_each_possible_channel_tx_queue() to skip non-TX channels

efx_for_each_possible_channel_tx_queue() should do nothing for RX-only
or extra channels. The current definition results in allocating
additional unused hardware TX queues when using the mqprio qdisc and
either separate_tx_channels or SR-IOV.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
cd2d5b529cdb9bd274f3e4bc68d37d4d63b7f383 14-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Add SR-IOV back-end support for SFC9000 family

On the SFC9000 family, each port has 1024 Virtual Interfaces (VIs),
each with an RX queue, a TX queue, an event queue and a mailbox
register. These may be assigned to up to 127 SR-IOV virtual functions
per port, with up to 64 VIs per VF.

We allocate an extra channel (IRQ and event queue only) to receive
requests from VF drivers.

There is a per-port limit of 4 concurrent RX queue flushes, and queue
flushes may be initiated by the MC in response to a Function Level
Reset (FLR) of a VF. Therefore, when SR-IOV is in use, we submit all
flush requests via the MC.

The RSS indirection table is shared with VFs, so the number of RX
queues used in the PF is limited to the number of VIs per VF.

This is almost entirely the work of Steve Hodgson, formerly
shodgson@solarflare.com.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
28e47c498a931200125e299e9d60d22e27b4ab0d 15-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Allocate SRAM between buffer table and descriptor caches at init time

Each port has a block of 64-bit SRAM that is divided between buffer
table and descriptor cache regions at initialisation time. Currently
we use a fixed allocation, but it needs to be changed to support
larger numbers of queues.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
7f967c011ae9c59fc7e7a017070ef7b22a5a4fbf 14-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Add support for 'extra' channel types

Abstract some of the channel operations to allow for 'extra'
channels that do not have RX or TX queues.

- Try to assign a channel to each extra channel type that is enabled
for the NIC, but gracefully degrade if we can't allocate sufficient
MSI-X vectors
- Allow each extra channel type to generate its own channel name
- Allow channel types to disable reallocation and reinitialisation
of their channels

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
a16e5b246c5b1aff3141ca6ae443307f3241a133 14-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Make all CPU/IRQ/channel/queue counts unsigned

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
5bbe2f4f64cc7f6da6390035dcfc42b14bd80484 14-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Make buffer table indices and counts consistently unsigned

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
a606f4325dca6950996abbae452d33f2af095f39 23-May-2011 Steve Hodgson <shodgson@solarflare.com> sfc: Disable flow control during flushes

The TX DMA engine issues upstream read requests when there is room in
the TX FIFO for the completion. However, the fetches for the rest of
the packet might be delayed by any back pressure. Since a flush must
wait for an EOP, the entire flush may be delayed by back pressure.

Mitigate this by disabling flow control before the flushes are
started. Since PF and VF flushes run in parallel introduce
fc_disable, a reference count of the number of flushes outstanding.

The same principle could be applied to Falcon, but that
would bring with it its own testing.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
9f2cb71c2b0ce33c472856c0feec2883fa0d9cd1 08-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Leave interrupts and event queues enabled whenever we can

When SR-IOV is enabled we may receive FLR (Function-Level Reset)
events, associated queue flush events and requests from VF drivers at
any time. Therefore we need to keep event queues and interrupts
enabled whenever possible.

Currently we stop interrupt-driven event processing before flushing RX
and TX queues; efx_nic_flush_queues() then polls event queues for
flush events and discards any others it finds. Change it to work with
the regular event handling functions.

Currently efx_start_channel() fills RX queues synchronously when a
device is brought up. This could now race with NAPI, so change it to
send fill events.

This was almost entirely written by Steve Hodgson, formerly
shodgson@solarflare.com.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
db3395697cad6e9dff8d21249e0b59dc9bb83b48 26-Aug-2011 Ben Hutchings <bhutchings@solarflare.com> sfc: Replace efx_rx_buffer::is_page and other booleans with a flags field

Replace checksummed and discard booleans from efx_handle_rx_event()
with a bitmask, added to the flags field.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
f9c762500ae77ab8940094be1325c8a2a1c8e5f5 12-Oct-2011 Ben Hutchings <bhutchings@solarflare.com> sfc: Make all MAC statistics consistently 64 bits wide

Currently we use type u64 for byte counts, which can very quickly
exceed 2^32, and unsigned long for packet counts, which do not. But
it can still take only 20-something minutes to send or receive 2^32
packets, and not all tools properly handle overflow even if they
sample more often than this.

The MAC statistics are all updated synchronously, so it costs very
little to make them all 64-bit regardless of native word size.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
b249513e8ba3ca8bc2c87e78eb6e302d5d8abd6f 09-Jan-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Remove obsolete function efx_dev_name()

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
1646a6f352a6f70fcca828589ed04797aa09d494 05-Jan-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Clean up test interrupt handling

Interrupts are normally generated by the event queues, moderated by
timers. However, they may also be triggered by detection of a 'fatal'
error condition (e.g. memory parity error) or by the host writing to
certain CSR fields as part of a self-test.

The IRQ level/index used for these on Falcon rev B0 and Siena is set
by the KER_INT_LEVE_SEL field and cached by the driver in
efx_nic::fatal_irq_level. Since this value is also relevant to
self-tests rename the field to just 'irq_level'.

Avoid unnecessary cache traffic by using a per-channel 'last_irq_cpu'
field and only writing to the per-controller field when the interrupt
matches efx_nic::irq_level. Remove the volatile qualifier and use
ACCESS_ONCE in the places we read these fields.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
cc180b69c009ec52f67a56d96b9073b9f774b323 08-Dec-2011 Ben Hutchings <bhutchings@solarflare.com> sfc: Correct interrupt timer quantum for Siena (normal and turbo mode)

We currently assume that the timer quantum for Siena is 5 us, the same
as for Falcon. This is not correct; timer ticks are generated on a
rota which takes a minimum of 768 cycles (each event delivery or other
timer change will delay it by 3 cycles). The timer quantum should be
6.144 or 3.072 us depending on whether turbo mode is active.

Replace EFX_IRQ_MOD_RESOLUTION with a timer_quantum_ns field in struct
efx_nic, initialised by the efx_nic_type::probe function.

While we're at it, replace EFX_IRQ_MOD_MAX with a timer_period_max
field in struct efx_nic_type.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
5f3f9d6c441faa323444b2f6b092d630fcd7d04c 04-Nov-2011 Ben Hutchings <bhutchings@solarflare.com> sfc: Consistently test DEBUG macro, not EFX_ENABLE_DEBUG

The netif_dbg() macro is defined in <linux/netdevice.h>. If the DEBUG
macro is defined, it logs a message at 'debug' level, otherwise it
does nothing.

In net_driver.h we define DEBUG if EFX_ENABLE_DEBUG is defined, but
this is too late for those source files that already got a
definition of netif_dbg() by including <linux/netdevice.h>

Get rid of EFX_ENABLE_DEBUG, and only define and test DEBUG.

In mtd.c, we do not use DEBUG as a condition flag but are forced to
use the DEBUG macro-function from <linux/mtd/mtd.h>. Undefine DEBUG
before including it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
30b81cda9516878906b44fed16aac9df1dbb89c7 13-Sep-2011 Ben Hutchings <bhutchings@solarflare.com> sfc: Remove efx_nic_type::push_multicast_hash operation

Both implementations of efx_nic_type::reconfigure_mac operation
push the multicast hash filter to the hardware. It is therefore
redundant to call efx_nic_type::push_multicast_hash as well.

efx_mcdi_mac_reconfigure() also uses this operation, but the
implementation for Siena just uses MCDI anyway. Merge that into
efx_mcdi_mac_reconfigure().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
710b208dc2687fdb3370110d54a67fb2288835eb 03-Sep-2011 Ben Hutchings <bhutchings@solarflare.com> sfc: Merge efx_mac_operations into efx_nic_type

No NICs need to switch efx_mac_operations at run-time, and the MAC
operations are fairly closely bound to NIC types.

Move efx_mac_operations::reconfigure to efx_nic_type::reconfigure_mac
and efx_mac_operations::check_fault fo efx_nic_type::check_mac_fault.
Change callers to call through efx->type or directly if the NIC type
is known.

Remove efx_mac_operations::update_stats. The implementations for
Falcon used to fetch MAC statistics synchronously and this was used by
efx_register_netdev() to clear statistics after running self-tests.
However, it now only converts statistics that have already been
fetched (and that only for Falcon), and the call from
efx_register_netdev() has no effect.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
1cb345220f135dcca24f01cc04cbb97a8242d419 03-Sep-2011 Ben Hutchings <bhutchings@solarflare.com> sfc: Hold efx_nic::stats_lock while reading efx_nic::mac_stats

efx_nic::stats_lock is used to serialise stats updates, but each
reader was dropping it before it finished reading efx_nic::mac_stats.

If there were concurrent stats reads using procfs, or one using procfs
and one using ethtool, an update could race with a read. On a 32-bit
system, the reader could see word-tearing of 64-bit stats (32 bits of
the old value and 32 bits of the new).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
18e83e4cd144e30fb38bf1f714914182c6c8bced 05-Jan-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Const-qualify static data as appropriate, partly prompted by checkpatch

Fix the following warnings:

WARNING: struct dev_pm_ops should normally be const
WARNING: static const char * array should probably be static const char * const

Similarly const-qualify struct i2c_board_info, struct i2c_algo_bit_data,
struct efx_ethtool_stat, struct efx_mtd_ops and struct siena_nvram_type_info.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/net_driver.h
c8f44affb7244f2ac3e703cab13d55ede27621bb 15-Nov-2011 Michał Mirosław <mirq-linux@rere.qmqm.pl> net: introduce and use netdev_features_t for device features sets

v2: add couple missing conversions in drivers
split unexporting netdev_fix_features()
implemented %pNF
convert sock::sk_route_(no?)caps

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/ethernet/sfc/net_driver.h
874aeea5d01cac55c160a4e503e3ddb4db030de7 13-May-2011 Jeff Kirsher <jeffrey.t.kirsher@intel.com> sfc: Move the Solarflare drivers

Moves the Solarflare drivers into drivers/net/ethernet/sfc/ and
make the necessary Kconfig and Makefile changes.

CC: Steve Hodgson <shodgson@solarflare.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
/drivers/net/ethernet/sfc/net_driver.h