summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mcdi_port.c
Commit message (Collapse)AuthorAgeFilesLines
* sfc: Update copyright bannersBen Hutchings2013-08-301-2/+2
| | | | | | | Update the dates for files that have been added to in 2012-2013. Drop the 'Solarstorm' brand name that's still lingering here. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* sfc: Add support for Solarflare SFC9100 familyBen Hutchings2013-08-291-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the EF10 network controller architecture and the SFC9100 family, starting with SFC9120 'Farmingdale', and bumps the driver version to 4.0. New features in the SFC9100 family include: - Flexible allocation of internal resources to PCIe physical and virtual functions under firmware control - RX event merging to reduce DMA writes at high packet rates - Integrated RX timestamping - PIO buffers for lower TX latency - Firmware-driven data path that supports additional offload features and filter types - Delivery of packets between functions and to multiple recipients, allowing firmware to implement a vswitch - Multiple RX flow hash (RSS) contexts with their own hash keys and indirection tables - 40G MAC (single port only) ...not all of which are enabled in this initial driver or the initial firmware release. Much of the new code is by Jon Cooper. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* sfc: Cleanup Falcon-arch simple MAC filter stateBen Hutchings2013-08-221-7/+4Star
| | | | | | | | | | | | | | | | | | | | | | | On Falcon we implement MAC filtering requested by the stack using the MAC wrapper's single unicast filter and multicast hash filter. Siena is very similar, though MAC configuration is mediated by the MC. Since MCDI operations may sleep, reconfiguration is deferred from ndo_set_rx_mode to a work item. However, it still updates the private variables describing the filter state synchronously. Contrary to comments, the later use of these variables is not protected using the address lock, resulting in race conditions. Move the state update to a new function efx_farch_filter_sync_rx_mode() and make the Falcon-arch MAC configuration functions call that, so that its use is consistently serialised by the mac_lock. Invert and rename the promiscuous flag to the more accurate unicast_filter, and comment that both this and multicast_hash are not used on EF10. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* sfc: Define and use MCDI_POPULATE_DWORD_{1,2,3,4,5,6,7}Ben Hutchings2013-08-221-10/+8Star
| | | | | | There is only one user now, but we're about to add many more. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* sfc: Update MCDI protocol definitions for EF10Ben Hutchings2013-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | EF10 controllers do not have shared memory for communication with the MC; instead it reads requests and writes responses in host memory, which allows for longer messages. It is also responsible for all datapath control operations and hardware resource allocation, which requires a large number of new commands and adds more possible error cases. MCDI v2 extends the message header to support this. Update the MCDI protocol definition header to include v2 lengths, errors and messages, and a few definitions specific to the SFC9100 family (codenames Farmingdale and Huntington) which is the first generation of EF10. Some messages have been extended, so adjust the code accordingly: - The request for MC_CMD_DRV_ATTACH now includes a datapath firmware ID. This is ignored by Siena but we should fill it in anyway, initially always specifying low-latency datapath. - The response for MC_CMD_GET_LOOPBACK_MODES now includes a 40G field. Accept shorter responses that don't include it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* sfc: Add GFP flags to efx_nic_alloc_buffer() and make most callers allow ↵Ben Hutchings2013-08-211-1/+1
| | | | | | | | | | | blocking Most call sites for efx_nic_alloc_buffer() are part of the probe or reconfiguration paths and can allocate with GFP_KERNEL. A few others should use GFP_NOIO (I think). Only one is in atomic context and must use the current GFP_ATOMIC. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
* sfc: Collect all MCDI port functions into mcdi_port.cBen Hutchings2013-08-211-0/+1010
Collect together MCDI port functions from mcdi.c, mcdi_mac.c, mcdi_phy.c and siena.c. Rename the 'siena' functions accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>