Re: BUG: unable to handle kernel paging request in dqput

2020-09-27 Thread Takashi Iwai
On Sat, 26 Sep 2020 22:48:15 +0200, syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:98477740 Merge branch 'rcu/urgent' of git://git.kernel.org.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1793087590 > kernel co

[PATCH net-next 05/10] net: hns3: use capabilities queried from firmware

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang In order to improve code maintainability and compatibility, the capabilities of new features are queried from firmware. The member flag in struct hnae3_ae_dev indicates not only capabilities, but some initialized status. As capabilities bits queried from firmware is too many

[PATCH net-next 02/10] net: hns3: delete redundant PCI revision judgement

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang Fibre device of PCI revision 0x20 don't support autoneg, and the ops get_autoneg() return AUTONEG_DISABLE so function hns3_nway_reset() will return earlier than judging PCI revision. Function hclge_handle_rocee_ras_error() don't need to judge PCI revision again because its c

[PATCH net-next 04/10] net: hns3: use capability flag to indicate FEC

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang Currently, the revision of the pci device is used to identify whether FEC is supported, which is not good for maintainability and compatibility. So use a capability flag to do that. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilic

[PATCH net-next 03/10] net: hns3: add support to query device capability

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang In order to improve code maintainability and compatibility, add support to query the device capability by expanding the existing version query command. The device capability refers to the features supported by the device. Signed-off-by: Guangbin Huang Signed-off-by: Huazhon

[PATCH net-next 01/10] net: hns3: add device version to replace pci revision

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang To better identify the device version, struct hnae3_handle adds a member dev_version to replace pci revision. The dev_version consists of hardware version and PCI revision. The hardware version is queried from firmware by an existing firmware version query command. Signed-of

[PATCH net-next 08/10] net: hns3: replace the macro of max tm rate with the queried specification

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang The max tm rate is a fixed value(100Gb/s) now as it is defined by a macro. In order to support other rates in different kinds of device, it is better to use specification queried from firmware to replace this macro. As function hclge_shaper_para_calc() has too many arguments

[PATCH net-next 07/10] net: hns3: add support to query device specifications

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang To improve code maintainability and compatibility, new commands HCLGE_OPC_QUERY_DEV_SPECS for PF and HCLGEVF_OPC_QUERY_DEV_SPECS for VF are introduced to query device specifications, instead of statically defining specifications by checking the hardware version or other metho

[PATCH net-next 10/10] net: hns3: add a structure for IR shaper's parameter in hclge_shaper_para_calc()

2020-09-27 Thread Huazhong Tan
As function hclge_shaper_para_calc() has too many arguments to add more, so encapsulate its three arguments ir_b, ir_u, ir_s into a structure. Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 87 +++--- .../net/ethernet/hisilicon/hns3/hns3pf/hc

[PATCH net-next 00/10] net: hns3: updates for -next

2020-09-27 Thread Huazhong Tan
To facilitate code maintenance and compatibility, #1 and #2 add device version to replace pci revision, #3 to #9 adds support for querying device capabilities and specifications, then the driver can use these query results to implement corresponding features (some features will be implemented later

[PATCH net-next 09/10] net: hns3: add a check for device specifications queried from firmware

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang The device specifications querying is unsupported by the old firmware, in this case, these specifications are 0. However, some specifications should not be 0 or will cause problem. So after querying from firmware, some device specifications are needed to check their value an

[PATCH net-next 06/10] net: hns3: add debugfs to dump device capabilities

2020-09-27 Thread Huazhong Tan
From: Guangbin Huang Adds debugfs to dump each device capability whether is supported. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 24 ++ 1 file changed, 24 insertions(+) diff --git a/drivers/net/ether

[PATCH net-next 06/10] mlxsw: Update transceiver_overheat counter according to MTWE

2020-09-27 Thread Ido Schimmel
From: Amit Cohen MTWE (Management Temperature Warning Event) is triggered when module's temperature is higher than its threshold. Register for MTWE events and increase the module's overheat counter when its corresponding sensor goes above the configured threshold. Signed-off-by: Amit Cohen Sig

[PATCH net-next 07/10] mlxsw: Enable temperature event for all supported port module sensors

