aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hsi (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-10-10ionic: add generic filter searchShannon Nelson1-3/+18
In preparation for enhancing vlan filter management, add a filter search routine that can figure out for itself which type of filter search is needed. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-10ionic: remove mac overflow flagsShannon Nelson2-7/+2
The overflow flags really aren't useful and we don't need lif struct elements to track them. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-10ionic: move lif mac address functionsShannon Nelson2-131/+131
The routines that add and delete mac addresses from the firmware really should be in the file with the rest of the filter management. This simply moves the functions with no logic changes. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-10ionic: add filterlist to debugfsShannon Nelson1-0/+46
Dump the filter list to debugfs - includes the device-assigned filter id and the sync'd-to-hardware status. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09dt-bindings: net: dsa: document felix family in dsa-tag-protocolVladimir Oltean1-0/+3
The Vitesse/Microsemi/Microchip family of switches supported by the Felix DSA driver is capable of selecting between the native tagging protocol and ocelot-8021q. This is necessary to enable flow control on the CPU port. Certain systems where these switches are integrated use the switch as a port multiplexer, so the termination throughput is paramount. Changing the tagging protocol at runtime is possible for these systems, but since it is known beforehand that one tagging protocol will provide strictly better performance than the other, just allow them to specify the preference in the device tree. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09dt-bindings: net: dsa: fix typo in dsa-tag-protocol descriptionVladimir Oltean1-1/+1
There is a trivial typo when spelling "protocol", fix it. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09net: use dev_addr_set()Jakub Kicinski16-19/+17
Use dev_addr_set() instead of writing directly to netdev->dev_addr in various misc and old drivers. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09ethernet: 8390: remove direct netdev->dev_addr writesJakub Kicinski8-22/+31
8390 contains a lot of loops assigning netdev->dev_addr byte by byte. Convert what's possible directly to eth_hw_addr_set(), use local buf in other places. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09ethernet: sun: remove direct netdev->dev_addr writesJakub Kicinski5-34/+48
Consify temporary variables pointing to netdev->dev_addr. A few places need local storage but pretty simple conversion over all. Note that macaddr[] is an array of ints, so we need to keep the loops. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09ethernet: tulip: remove direct netdev->dev_addr writesJakub Kicinski6-50/+61
Consify the casts of netdev->dev_addr. Convert pointless to eth_hw_addr_set() where possible. Use local buffers in a number of places. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09ethernet: tg3: remove direct netdev->dev_addr writesJakub Kicinski1-23/+25
tg3 does various forms of direct writes to netdev->dev_addr. Use a local buffer. Make sure local buffer is aligned since eth_platform_get_mac_address() may call ether_addr_copy(). tg3_get_device_address() returns whenever it finds a method that found a valid address. Instead of modifying all the exit points pass the buffer from the outside and commit the address in the caller. Constify the argument of the set addr helper. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-09ethernet: forcedeth: remove direct netdev->dev_addr writesJakub Kicinski1-23/+26
forcedeth writes to dev_addr byte by byte, make it use a local buffer instead. Commit the changes with eth_hw_addr_set() at the end. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Zhu Yanjun <zyjzyj2000@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08mlxsw: item: Annotate item helpers with '__maybe_unused'Ido Schimmel1-24/+32
mlxsw is using helpers to get / set fields in messages exchanged with the device. It is possible that some fields are only set or only get. This causes LLVM to emit warnings such as the following when building with W=1 [1]: drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:2022:1: warning: unused function 'mlxsw_afa_sampler_mirror_agent_get' The fact that some fields are only set or only get is very much intentional and not indicative of functions that need to be removed. Therefore, annotate the item helpers with '__maybe_unused' to suppress these warnings. [1] https://lkml.org/lkml/2021/9/29/685 Cc: Nathan Chancellor <nathan@kernel.org> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20211008132315.90211-1-idosch@idosch.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-10-08selftests/tls: add SM4 GCM/CCM to tls selftestsTianjia Zhang1-2/+26
Add new cipher as a variant of standard tls selftests. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Link: https://lore.kernel.org/r/20211008091745.42917-1-tianjia.zhang@linux.alibaba.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-10-08net: tg3: fix redundant check of true expressionJean Sacren1-2/+1
Remove the redundant check of (tg3_asic_rev(tp) == ASIC_REV_5705) after it is checked to be true. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Link: https://lore.kernel.org/r/20211008063147.1421-1-sakiwit@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-10-08qed: Fix compilation for CONFIG_QED_SRIOV undefined scenarioPrabhakar Kushwaha1-0/+12
This patch fixes below compliation error in case CONFIG_QED_SRIOV not defined. drivers/net/ethernet/qlogic/qed/qed_dev.c: In function ‘qed_fw_err_handler’: drivers/net/ethernet/qlogic/qed/qed_dev.c:2390:3: error: implicit declaration of function ‘qed_sriov_vfpf_malicious’; did you mean ‘qed_iov_vf_task’? [-Werror=implicit-function-declaration] qed_sriov_vfpf_malicious(p_hwfn, &data->err_data); ^~~~~~~~~~~~~~~~~~~~~~~~ qed_iov_vf_task drivers/net/ethernet/qlogic/qed/qed_dev.c: In function ‘qed_common_eqe_event’: drivers/net/ethernet/qlogic/qed/qed_dev.c:2410:10: error: implicit declaration of function ‘qed_sriov_eqe_event’; did you mean ‘qed_common_eqe_event’? [-Werror=implicit-function-declaration] return qed_sriov_eqe_event(p_hwfn, opcode, echo, data, ^~~~~~~~~~~~~~~~~~~ qed_common_eqe_event Fixes: fe40a830dcde ("qed: Update qed_hsi.h for fw 8.59.1.0") Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Cc: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Ariel Elior <aelior@marvell.com> Signed-off-by: Shai Malin <smalin@marvell.com> Signed-off-by: Omkar Kulkarni <okulkarni@marvell.com> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08net: phy: micrel: ksz9131 led errata workaroundFrancesco Dolcini1-0/+24
Micrel KSZ9131 PHY LED behavior is not correct when configured in Individual Mode, LED1 (Activity LED) is in the ON state when there is no-link. Workaround this by setting bit 9 of register 0x1e after verifying that the LED configuration is Individual Mode. This issue is described in KSZ9131RNX Silicon Errata DS80000693B [*] and according to that it will not be corrected in a future silicon revision. [*] https://ww1.microchip.com/downloads/en/DeviceDoc/KSZ9131RNX-Silicon-Errata-and-Data-Sheet-Clarification-80000863B.pdf Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Philippe Schenker <philippe.schenker@toradex.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08ppp: use the correct function to check if a netdev name is in useAntoine Tenart1-1/+1
A new helper to detect if a net device name is in use was added. Use it here as the return reference from __dev_get_by_name was discarded. Signed-off-by: Antoine Tenart <atenart@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08bonding: use the correct function to check for netdev name collisionAntoine Tenart1-2/+2
A new helper to detect if a net device name is in use was added. Use it here as the return reference from __dev_get_by_name was discarded. Signed-off-by: Antoine Tenart <atenart@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08net: introduce a function to check if a netdev name is in useAntoine Tenart2-4/+11
__dev_get_by_name is currently used to either retrieve a net device reference using its name or to check if a name is already used by a registered net device (per ns). In the later case there is no need to return a reference to a net device. Introduce a new helper, netdev_name_in_use, to check if a name is currently used by a registered net device without leaking a reference the corresponding net device. This helper uses netdev_name_node_lookup instead of __dev_get_by_name as we don't need the extra logic retrieving a reference to the corresponding net device. Signed-off-by: Antoine Tenart <atenart@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08net: enetc: add support for software TSOIoana Ciornei4-24/+311
This patch adds support for driver level TSO in the enetc driver using the TSO API. Beside using the usual tso_build_hdr(), tso_build_data() this specific implementation also has to compute the checksum, both IP and L4, for each resulted segment. This is because the ENETC controller does not support Tx checksum offload which is needed in order to take advantage of TSO. With the workaround for the ENETC MDIO erratum in place the Tx path of the driver is forced to lock/unlock for each skb sent. This is why, even though we are computing the checksum by hand we see the following improvement in TCP termination on the LS1028A SoC, on a single A72 core running at 1.3GHz: before: 1.63 Gbits/sec after: 2.34 Gbits/sec Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08net: enetc: declare NETIF_F_HW_CSUM and do it in softwareIoana Ciornei3-5/+15
This is just a preparation patch for software TSO in the enetc driver. Unfortunately, ENETC does not support Tx checksum offload which would normally render TSO, even software, impossible. Declare NETIF_F_HW_CSUM as part of the feature set and do it at driver level using skb_csum_hwoffload_help() so that we can move forward and also add support for TSO in the next patch. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08selftests: mlxsw: devlink_trap_tunnel_ipip: Send a full-length keyAmit Cohen1-2/+4
As part of adding same test for GRE tunnel with IPv6 underlay, missing bytes for key were found. mausezahn does not fill zeros between two colons, so send them explicitly. For example, use "00:00:00:E9:" instead of ":E9:" Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08selftests: mlxsw: devlink_trap_tunnel_ipip: Remove code duplicationAmit Cohen1-27/+11
As part of adding same test for GRE tunnel with IPv6 underlay, an optional improvement was found - call ipip_payload_get from ecn_payload_get, so do not duplicate the code which creates the payload. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-08selftests: mlxsw: devlink_trap_tunnel_ipip: Align topology drawing correctlyAmit Cohen1-3/+3
As part of adding same test for GRE tunnel with IPv6 underlay, wrong alignments were found, fix them. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>