#
f7a6d2c4 |
| 29-Aug-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Update copyright banners Update the dates for files that have been added to in 2012-2013. Drop the 'Solarstorm' brand name that's still lingering here. Signed-off-by: Ben H
sfc: Update copyright banners Update the dates for files that have been added to in 2012-2013. Drop the 'Solarstorm' brand name that's still lingering here. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
cd0ecc9a |
| 14-Dec-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Delegate MAC/NIC statistic description to efx_nic_type Various hardware statistics that are available for Siena are unavailable or meaningless for Falcon. Huntington adds further t
sfc: Delegate MAC/NIC statistic description to efx_nic_type Various hardware statistics that are available for Siena are unavailable or meaningless for Falcon. Huntington adds further to the NIC-type-specific statistics, as it has different MAC blocks from Falcon/Siena. All NIC types still provide most statistics by DMA, and use little-endian byte order. Therefore: 1. Add some general utility functions for reporting hardware statistics, efx_nic_describe_stats() and efx_nic_update_stats(). 2. Add an efx_nic_type::describe_stats operation to get the number and names of statistics, implemented using efx_nic_describe_stats() 3. Change efx_nic_type::update_stats to store the core statistics (struct rtnl_link_stats64) or full statistics (array of u64) in a caller-provided buffer. Use efx_nic_update_stats() to aid in the implementation. 4. Rename struct efx_ethtool_stat to struct efx_sw_stat_desc and EFX_ETHTOOL_NUM_STATS to EFX_ETHTOOL_SW_STAT_COUNT. 5. Remove efx_nic::mac_stats and struct efx_mac_stats. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
86094f7f |
| 21-Aug-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Move and rename Falcon/Siena common NIC operations Add efx_nic_type operations for the many efx_nic functions that need to be implemented different on EF10. For now, change most of
sfc: Move and rename Falcon/Siena common NIC operations Add efx_nic_type operations for the many efx_nic functions that need to be implemented different on EF10. For now, change most of the existing efx_nic_*() functions into inline wrappers. As a later step, we may be able to improve branch prediction for operations used on the fast path by copying the pointers into each queue/channel structure. Move the Falcon/Siena implementations to new file farch.c and rename the functions and static data to use a prefix of 'efx_farch_'. Move efx_may_push_tx_desc() to nic.h, as the EF10 TX code will also use it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
e42c3d85 |
| 27-May-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Refactor queue teardown sequence to allow for EF10 flush behaviour Currently efx_stop_datapath() will try to flush our DMA queues (if DMA is enabled), then finalise software and har
sfc: Refactor queue teardown sequence to allow for EF10 flush behaviour Currently efx_stop_datapath() will try to flush our DMA queues (if DMA is enabled), then finalise software and hardware state for each queue. However, for EF10 we must ask the MC to finalise each queue, which implicitly starts flushing it, and then wait for the flush events. We therefore need to delegate more of this to the NIC type. Combine all the hardware operations into a new NIC-type operation efx_nic_type::fini_dmaq, and call this before tearing down the software state and buffers for all the DMA queues. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
d8aec745 |
| 27-May-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Stop RX refill before flushing RX queues rx_queue::enabled guards refill, so rename it to reflect that. Clear it at the start of the queue teardown process rather than waiting for
sfc: Stop RX refill before flushing RX queues rx_queue::enabled guards refill, so rename it to reflect that. Clear it at the start of the queue teardown process rather than waiting for the RX queue to be flushed. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
1840667a |
| 03-Jan-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Limit scope of a Falcon A1 IRQ workaround We unconditionally acknowledge legacy interrupts just before disabling them. This workaround is needed on Falcon A1 but probably not on
sfc: Limit scope of a Falcon A1 IRQ workaround We unconditionally acknowledge legacy interrupts just before disabling them. This workaround is needed on Falcon A1 but probably not on later chips where the legacy interrupt mechanism is different. It was also originally done after the IRQ handler was removed, not before. Restore the original behaviour for Falcon A1 only by doing this acknowledgement in the efx_nic_type::fini operation. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
d8291187 |
| 05-Oct-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Rework IRQ enable/disable There are many problems with the current efx_stop_interrupts() and efx_start_interrupts(): 1. On Siena, it is unsafe to disable the master IRQ ena
sfc: Rework IRQ enable/disable There are many problems with the current efx_stop_interrupts() and efx_start_interrupts(): 1. On Siena, it is unsafe to disable the master IRQ enable bit (DRV_INT_EN_KER) while any IRQ sources are enabled. 2. On EF10 there is no master IRQ enable bit, so we cannot expect to defer IRQs without tearing down event queues. (Though I don't think we will need to keep any event queues around while the device is down, as we do for VFDI on Siena.) 3. synchronize_irq() only waits for a running IRQ handler to finish, not for any propagation through IRQ controllers. Therefore an IRQ may still be received and handled after efx_stop_interrupts() returns. IRQ handlers can then race with channel reallocation. To fix this: a. Introduce a software IRQ enable flag. So long as this is clear, IRQ handlers will only acknowledge IRQs and not touch the channel structures. b. Define a new struct efx_msi_context as the context for MSIs. This is never reallocated and is sufficient to find the software enable flag and the channel structure. It also includes the channel/IRQ name, which was previously separated out as it must also not be reallocated. c. Split efx_{start,stop}_interrupts() into efx_{,soft_}_{enable,disable}_interrupts(). The 'soft' functions don't touch the hardware master enable flag (if it exists) and don't reinitialise or tear down channels with the keep_eventq flag set. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
8b8a95a1 |
| 17-Sep-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Rename Falcon-architecture register definitions The EF10 architecture has a very different register layout from previous controllers, so we'll use separate files for the two sets of
sfc: Rename Falcon-architecture register definitions The EF10 architecture has a very different register layout from previous controllers, so we'll use separate files for the two sets of register definitions. Use 'farch' as an abbreviation for Falcon-architecture. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
caa75586 |
| 18-Sep-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Make struct efx_special_buffer less special On EF10, the firmware is in charge of allocating buffer table entries. Change struct efx_special_buffer to use a struct efx_buffer member
sfc: Make struct efx_special_buffer less special On EF10, the firmware is in charge of allocating buffer table entries. Change struct efx_special_buffer to use a struct efx_buffer member, so that it can be used with efx_nic_{alloc,free}_buffer() in that case. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
0d19a540 |
| 18-Sep-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Add GFP flags to efx_nic_alloc_buffer() and make most callers allow blocking Most call sites for efx_nic_alloc_buffer() are part of the probe or reconfiguration paths and can alloca
sfc: Add GFP flags to efx_nic_alloc_buffer() and make most callers allow blocking Most call sites for efx_nic_alloc_buffer() are part of the probe or reconfiguration paths and can allocate with GFP_KERNEL. A few others should use GFP_NOIO (I think). Only one is in atomic context and must use the current GFP_ATOMIC. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
1899c111 |
| 22-May-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Fix IRQ cleanup in case of a probe failure The lifetime of an irq_cpu_rmap is odd: we have to allocate it before installing IRQ handlers and free it before removing the IRQ handlers
sfc: Fix IRQ cleanup in case of a probe failure The lifetime of an irq_cpu_rmap is odd: we have to allocate it before installing IRQ handlers and free it before removing the IRQ handlers. As a result of this asymmetry, it was omitted from some failure paths. On another failure path, we could try to remove IRQ handlers we had not yet installed. Move the irq_cpu_rmap allocation and freeing alongside IRQ handler installation and removal, in efx_nic_{init,fini}_interrupts(). Count the number of IRQ handlers successfully installed and only remove those on the failure path. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
d07df8ec |
| 16-May-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Define and set RX buffer flag for packets parsed as TCP This will be useful for shortcutting some software packet parsing. Signed-off-by: Ben Hutchings <bhutchings@solarflare.c
sfc: Define and set RX buffer flag for packets parsed as TCP This will be useful for shortcutting some software packet parsing. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
b28405b0 |
| 21-Mar-2013 |
Alexandre Rames <arames@solarflare.com> |
sfc: Fix EEH with legacy interrupts. PCI legacy interrupts are level-triggered, and we cannot mask them up on an isolated device. Instead, disable the IRQ at the controller until we
sfc: Fix EEH with legacy interrupts. PCI legacy interrupts are level-triggered, and we cannot mask them up on an isolated device. Instead, disable the IRQ at the controller until we have recovered. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
61816596 |
| 20-Mar-2013 |
David S. Miller <davem@davemloft.net> |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull in the 'net' tree to get Daniel Borkmann's flow dissector infrastructure change. Signed-off-by: David S. Mille
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull in the 'net' tree to get Daniel Borkmann's flow dissector infrastructure change. Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1f9061d2 |
| 15-Mar-2013 |
Joe Perches <joe@perches.com> |
drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0) Reduce the number of calls required to alloc a zeroed block of memory. Trivially reduces overall object si
drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0) Reduce the number of calls required to alloc a zeroed block of memory. Trivially reduces overall object size. Other changes around these removals o Neaten call argument alignment o Remove an unnecessary OOM message after dma_alloc_coherent failure o Remove unnecessary gfp_t stack variable Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
fae8563b |
| 27-Feb-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Only use TX push if a single descriptor is to be written Using TX push when notifying the NIC of multiple new descriptors in the ring will very occasionally cause the TX DMA engine
sfc: Only use TX push if a single descriptor is to be written Using TX push when notifying the NIC of multiple new descriptors in the ring will very occasionally cause the TX DMA engine to re-use an old descriptor. This can result in a duplicated or partly duplicated packet (new headers with old data), or an IOMMU page fault. This does not happen when the pushed descriptor is the only one written. TX push also provides little latency benefit when a packet requires more than one descriptor. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
85740cdf |
| 29-Jan-2013 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Enable RX DMA scattering where possible Enable RX DMA scattering iff an RX buffer large enough for the current MTU will not fit into a single page and the NIC supports DMA scatt
sfc: Enable RX DMA scattering where possible Enable RX DMA scattering iff an RX buffer large enough for the current MTU will not fit into a single page and the NIC supports DMA scattering for kernel-mode RX queues. On Falcon and Siena, the RX_USR_BUF_SIZE field is used as the DMA limit for both all RX queues with scatter enabled. Set it to 1824, matching what Onload uses now. Maintain a statistic for frames truncated due to lack of descriptors (rx_nodesc_trunc). This is distinct from rx_frm_trunc which may be incremented when scattering is disabled and implies an over-length frame. Whenever an MTU change causes scattering to be turned on or off, update filters that point to the PF queues, but leave others unchanged, as VF drivers assume scattering is off. Add n_frags parameters to various functions, and make them iterate: - efx_rx_packet() - efx_recycle_rx_buffers() - efx_rx_mk_skb() - efx_rx_deliver() Make efx_handle_rx_event() responsible for updating efx_rx_queue::removed_count. Change the RX pipeline state to a starting ring index and number of fragments, and make __efx_rx_packet() responsible for clearing it. Based on earlier versions by David Riddoch and Jon Cooper. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
525d9e82 |
| 02-Oct-2012 |
Daniel Pieczko <dpieczko@solarflare.com> |
sfc: Work-around flush timeout when flushes have completed We sometimes hit a "failed to flush" timeout on some TX queues, but the flushes have completed and the flush completion events
sfc: Work-around flush timeout when flushes have completed We sometimes hit a "failed to flush" timeout on some TX queues, but the flushes have completed and the flush completion events seem to go missing. In this case, we can check the TX_DESC_PTR_TBL register and drain the queues if the flushes had finished. [bwh: Minor fixes to coding style] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
c3771a35 |
| 18-Sep-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Do not initialise buffer in efx_alloc_special_buffer() Currently we initialise the newly allocated buffer to all-1s, which is important for event queues but not for descriptor queue
sfc: Do not initialise buffer in efx_alloc_special_buffer() Currently we initialise the newly allocated buffer to all-1s, which is important for event queues but not for descriptor queues. And since we also do that in efx_nic_init_eventq(), it is completely pointless to do it here. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
778cdaf6 |
| 17-Sep-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Remove confusing MMIO functions efx_writed_table() uses a step of 16 bytes but efx_readd_table() uses a step of 4 bytes. Why are they different? Firstly, register access i
sfc: Remove confusing MMIO functions efx_writed_table() uses a step of 16 bytes but efx_readd_table() uses a step of 4 bytes. Why are they different? Firstly, register access is asymmetric: - The EVQ_RPTR table and RX_INDIRECTION_TBL can (or must?) be written as dwords even though they have a step size of 16 bytes, unlike most other CSRs. - In general, a read of any width is valid for registers, so long as it does not cross register boundaries. There is also no latching behaviour in the BIU, contrary to rumour. We write to the EVQ_RPTR table with efx_writed_table() but never read it back as it's write-only. We write to the RX_INDIRECTION_TBL with efx_writed_table(), but only read it back for the register dump, where we use efx_reado_table() as for any other table with step size of 16. We read MC_TREG_SMEM with efx_readd_table() for the register dump, but normally read and write it with efx_readd() and efx_writed() using offsets calculated in bytes. Since these functions are trivial and have few callers, it's clearer to open-code them at the call sites. While we're at it, update the comments on the BIU behaviour again. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
Revision tags: v3.6-rc6, v3.6-rc5 |
|
#
d5e8cc6c |
| 06-Sep-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Really disable flow control while flushing Receiving pause frames can block TX queue flushes. Earlier changes work around this by reconfiguring the MAC during flushes for VFs, but
sfc: Really disable flow control while flushing Receiving pause frames can block TX queue flushes. Earlier changes work around this by reconfiguring the MAC during flushes for VFs, but during flushes for the PF we would only change the fc_disable counter. Unless the MAC is reconfigured for some other reason during the flush (which I would not expect to happen) this had no effect at all. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
32766ec8 |
| 04-Oct-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
drivers/net/ethernet/sfc: use standard __{clear,set}_bit_le() functions There are now standard functions for dealing with little-endian bit arrays, so use them instead of our own impleme
drivers/net/ethernet/sfc: use standard __{clear,set}_bit_le() functions There are now standard functions for dealing with little-endian bit arrays, so use them instead of our own implementations. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
Revision tags: v3.6-rc4, v3.6-rc3, v3.6-rc2, v3.6-rc1, v3.5, v3.5-rc7, v3.5-rc6, v3.5-rc5, v3.5-rc4, v3.5-rc3, v3.5-rc2, v3.5-rc1, v3.4 |
|
#
f7251a9c |
| 17-May-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Simplify TSO header buffer allocation TSO header buffers contain a control structure immediately followed by the packet headers, and are kept on a free list when not in use. This
sfc: Simplify TSO header buffer allocation TSO header buffers contain a control structure immediately followed by the packet headers, and are kept on a free list when not in use. This complicates buffer management and tends to result in cache read misses when we recycle such buffers (particularly if DMA-coherent memory requires caches to be disabled). Replace the free list with a simple mapping by descriptor index. We know that there is always a payload descriptor between any two descriptors with TSO header buffers, so we can allocate only one such buffer for each two descriptors. While we're at it, use a standard error code for allocation failure, not -1. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
7668ff9c |
| 17-May-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Refactor struct efx_tx_buffer to use a flags field Add a flags field to struct efx_tx_buffer, replacing the continuation and map_single booleans. Since a single descriptor
sfc: Refactor struct efx_tx_buffer to use a flags field Add a flags field to struct efx_tx_buffer, replacing the continuation and map_single booleans. Since a single descriptor cannot be both a TSO header and the last descriptor for an skb, unionise efx_tx_buffer::{skb,tsoh} and add flags for validity of these fields. Clear all flags in free buffers (whereas previously the continuation flag would be set). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|
#
d4f2cecc |
| 03-Jul-2012 |
Ben Hutchings <bhutchings@solarflare.com> |
sfc: Disable VF queues during register self-test Currently VF queues and drivers may remain active during this test. This could cause memory corruption or spurious test failures. The
sfc: Disable VF queues during register self-test Currently VF queues and drivers may remain active during this test. This could cause memory corruption or spurious test failures. Therefore we reset the port/function before running these tests on Siena. On Falcon this doesn't work: we have to do some additional initialisation before some blocks will work again. So refactor the reset/register-test sequence into an efx_nic_type method so efx_selftest() doesn't have to consider such quirks. In the process, fix another minor bug: Siena does not have an 'invisible' reset and the self-test currently fails to push the PHY configuration after resetting. Passing RESET_TYPE_ALL to efx_reset_{down,up}() fixes this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
show more ...
|