- 12 Nov, 2020 21 commits
-
-
Andrew Lunn authored
drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_interrupt’: drivers/net/ethernet/smsc/smc911x.c:976:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 976 | int status; A comment indicates the status needs to be read from the PHY, otherwise bad things happen. But due to the macro magic, it is hard to perform the read without assigning it to a variable. So add _always_unused attribute to status to tell the compiler we don't expect to use the value. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Andrew Lunn authored
drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'dev' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'desc' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'name' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'index' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'value' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'nsdelay' not described in 'try_toggle_control_gpio' Document these parameters. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Andrew Lunn authored
drivers/net/ethernet/smsc/smc91x.c:706:51: warning: variable ‘pkt_len’ set but not used [-Wunused-but-set-variable] 706 | unsigned int saved_packet, packet_no, tx_status, pkt_len; The read of the packet length in the descriptor probably needs to be kept in order to keep the hardware happy. So tell the compiler we don't expect to use the value by using the __always_unused attribute. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Menglong Dong authored
The initialization for 'err' with '-ENOSYS' is redundant and can be removed, as it is updated soon and not used. Changes since v1: - Move the err declaration below struct sock *sk Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Link: https://lore.kernel.org/r/5faa01d5.1c69fb81.8451c.cb5b@mx.google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Andrew Lunn says: ==================== xilinx_emaclite W=1 fixes kerneldoc, pointer issues, and add COMPILE_TEST support to easy finding future issues via build testing. v2: - Use uintptr_t instead of long - Added Acked-by's. ==================== Link: https://lore.kernel.org/r/20201110024024.1479741-1-andrew@lunn.chSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Andrew Lunn authored
To improve build testing of this driver, add COMPILE_TEST support. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Andrew Lunn authored
drivers/net/ethernet//xilinx/xilinx_emaclite.c:341:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 341 | addr = (void __iomem __force *)((u32 __force)addr ^ Use uintptr_t instead of u32 to avoid problems on 64 bit systems. Also, cast the address to an unsigned long for printing. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Andrew Lunn authored
The txqueue parameter to the watchdog callback is unused in this driver. But it still needs to be documented. Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
YueHaibing authored
nfp_cpp_from_nfp6000_pcie() returns ERR_PTR() and never returns NULL. The NULL test should be removed, also return correct err. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Link: https://lore.kernel.org/r/20201112145852.6580-1-yuehaibing@huawei.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Po-Hsu Lin says: ==================== selftests: pmtu.sh: improve the test result processing The pmtu.sh test script treats all non-zero return code as a failure, thus it will be marked as FAILED when some sub-test got skipped. This patchset will: 1. Use the kselftest framework skip code $ksft_skip to replace the hardcoded SKIP return code. 2. Improve the result processing, the test will be marked as PASSED if nothing goes wrong and not all the tests were skipped. ==================== Link: https://lore.kernel.org/r/20201110020049.6705-1-po-hsu.lin@canonical.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Po-Hsu Lin authored
This test will treat all non-zero return codes as failures, it will make the pmtu.sh test script being marked as FAILED when some sub-test got skipped. Improve the result processing by * Only mark the whole test script as SKIP when all of the sub-tests were skipped * If the sub-tests were either passed or skipped, the overall result will be PASS * If any of them has failed with return code 1 or anything bad happened (e.g. return code 127 for command not found), the overall result will be FAIL Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Po-Hsu Lin authored
This test uses return code 2 as a hard-coded skipped state, let's use the kselftest framework skip code variable $ksft_skip instead to make it more readable and easier to maintain. Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Geliang Tang authored
Fix the following Smatch complaint: net/mptcp/pm_netlink.c:213 mptcp_pm_add_timer() warn: variable dereferenced before check 'msk' (see line 208) net/mptcp/pm_netlink.c 207 struct mptcp_sock *msk = entry->sock; 208 struct sock *sk = (struct sock *)msk; 209 struct net *net = sock_net(sk); ^^ "msk" dereferenced here. 210 211 pr_debug("msk=%p", msk); 212 213 if (!msk) ^^^^ Too late. 214 return; 215 Fixes: 93f323b9 ("mptcp: add a new sysctl add_addr_timeout") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Geliang Tang <geliangtang@gmail.com> Link: https://lore.kernel.org/r/078a2ef5bdc4e3b2c25ef852461692001f426495.1604976945.git.geliangtang@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Tobias Waldekranz authored
Most of the other chip info constants have helpers to get at them; add one for max_vid to keep things consistent. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20201110185720.18228-1-tobias@waldekranz.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Ido Schimmel authored
Be more consistent about the way in which the nexthop flags are set and set them in one go. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20201110102553.1924232-1-idosch@idosch.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Andrew Lunn authored
In function ‘strncpy’, inlined from ‘sky2_name’ at drivers/net/ethernet/marvell/sky2.c:4903:3, inlined from ‘sky2_probe’ at drivers/net/ethernet/marvell/sky2.c:5049:2: ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] None of the device names are 16 characters long, so it was never an issue. But replace the strncpy with an snprintf() to prevent the theoretical overflow. Suggested-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Link: https://lore.kernel.org/r/20201110023222.1479398-1-andrew@lunn.chSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Kurt Kanzenbach authored
Add myself to cover the Hirschmann Hellcreek TSN Ethernet Switch Driver. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://lore.kernel.org/r/20201110071829.7467-1-kurt@linutronix.deSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Vincent Bernat says: ==================== net: evaluate net.ipvX.conf.all.* sysctls Some per-interface sysctls are ignoring the "all" variant. This patchset fixes some of them when such a sysctl is handled as a boolean. This includes: - net.ipvX.conf.all.disable_policy - net.ipvX.conf.all.disable_policy.disable_xfrm - net.ipv4.conf.all.proxy_arp_pvlan - net.ipvX.conf.all.ignore_routes_with_linkdown Two sysctls are still ignoring the "all" variant as it wouldn't make much sense for them: - net.ipv4.conf.all.tag - net.ipv4.conf.all.medium_id Ideally, the "all" variant should be removed, but there is no simple alternative to DEVINET_SYSCTL_* macros that would allow one to not expose and "all" entry. ==================== Link: https://lore.kernel.org/r/20201107193515.1469030-1-vincent@bernat.chSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Vincent Bernat authored
The disable_policy and disable_xfrm are a per-interface sysctl to disable IPsec policy or encryption on an interface. However, while a "all" variant is exposed, it was a noop since it was never evaluated. We use the usual "or" logic for this kind of sysctls. Signed-off-by: Vincent Bernat <vincent@bernat.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Vincent Bernat authored
Introduced in 65324144, the "proxy_arp_vlan" sysctl is a per-interface sysctl to tune proxy ARP support for private VLANs. While the "all" variant is exposed, it was a noop and never evaluated. We use the usual "or" logic for this kind of sysctls. Fixes: 65324144 ("net: RFC3069, private VLAN proxy arp support") Signed-off-by: Vincent Bernat <vincent@bernat.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Vincent Bernat authored
Introduced in 0eeb075f, the "ignore_routes_with_linkdown" sysctl ignores a route whose interface is down. It is provided as a per-interface sysctl. However, while a "all" variant is exposed, it was a noop since it was never evaluated. We use the usual "or" logic for this kind of sysctls. Tested with: ip link add type veth # veth0 + veth1 ip link add type veth # veth1 + veth2 ip link set up dev veth0 ip link set up dev veth1 # link-status paired with veth0 ip link set up dev veth2 ip link set up dev veth3 # link-status paired with veth2 # First available path ip -4 addr add 203.0.113.${uts#H}/24 dev veth0 ip -6 addr add 2001:db8:1::${uts#H}/64 dev veth0 # Second available path ip -4 addr add 192.0.2.${uts#H}/24 dev veth2 ip -6 addr add 2001:db8:2::${uts#H}/64 dev veth2 # More specific route through first path ip -4 route add 198.51.100.0/25 via 203.0.113.254 # via veth0 ip -6 route add 2001:db8:3::/56 via 2001:db8:1::ff # via veth0 # Less specific route through second path ip -4 route add 198.51.100.0/24 via 192.0.2.254 # via veth2 ip -6 route add 2001:db8:3::/48 via 2001:db8:2::ff # via veth2 # H1: enable on "all" # H2: enable on "veth0" for v in ipv4 ipv6; do case $uts in H1) sysctl -qw net.${v}.conf.all.ignore_routes_with_linkdown=1 ;; H2) sysctl -qw net.${v}.conf.veth0.ignore_routes_with_linkdown=1 ;; esac done set -xe # When veth0 is up, best route is through veth0 ip -o route get 198.51.100.1 | grep -Fw veth0 ip -o route get 2001:db8:3::1 | grep -Fw veth0 # When veth0 is down, best route should be through veth2 on H1/H2, # but on veth0 on H2 ip link set down dev veth1 # down veth0 ip route show [ $uts != H3 ] || ip -o route get 198.51.100.1 | grep -Fw veth0 [ $uts != H3 ] || ip -o route get 2001:db8:3::1 | grep -Fw veth0 [ $uts = H3 ] || ip -o route get 198.51.100.1 | grep -Fw veth2 [ $uts = H3 ] || ip -o route get 2001:db8:3::1 | grep -Fw veth2 Without this patch, the two last lines would fail on H1 (the one using the "all" sysctl). With the patch, everything succeeds as expected. Also document the sysctl in `ip-sysctl.rst`. Fixes: 0eeb075f ("net: ipv4 sysctl option to ignore routes when nexthop link is down") Signed-off-by: Vincent Bernat <vincent@bernat.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
- 11 Nov, 2020 18 commits
-
-
Jakub Kicinski authored
Loic Poulain says: ==================== net: qrtr: Add distant node support QRTR protocol allows a node to communicate with an other non-immediate node via an intermdediate immediate node acting as a 'bridge': node-0 <=> node-1 <=> node-2 This is currently not supported in this upstream version and this series aim to fix that. This series is V2 because changes 1, 2 and 3 have already been submitted separately on LKML. Changes in v2: - Add reviewed-by tags from Bjorn and Mani - Fixing checkpatch issue reported by Jakub ==================== Link: https://lore.kernel.org/r/1604684010-24090-1-git-send-email-loic.poulain@linaro.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Loic Poulain authored
Distant QRTR nodes can be accessed via an other node that acts as a bridge. When the a QRTR endpoint associated to a bridge node is released, all the linked distant nodes should also be released. This patch fixes endpoint release by: - Submitting QRTR BYE message locally on behalf of all the nodes accessible through the endpoint. - Removing all the routable node IDs from radix tree pointing to the released node endpoint. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Loic Poulain authored
This will be requested for allocating control packet in atomic context. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Loic Poulain authored
In order to reach non-immediate remote node services that are accessed through an intermediate node, the route to the remote node needs to be saved. E.g for a [node1 <=> node2 <=> node3] network - node2 forwards node3 service to node1 - node1 must save node2 as route for reaching node3 Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Loic Poulain authored
A remote endpoint (immediate neighbors node) can forward services from other nodes (non-immadiate), in that case ctrl packet node ID (offering distant service) can differ from the qrtr source node (forwarding the packet). Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Loic Poulain authored
The port ID for control messages was uncorrectly set with broadcast node ID value, causing message to be dropped on remote side since not passing packet filtering (cb->dst_port != QRTR_PORT_CTRL). Fixes: d27e77a3 ("net: qrtr: Reset the node and port ID of broadcast messages") Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jisheng Zhang authored
The return pointer of dwc_eth_dwmac_data's .probe isn't used, and "probe" usually return int, so change the prototype to follow standard way. Secondly, it can simplify the tegra_eqos_probe() code. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20201109160440.3a736ee3@xhacker.debianSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Ioana Ciornei authored
The referenced commit added in .config_intr() the part of code which upon configuration of the IRQ state it also clears up any pending IRQ. If there were actually pending IRQs, a read on the IRQ status register will return something non zero. This should not result in the callback returning an error. Fix this by returning an error only when the result of the phy_read_mmd() is negative. Fixes: e11ef96d ("net: phy: aquantia: remove the use of .ack_interrupt()") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Tested-by: Camelia Groza <camelia.groza@nxp.com> Link: https://lore.kernel.org/r/20201109154601.3812574-1-ciorneiioana@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Alex Elder says: ==================== net: ipa: little fixes This series adds a few small fixes to the IPA code. The first patch appeared in a different form in June, and got some pushback from David because he felt a problem that can be caught at build time *should* be caught at build time. https://lore.kernel.org/netdev/20200610195332.2612233-1-elder@linaro.org/ I agree with that, but in this case the "problem" was never actually a problem. There's a little more explanation on the patch, but basically now we remove the BUILD_BUG_ON() call entirely. The second deletes a line of code that isn't needed. The third converts a warning message to be a debug, as requested by Stephen Boyd. And the last one just gets rid of an error message that would be output after a different message had already reported a problem. ==================== Link: https://lore.kernel.org/r/20201109165635.5449-1-elder@linaro.orgSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
There is no need for gsi_modem_channel_halt() to report an error, because gsi_generic_command() will already have done that if the command times out. So get rid of the extra message. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
When we determine from hardware what the size of IPA memory is we compare it against what we learned about it from DT. If DT defines a region that's larger than actual memory, we use the smaller actual size and issue a warning. If DT defines a smaller region than actual memory we issue a warning too. But in this case the difference is harmless; so rather than issuing a warning, just provide a debug message instead. Reorder these checks so the one that matters more is done first. Reported-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
Delete a spurious line of code in ipa_hardware_config(). It reads a register value then ignores the value, so is completely unnecessary. Add a missing word in a comment. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Alex Elder authored
The following call in ipa_validate_build() is erroneous: BUILD_BUG_ON(sizeof(struct gsi_trans) > 128); The fact is, it is not a bug for the size of a GSI transaction to be bigger than 128 bytes. The correct operation of the driver is not dependent on the size of this structure. The only consequence of the transaction being large is that the amount of memory required is larger. The problem this was trying to flag is that a *slight* increase in the size of this structure will have a disproportionate effect on the amount of memory used. E.g. if the structure grew to 132 bytes the memory requirement for the transaction arrays would be about double. With various debugging build flags enabled, the size grows to 160 bytes. But there's no reason to treat that as a build-time bug. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Jakub Kicinski authored
Eric Dumazet says: ==================== inet: prevent skb changes in udp{4|6}_lib_lookup_skb() This came while reviewing Alexander Lobakin patch against UDP GRO: We want to make sure skb wont be changed by these helpers while it is owned by GRO stack. ==================== Link: https://lore.kernel.org/r/20201109231349.20946-1-eric.dumazet@gmail.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Eric Dumazet authored
The skb is needed only to fetch the keys for the lookup. Both functions are used from GRO stack, we do not want accidental modification of the skb. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Alexander Lobakin <alobakin@pm.me> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Eric Dumazet authored
inet_sdif() does not modify the skb. This will permit propagating the const qualifier in udp{4|6}_lib_lookup_skb() functions. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Alexander Lobakin <alobakin@pm.me> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-
Colin Ian King authored
The left shift of u16 variable high is promoted to the type int and then sign extended to a 64 bit u64 value. If the top bit of high is set then the upper 32 bits of the result end up being set by the sign extension. Fix this by explicitly casting the value in high to a u64 before left shifting by 16 places. Also, remove the initialisation of variable value to 0 at the start of each loop iteration as the value is never read and hence the assignment it is redundant. Addresses-Coverity: ("Unintended sign extension") Fixes: e4b27ebc ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de> Link: https://lore.kernel.org/r/20201109124008.2079873-1-colin.king@canonical.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
Menglong Dong authored
Some typos are found out by misspell-fixer tool: $ misspell-fixer -rnv ./net/sched/ ./net/sched/act_api.c:686 ./net/sched/act_bpf.c:68 ./net/sched/cls_rsvp.h:241 ./net/sched/em_cmp.c:44 ./net/sched/sch_pie.c:408 Fix typos found by misspell-fixer. Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/r/5fa8e9d4.1c69fb81.5d889.5c64@mx.google.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-
- 10 Nov, 2020 1 commit
-
-
Kaixu Xia authored
Fix the following coccicheck warning: ./drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2415:5-11: Unneeded variable: "retval". Return "0" on line 2435 Reported-by: Tosk Robot <tencent_os_robot@tencent.com> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Link: https://lore.kernel.org/r/1604837580-12419-1-git-send-email-kaixuxia@tencent.comSigned-off-by: Jakub Kicinski <kuba@kernel.org>
-