* Re: [PATCH 1/1] net: usb: asix_devices: add .reset_resume for USB PM
From: David Miller @ 2017-01-04 18:03 UTC (permalink / raw)
To: peter.chen; +Cc: robert.foss, linux-usb, netdev
In-Reply-To: <1483435340-20371-1-git-send-email-peter.chen@nxp.com>
From: Peter Chen <peter.chen@nxp.com>
Date: Tue, 3 Jan 2017 17:22:20 +0800
> The USB core may call reset_resume when it fails to resume asix device.
> And USB core can recovery this abnormal resume at low level driver,
> the same .resume at asix driver can work too. Add .reset_resume can
> avoid disconnecting after backing from system resume, and NFS can
> still be mounted after this commit.
>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH] scm: remove use CMSG{_COMPAT}_ALIGN(sizeof(struct {compat_}cmsghdr))
From: David Miller @ 2017-01-04 18:24 UTC (permalink / raw)
To: cugyly; +Cc: netdev, Linyu.Yuan
In-Reply-To: <1483447337-4976-1-git-send-email-cugyly@163.com>
From: yuan linyu <cugyly@163.com>
Date: Tue, 3 Jan 2017 20:42:17 +0800
> From: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
>
> sizeof(struct cmsghdr) and sizeof(struct compat_cmsghdr) already aligned.
> remove use CMSG_ALIGN(sizeof(struct cmsghdr)) and
> CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)) keep code consistent.
>
> Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Applied, and I added the following commit which will make sure our
analysis is accurate.
====================
[PATCH] net: Assert at build time the assumptions we make about the CMSG header.
It must always be the case that CMSG_ALIGN(sizeof(hdr)) == sizeof(hdr).
Otherwise there are missing adjustments in the various calculations
that parse and build these things.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/compat.c | 3 +++
net/socket.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/net/compat.c b/net/compat.c
index 4e27dd1..ba3ac72 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -130,6 +130,9 @@ int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk,
__kernel_size_t kcmlen, tmp;
int err = -EFAULT;
+ BUILD_BUG_ON(sizeof(struct compat_cmsghdr) !=
+ CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)));
+
kcmlen = 0;
kcmsg_base = kcmsg = (struct cmsghdr *)stackbuf;
ucmsg = CMSG_COMPAT_FIRSTHDR(kmsg);
diff --git a/net/socket.c b/net/socket.c
index 8487bf1..5f3b5a2 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1948,6 +1948,8 @@ static int ___sys_sendmsg(struct socket *sock, struct user_msghdr __user *msg,
ctl_buf = msg_sys->msg_control;
ctl_len = msg_sys->msg_controllen;
} else if (ctl_len) {
+ BUILD_BUG_ON(sizeof(struct cmsghdr) !=
+ CMSG_ALIGN(sizeof(struct cmsghdr)));
if (ctl_len > sizeof(ctl)) {
ctl_buf = sock_kmalloc(sock->sk, ctl_len, GFP_KERNEL);
if (ctl_buf == NULL)
--
2.4.11
^ permalink raw reply related
* Re: [PATCH v2 net-next 1/2] tools: psock_lib: tighten conditions checked in sock_setfilter
From: Shuah Khan @ 2017-01-04 18:15 UTC (permalink / raw)
To: Sowmini Varadhan, linux-kselftest, netdev
Cc: daniel, willemb, davem, Shuah Khan, Shuah Khan
In-Reply-To: <89e7eb1f8ce517e769ed37260d9d4ae5bef83812.1483549208.git.sowmini.varadhan@oracle.com>
Hi Sowmini,
Thanks for the patch.
On 01/04/2017 10:33 AM, Sowmini Varadhan wrote:
> The bpf_prog used in sock_setfilter() only attempts to check for
> ip pktlen, and verifies that the contents of the 80'th packet in
> the ethernet frame is 'a' or 'b'. Thus many non-udp packets
> could incorrectly pass through this filter and cause incorrect
> test results.
>
> This commit hardens the conditions checked by the filter so
> that only UDP/IPv4 packets with the matching length and test-character
> will be permitted by the filter. The filter has been cleaned up
> to explicitly use the BPF macros to make it more readable.
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> Acked-by: Willem de Bruijn <willemb@google.com>
> ---
> v2: commit comment edited based on review
>
> tools/testing/selftests/net/psock_lib.h | 28 +++++++++++++++++++++-------
> 1 files changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/tools/testing/selftests/net/psock_lib.h b/tools/testing/selftests/net/psock_lib.h
> index 24bc7ec..e62540e 100644
> --- a/tools/testing/selftests/net/psock_lib.h
> +++ b/tools/testing/selftests/net/psock_lib.h
> @@ -27,6 +27,7 @@
> #include <string.h>
> #include <arpa/inet.h>
> #include <unistd.h>
> +#include <netinet/udp.h>
>
> #define DATA_LEN 100
> #define DATA_CHAR 'a'
> @@ -40,14 +41,27 @@
>
> static __maybe_unused void sock_setfilter(int fd, int lvl, int optnum)
> {
> + uint16_t ip_len = DATA_LEN +
> + sizeof(struct iphdr) + sizeof(struct udphdr);
This following will improve readability.
uint16_t ip_len = DATA_LEN +
sizeof(struct iphdr) +
sizeof(struct udphdr);
> + /* the filter below checks for all of the following conditions that
Change the above to the following. Makes it easier to read.
/*
* the filter below checks for all of the following conditions that
> + * are based on the contents of create_payload()
> + * ether type 0x800 and
> + * ip proto udp and
> + * ip len == ip_len and
> + * udp[38] == 'a' or udp[38] == 'b'
> + */
> struct sock_filter bpf_filter[] = {
> - { 0x80, 0, 0, 0x00000000 }, /* LD pktlen */
> - { 0x35, 0, 4, DATA_LEN }, /* JGE DATA_LEN [f goto nomatch]*/
> - { 0x30, 0, 0, 0x00000050 }, /* LD ip[80] */
> - { 0x15, 1, 0, DATA_CHAR }, /* JEQ DATA_CHAR [t goto match]*/
> - { 0x15, 0, 1, DATA_CHAR_1}, /* JEQ DATA_CHAR_1 [t goto match]*/
> - { 0x06, 0, 0, 0x00000060 }, /* RET match */
> - { 0x06, 0, 0, 0x00000000 }, /* RET no match */
> + BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 12), /* LD ethertype */
> + BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, ETH_P_IP, 0, 8),
> + BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 23), /* LD ip_proto */
> + BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, IPPROTO_UDP, 0, 6),
> + BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 16), /* LD ip_len */
> + BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, ip_len, 0, 4),
> + BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 80), /* LD udp[38] */
> + BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, DATA_CHAR, 1, 0),
> + BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, DATA_CHAR_1, 0, 1),
> + BPF_STMT(BPF_RET | BPF_K, ~0), /* match */
> + BPF_STMT(BPF_RET | BPF_K, 0) /* no match */
> };
> struct sock_fprog bpf_prog;
>
>
thanks,
-- Shuah
^ permalink raw reply
* Re: [PATCH net] libcxgb: fix error check for ip6_route_output()
From: David Miller @ 2017-01-04 18:26 UTC (permalink / raw)
To: varun; +Cc: netdev, swise, indranil
In-Reply-To: <1483458948-13765-1-git-send-email-varun@chelsio.com>
From: Varun Prakash <varun@chelsio.com>
Date: Tue, 3 Jan 2017 21:25:48 +0530
> ip6_route_output() never returns NULL so
> check dst->error instead of !dst.
>
> Signed-off-by: Varun Prakash <varun@chelsio.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] LiquidIO VF: s/select/imply/ for PTP_1588_CLOCK
From: David Miller @ 2017-01-04 18:27 UTC (permalink / raw)
To: nicolas.pitre; +Cc: richardcochran, rvatsavayi, netdev
In-Reply-To: <alpine.LFD.2.20.1701031331450.21662@knanqh.ubzr>
From: Nicolas Pitre <nicolas.pitre@linaro.org>
Date: Tue, 3 Jan 2017 13:57:00 -0500 (EST)
> Fix a minor fallout from the merge of the timers and the networking
> trees. The following error may result if the PTP_1588_CLOCK
> prerequisites are not available:
>
> drivers/built-in.o: In function `ptp_clock_unregister':
> (.text+0x40e0a5): undefined reference to `pps_unregister_source'
> drivers/built-in.o: In function `ptp_clock_unregister':
> (.text+0x40e0cc): undefined reference to `posix_clock_unregister'
> drivers/built-in.o: In function `ptp_clock_event':
> (.text+0x40e249): undefined reference to `pps_event'
> drivers/built-in.o: In function `ptp_clock_register':
> (.text+0x40e5e1): undefined reference to `pps_register_source'
> drivers/built-in.o: In function `ptp_clock_register':
> (.text+0x40e62c): undefined reference to `posix_clock_register'
> drivers/built-in.o: In function `ptp_clock_register':
> (.text+0x40e68d): undefined reference to `pps_unregister_source'
>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] liquidio: remove PTP support in 23XX adapters
From: David Miller @ 2017-01-04 18:28 UTC (permalink / raw)
To: felix.manlunas; +Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla
In-Reply-To: <20170103192733.GA4979@felix.cavium.com>
From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Tue, 3 Jan 2017 11:27:33 -0800
> From: Prasad Kanneganti <prasad.kanneganti@cavium.com>
>
> liquidio driver incorrectly indicates that PTP is supported in 23XX
> adapters; this patch fixes that. PTP is supported in 66XX and 68XX
> adapters, and the driver correctly indicates that.
>
> Signed-off-by: Prasad Kanneganti <prasad.kanneganti@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next v2] net: dsa: remove out label in dsa_switch_setup_one
From: David Miller @ 2017-01-04 18:29 UTC (permalink / raw)
To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
In-Reply-To: <20170103193149.4169-1-vivien.didelot@savoirfairelinux.com>
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Tue, 3 Jan 2017 14:31:49 -0500
> The "out" label in dsa_switch_setup_one() is useless, thus remove it.
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Applied.
^ permalink raw reply
* Re: [PATCH next v1] ipvlan: assign unique dev-id for each slave device.
From: David Miller @ 2017-01-04 18:30 UTC (permalink / raw)
To: mahesh; +Cc: edumazet, netdev, maheshb
In-Reply-To: <20170103204716.9436-1-mahesh@bandewar.net>
From: Mahesh Bandewar <mahesh@bandewar.net>
Date: Tue, 3 Jan 2017 12:47:16 -0800
> From: Mahesh Bandewar <maheshb@google.com>
>
> IPvlan setup uses one mac-address (of master). The IPv6 link-local
> addresses are derived using the mac-address on the link. Lack of
> dev-ids makes these link-local addresses same for all slaves including
> that of master device. dev-ids are necessary to add differentiation
> when L2 address is shared.
>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net 0/2] net: systemport: Fix padding vs. TSB insertion
From: David Miller @ 2017-01-04 18:34 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
In-Reply-To: <20170104003449.27078-1-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 3 Jan 2017 16:34:47 -0800
> This patch series fixes how we pad the packets submitted to the SYSTEMPORT
> adapter, and how the transmit status block (prepended 8 bytes) fits in the
> picture. The first patch is not technically a bug fix, but is required for the
> second path to be applied and to greatly simplify the skb length calculation.
Series applied with the typo in the commit message of patch #2 fixed.
Happy new year.
^ permalink raw reply
* Re: [PATCH net-next] net: phy: add extension of phy-mode for XLGMII
From: David Miller @ 2017-01-04 18:42 UTC (permalink / raw)
To: Jie.Deng1; +Cc: f.fainelli, netdev, linux-kernel
In-Reply-To: <b5378ab79043fe46027756546c17e0a54df4a9f0.1483505550.git.jiedeng@synopsys.com>
From: Jie Deng <Jie.Deng1@synopsys.com>
Date: Wed, 4 Jan 2017 13:04:04 +0800
> The Synopsys DWC_xlgmac core provides a multiplexed 40-Gigabit
> Media-Independent Interface (XLGMII, an IEEE 802.3 Clause 81
> compliant reconciliation sub-layer) for communication with
> the 100/50/40/25-Gigabit PHY and 10-Gigabit Media-Independent
> Interface (XGMII, an IEEE 802.3 Clause 46 compliant reconciliation
> sub-layer) for communication with the 10-Gigabit PHY.
>
> Currently, There are only interface mode definitions for "xgmii".
> This patch adds the definitions for the PHY layer to recognize
> "xlgmii" as a valid PHY interface.
>
> Signed-off-by: Jie Deng <jiedeng@synopsys.com>
It makes no sense to add these definitions unless you also submit
uses of them alongside at the same time.
Thanks.
^ permalink raw reply
* Re: [PATCH 0/2] dpaa_eth: a couple of fixes
From: David Miller @ 2017-01-04 18:45 UTC (permalink / raw)
To: madalin.bucur; +Cc: netdev, linuxppc-dev, linux-kernel
In-Reply-To: <1483528890-8621-1-git-send-email-madalin.bucur@nxp.com>
From: Madalin Bucur <madalin.bucur@nxp.com>
Date: Wed, 4 Jan 2017 13:21:28 +0200
> Add cleanup on PHY initialization failure path, avoid using
> uninitialized memory at CGR init.
Series applied, thanks.
^ permalink raw reply
* [PATCH v3 net-next 0/2] tools: psock_tpacket bug fixes
From: Sowmini Varadhan @ 2017-01-04 18:45 UTC (permalink / raw)
To: linux-kselftest, netdev, sowmini.varadhan; +Cc: daniel, willemb, davem, shuah
This patchset includes fixes to psock_tpacket for false-negatives
sporadically reported by the test when it was run concurrently with
other heavy network traffic (e.g., over an ssh session, as opposed
to running the test from the console of the test machine). The
test sometimes failed with errors reporting more recvd packets than
expected (e.g., "walk_v0_rx: received 201 out of 100 pkts") or
the reception of non-IP packets (e.g., ARP packets).
There are 2 sources of network interference that can disrupt the test:
1. set_sockfilter() can use some hardening (currently passes up packets
based on ip length field, and payload signature but this may potentially
match other network traffic on the test machine)
2. There is a race-window between packet_create() and packet_do_bind()
in which packets from any interface (e.g., eth0) will get queued
for Rx on the test socket.
Patch 1 fixes the first issue by cleaing up set_sockfilter() and
hardening it to make sure that it only permits UDP/IPv4 packets.
Patch 2 fixes the second issue by making sure we open the PF_PACKET
socket with protocol 0 to reject all packets, and make sure the
BPF filter is set up before binding the socket to ETH_P_ALL and lo.
v2: patch 2 reworked based on review comments.
v3: Shuah Khan nit.
Sowmini Varadhan (2):
tools: psock_lib: tighten conditions checked in sock_setfilter
tools: psock_tpacket: block Rx until socket filter has been added and
socket has been bound to loopback.
tools/testing/selftests/net/psock_lib.h | 29 ++++++++++++++++++++------
tools/testing/selftests/net/psock_tpacket.c | 6 ++--
2 files changed, 25 insertions(+), 10 deletions(-)
^ permalink raw reply
* [PATCH v3 net-next 1/2] tools: psock_lib: tighten conditions checked in sock_setfilter
From: Sowmini Varadhan @ 2017-01-04 18:45 UTC (permalink / raw)
To: linux-kselftest, netdev, sowmini.varadhan; +Cc: daniel, willemb, davem, shuah
In-Reply-To: <cover.1483555162.git.sowmini.varadhan@oracle.com>
The bpf_prog used in sock_setfilter() only attempts to check for
ip pktlen, and verifies that the contents of the 80'th packet in
the ethernet frame is 'a' or 'b'. Thus many non-udp packets
could incorrectly pass through this filter and cause incorrect
test results.
This commit hardens the conditions checked by the filter so
that only UDP/IPv4 packets with the matching length and test-character
will be permitted by the filter. The filter has been cleaned up
to explicitly use the BPF macros to make it more readable.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Willem de Bruijn <willemb@google.com>
---
v2: commit comment edited based on Willem de Bruijn review
v3: Shuah Khan nit.
tools/testing/selftests/net/psock_lib.h | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/net/psock_lib.h b/tools/testing/selftests/net/psock_lib.h
index 24bc7ec..9e5553a 100644
--- a/tools/testing/selftests/net/psock_lib.h
+++ b/tools/testing/selftests/net/psock_lib.h
@@ -27,6 +27,7 @@
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
+#include <netinet/udp.h>
#define DATA_LEN 100
#define DATA_CHAR 'a'
@@ -40,14 +41,28 @@
static __maybe_unused void sock_setfilter(int fd, int lvl, int optnum)
{
+ uint16_t ip_len = DATA_LEN +
+ sizeof(struct iphdr) +
+ sizeof(struct udphdr);
+ /* the filter below checks for all of the following conditions that
+ * are based on the contents of create_payload()
+ * ether type 0x800 and
+ * ip proto udp and
+ * ip len == ip_len and
+ * udp[38] == 'a' or udp[38] == 'b'
+ */
struct sock_filter bpf_filter[] = {
- { 0x80, 0, 0, 0x00000000 }, /* LD pktlen */
- { 0x35, 0, 4, DATA_LEN }, /* JGE DATA_LEN [f goto nomatch]*/
- { 0x30, 0, 0, 0x00000050 }, /* LD ip[80] */
- { 0x15, 1, 0, DATA_CHAR }, /* JEQ DATA_CHAR [t goto match]*/
- { 0x15, 0, 1, DATA_CHAR_1}, /* JEQ DATA_CHAR_1 [t goto match]*/
- { 0x06, 0, 0, 0x00000060 }, /* RET match */
- { 0x06, 0, 0, 0x00000000 }, /* RET no match */
+ BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 12), /* LD ethertype */
+ BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, ETH_P_IP, 0, 8),
+ BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 23), /* LD ip_proto */
+ BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, IPPROTO_UDP, 0, 6),
+ BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 16), /* LD ip_len */
+ BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, ip_len, 0, 4),
+ BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 80), /* LD udp[38] */
+ BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, DATA_CHAR, 1, 0),
+ BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, DATA_CHAR_1, 0, 1),
+ BPF_STMT(BPF_RET | BPF_K, ~0), /* match */
+ BPF_STMT(BPF_RET | BPF_K, 0) /* no match */
};
struct sock_fprog bpf_prog;
--
1.7.1
^ permalink raw reply related
* [PATCH v3 net-next 2/2] tools: psock_tpacket: block Rx until socket filter has been added and socket has been bound to loopback.
From: Sowmini Varadhan @ 2017-01-04 18:45 UTC (permalink / raw)
To: linux-kselftest, netdev, sowmini.varadhan; +Cc: daniel, willemb, davem, shuah
In-Reply-To: <cover.1483555162.git.sowmini.varadhan@oracle.com>
Packets from any/all interfaces may be queued up on the PF_PACKET socket
before it is bound to the loopback interface by psock_tpacket, and
when these are passed up by the kernel, they could interfere
with the Rx tests.
Avoid interference from spurious packet by blocking Rx until the
socket filter has been set up, and the packet has been bound to the
desired (lo) interface. The effective sequence is
socket(PF_PACKET, SOCK_RAW, 0);
set up ring
Invoke SO_ATTACH_FILTER
bind to sll_protocol set to ETH_P_ALL, sll_ifindex for lo
After this sequence, the only packets that will be passed up are
those received on loopback that pass the attached filter.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
---
v2: patch reworked based on comments from Willem de Bruijn
tools/testing/selftests/net/psock_tpacket.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/psock_tpacket.c b/tools/testing/selftests/net/psock_tpacket.c
index 4a1bc64..7f6cd9f 100644
--- a/tools/testing/selftests/net/psock_tpacket.c
+++ b/tools/testing/selftests/net/psock_tpacket.c
@@ -110,7 +110,7 @@ struct block_desc {
static int pfsocket(int ver)
{
- int ret, sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ int ret, sock = socket(PF_PACKET, SOCK_RAW, 0);
if (sock == -1) {
perror("socket");
exit(1);
@@ -239,7 +239,6 @@ static void walk_v1_v2_rx(int sock, struct ring *ring)
bug_on(ring->type != PACKET_RX_RING);
pair_udp_open(udp_sock, PORT_BASE);
- pair_udp_setfilter(sock);
memset(&pfd, 0, sizeof(pfd));
pfd.fd = sock;
@@ -601,7 +600,6 @@ static void walk_v3_rx(int sock, struct ring *ring)
bug_on(ring->type != PACKET_RX_RING);
pair_udp_open(udp_sock, PORT_BASE);
- pair_udp_setfilter(sock);
memset(&pfd, 0, sizeof(pfd));
pfd.fd = sock;
@@ -741,6 +739,8 @@ static void bind_ring(int sock, struct ring *ring)
{
int ret;
+ pair_udp_setfilter(sock);
+
ring->ll.sll_family = PF_PACKET;
ring->ll.sll_protocol = htons(ETH_P_ALL);
ring->ll.sll_ifindex = if_nametoindex("lo");
--
1.7.1
^ permalink raw reply related
* Re: [PATCH net-next] net/hyperv: remove use of VLAN_TAG_PRESENT
From: Stephen Hemminger @ 2017-01-04 18:47 UTC (permalink / raw)
To: Michał Mirosław; +Cc: netdev, Haiyang Zhang, devel
In-Reply-To: <85c211f16e696607c9f61f96b8234684a2a2385b.1483487888.git.mirq-linux@rere.qmqm.pl>
On Wed, 4 Jan 2017 01:07:58 +0100 (CET)
Michał Mirosław <mirq-linux@rere.qmqm.pl> wrote:
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
I have a cleaner way of handling this in the receive path for hyperv.
Rather than passing vlan_tci, pass the vlan info
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply
* Re: [PATCH 0/2] sh_eth: E-MAC interrupt handler cleanups
From: David Miller @ 2017-01-04 18:48 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-renesas-soc
In-Reply-To: <64514012.uUvlhX0YRQ@wasted.cogentembedded.com>
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 04 Jan 2017 15:09:36 +0300
> Here's a set of 3 patches against DaveM's 'net-next.git' repo. I'm cleaning
> up the E-MAC interrupt handling with the main goal of factoring out the E-MAC
> interrupt handler into a separate function.
>
> [1/3] sh_eth: handle only enabled E-MAC interrupts
> [2/3] sh_eth: no need for *else* after *goto*
> [3/3] sh_eth: factor out sh_eth_emac_interrupt()
Series applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH net-next] net: phy: add extension of phy-mode for XLGMII
From: Florian Fainelli @ 2017-01-04 18:46 UTC (permalink / raw)
To: David Miller, Jie.Deng1; +Cc: netdev, linux-kernel
In-Reply-To: <20170104.134207.1106369954702793597.davem@davemloft.net>
On 01/04/2017 10:42 AM, David Miller wrote:
> From: Jie Deng <Jie.Deng1@synopsys.com>
> Date: Wed, 4 Jan 2017 13:04:04 +0800
>
>> The Synopsys DWC_xlgmac core provides a multiplexed 40-Gigabit
>> Media-Independent Interface (XLGMII, an IEEE 802.3 Clause 81
>> compliant reconciliation sub-layer) for communication with
>> the 100/50/40/25-Gigabit PHY and 10-Gigabit Media-Independent
>> Interface (XGMII, an IEEE 802.3 Clause 46 compliant reconciliation
>> sub-layer) for communication with the 10-Gigabit PHY.
>>
>> Currently, There are only interface mode definitions for "xgmii".
>> This patch adds the definitions for the PHY layer to recognize
>> "xlgmii" as a valid PHY interface.
>>
>> Signed-off-by: Jie Deng <jiedeng@synopsys.com>
>
> It makes no sense to add these definitions unless you also submit
> uses of them alongside at the same time.
Correct, also, this is incomplete, you must include a change to
Documentation/devicetree/bindings/net/ethernet.txt to reflect this new mode.
Thank you
--
Florian
^ permalink raw reply
* [PATCH repost net-next] dsa: mv88e6xxx: Optimise atu_get
From: Andrew Lunn @ 2017-01-04 18:56 UTC (permalink / raw)
To: David Miller
Cc: volodymyr.bendiuga, Vivien Didelot, Florian Fainelli, netdev,
Andrew Lunn
Lookup in the ATU can be performed starting from a given MAC
address. This is faster than starting with the first possible MAC
address and iterating all entries.
Entries are returned in numeric order. So if the MAC address returned
is bigger than what we are searching for, we know it is not in the
ATU.
Using the benchmark provided by Volodymyr Bendiuga
<volodymyr.bendiuga@gmail.com>,
https://www.spinics.net/lists/netdev/msg411550.html
on an Marvell Armada 370 RD, the test to add a number of static fdb
entries went from 1.616531 seconds to 0.312052 seconds.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
Cc: netdev this time.
drivers/net/dsa/mv88e6xxx/chip.c | 5 ++--
include/linux/etherdevice.h | 60 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index f7222dc6581d..4cdb0f09788b 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2023,7 +2023,8 @@ static int mv88e6xxx_atu_get(struct mv88e6xxx_chip *chip, int fid,
struct mv88e6xxx_atu_entry next;
int err;
- eth_broadcast_addr(next.mac);
+ memcpy(next.mac, addr, ETH_ALEN);
+ eth_addr_dec(next.mac);
err = _mv88e6xxx_atu_mac_write(chip, next.mac);
if (err)
@@ -2041,7 +2042,7 @@ static int mv88e6xxx_atu_get(struct mv88e6xxx_chip *chip, int fid,
*entry = next;
return 0;
}
- } while (!is_broadcast_ether_addr(next.mac));
+ } while (ether_addr_greater(addr, next.mac));
memset(entry, 0, sizeof(*entry));
entry->fid = fid;
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 6fec9e81bd70..42add77ae47d 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -397,6 +397,66 @@ static inline bool ether_addr_equal_masked(const u8 *addr1, const u8 *addr2,
}
/**
+ * ether_addr_to_u64 - Convert an Ethernet address into a u64 value.
+ * @addr: Pointer to a six-byte array containing the Ethernet address
+ *
+ * Return a u64 value of the address
+ */
+static inline u64 ether_addr_to_u64(const u8 *addr)
+{
+ u64 u = 0;
+ int i;
+
+ for (i = 0; i < ETH_ALEN; i++)
+ u = u << 8 | addr[i];
+
+ return u;
+}
+
+/**
+ * u64_to_ether_addr - Convert a u64 to an Ethernet address.
+ * @u: u64 to convert to an Ethernet MAC address
+ * @addr: Pointer to a six-byte array to contain the Ethernet address
+ */
+static inline void u64_to_ether_addr(u64 u, u8 *addr)
+{
+ int i;
+
+ for (i = ETH_ALEN - 1; i >= 0; i--) {
+ addr[i] = u & 0xff;
+ u = u >> 8;
+ }
+}
+
+/**
+ * eth_addr_dec - Decrement the given MAC address
+ *
+ * @addr: Pointer to a six-byte array containing Ethernet address to decrement
+ */
+static inline void eth_addr_dec(u8 *addr)
+{
+ u64 u = ether_addr_to_u64(addr);
+
+ u--;
+ u64_to_ether_addr(u, addr);
+}
+
+/**
+ * ether_addr_greater - Compare two Ethernet addresses
+ * @addr1: Pointer to a six-byte array containing the Ethernet address
+ * @addr2: Pointer other six-byte array containing the Ethernet address
+ *
+ * Compare two Ethernet addresses, returns true addr1 is greater than addr2
+ */
+static inline bool ether_addr_greater(const u8 *addr1, const u8 *addr2)
+{
+ u64 u1 = ether_addr_to_u64(addr1);
+ u64 u2 = ether_addr_to_u64(addr2);
+
+ return u1 > u2;
+}
+
+/**
* is_etherdev_addr - Tell if given Ethernet address belongs to the device.
* @dev: Pointer to a device structure
* @addr: Pointer to a six-byte array containing the Ethernet address
--
2.11.0
^ permalink raw reply related
* Re: [net PATCH] net: virtio: cap mtu when XDP programs are running
From: John Fastabend @ 2017-01-04 18:57 UTC (permalink / raw)
To: Jason Wang, mst; +Cc: john.r.fastabend, netdev, alexei.starovoitov, daniel
In-Reply-To: <1caf1ffc-0f46-067e-0f0d-a93b408b4ffd@redhat.com>
[...]
> On 2017年01月04日 00:48, John Fastabend wrote:
>> On 17-01-02 10:14 PM, Jason Wang wrote:
>>>
>>> On 2017年01月03日 06:30, John Fastabend wrote:
>>>> XDP programs can not consume multiple pages so we cap the MTU to
>>>> avoid this case. Virtio-net however only checks the MTU at XDP
>>>> program load and does not block MTU changes after the program
>>>> has loaded.
>>>>
>>>> This patch sets/clears the max_mtu value at XDP load/unload time.
>>>>
>>>> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
>>>> ---
[...]
>> OK so this logic is a bit too simply. When it resets the max_mtu I guess it
>> needs to read the mtu via
>>
>> virtio_cread16(vdev, ...)
>>
>> or we may break the negotiated mtu.
>
> Yes, this is a problem (even use ETH_MAX_MTU). We may need a method to notify
> the device about the mtu in this case which is not supported by virtio now.
Note this is not really a XDP specific problem. The guest can change the MTU
after init time even without XDP which I assume should ideally result in a
notification if the MTU is negotiated.
>>
>> As for capping it at GOOD_PACKET_LEN this has the nice benefit of avoiding any
>> underestimates in EWMA predictions because it appears min estimates are capped
>> at GOOD_PACKET_LEN via get_mergeable_buf_len().
>
> This seems something misunderstanding here, I meant only use GOOD_PACKET_LEN for
> small buffer (which does not use EWMA).
>
Yep I think its all cleared up now.
Thanks.
^ permalink raw reply
* Re: [RFC PATCH] virtio_net: XDP support for adjust_head
From: John Fastabend @ 2017-01-04 18:58 UTC (permalink / raw)
To: Jason Wang, mst; +Cc: john.r.fastabend, netdev, alexei.starovoitov, daniel
In-Reply-To: <73715f7a-eeeb-679f-a7b8-7b1fefe1757e@redhat.com>
[...]
>> @@ -393,34 +397,39 @@ static u32 do_xdp_prog(struct virtnet_info *vi,
>> struct bpf_prog *xdp_prog,
>> void *data, int len)
>> {
>> - int hdr_padded_len;
>> struct xdp_buff xdp;
>> - void *buf;
>> unsigned int qp;
>> u32 act;
>> +
>> if (vi->mergeable_rx_bufs) {
>> - hdr_padded_len = sizeof(struct virtio_net_hdr_mrg_rxbuf);
>> - xdp.data = data + hdr_padded_len;
>> + int desc_room = sizeof(struct virtio_net_hdr_mrg_rxbuf);
>> +
>> + /* Allow consuming headroom but reserve enough space to push
>> + * the descriptor on if we get an XDP_TX return code.
>> + */
>> + xdp.data_hard_start = data - vi->headroom + desc_room;
>> + xdp.data = data + desc_room;
>> xdp.data_end = xdp.data + (len - vi->hdr_len);
>> - buf = data;
>> } else { /* small buffers */
>> struct sk_buff *skb = data;
>> - xdp.data = skb->data;
>> + xdp.data_hard_start = skb->data;
>> + xdp.data = skb->data + vi->headroom;
>> xdp.data_end = xdp.data + len;
>> - buf = skb->data;
>> }
>> act = bpf_prog_run_xdp(xdp_prog, &xdp);
>> switch (act) {
>> case XDP_PASS:
>> + if (!vi->mergeable_rx_bufs)
>> + __skb_pull((struct sk_buff *) data,
>> + xdp.data - xdp.data_hard_start);
>
> Instead of doing things here and virtnet_xdp_xmit(). How about always making
> skb->data point to the buffer head like:
>
> 1) reserve headroom in add_recvbuf_small()
> 2) skb_push(xdp->data - xdp_data_hard_start, skb) if we detect xdp->data was
> modified afer bpf_prog_run_xdp()
>
> Then there's no special code in either XDP_PASS or XDP_TX?
>
Alternatively moving the pull into the receive_small XDP handler also
removes the special case. I'll submit a patch shortly let me know what
you think.
>> return XDP_PASS;
>> case XDP_TX:
>> qp = vi->curr_queue_pairs -
>> vi->xdp_queue_pairs +
>> smp_processor_id();
>
> [...]
>
.John
^ permalink raw reply
* Re: [PATCH v2 net-next] cxgb4: Support compressed error vector for T6
From: David Miller @ 2017-01-04 19:02 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, nirranjan, arjun, santosh, hariprasad
In-Reply-To: <1483536860-2672-1-git-send-email-ganeshgr@chelsio.com>
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Wed, 4 Jan 2017 19:04:20 +0530
> From: Arjun V <arjun@chelsio.com>
>
> t6fw-1.15.15.0 enabled compressed error vector in cpl_rx_pkt for T6.
> Updating driver to take care of these changes.
>
> Signed-off-by: Santosh Rastapur <santosh@chelsio.com>
> Signed-off-by: Arjun V <arjun@chelsio.com>
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
> ---
> v2: Fixed kbuild errors
Applied, thanks.
^ permalink raw reply
* Re: [RESEND net-next PATCH v5] net: dummy: Introduce dummy virtual functions
From: David Miller @ 2017-01-04 19:09 UTC (permalink / raw)
To: phil; +Cc: netdev, sd
In-Reply-To: <20170104134406.2720-1-phil@nwl.cc>
From: Phil Sutter <phil@nwl.cc>
Date: Wed, 4 Jan 2017 14:44:06 +0100
> The idea for this was born when testing VF support in iproute2 which was
> impeded by hardware requirements. In fact, not every VF-capable hardware
> driver implements all netdev ops, so testing the interface is still hard
> to do even with a well-sorted hardware shelf.
>
> To overcome this and allow for testing the user-kernel interface, this
> patch allows to turn dummy into a PF with a configurable amount of VFs.
>
> Due to the assumption that all PFs are PCI devices, this implementation
> is not completely straightforward: In order to allow for
> rtnl_fill_ifinfo() to see the dummy VFs, a fake PCI parent device is
> attached to the dummy netdev. This has to happen at the right spot so
> register_netdevice() does not get confused. This patch abuses
> ndo_fix_features callback for that. In ndo_uninit callback, the fake
> parent is removed again for the same purpose.
>
> Joint work with Sabrina Dubroca.
>
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
> Signed-off-by: Phil Sutter <phil@nwl.cc>
First of all I really applaud any effort to make the kernel interfaces
more testable, and less dependent upon having specific pieces of hardware.
That being said, all of this seems to be fighting the problem from the
wrong direction.
The device layer is really kidding itself by having what seems like a
generic method in the form of dev_num_vf(), which actually just tests
the bus type and calls a bus specific function on a match.
There is no reason in the world that this cannot be done via proper
device method call, that any bus type or whatever can implement.
Then you don't need any of this stuff, you just hook up the proper
device method to the dummy device and you're good.
^ permalink raw reply
* Re: [PATCH] stmmac: Enable Clause 45 PHYs in GAMC4
From: David Miller @ 2017-01-04 19:11 UTC (permalink / raw)
To: Joao.Pinto; +Cc: hock.leong.kweh, netdev
In-Reply-To: <14201d58c172f7a65b03510d36d55170f4d16cd5.1483540094.git.jpinto@synopsys.com>
From: Joao Pinto <Joao.Pinto@synopsys.com>
Date: Wed, 4 Jan 2017 14:35:26 +0000
> The eQOS IP Core (best known in stmmac as gmac4) has a register that must be
> set if using a Clause 45 PHY. If this register is not set, the PHY won't work.
> This patch will have no impact in setups using Clause 22 PHYs.
>
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
Why don't you set this bit for MDIO reads as well?
If it isn't necessary for reads, you have to explain this in your commit
message otherwise people will wonder the same thing I did when they see
that only writes are handled.
Thanks.
^ permalink raw reply
* Re: [PATCH net-next rfc 5/6] net-tc: convert tc_at to tc_at_ingress
From: Daniel Borkmann @ 2017-01-04 19:18 UTC (permalink / raw)
To: Willem de Bruijn, netdev
Cc: davem, fw, dborkman, jhs, alexei.starovoitov, Willem de Bruijn
In-Reply-To: <1482952410-50003-6-git-send-email-willemdebruijn.kernel@gmail.com>
Hi Willem,
overall I think the series looks great, thanks for working on it!
On 12/28/2016 08:13 PM, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
>
> Field tc_at is used only within tc actions to distinguish ingress from
> egress processing. A single bit is sufficient for this purpose. Set it
> within tc_classify to make the scope clear and to avoid the need to
> clear it in skb_reset_tc.
>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> ---
> include/linux/skbuff.h | 3 ++-
> include/net/sch_generic.h | 3 +--
> net/core/dev.c | 6 +-----
> net/sched/act_mirred.c | 12 ++++++------
> net/sched/sch_api.c | 1 +
> 5 files changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index f738d09..fab3f87 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -590,6 +590,7 @@ static inline bool skb_mstamp_after(const struct skb_mstamp *t1,
> * @fclone: skbuff clone status
> * @ipvs_property: skbuff is owned by ipvs
> * @tc_skip_classify: do not classify packet. set by IFB device
> + * @tc_at_ingress: used within tc_classify to distinguish in/egress
> * @peeked: this packet has been seen already, so stats have been
> * done for it, don't do them again
> * @nf_trace: netfilter packet trace flag
> @@ -751,7 +752,7 @@ struct sk_buff {
> #endif
> #ifdef CONFIG_NET_CLS_ACT
> __u8 tc_skip_classify:1;
> - __u8 tc_at:2;
> + __u8 tc_at_ingress:1;
> __u8 tc_from:2;
> #endif
>
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index f80dba5..4bd6d53 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -412,7 +412,6 @@ int skb_do_redirect(struct sk_buff *);
> static inline void skb_reset_tc(struct sk_buff *skb)
> {
> #ifdef CONFIG_NET_CLS_ACT
> - skb->tc_at = 0;
> skb->tc_from = 0;
> #endif
> }
> @@ -420,7 +419,7 @@ static inline void skb_reset_tc(struct sk_buff *skb)
> static inline bool skb_at_tc_ingress(const struct sk_buff *skb)
> {
> #ifdef CONFIG_NET_CLS_ACT
> - return skb->tc_at & AT_INGRESS;
> + return skb->tc_at_ingress;
> #else
> return false;
> #endif
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 25620cf..90833fdf 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3153,9 +3153,7 @@ sch_handle_egress(struct sk_buff *skb, int *ret, struct net_device *dev)
> if (!cl)
> return skb;
>
> - /* skb->tc_at and qdisc_skb_cb(skb)->pkt_len were already set
> - * earlier by the caller.
> - */
> + /* qdisc_skb_cb(skb)->pkt_len was already set by the caller. */
> qdisc_bstats_cpu_update(cl->q, skb);
>
> switch (tc_classify(skb, cl, &cl_res, false)) {
> @@ -3320,7 +3318,6 @@ static int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv)
>
> qdisc_pkt_len_init(skb);
> #ifdef CONFIG_NET_CLS_ACT
> - skb->tc_at = AT_EGRESS;
> # ifdef CONFIG_NET_EGRESS
> if (static_key_false(&egress_needed)) {
> skb = sch_handle_egress(skb, &rc, dev);
> @@ -3916,7 +3913,6 @@ sch_handle_ingress(struct sk_buff *skb, struct packet_type **pt_prev, int *ret,
> }
>
> qdisc_skb_cb(skb)->pkt_len = skb->len;
> - skb->tc_at = AT_INGRESS;
> qdisc_bstats_cpu_update(cl->q, skb);
>
> switch (tc_classify(skb, cl, &cl_res, false)) {
> diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
> index 8543279..e832c62 100644
> --- a/net/sched/act_mirred.c
> +++ b/net/sched/act_mirred.c
> @@ -39,15 +39,15 @@ static bool tcf_mirred_is_act_redirect(int action)
> return action == TCA_EGRESS_REDIR || action == TCA_INGRESS_REDIR;
> }
>
> -static u32 tcf_mirred_act_direction(int action)
> +static bool tcf_mirred_act_wants_ingress(int action)
> {
> switch (action) {
> case TCA_EGRESS_REDIR:
> case TCA_EGRESS_MIRROR:
> - return AT_EGRESS;
> + return false;
> case TCA_INGRESS_REDIR:
> case TCA_INGRESS_MIRROR:
> - return AT_INGRESS;
> + return true;
> default:
> BUG();
> }
> @@ -198,7 +198,7 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
> * and devices expect a mac header on xmit, then mac push/pull is
> * needed.
> */
> - if (skb->tc_at != tcf_mirred_act_direction(m_eaction) &&
> + if (skb_at_tc_ingress(skb) != tcf_mirred_act_wants_ingress(m_eaction) &&
> m_mac_header_xmit) {
> if (!skb_at_tc_ingress(skb)) {
> /* caught at egress, act ingress: pull mac */
> @@ -212,11 +212,11 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
>
> /* mirror is always swallowed */
> if (tcf_mirred_is_act_redirect(m_eaction))
> - skb2->tc_from = skb2->tc_at;
> + skb2->tc_from = skb_at_tc_ingress(skb) ? AT_INGRESS : AT_EGRESS;
>
> skb2->skb_iif = skb->dev->ifindex;
> skb2->dev = dev;
> - if (tcf_mirred_act_direction(m_eaction) & AT_EGRESS)
> + if (!tcf_mirred_act_wants_ingress(m_eaction))
> err = dev_queue_xmit(skb2);
> else
> err = netif_receive_skb(skb2);
> diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
> index ef53ede..be4e18d 100644
> --- a/net/sched/sch_api.c
> +++ b/net/sched/sch_api.c
> @@ -1865,6 +1865,7 @@ int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp,
> const struct tcf_proto *old_tp = tp;
> int limit = 0;
>
> + skb->tc_at_ingress = !!(tp && tp->q->flags & TCQ_F_INGRESS);
I'd prefer if skb->tc_at_ingress is set directly to 0/1 in sch_handle_ingress()
and __dev_queue_xmit() as we do right now, this would avoid above tests in fast
path and it would also avoid to set the same thing in tc_classify() multiple
times f.e. on egress path walking through multiple qdiscs. I don't see anything
in layers above tc that would read it and expect an AT_STACK-like equivalent.
skb_reset_tc() could thus still remain as you have above in fast-path like
__netif_receive_skb_core().
> reclassify:
> #endif
> for (; tp; tp = rcu_dereference_bh(tp->next)) {
>
Thanks,
Daniel
^ permalink raw reply
* [PATCH] sh_eth: fix EESIPR values for SH77{34|63}
From: Sergei Shtylyov @ 2017-01-04 19:18 UTC (permalink / raw)
To: netdev, linux-renesas-soc
As the SH77{34|63} manuals are freely available, I've checked the EESIPR
values written against the manuals, and they appeared to set the reserved
bits 11-15 (which should be 0 on write). Fix those EESIPR values.
Fixes: 380af9e390ec ("net: sh_eth: CPU dependency code collect to "struct sh_eth_cpu_data"")
Fixes: f5d12767c8fd ("sh_eth: get SH77{34|63} support out of #ifdef")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
This patch is against DaveM's 'net.git' repo.
drivers/net/ethernet/renesas/sh_eth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: net/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net/drivers/net/ethernet/renesas/sh_eth.c
@@ -802,7 +802,7 @@ static struct sh_eth_cpu_data sh7734_dat
.ecsr_value = ECSR_ICD | ECSR_MPD,
.ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
- .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
+ .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003f07ff,
.tx_check = EESR_TC1 | EESR_FTC,
.eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
@@ -831,7 +831,7 @@ static struct sh_eth_cpu_data sh7763_dat
.ecsr_value = ECSR_ICD | ECSR_MPD,
.ecsipr_value = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
- .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
+ .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003f07ff,
.tx_check = EESR_TC1 | EESR_FTC,
.eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox