aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/net_driver.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-04sfc: batch up RX deliveryEdward Cree1-0/+3
Improves packet rate of 1-byte UDP receives by up to 10%. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-24sfc: ARFS filter IDsEdward Cree1-0/+36
Associate an arbitrary ID with each ARFS filter, allowing to properly query for expiry. The association is maintained in a hash table, which is protected by a spinlock. v3: fix build warnings when CONFIG_RFS_ACCEL is disabled (thanks lkp-robot). v2: fixed uninitialised variable (thanks davem and lkp-robot). Fixes: 3af0f34290f6 ("sfc: replace asynchronous filter operations") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-14sfc: limit ARFS workitems in flight per channelEdward Cree1-0/+25
A misconfigured system (e.g. with all interrupts affinitised to all CPUs) may produce a storm of ARFS steering events. With the existing sfc ARFS implementation, that could create a backlog of workitems that grinds the system to a halt. To prevent this, limit the number of workitems that may be in flight for a given SFC device to 8 (EFX_RPS_MAX_IN_FLIGHT), and return EBUSY from our ndo_rx_flow_steer method if the limit is reached. Given this limit, also store the workitems in an array of slots within the struct efx_nic, rather than dynamically allocating for each request. The limit should not negatively impact performance, because it is only likely to be hit in cases where ARFS will be ineffective anyway. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-27sfc: protect list of RSS contexts under a mutexEdward Cree1-0/+2
Otherwise races are possible between ethtool ops and efx_ef10_rx_restore_rss_contexts(). Also, don't try to perform the restore on every reset, only after an MC reboot, otherwise we'll leak RSS contexts on the NIC. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-27sfc: use a semaphore to lock farch filters tooEdward Cree1-2/+0
With this change, the spinlock efx->filter_lock is no longer used and is thus removed. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-27sfc: give ef10 its own rwsem in the filter table instead of filter_lockEdward Cree1-1/+1
efx->filter_lock remains in place for use on farch, but EF10 now ignores it. EFX_EF10_FILTER_FLAG_BUSY is no longer needed, hence it is removed. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-27sfc: replace asynchronous filter operationsEdward Cree1-6/+4
Instead of having an efx->type->filter_rfs_insert() method, just use workitems with a worker function that calls efx->type->filter_insert(). The only user of this is efx_filter_rfs(), which now queues a call to efx_filter_rfs_work(). Similarly, efx_filter_rfs_expire() is now a worker function called on a new channel->filter_work work_struct, so the method efx->type->filter_rfs_expire_one() is no longer called in atomic context. We also add a new mutex efx->rps_mutex to protect the RPS state (efx-> rps_expire_channel, efx->rps_expire_index, and channel->rps_flow_id) so that the taking of efx->filter_lock can be moved to efx->type->filter_rfs_expire_one(). Thus, all filter table functions are now called in a sleepable context, allowing them to use sleeping locks in a future patch. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-14sfc: support FEC configuration through ethtoolEdward Cree1-0/+8
As well as 'auto' and the forced 'off', 'rs' and 'baser' states, we also handle combinations of settings (since the fecparam->fec field is a bitmask), where auto|rs and auto|baser specify a preferred FEC mode but will fall back to the other if the cable or link partner doesn't support it. rs|baser (with or without auto bit) means prefer FEC even where auto wouldn't use it, but let FW choose which encoding to use. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-08sfc: support RSS spreading of ethtool ntuple filtersEdward Cree1-8/+36
Use a linked list to associate user-facing context IDs with FW-facing context IDs (since the latter can change after an MC reset). Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-25sfc: on 8000 series use TX queues for TX timestampsEdward Cree1-2/+10
For this we create and use one or more new TX queues on the PTP channel, and enable sync events for it. Based on a patch by Martin Habets <mhabets@solarflare.com>. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-25sfc: handle TX timestamps in the normal data pathMartin Habets1-0/+9
Before this work, TX timestamping is done by sending each SKB to the MC. On the 8000 series (Medford1) we have high speed timestamping via the MAC, which means we can use normal TX queues for this without a significant drop in bandwidth. On the X2000 series (Medford2) support for transmitting via the MC is removed, so the new way must be used. This patch enables timestamping on a TX queue, if requested. It also enhances TX event handling to process the extra completion events, and puts the time in the SKB. Signed-off-by: Martin Habets <mhabets@solarflare.com> Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-10sfc: support the ethtool ksettings API properly so that 25/50/100G worksEdward Cree1-1/+1
Store and handle ethtool link mode masks within the driver instead of just a single u32. However, quite a significant amount of existing code wants to manipulate the masks directly, and thus now uses the first unsigned long (i.e. mask[0]) as though it were a legacy u32 mask. This is ok because all the bits that code is interested in are in the first 32 bits of the mask; but it might be a good idea to change them in future to use the proper bitmap API. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-21sfc: support variable number of MAC statsEdward Cree1-0/+3
Medford2 NICs support more than MC_CMD_MAC_NSTATS stats, and report the new count in a field of MC_CMD_GET_CAPABILITIES_V4. This also means that the end generation count moves (it is, as before, the last 64 bits of the DMA buffer, but that is no longer MC_CMD_MAC_GENERATION_END). So read num_mac_stats from the GET_CAPABILITIES response, if present; otherwise assume MC_CMD_MAC_NSTATS; and always use num_mac_stats - 1 rather than MC_CMD_MAC_GENERATION_END. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-18sfc: improve PTP error reportingEdward Cree1-0/+2
Log a message if PTP probing fails; if we then, unexpectedly, get PTP events, only log a message for the first one on each device. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-18sfc: support VI strides other than 8kEdward Cree1-0/+3
Medford2 can also have 16k or 64k VI stride. This is reported by MCDI in GET_CAPABILITIES, which fortunately is called before the driver does anything sensitive to the VI stride (such as accessing or even allocating VIs past the zeroth). Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-18sfc: make mem_bar a function rather than a constantEdward Cree1-1/+1
Support using BAR 0 on SFC9250, even though the driver doesn't bind to such devices yet. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-14sfc: MSI-X is the only interrupt mode for EF10 VFsAndrew Rybchenko1-1/+4
Add min_interrupt_mode specification per NIC type. It is a bit confusing because of "highest interrupt mode is less capable". Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-09sfc: configure UDP tunnel offload portsJon Cooper1-0/+19
Implement ndo_udp_tunnel_{add,del} to update the NIC's list of VXLAN and GENEVE UDP ports. Also reset the port list to empty on driver load and on driver unload, with appropriate flag set on the unload case. These port numbers are used for RX inner checksum offload, and in future will also be used for TX inner checksum offload and encapsulated TSO. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-09sfc: set csum_level for encapsulated packetsJon Cooper1-0/+1
Set the csum_level for encapsulated packets where the encapsulation type, l3 class and l4 class are sets that need it. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-09sfc: process RX event inner checksum flagsJon Cooper1-7/+12
Add support for RX checksum offload of encapsulated packets. This essentially just means paying attention to the inner checksum flags in the RX event, and if *either* checksum flag indicates a fail then don't tell the kernel that checksum offload was successful. Also, count these checksum errors and export the counts to ethtool -S. Test the most common "good" case of RX events with a single bitmask instead of a series of ifs. Move the more specific error checking in to a separate function for clarity, and don't use unlikely() there since we know at least one of the bits is bad. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-03sfc: get rid of custom busy polling codeEric Dumazet1-125/+0
In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of tricky code, we also remove one lock operation in fast path. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Edward Cree <ecree@solarflare.com> Cc: Bert Kenward <bkenward@solarflare.com> Acked-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-17sfc: read back RX hash config from the NIC when querying it with ethtool -xEdward Cree1-0/+2
Ensures that we report the key and indirection table the NIC is using, rather than (if setting them failed earlier) what we wanted it to use. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-17sfc: support setting RSS hash key through ethtool APIEdward Cree1-1/+2
Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-16sfc: allow PIO more oftenEdward Cree1-0/+9
If an option descriptor has been sent on a queue but not followed by a packet, there will have been no completion event, so the read and write counts won't match and we'll think we can't do PIO. This combines with the fact that we have two TX queues (for en/disable checksum offload), and that both must be empty for PIO to happen. This patch adds a separate "packet_write_count" that tracks the most recent write_count we expect to see a completion event for; this excludes option descriptors but _includes_ PIO descriptors (even though they look like option descriptors). This is then used, rather than write_count, in efx_nic_tx_is_empty(). We only bother to maintain packet_write_count on EF10, since on Siena (a) there are no option descriptors and it always equals write_count, and (b) there's no PIO, so we don't need it anyway. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-10sfc: support ndo_get_phys_port_id even when !CONFIG_SFC_SRIOVBert Kenward1-2/+3
There's no good reason why this should be an SRIOV-only thing. Thus, also move it out of SRIOV-specific files. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-04sfc: don't report RX hash keys to ethtool when RSS wasn't enabledEdward Cree1-0/+2
If we failed to set up RSS on EF10 (e.g. because firmware declared RX_RSS_LIMITED), ethtool --show-nfc $dev rx-flow-hash ... should report no fields, rather than confusingly reporting what fields we _would_ be hashing on if RSS was working. Fixes: dcb4123cbec0 ("sfc: disable RSS when unsupported") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: sfc: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-6/+6
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Tested-by: Bert Kenward <bkenward@solarflare.com> Acked-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-03sfc: remove EFX_BUG_ON_PARANOID, use EFX_WARN_ON_[ONCE_]PARANOID insteadEdward Cree1-11/+11
Logically, EFX_BUG_ON_PARANOID can never be correct. For, BUG_ON should only be used if it is not possible to continue without potential harm; and since the non-DEBUG driver will continue regardless (as the BUG_ON is compiled out), clearly the BUG_ON cannot be needed in the DEBUG driver. So, replace every EFX_BUG_ON_PARANOID with either an EFX_WARN_ON_PARANOID or the newly defined EFX_WARN_ON_ONCE_PARANOID. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-30sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driverEdward Cree1-3/+1
Rationale: The differences between Falcon and Siena are in many ways larger than those between Siena and EF10 (despite Siena being nominally "Falcon- architecture"); for instance, Falcon has no MCPU, so there is no MCDI. Removing Falcon support from the sfc driver should simplify the latter, and avoid the possibility of Falcon support being broken by changes to sfc (which are rarely if ever tested on Falcon, it being end-of-lifed hardware). The sfc-falcon driver created in this changeset is essentially a copy of the sfc driver, but with Siena- and EF10-specific code, including MCDI, removed and with the "efx_" identifier prefix changed to "ef4_" (for "EFX 4000- series") to avoid collisions when both drivers are built-in. This changeset removes Falcon from the sfc driver's PCI ID table; then in sfc I've removed obvious Falcon-related code: I removed the Falcon NIC functions, Falcon PHY code, and EFX_REV_FALCON_*, then fixed up everything that referenced them. Also, increment minor version of both drivers (to 4.1). For now, CONFIG_SFC selects CONFIG_SFC_FALCON, so that updating old configs doesn't cause Falcon support to disappear; but that should be undone at some point in the future. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-27sfc: remove unneeded variableDan Carpenter1-7/+1
We don't use ->heap_buf after commit 46d1efd852cc ("sfc: remove Software TSO") so let's remove the last traces. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-18sfc: remove Software TSOEdward Cree1-0/+5
It gives no advantage over GSO now that xmit_more exists. If we find ourselves unable to handle a TSO skb (because our TXQ doesn't have a TSOv2 context and the NIC doesn't support TSOv1), hand it back to GSO. Also do that if the TSO handler fails with EINVAL for any other reason. As Falcon-architecture NICs don't support any firmware-assisted TSO, they no longer advertise TSO feature flags at all. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-18sfc: Firmware-Assisted TSO version 2Bert Kenward1-2/+45
Add support for FATSOv2 to the driver. FATSOv2 offloads far more of the task of TCP segmentation to the firmware, such that we now just pass a single super-packet to the NIC. This means TSO has a great deal in common with a normal DMA transmit, apart from adding a couple of option descriptors. NIC-specific checks have been moved off the fast path and in to initialisation where possible. This also moves FATSOv1/SWTSO to a new file (tx_tso.c). The end of transmit and some error handling is now outside TSO, since it is common with other code. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-09sfc: report 4-tuple UDP hashing to ethtool, if it's enabledEdward Cree1-0/+2
Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-09-06sfc: check MTU against minimum thresholdBert Kenward1-0/+3
Reported-by: Ma Yuying <yuma@redhat.com> Suggested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Bert Kenward <bkenward@solarflare.com> Reviewed-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-26sfc: work around TRIGGER_INTERRUPT command not working on SFC9140Jon Cooper1-1/+1
MC_CMD_TRIGGER_INTERRUPT does not work on the SFC9140, as used in the sfn7x42q and sfn7x24f. Check for this using the MCDI workaround mechanism. The command is only used during self test. If it's not supported, skip the interrupt test. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: get timer configuration from adapterBert Kenward1-0/+2
On SFN8000 series adapters the MC provides a method to get the timer quantum and the maximum timer setting. We revert to the old values if the new call is unavailable. Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12sfc: set interrupt moderation via MCDIBert Kenward1-4/+6
SFN8000-series NICs require a new method of setting interrupt moderation, via MCDI. This is indicated by a workaround flag. This new MCDI command takes an explicit time value rather than a number of ticks. It therefore makes sense to also store the moderation values in terms of time, since that is what the ethtool interface is interested in. Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15sfc: VLAN filters must only be created if the firmware supports this.Martin Habets1-0/+12
If it is not supported we simply disable the feature. For the feature to work we need firmware filter support for OUTER_VID + LOC_MAC and for OUTER_VID + LOC_MAC_IG. The low-latency firmware can match on OUTER_VID + LOC_MAC but not on OUTER_VID + LOC_MAC_IG. For the capture packet firmware it is the other way around. Only the full-feature variant can match on both combinations. Incorporates a fix by Andrew Rybchenko <Andrew.Rybchenko@oktetlabs.ru> in the net_dev->[hw_]features handling. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15sfc: Implement ndo_vlan_rx_{add, kill}_vid() callbacksAndrew Rybchenko1-0/+2
Supports HW VLAN filtering, en/disabled using ethtool. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15sfc: Add efx_nic member with fixed netdev featuresAndrew Rybchenko1-0/+3
It allows to change set of fixed features on datapath reset. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15sfc: Move last mc_promisc flag to EF10 filter table stateAndrew Rybchenko1-2/+0
It is used for EF10 only and logically belongs to EF10 filter table state. It is OK that it is reset to false on filter table recreation since all filters are removed on destruction. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-31sfc: Track RPS flow IDs per channel instead of per functionJon Cooper1-4/+8
Otherwise we get confused when two flows on different channels get the same flow ID. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-02sfc: use ALIGN macro for aligning frame sizesJarod Wilson1-1/+2
Don't open-code it. CC: Solarflare linux maintainers <linux-net-drivers@solarflare.com> CC: Shradha Shah <sshah@solarflare.com> CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson <jarod@redhat.com> Acked-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-01sfc: make TSO version a per-queue parameterBert Kenward1-0/+2
The Solarflare 8000 series NIC will use a new TSO scheme. The current driver refuses to load if the current TSO scheme is not found. Remove that check and instead make the TSO version a per-queue parameter. Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+2
Minor overlapping changes in net/ipv4/ipmr.c, in 'net' we were fixing the "BH-ness" of the counter bumps whilst in 'net-next' the functions were modified to take an explicit 'net' parameter. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02sfc: push partner queue for skb->xmit_moreMartin Habets1-0/+2
When the IP stack passes SKBs the sfc driver puts them in 2 different TX queues (called partners), one for checksummed and one for not checksummed. If the SKB has xmit_more set the driver will delay pushing the work to the NIC. When later it does decide to push the buffers this patch ensures it also pushes the partner queue, if that also has any delayed work. Before this fix the work in the partner queue would be left for a long time and cause a netdev watchdog. Fixes: 70b33fb ("sfc: add support for skb->xmit_more") Reported-by: Jianlin Shi <jishi@redhat.com> Signed-off-by: Martin Habets <mhabets@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27sfc: replace spinlocks with bit ops for busy poll lockingBert Kenward1-73/+56
This patch reduces the overhead of locking for busy poll. Previously the state was protected by a lock, whereas now it's manipulated solely with atomic operations. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-12sfc: fully reset if MC_REBOOT event received without warm_boot_count incrementDaniel Pieczko1-0/+1
On EF10, MC_CMD_VPORT_RECONFIGURE can cause a CODE_MC_REBOOT event to be sent to a function without incrementing the (adapter-wide) warm_boot_count. In this case, the reboot is not detected by the loop on efx_mcdi_poll_reboot(), so prepare for recovery from an MC reboot anyway. When this codepath is run, the MC has always just rebooted, so this recovery is valid. The loop on efx_mcdi_poll_reboot() is still required for other MC reboot cases, so that actions in response to an MC reboot are performed, such as clearing locally calculated statistics. Siena NICs are unaffected by this change as the above scenario does not apply. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-28sfc: Allow driver to cope with a lower number of VIs than it needs for RSSShradha Shah1-0/+1
Previously, the driver would refuse to load if it couldn't secure enough VIs from the MC to fulfill its RSS requirements. This was causing probe to fail on later functions in configurations where we'd run out of VIs, such as having many VFs. This change allows the driver to load with fewer VIs, down to a minimum of 2. A warning will be printed saying that RSS requirements were not met, possibly affecting performance. efx->max_tx_channels needs to be set to avoid going down the failure path in efx_probe_nic() immediately in the loop after the probe() NIC-type function. Also, Set rc=ENOSPC when bombing out of efx_probe_nic due to lack of VIs. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>