aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2019-04-03iwlwifi: dbg_ini: add memory offset to the base address of a memory regionShahar S Matityahu1-15/+11
Add the offset to the base address of a memory region to show the actual addresses being read. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-03iwlwifi: dbg_ini: fix iwl_dump_ini_dev_mem_iter memory base addressShahar S Matityahu1-2/+2
The driver is using range->start_addr before assigning it a value. Set value into range->start_addr and then use it. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-03iwlwifi: dbg_ini: enforce always on domain checkingShahar S Matityahu1-0/+8
Enforce domain checking before sending host commands and collecting memory regions. Currently the driver supports always on domain only. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-03iwlwifi: dbg_ini: support HW error triggerShahar S Matityahu4-4/+16
Differentiate between SW and HW error interrupts and support ini HW error trigger. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-03iwlwifi: add support for quz firmwaresLuca Coelho4-2/+22
Add a new configuration with a new firmware name for quz devices. And, since these devices have the same PCI device and subsystem IDs, we need to add some code to switch from a normal qu firmware to the quz firmware. Signed-off-by: Luca Coelho <[email protected]>
2019-04-03iwlwifi: mvm: update offloaded rate control on changesJohannes Berg1-0/+7
With offloaded rate control, if the station parameters (rates, NSS, bandwidth) change (sta_rc_update method), call iwl_mvm_rs_rate_init() to propagate those change to the firmware. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-03iwlwifi: mvm: avoid possible deadlock in TX pathJohannes Berg1-0/+2
iwl_mvm_tx_mpdu() may run from iwl_mvm_add_new_dqa_stream_wk(), where soft-IRQs aren't disabled. In this case, it may hold the station lock and be interrupted by a soft-IRQ that also wants to acquire said lock, leading to a deadlock. Fix it by disabling soft-IRQs in iwl_mvm_add_new_dqa_stream_wk(). Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-04-02Merge branch '40GbE' of ↵David S. Miller3-14/+33
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Fixes 2019-04-01 This series contains two fixes for XDP in the i40e driver. Björn provides both fixes, first moving a function out of the header and into the main.c file. Second fixes a regression introduced in an earlier patch that removed umem from the VSI. This caused an issue because the setup code would try to enable AF_XDP zero copy unconditionally, as long as there was a umem placed in the netdev receive structure. ==================== Signed-off-by: David S. Miller <[email protected]>
2019-04-02net: phy: deal properly with autoneg incomplete in genphy_c45_read_lpaHeiner Kallweit1-0/+11
The link partner advertisement registers are not guaranteed to contain valid values if autoneg is incomplete. Therefore, if MDIO_AN_STAT1_COMPLETE isn't set, let's clear all link partner capability bits. This also avoids unnecessary register reads if link is down and phylib is in polling mode. Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-02net: phy: use c45 standard to detect link partner autoneg capabilityHeiner Kallweit1-1/+8
Currently mii_lpa_mod_linkmode_lpa_t() checks bit LPA_LPACK to detect whether link partner supports autoneg. This doesn't work correctly at least on Aquantia AQCS109 when it negotiates 1000Base-T2 mode. The "link partner is autoneg-capable" bit as defined by clause 45 is set however. Better let's switch in general to use the clause 45 standard for link partner autoneg detection. Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-02net: phy: realtek: use genphy_read_abilitiesHeiner Kallweit1-24/+12
Use new function genphy_read_abilities(). This allows to remove all calls to genphy_config_init(). Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-02net: phy: use genphy_read_abilities in genphy driverHeiner Kallweit1-2/+1
Currently the genphy driver populates phydev->supported like this: First all possible feature bits are set, then genphy_config_init() reads the available features from the chip and remove all unsupported features from phydev->supported. This can be simplified by using genphy_read_abilities(). Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-02net: phy: add genphy_read_abilitiesHeiner Kallweit1-0/+48
Similar to genphy_c45_pma_read_abilities() add a function to dynamically detect the abilities of a Clause 22 PHY. This is mainly copied from genphy_config_init(). Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-02net/mlx5: Fix false compilation warningTariq Toukan1-1/+1
Fix the following warning: drivers/net/ethernet/mellanox/mlx5/core//fs_core.c:845:5: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] No real issue here. This is only a false compiler warning. The 'err' variable is guaranteed to be init by time of usage. gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4) Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Alex Vesker <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Add rate limit print macrosAya Levin1-0/+10
Add rate limited print macros for warning and info level. This protects the system from burst of prints depleting HW resources and spamming dmesg. Signed-off-by: Aya Levin <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Add explicit bar address fieldHuy Nguyen2-2/+3
Add bar_addr field to store bar-0 address to avoid calling pci_resource_start with hard-coded bar-0 as parameter. Also note that different mlx5 device types will have bar_addr on different bars. This patch does not change any functionality. Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Replace dev_err/warn/info by mlx5_core_err/warn/infoHuy Nguyen4-103/+106
Replace pci dev_err/warn/info messages with mlx5_core_err/warn/info messages to provide a better report/debug of different mlx5 device types. This patch does not change any functionality. Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Use dev->priv.name instead of dev_nameHuy Nguyen3-4/+4
Use mlx5_core mdev private name in message instead of using pci dev_name to provide a better report/debug of different mlx5 device types. This patch does not change any functionality. Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Make mlx5_core messages independent from mdev->pdevHuy Nguyen1-10/+9
Detach mlx5_core mdev messages from pci device mdev->pdev messages and provide a better report/debug of different mlx5 device types. This patch does not change any functionality. Signed-off-by: Huy Nguyen <[email protected]> Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Reviewed-by: Parav Pandit <[email protected]>
2019-04-02net/mlx5: Break load_one into three stagesSaeed Mahameed1-71/+77
Using foundation from previous patches to factor mlx5_load_one flow into three stages: 1. mlx5_function_setup() from previous patch to setup function 2. mlx5_init_once() from previous patch to init software objects according to hw caps 3. New mlx5_load() to load mlx5 components This provides a better logical separation of mlx5 core device initialization flow and will help to seamlessly support creating different mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device. This patch does not change any functionality. Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Function setup/teardown proceduresSaeed Mahameed1-52/+68
Function setup and teardown procedures are the basic procedure that each mlx5 pci function should perform to boot up a mlx5 device function and initialize basic communication with FW, before allocating any higher level software/firmware resources. This provides a better logical separation of mlx5 core device initialization flow and will help to seamlessly support creating different mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device. This patch does not change any functionality. Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Move health and page alloc init to mdev_initSaeed Mahameed2-17/+27
Software structure initialization should be in mdev_init stage. This provides a better logical separation of mlx5 core device initialization flow and will help to seamlessly support creating different mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device. This patch does not change any functionality. Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Split mdev init and pci initSaeed Mahameed1-41/+54
Separate resources initialization from pci initialization. This provides a better logical separation of mlx5 core device initialization flow and will help to seamlessly support creating different mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device. This patch does not change any functionality. Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Remove redundant init functions parameterSaeed Mahameed1-27/+22
This patch does not change any functionality. Signed-off-by: Vu Pham <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02net/mlx5: Remove spinlock support from mlx5_write64Maxim Mikityanskiy2-2/+2
As there is no user of mlx5_write64 that passes a spinlock to mlx5_write64, remove this functionality and simplify the function. Signed-off-by: Maxim Mikityanskiy <[email protected]> Reviewed-by: Eran Ben Elisha <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
2019-04-02tg3: allow ethtool -p to work for NICs in down stateJon Maxwell1-3/+0
Make tg3 behave like other drivers and let "ethtool -p" identify the NIC even when it's in the DOWN state. Before this patch it would get an error as follows if the NIC was down: # ip link set down dev em4 # ethtool -p em4 Cannot identify NIC: Resource temporarily unavailable With this patch ethtool identify works regardless of whether the NIC is up or down as it does for other drivers. Signed-off-by: Jon Maxwell <[email protected]> Acked-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01macsec: add noinline tag to avoid a frame size warningFlorian Westphal1-10/+12
seen with debug config: drivers/net/macsec.c: In function 'dump_secy': drivers/net/macsec.c:2597: warning: the frame size of 2216 bytes is larger than 2048 bytes [-Wframe-larger-than=] just mark it with noinline_for_stack, this is netlink dump code. v2: use 'static noinline_for_stack int' consistently Cc: Sabrina Dubroca <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Reviewed-by: Sabrina Dubroca <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01drivers: net: aurora: use netdev_xmit_more helperFlorian Westphal1-3/+5
This is the last driver using always-0 skb->xmit_more. Switch it to netdev_xmit_more and remove the now unused xmit_more flag from sk_buff. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01drivers: net: sfc: use netdev_xmit_more helperFlorian Westphal2-9/+7
skb->xmit_more hint is now always 0, this switches the sfc driver to use the netdev_xmit_more helper instead. Cc: Solarflare linux maintainers <[email protected]> Cc: Edward Cree <[email protected]> Cc: Bert Kenward <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01drivers: mellanox: use netdev_xmit_more() helperFlorian Westphal4-12/+12
skb->xmit_more hint is now always 0. This switches the mellanox drivers to the netdev_xmit_more() helper. Cc: Saeed Mahameed <[email protected]> Cc: Leon Romanovsky <[email protected]> Cc: Boris Pismenny <[email protected]> Cc: Ilya Lesokhin <[email protected]> Cc: Eran Ben Elisha <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01net: move skb->xmit_more hint to softnet dataFlorian Westphal27-29/+30
There are two reasons for this. First, the xmit_more flag conceptually doesn't fit into the skb, as xmit_more is not a property related to the skb. Its only a hint to the driver that the stack is about to transmit another packet immediately. Second, it was only done this way to not have to pass another argument to ndo_start_xmit(). We can place xmit_more in the softnet data, next to the device recursion. The recursion counter is already written to on each transmit. The "more" indicator is placed right next to it. Drivers can use the netdev_xmit_more() helper instead of skb->xmit_more to check the "more packets coming" hint. skb->xmit_more is retained (but always 0) to not cause build breakage. This change takes care of the simple s/skb->xmit_more/netdev_xmit_more()/ conversions. Remaining drivers are converted in the next patches. Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01net: phy: aquantia: add SGMII statisticsHeiner Kallweit1-2/+112
The AQR107 family has SGMII statistics counters. Let's expose them to ethtool. To interpret the counters correctly one has to be aware that rx on SGMII side is tx on ethernet side. The counters are populated by the chip in 100Mbps/1Gbps mode only. v2: - add constant AQR107_SGMII_STAT_SZ - add struct aqr107_priv to be prepared for more private data fields - let aqr107_get_stat() return U64_MAX in case of an error Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01net: phy: improve genphy_read_statusHeiner Kallweit1-15/+8
This patch improves few aspects of genphy_read_status(): - Don't initialize lpagb, it's not needed. - Move initializing phydev->speed et al before the if clause. - In auto-neg case, skip populating lp_advertising if we don't have a link. This avoids quite some unnecessary MDIO reads in case of phylib polling mode. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01nfp: implement ethtool get module EEPROMDirk van der Merwe1-0/+131
Now that the NSP provides the ability to read from the SFF modules' EEPROM, we can use this interface to implement the ethtool callback. If the NSP only provides partial data, we log the event from within the driver but pass a success code to ethtool to prevent it from discarding the partial data. Signed-off-by: Dirk van der Merwe <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01nfp: nsp: implement read SFF module EEPROMDirk van der Merwe2-0/+70
The NSP now provides the ability to read from the SFF module EEPROM. Note that even if an error occurs, the NSP may still provide some of the data. Signed-off-by: Dirk van der Merwe <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01nfp: flower: reduce action list size by coalescing mangle actionsPieter Jansen van Vuuren1-77/+122
With the introduction of flow_action_for_each pedit actions are no longer grouped together, instead pedit actions are broken out per 32 byte word. This results in an inefficient use of the action list that is pushed to hardware where each 32 byte word becomes its own action. Therefore we combine groups of 32 byte word before sending the action list to hardware. Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01nfp: flower: remove vlan CFI bit from push vlan actionPieter Jansen van Vuuren2-3/+1
We no longer set CFI when pushing vlan tags, therefore we remove the CFI bit from push vlan. Fixes: 1a1e586f54bf ("nfp: add basic action capabilities to flower offloads") Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Signed-off-by: Louis Peens <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01nfp: flower: replace CFI with vlan presentPieter Jansen van Vuuren2-15/+14
Replace vlan CFI bit with a vlan present bit that indicates the presence of a vlan tag. Previously the driver incorrectly assumed that an vlan id of 0 is not matchable, therefore we indicate vlan presence with a vlan present bit. Fixes: 5571e8c9f241 ("nfp: extend flower matching capabilities") Signed-off-by: Pieter Jansen van Vuuren <[email protected]> Signed-off-by: Louis Peens <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01net: phy: aquantia: add suspend / resume callbacks for AQR107 familyHeiner Kallweit1-0/+16
Add suspend / resume callbacks for AQR107 family. Suspend powers down the complete chip except MDIO and internal CPU. Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01net: ethernet: ti: davinci_mdio: switch to readl/writel()Grygorii Strashko1-11/+11
Switch to readl/writel() APIs, because this is recommended API and the MDIO block is reused on Keystone 2 SoCs where LE/BE modes are supported. Cc: Arnd Bergmann <[email protected]> Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01cxgb3/l2t: Use struct_size() in kvzalloc()Gustavo A. R. Silva1-2/+2
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); instance = kvzalloc(size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kvzalloc(struct_size(instance, entry, count), GFP_KERNEL); Notice that, in this case, variable size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01cxgb3/l2t: Fix undefined behaviourGustavo A. R. Silva1-1/+1
The use of zero-sized array causes undefined behaviour when it is not the last member in a structure. As it happens to be in this case. Also, the current code makes use of a language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as this one is a flexible array member, introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last. Which is beneficial to cultivate a high-quality code. Fixes: e48f129c2f20 ("[SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL dereference") Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-01i40e: add tracking of AF_XDP ZC state for each queue pairBjörn Töpel3-1/+14
In commit f3fef2b6e1cc ("i40e: Remove umem from VSI") a regression was introduced; When the VSI was reset, the setup code would try to enable AF_XDP ZC unconditionally (as long as there was a umem placed in the netdev._rx struct). Here, we add a bitmap to the VSI that tracks if a certain queue pair has been "zero-copy enabled" via the ndo_bpf. The bitmap is used in i40e_xsk_umem, and enables zero-copy if and only if XDP is enabled, the corresponding qid in the bitmap is set and the umem is non-NULL. Fixes: f3fef2b6e1cc ("i40e: Remove umem from VSI") Signed-off-by: Björn Töpel <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2019-04-01i40e: move i40e_xsk_umem functionBjörn Töpel2-14/+20
The i40e_xsk_umem function was explicitly inlined in i40e.h. There is no reason for that, so move it to i40e_main.c instead. Signed-off-by: Björn Töpel <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2019-03-31net: stmmac: don't log oversized framesAaro Koskinen1-2/+0
This is log is harmful as it can trigger multiple times per packet. Delete it. Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-03-31net: stmmac: fix dropping of multi-descriptor RX framesAaro Koskinen1-0/+5
Packets without the last descriptor set should be dropped early. If we receive a frame larger than the DMA buffer, the HW will continue using the next descriptor. Driver mistakes these as individual frames, and sometimes a truncated frame (without the LD set) may look like a valid packet. This fixes a strange issue where the system replies to 4098-byte ping although the MTU/DMA buffer size is set to 4096, and yet at the same time it's logging an oversized packet. Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-03-31net: stmmac: don't overwrite discard_frame statusAaro Koskinen1-3/+4
If we have error bits set, the discard_frame status will get overwritten by checksum bit checks, which might set the status back to good one. Fix by checking the COE status only if the frame is good. Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-03-31net: stmmac: don't stop NAPI processing when dropping a packetAaro Koskinen1-7/+7
Currently, if we drop a packet, we exit from NAPI loop before the budget is consumed. In some situations this will make the RX processing stall e.g. when flood pinging the system with oversized packets, as the errorneous packets are not dropped efficiently. If we drop a packet, we should just continue to the next one as long as the budget allows. Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-03-31net: stmmac: ratelimit RX error logsAaro Koskinen1-6/+8
Ratelimit RX error logs. Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-03-31net: stmmac: use correct DMA buffer size in the RX descriptorAaro Koskinen7-19/+35
We always program the maximum DMA buffer size into the receive descriptor, although the allocated size may be less. E.g. with the default MTU size we allocate only 1536 bytes. If somebody sends us a bigger frame, then memory may get corrupted. Fix by using exact buffer sizes. Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>