2020-09-27 Thread Ido Schimmel
From: Amit Cohen MTWE (Management Temperature Warning Event) is triggered for sensors whose temperature event enable bit is enabled in the MTMP register. Enable events for all the modules that have a temperature sensor. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../net/ethern

[PATCH net-next 02/10] mlxsw: reg: Add Port Module Plug/Unplug Event Register

2020-09-27 Thread Ido Schimmel
From: Amit Cohen PMPE register reports any operational status change of a module. It will be used for enabling temperature warning event when a module is plugged in. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h |

[PATCH net-next 08/10] mlxsw: spectrum: Initialize netdev's module overheat counter

2020-09-27 Thread Ido Schimmel
From: Amit Cohen The overheat counter is a per-module counter, but it is exposed as part of the corresponding netdev's statistics. It should therefore be presented to user space relative to the netdev's lifetime. Query the counter just before registering the netdev, so that the value exposed to

[PATCH net-next 01/10] mlxsw: reg: Add Management Temperature Warning Event Register

2020-09-27 Thread Ido Schimmel
From: Amit Cohen Add MTWE (Management Temperature Warning Event) register, which is used for over temperature warning. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 18 ++ 1 file changed, 18 inser

[PATCH net-next 09/10] mlxsw: Update module's settings when module is plugged in

2020-09-27 Thread Ido Schimmel
From: Amit Cohen Module temperature warning events are enabled for modules that have a temperature sensor and configured according to the temperature thresholds queried from the module. When a module is unplugged we are guaranteed not to get temperature warning events. However, when a module is

[PATCH net-next 04/10] mlxsw: core_hwmon: Query MTMP before writing to set only relevant fields

2020-09-27 Thread Ido Schimmel
From: Amit Cohen The MTMP register controls various temperature settings on a per-sensor basis. Subsequent patches are going to alter some of these settings for sensors found on port modules in response to certain events. In order to prevent the current callers that write to MTMP from overriding

[PATCH net-next 00/10] mlxsw: Expose transceiver overheat counter

2020-09-27 Thread Ido Schimmel
From: Ido Schimmel Amit says: An overheated transceiver can be the root cause of various network problems such as link flapping. Counting the number of times a transceiver's temperature was higher than its configured threshold can therefore help in debugging such issues. This patch set exposes

[PATCH net-next 05/10] mlxsw: core: Add an infrastructure to track transceiver overheat counter

2020-09-27 Thread Ido Schimmel
From: Amit Cohen Initialize an array that stores per-module overheat state and a counter indicating how many times the module was in overheat state. Export a function to query the counter according to module number. Will be used later on by the switch driver (i.e., mlxsw_spectrum) to expose modu

[PATCH net-next 03/10] mlxsw: reg: Add Ports Module Administrative and Operational Status Register

2020-09-27 Thread Ido Schimmel
From: Amit Cohen PMAOS register configures and retrieves the per module status. The register is used also for enabling event for status change. It will be used to enable PMPE (Port Module Plug/Unplug) event. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mella

[PATCH net-next 10/10] mlxsw: spectrum_ethtool: Expose transceiver_overheat counter

2020-09-27 Thread Ido Schimmel
From: Amit Cohen Add structures for port statistics which read from core and not directly from registers. When netdev's ethtool statistics are queried, query the corresponding module's overheat counter from core and expose it as "transceiver_overheat". Signed-off-by: Amit Cohen Reviewed-by: Ji

RE: [PATCH linux-can-next/flexcan 1/4] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Joakim Zhang
Hi Marc, > -Original Message- > From: Marc Kleine-Budde > Sent: 2020年9月25日 15:29 > To: Joakim Zhang ; linux-...@vger.kernel.org > Cc: dl-linux-imx ; netdev@vger.kernel.org > Subject: Re: [PATCH linux-can-next/flexcan 1/4] can: flexcan: initialize all > flexcan > memory for ECC function

[PATCH V2 3/3] can: flexcan: disable runtime PM if register flexcandev failed

2020-09-27 Thread Joakim Zhang
Disable runtime PM if register flexcandev failed, and balance reference of usage_count. Signed-off-by: Joakim Zhang --- ChangeLogs: V1->V2: * no changes. --- drivers/net/can/flexcan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexca

