summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
Commit message (Collapse)AuthorAgeFilesLines
* sfc: Rename 'xfp' file and functions to reflect realityBen Hutchings2009-10-245-58/+58
| | | | | | | | | | 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-241-69/+39
| | | | | | | | 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-242-15/+8
| | | | | | | | 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-241-2/+4
| | | | | | | | | | | | | 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-241-8/+0
| | | | | | | | 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-241-2/+0
| | | | | 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-241-35/+25
| | | | | | | | | 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-243-11/+10
| | | | | 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-241-1/+0
| | | | | 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-244-34/+28
| | | | | | | 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-242-16/+14
| | | | | | | 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-241-1/+1
| | | | | 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-241-2/+0
| | | | | 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-241-1/+1
| | | | | | | | 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-242-29/+21
| | | | | 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-244-25/+25
| | | | | | | | | | | 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-241-5/+2
| | | | | 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-247-98/+62
| | | | | | | 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-247-421/+426
| | | | | | | | 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-247-1887/+3756
| | | | | | | | | | | | | 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-242-15/+12
| | | | | | | | | 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>
* sfc: Remove versioned bitfield macrosBen Hutchings2009-10-243-40/+47
| | | | | | | | | | | | | | | | | | These macros are not extensible to more than two NIC types without repetition of register definitions, and they are only used to deal with a few fields in RX_CFG_REG and global events which moved between Falcon rev A1 and B0. Therefore: - Move RX_CFG_REG initialisation into its own function which tests the NIC revision just once - Explicitly test the NIC revision when checking the RX_RECOVERY flag in global events - Merge definitions of RX_XOFF_MAC_EN flag, which did not move - Remove the macro definitions Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove boards.h, moving last remaining declaration to falcon.hBen Hutchings2009-10-249-22/+2
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Merge sfe4001.c into falcon_boards.cBen Hutchings2009-10-244-443/+420
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Rename Falcon-specific board code and typesBen Hutchings2009-10-245-26/+25
| | | | | | | Siena will require entirely different board code. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove redundant hardware initialisationBen Hutchings2009-10-241-4/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove redundant header gmii.hBen Hutchings2009-10-242-61/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: 10Xpress: Report support for pause framesBen Hutchings2009-10-221-0/+1
| | | | | | | | | | | | Commits 27fbc7d 'mdio: Expose pause frame advertising flags to ethtool' and c634263 'sfc: 10Xpress: Initialise pause advertising flags' added to our reported advertising flags. efx_mdio_set_settings() requires that all advertising flags are also present in the supported flags, so make sure that is true. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: 10Xpress: Initialise pause advertising flagsBen Hutchings2009-10-121-0/+10
| | | | | | | | | The mdio module now handles reconfiguration of pause advertising through ethtool, but not initialisation. Add the necessary initialisation to tenxpress_phy_init(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cpumask: use zalloc_cpumask_var() where possibleLi Zefan2009-09-241-2/+1
| | | | | | | Remove open-coded zalloc_cpumask_var() and zalloc_cpumask_var_node(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* netdev: drivers should make ethtool_ops constStephen Hemminger2009-09-022-2/+2
| | | | | | | No need to put ethtool_ops in data, they should be const. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: convert bulk of drivers to netdev_tx_tStephen Hemminger2009-09-014-14/+15
| | | | | | | | | | | | In a couple of cases collapse some extra code like: int retval = NETDEV_TX_OK; ... return retval; into return NETDEV_TX_OK; Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Improve reliability of RX queue flushingBen Hutchings2009-08-261-0/+2
| | | | | | | | | Reconfiguring the port requires us to flush all DMA queues. In repeated testing we have found that RX flushes would sometimes fail because the RX DMA engine was not properly isolated from the MACs. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Work around XMAC bug causing packet loss with some peersBen Hutchings2009-08-261-1/+6
| | | | | | | | | | | | | | | | Received frames must be re-clocked by the local XGXS to the 156.25 MHz (DDR) clock of the XGMII. If the remote clock is slightly faster this can reduce a minimum IPG of 64 bit-times (1 cycle) to 32 bit-times (half a cycle). If the XMAC detects that a frame has reached the maximum RX frame length in the same cycle that it receives one of these reduced IPGs, it may miss the IPG, causing two valid frames to be treated as a single invalid frame (over-length with bad CRC). We work around this by increasing the maximum RX frame length so that peers with matched MTU will not provoke this bug. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: QT2025C: Use hard reset onlyBen Hutchings2009-08-261-9/+10
| | | | | | | | | | At probe time, falcon_reset_hw() performs a hard reset of the PHY along with Falcon. There is no need to perform a soft reset later, and any access to standard MDIO registers before the PHY firmware has booted can interrupt the boot process, making the port unusable. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Do not reinitialise XAUI serdes before it has completed resetBen Hutchings2009-08-262-3/+7
| | | | | | | | | falcon_reset_xaui() waits for XGXS reset to complete, but the XAUI serdes reset may take longer. It needs to check both reset active bits. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Fix ordering of device registration and initial netif_carrier_off()Ben Hutchings2009-08-261-9/+17
| | | | | | | | | | | | | We must call netif_carrier_off() after the device is registered, not before, to set the operational state and user-space IFF_RUNNING flag correctly. Since we don't want observers to see an intermediate state, open-code register_netdev() and add efx_update_name() and netif_carrier_off() into the locked region. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Expose 100/1000BASE-T MDI-X status via ethtoolBen Hutchings2009-06-111-1/+10
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dont update dev->trans_start in 10GB driversEric Dumazet2009-05-292-7/+1
| | | | | | | | | | | | | | | | | Followup of commits 9d21493b4beb8f918ba248032fefa393074a5e2b and 08baf561083bc27a953aa087dd8a664bb2b88e8e (net: tx scalability works : trans_start) (net: txq_trans_update() helper) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Multi queue drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers (vxge & tehuti) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove lro module parameterBen Hutchings2009-05-191-13/+2
| | | | | | | GRO/LRO can be controlled through ethtool so this is unnecessary. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Use generic XENPAK register definitionsBen Hutchings2009-05-173-73/+4
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: modify allocation error messageMike Travis2009-05-171-2/+2
| | | | | | | | | | | | | | Change error message when alloc_cpumask_var fails. Repairs "cpumask: convert drivers/net/sfc". Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Use generic MDIO flow control auto-negotiation functionsBen Hutchings2009-04-295-48/+7
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Use generic MDIO functions and definitionsBen Hutchings2009-04-2914-845/+311
| | | | | | | | | | | 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>
* Merge branch 'master' of ↵David S. Miller2009-04-162-5/+6
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * sfc: Use correct macro to set event bitfieldBen Hutchings2009-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | falcon_sim_phy_event() used EFX_OWORD_FIELD, which operates on bitfields in 128-bit values, on an event, which is a 64-bit value. This should be harmless - these macros always use little-endian ordering, so it would read and write back the following 8 bytes unchanged - but it is obviously wrong. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: Match calls to netif_napi_add() and netif_napi_del()Ben Hutchings2009-04-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | sfc could call netif_napi_add() multiple times for the same napi_struct, corrupting the list of napi_structs for the associated device and leading to a busy-loop on device removal. Move the call to netif_napi_add() and add a call to netif_napi_del() in the obvious places. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gro: New frags interface to avoid copying shinfoHerbert Xu2009-04-161-8/+18
| | | | | | | | | | | | | | | | | | | | | | It turns out that copying a 16-byte area at ~800k times a second can be really expensive :) This patch redesigns the frags GRO interface to avoid copying that area twice. The two disciples of the frags interface have been converted. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Don't specify unexistent IRQJean Delvare2009-04-082-5/+0
|/ | | | | | | | | Neither the lm90 driver nor the lm87 driver do support interrupts, so there is no point in specifying one when declaring the devices. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Call netif_napi_add() before registering our interrupt handlerBen Hutchings2009-03-311-4/+3
| | | | | | | | | | | If we use a shared legacy IRQ then our interrupt handler may be called as soon as it is registered even though IRQs are disabled on the NIC. Now that the legacy interrupt handler also checks for event delivery, it may decide to schedule polling in this case. Ensure that the NAPI context is valid but disabled at this point. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud