aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-12-10netdev: Use default implementation of ethtool_ops::get_link where possibleBen Hutchings1-8/+1
Various drivers are using implementations of ethtool_ops::get_link that are equivalent to the default ethtool_op_get_link(). Change them to use that instead. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10sfc: convert references to LRO to GROstephen hemminger1-15/+15
This driver now uses Generic Receive Offload, not the older LRO. Change references to LRO in names and comments. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6David S. Miller8-306/+468
2010-12-08Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller3-14/+37
Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c net/llc/af_llc.c
2010-12-07sfc: Fix NAPI list corruption during ring reallocationBen Hutchings1-12/+19
Call netif_napi_{add,del}() on the NAPI contexts in the new and old channels, respectively. Since efx_init_napi() cannot fail, make its return type void. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-07sfc: Fix crash in legacy onterrupt handler during ring reallocationBen Hutchings3-2/+18
If we are using a legacy interrupt, our IRQ may be shared and our interrupt handler may be called even though interrupts are disabled on the NIC. When we change ring sizes, we reallocate the event queue and the interrupt handler may use an invalid pointer when called for another device's interrupt. Maintain a legacy_irq_enabled flag and test that at the top of the interrupt handler. Note that this problem results from the need to work around broken INT_ISR0 reads, and does not affect the legacy interrupt handler for Falcon A1. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-07sfc: Generalise filter spec initialisationBen Hutchings3-191/+248
Move search_depth arrays into per-table state. Define initialisation function efx_filter_init_rx() which sets everything apart from the match fields. Define efx_filter_set_{ipv4_local,ipv4_full,eth_local}() to set the match fields. This allows some simplification of callers and later support for additional protocols and more flexible matching using multiple calls to these functions. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-07sfc: Remove filter table IDs from filter functionsBen Hutchings4-25/+34
The separation between filter tables is largely an internal detail and it may be removed in future hardware. To prepare for that: - Merge table ID with filter index to make an opaque filter ID - Wrap efx_filter_table_clear() with a function that clears filters from both RX tables, which is all that the current caller requires Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-07sfc: Log start and end of ethtool self-test at INFO levelBen Hutchings1-3/+6
Add message at start of self-test and increase log level of message at end of self-test, so that any other messages produced during the test are clearly associated with it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06sfc: Use TX push whenever adding descriptors to an empty queueBen Hutchings3-2/+68
Whenever we add DMA descriptors to a TX ring and update the ring pointer, the TX DMA engine must first read the new DMA descriptors and then start reading packet data. However, all released Solarflare 10G controllers have a 'TX push' feature that allows us to reduce latency by writing the first new DMA descriptor along with the pointer update. This is only useful when the queue is empty. The hardware should ignore the pushed descriptor if the queue is not empty, but this check is buggy, so we must do it in software. In order to tell whether a TX queue is empty, we need to compare the previous transmission count (write_count) and completion count (read_count). However, if we do that every time we update the ring pointer then read_count may ping-pong between the caches of two CPUs running the transmission and completion paths for the queue. Therefore, we split the check for an empty queue between the completion path and the transmission path: - Add an empty_read_count field representing a point at which the completion path saw the TX queue as empty. - Add an old_write_count field for use on the completion path. - On the completion path, whenever read_count reaches or passes old_write_count the TX queue may be empty. We then read write_count, set empty_read_count if read_count == write_count, and update old_write_count. - On the transmission path, we read empty_read_count. If it's set, we compare it with the value of write_count before the current set of descriptors was added. If they match, the queue really is empty and we can use TX push. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06sfc: Remove locking from implementation of efx_writeo_paged()Ben Hutchings1-1/+14
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-06sfc: Add compile-time checks for correctness of paged register writesBen Hutchings1-8/+23
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06sfc: Remove redundant memory barriers between MMIOsBen Hutchings1-5/+0
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06sfc: Expand/correct comments on collector behaviour and function usageBen Hutchings1-49/+49
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-06sfc: Use ACCESS_ONCE when copying efx_tx_queue::read_countBen Hutchings1-3/+2
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-06sfc: Reorder struct efx_nic to separate fields by volatilityBen Hutchings1-18/+23
Place the regularly updated fields (locks, MAC stats, etc.) on a separate cache-line from fields which are mostly constant. This should reduce cache misses for access to the latter on the data path. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-03sfc: Store MAC address from NVRAM in net_device::perm_addrBen Hutchings4-13/+7
For some reason we failed to make this change when perm_addr was introduced. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Use current MAC address, not NVRAM MAC address, for WoL filterBen Hutchings1-1/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: When waking a stopped tx_queue, only lock that tx_queueSteve Hodgson1-2/+6
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Update kernel-doc to match earlier move of Toeplitz hash keyBen Hutchings2-1/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Move xmac_poll_required into struct falcon_nic_dataBen Hutchings5-8/+15
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Move Falcon global event handling to falcon.cBen Hutchings3-43/+43
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Move mdio_lock to struct falcon_nic_dataBen Hutchings4-7/+9
We only have direct access to MDIO on Falcon, so move this out of struct efx_nic. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Move SPI state to struct falcon_nic_dataBen Hutchings6-75/+69
We only have direct access to SPI on Falcon, so move all this state out of struct efx_nic. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Remove unnecessary inclusion of various private header filesBen Hutchings8-10/+0
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Expose Falcon BootROM config through MTD, not ethtoolBen Hutchings2-82/+54
The ethtool EEPROM interface is really meant for exposing chip configuration, not BootROM configuration. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Remove broken automatic fallback for invalid Falcon chip/board configBen Hutchings1-33/+24
If the Falcon board config is invalid, we cannot proceed - we do not have a valid board type to pass to falcon_probe_board(), and if we kluge that to work with an unknown board then other initialisation code will crash. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Fix event based MCDI completion and MC REBOOT/CMDDONE ordering issueSteve Hodgson1-0/+1
The mcfw *never* sends CMDDONE when rebooting. Changing this so that it always sends CMDDONE *before* REBOOT is easy on Siena, but it's not obvious that we could guarantee to be able to implement this on future hardware. Given this, I'm less convinced that the protocol should be changed. To reiterate the failure mode: The driver sees this: issue command receive REBOOT event Was that reboot event sent before the command was issued, or in response to the command? If the former then there will be a subsequent CMDDONE event, if the latter, then there will be no CMDDONE event. Options to resolve this are: 1. REBOOT always completes an outstanding mcdi request, and we set the credits count to ignore a subsequent CMDDONE event with mismatching seqno. 2. REBOOT never completes an outstanding mcdi request. If there is no CMDDONE event then we rely on the mcdi timeout code to complete the outstanding request, incurring a 10s delay. I'd argue that (2) is tidier, but that incurring a 10s delay is a little needless. Let's go with (1). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Clear RXIN_SEL when soft-resetting QT2025CBen Hutchings1-0/+6
When we enable PMA/PMD loopback this automatically sets RXIN_SEL (inverse polarity for RXIN). We need to clear that bit during the soft-reset sequence, as it is not done automatically. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Read-to-clear LM87 alarm/interrupt status at start of dayBen Hutchings1-0/+4
We do not want to shut down the board based on a fault that has already been cleared. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Distinguish critical and non-critical over-temperature conditionsBen Hutchings1-29/+80
Set both the 'maximum' and critical temperature limits for LM87 hardware monitors on Falcon boards. Do not shut down a port until the critical temperature is reached, but warn as soon as the 'maximum' temperature is reached. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Fix condition for no-op in set_phy_flash_cfg()Ben Hutchings1-1/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-03sfc: Reduce log level for MCDI error response in efx_mcdi_rpc()Ben Hutchings1-1/+1
Some errors are expected, e.g. when sending new commands to an MC running old firmware. Only the caller of efx_mcdi_rpc() can decide what is a real error. Therefore log the error responses with netif_dbg(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-27drivers/net: use vzalloc()Eric Dumazet1-2/+1
Use vzalloc() and vzalloc_node() in net drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-21sfc: make functions staticstephen hemminger12-41/+26
Make local functions and variable static. Do some rearrangement of the string table stuff to put it where it gets used. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-08sfc: Don't try to set filters with search depths we know won't workBen Hutchings1-1/+10
The filter engine will time-out and ignore filters beyond 200-something hops. We also need to avoid infinite loops in efx_filter_search() when the table is full. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-27sfc: Use netif_set_real_num_{rx,tx}_queues()Ben Hutchings1-1/+2
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-26drivers/net: return operator cleanupEric Dumazet2-6/+6
Change "return (EXPR);" to "return EXPR;" return is not a function, parentheses are not required. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-22sfc: Add support for SFE4003 board and TXC43128 PHYBen Hutchings5-1/+656
This board never went into production, but some engineering samples are in use. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-22sfc: Remove support for SFN4111T, SFT9001 and Falcon GMACBen Hutchings10-893/+56
SFN4111T never reached production and is not being used for internal or customer testing. Since we have no production Falcon boards using the SFT9001 or the GMAC, remove support for them as well. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-21sfc: Fix build due to lack of vmalloc.h include.David S. Miller1-0/+1
drivers/net/sfc/filter.c: In function ‘efx_probe_filters’: drivers/net/sfc/filter.c:422: error: implicit declaration of function ‘vmalloc’ drivers/net/sfc/filter.c:422: warning: assignment makes pointer from integer without a cast drivers/net/sfc/filter.c: In function ‘efx_remove_filters’: drivers/net/sfc/filter.c:442: error: implicit declaration of function ‘vfree’ Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-21sfc: Clean up and correct comments on efx_monitor()Ben Hutchings1-13/+10
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-21sfc: Include RX IP filter table in register dumpBen Hutchings1-3/+2
For backward compatibility, add it at the end. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-21sfc: Implement the ethtool RX n-tuple control functionsBen Hutchings3-4/+118
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-21sfc: Add filter table managementBen Hutchings7-1/+678
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-13sfc: Fix order of channel_name array dimensionsBen Hutchings1-1/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Allow changing the DMA ring sizes dynamically via ethtoolBen Hutchings5-52/+224
This requires some reorganisation of channel setup and teardown to ensure that we can always roll-back a failed change. Based on work by Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Make the dmaq size a run-time setting (rather than compile-time)Steve Hodgson7-76/+109
- Allow the ring size to be specified in non power-of-two sizes (for instance to limit the amount of receive buffers). - Automatically size the event queue. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Allocate each channel separately, along with its RX and TX queuesBen Hutchings3-76/+61
This will allow for reallocation of channel structures and rings. Change module parameter separate_tx_channels to be read-only, since we now require its value to be constant. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-10sfc: Refactor channel and queue lookup and iterationBen Hutchings7-75/+125
In preparation for changes to the way channels and queue structures are allocated, revise the macros and functions used to look up and iterator over them. - Replace efx_for_each_tx_queue() with iteration over channels then TX queues - Replace efx_for_each_rx_queue() with iteration over channels then RX queues (with one exception, shortly to be removed) - Introduce efx_get_{channel,rx_queue,tx_queue}() functions to look up channels and queues by index - Introduce efx_channel_get_{rx,tx}_queue() functions to look up a channel's queues Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>