[PATCH V2 0/3] patch set for flexcan

2020-09-27 Thread Joakim Zhang
can: flexcan: initialize all flexcan memory for ECC function can: flexcan: add flexcan driver for i.MX8MP These two patches add i.MX8MP driver support. can: flexcan: disable runtime PM if register flexcandev failed Resend this patch as a small driver improvement. Joakim Zhang (3): can: flexcan:

[PATCH V2 2/3] can: flexcan: add flexcan driver for i.MX8MP

2020-09-27 Thread Joakim Zhang
Add flexcan driver for i.MX8MP, which supports CAN FD and ECC. Signed-off-by: Joakim Zhang --- ChangeLogs: V1->V2: * sort the order of the quirks by their value. --- drivers/net/can/flexcan.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/can/flexcan.c b/drivers

[PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Joakim Zhang
One issue was reported at a baremetal environment, which is used for FPGA verification. "The first transfer will fail for extended ID format(for both 2.0B and FD format), following frames can be transmitted and received successfully for extended format, and standard format don't have this issue. Th

[PATCH] ptp: add stub function for ptp_get_msgtype()

2020-09-27 Thread Yangbo Lu
Added the missing stub function for ptp_get_msgtype(). Reported-by: Randy Dunlap Fixes: 036c508ba95e ("ptp: Add generic ptp message type function") Signed-off-by: Yangbo Lu --- include/linux/ptp_classify.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/ptp_classify.h

RE: linux-next: Tree for Sep 21 (drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c)

2020-09-27 Thread Y.b. Lu
Hi, > -Original Message- > From: Randy Dunlap > Sent: Monday, September 21, 2020 11:42 PM > To: Stephen Rothwell ; Linux Next Mailing List > > Cc: Linux Kernel Mailing List ; > netdev@vger.kernel.org; Y.b. Lu ; Ioana Ciornei > ; Ioana Ciocoi Radulescu > > Subject: Re: linux-next: Tree f

WARNING: CPU: 1

2020-09-27 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:748d1c8a Merge branch 'devlink-Use-nla_policy-to-validate-.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=13ac3ec390 kernel config: https://syzkaller.appspot.com/x/.config?x=51fb40e67d1e3dec das

Re: [PATCH v2] ath10k: sdio: remove redundant check in for loop

2020-09-27 Thread Alex Dewar
> I agree. Anyone can come up with a patch? Hi Kalle, I was thinking of having a go at this. Have you applied the v2 of this patch yet though? I couldn't see it in wireless-drivers-next. I just don't want to have to rebase the patch if you were going to apply this v2. Best, Alex > > -- > http

[PATCH 1/3] net/mlx5e: Fix possible null pointer dereference

2020-09-27 Thread Alex Dewar
In mlx5e_tc_unoffload_from_slow_path() a null check is performed for the variable slow_attr and a warning is issued if it is null. However, slow_attr is used later on in the function regardless. Fix this by returning if slow_attr is null. Addresses-Coverity: CID 1497163: Null pointer dereferences

[PATCH 0/3] net/mlx5e: Fix some static analysis warnings

2020-09-27 Thread Alex Dewar
Hi, Coverity has flagged up some warnings for this driver, which I address in this patch series. All the fixes are fairly trivial and have been build-tested. Best, Alex

[PATCH 2/3] net/mlx5e: Clean up error handling in mlx5e_alloc_flow()

2020-09-27 Thread Alex Dewar
The variable flow is used after being allocated but before being null-checked, which will cause a null pointer dereference if the allocation failed. Fix this and tidy up the error-checking logic in this function. Addresses-Coverity: CID 1497154: Null pointer dereferences (REVERSE_INULL) Signed-off

[PATCH 3/3] net/mlx5e: Fix use of freed pointer

2020-09-27 Thread Alex Dewar
If the call to mlx5_fc_create() fails, then shared_counter will be freed before its member, shared_counter->counter, is accessed to retrieve the error code. Fix by using an intermediate variable. Addresses-Coverity: CID 1497153: Memory - illegal accesses (USE_AFTER_FREE) Signed-off-by: Alex Dewar

[PATCH iproute2-next] ip: iplink_ipoib.c: Remove extra spaces

2020-09-27 Thread Kamal Heib
Remove the extra space between the reported ipoib attrs - use only one space instead of two. Fixes: de0389935f8c ("iplink: Added support for the kernel IPoIB RTNL ops") Signed-off-by: Kamal Heib --- ip/iplink_ipoib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/ip

Re: [PATCH v3] Bluetooth: Check for encryption key size on connect

2020-09-27 Thread Marcel Holtmann
Hi Archie, >>> When receiving connection, we only check whether the link has been >>> encrypted, but not the encryption key size of the link. >>> >>> This patch adds check for encryption key size, and reject L2CAP >>> connection which size is below the specified threshold (default 7) >>> with sec

Re: [PATCH v8 1/7] net: introduce helper sendpage_ok() in include/linux/net.h

2020-09-27 Thread Greg KH
On Sat, Sep 26, 2020 at 09:28:03PM +0800, Coly Li wrote: > On 2020/9/25 23:18, Greg KH wrote: > > On Fri, Sep 25, 2020 at 11:01:13PM +0800, Coly Li wrote: > >> The original problem was from nvme-over-tcp code, who mistakenly uses > >> kernel_sendpage() to send pages allocated by __get_free_pages()

[PATCH v4] ipvs: adjust the debug info in function set_tcp_state

2020-09-27 Thread longguang.yue
outputting client,virtual,dst addresses info when tcp state changes, which makes the connection debug more clear Signed-off-by: longguang.yue --- net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs

[RESEND PATCH] dt-bindings: net: renesas,ravb: Add support for r8a774e1 SoC

2020-09-27 Thread Lad Prabhakar
From: Marian-Cristian Rotariu Document RZ/G2H (R8A774E1) SoC bindings. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring --- Hi David, This patch is part of series [1] and is Acked the DT

Re: [PATCH v2 0/2] dt-bindings: can: document R8A774E1

2020-09-27 Thread Lad, Prabhakar
Hi, On Sat, Sep 19, 2020 at 11:29 AM Lad, Prabhakar wrote: > > Hi Wolfgang, Marc, David, > > On Thu, Aug 27, 2020 at 4:30 PM Lad Prabhakar > wrote: > > > > Hi All, > > > > Both the patches are part of series [1] (patch 18/20, 19/20), > > rest of the patches have been acked/merged so just sending

[PATCH RESEND v3 2/2] net: rtl8150: Use the new usb control message API.

2020-09-27 Thread Petko Manolov
The old usb_control_msg() let the caller handle the error and also did not account for partial reads. Since these are now considered harmful, move the driver over to usb_control_msg_recv/send() calls. Signed-off-by: Petko Manolov --- drivers/net/usb/rtl8150.c | 32 ++

[PATCH RESEND v3 0/2] Use the new usb control message API.

2020-09-27 Thread Petko Manolov
Re-sending these, now CC-ing the folks at linux-netdev. Open coding, occasional improper error handling by the caller of usb_control_msg() and not flagging partial read as an error requires a new API that takes care of these issues. It took the form of usb_control_msg_send/recv() and this patch s

[PATCH RESEND v3 1/2] net: pegasus: Use the new usb control message API.

2020-09-27 Thread Petko Manolov
The old usb_control_msg() let the caller handle the error and also did not account for partial reads. Since these are now considered harmful, move the driver over to usb_control_msg_recv/send() calls. Added small note about why set_registers() can't be used to substitute set_register(). Signed-o

[PATCH] ath11k: Correctly check errors for calls to debugfs_create_dir()

2020-09-27 Thread Alex Dewar
debugfs_create_dir() returns an ERR_PTR in case of error, but never a null pointer. There are a number of places where error-checking code can accordingly be simplified. Addresses-Coverity: CID 1497150: Memory - illegal accesses (USE_AFTER_FREE) Addresses-Coverity: CID 1497158: Memory - illegal ac

[PATCH] dpaa2-mac: Fix potential null pointer dereference

2020-09-27 Thread Alex Dewar
In dpaa2_pcs_destroy, variable pcs is dereference before it is null-checked. Fix this. Addresses-Coverity: CID 1497159: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Alex Dewar --- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH v4] ipvs: adjust the debug info in function set_tcp_state

