summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
Commit message (Collapse)AuthorAgeFilesLines
...
* | net: ena: add hardware hints capability to the driverNetanel Belgazal2017-06-236-11/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, ENA device can update the ena driver about the desired timeout values: These values are part of the "hardware hints" which are transmitted to the driver as Asynchronous event through ENA async event notification queue. In case the ENA device does not support this capability, the driver will use its own default values. Signed-off-by: Netanel Belgazal <netanel@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: ena: change return value for unsupported features unsupported return valueNetanel Belgazal2017-06-233-28/+24Star
| | | | | | | | | | | | | | return -EOPNOTSUPP instead of -EPERM. Signed-off-by: Netanel Belgazal <netanel@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: stmmac: make some functions staticColin Ian King2017-06-231-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions dwmac4_dma_init_rx_chan, dwmac4_dma_init_tx_chan and dwmac4_dma_init_channel do not need to be in global scope, so them static. Cleans up sparse warnings: "symbol 'dwmac4_dma_init_rx_chan' was not declared. Should it be static?" "symbol 'dwmac4_dma_init_tx_chan' was not declared. Should it be static?" "symbol 'dwmac4_dma_init_channel' was not declared. Should it be static?" Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | nfp: xdp: report if program is offloadedJakub Kicinski2017-06-231-0/+2
| | | | | | | | | | | | | | Make use of just added XDP_ATTACHED_HW. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | nfp: bpf: add support for XDP_FLAGS_HW_MODEJakub Kicinski2017-06-231-3/+10
| | | | | | | | | | | | | | | | Respect the XDP_FLAGS_HW_MODE. When it's set install the program on the NIC and skip enabling XDP in the driver. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | nfp: bpf: release the reference on offloaded programsJakub Kicinski2017-06-232-21/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The xdp_prog member of the adapter's data path structure is used for XDP in driver mode. In case a XDP program is loaded with in HW-only mode, we need to store it somewhere else. Add a new XDP prog pointer in the main structure and use that when we need to know whether any XDP program is loaded, not only a driver mode one. Only release our reference on adapter free instead of immediately after netdev unregister to allow offload to be disabled first. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | nfp: bpf: don't offload XDP programs in DRV_MODEJakub Kicinski2017-06-232-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRV_MODE means that user space wants the program to be run in the driver. Do not try to offload. Only offload if no mode flags have been specified. Remember what the mode is when the program is installed and refuse new setup requests if there is already a program loaded in a different mode. This should leave it open for us to implement simultaneous loading of two programs - one in the drv path and another to the NIC later. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | nfp: xdp: move driver XDP setup into a separate functionJakub Kicinski2017-06-231-5/+18
| | | | | | | | | | | | | | | | | | | | | | In preparation of XDP offload flags move the driver setup into a function. Otherwise the number of conditions in one function would make it slightly hard to follow. The offload handler may now be called with NULL prog, even if no offload is currently active, but that's fine, offload code can handle that. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: mvpp2: remove mvpp2_pool_refill()Thomas Petazzoni2017-06-221-11/+3Star
| | | | | | | | | | | | | | | | | | When all a function does is calling another function with the exact same arguments, in the exact same order, you know it's time to remove said function. Which is exactly what this commit does. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: mvpp2: remove unused mvpp2_bm_cookie_pool_set() functionThomas Petazzoni2017-06-221-11/+0Star
| | | | | | | | | | | | | | This function is not used in the driver, remove it. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: mvpp2: add comments about smp_processor_id() usageThomas Petazzoni2017-06-221-4/+29
| | | | | | | | | | | | | | | | | | | | A previous commit modified a number of smp_processor_id() used in migration-enabled contexts into get_cpu/put_cpu sections. However, a few smp_processor_id() calls remain in the driver, and this commit adds comments explaining why they can be kept. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | stmmac: pci: Use dmi_system_id table for retrieving PHY addressesJan Kiszka2017-06-221-33/+64
| | | | | | | | | | | | | | Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | stmmac: pci: Select quark_pci_dmi_data from quark_default_dataJan Kiszka2017-06-221-44/+39Star
| | | | | | | | | | | | | | | | | | | | | | No need to carry this reference in stmmac_pci_info - the Quark-specific setup handler knows that it needs to use the Quark-specific DMI table. This also allows to drop the stmmac_pci_info reference from the setup handler parameter list. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | stmmac: pci: Make stmmac_pci_find_phy_addr truly genericJan Kiszka2017-06-221-7/+13
| | | | | | | | | | | | | | | | | | | | Move the special case for the early Galileo firmware into quark_default_setup. This allows to use stmmac_pci_find_phy_addr for non-quark cases. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | stmmac: pci: Use stmmac_pci_info for all devicesJan Kiszka2017-06-221-13/+23
| | | | | | | | | | | | | | | | | | | | Make stmmac_default_data compatible with stmmac_pci_info.setup and use an info structure for all devices. This allows to make the probing more regular. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | stmmac: pci: Make stmmac_pci_info structure constantJan Kiszka2017-06-221-12/+11Star
| | | | | | | | | | | | | | | | | | | | By removing the PCI device reference from the structure and passing it as parameters to the interested functions, we can make quark_pci_info const. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ibmvnic: Correct return code checking for ibmvnic_init during probeNathan Fontenot2017-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The update to ibmvnic_init to allow an EAGAIN return code broke the calling of ibmvnic_init from ibmvnic_probe. The code now will return from this point in the probe routine if anything other than EAGAIN is returned. The check should be to see if rc is non-zero and not equal to EAGAIN. Without this fix, the vNIC driver can return 0 (success) from its probe routine due to ibmvnic_init returning zero, but before completing the probe process and registering with the netdev layer. Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec) Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ibmvnic: Fix error handling when registering long-term-mapped buffersThomas Falcon2017-06-222-45/+35Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch stores the return code of the REQUEST_MAP_RSP sub-CRQ command in the private data structure, where it can be later checked during device open or a reset. In the case of a reset, the mapping request to the vNIC Server may fail, especially in the case of a partition migration. The driver attempts to handle this by re-allocating the buffer and re-sending the mapping request. The original error handling implementation was removed. The separate function handling the REQUEST_MAP response message was also removed, since it is now simple enough to be handled in the ibmvnic_handle_crq function. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ibmvnic: Fix incorrectly defined ibmvnic_request_map_rsp structureThomas Falcon2017-06-221-1/+1
| | | | | | | | | | | | | | | | | | This reserved area should be eight bytes in length instead of four. As a result, the return codes in the REQUEST_MAP_RSP descriptors were not being properly handled. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net/mlx5e: Use device ID definesMyron Stowe2017-06-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Use Mellanox device ID definitions in the driver's mlx5 ID table so tools such as 'grep' and 'cscope' can be used to help find correlated material (such as INTx Masking quirks: d76d2fe05fd PCI: Convert Mellanox broken INTx quirks to be for listed devices only). No functional change intended. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | liquidio: stop using huge static buffer, save 4096k in .dataDenys Vlasenko2017-06-223-8/+4Star
|/ | | | | | | | | | | | | | | | | | Only compile-tested - I don't have the hardware. >From code inspection, octeon_pci_write_core_mem() appears to be safe wrt unaligned source. In any case, u8 fbuf[] was not guaranteed to be aligned anyway. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> CC: Felix Manlunas <felix.manlunas@cavium.com> CC: Prasad Kanneganti <prasad.kanneganti@cavium.com> CC: Derek Chickles <derek.chickles@cavium.com> CC: David Miller <davem@davemloft.net> CC: netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org Acked-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2017-06-2111-54/+93
|\ | | | | | | | | | | | | | | | | Two entries being added at the same time to the IFLA policy table, whilst parallel bug fixes to decnet routing dst handling overlapping with the dst gc removal in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: stmmac: free an skb first when there are no longer any descriptors using itNiklas Cassel2017-06-201-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When having the skb pointer in the first descriptor, stmmac_tx_clean can get called at a moment where the IP has only cleared the own bit of the first descriptor, thus freeing the skb, even though there can be several descriptors whose buffers point into the same skb. By simply moving the skb pointer from the first descriptor to the last descriptor, a skb will get freed only when the IP has cleared the own bit of all the descriptors that are using that skb. Signed-off-by: Niklas Cassel <niklas.cassel@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sfc: remove duplicate up_write on VF filter_semEdward Cree2017-06-201-2/+0Star
| | | | | | | | | | | | | | | | | | | | Somehow two copies of the line 'up_write(&vf->efx->filter_sem);' got into efx_ef10_sriov_set_vf_vlan(). This would put the mutex in a bad state and cause all subsequent down attempts to hang. Fixes: 671b53eec2ed ("sfc: Ensure down_write(&filter_sem) and up_write() are matched before calling efx_net_open()") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * dpaa_eth: reuse the dma_ops provided by the FMan MAC deviceMadalin Bucur2017-06-201-1/+1
| | | | | | | | | | | | | | | | Remove the use of arch_setup_dma_ops() that was not exported and was breaking loadable module compilation. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fsl/fman: propagate dma_opsMadalin Bucur2017-06-201-0/+2
| | | | | | | | | | | | | | Make sure dma_ops are set, to be later used by the Ethernet driver. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/hns:bugfix of ethtool -t phy self_testLin Yun Sheng2017-06-191-2/+14
| | | | | | | | | | | | | | | | | | This patch fixes the phy loopback self_test failed issue. when Marvell Phy Module is loaded, it will powerdown fiber when doing phy loopback self test, which cause phy loopback self_test fail. Signed-off-by: Lin Yun Sheng <linyunsheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * cxgb4: notify uP to route ctrlq compl to rdma rspqRaju Rangoju2017-06-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the module initialisation there is a possible race (basically race between uld and lld) where neither the uld nor lld notifies the uP about where to route the ctrl queue completions. LLD skips notifying uP as the rdma queues were not created by then (will leave it to ULD to notify the uP). As the ULD comes up, it also skips notifying the uP as the flag FULL_INIT_DONE is not set yet (ULD assumes that the interface is not up yet). Consequently, this race between uld and lld leaves uP unnotified about where to send the ctrl queue completions to, leading to iwarp RI_RES WR failure. Here is the race: CPU 0 CPU1 - allocates nic rx queus - t4_sge_alloc_ctrl_txq() (if rdma rsp queues exists, tell uP to route ctrl queue compl to rdma rspq) - acquires the mutex_lock - allocates rdma response queues - if FULL_INIT_DONE set, tell uP to route ctrl queue compl to rdma rspq - relinquishes mutex_lock - acquires the mutex_lock - enable_rx() - set FULL_INIT_DONE - relinquishes mutex_lock This patch fixes the above issue. Fixes: e7519f9926f1('cxgb4: avoid enabling napi twice to the same queue') Signed-off-by: Raju Rangoju <rajur@chelsio.com> Acked-by: Steve Wise <swise@opengridcomputing.com> CC: Stable <stable@vger.kernel.org> # 4.9+ Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx5e: Avoid doing a cleanup call if the profile doesn't have itOr Gerlitz2017-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The error flow of mlx5e_create_netdev calls the cleanup call of the given profile without checking if it exists, fix that. Currently the VF reps don't register that callback and we crash if getting into error -- can be reproduced by the user doing ctrl^C while attempting to change the sriov mode from legacy to switchdev. Fixes: 26e59d8077a3 '(net/mlx5e: Implement mlx5e interface attach/detach callbacks') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reported-by: Sabrina Dubroca <sdubroca@redhat.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Remove TC header re-write offloading of ip tosOr Gerlitz2017-06-151-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently the firmware API is partial and allows to offload only the dscp part of the tos, also, ipv6 support isn't there yet. As such, remove the offloading option of ipv4 dscp till the FW APIs are more comprehensive. Fixes: d79b6df6b10a ('net/mlx5e: Add parsing of TC pedit actions to HW format') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Paul Blakey <paulb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5: Properly check applicability of devlink eswitch commandsOr Gerlitz2017-06-151-37/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we don't check that the link type is Eth and hence crash on IB ports when attempting to deref esw->xxx, fix that. To avoid repeating this check over and over, put the existing checks and the one on link type in a single helper. Fixes: 7768d1971de6 ('net/mlx5: E-Switch, Add control for encapsulation') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reported-by: Mohamad Badarnah <mohamadb@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Fix min inline value for VF rep SQsChris Mi2017-06-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The offending commit only changed the code path for PF/VF, but it didn't take care of VF representors. As a result, since params->tx_min_inline_mode for VF representors is kzalloced to 0 (MLX5_INLINE_MODE_NONE), all VF reps SQs were set to that mode. This actually works on CX5 by default but broke CX4. Fix that by adding a call to query the min inline mode from the VF rep build up code. Fixes: a6f402e49901 ("net/mlx5e: Tx, no inline copy on ConnectX-5") Signed-off-by: Chris Mi <chrism@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Fix timestamping capabilities reportingMaor Dickman2017-06-151-4/+4
| | | | | | | | | | | | | | | | | | | | Misuse of (BIT) macro caused to report wrong flags for "Hardware Transmit Timestamp Modes" and "Hardware Receive Filter Modes" Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Maor Dickman <maord@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5: Wait for FW readiness before initializing command interfaceEli Cohen2017-06-151-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before attempting to initialize the command interface we must wait till the fw_initializing bit is clear. If we fail to meet this condition the hardware will drop our configuration, specifically the descriptors page address. This scenario can happen when the firmware is still executing an FLR flow and did not finish yet so the driver needs to wait for that to finish. Fixes: e3297246c2c8 ('net/mlx5_core: Wait for FW readiness on startup') Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
* | qed*: Rename qed_roce_if.h to qed_rdma_if.hKalderon, Michal2017-06-213-3/+3
| | | | | | | | | | | | | | | | | | | | | | Rename the qed_roce_if file to qed_rdma_if as it represents a common interface for RoCE and iWARP. this commit affects RDMA/qedr as well. Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qed: Split rdma content between qed_rdma and qed_roceKalderon, Michal2017-06-219-2919/+86Star
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch places common iWARP / RoCE code in qed_rdma and roce specific code in qed_roce There is one new function ( qed_roce_setup ) added, the rest of the patch removes content from the files and removes some static definitions. Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qed: Duplicate qed_roce.[ch] to qed_rdma.[ch]Kalderon, Michal2017-06-212-0/+2983
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds files that will contain common code for RoCE/iWARP. The files are currently identical to qed_roce.c / qed_roce.h and intentionally not added to the makefile. The next patch in the series will modify the files so that roce specific code is left in qed_roce and common roce/iwarp code will be placed in qed_rdma This patch is the result of a simple cp qed_rdma.c qed_roce.c cp qed_rdma.h qed_roce.h Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qed: Cleanup qed_roce before duplicating itKalderon, Michal2017-06-211-39/+12Star
| | | | | | | | | | | | | | | | | | | | The next patch in the series will duplicate qed_roce as part of code preprations for iWARP support. Do some cleanup before duplicating Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | i40e: don't hold RTNL lock for the entire resetJacob Keller2017-06-211-20/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently refactored i40e_do_reset() and its friends to be able to hold the RTNL lock only for the portions that actually need to be protected. However, a separate refactoring added several new callers of these functions during the PCIe error recovery and suspend/resume cycles. When merging the changes together, it was not noticed that we could reduce the RTNL scope by letting the reset function handle the lock itself, as previously it was not possible. Fix this by replacing these call sites to indicate that the reset function should handle its own lock. This enables multiple PFs to reset or resume simultaneously without serializing the resets via the RTNL lock. The end result is that on systems with lots of PFs and VFs the resets don't stall waiting for each other to finish. It is probable that we can also do the same for i40e_do_reset_safe, but this author did not research that change carefully enough to be confident. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: Handle PE_CRITERR properly with IWARP enabledCatherine Sullivan2017-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When IWARP is enabled, we weren't clearing the PE_CRITERR, just logging it and removing it from the mask. We need to do a corer to reset the PE_CRITERR register, so set the bit for that as we handle the interrupt. We should also be checking for the error against the PFINT_ICR0 register, and only need to clear it in the value getting written to PFINT_ICR0_ENA. Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: clear only cause_ena bitShannon Nelson2017-06-211-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | When disabling interrupts, we should only be clearing the CAUSE_ENA bit, not clearing the whole register. Clearing the whole register sets the NEXTQ_IDX field to 0 instead of 0x7ff which can confuse the Firmware in some reset sequences. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: fix disabling overflow promiscuous modeAlan Brady2017-06-211-3/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There exists a bug in which the driver does not correctly exit overflow promiscuous mode. This can occur if "too many" mac filters are added, putting the driver into overflow promiscuous mode, and the filters are then removed. When the failed filters are removed, the driver reports exiting overflow promiscuous mode which is correct, however traffic continues to be received as if in promiscuous mode still. The bug occurs because the conditional for toggling promiscuous mode was set to only execute when promiscuous mode was enabled and not when it was disabled as well. This patch fixes the conditional to correctly execute when promiscuous mode is toggled and not just enabled. Without this patch, the driver is unable to correctly exit overflow promiscuous mode. Signed-off-by: Alan Brady <alan.brady@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: Add support for OEM firmware versionFilip Sadowski2017-06-212-14/+81
| | | | | | | | | | | | | | | | | | | | This patch adds support for OEM firmware version. If OEM specific adapter is detected ethtool reports OEM product version in firmware version string instead of etrack id. Signed-off-by: Filip Sadowski <filip.sadowski@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: genericize the partition bandwidth controlShannon Nelson2017-06-212-28/+26Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Partition bandwidth control is not in just one form of MFP (multi-function partitioning), so make the code more generic and be sure to nudge the Tx scheduler for all MFP. Copyright updated to 2017. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: Add message for unsupported MFP modeCarolyn Wyborny2017-06-211-0/+6
| | | | | | | | | | | | | | | | | | | | This patch adds a check and message if the device is in MFP mode as changing RSS input set is not supported in MFP mode. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: Support firmware CEE DCB UP to TC map re-definitionGreg Bowers2017-06-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Changes parsing of FW 4.33 AQ command Get CEE DCBX OPER CFG (0x0A07). Change is required because FW now creates the oper_prio_tc nibbles reversed from those in the CEE Priority Group sub-TLV. This change will only apply to FW 4.33 as future FW versions will use a different function to parse the CEE data. Signed-off-by: Greg Bowers <gregory.j.bowers@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: Fix potential out of bound array accessSudheer Mogilappagari2017-06-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for the static code analysis issue where dcbcfg->numapps could be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]). The fix makes sure that the array is not accessed past the size of of the array (i.e. I40E_DCBX_MAX_APPS). Copyright updated to 2017. Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: comment that udp_port must be in host byte orderJacob Keller2017-06-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The firmware expects the port number passed when setting up the UDP tunnel configuration to be in Little Endian format. The i40e_aq_add_udp_tunnel command byte swaps the value from host order to Little Endian. Since commit fe0b0cd97b4f ("i40e: send correct port number to AdminQ when enabling UDP tunnels") we've correctly sent the value in host order. Let's also add a comment to the function explaining that it must be in host order, as the port numbers are commonly stored as Big Endian values. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e: use dev_dbg instead of dev_info when warning about missing routineJacob Keller2017-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When searching for the vf_capability client routine, dev_info() was used, instead of the normal dev_dbg(). This causes the message to be displayed at standard log levels which can cause administrators to worry. Avoid this by using dev_dbg instead. Copyright updated to 2017. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flagsAlice Michael2017-06-212-4/+5
| | | | | | | | | | | | | | | | | | | | Update a few flags related to FW interactions. Copyright updated to 2017. Signed-off-by: Alice Michael <alice.michael@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>