summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-21net: natsemi: Remove set but not used variableZheng Yongjun
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/natsemi/ns83820.c: In function ns83820_get_link_ksettings: drivers/net/ethernet/natsemi/ns83820.c:1210:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable] `tanar` is never used, so remove it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21ipv6: route: convert comma to semicolonXu Wang
Replace a comma between expression statements by a semicolon. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: unix: remove redundant assignment to variable 'err'Jing Xiangfeng
After commit 37ab4fa7844a ("net: unix: allow bind to fail on mutex lock"), the assignment to err is redundant. So remove it. Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: phy: realtek: enable ALDPS to save power for RTL8211FJisheng Zhang
Enable ALDPS(Advanced Link Down Power Saving) to save power when link down. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: dsa: rtl8366rb: Support all 4096 VLANsLinus Walleij
There is an off-by-one error in rtl8366rb_is_vlan_valid() making VLANs 0..4094 valid while it should be 1..4095. Fix it. Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: dsa: mt7530: Add some return-value checksAlex Dewar
In mt7531_cpu_port_config(), if the variable port is neither 5 nor 6, then variable interface will be used uninitialised. Change the function to return -EINVAL in this case. As the return value of mt7531_cpu_port_config() is never checked (even though it returns an int) add a check in the correct place so that the error can be passed up the call stack. Now that we correctly handle errors thrown in this function, also check the return value of mt7531_mac_config() in case an error occurs here. Also add misisng checks to mt7530_setup() and mt7531_setup(), which are another level further up the call stack. Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") Addresses-Coverity: 1496993 ("Uninitialized variables") Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net-sysfs: add backlog len and CPU id to softnet dataPaolo Abeni
Currently the backlog status in not exposed to user-space. Since long backlogs (or simply not empty ones) can be a source of noticeable latency, -RT deployments need some way to inspect it. Additionally, there isn't a direct match between 'softnet_stat' lines and the related CPU - sd for offline CPUs are not dumped - so this patch also includes the CPU id into such entry. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21sfc: Fix error code in probeDan Carpenter
This failure path should return a negative error code but it currently returns success. Fixes: 51b35a454efd ("sfc: skeleton EF100 PF driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21Merge branch 'Update-license-and-polish-ENA-driver-code'David S. Miller
Shay Agroskin says: ==================== Update license and polish ENA driver code This series adds the following: - Change driver's license into SPDX format - Capitalize all log prints in ENA driver - Fix issues raised by static checkers - Improve code readability by adding functions, fix spelling mistakes etc. - Update driver's documentation Changed from previous version: v1->v2: dropped patch that transforms pr_* log prints into dev_* prints ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: ena: update ena documentationShay Agroskin
The PCI vendor IDs in the documentation inaccurately describe the ENA devices. For example, the 1d0f:ec20 can have LLQ support. The driver loads in LLQ mode by default, and a message is printed to the kernel ring if the mode isn't supported by the device, so the device table isn't needed. Also, LLQ can support various entry sizes, so the documentation is updated to reflect that. Interrupt moderation description is also updated to be more accurate. Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: ena: Fix all static chekers' warningsShay Agroskin
After running Sparse checker on the driver using make C=1 M=drivers/net/ethernet/amazon/ena the only error that is thrown is: sparse: sparse: Using plain integer as NULL pointer about the line struct ena_calc_queue_size_ctx calc_queue_ctx = { 0 }; This patch fixes this warning, thus making our driver free (for now) of Sparse errors/warnings. To make a more complete work, this patch also fixes all static warnings that were found using an internal static checker. Signed-off-by: Ido Segev <idose@amazon.com> Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: ena: Change RSS related macros and variables namesShay Agroskin
The formal name changes to "ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG". Indirection is the ability to reference "something" using "something else" instead of the value itself. Indirection table, as the name implies, is the ability to reference CPU/Queue value using hash-to-CPU table instead of CPU/Queue itself. This patch renames the variable keys_num, which describes the number of words in the RSS hash key, to key_parts which makes its purpose clearer in RSS context. Signed-off-by: Amit Bernstein <amitbern@amazon.com> Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: ena: Remove redundant print of placement policyShay Agroskin
The placement policy is printed in the process of queue creation in ena_up(). No need to print it in ena_probe(). Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com> Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: ena: Capitalize all log strings and improve code readabilityShay Agroskin
Capitalize all log strings printed by the ena driver to make their format uniform across it. Also fix indentation, spelling mistakes and comments to improve code readability. This also includes adding comments to macros/enums whose purpose might be difficult to understand. Separate some code into functions to make it easier to understand the purpose of these lines. Signed-off-by: Amit Bernstein <amitbern@amazon.com> Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: ena: Change log message to netif/dev functionShay Agroskin
Make log prints in ena_netdev use the same log functions as the rest of the driver. For the sake of consistency, all prints in ena_netdev file were converted into netif_* format except where netdev struct isn't yet defined. For these places, dev_* log functions are used (similar to the patch for ena_com files). This commit leaves some corner cases which would be changed in a future patch. Signed-off-by: Amit Bernstein <amitbern@amazon.com> Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: ena: Change license into format to SPDX in all filesShay Agroskin
All ena files should now use SPDX format in their license string. This doesn't change the license of the files, but rather states the same license in fewer words. Also update the license years in some of the files. Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21chelsio: simplify the return expression of t3_ael2020_phy_prep()Qinglang Miao
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21connector: simplify the return expression of cn_add_callback()Qinglang Miao
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21enetc: simplify the return expression of enetc_vf_set_mac_addr()Qinglang Miao
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21ice: simplify the return expression of ice_finalize_update()Qinglang Miao
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21mlxsw: spectrum_router: simplify the return expression of ↵Qinglang Miao
__mlxsw_sp_router_init() Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: hns3: simplify the return expression of hclgevf_client_start()Qinglang Miao
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21net: qlcnic: simplify the return expression of qlcnic_83xx_shutdownQinglang Miao
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-21Merge branch 'rcu/urgent' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This contains a single commit that fixes a bug that was introduced in the last merge window. This bug causes a compiler warning complaining about show_rcu_tasks_classic_gp_kthread() being an unused static function in !SMP kernels. The fix is straightforward, just adding an 'inline' to make this a static inline function, thus avoiding the warning. This bug was reported by Laurent Pinchart, who would like it fixed sooner rather than later" * 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu-tasks: Prevent complaints of unused show_rcu_tasks_classic_gp_kthread()
2020-09-21bpf: Fix potential call bpf_link_free() in atomic contextMuchun Song
The in_atomic() macro cannot always detect atomic context, in particular, it cannot know about held spinlocks in non-preemptible kernels. Although, there is no user call bpf_link_put() with holding spinlock now, be on the safe side, so we can avoid this in the future. Signed-off-by: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200917074453.20621-1-songmuchun@bytedance.com
2020-09-21Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds
Pull kvm fixes from Paolo Bonzini: "ARM: - fix fault on page table writes during instruction fetch s390: - doc improvement x86: - The obvious patches are always the ones that turn out to be completely broken. /me hangs his head in shame" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: Revert "KVM: Check the allocation of pv cpu mask" KVM: arm64: Remove S1PTW check from kvm_vcpu_dabt_iswrite() KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch docs: kvm: add documentation for KVM_CAP_S390_DIAG318
2020-09-21Merge tag 'libnvdimm-fixes-5.9-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Dan Williams: "Fix compilation for the new dax_supported() exported helper" * tag 'libnvdimm-fixes-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix compilation for CONFIG_DAX && !CONFIG_FS_DAX
2020-09-21dax: Fix compilation for CONFIG_DAX && !CONFIG_FS_DAXJan Kara
dax_supported() is defined whenever CONFIG_DAX is enabled. So dummy implementation should be defined only in !CONFIG_DAX case, not in !CONFIG_FS_DAX case. Fixes: e2ec51282545 ("dm: Call proper helper to determine dax support") Cc: <stable@vger.kernel.org> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2020-09-21io_uring: fix openat/openat2 unified prep handlingJens Axboe
A previous commit unified how we handle prep for these two functions, but this means that we check the allowed context (SQPOLL, specifically) later than we should. Move the ring type checking into the two parent functions, instead of doing it after we've done some setup work. Fixes: ec65fea5a8d7 ("io_uring: deduplicate io_openat{,2}_prep()") Reported-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-09-21io_uring: mark statx/files_update/epoll_ctl as non-SQPOLLJens Axboe
These will naturally fail when attempted through SQPOLL, but either with -EFAULT or -EBADF. Make it explicit that these are not workable through SQPOLL and return -EINVAL, just like other ops that need to use ->files. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-09-21tools/io_uring: fix compile breakageDouglas Gilbert
It would seem none of the kernel continuous integration does this: $ cd tools/io_uring $ make Otherwise it may have noticed: cc -Wall -Wextra -g -D_GNU_SOURCE -c -o io_uring-bench.o io_uring-bench.c io_uring-bench.c:133:12: error: static declaration of ‘gettid’ follows non-static declaration 133 | static int gettid(void) | ^~~~~~ In file included from /usr/include/unistd.h:1170, from io_uring-bench.c:27: /usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here 34 | extern __pid_t gettid (void) __THROW; | ^~~~~~ make: *** [<builtin>: io_uring-bench.o] Error 1 The problem on Ubuntu 20.04 (with lk 5.9.0-rc5) is that unistd.h already defines gettid(). So prefix the local definition with "lk_". Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-09-21io_uring: don't use retry based buffered reads for non-async bdevJens Axboe
Some block devices, like dm, bubble back -EAGAIN through the completion handler. We check for this in io_read(), but don't honor it for when we have copied the iov. Return -EAGAIN for this case before retrying, to force punt to io-wq. Fixes: bcf5a06304d6 ("io_uring: support true async buffered reads, if file provides it") Reported-by: Zorro Lang <zlang@redhat.com> Tested-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-09-21io_uring: don't re-setup vecs/iter in io_resumit_prep() is already thereJens Axboe
If we already have mapped the necessary data for retry, then don't set it up again. It's a pointless operation, and we leak the iovec if it's a large (non-stack) vec. Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources") Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-09-21MAINTAINERS: Add reviewer entry for microchip mcp25xxfd SPI-CAN network driverThomas Kopp
This patch adds Thomas Kopp as a reviewer for the mcp25xxfd CAN driver. Signed-off-by: Thomas Kopp <thomas.kopp@microchip.com> Link: https://lore.kernel.org/r/20200916101334.1277-1-thomas.kopp@microchip.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21MAINTAINERS: Add entry for Microchip MCP25XXFD SPI-CAN network driverManivannan Sadhasivam
Add MAINTAINERS entry for Microchip MCP25XXFD SPI-CAN network driver. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20200910133806.25077-7-manivannan.sadhasivam@linaro.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: mcp25xxfd: add listen-only modeKurt Van Dijck
This commit enables listen-only mode, which works internally like CANFD mode. Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/r/20200918172536.2074504-5-mkl@pengutronix.de
2020-09-21can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CANMarc Kleine-Budde
This patch adds support for the Microchip MCP25xxFD SPI CAN controller family. Tested-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/r/20200918172536.2074504-4-mkl@pengutronix.de
2020-09-21can: mcp25xxfd: add regmap infrastructureMarc Kleine-Budde
This patch adds the regmap infrastructure for the Microchip MCP25xxFD SPI CAN controller family. The actual driver is added in the next commit. Tested-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/r/20200918172536.2074504-3-mkl@pengutronix.de
2020-09-21dt-binding: can: mcp25xxfd: document device tree bindingsOleksij Rempel
This patch adds the device-tree binding documentation for the Microchip MCP25xxFD SPI CAN controller family. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/r/20200918172536.2074504-2-mkl@pengutronix.de
2020-09-21can: rx-offload: can_rx_offload_add_manual(): add new initialization functionMarc Kleine-Budde
This patch adds a new initialization function: can_rx_offload_add_manual() It should be used to add support rx-offload to a driver, if the callback mechanism should not be used. Use e.g. can_rx_offload_queue_sorted() to queue skbs into rx-offload. Link: https://lore.kernel.org/r/20200915223527.1417033-33-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: mscan: simplify clock enable/disableZhang Changzhong
All the NULL checks are pointless, clk_*() routines already deal with NULL just fine. Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Link: https://lore.kernel.org/r/1594972875-27631-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: mscan: mpc5xxx_can: update contact emailWolfram Sang
The 'pengutronix' address is defunct for years. Use the proper contact address. Signed-off-by: Wolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20200502142657.19199-1-wsa@kernel.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: mcp251x: add support for half duplex controllersTim Harvey
Some SPI host controllers do not support full-duplex SPI and are marked as such via the SPI_CONTROLLER_HALF_DUPLEX controller flag. For such controllers use half duplex transactions but retain full duplex transactions for the controllers that can handle those. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Link: https://lore.kernel.org/r/1595516275-1179-1-git-send-email-tharvey@gateworks.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: mcp251x: Use readx_poll_timeout() helperAndy Shevchenko
We may use special helper macro to poll IO till condition or timeout occurs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200217161038.25009-1-andriy.shevchenko@linux.intel.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: mcp251x: add GPIO supportTimo Schlüßler
The mcp251x variants feature 3 general purpose digital inputs and 2 outputs. With this patch they are accessible through the gpio framework. Signed-off-by: Timo Schlüßler <schluessler@krause.de> Tested-by: Timo Schlüßler <schluessler@krause.de> Link: https://lore.kernel.org/r/20200915223527.1417033-28-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: mcp251x: sort include files alphabeticallyMarc Kleine-Budde
This patch sorts the include files alphabetically. Link: https://lore.kernel.org/r/20200915223527.1417033-27-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21dt-bindings: can: mcp251x: document GPIO supportMarc Kleine-Budde
The next patch adds gpio controller support to the mcp251x driver. This patch updates the binding accordingly. Cc: Timo Schlüßler <schluessler@krause.de> Link: https://lore.kernel.org/r/20200915223527.1417033-26-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21dt-bindings: can: mcp251x: change example interrupt type to IRQ_TYPE_LEVEL_LOWMarc Kleine-Budde
The MCP2515 datasheet clearly describes a level-triggered interrupt pin. Change example bindings accordingly. Link: https://lore.kernel.org/r/20200915223527.1417033-25-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: spi: Kconfig: remove unneeded dependencies form Kconfig symbolsMarc Kleine-Budde
Since commits 653ee35ce6d5 ("can: hi311x: remove custom DMA mapped buffer") Fixes: df58525df395 ("can: mcp251x: remove custom DMA mapped buffer") both the hi3111x and the mcp251x driver don't make use of the DMA API any more. So we can safely remove the HAS_DMA dependency. While we're here, remove the unneeded CAN_DEV and SPI dependencies from the CAN_HI311X symbol, as the parent menus already have these dependencies. Link: https://lore.kernel.org/r/20200915223527.1417033-24-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-09-21can: pcan_usb: add support of rxerr/txerr countersStephane Grosjean
This patch adds the support of the rx/tx errors CAN counters to the driver of the PCAN-USB PC-CAN interface from PEAK-System GmbH. The PCAN-USB is capable of giving back the values of the rx/tx errors counters, to provide more details and statistics to the linux-can layer. Getting these values allows the driver to better tune CAN_ERR_CRTL_TX_xxx and CAN_ERR_CRTL_RX_xxx bits in case of the interface enters any CAN_STATE_ERROR_xxx state. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Link: https://lore.kernel.org/r/20191206153803.17725-3-s.grosjean@peak-system.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>