2020-09-27 Thread Julian Anastasov
Hello, On Sun, 27 Sep 2020, longguang.yue wrote: > outputting client,virtual,dst addresses info when tcp state changes, > which makes the connection debug more clear > > Signed-off-by: longguang.yue Looks good to me, thanks! Acked-by: Julian Anastasov

Re: [PATCH] dpaa2-mac: Fix potential null pointer dereference

2020-09-27 Thread Ioana Ciornei
On Sun, Sep 27, 2020 at 02:31:20PM +0100, Alex Dewar wrote: > In dpaa2_pcs_destroy, variable pcs is dereference before it is > null-checked. Fix this. > > Addresses-Coverity: CID 1497159: Null pointer dereferences (REVERSE_INULL) > Signed-off-by: Alex Dewar > --- > drivers/net/ethernet/freescale

[PATCH net-next] ip6gre: avoid tx_error when sending MLD/DAD on external tunnels

2020-09-27 Thread Davide Caratti
similarly to what has been done with commit 9d149045b3c0 ("geneve: change from tx_error to tx_dropped on missing metadata"), avoid reporting errors to userspace in case the kernel doesn't find any tunnel information for a skb that is going to be transmitted: an increase of tx_dropped is enough. te

Re: WARNING in hrtimer_forward

2020-09-27 Thread syzbot
syzbot has bisected this issue to: commit 0e7bbcc104baaade4f64205e9706b7d43c46db7d Author: Julian Anastasov Date: Wed Jul 27 06:56:50 2016 + neigh: allow admin to set NUD_STALE bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1661d18790 start commit: ba5f4cfe bpf: Ad

