aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/ethtool.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-04-29sfc: Use generic MDIO flow control auto-negotiation functionsBen Hutchings1-1/+2
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-29sfc: Use generic MDIO functions and definitionsBen Hutchings1-12/+6
Make use of the newly-added generic MDIO clause 45 support and remove redundant definitions. Add an 'efx_' prefix to the remaining driver-specific MDIO functions and remove arguments which are redundant with efx->mdio.prtad. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21sfc: Implement adaptive IRQ moderationBen Hutchings1-13/+6
Calculate a score for each 1000 IRQs: - TX completions are worth 1 point - RX completions are worth 4 if merged using LRO or 2 otherwise Reduce moderation if the score is less than 10000, down to a minimum of 5 us. Increase moderation if the score is more than 20000, up to the specified maximum. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-04sfc: Fix efx_ethtool_nway_result() to use clause 45 MDIO registersBen Hutchings1-1/+8
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-30sfc: SFX7101/SFT9001: Fix AN advertisementsBen Hutchings1-3/+0
All 10Xpress PHYs require autonegotiation all the time; enforce this in the set_settings() method and do not treat it as a workaround. Remove claimed support for 100M HD mode since it is not supported by current firmware. Do not set speed override bits when AN is enabled, and do not use register 1.49192 for AN configuration as it can override what we set elsewhere. Always set the AN selector bits to 1 (802.3). Fix confusion between Next Page and Extended Next Page. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: Add support for multiple PHY self-testsBen Hutchings1-3/+5
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: Merge top-level functions for self-testsBen Hutchings1-14/+5
Pass in ethtool test flags to determine which tests to run. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Use mutex_lock_interruptible() for ethtool EEPROM accessBen Hutchings1-2/+8
ethtool must contend with the MTD driver for the SPI bus lock, which may carry out long operations such as flash erase. Allow it to be interrupted while waiting. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Specify a meaningful component for loopback RX-side and PHY testsBen Hutchings1-6/+8
Our ethtool self-test result names each begin with a component name. For some results this is "port0", which is not very meaningful. Change that to "rx" or "phy" as appropriate. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Add support for Solarflare 10Xpress SFT9001Ben Hutchings1-0/+3
Add type codes for the new PHY and rename the SFX7101 type code. Add definition of clause 22 extension MMD. Adapt the 10Xpress SFX7101 code to support the SFT9001 as well. Clean up register definitions. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Implement auto-negotiationBen Hutchings1-9/+48
Add infrastructure for auto-negotiation of speed, duplex and flow control. When using 10Xpress, auto-negotiate flow control. While we're at it, clean up the code to warn when partner is not 10GBASE-T capable. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Add support for sub-10G speedsBen Hutchings1-21/+17
The SFC4000 has a separate MAC for use at sub-10G speeds. Introduce an efx_mac_operations structure with implementations for the two MACs. Switch between the MACs as necessary. PHY settings are independent of the MAC, so add get_settings() and set_settings() to efx_phy_operations. Also add macs field to indicate which MACs the PHY is connected to. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Remove MII extension cruftBen Hutchings1-1/+0
Replace efx_nic::link_options bitfield with link_speed (speed in Mbit/s) and link_fd (full duplex flag). Remove broken auto-negotiation functions. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Abbreviate self-test names so they are not truncatedBen Hutchings1-8/+8
Change "channel" to "chan". Shorten PHY loopback names. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-12sfc: Correct interpretation of second param to ethtool phys_id()Ben Hutchings1-2/+6
A value of 0 means indefinite repetition (until interrupted). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-19netdev: introduce dev_get_stats()Stephen Hemminger1-1/+1
In order for the network device ops get_stats call to be immutable, the handling of the default internal network device stats block has to be changed. Add a new helper function which replaces the old use of internal_get_stats. Note: change return code to make it clear that the caller should not go changing the returned statistics. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-06sfc: Expose flash region storing boot code as MTDBen Hutchings1-0/+4
The boot code that appears as a PCI expansion ROM on the SFC4000 is stored in flash. Expose this as a standard MTD device to allow for in-place upgrades. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-11-06sfc: Clean up non-volatile memory partitioningBen Hutchings1-7/+4
Move flash and EEPROM partition boundary constants into spi.h and rename them to be consistent. Add a comment on the partitioning. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-11-06sfc: Correct address of gPXE boot configuration in EEPROMBen Hutchings1-2/+2
Due to a hardware bug, the originally assigned range cannot reliably be used for boot configuration and must not be modifiable through ethtool. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Extend self-testsBen Hutchings1-12/+10
Include PMA/PMD in loopback self-tests as intended. Add NVRAM checksum validation and include it in self-tests. Add register self-tests. Run PHY self-tests where available. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Remove some unreachable error pathsBen Hutchings1-4/+4
Some functions return an error code which is always 0. Change their return types to void and simplify their callers accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Implement get_sset_count, replacing get_stats_count and self_test_countBen Hutchings1-11/+12
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Export boot configuration in EEPROM through ethtoolBen Hutchings1-0/+52
Extend the SPI device setup code to support this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Use explicit bool for boolean variables, parameters and return valuesBen Hutchings1-4/+4
Replace (cond ? 1 : 0) with cond or !!cond as appropriate, and (cond ? 0 : 1) with !cond. Remove some redundant boolean temporaries. Rename one field that looks like a flag but isn't. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Use separate hardware TX queues to select checksum generationBen Hutchings1-43/+2
Checksum generation is an attribute of our hardware TX queues, not TX descriptors. We previously used a single queue and turned checksum generation on or off as requested through ethtool. However, this can result in regenerating checksums in raw packets that should not be modified. We now create 2 hardware TX queues with checksum generation on or off. They are presented to the net core as one queue since it does not know how to select between them. The self-test verifies that a bad checksum is unaltered on the queue with checksum generation off. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-03sfc: Replace net_dev->priv with netdev_priv(net_dev)Ben Hutchings1-17/+17
Use of the net_device::priv field is deprecated. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13[netdrvr] sfc: sfc: Add self-test supportBen Hutchings1-1/+231
Add a set of self-tests accessible thorugh ethtool. Add hardware loopback and TX disable control code to support them. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-13[netdrvr] sfc: Add TSO supportBen Hutchings1-0/+27
The SFC4000 controller does not have hardware support for TSO, and the core GSO code incurs a high cost in allocating and freeing skbs. This TSO implementation uses lightweight packet header structures and is substantially faster. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29New driver "sfc" for Solarstorm SFC4000 controller.Ben Hutchings1-0/+460
The driver supports the 10Xpress PHY and XFP modules on our reference designs SFE4001 and SFE4002 and the SMC models SMC10GPCIe-XFP and SMC10GPCIe-10BT. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>