aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
Commit message (Collapse)AuthorAge
* sfc: Remove unused constantBen Hutchings2009-11-26
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Comment correctionsBen Hutchings2009-11-26
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Strengthen EFX_ASSERT_RESET_SERIALISEDBen Hutchings2009-11-26
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Treat all MAC registers as 128-bitBen Hutchings2009-11-26
| | | | | | | | | | Although all the defined fields in these registers are within 32 bits, they are architecturally defined as 128-bit like most other Falcon registers. In particular, we must use efx_reado() to ensure proper locking when reading MD_STAT_REG. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Fix descriptor cache sizesBen Hutchings2009-11-26
| | | | | | | | These were accidentally undersized by a factor of 2, which limited performance. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Log interrupt and reset type names, not numbersBen Hutchings2009-11-24
| | | | | | | | Define name tables for these enumerations in a similar way as for loopback. Move the loopback name table together with them. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Combine high-level header filesBen Hutchings2009-11-24
| | | | | | | | | All files that include ethtool.h, rx.h or tx.h are also including efx.h, and there is no good reason to separate out the few declarations they contain. Therefore fold them into efx.h. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove redundant efx_xmit() functionBen Hutchings2009-11-24
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove unnecessary casts to struct sk_buff *Ben Hutchings2009-11-24
| | | | | | | | At some point these casts were used to remove const qualification, but they are now unneeded. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Gather link state fields in struct efx_nic into new struct efx_link_stateBen Hutchings2009-11-24
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move all I2C stuff into struct falcon_boardBen Hutchings2009-11-24
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move struct falcon_board into struct falcon_nic_dataBen Hutchings2009-11-24
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move definition of struct falcon_nic_data into falcon.hBen Hutchings2009-11-24
| | | | | | | | This is preparation for moving Falcon-specific state required by other Falcon-specific code. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Make board information explicitly Falcon-specificBen Hutchings2009-11-24
| | | | | | | | | | | | Rename struct efx_board to struct falcon_board. Introduce and use inline function to look up board info from struct efx_nic, in preparation for moving it. Move board init and fini calls into NIC probe and remove functions. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Rename efx_board::init_leds to init_phy and use for SFN4111TBen Hutchings2009-11-24
| | | | | | | | | | | efx_board::init_leds was introduced as a second stage of initialisation because of the inter-dependency between the board and PHY. We want to move board initialisation into NIC probing, which is too early to use MDIO, so SFN4111T initialisation also needs to be split. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Use a single blink implementationBen Hutchings2009-11-24
| | | | | | | | | | | Only some PHYs have firmware support for a LED blink mode, so we currently blink the others in a timer function. Since all PHYs have simple on and off modes, we don't gain anything by using multiple blink implementations. Also, since we have a process context there is no need to use a timer. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: SFT9001: Reset LED configuration correctly after blinkingBen Hutchings2009-11-24
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Record RX queue number on GRO pathBen Hutchings2009-11-24
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move assertions and buffer cleanup earlier in efx_rx_packet_lro()Ben Hutchings2009-11-24
| | | | | | | | This removes the need to use a label and goto, and makes the two branches mirror each other more closely. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove ridiculously paranoid assertionsBen Hutchings2009-11-24
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove redundant gotos from __efx_rx_packet()Ben Hutchings2009-11-24
| | | | | | | This function no longer has any common cleanup code. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove pointless abstraction of memory BAR number (2)Ben Hutchings2009-11-24
| | | | | | | Finish the job by removing the structure member. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-11-19
|\ | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/sfc/sfe4001.c drivers/net/wireless/libertas/cmd.c drivers/staging/Kconfig drivers/staging/Makefile drivers/staging/rtl8187se/Kconfig drivers/staging/rtl8192e/Kconfig
| * i2c: Add an interface to lock/unlock an I2C bus segmentJean Delvare2009-11-07
| | | | | | | | | | | | | | | | | | Some drivers need to be able to prevent access to an I2C bus segment for a specific period of time. Add an interface for them to do so without twiddling with i2c-core internals. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Ben Hutchings <bhutchings@solarflare.com>
* | sfc: Enable heuristic selection between page and skb RX buffersBen Hutchings2009-10-30
| | | | | | | | | | | | | | | | Now that we can tell whether GRO is being applied, this heuristic is effective once more. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Feed GRO result into RX allocation policy and interrupt moderationBen Hutchings2009-10-30
| | | | | | | | | | | | | | | | | | | | | | | | When GRO is successfully merging received packets, we should allocate raw page buffers rather than skbs that will be discarded by GRO. Otherwise, we should allocate skbs. GRO also benefits from higher interrupt moderation, so increase the score for mergeable RX packets. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2009-10-30
|\| | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * sfc: Set ip_summed correctly for page buffers passed to GROBen Hutchings2009-10-28
| | | | | | | | | | | | | | | | | | | | Page buffers containing packets with an incorrect checksum or using a protocol not handled by hardware checksum offload were previously not passed to LRO. The conversion to GRO changed this, but did not set the ip_summed value accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Really allow RX checksum offload to be disabledBen Hutchings2009-10-28
| | | | | | | | | | | | | | | | | | | | We have never checked the efx_nic::rx_checksum_enabled flag everywhere we should, and since the switch to GRO we don't check it anywhere. It's simplest to check it in the one place where we initialise the per-packet checksummed flag. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Rename 'xfp' file and functions to reflect realityBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | | | | | The 'XFP' driver is really a driver for the QT2022C2 and QT2025C PHYs, covering both more and less than XFP. Rename its functions and constants to reflect reality and to reduce namespace pollution when sfc is a built-in driver. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Remove unused code for non-autoneg speed/duplex switchingBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | The only multi-speed PHY driver using this is 10Xpress, and it does not support non-autoneg operation. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Merge efx_fc_resolve() into efx_mdio_get_pause()Ben Hutchings2009-10-24
| | | | | | | | | | | | | | | | efx_fc_resolve() is specific to MDIO and is not used by any other function. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move MTD probe after netdev registration and name allocationBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | The MTD partition is named based on the netdev name, which is set to 'eth%d' before registration. Also, the MTD partition will currently be left registered if netdev registration fails. Fix both these problems by moving the MTD probe after netdev registration. Hold the RTNL to serialise this with the netdev notifier that calls efx_mtd_rename(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Remove unnecessary tests of efx->membaseBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | These cleanup functions will never be called if the MMIO region could not be mapped. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Remove incorrect assertion from efx_pci_remove_main()Ben Hutchings2009-10-24
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Merge falcon_probe_phy() into falcon_probe_port()Ben Hutchings2009-10-24
| | | | | | | | | | | | | | | | | | MAC and PHY probing are bound up together, as evidenced by the initialisation of efx_nic::loopback_modes. Remove the current arbitrary separation. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Remove pointless abstraction of memory BAR numberBen Hutchings2009-10-24
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Removed kernel-doc for nonexistent member of efx_phy_operationsBen Hutchings2009-10-24
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Maintain interrupt moderation values in ticks, not microsecondsBen Hutchings2009-10-24
| | | | | | | | | | | | | | This simplifies the implementation a lot. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move shared members of struct falcon_nic_data into struct efx_nicBen Hutchings2009-10-24
| | | | | | | | | | | | | | These will also be used with Siena NICs. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move efx_xmit_done() declaration into correct stanzaBen Hutchings2009-10-24
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Remove declarations of nonexistent functionsBen Hutchings2009-10-24
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Change order of device removal to reverse of probe orderBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | This makes efx_pci_remove_main() more obviously the inverse of efx_pci_probe_main(), and matches our out-of-tree driver. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Merge struct efx_blinker into struct efx_boardBen Hutchings2009-10-24
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move all TX DMA length limiting into tx.cBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | | | | | | | Replace the duplicated logic in efx_enqueue_skb() and efx_tx_queue_insert() with an inline function, efx_max_tx_len(). Remove the failed attempt at abstracting hardware-specifics and put all the magic numbers in efx_max_tx_len(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Define DMA address mask explicitly in terms of descriptor field widthBen Hutchings2009-10-24
| | | | | | | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Eliminate indirect lookups of queue size constantsBen Hutchings2009-10-24
| | | | | | | | | | | | | | Move size and mask definitions into efx.h; calculate page orders in falcon.c. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Rename register I/O header and functions used by both Falcon and SienaBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | While we're at it, use type suffixes of 'd', 'q' and 'o', consistent with register type names. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Update hardware definitions for SienaBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Siena is still based on the Falcon hardware architecture and will share many of these definitions, so replace falcon_hwdefs.h with regs.h. The new definitions have been generated according to a naming convention which incorporates the type and revision information. Update the code accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Move RX data FIFO thresholds out of struct efx_nic_typeBen Hutchings2009-10-24
| | | | | | | | | | | | | | | | | | Since there are now separate blocks of code to set the thresholds for each NIC type, it is no longer useful to include them in the NIC type description. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>