Re: [PATCH] mdio: fix mdio-thunder.c dependency & build error

2020-09-27 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 09:33:43PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Fix build error by selecting MDIO_DEVRES for MDIO_THUNDER. > Fixes this build error: > > ld: drivers/net/phy/mdio-thunder.o: in function `thunder_mdiobus_pci_probe': > drivers/net/phy/mdio-thunder.c:78: undefi

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread Baptiste Jonglez
Hi, We are seeing the same issue, more information below. On 07-03-20, David Ahern wrote: > On 3/5/20 1:17 AM, Alarig Le Lay wrote: > > Hi, > > > > On the bird users ML, we discussed a bug we’re facing when having a > > full table: from time to time all the IPv6 traffic is dropped (and all > > n

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread Baptiste Jonglez
On 27-09-20, Baptiste Jonglez wrote: > 1) failing IPv6 neighbours, what Alarig reported. We are seeing this >on a full-view BGP router with rather low amount of IPv6 traffic >(around 10-20 Mbps) Ok, I found a quick way to reproduce this issue: # for net in {1..}; do ip -6 route a

Re: [PATCH] ptp: add stub function for ptp_get_msgtype()

2020-09-27 Thread Randy Dunlap
On 9/27/20 1:01 AM, Yangbo Lu wrote: > Added the missing stub function for ptp_get_msgtype(). > > Reported-by: Randy Dunlap > Fixes: 036c508ba95e ("ptp: Add generic ptp message type function") > Signed-off-by: Yangbo Lu Yes, that works. Thanks. Acked-by: Randy Dunlap # build-tested > --- >

[PATCH net-next 11/11] bnxt_en: Improve preset max value for ethtool -l.

2020-09-27 Thread Michael Chan
The current logic that calculates the preset maximum value for combined channel does not take into account the rings used for XDP and mqprio TCs. Each of these features will reduce the number of TX rings. Add the logic to divide the TX rings accordingly based on whether the device is currently in

[PATCH net-next 02/11] bnxt_en: refactor code to limit speed advertising

2020-09-27 Thread Michael Chan
From: Edwin Peer Extract the code for determining an advertised speed is no longer supported into a separate function. This will avoid some code duplication in a later patch when supporting PAM4 speeds, since these speeds are specified in a separate field. Reviewed-by: Scott Branden Signed-off-

[PATCH net-next 03/11] bnxt_en: refactor bnxt_get_fw_speed()

2020-09-27 Thread Michael Chan
From: Edwin Peer It will be necessary to update more than one field in the link_info structure when PAM4 speeds are added in a later patch. Instead of merely translating ethtool speed values to firmware speed values, change the responsiblity of this function to update all the necessary link_info

[PATCH net-next 00/11] bnxt_en: Update for net-next.

2020-09-27 Thread Michael Chan
This patch series adds 2 main features to the bnxt_en driver: 200G link speed support and FEC support with some refactoring of the link speed logic. The firmware interface is updated to have proper support for these 2 features. The ethtool preset max channel value is also adjusted properly to acc

[PATCH net-next 01/11] bnxt_en: Update firmware interface spec to 1.10.1.65.

2020-09-27 Thread Michael Chan
The main changes include FEC, ECN statistics, HWRM_PORT_PHY_QCFG response size reduction, and a new counter added to ctx_hw_stats_ext struct to support the new 58818 chip. The ctx_hw_stats_ext structure is now the superset supporting the new 58818 chips and the prior P5 chips. Add a new flag to i

[PATCH net-next 04/11] bnxt_en: add basic infrastructure to support PAM4 link speeds

2020-09-27 Thread Michael Chan
From: Edwin Peer The firmware interface has added support for new link speeds using PAM4 modulation. Expand the bnxt_link_info structure to closely mirror the new firmware structures. Add logic to copy the PAM4 capabilities and settings from the firmware. Signed-off-by: Edwin Peer Signed-off-

[PATCH net-next 08/11] bnxt_en: Report FEC settings to ethtool.

2020-09-27 Thread Michael Chan
Implement .get_fecparam() method to report the configured and active FEC settings. Also report the supported and advertised FEC settings to the .get_link_ksettings() method. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +- dri

[PATCH net-next 07/11] bnxt_en: avoid link reset if speed is not changed

2020-09-27 Thread Michael Chan
From: Edwin Peer PORT_PHY_CONFIG is always sent with REQ_FLAGS_RESET_PHY set. This flag must be set in order for the firmware to institute the requested PHY change immediately, but it results in a link flap. This is unnecessary and results in an improved user experience if the PHY reconfiguration

[PATCH net-next 09/11] bnxt_en: Report Active FEC encoding during link up.

2020-09-27 Thread Michael Chan
The current code is reporting the FEC configured settings during link up. Change it to report the more useful active FEC encoding that may be negotiated or auto detected. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 29 +++

[PATCH net-next 05/11] bnxt_en: ethtool: support PAM4 link speeds up to 200G

2020-09-27 Thread Michael Chan
From: Edwin Peer Add ethtool PAM4 link modes for: 5baseCR_Full 10baseCR2_Full 20baseCR4_Full Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 71 --- 1 file changed, 63 insertions(+),

[PATCH net-next 06/11] bnxt_en: Handle ethernet link being disabled by firmware.

2020-09-27 Thread Michael Chan
On some 200G dual port NICs, if one port is configured to 200G, firmware will disable the ethernet link on the other port. Firmware will send notification to the driver for the disabled port when this happens. Define a new field in the link_info structure to keep track of this state. The new phy

[PATCH net-next 10/11] bnxt_en: Implement ethtool set_fec_param() method.

2020-09-27 Thread Michael Chan
This feature allows the user to set the different FEC modes on the NIC port. Any new setting will take effect immediately after a link toggle. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt

[PATCH net] r8169: fix RTL8168f/RTL8411 EPHY config

2020-09-27 Thread Heiner Kallweit
Mistakenly bit 2 was set instead of bit 3 as in the vendor driver. Fixes: a7a92cf81589 ("r8169: sync PCIe PHY init with vendor driver 8.047.01") Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH 2/2] ath10k: Try to download pre-cal using nvmem api

2020-09-27 Thread Ansuel Smith
Most of routers that have the ath10k wifi chip integrated in the Soc have the pre-cal data stored in a dedicated nvmem partition. Introduce a new function to directly extract and use it if a nvmem with the name 'pre-cal' is defined and available. Pre-cal file have still priority to everything else.

[PATCH 1/2] ath10k: Try to get mac-address from dts

2020-09-27 Thread Ansuel Smith
Most of embedded device that have the ath10k wifi integrated store the mac-address in nvmem partitions. Try to fetch the mac-address using the standard 'of_get_mac_address' than in all the check also try to fetch the address using the nvmem api searching for a defined 'mac-address' cell. Mac-addres

[PATCH bpf-next] bpf/preload: make sure Makefile cleans up after itself, and add .gitignore

2020-09-27 Thread Toke Høiland-Jørgensen
The Makefile in bpf/preload builds a local copy of libbpf, but does not properly clean up after itself. This can lead to subsequent compilation failures, since the feature detection cache is kept around which can lead subsequent detection to fail. Fix this by properly setting clean-files, and whil

Re: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Marc Kleine-Budde
On 9/27/20 6:07 PM, Joakim Zhang wrote: > One issue was reported at a baremetal environment, which is used for > FPGA verification. "The first transfer will fail for extended ID > format(for both 2.0B and FD format), following frames can be transmitted > and received successfully for extended forma

Re: [PATCH linux-can-next/flexcan 1/4] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Marc Kleine-Budde
On 9/27/20 10:01 AM, Joakim Zhang wrote: > [...] >> Can you create a "static const struct" holding the reg (or offset) + len and >> loop >> over it. Something linke this? >> >> const struct struct flexcan_ram_init ram_init[] { >> void __iomem *reg; >> u16 len; >> } = { >> { >>

[patch 08/35] net: e100: Remove in_interrupt() usage and pointless GFP_ATOMIC allocation

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior e100_hw_init() invokes e100_self_test() only if in_interrupt() returns false as e100_self_test() uses msleep() which requires sleepable task context. The in_interrupt() check is incomplete because in_interrupt() cannot catch callers from contexts which have just pr

[patch 00/35] net: in_interrupt() cleanup and fixes

2020-09-27 Thread Thomas Gleixner
Folks, in the discussion about preempt count consistency accross kernel configurations: https://lore.kernel.org/r/20200914204209.256266...@linutronix.de/ Linus clearly requested that code in drivers and libraries which changes behaviour based on execution context should either be split up so t

[patch 02/35] net: caif: Remove unused caif SPI driver

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner While chasing in_interrupt() (ab)use in drivers it turned out that the caif_spi driver has never been in use since the driver was merged 10 years ago. There never was any matching code which provides a platform device. The driver has not seen any update (asided of treewide

[patch 06/35] net: cxgb3: Cleanup in_interrupt() usage

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner t3_sge_stop() is called from task context and from error handlers in interrupt context. It relies on in_interrupt() to differentiate the contexts. in_interrupt() is deprecated as it is ill defined and does not provide what it suggests. Instead of replacing it with some oth

[patch 27/35] net: ipw2x00,iwlegacy,iwlwifi: Remove in_interrupt() from debug macros

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. The debugging macros in these drivers use in_interrupt() to print 'I' or 'U' depending on the return value of in_interrupt(). While 'U' is confusing at best and 'I' is not really describing the actual con

[patch 21/35] net: usb: kaweth: Remove last user of kaweth_control()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior kaweth_async_set_rx_mode() invokes kaweth_contol() and has two callers: - kaweth_open() which is invoked from preemptible context . - kaweth_start_xmit() which holds a spinlock and has bottom halfs disabled. If called from kaweth_start_xmit() kaweth_async_set_rx_

[patch 18/35] net: vxge: Remove in_interrupt() conditionals

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior vxge_os_dma_malloc() and vxge_os_dma_malloc_async() are both called from callchains which use GFP_KERNEL allocations unconditionally or have other requirements to be called from fully preemptible task context.. vxge_os_dma_malloc(): 1) __vxge_hw_blockpool_creat

[patch 09/35] net: fec_mpc52xx: Replace in_interrupt() usage

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. mpc5

[patch 05/35] net: atheros: Remove WARN_ON(in_interrupt())

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers onl

[patch 07/35] net: cxbg4: Remove pointless in_interrupt() check

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner t4_sge_stop() is only ever called from task context and the in_interrupt() check is presumably a leftover from copying t3_sge_stop(). Aside of in_interrupt() being deprecated because it's not providing what it claims to provide, this check would paper over illegitimate call

[patch 31/35] net: libertas libertas_tf: Remove in_interrupt() from debug macro.

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The debug macro prints (INT) when in_interrupt() returns true. The value of this information is dubious as it does not distinguish between the various contexts which are covered by in_interrupt(). As the usage of in_interrupt() in drivers is phased out and the sam

[patch 23/35] net: wan/lmc: Remove lmc_trace()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior lmc_trace() was first introduced in commit e7a392d5158af ("Import 2.3.99pre6-5") and was not touched ever since. The reason for looking at this was to get rid of the in_interrupt() usage, but while looking at it the following observations were made: - At least l

[patch 34/35] net: rtlwifi: Remove in_interrupt() from debug macro

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in drivers in is phased out. rtlwifi uses in_interrupt() in the RT_TRACE() debug macro which is sprinkled all over the driver. RT_TRACE() is almost identical to RTPRINT() which another hideous debug printk wrapper. The only difference i

[patch 25/35] net: brcmfmac: Use netif_rx_any_context().

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. brcmfmac uses in_interupt() to select the netif_rx*() variant which matches the cal

Re: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Marc Kleine-Budde
On 9/27/20 6:07 PM, Joakim Zhang wrote: [...] > +static void flexcan_init_ram(struct net_device *dev) > +{ > + struct flexcan_priv *priv = netdev_priv(dev); > + struct flexcan_regs __iomem *regs = priv->regs; > + u32 reg_ctrl2; > + int i; > + > + /* 11.8.3.13 Detection and corr

[patch 10/35] net: intel: Remove in_interrupt() warnings

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the checks

[patch 30/35] net: mwifiex: Use netif_rx_any_context().

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. mwifiex uses in_interupt() to select the netif_rx*() variant which matches the call

[patch 35/35] net: rtlwifi: Replace in_interrupt() for context detection

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior rtl_lps_enter() and rtl_lps_leave() are using in_interrupt() to detect whether it is safe to acquire a mutex or if it is required to defer to a workqueue. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes beha

[patch 28/35] net: iwlwifi: Remove in_interrupt() from tracing macro.

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt) in driver code is phased out. The iwlwifi_dbg tracepoint records in_interrupt() seperately, but that's superfluous because the trace header already records all kind of state and context information like hardirq status, softirq status, pr

[patch 33/35] net: rtlwifi: Remove void* casts related to delayed work

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior INIT_DELAYED_WORK() takes two arguments: A pointer to the delayed work and a function reference for the callback. The rtl code casts all function references to (void *) because the callbacks in use are not matching the required function signature. That's error pro

[patch 19/35] net: zd1211rw: Remove ZD_ASSERT(in_interrupt())

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. handle_regs_int() is al

[patch 26/35] net: brcmfmac: Convey allocation mode as argument

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. brcm

[patch 20/35] net: usb: kaweth: Replace kaweth_control() with usb_control_msg()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior kaweth_control() is almost the same as usb_control_msg() except for the memory allocation mode (GFP_ATOMIC vs GFP_NOIO) and the in_interrupt() check. All the invocations of kaweth_control() are within the probe function in fully preemtible context so there is no r

[patch 24/35] net: brcmfmac: Replace in_interrupt()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior brcmf_sdio_isr() is using in_interrupt() to distinguish if it is called from a interrupt service routine or from a worker thread. Passing such information from the calling context is preferred and requested by Linus, so add an argument `in_isr' to brcmf_sdio_isr()

[patch 29/35] net: hostap: Remove in_interrupt() usage

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. hfa384x_cmd() and prism

[patch 32/35] net: libertas: Use netif_rx_any_context()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. libertas uses in_interupt() to select the netif_rx*() variant which matches the cal

[patch 17/35] net: sun3lance: Remove redundant checks in interrupt handler

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior lance_interrupt() contains two pointless checks: - A check whether the 'dev_id' argument is NULL. 'dev_id' is the pointer which was handed in to request_irq() and the interrupt handler will always be invoked with that pointer as 'dev_id' argument by the cor

  1   2   >