- 26 Jul, 2021 13 commits
-
-
David S. Miller authored
Merge tag 'linux-can-next-for-5.15-20210725' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next linux-can-next-for-5.15-20210725 Marc Kleine-Budde says: ==================== pull-request: can-next 2021-07-25 this is a pull request of 46 patches for net-next/master. The first 6 patches target the CAN J1939 protocol. One is from gushengxian, fixing a grammatical error, 5 are by me fixing a checkpatch warning, make use of the fallthrough pseudo-keyword, and use consistent variable naming. The next 3 patches target the rx-offload helper, are by me and improve the performance and fix the local softirq work pending error, when napi_schedule() is called from threaded IRQ context. The next 3 patches are by Vincent Mailhol and me update the CAN bittiming and transmitter delay compensation, the documentation for the struct can_tdc is fixed, clear data_bittiming if FD mode is turned off and a redundant check is removed. Followed by 4 patches targeting the m_can driver. Faiz Abbas's patches add support for CAN PHY via the generic phy subsystem. Yang Yingliang converts the driver to use devm_platform_ioremap_resource_byname(). And a patch by me which removes the unused support for custom bit timing. Andy Shevchenko contributes 2 patches for the mcp251xfd driver to prepare the driver for ACPI support. A patch by me adds support for shared IRQ handlers. Zhen Lei contributes 3 patches to convert the esd_usb2, janz-ican3 and the at91_can driver to make use of the DEVICE_ATTR_RO/RW() macros. The next 8 patches are by Peng Li and provide general cleanups for the at91_can driver. The next 7 patches target the peak driver. Frist 2 cleanup patches by me for the peak_pci driver, followed by Stephane Grosjean' patch to print the name and firmware version of the detected hardware. The peak_usb driver gets a cleanup patch, loopback and one-shot mode and an upgrading of the bus state change handling in Stephane Grosjean's patches. Vincent Mailhol provides 6 cleanup patches for the etas_es58x driver. In the last 3 patches Angelo Dureghello add support for the mcf5441x SoC to the flexcan driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Jason Wang authored
The dma_pool_zalloc combines dma_pool_alloc/memset. Therefore, the dma_pool_alloc/memset can be replaced with dma_pool_zalloc which is more compact. Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Yinjun Zhang authored
Use dynamic interrupt moderation library to implement coalesce adaptive feature for nfp driver. Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> Signed-off-by: Yu Xiao <yu.xiao@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Richard Laing authored
Packets are aggregated over the MBIM link and currently the MHI net device will count each aggregated packet rather then the actual packets themselves. If a protocol handler module is specified, use that to count the packets rather than directly in the MHI net device. This is in line with the behaviour of the USB net cdc_mbim driver. Signed-off-by: Richard Laing <richard.laing@alliedtelesis.co.nz> Signed-off-by: David S. Miller <davem@davemloft.net>
-
wengjianfeng authored
Simplify the code by removing unnecessary label and returning directly. Signed-off-by: wengjianfeng <wengjianfeng@yulong.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Guangbin Huang says: ==================== net: hns3: add support devlink This series adds devlink support for the HNS3 ethernet driver. change log: V2 -> V3: 1. remove two patches of setting rx/tx buffer size by devlink param. V1 -> V2: 1. add more detailed descriptions of parameters in document hns3.rst. RFC -> V1: 1. use DEVLINK_INFO_VERSION_GENERIC_FW instead of "fw-version". 2. add devlink documentation for hns3 driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Hao Chen authored
Add devlink reload support for HNS3 ethernet VF driver. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Hao Chen authored
Add devlink reload support for HNS3 ethernet PF driver. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Yufeng Mo authored
Add devlink get info support for HNS3 ethernet VF driver. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Yufeng Mo authored
Add devlink get info support for HNS3 ethernet PF driver. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Yufeng Mo authored
Add devlink register support for HNS3 ethernet VF driver. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Yufeng Mo authored
Add devlink register support for HNS3 ethernet PF driver. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Hao Chen authored
Add a file to document devlink support for hns3 driver, now support devlink info and devlink reload. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
- 25 Jul, 2021 27 commits
-
-
Xin Long authored
syzbot reported an use-after-free crash: BUG: KASAN: use-after-free in tipc_recvmsg+0xf77/0xf90 net/tipc/socket.c:1979 Call Trace: tipc_recvmsg+0xf77/0xf90 net/tipc/socket.c:1979 sock_recvmsg_nosec net/socket.c:943 [inline] sock_recvmsg net/socket.c:961 [inline] sock_recvmsg+0xca/0x110 net/socket.c:957 tipc_conn_rcv_from_sock+0x162/0x2f0 net/tipc/topsrv.c:398 tipc_conn_recv_work+0xeb/0x190 net/tipc/topsrv.c:421 process_one_work+0x98d/0x1630 kernel/workqueue.c:2276 worker_thread+0x658/0x11f0 kernel/workqueue.c:2422 As Hoang pointed out, it was caused by skb_cb->bytes_read still accessed after calling tsk_advance_rx_queue() to free the skb in tipc_recvmsg(). This patch is to fix it by accessing skb_cb->bytes_read earlier than calling tsk_advance_rx_queue(). Fixes: f4919ff5 ("tipc: keep the skb in rcv queue until the whole data is read") Reported-by: syzbot+e6741b97d5552f97c24d@syzkaller.appspotmail.com Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Jon Maloy <jmaloy@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Angelo Dureghello authored
Update flexcan to support coldfire architecture. Any new platform should use OF, but coldfire architecture is actually not supporting devicetrees. Link: https://lore.kernel.org/r/20210702094841.327679-4-angelo@kernel-space.orgSigned-off-by: Angelo Dureghello <angelo@kernel-space.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Angelo Dureghello authored
Add flexcan support for NXP ColdFire mcf5441x family. This flexcan module is quite similar to imx6 flexcan module, but with some exceptions: - 3 separate interrupt sources, MB, BOFF and ERR, - implements 16 mb only, - m68k architecture is not supporting devicetrees, so a platform data check/case has been added, - ColdFire is m68k, so big-endian cpu, with a little-endian flexcan module. Link: https://lore.kernel.org/r/20210702094841.327679-5-angelo@kernel-space.orgSigned-off-by: Angelo Dureghello <angelo@kernel-space.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Angelo Dureghello authored
Add platform data header for flexcan. Link: https://lore.kernel.org/r/20210702094841.327679-1-angelo@kernel-space.orgSigned-off-by: Angelo Dureghello <angelo@kernel-space.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
The es581_tx_can_msg() does below cast: | tx_can_msg = (struct es581_4_tx_can_msg *) | &es581_4_urb_cmd->bulk_tx_can_msg.tx_can_msg_buf[msg_len - 1]; The -1 offset is to skip the first member of struct es581_4_tx_can_msg. However, es581_4_urb_cmd already has a raw_msg field which can be used instead without the use of an offset calculation. The function es58x_fd_tx_can_msg() is also modified to mirror es581_tx_can_msg(). Link: https://lore.kernel.org/r/20210628155420.1176217-7-mailhol.vincent@wanadoo.frSigned-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
Replace two constant values by a call to sizeof{,_field} on the relevant field to make the logic easier to understand. Link: https://lore.kernel.org/r/20210628155420.1176217-6-mailhol.vincent@wanadoo.frSigned-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
Both es58x_probe() and es58x_disconnect() use a similar code snippet to release the netdev resources. Factorize it in an helper function named es58x_free_netdevs(). Link: https://lore.kernel.org/r/20210628155420.1176217-5-mailhol.vincent@wanadoo.frSigned-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
Replace kzalloc() with devm_kzalloc(). By doing this, we do not need to care anymore about having to call kfree(). This result in a simpler and more easy to read code. Link: https://lore.kernel.org/r/20210628155420.1176217-4-mailhol.vincent@wanadoo.frSigned-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
Make es58x_init_es58x_dev return a pointer to the allocated structure instead of returning an integer. Errors are handled through the helper function ERR_PTR and IS_ERR. This slightly simplifies the code. Link: https://lore.kernel.org/r/20210628155420.1176217-3-mailhol.vincent@wanadoo.frSigned-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
Change the author name from "lastname firstname" to "firstname lastname". Fix a typo in a variable name in the documentation of struct es58x_parameters::fifo_mask. Fix a typo in the title of the datasheet (E701 -> E70) and re-indent the comments. Link: https://lore.kernel.org/r/20210628155420.1176217-2-mailhol.vincent@wanadoo.frSigned-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Stephane Grosjean authored
This patch updates old code by using the can_change_state() function published since by the socket-can module. In particular, this new code better manages the change of bus state by also using the value of the error counters that the driver now systematically asks for when initializing the channel. Link: https://lore.kernel.org/r/20210715142842.35793-1-s.grosjean@peak-system.comSigned-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Stephane Grosjean authored
This patch adds information by replacing a hard-coded values with its symbol and a adding comment. Link: https://lore.kernel.org/r/20210625130931.27438-5-s.grosjean@peak-system.comSigned-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Stephane Grosjean authored
The CAN - USB PCAN-USB interface is able to generate one-shot frames as well as loopback frames that it transmits starting from version 4.1 of its firmware. This patch adds support for the one-shot and loopback functionality to the driver, that can be activated if the embedded firmware allows it. If the driver detects that the PCAN-USB device runs an old firmware (< 4.1) it prints a message suggesting to contact <support@peak-system.com> for a possible firmware update. Link: https://lore.kernel.org/r/20210625130931.27438-3-s.grosjean@peak-system.comSigned-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Stephane Grosjean authored
In case of error, reading value from response argument is useless. Link: https://lore.kernel.org/r/20210625130931.27438-2-s.grosjean@peak-system.comSigned-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Stephane Grosjean authored
This patch adds name and (possibly) firmware version information to the kernel about the detected PEAK-System CAN - PCI/PCIe interface card. Link: https://lore.kernel.org/r/20210607151720.13571-1-s.grosjean@peak-system.comSigned-off-by: Stephane Grosjean <s.grosjean@peak-system.com> [mkl: reformated struct pci_device_id peak_pci_tbl] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
This patch cleans several checkpatch warnings in the peak_pci driver. Cc: Stephane Grosjean <s.grosjean@peak-system.com> Link: https://lore.kernel.org/r/20210616102811.2449426-0-mkl@pengutronix.deSigned-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
This patch converts all comments to network subsystem style comments. Cc: Stephane Grosjean <s.grosjean@peak-system.com> Link: https://lore.kernel.org/r/20210616102811.2449426-8-mkl@pengutronix.deSigned-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Link: https://lore.kernel.org/r/1624096589-13452-9-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
According to the chackpatch.pl, no space before tabs. Link: https://lore.kernel.org/r/1624096589-13452-8-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
Braces {} should be used on all arms of this statement. Link: https://lore.kernel.org/r/1624096589-13452-7-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
Alignment should match open parenthesis. Link: https://lore.kernel.org/r/1624096589-13452-6-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
This patch uses the BIT macro for setting individual bits, to fix the following checkpatch.pl issue: CHECK: Prefer using the BIT macro. Link: https://lore.kernel.org/r/1624096589-13452-5-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
Macros with complex values should be enclosed in parentheses Link: https://lore.kernel.org/r/1624096589-13452-4-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
This patch fixes the checkpatch error about missing a blank line after declarations. Link: https://lore.kernel.org/r/1624096589-13452-3-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Peng Li authored
This patch removes some redundant blank lines. Link: https://lore.kernel.org/r/1624096589-13452-2-git-send-email-huangguangbin2@huawei.comSigned-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Zhen Lei authored
Use DEVICE_ATTR_RW() helper macro instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210603100233.11877-1-thunder.leizhen@huawei.comSigned-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Zhen Lei authored
Use DEVICE_ATTR_RO/RW() helper macro instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210603111739.11983-1-thunder.leizhen@huawei.comSigned-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-