aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2011-01-142-14/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits) GRETH: resolve SMP issues and other problems GRETH: handle frame error interrupts GRETH: avoid writing bad speed/duplex when setting transfer mode GRETH: fixed skb buffer memory leak on frame errors GRETH: GBit transmit descriptor handling optimization GRETH: fix opening/closing GRETH: added raw AMBA vendor/device number to match against. cassini: Fix build bustage on x86. e1000e: consistent use of Rx/Tx vs. RX/TX/rx/tx in comments/logs e1000e: update Copyright for 2011 e1000: Avoid unhandled IRQ r8169: keep firmware in memory. netdev: tilepro: Use is_unicast_ether_addr helper etherdevice.h: Add is_unicast_ether_addr function ks8695net: Use default implementation of ethtool_ops::get_link ks8695net: Disable non-working ethtool operations USB CDC NCM: Don't deref NULL in cdc_ncm_rx_fixup() and don't use uninitialized variable. vxge: Remember to release firmware after upgrading firmware netdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addr ipsec: update MAX_AH_AUTH_LEN to support sha512 ...
| * sfc: Restore the effect of the rss_cpus module parameterBen Hutchings2011-01-131-0/+3
| | | | | | | | | | | | | | Commit a4900ac ("sfc: Create multiple TX queues") accidentally disabled the rss_cpus module parameter. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
| * sfc: Make efx_get_tx_queue() an inline functionBen Hutchings2011-01-132-14/+11
| | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* | Merge branch 'linux-next' of ↵Linus Torvalds2011-01-141-20/+5
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI/PM: Report wakeup events before resuming devices PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events PCI: sysfs: Update ROM to include default owner write access x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available PCI/ACPI: Request _OSC control once for each root bridge (v3) PCI: enable pci=bfsort by default on future Dell systems PCI/PCIe: Clear Root PME Status bits early during system resume PCI: pci-stub: ignore zero-length id parameters x86/PCI: irq and pci_ids patch for Intel Patsburg PCI: Skip id checking if no id is passed PCI: fix __pci_device_probe kernel-doc warning PCI: make pci_restore_state return void PCI: Disable ASPM if BIOS asks us to PCI: Add mask bit definition for MSI-X table PCI: MSI: Move MSI-X entry definition to pci_regs.h Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the meantime been converted to not use legacy PCI power management, and thus no longer use pci_restore_state() at all (and that caused trivial conflicts with the "make pci_restore_state return void" patch)
| * PCI: make pci_restore_state return voidJon Mason2010-12-231-20/+5
| | | | | | | | | | | | | | | | | | | | | | pci_restore_state only ever returns 0, thus there is no benefit in having it return any value. Also, a large majority of the callers do not check the return code of pci_restore_state. Make the pci_restore_state a void return and avoid the overhead. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* | Merge branch 'for-davem' of ↵David S. Miller2010-12-214-115/+35
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6
| * | sfc: Remove ancient support for nesting of TX stopBen Hutchings2010-12-104-113/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long before this driver went into mainline, it had support for multiple TX queues per port, with lockless TX enabled. Since Linux did not know anything of this, filling up any hardware TX queue would stop the core TX queue and multiple hardware TX queues could fill up before the scheduler reacted. Thus it was necessary to keep a count of how many TX queues were stopped and to wake the core TX queue only when all had free space again. The driver also previously (ab)used the per-hardware-queue stopped flag as a counter to deal with various things that can inhibit TX, but it no longer does that. Remove the per-channel tx_stop_count, tx_stop_lock and per-hardware-queue stopped count and just use the networking core queue state directly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
| * | sfc: Remove unused field and comment on a previously removed fieldBen Hutchings2010-12-101-2/+0
| | | | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* | | netdev: Use default implementation of ethtool_ops::get_link where possibleBen Hutchings2010-12-101-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>
* | | sfc: convert references to LRO to GROstephen hemminger2010-12-101-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>
* | Merge branch 'for-davem' of ↵David S. Miller2010-12-108-306/+468
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6
| * | sfc: Generalise filter spec initialisationBen Hutchings2010-12-073-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>
| * | sfc: Remove filter table IDs from filter functionsBen Hutchings2010-12-074-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>
| * | sfc: Log start and end of ethtool self-test at INFO levelBen Hutchings2010-12-071-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>
| * | sfc: Use TX push whenever adding descriptors to an empty queueBen Hutchings2010-12-063-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>
| * | sfc: Remove locking from implementation of efx_writeo_paged()Ben Hutchings2010-12-061-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>
| * | sfc: Add compile-time checks for correctness of paged register writesBen Hutchings2010-12-061-8/+23
| | | | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
| * | sfc: Remove redundant memory barriers between MMIOsBen Hutchings2010-12-061-5/+0
| | | | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
| * | sfc: Expand/correct comments on collector behaviour and function usageBen Hutchings2010-12-061-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>
| * | sfc: Use ACCESS_ONCE when copying efx_tx_queue::read_countBen Hutchings2010-12-061-3/+2
| | | | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
| * | sfc: Reorder struct efx_nic to separate fields by volatilityBen Hutchings2010-12-061-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>
* | | Merge branch 'master' of ↵David S. Miller2010-12-083-14/+37
|\ \ \ | |/ / |/| / | |/ | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c net/llc/af_llc.c
| * sfc: Fix NAPI list corruption during ring reallocationBen Hutchings2010-12-071-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>
| * sfc: Fix crash in legacy onterrupt handler during ring reallocationBen Hutchings2010-12-073-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>
* | sfc: Store MAC address from NVRAM in net_device::perm_addrBen Hutchings2010-12-034-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>
* | sfc: Use current MAC address, not NVRAM MAC address, for WoL filterBen Hutchings2010-12-031-1/+1
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: When waking a stopped tx_queue, only lock that tx_queueSteve Hodgson2010-12-031-2/+6
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Update kernel-doc to match earlier move of Toeplitz hash keyBen Hutchings2010-12-032-1/+1
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move xmac_poll_required into struct falcon_nic_dataBen Hutchings2010-12-035-8/+15
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move Falcon global event handling to falcon.cBen Hutchings2010-12-033-43/+43
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move mdio_lock to struct falcon_nic_dataBen Hutchings2010-12-034-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>
* | sfc: Move SPI state to struct falcon_nic_dataBen Hutchings2010-12-036-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>
* | sfc: Remove unnecessary inclusion of various private header filesBen Hutchings2010-12-038-10/+0
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Expose Falcon BootROM config through MTD, not ethtoolBen Hutchings2010-12-032-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>
* | sfc: Remove broken automatic fallback for invalid Falcon chip/board configBen Hutchings2010-12-031-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>
* | sfc: Fix event based MCDI completion and MC REBOOT/CMDDONE ordering issueSteve Hodgson2010-12-031-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>
* | sfc: Clear RXIN_SEL when soft-resetting QT2025CBen Hutchings2010-12-031-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>
* | sfc: Read-to-clear LM87 alarm/interrupt status at start of dayBen Hutchings2010-12-031-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>
* | sfc: Distinguish critical and non-critical over-temperature conditionsBen Hutchings2010-12-031-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>
* | sfc: Fix condition for no-op in set_phy_flash_cfg()Ben Hutchings2010-12-031-1/+1
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Reduce log level for MCDI error response in efx_mcdi_rpc()Ben Hutchings2010-12-031-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>
* | drivers/net: use vzalloc()Eric Dumazet2010-11-271-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>
* sfc: make functions staticstephen hemminger2010-10-2112-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>
* sfc: Don't try to set filters with search depths we know won't workBen Hutchings2010-10-081-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>
* sfc: Use netif_set_real_num_{rx,tx}_queues()Ben Hutchings2010-09-271-1/+2
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: return operator cleanupEric Dumazet2010-09-262-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>
* sfc: Add support for SFE4003 board and TXC43128 PHYBen Hutchings2010-09-225-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>
* sfc: Remove support for SFN4111T, SFT9001 and Falcon GMACBen Hutchings2010-09-2210-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>
* sfc: Fix build due to lack of vmalloc.h include.David S. Miller2010-09-211-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>
* sfc: Clean up and correct comments on efx_monitor()Ben Hutchings2010-09-211-13/+10
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>