* Re: [PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
From: Bjørn Mork @ 2013-01-28 14:24 UTC (permalink / raw)
To: Freddy
Cc: 'Michael Leun', netdev-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, louis-knRN6Y/kmf1NUHwG+Fw1Kw,
davem-fT/PcQaiUtIeIZ0/mPfg9Q, Support-knRN6Y/kmf1NUHwG+Fw1Kw
In-Reply-To: <010f01cdfd5c$768d4240$63a7c6c0$@asix.com.tw>
"Freddy" <freddy-knRN6Y/kmf1NUHwG+Fw1Kw@public.gmane.org> writes:
> Bjørn, I am trying to reproduce the issue mentioned by Michael and I
> have a question about submitting this driver.
>
> Should I merge this driver into asix_devices.c and asix_common.c even
> through the usb command, tx_fixup, and rx_fixup functions are totally
> different?
This is only my personal opinion and does not count as more than that,
but I would have tried to identify as many common parts as possible in
these drivers and reuse as much code as possible instead of creating
slightly different copies. That does not mean that there shouldn't be
anything different. If the framing is completely different, then it
does of course not make any sense to share tx_fixup and rx_fixup. But
my impression from looking briefly on these drivers is that a lof of the
code is very similar. I could of course be wrong...
Please note that modifying asix_common.c in this process is perfectly OK
if that is necessary. The only requirement is that you don't break
anything that used to work.
Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: Doubts about listen backlog and tcp_max_syn_backlog
From: Leandro Lucarella @ 2013-01-28 14:40 UTC (permalink / raw)
To: Vijay Subramanian
Cc: Nivedita Singhvi, Rick Jones, Eric Dumazet, netdev, linux-kernel
In-Reply-To: <CAGK4HS_2=b3gJmDeBTbSmFYk4PB2epMUQE6nkr1XMGfFgmfHvw@mail.gmail.com>
On Sun, Jan 27, 2013 at 09:21:32PM -0800, Vijay Subramanian wrote:
> > + { "ListenDrops", N_("%u SYNs to LISTEN sockets dropped"), opt_number },
> >
> > (see the file debian/patches/CVS-20081003-statistics.c_sync.patch
> > in the net-tools src)
> >
> > i.e., the netstat pkg is printing the value of the TCPEXT MIB counter
> > that's counting TCPExtListenDrops.
> >
> > Theoretically, that number should be the same as that printed by nstat,
> > as they are getting it from the same kernel stats counter. I have not
> > looked at nstat code (I actually almost always dump the counters from
> > /proc/net/{netstat + snmp} via a simple prettyprint script (will send
> > you that offline).
>
> nstat pretty much does what you describe which is to parse the
> /proc/net files(s) and print the contents. This is one advantage of
> nstat over netstat. When you add a new MIB, you do not need to update
> nstat.
Well, something seems to be broken in the nstat I have because using the
script to parse the start instead I get the the same values as with
netstat.
[2 minutes later, and after observing the values of nstat changed in the
same server]
OK, it looks like nstat is showing some transcient values, using nstat
-a I get the "absolute values of counters" (as stated in the man page).
By default it seems to print the values for the last 60 seconds, so
mistery solved.
--
Leandro Lucarella
sociomantic labs GmbH
http://www.sociomantic.com
^ permalink raw reply
* [PATCH iproute2] iplink: display the value of IFLA_PROMISCUITY
From: Nicolas Dichtel @ 2013-01-28 14:38 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
This is usefull to know the 'real' status of an interface (the flag IFF_PROMISC
is exported by the kernel only when the user set it explicitly, for example it
will not be exported when a tcpdump is running).
Note that I add a space after qlen (instead of before promiscuity) to be
coherent with the rest of the code.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
ip/ipaddress.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 5498f46..0d988ae 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -171,7 +171,7 @@ static void print_queuelen(FILE *f, struct rtattr *tb[IFLA_MAX + 1])
qlen = ifr.ifr_qlen;
}
if (qlen)
- fprintf(f, "qlen %d", qlen);
+ fprintf(f, "qlen %d ", qlen);
}
static const char *link_modes[] = {
@@ -438,6 +438,9 @@ int print_linkinfo(const struct sockaddr_nl *who,
if (filter.showqueue)
print_queuelen(fp, tb);
+ if (tb[IFLA_PROMISCUITY] && *(int*)RTA_DATA(tb[IFLA_PROMISCUITY]) > 0)
+ fprintf(fp, "promiscuity %u ", *(int*)RTA_DATA(tb[IFLA_PROMISCUITY]));
+
if (!filter.family || filter.family == AF_PACKET) {
SPRINT_BUF(b1);
fprintf(fp, "%s", _SL_);
--
1.8.0.1
^ permalink raw reply related
* [PATCH 1/1] NET: qmi_wwan: add Telit LE920 support
From: Daniele Palmas @ 2013-01-28 15:45 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Daniele Palmas
Add VID, PID and fixed interface for Telit LE920
Signed-off-by: Daniele Palmas <dnlplm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/net/usb/qmi_wwan.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 6a1ca50..e32f9a1 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -459,6 +459,7 @@ static const struct usb_device_id products[] = {
{QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */
{QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */
{QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
+ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
/* 4. Gobi 1000 devices */
{QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Re: [PATCH] SCTP: Free the per-net sysctl table on net exit. v2
From: Eric W. Biederman @ 2013-01-28 15:47 UTC (permalink / raw)
To: Martin Mokrejs; +Cc: David Miller, vyasevich, netdev, linux-sctp
In-Reply-To: <510637D8.9000305@fold.natur.cuni.cz>
Martin Mokrejs <mmokrejs@fold.natur.cuni.cz> writes:
> David Miller wrote:
>> From: ebiederm@xmission.com (Eric W. Biederman)
>> Date: Sun, 27 Jan 2013 19:25:11 -0800
>>
>>> The typo is fixed in the patch this time in addition to my test
>>> tree.
>>
>> Applied, thanks for fixing this up Eric.
>
> I did check now how come that I patched my 3.7.4 on Jan 24. Looks like
> -head or -next has different namings. For me, the original patch applied
> fine. So far I haven't hit the memleak although it happened only once to me
> before the patch.
The problem isn't that the patch doesn't apply the problem is that the
patch did not build. The naming has not changed in the git history.
> But probably I can confirm say Tested-by:.
>
> #
> -rw-r--r-- 1 root root 8435 Jan 24 17:12 /usr/src/linux-3.7.4/net/sctp/sysctl.c
> -rw-rw-r-- 1 root root 8347 Jan 21 20:45 /usr/src/linux-3.7.4/net/sctp/sysctl.c.orig
> # ls -la /usr/src/linux-3.7.4/net/sctp/sysctl.o
> -rw-r--r-- 1 root root 246144 Jan 21 22:37 /usr/src/linux-3.7.4/net/sctp/sysctl.o
> # ls -la /usr/src/linux-3.7.4/arch/x86/boot/bzImage
> -rw-r--r-- 1 root root 3794592 Jan 21 22:45 /usr/src/linux-3.7.4/arch/x86/boot/bzImage
> #
It doesn't look look like you rebuilt anything after you applied the
changes to net/sctp/sysctl.c. sysctl.o and bzImage are both 3 days older.
Eric
^ permalink raw reply
* Re: [PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
From: Michael Leun @ 2013-01-28 16:42 UTC (permalink / raw)
To: Freddy
Cc: 'Bjørn Mork', netdev-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, louis-knRN6Y/kmf1NUHwG+Fw1Kw,
davem-fT/PcQaiUtIeIZ0/mPfg9Q, Support-knRN6Y/kmf1NUHwG+Fw1Kw
In-Reply-To: <010f01cdfd5c$768d4240$63a7c6c0$@asix.com.tw>
On Mon, 28 Jan 2013 21:36:20 +0800
"Freddy" <freddy-knRN6Y/kmf1NUHwG+Fw1Kw@public.gmane.org> wrote:
> > I would vote to not accept that driver for mainline as long as this
> > issues are not fixed.
>
>
> Michael, could you give me more information about how do you test
> this driver? I have tried to reproduce the issue by using "ifconfig
> ethX mtu 1500", but I didn't confront the same issue. Thank you in
> advance for your help.
I'm very sorry, but this seems to be some mistake on my side. I would
have sworn that I had done this also with mtu 1500, but now it looks
like you have to set the mtu to at least 1519 to see the issue (likely
an typo and I actually had set it to 1600):
jill:/home/ml # ifconfig eth3 192.168.123.2/24
jill:/home/ml # ifconfig eth3
eth3 Link encap:Ethernet Hardware Adresse 00:24:9B:05:5C:E3
inet Adresse:192.168.123.2 Bcast:192.168.123.255 Maske:255.255.255.0
inet6 Adresse: fe80::224:9bff:fe05:5ce3/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1488 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 Sendewarteschlangenlänge:1000
RX bytes:0 (0.0 b) TX bytes:98 (98.0 b)
jill:/home/ml # ping 192.168.123.1
PING 192.168.123.1 (192.168.123.1) 56(84) bytes of data.
64 bytes from 192.168.123.1: icmp_seq=1 ttl=64 time=1.41 ms
64 bytes from 192.168.123.1: icmp_seq=2 ttl=64 time=0.969 ms
64 bytes from 192.168.123.1: icmp_seq=3 ttl=64 time=1.01 ms
^C
--- 192.168.123.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.969/1.131/1.412/0.199 ms
jill:/home/ml # ping -s 1491 192.168.123.1
PING 192.168.123.1 (192.168.123.1) 1491(1519) bytes of data.
1499 bytes from 192.168.123.1: icmp_seq=1 ttl=64 time=1.30 ms
1499 bytes from 192.168.123.1: icmp_seq=2 ttl=64 time=1.10 ms
1499 bytes from 192.168.123.1: icmp_seq=3 ttl=64 time=1.24 ms
^C
--- 192.168.123.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 1.109/1.218/1.306/0.086 ms
jill:/home/ml # ifconfig eth3 mtu 1519
jill:/home/ml # ping 192.168.123.1
PING 192.168.123.1 (192.168.123.1) 56(84) bytes of data.
64 bytes from 192.168.123.1: icmp_seq=1 ttl=64 time=1.11 ms
64 bytes from 192.168.123.1: icmp_seq=2 ttl=64 time=0.969 ms
^C
--- 192.168.123.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.969/1.042/1.115/0.073 ms
jill:/home/ml # ping -s 1491 192.168.123.1
PING 192.168.123.1 (192.168.123.1) 1491(1519) bytes of data.
^C
--- 192.168.123.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1000ms
jill:/home/ml # ping 192.168.123.1
PING 192.168.123.1 (192.168.123.1) 56(84) bytes of data.
^C
--- 192.168.123.1 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 4999ms
jill:/home/ml #
--
MfG,
Michael Leun
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 1/1] NET: qmi_wwan: add Telit LE920 support
From: Bjørn Mork @ 2013-01-28 16:59 UTC (permalink / raw)
To: Daniele Palmas; +Cc: Greg Kroah-Hartman, linux-usb, netdev, linux-kernel
In-Reply-To: <1359387918-2791-1-git-send-email-dnlplm@gmail.com>
Daniele Palmas <dnlplm@gmail.com> writes:
> Add VID, PID and fixed interface for Telit LE920
>
> Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
> ---
> drivers/net/usb/qmi_wwan.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
> index 6a1ca50..e32f9a1 100644
> --- a/drivers/net/usb/qmi_wwan.c
> +++ b/drivers/net/usb/qmi_wwan.c
> @@ -459,6 +459,7 @@ static const struct usb_device_id products[] = {
> {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */
> {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */
> {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
> + {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
>
> /* 4. Gobi 1000 devices */
> {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
Thanks for adding this device. But the patch doesn't apply to the
current "net" tree. Care to rebase it?
Thanks,
Bjørn
^ permalink raw reply
* RE: [PATCH] checkpatch.pl: Fix warnings on code comments
From: Allan, Bruce W @ 2013-01-28 17:17 UTC (permalink / raw)
To: David Miller, Kirsher, Jeffrey T
Cc: apw@canonical.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
In-Reply-To: <20130127.220728.634216960903942581.davem@davemloft.net>
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of David Miller
> Sent: Sunday, January 27, 2013 7:07 PM
> To: Kirsher, Jeffrey T
> Cc: apw@canonical.com; linux-kernel@vger.kernel.org;
> netdev@vger.kernel.org
> Subject: Re: [PATCH] checkpatch.pl: Fix warnings on code comments
>
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Sun, 27 Jan 2013 18:56:45 -0800
>
> > So will you be fine with cleanup patches which go through and
> > convert all the existing code comments to the desired format?
>
> Sure.
Not all Intel drivers...e1000e already conforms to the comment style :-)
Bruce.
^ permalink raw reply
* [PATCH] bonding: unset primary slave via sysfs
From: Milos Vyletel @ 2013-01-28 17:20 UTC (permalink / raw)
To: netdev; +Cc: fubar, andy, Milos Vyletel
When bonding module is loaded with primary parameter and one decides to unset
primary slave using sysfs these settings are not preserved during bond device
restart. Primary slave is only unset once and it's not remembered in
bond->params structure.
Signed-off-by: Milos Vyletel <milos.vyletel@sde.cz>
---
drivers/net/bonding/bond_sysfs.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index ef8d2a0..155f3b4 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1067,6 +1067,7 @@ static ssize_t bonding_store_primary(struct device *d,
pr_info("%s: Setting primary slave to None.\n",
bond->dev->name);
bond->primary_slave = NULL;
+ memset(bond->params.primary, 0, sizeof(bond->params.primary));
bond_select_active_slave(bond);
goto out;
}
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] checkpatch.pl: Fix warnings on code comments
From: Joe Perches @ 2013-01-28 17:30 UTC (permalink / raw)
To: Allan, Bruce W
Cc: David Miller, Kirsher, Jeffrey T, apw@canonical.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
In-Reply-To: <804857E1F29AAC47BF68C404FC60A1843ABC3058@ORSMSX102.amr.corp.intel.com>
On Mon, 2013-01-28 at 17:17 +0000, Allan, Bruce W wrote:
> David Miller Sent: Sunday, January 27, 2013 7:07 PM
> > From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > > So will you be fine with cleanup patches which go through and
> > > convert all the existing code comments to the desired format?
> > Sure.
> Not all Intel drivers...e1000e already conforms to the comment style :-)
In case anyone cares, here's a perl regex
to do network comment style conversion.
$text =~ s@/\*[ \t]*\n[ \t]*\*@/*@g;
$text =~ s@/\*([ \t]*)([^\n]+)\n[ \t]*\*/@/\*$1$2 \*/@g;
(assumes the entire file is in $text)
It creates a ~220KB diff for drivers/net/ethernet/intel/
that I won't post.
^ permalink raw reply
* Re: [PATCH V7 2/3] vhost_net: handle polling errors when setting backend
From: Michael S. Tsirkin @ 2013-01-28 17:30 UTC (permalink / raw)
To: Jason Wang; +Cc: davem, netdev, linux-kernel
In-Reply-To: <1359371119-10208-3-git-send-email-jasowang@redhat.com>
On Mon, Jan 28, 2013 at 07:05:18PM +0800, Jason Wang wrote:
> Currently, the polling errors were ignored, which can lead following issues:
>
> - vhost remove itself unconditionally from waitqueue when stopping the poll,
> this may crash the kernel since the previous attempt of starting may fail to
> add itself to the waitqueue
> - userspace may think the backend were successfully set even when the polling
> failed.
>
> Solve this by:
>
> - check poll->wqh before trying to remove from waitqueue
> - report polling errors in vhost_poll_start(), tx_poll_start(), the return value
> will be checked and returned when userspace want to set the backend
>
> After this fix, there still could be a polling failure after backend is set, it
> will addressed by the next patch.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> drivers/vhost/net.c | 27 ++++++++++++++++++---------
> drivers/vhost/vhost.c | 18 +++++++++++++++---
> drivers/vhost/vhost.h | 2 +-
> 3 files changed, 34 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> index d10ad6f..959b1cd 100644
> --- a/drivers/vhost/net.c
> +++ b/drivers/vhost/net.c
> @@ -165,12 +165,16 @@ static void tx_poll_stop(struct vhost_net *net)
> }
>
> /* Caller must have TX VQ lock */
> -static void tx_poll_start(struct vhost_net *net, struct socket *sock)
> +static int tx_poll_start(struct vhost_net *net, struct socket *sock)
> {
> + int ret;
> +
> if (unlikely(net->tx_poll_state != VHOST_NET_POLL_STOPPED))
> - return;
> - vhost_poll_start(net->poll + VHOST_NET_VQ_TX, sock->file);
> - net->tx_poll_state = VHOST_NET_POLL_STARTED;
> + return 0;
> + ret = vhost_poll_start(net->poll + VHOST_NET_VQ_TX, sock->file);
> + if (!ret)
> + net->tx_poll_state = VHOST_NET_POLL_STARTED;
> + return ret;
> }
>
> /* In case of DMA done not in order in lower device driver for some reason.
> @@ -642,20 +646,23 @@ static void vhost_net_disable_vq(struct vhost_net *n,
> vhost_poll_stop(n->poll + VHOST_NET_VQ_RX);
> }
>
> -static void vhost_net_enable_vq(struct vhost_net *n,
> +static int vhost_net_enable_vq(struct vhost_net *n,
> struct vhost_virtqueue *vq)
> {
> struct socket *sock;
> + int ret;
>
> sock = rcu_dereference_protected(vq->private_data,
> lockdep_is_held(&vq->mutex));
> if (!sock)
> - return;
> + return 0;
> if (vq == n->vqs + VHOST_NET_VQ_TX) {
> n->tx_poll_state = VHOST_NET_POLL_STOPPED;
> - tx_poll_start(n, sock);
> + ret = tx_poll_start(n, sock);
> } else
> - vhost_poll_start(n->poll + VHOST_NET_VQ_RX, sock->file);
> + ret = vhost_poll_start(n->poll + VHOST_NET_VQ_RX, sock->file);
> +
> + return ret;
> }
>
> static struct socket *vhost_net_stop_vq(struct vhost_net *n,
> @@ -833,7 +840,9 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd)
> r = vhost_init_used(vq);
> if (r)
> goto err_used;
> - vhost_net_enable_vq(n, vq);
> + r = vhost_net_enable_vq(n, vq);
> + if (r)
> + goto err_used;
>
> oldubufs = vq->ubufs;
> vq->ubufs = ubufs;
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 34389f7..9759249 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -77,26 +77,38 @@ void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> init_poll_funcptr(&poll->table, vhost_poll_func);
> poll->mask = mask;
> poll->dev = dev;
> + poll->wqh = NULL;
>
> vhost_work_init(&poll->work, fn);
> }
>
> /* Start polling a file. We add ourselves to file's wait queue. The caller must
> * keep a reference to a file until after vhost_poll_stop is called. */
> -void vhost_poll_start(struct vhost_poll *poll, struct file *file)
> +int vhost_poll_start(struct vhost_poll *poll, struct file *file)
> {
> unsigned long mask;
> + int ret = 0;
>
> mask = file->f_op->poll(file, &poll->table);
> if (mask)
> vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask);
> + if (mask & POLLERR) {
> + if (poll->wqh)
> + remove_wait_queue(poll->wqh, &poll->wait);
> + ret = -EINVAL;
> + }
> +
> + return ret;
> }
>
> /* Stop polling a file. After this function returns, it becomes safe to drop the
> * file reference. You must also flush afterwards. */
> void vhost_poll_stop(struct vhost_poll *poll)
> {
> - remove_wait_queue(poll->wqh, &poll->wait);
> + if (poll->wqh) {
> + remove_wait_queue(poll->wqh, &poll->wait);
> + poll->wqh = NULL;
> + }
> }
>
> static bool vhost_work_seq_done(struct vhost_dev *dev, struct vhost_work *work,
> @@ -792,7 +804,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
> fput(filep);
>
> if (pollstart && vq->handle_kick)
> - vhost_poll_start(&vq->poll, vq->kick);
> + r = vhost_poll_start(&vq->poll, vq->kick);
>
> mutex_unlock(&vq->mutex);
>
> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
> index 2639c58..17261e2 100644
> --- a/drivers/vhost/vhost.h
> +++ b/drivers/vhost/vhost.h
> @@ -42,7 +42,7 @@ void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work);
>
> void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> unsigned long mask, struct vhost_dev *dev);
> -void vhost_poll_start(struct vhost_poll *poll, struct file *file);
> +int vhost_poll_start(struct vhost_poll *poll, struct file *file);
> void vhost_poll_stop(struct vhost_poll *poll);
> void vhost_poll_flush(struct vhost_poll *poll);
> void vhost_poll_queue(struct vhost_poll *poll);
> --
> 1.7.1
^ permalink raw reply
* Re: [PATCH V7 3/3] tuntap: allow polling/writing/reading when detached
From: Michael S. Tsirkin @ 2013-01-28 17:31 UTC (permalink / raw)
To: Jason Wang; +Cc: davem, netdev, linux-kernel
In-Reply-To: <1359371119-10208-4-git-send-email-jasowang@redhat.com>
On Mon, Jan 28, 2013 at 07:05:19PM +0800, Jason Wang wrote:
> We forbid polling, writing and reading when the file were detached, this may
> complex the user in several cases:
>
> - when guest pass some buffers to vhost/qemu and then disable some queues,
> host/qemu needs to do its own cleanup on those buffers which is complex
> sometimes. We can do this simply by allowing a user can still write to an
> disabled queue. Write to an disabled queue will cause the packet pass to the
> kernel and read will get nothing.
> - align the polling behavior with macvtap which never fails when the queue is
> created. This can simplify the polling errors handling of its user (e.g vhost)
>
> We can simply achieve this by don't assign NULL to tfile->tun when detached.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> drivers/net/tun.c | 25 ++++++++++++++++---------
> 1 files changed, 16 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 30a7d0e..2fb19da 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -298,11 +298,12 @@ static void tun_flow_cleanup(unsigned long data)
> }
>
> static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
> - u16 queue_index)
> + struct tun_file *tfile)
> {
> struct hlist_head *head;
> struct tun_flow_entry *e;
> unsigned long delay = tun->ageing_time;
> + u16 queue_index = tfile->queue_index;
>
> if (!rxhash)
> return;
> @@ -311,7 +312,9 @@ static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
>
> rcu_read_lock();
>
> - if (tun->numqueues == 1)
> + /* We may get a very small possibility of OOO during switching, not
> + * worth to optimize.*/
> + if (tun->numqueues == 1 || tfile->detached)
> goto unlock;
>
> e = tun_flow_find(head, rxhash);
> @@ -411,21 +414,21 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
>
> tun = rtnl_dereference(tfile->tun);
>
> - if (tun) {
> + if (tun && !tfile->detached) {
> u16 index = tfile->queue_index;
> BUG_ON(index >= tun->numqueues);
> dev = tun->dev;
>
> rcu_assign_pointer(tun->tfiles[index],
> tun->tfiles[tun->numqueues - 1]);
> - rcu_assign_pointer(tfile->tun, NULL);
> ntfile = rtnl_dereference(tun->tfiles[index]);
> ntfile->queue_index = index;
>
> --tun->numqueues;
> - if (clean)
> + if (clean) {
> + rcu_assign_pointer(tfile->tun, NULL);
> sock_put(&tfile->sk);
> - else
> + } else
> tun_disable_queue(tun, tfile);
>
> synchronize_net();
> @@ -473,6 +476,10 @@ static void tun_detach_all(struct net_device *dev)
> rcu_assign_pointer(tfile->tun, NULL);
> --tun->numqueues;
> }
> + list_for_each_entry(tfile, &tun->disabled, next) {
> + wake_up_all(&tfile->wq.wait);
> + rcu_assign_pointer(tfile->tun, NULL);
> + }
> BUG_ON(tun->numqueues != 0);
>
> synchronize_net();
> @@ -503,7 +510,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file)
> goto out;
>
> err = -EINVAL;
> - if (rtnl_dereference(tfile->tun))
> + if (rtnl_dereference(tfile->tun) && !tfile->detached)
> goto out;
>
> err = -EBUSY;
> @@ -1202,7 +1209,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
> tun->dev->stats.rx_packets++;
> tun->dev->stats.rx_bytes += len;
>
> - tun_flow_update(tun, rxhash, tfile->queue_index);
> + tun_flow_update(tun, rxhash, tfile);
> return total_len;
> }
>
> @@ -1816,7 +1823,7 @@ static int tun_set_queue(struct file *file, struct ifreq *ifr)
> ret = tun_attach(tun, file);
> } else if (ifr->ifr_flags & IFF_DETACH_QUEUE) {
> tun = rtnl_dereference(tfile->tun);
> - if (!tun || !(tun->flags & TUN_TAP_MQ))
> + if (!tun || !(tun->flags & TUN_TAP_MQ) || tfile->detached)
> ret = -EINVAL;
> else
> __tun_detach(tfile, false);
> --
> 1.7.1
^ permalink raw reply
* i.Mx6Quad - eth0: tx queue full!
From: Vikram Narayanan @ 2013-01-28 17:39 UTC (permalink / raw)
To: netdev; +Cc: LAK, shawn.guo, Uwe Kleine-König, Greg Ungerer
Running the latest head <linux-2.6.git> on an i.Mx6Quad based platform
gives me the below error when flooded with ping requests.
== Start log ==
[ 2555.004031] ------------[ cut here ]------------
[ 2555.009740] WARNING: at net/sched/sch_generic.c:254 dev_watchdog+0x298/0x2b8()
[ 2555.018721] NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
[ 2555.026733] Modules linked in:
[ 2555.030598] Backtrace:
[ 2555.034252] [<800119c8>] (dump_backtrace+0x0/0x10c) from [<803b8494>] (dump_stack+0x18/0x1c)
[ 2555.044438] r6:000000fe r5:80302f64 r4:80503dd0 r3:80510e80
[ 2555.052019] [<803b847c>] (dump_stack+0x0/0x1c) from [<8001df08>] (warn_slowpath_common+0x54/0x6c)
[ 2555.062679] [<8001deb4>] (warn_slowpath_common+0x0/0x6c) from [<8001dfc4>] (warn_slowpath_fmt+0x38/0x40)
[ 2555.073936] r8:8052ebf1 r7:805040c0 r6:00000000 r5:8f9771d4 r4:8f977000
r3:00000009
[ 2555.084816] [<8001df8c>] (warn_slowpath_fmt+0x0/0x40) from [<80302f64>] (dev_watchdog+0x298/0x2b8)
[ 2555.095535] r3:8f977000 r2:8049f6d4
[ 2555.099868] [<80302ccc>] (dev_watchdog+0x0/0x2b8) from [<8002acf8>] (call_timer_fn.isra.33+0x2c/0x8c)
[ 2555.110794] [<8002accc>] (call_timer_fn.isra.33+0x0/0x8c) from [<8002af48>] (run_timer_softirq+0x1f0/0x204)
[ 2555.122240] r7:80571114 r6:805040c0 r5:00000000 r4:80570900
[ 2555.129894] [<8002ad58>] (run_timer_softirq+0x0/0x204) from [<80025750>] (__do_softirq+0xc8/0x180)
[ 2555.140599] [<80025688>] (__do_softirq+0x0/0x180) from [<80025b40>] (irq_exit+0x88/0x90)
[ 2555.150492] [<80025ab8>] (irq_exit+0x0/0x90) from [<8000ec58>] (handle_IRQ+0x44/0x98)
[ 2555.160112] r4:804ffde0 r3:00000220
[ 2555.164848] [<8000ec14>] (handle_IRQ+0x0/0x98) from [<80008540>] (gic_handle_irq+0x30/0x64)
[ 2555.174956] r6:80503f28 r5:8050a518 r4:f400010c r3:00000000
[ 2555.182694] [<80008510>] (gic_handle_irq+0x0/0x64) from [<8000df80>] (__irq_svc+0x40/0x50)
[ 2555.192737] Exception stack(0x80503f28 to 0x80503f70)
[ 2555.198639] 3f20: 8052f150 a0000093 00000000 00000000 80502000 8052ed08
[ 2555.208600] 3f40: 8050a4f4 803bfaec 8050df00 412fc09a 80502000 80503f7c 80503f80 80503f70
[ 2555.218584] 3f60: 8000eee4 8000eee8 60000013 ffffffff
[ 2555.224730] r7:80503f5c r6:ffffffff r5:60000013 r4:8000eee8
[ 2555.232292] [<8000eeb8>] (default_idle+0x0/0x38) from [<8000f0d8>] (cpu_idle+0xcc/0x114)
[ 2555.242204] [<8000f00c>] (cpu_idle+0x0/0x114) from [<803b3718>] (rest_init+0x64/0x7c)
[ 2555.251858] [<803b36b4>] (rest_init+0x0/0x7c) from [<804cc7dc>] (start_kernel+0x258/0x298)
[ 2555.261963] [<804cc584>] (start_kernel+0x0/0x298) from [<10008078>] (0x10008078)
[ 2555.271167] ---[ end trace 3d2ffb53e6fe41f3 ]---
[ 2555.277270] eth0: tx queue full!.
[ 2555.288776] eth0: tx queue full!.
[ 2555.293594] eth0: tx queue full!.
[ 2555.297944] eth0: tx queue full!.
[ 2555.302229] eth0: tx queue full!.
...... continues indefinitely and needs a reboot to recover the system.
== End log ==
i.Mx6Quad's MAC is connected to SMSC LAN88730 PHY via an MII interface.
I found a similar thread [1], but that solution didn't work for me.
Any ideas on why the fec driver is unhappy?
Thanks,
Vikram
[1] https://community.freescale.com/thread/281457
^ permalink raw reply
* RE: [net] e1000e: enable ECC on I217/I218 to catch packet buffer memory errors
From: Allan, Bruce W @ 2013-01-28 17:46 UTC (permalink / raw)
To: Kirsher, Jeffrey T, Josh Boyer
Cc: davem@davemloft.net, netdev@vger.kernel.org, gospo@redhat.com,
sassmann@redhat.com, stable@vger.kernel.org
In-Reply-To: <1359377156.2255.74.camel@jtkirshe-mobl>
> -----Original Message-----
> From: Kirsher, Jeffrey T
> Sent: Monday, January 28, 2013 4:46 AM
> To: Josh Boyer
> Cc: davem@davemloft.net; Allan, Bruce W; netdev@vger.kernel.org;
> gospo@redhat.com; sassmann@redhat.com; stable@vger.kernel.org
> Subject: Re: [net] e1000e: enable ECC on I217/I218 to catch packet buffer
> memory errors
>
> On Mon, 2013-01-28 at 07:38 -0500, Josh Boyer wrote:
> > On Mon, Jan 28, 2013 at 5:43 AM, Jeff Kirsher
> > <jeffrey.t.kirsher@intel.com> wrote:
> > > From: Bruce Allan <bruce.w.allan@intel.com>
> > >
> > > In rare instances, memory errors have been detected in the internal
> packet
> > > buffer memory on I217/I218 when stressed under certain
> environmental
> > > conditions. Enable Error Correcting Code (ECC) in hardware to catch
> both
> > > correctable and uncorrectable errors. Correctable errors will be handled
> > > by the hardware. Uncorrectable errors in the packet buffer will cause
> the
> > > packet to be received with an error indication in the buffer descriptor
> > > causing the packet to be discarded. If the uncorrectable error is in the
> > > descriptor itself, the hardware will stop and interrupt the driver
> > > indicating the error. The driver will then reset the hardware in order to
> > > clear the error and restart.
> > >
> > > Both types of errors will be accounted for in statistics counters.
> > >
> > > Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
> > > Cc: <stable@vger.kernel.org> # 3.5.x & 3.6.x
> >
> > 3.5.x is maintained by Canonical, not officially as a stable kernel (I
> > have no idea why). 3.6.x isn't maintained any longer.
> >
> > Is this applicable to 3.4.x and 3.7.x?
>
> It is applicable to 3.7.x, not sure if it applicable to 3.4.x.
Not applicable to 3.4.x (no support for I217 or I218 prior to 3.5 which was not yet EOL'ed
when I originally wrote this patch).
Bruce.
^ permalink raw reply
* Re: [PATCH 2/2] v2 GRE: Add segmentation offload for GRE
From: Ben Hutchings @ 2013-01-28 18:28 UTC (permalink / raw)
To: Pravin B Shelar; +Cc: netdev, jesse, eric.dumazet
In-Reply-To: <1359065793-1796-1-git-send-email-pshelar@nicira.com>
On Thu, 2013-01-24 at 14:16 -0800, Pravin B Shelar wrote:
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
> ---
> Fixed according to comments from Jesse and Eric.
> - Factored a MAC layer handler out of skb_gso_segment().
> - Eliminated copy operation from gre_gso_segment().
> - Refresh header pointer after pskb_may_pull().
[...]
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -307,6 +307,8 @@ enum {
> SKB_GSO_TCPV6 = 1 << 4,
>
> SKB_GSO_FCOE = 1 << 5,
> +
> + SKB_GSO_GRE = 1 << 6,
> };
>
> #if BITS_PER_LONG > 32
[...]
I think each new GSO flag must have a corresponding net device feature
flag. In that case you'll need to replace NETIF_F_GSO_RESERVED1 in
include/linux/netdev_features.h and add a name for the feature in
net/core/ethtool.c.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* [PATCH net-next] can: rework skb reserved data handling
From: Oliver Hartkopp @ 2013-01-28 18:33 UTC (permalink / raw)
To: David Miller; +Cc: Marc Kleine-Budde, Linux Netdev List
Added accessor and skb_reserve helpers for struct can_skb_priv.
Removed pointless skb_headroom() check.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Marc Kleine-Budde <mkl@pengutronix.de>
---
Hello Dave,
as suggested here's a rework fixing the two issues with the new CAN skb
private data space.
It looks really much better now. Tnx for the feedback.
Oliver
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 59ada08..f9cba41 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -512,8 +512,8 @@ struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf)
skb->pkt_type = PACKET_BROADCAST;
skb->ip_summed = CHECKSUM_UNNECESSARY;
- skb_reserve(skb, sizeof(struct can_skb_priv));
- ((struct can_skb_priv *)(skb->head))->ifindex = dev->ifindex;
+ can_skb_reserve(skb);
+ can_skb_prv(skb)->ifindex = dev->ifindex;
*cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
memset(*cf, 0, sizeof(struct can_frame));
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index e79a8d1..06b7e09 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -195,8 +195,8 @@ static void slc_bump(struct slcan *sl)
skb->pkt_type = PACKET_BROADCAST;
skb->ip_summed = CHECKSUM_UNNECESSARY;
- skb_reserve(skb, sizeof(struct can_skb_priv));
- ((struct can_skb_priv *)(skb->head))->ifindex = sl->dev->ifindex;
+ can_skb_reserve(skb);
+ can_skb_prv(skb)->ifindex = sl->dev->ifindex;
memcpy(skb_put(skb, sizeof(struct can_frame)),
&cf, sizeof(struct can_frame));
diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h
index 4b0f24d..2f0543f 100644
--- a/include/linux/can/skb.h
+++ b/include/linux/can/skb.h
@@ -32,4 +32,14 @@ struct can_skb_priv {
struct can_frame cf[0];
};
+static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb)
+{
+ return (struct can_skb_priv *)(skb->head);
+}
+
+static inline void can_skb_reserve(struct sk_buff *skb)
+{
+ skb_reserve(skb, sizeof(struct can_skb_priv));
+}
+
#endif /* CAN_SKB_H */
diff --git a/net/can/bcm.c b/net/can/bcm.c
index ccc27b9..28e12d1 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -261,8 +261,8 @@ static void bcm_can_tx(struct bcm_op *op)
if (!skb)
goto out;
- skb_reserve(skb, sizeof(struct can_skb_priv));
- ((struct can_skb_priv *)(skb->head))->ifindex = dev->ifindex;
+ can_skb_reserve(skb);
+ can_skb_prv(skb)->ifindex = dev->ifindex;
memcpy(skb_put(skb, CFSIZ), cf, CFSIZ);
@@ -1207,7 +1207,7 @@ static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk)
if (!skb)
return -ENOMEM;
- skb_reserve(skb, sizeof(struct can_skb_priv));
+ can_skb_reserve(skb);
err = memcpy_fromiovec(skb_put(skb, CFSIZ), msg->msg_iov, CFSIZ);
if (err < 0) {
@@ -1221,7 +1221,7 @@ static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk)
return -ENODEV;
}
- ((struct can_skb_priv *)(skb->head))->ifindex = dev->ifindex;
+ can_skb_prv(skb)->ifindex = dev->ifindex;
skb->dev = dev;
skb->sk = sk;
err = can_send(skb, 1); /* send with loopback */
diff --git a/net/can/gw.c b/net/can/gw.c
index acdd465..c185fcd 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -381,9 +381,7 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
/* is sending the skb back to the incoming interface not allowed? */
if (!(gwj->flags & CGW_FLAGS_CAN_IIF_TX_OK) &&
- skb_headroom(skb) == sizeof(struct can_skb_priv) &&
- (((struct can_skb_priv *)(skb->head))->ifindex ==
- gwj->dst.dev->ifindex))
+ can_skb_prv(skb)->ifindex == gwj->dst.dev->ifindex)
return;
/*
diff --git a/net/can/raw.c b/net/can/raw.c
index 5d860e8..c1764e4 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -705,8 +705,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
if (!skb)
goto put_dev;
- skb_reserve(skb, sizeof(struct can_skb_priv));
- ((struct can_skb_priv *)(skb->head))->ifindex = dev->ifindex;
+ can_skb_reserve(skb);
+ can_skb_prv(skb)->ifindex = dev->ifindex;
err = memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, size);
if (err < 0)
^ permalink raw reply related
* Re: [PATCH net-next] net: fix possible wrong checksum generation
From: Ben Hutchings @ 2013-01-28 18:35 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Pravin Shelar, David Miller, netdev, jesse
In-Reply-To: <1359182077.5222.132.camel@edumazet-glaptop>
On Fri, 2013-01-25 at 22:34 -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> Pravin Shelar mentioned that GSO could potentially generate
> wrong TX checksum if skb has fragments that are overwritten
> by the user between the checksum computation and transmit.
>
> He suggested to linearize skbs but this extra copy can be
> avoided for normal tcp skbs cooked by tcp_sendmsg().
>
> This patch introduces a new SKB_GSO_SHARED_FRAG flag, set
> in skb_shinfo(skb)->gso_type if at least one frag can be
> modified by the user.
[...]
Again, this needs a net device feature, doesn't it? net_gso_ok() should
allow hardware checksum/segmentation offload of such packets, and it
won't if there is this new GSO flag with no corresponding net device
feature.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* RE: [PATCH] mwifiex: avoid out of bounds access in mwifiex_get_common_rates.
From: Bing Zhao @ 2013-01-28 18:53 UTC (permalink / raw)
To: Cyril Roelandt, linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <1359326568-17022-1-git-send-email-tipecaml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hi Cyril,
Thanks for your patch.
> Check that the array indexes are in-bounds before accessing the rate2 and tmp
> arrays.
>
> Found with the following semantic patch:
>
> <smpl>
> @@
> identifier t;
> identifier idx;
> expression E;
> statement S;
> @@
> * for (... ; <+... t[idx] ...+> && idx < E ; ...)
> S
> </smpl>
>
> Signed-off-by: Cyril Roelandt <tipecaml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Acked-by: Bing Zhao <bzhao-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Thanks,
Bing
> ---
> drivers/net/wireless/mwifiex/join.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
> index 893d809..f0a634d 100644
> --- a/drivers/net/wireless/mwifiex/join.c
> +++ b/drivers/net/wireless/mwifiex/join.c
> @@ -157,8 +157,8 @@ static int mwifiex_get_common_rates(struct mwifiex_private *priv, u8 *rate1,
>
> memset(rate1, 0, rate1_size);
>
> - for (i = 0; rate2[i] && i < rate2_size; i++) {
> - for (j = 0; tmp[j] && j < rate1_size; j++) {
> + for (i = 0; i < rate2_size && rate2[i]; i++) {
> + for (j = 0; j < rate1_size && tmp[j]; j++) {
> /* Check common rate, excluding the bit for
> basic rate */
> if ((rate2[i] & 0x7F) == (tmp[j] & 0x7F)) {
> --
> 1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v5 31/45] blackfin/smp: Use get/put_online_cpus_atomic() to prevent CPU offline
From: Tejun Heo @ 2013-01-28 19:06 UTC (permalink / raw)
To: Bob Liu
Cc: Srivatsa S. Bhat, tglx, peterz, oleg, paulmck, rusty, mingo, akpm,
namhyung, rostedt, wangyun, xiaoguangrong, rjw, sbw, fweisbec,
linux, nikunj, linux-pm, linux-arch, linux-arm-kernel,
linuxppc-dev, netdev, linux-doc, linux-kernel
In-Reply-To: <CAA_GA1fSLNKSDTGSzHoA+j-mur85BvoSRkARq+DMfORuwrrX4Q@mail.gmail.com>
Hello, Bob.
On Mon, Jan 28, 2013 at 1:09 AM, Bob Liu <lliubbo@gmail.com> wrote:
> Thanks, will be applied to my blackfin arch tree.
I think we still have some work ahead of us to have this patchset
ready for inclusion and even then it probably would be best to route
these patches together, so probably not a very good idea to apply this
to blackfin right now.
Thanks.
--
tejun
^ permalink raw reply
* Re: i.Mx6Quad - eth0: tx queue full!
From: Troy Kisky @ 2013-01-28 19:47 UTC (permalink / raw)
To: Vikram Narayanan
Cc: netdev, Greg Ungerer, shawn.guo, LAK, Uwe Kleine-König
In-Reply-To: <5106B7EE.3040603@gmail.com>
On 1/28/2013 10:39 AM, Vikram Narayanan wrote:
> Running the latest head <linux-2.6.git> on an i.Mx6Quad based platform
> gives me the below error when flooded with ping requests.
>
> == Start log ==
> [ 2555.004031] ------------[ cut here ]------------
> [ 2555.009740] WARNING: at net/sched/sch_generic.c:254 dev_watchdog+0x298/0x2b8()
> [ 2555.018721] NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
I think the tx interrupt status bit was lost. The packets were
transmitted, but the interrupt never
happened. The controller should have been reset here, but perhaps a bug
with the reset code.
Are you using the mainline kernel, or a version Freescale's kernel.
mainline fec_restart does not reset tx_full
You can try adding
fep->tx_full = 0;
to fec_restart, though it would be better to call fec_enet_tx in fec_timeout
and skip the call to fec_restart if it returns some packets.
> [ 2555.026733] Modules linked in:
> [ 2555.030598] Backtrace:
> [ 2555.034252] [<800119c8>] (dump_backtrace+0x0/0x10c) from [<803b8494>] (dump_stack+0x18/0x1c)
> [ 2555.044438] r6:000000fe r5:80302f64 r4:80503dd0 r3:80510e80
> [ 2555.052019] [<803b847c>] (dump_stack+0x0/0x1c) from [<8001df08>] (warn_slowpath_common+0x54/0x6c)
> [ 2555.062679] [<8001deb4>] (warn_slowpath_common+0x0/0x6c) from [<8001dfc4>] (warn_slowpath_fmt+0x38/0x40)
> [ 2555.073936] r8:8052ebf1 r7:805040c0 r6:00000000 r5:8f9771d4 r4:8f977000
> r3:00000009
> [ 2555.084816] [<8001df8c>] (warn_slowpath_fmt+0x0/0x40) from [<80302f64>] (dev_watchdog+0x298/0x2b8)
> [ 2555.095535] r3:8f977000 r2:8049f6d4
> [ 2555.099868] [<80302ccc>] (dev_watchdog+0x0/0x2b8) from [<8002acf8>] (call_timer_fn.isra.33+0x2c/0x8c)
> [ 2555.110794] [<8002accc>] (call_timer_fn.isra.33+0x0/0x8c) from [<8002af48>] (run_timer_softirq+0x1f0/0x204)
> [ 2555.122240] r7:80571114 r6:805040c0 r5:00000000 r4:80570900
> [ 2555.129894] [<8002ad58>] (run_timer_softirq+0x0/0x204) from [<80025750>] (__do_softirq+0xc8/0x180)
> [ 2555.140599] [<80025688>] (__do_softirq+0x0/0x180) from [<80025b40>] (irq_exit+0x88/0x90)
> [ 2555.150492] [<80025ab8>] (irq_exit+0x0/0x90) from [<8000ec58>] (handle_IRQ+0x44/0x98)
> [ 2555.160112] r4:804ffde0 r3:00000220
> [ 2555.164848] [<8000ec14>] (handle_IRQ+0x0/0x98) from [<80008540>] (gic_handle_irq+0x30/0x64)
> [ 2555.174956] r6:80503f28 r5:8050a518 r4:f400010c r3:00000000
> [ 2555.182694] [<80008510>] (gic_handle_irq+0x0/0x64) from [<8000df80>] (__irq_svc+0x40/0x50)
> [ 2555.192737] Exception stack(0x80503f28 to 0x80503f70)
> [ 2555.198639] 3f20: 8052f150 a0000093 00000000 00000000 80502000 8052ed08
> [ 2555.208600] 3f40: 8050a4f4 803bfaec 8050df00 412fc09a 80502000 80503f7c 80503f80 80503f70
> [ 2555.218584] 3f60: 8000eee4 8000eee8 60000013 ffffffff
> [ 2555.224730] r7:80503f5c r6:ffffffff r5:60000013 r4:8000eee8
> [ 2555.232292] [<8000eeb8>] (default_idle+0x0/0x38) from [<8000f0d8>] (cpu_idle+0xcc/0x114)
> [ 2555.242204] [<8000f00c>] (cpu_idle+0x0/0x114) from [<803b3718>] (rest_init+0x64/0x7c)
> [ 2555.251858] [<803b36b4>] (rest_init+0x0/0x7c) from [<804cc7dc>] (start_kernel+0x258/0x298)
> [ 2555.261963] [<804cc584>] (start_kernel+0x0/0x298) from [<10008078>] (0x10008078)
> [ 2555.271167] ---[ end trace 3d2ffb53e6fe41f3 ]---
> [ 2555.277270] eth0: tx queue full!.
> [ 2555.288776] eth0: tx queue full!.
> [ 2555.293594] eth0: tx queue full!.
> [ 2555.297944] eth0: tx queue full!.
> [ 2555.302229] eth0: tx queue full!.
All the packet have been transmitted but the transmit queue is full, so
no more
tx interrupts can happen to replace the previously lost tx interrupt.
I've seen MII interrupts clear the TX interrupt status bit.
> ...... continues indefinitely and needs a reboot to recover the system.
> == End log ==
>
> i.Mx6Quad's MAC is connected to SMSC LAN88730 PHY via an MII interface.
>
> I found a similar thread [1], but that solution didn't work for me.
> Any ideas on why the fec driver is unhappy?
>
> Thanks,
> Vikram
>
> [1] https://community.freescale.com/thread/281457
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply
* Re: [PATCHv2] tun: fix carrier on/off status
From: Toralf Förster @ 2013-01-28 19:38 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Jason Wang, netdev, Linux Kernel, David Miller
In-Reply-To: <20130128103801.GA6648@redhat.com>
Tested-by: Toralf Förster <toralf.foerster@gmx.de>
On 01/28/2013 11:38 AM, Michael S. Tsirkin wrote:
> Commit c8d68e6be1c3b242f1c598595830890b65cea64a removed carrier off call
> from tun_detach since it's now called on queue disable and not only on
> tun close. This confuses userspace which used this flag to detect a
> free tun. To fix, put this back but under if (clean).
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> ---
>
> Changes from v1:
> Don't set carrier off unless all queues are closed.
>
> Note: didn't test in MQ mode - Jason, care checking this does the
> right thing there?
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index af372d0..06b2723 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -434,10 +434,13 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
> }
>
> if (clean) {
> - if (tun && tun->numqueues == 0 && tun->numdisabled == 0 &&
> - !(tun->flags & TUN_PERSIST))
> - if (tun->dev->reg_state == NETREG_REGISTERED)
> + if (tun && tun->numqueues == 0 && tun->numdisabled == 0) {
> + netif_carrier_off(tun->dev);
> +
> + if (!(tun->flags & TUN_PERSIST) &&
> + tun->dev->reg_state == NETREG_REGISTERED)
> unregister_netdevice(tun->dev);
> + }
>
> BUG_ON(!test_bit(SOCK_EXTERNALLY_ALLOCATED,
> &tfile->socket.flags));
> @@ -1644,10 +1647,10 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
> device_create_file(&tun->dev->dev, &dev_attr_owner) ||
> device_create_file(&tun->dev->dev, &dev_attr_group))
> pr_err("Failed to create tun sysfs files\n");
> -
> - netif_carrier_on(tun->dev);
> }
>
> + netif_carrier_on(tun->dev);
> +
> tun_debug(KERN_INFO, tun, "tun_set_iff\n");
>
> if (ifr->ifr_flags & IFF_NO_PI)
>
--
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
^ permalink raw reply
* [PATCH 0/2] Add CPSW VLAN Support
From: Mugunthan V N @ 2013-01-28 20:12 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-arm-kernel, linux-omap, Mugunthan V N
CPSW is capable of filtering VLAN packets in hardware. This patch series
implements VLAN support to CPSW driver.
This patch series is tested on net-next with AM335x EVM with ping test.
Mugunthan V N (2):
drivers: net: cpsw: Add helper functions for VLAN ALE implementation
drivers: net:ethernet: cpsw: add support for VLAN
Documentation/devicetree/bindings/net/cpsw.txt | 2 +
drivers/net/ethernet/ti/cpsw.c | 108 ++++++++++++++-
drivers/net/ethernet/ti/cpsw_ale.c | 172 +++++++++++++++++++++++-
drivers/net/ethernet/ti/cpsw_ale.h | 11 ++
include/linux/platform_data/cpsw.h | 1 +
5 files changed, 288 insertions(+), 6 deletions(-)
--
1.7.9.5
^ permalink raw reply
* [PATCH 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation
From: Mugunthan V N @ 2013-01-28 20:12 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-arm-kernel, linux-omap, Mugunthan V N
In-Reply-To: <1359403945-28585-1-git-send-email-mugunthanvnm@ti.com>
Add helper functions for VLAN ALE implementations for Add, Delete
Dump VLAN related ALE entries
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/net/ethernet/ti/cpsw_ale.c | 172 ++++++++++++++++++++++++++++++++++--
drivers/net/ethernet/ti/cpsw_ale.h | 11 +++
2 files changed, 178 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
index 0e9ccc2..0d7a60a 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.c
+++ b/drivers/net/ethernet/ti/cpsw_ale.c
@@ -148,7 +148,7 @@ static int cpsw_ale_write(struct cpsw_ale *ale, int idx, u32 *ale_entry)
return idx;
}
-static int cpsw_ale_match_addr(struct cpsw_ale *ale, u8 *addr)
+int cpsw_ale_match_addr(struct cpsw_ale *ale, u8 *addr, u16 vid)
{
u32 ale_entry[ALE_ENTRY_WORDS];
int type, idx;
@@ -160,6 +160,8 @@ static int cpsw_ale_match_addr(struct cpsw_ale *ale, u8 *addr)
type = cpsw_ale_get_entry_type(ale_entry);
if (type != ALE_TYPE_ADDR && type != ALE_TYPE_VLAN_ADDR)
continue;
+ if (cpsw_ale_get_vlan_id(ale_entry) != vid)
+ continue;
cpsw_ale_get_addr(ale_entry, entry_addr);
if (memcmp(entry_addr, addr, 6) == 0)
return idx;
@@ -167,6 +169,22 @@ static int cpsw_ale_match_addr(struct cpsw_ale *ale, u8 *addr)
return -ENOENT;
}
+int cpsw_ale_match_vlan(struct cpsw_ale *ale, u16 vid)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS];
+ int type, idx;
+
+ for (idx = 0; idx < ale->params.ale_entries; idx++) {
+ cpsw_ale_read(ale, idx, ale_entry);
+ type = cpsw_ale_get_entry_type(ale_entry);
+ if (type != ALE_TYPE_VLAN)
+ continue;
+ if (cpsw_ale_get_vlan_id(ale_entry) == vid)
+ return idx;
+ }
+ return -ENOENT;
+}
+
static int cpsw_ale_match_free(struct cpsw_ale *ale)
{
u32 ale_entry[ALE_ENTRY_WORDS];
@@ -286,7 +304,7 @@ int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port, int flags)
cpsw_ale_set_blocked(ale_entry, (flags & ALE_BLOCKED) ? 1 : 0);
cpsw_ale_set_port_num(ale_entry, port);
- idx = cpsw_ale_match_addr(ale, addr);
+ idx = cpsw_ale_match_addr(ale, addr, 0);
if (idx < 0)
idx = cpsw_ale_match_free(ale);
if (idx < 0)
@@ -303,7 +321,7 @@ int cpsw_ale_del_ucast(struct cpsw_ale *ale, u8 *addr, int port)
u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
int idx;
- idx = cpsw_ale_match_addr(ale, addr);
+ idx = cpsw_ale_match_addr(ale, addr, 0);
if (idx < 0)
return -ENOENT;
@@ -318,7 +336,7 @@ int cpsw_ale_add_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask,
u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
int idx, mask;
- idx = cpsw_ale_match_addr(ale, addr);
+ idx = cpsw_ale_match_addr(ale, addr, 0);
if (idx >= 0)
cpsw_ale_read(ale, idx, ale_entry);
@@ -347,7 +365,151 @@ int cpsw_ale_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask)
u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
int idx;
- idx = cpsw_ale_match_addr(ale, addr);
+ idx = cpsw_ale_match_addr(ale, addr, 0);
+ if (idx < 0)
+ return -EINVAL;
+
+ cpsw_ale_read(ale, idx, ale_entry);
+
+ if (port_mask)
+ cpsw_ale_set_port_mask(ale_entry, port_mask);
+ else
+ cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_FREE);
+
+ cpsw_ale_write(ale, idx, ale_entry);
+ return 0;
+}
+
+int cpsw_ale_add_vlan(struct cpsw_ale *ale, u16 vid, int port, int untag,
+ int reg_mcast, int unreg_mcast)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
+ int idx;
+
+ idx = cpsw_ale_match_vlan(ale, vid);
+ if (idx >= 0)
+ cpsw_ale_read(ale, idx, ale_entry);
+
+ cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN);
+ cpsw_ale_set_vlan_id(ale_entry, vid);
+
+ cpsw_ale_set_vlan_untag_force(ale_entry, untag);
+ cpsw_ale_set_vlan_reg_mcast(ale_entry, reg_mcast);
+ cpsw_ale_set_vlan_unreg_mcast(ale_entry, unreg_mcast);
+ cpsw_ale_set_vlan_member_list(ale_entry, port);
+
+ if (idx < 0)
+ idx = cpsw_ale_match_free(ale);
+ if (idx < 0)
+ idx = cpsw_ale_find_ageable(ale);
+ if (idx < 0)
+ return -ENOMEM;
+
+ cpsw_ale_write(ale, idx, ale_entry);
+ return 0;
+}
+
+int cpsw_ale_del_vlan(struct cpsw_ale *ale, u16 vid, int port)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
+ int idx, mask;
+
+ idx = cpsw_ale_match_vlan(ale, vid);
+ if (idx < 0)
+ return -ENOENT;
+
+ cpsw_ale_read(ale, idx, ale_entry);
+
+ mask = cpsw_ale_get_vlan_member_list(ale_entry);
+ mask &= ~port;
+ if (!mask)
+ cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_FREE);
+ else
+ cpsw_ale_set_vlan_member_list(ale_entry, mask);
+
+ cpsw_ale_write(ale, idx, ale_entry);
+ return 0;
+}
+
+int cpsw_ale_vlan_add_ucast(struct cpsw_ale *ale, u8 *addr, int port,
+ int flags, u16 vid)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
+ int idx;
+
+ cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
+ cpsw_ale_set_addr(ale_entry, addr);
+ cpsw_ale_set_ucast_type(ale_entry, ALE_UCAST_PERSISTANT);
+ cpsw_ale_set_secure(ale_entry, (flags & ALE_SECURE) ? 1 : 0);
+ cpsw_ale_set_blocked(ale_entry, (flags & ALE_BLOCKED) ? 1 : 0);
+ cpsw_ale_set_port_num(ale_entry, port);
+ cpsw_ale_set_vlan_id(ale_entry, vid);
+
+ idx = cpsw_ale_match_addr(ale, addr, vid);
+ if (idx < 0)
+ idx = cpsw_ale_match_free(ale);
+ if (idx < 0)
+ idx = cpsw_ale_find_ageable(ale);
+ if (idx < 0)
+ return -ENOMEM;
+
+ cpsw_ale_write(ale, idx, ale_entry);
+ return 0;
+}
+
+int cpsw_ale_vlan_del_ucast(struct cpsw_ale *ale, u8 *addr, int port, u16 vid)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
+ int idx;
+
+ idx = cpsw_ale_match_addr(ale, addr, vid);
+ if (idx < 0)
+ return -ENOENT;
+
+ cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_FREE);
+ cpsw_ale_write(ale, idx, ale_entry);
+ return 0;
+}
+
+int cpsw_ale_vlan_add_mcast(struct cpsw_ale *ale, u8 *addr,
+ int port_mask, u16 vid, int super, int mcast_state)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
+ int idx, mask;
+
+ idx = cpsw_ale_match_addr(ale, addr, vid);
+ if (idx >= 0)
+ cpsw_ale_read(ale, idx, ale_entry);
+
+ cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
+ cpsw_ale_set_addr(ale_entry, addr);
+ cpsw_ale_set_mcast_state(ale_entry, ALE_MCAST_FWD_2);
+ cpsw_ale_set_vlan_id(ale_entry, vid);
+ cpsw_ale_set_super(ale_entry, super);
+ cpsw_ale_set_mcast_state(ale_entry, mcast_state);
+
+ mask = cpsw_ale_get_port_mask(ale_entry);
+ port_mask |= mask;
+ cpsw_ale_set_port_mask(ale_entry, port_mask);
+
+ if (idx < 0)
+ idx = cpsw_ale_match_free(ale);
+ if (idx < 0)
+ idx = cpsw_ale_find_ageable(ale);
+ if (idx < 0)
+ return -ENOMEM;
+
+ cpsw_ale_write(ale, idx, ale_entry);
+ return 0;
+}
+
+int cpsw_ale_vlan_del_mcast(struct cpsw_ale *ale, u8 *addr,
+ int port_mask, u16 vid)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
+ int idx;
+
+ idx = cpsw_ale_match_addr(ale, addr, vid);
if (idx < 0)
return -EINVAL;
diff --git a/drivers/net/ethernet/ti/cpsw_ale.h b/drivers/net/ethernet/ti/cpsw_ale.h
index 2bd09cb..fbb0f7e 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.h
+++ b/drivers/net/ethernet/ti/cpsw_ale.h
@@ -86,6 +86,17 @@ int cpsw_ale_del_ucast(struct cpsw_ale *ale, u8 *addr, int port);
int cpsw_ale_add_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask,
int super, int mcast_state);
int cpsw_ale_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask);
+int cpsw_ale_add_vlan(struct cpsw_ale *ale, u16 vid, int port, int untag,
+ int reg_mcast, int unreg_mcast);
+int cpsw_ale_del_vlan(struct cpsw_ale *ale, u16 vid, int port);
+int cpsw_ale_vlan_add_ucast(struct cpsw_ale *ale, u8 *addr, int port,
+ int flags, u16 vid);
+int cpsw_ale_vlan_del_ucast(struct cpsw_ale *ale, u8 *addr, int port,
+ u16 vid);
+int cpsw_ale_vlan_add_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask,
+ u16 vid, int super, int mcast_state);
+int cpsw_ale_vlan_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask,
+ u16 vid);
int cpsw_ale_control_get(struct cpsw_ale *ale, int port, int control);
int cpsw_ale_control_set(struct cpsw_ale *ale, int port,
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/2] drivers: net:ethernet: cpsw: add support for VLAN
From: Mugunthan V N @ 2013-01-28 20:12 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-arm-kernel, linux-omap, Mugunthan V N
In-Reply-To: <1359403945-28585-1-git-send-email-mugunthanvnm@ti.com>
adding support for VLAN interface for cpsw.
CPSW VLAN Capability
* Can filter VLAN packets in Hardware
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
Documentation/devicetree/bindings/net/cpsw.txt | 2 +
drivers/net/ethernet/ti/cpsw.c | 108 +++++++++++++++++++++++-
include/linux/platform_data/cpsw.h | 1 +
3 files changed, 110 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index 6ddd028..99696bf 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -24,6 +24,8 @@ Required properties:
Optional properties:
- ti,hwmods : Must be "cpgmac0"
- no_bd_ram : Must be 0 or 1
+- default_vlan : Specifies Default VLAN for non tagged packets
+ ALE processing
Note: "ti,hwmods" field is used to fetch the base address and irq
resources from TI, omap hwmod data base during device registration.
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index b35e6a7..dee6951 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -32,6 +32,7 @@
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/of_device.h>
+#include <linux/if_vlan.h>
#include <linux/platform_data/cpsw.h>
@@ -72,6 +73,11 @@ do { \
dev_notice(priv->dev, format, ## __VA_ARGS__); \
} while (0)
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#define VLAN_SUPPORT
+#define CPSW_VLAN_AWARE_MODE
+#endif
+
#define ALE_ALL_PORTS 0x7
#define CPSW_MAJOR_VERSION(reg) (reg >> 8 & 0x7)
@@ -118,6 +124,14 @@ do { \
#define TX_PRIORITY_MAPPING 0x33221100
#define CPDMA_TX_PRIORITY_MAP 0x76543210
+#ifdef CPSW_VLAN_AWARE_MODE
+#define CPSW_VLAN_AWARE BIT(1)
+#define CPSW_ALE_VLAN_AWARE 1
+#else
+#define CPSW_VLAN_AWARE 0x0
+#define CPSW_ALE_VLAN_AWARE 0
+#endif
+
#define cpsw_enable_irq(priv) \
do { \
u32 i; \
@@ -607,14 +621,44 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
}
}
+#ifdef VLAN_SUPPORT
+static inline void cpsw_add_default_vlan(struct cpsw_priv *priv)
+{
+ writel(priv->data.default_vlan, &priv->host_port_regs->port_vlan);
+ if (priv->version == CPSW_VERSION_1) {
+ slave_write(&priv->slaves[0], priv->data.default_vlan,
+ CPSW1_PORT_VLAN);
+ slave_write(&priv->slaves[1], priv->data.default_vlan,
+ CPSW1_PORT_VLAN);
+ } else {
+ slave_write(&priv->slaves[0], priv->data.default_vlan,
+ CPSW2_PORT_VLAN);
+ slave_write(&priv->slaves[1], priv->data.default_vlan,
+ CPSW2_PORT_VLAN);
+ }
+ cpsw_ale_add_vlan(priv->ale, priv->data.default_vlan,
+ ALE_ALL_PORTS << priv->host_port,
+ ALE_ALL_PORTS << priv->host_port,
+ ALE_ALL_PORTS << priv->host_port, 0);
+}
+#else
+#define cpsw_add_default_vlan(priv)
+#endif
+
static void cpsw_init_host_port(struct cpsw_priv *priv)
{
+ u32 control_reg;
+
/* soft reset the controller and initialize ale */
soft_reset("cpsw", &priv->regs->soft_reset);
cpsw_ale_start(priv->ale);
/* switch to vlan unaware mode */
- cpsw_ale_control_set(priv->ale, 0, ALE_VLAN_AWARE, 0);
+ cpsw_ale_control_set(priv->ale, priv->host_port, ALE_VLAN_AWARE,
+ CPSW_ALE_VLAN_AWARE);
+ control_reg = readl(&priv->regs->control);
+ control_reg |= CPSW_VLAN_AWARE;
+ writel(control_reg, &priv->regs->control);
/* setup host port priority mapping */
__raw_writel(CPDMA_TX_PRIORITY_MAP,
@@ -650,6 +694,9 @@ static int cpsw_ndo_open(struct net_device *ndev)
cpsw_init_host_port(priv);
for_each_slave(priv, cpsw_slave_open, priv);
+ /* Add default VLAN */
+ cpsw_add_default_vlan(priv);
+
/* setup tx dma to fixed prio and zero offset */
cpdma_control_set(priv->dma, CPDMA_TX_PRIO_FIXED, 1);
cpdma_control_set(priv->dma, CPDMA_RX_BUFFER_OFFSET, 0);
@@ -933,6 +980,54 @@ static void cpsw_ndo_poll_controller(struct net_device *ndev)
}
#endif
+#ifdef VLAN_SUPPORT
+
+static inline void cpsw_add_vlan_ale_entry(struct cpsw_priv *priv,
+ unsigned short vid)
+{
+ cpsw_ale_add_vlan(priv->ale, vid, ALE_ALL_PORTS << priv->host_port,
+ 0, ALE_ALL_PORTS << priv->host_port,
+ (BIT(1) | BIT(2)) << priv->host_port);
+ cpsw_ale_vlan_add_ucast(priv->ale, priv->mac_addr,
+ priv->host_port, 0, vid);
+ cpsw_ale_vlan_add_mcast(priv->ale, priv->ndev->broadcast,
+ ALE_ALL_PORTS << priv->host_port, vid, 0, 0);
+}
+
+static int cpsw_ndo_vlan_rx_add_vid(struct net_device *ndev,
+ unsigned short vid)
+{
+ struct cpsw_priv *priv = netdev_priv(ndev);
+
+ spin_lock(&priv->lock);
+
+ dev_info(priv->dev, "Adding vlanid %d to vlan filter\n", vid);
+ cpsw_add_vlan_ale_entry(priv, vid);
+
+ spin_unlock(&priv->lock);
+ return 0;
+}
+
+static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev,
+ unsigned short vid)
+{
+ struct cpsw_priv *priv = netdev_priv(ndev);
+
+ spin_lock(&priv->lock);
+
+ dev_info(priv->dev, "removing vlanid %d from vlan filter\n", vid);
+ cpsw_ale_del_vlan(priv->ale, vid, ALE_ALL_PORTS << priv->host_port);
+ cpsw_ale_vlan_del_ucast(priv->ale, priv->mac_addr,
+ priv->host_port, vid);
+ cpsw_ale_vlan_del_mcast(priv->ale, priv->ndev->broadcast, 0, vid);
+
+ spin_unlock(&priv->lock);
+ return 0;
+}
+
+#endif /* VLAN_SUPPORT */
+
+
static const struct net_device_ops cpsw_netdev_ops = {
.ndo_open = cpsw_ndo_open,
.ndo_stop = cpsw_ndo_stop,
@@ -947,6 +1042,10 @@ static const struct net_device_ops cpsw_netdev_ops = {
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = cpsw_ndo_poll_controller,
#endif
+#ifdef VLAN_SUPPORT
+ .ndo_vlan_rx_add_vid = cpsw_ndo_vlan_rx_add_vid,
+ .ndo_vlan_rx_kill_vid = cpsw_ndo_vlan_rx_kill_vid,
+#endif
};
static void cpsw_get_drvinfo(struct net_device *ndev,
@@ -1103,6 +1202,9 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
data->mac_control = prop;
+ if (!of_property_read_u32(node, "default_vlan", &prop))
+ data->default_vlan = prop;
+
/*
* Populate all the child nodes here...
*/
@@ -1356,6 +1458,10 @@ static int cpsw_probe(struct platform_device *pdev)
k++;
}
+#ifdef VLAN_SUPPORT
+ ndev->features |= NETIF_F_HW_VLAN_FILTER;
+#endif
+
ndev->flags |= IFF_ALLMULTI; /* see cpsw_ndo_change_rx_flags() */
ndev->netdev_ops = &cpsw_netdev_ops;
diff --git a/include/linux/platform_data/cpsw.h b/include/linux/platform_data/cpsw.h
index 24368a2..e962cfd 100644
--- a/include/linux/platform_data/cpsw.h
+++ b/include/linux/platform_data/cpsw.h
@@ -35,6 +35,7 @@ struct cpsw_platform_data {
u32 bd_ram_size; /*buffer descriptor ram size */
u32 rx_descs; /* Number of Rx Descriptios */
u32 mac_control; /* Mac control register */
+ u16 default_vlan; /* Def VLAN for ALE lookup in VLAN aware mode*/
};
#endif /* __CPSW_H__ */
--
1.7.9.5
^ permalink raw reply related
* pull request: wireless-next 2013-01-28
From: John W. Linville @ 2013-01-28 20:20 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 33172 bytes --]
Dave,
Please accept this pull request intended for the 3.9 stream!
Included is an NFC pull. Samuel says:
"It brings the following goodies:
- LLCP socket timestamping (To be used e.g with the recently released nfctool
application for a more efficient skb timestamping when sniffing).
- A pretty big pn533 rework from Waldemar, preparing the driver to support
more flavours of pn533 based devices.
- HCI changes from Eric in preparation for the microread driver support.
- Some LLCP memory leak fixes, cleanups and slight improvements.
- pn544 and nfcwilink move to the devm_kzalloc API.
- An initial Secure Element (SE) API.
- An nfc.h license change from the original author, allowing non GPL
application code to safely include it."
Also included are a pair of mac80211 pulls. Johannes says:
"We found two bugs in the previous code, so I'm sending you a pull
request again this soon.
This contains two regulatory bug fixes, some of Thomas's hwsim beacon
timer work and a documentation fix from Bob."
"Another pull request for mac80211-next. This time, I have a number of
things, the patches are mostly self-explanatory. There are a few fixes
from Felix and myself, and random cleanups & improvements. The biggest
thing is the partial patchset from Marco preparing for mesh powersave."
Additionally, there are a pair of iwlwifi pulls. Johannes says:
"For iwlwifi-next, I have a few cleanups/improvements as well as a few
not very important fixes and more preparations for new devices."
"Please pull a few updates for iwlwifi. These are just some cleanups and
a debug improvement."
On top of that, there is a slew of driver updates. This includes
brcmfmac, mwifiex, ath9k, carl9170, and mwl8k as well as a handful
of others. The bcma and ssb busses get some attention as well.
Still, I don't see any big headliners here.
Also included is a pull of the wireless tree, in order to resolve
some merge conflicts.
Please let me know if there are problems!
John
P.S. This is bigger than I would like it to be. I'm sorry that I got behind!
---
The following changes since commit cef401de7be8c4e155c6746bfccf721a4fa5fab9:
net: fix possible wrong checksum generation (2013-01-28 00:27:15 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem
for you to fetch changes up to 4205e6ef4ee747aa81930537b6035086ba5f1e28:
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem (2013-01-28 14:43:00 -0500)
----------------------------------------------------------------
AceLan Kao (3):
Bluetooth: Add support for IMC Networks [13d3:3393]
Bluetooth: Add support for Foxconn / Hon Hai [0489:e04e]
Bluetooth: Add support for Foxconn / Hon Hai [0489:e056]
Alexey Khoroshilov (3):
p54pci: don't return zero on failure paths in p54p_probe()
mwl8k: don't return zero on failure paths in mwl8k_probe[_hw]()
iwlegacy: don't return zero on failure paths in il4965_pci_probe()
Amitkumar Karwar (4):
mwifiex: use correct htcapinfo for HT20 ibss network
mwifiex: update config_bands during infra association
mwifiex: correct config_bands handling for ibss network
mwifiex: correction in status codes used for association failure
Anderson Lizardo (1):
Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()
Arend van Spriel (10):
brcmsmac: use perimeter lock in add_interface() callback
brcmsmac: allow user-space setting of interface address
brcmfmac: assure USB dongle firmware is reset upon module unload
brcmfmac: define pr_fmt in one place
brcmfmac: remove rx helper function from bus interface
brcmfmac: remove brcmf_proto_hdrpull() from bus interface
brcmfmac: remove unused event related definitions
brcmfmac: cleanup netdev transmit callback
brcmfmac: remove unnecessary curly braces in dhd_attach()
nl80211: allow user-space to set address for P2P_DEVICE
Avinash Patil (7):
mwifiex: parse WMM IEs from hostapd for mwifiex AP
mwifiex: access interrupt status only while holding lock
mwifiex: add init_fw_port handler for PCIe interface
mwifiex: use pci_alloc/free_consistent APIs for PCIe
mwifiex: flush TX ring for PCIe after disconnect or bss stop
mwifiex: use map/unmap APIs in TX and RX to reduce memcpy
mwifiex: fix typo in PCIe adapter NULL check
Ben Greear (1):
mac80211: Allow disabling SGI-20
Bob Copeland (3):
mac80211: fix mesh_hwmp kerneldoc
mac80211: set NEED_TXPROCESSING for PERR frames
mac80211: add encrypt headroom to PERR frames
Chen Gang (1):
drivers/net/wireless: need consider the not '\0' terminated string.
Christian Lamparter (8):
carl9170: advertise support for TDLS
carl9170: import 1.9.7 firmware headers
carl9170: allow P2P_GO interface creation after P2P_CLIENT
carl9170: Only specify interface combinations if more than one interface is possible
carl9170: don't enable hw crypto offload, if the fw doesn't support it
carl9170: disable hw crypto for p2p networks
carl9170: remove custom NUM_TID and friends
carl9170: refactor carl9170_update_beacon
Chun-Yeow Yeoh (2):
mac80211: use short slot time in mesh for 5GHz
mac80211: allow disable power save in mesh
Cong Ding (1):
net: wireless/rtlwifi: fix uninitialized variable issue
Dan Carpenter (2):
b43: N-PHY: fix gain in b43_nphy_get_gain_ctl_workaround_ent()
prism54: bug in getting auth type
Daniel Schaal (1):
Bluetooth: Add support for GC-WB300D PCIe [04ca:3006] to ath3k.
Emmanuel Grumbach (12):
mac82011: use frame control to differentiate probe resp/beacon
iwlwifi: make the BC table layout configurable
iwlwifi: clean up code in AGG
iwlwifi: don't verify fw after download
iwlwifi: let the op_mode run a FW while in RFKILL
iwlwifi: virtualize iwl_{grab,release}_nic_access
iwlwifi: virtualize SRAM access
iwlwifi: don't treat a bool as an error code
iwlwifi: always check that grab_nic_access succeeds
iwlwifi: allow to zero SRAM
iwlwifi: audit single frames from AGG queue in RS
iwlwifi: improve the reports in TX path
Eric Lapuyade (6):
NFC: Fixed nfc core and hci unregistration and cleanup
NFC: Added error handling in event_received hci ops
NFC: Changed event_received hci ops result semantic
NFC: Fixed skb leak in tm_send() nfc and hci ops implementations
NFC: Add HCI quirks to support driver (non)standard implementations
NFC: update HCI documentation
Eytan Lifshitz (1):
iwlwifi: fix spelling and value in LED registers.
Felix Fietkau (23):
ath9k: use the devres API for allocations/mappings
ath9k_hw: use the devres API for allocations
wireless: fix regulatory HT40 allowed check
ath9k: do not link receive buffers during flush
ath9k: fix double-free bug on beacon generate failure
ath9k: remove the WARN_ON that triggers if generating a beacon fails
ath9k: add a better fix for the rx tasklet vs rx flush race
ath9k: fix rx flush handling
ath9k_hw: add tx gain tables for newer devices
ath9k: remove sc->rx.rxbuflock to fix a deadlock
ath9k: disable the tasklet before taking the PCU lock
mac80211: fix monitor mode injection
ath9k_hw: fix calibration issues on chainmask that don't include chain 0
ath9k_hw: fix chain swap setting when setting rx chainmask to 5
ath9k: allow setting arbitrary antenna masks on AR9003+
ath9k_hw: fix RF bank initialization
ath9k: stop rx after tx
ath9k: clean up processing of pending tx frames on reset
ath9k: use ath_tx_process_buffer instead of open-coding similar code
ath9k_hw: make the initval parameter to ath9k_hw_write_array const
ath9k_hw: remove ath9k_hw_ani_setup and its variables
ath9k_hw: reduce struct ar5416AniState size
ath9k_hw: remove a useless WARN_ON
Fengguang Wu (1):
ath9k_hw: ar9002_hw_spectral_scan_config() can be static
Gabor Juhos (2):
ath9k: fix column header comments for some initval arrays
rt2x00: rt2800: convert read_eeprom functions to return an int value
Geert Uytterhoeven (1):
brcmsmac: initialize morepending in brcms_b_recv()
Gustavo Padovan (1):
Bluetooth: Check if the hci connection exists in SCO shutdown
Hante Meuleman (7):
brcmfmac: do not reconfigure refill rx on 0-length packet.
brcmfmac: removed deprecated set_bitrate_mask support
brcmfmac: Use dedicated trace level for CDC.
brcmfmac: Remove unused caching dongle error.
brcmfmac: Return correct error on netdev xmit.
brcmfmac: Removing obsolete variables and inline functions.
brcmfmac: Update init code routines from interface up.
Hauke Mehrtens (7):
bcma: make bcma_find_core_unit() accessible
bcma: mips: explicit assign IRQ numbers
bcma: mips: make some info messages debug messages
bcma: mips: show also disabled IRQs
bcma: mips: remove assigned_irqs from structure
bcma: mips: rename oldirqflag to irqinitmask
bcma: fix compile error
Helmut Schaa (1):
rt2x00: Improve TX status handling for BlockAckReq frames
Jaganath Kanakkassery (1):
Bluetooth: Fix authentication if acl data comes before remote feature evt
Johannes Berg (65):
Merge remote-tracking branch 'mac80211/master' into HEAD
mac80211_hwsim: allow testing paged RX
mac80211: remove final sta_info_flush()
mac80211: warn if unexpectedly removing stations
mac80211: optimise roaming time again
mac80211: remove a bit of dead mesh code
regulatory: don't write past array when intersecting rules
regulatory: don't allocate too much memory
regulatory: clean up regdom_intersect
regulatory: clean up reg_copy_regd()
regulatory: don't test list before iterating
regulatory: simplify regulatory_hint_11d
regulatory: code cleanup
regulatory: remove useless locking on exit
regulatory: use proper enum for return values
cfg80211: remove wiphy_idx_valid
regulatory: remove BUG_ON
regulatory: simplify restore_regulatory_settings
regulatory: remove redundant isalpha() check
regulatory: remove useless warning
regulatory: simplify freq_reg_info_regd
regulatory: clarify locking rules and assertions
regulatory: remove locking from wiphy_apply_custom_regulatory
regulatory: fix reg_is_valid_request handling
regulatory: remove handling of channel bandwidth
regulatory: pass new regdomain to reset function
regulatory: use RCU to protect global and wiphy regdomains
regulatory: use RCU to protect last_request
regulatory: use IS_ERR macro family for freq_reg_info
mac80211: optimise AP stop RCU handling
cfg80211: adjacent 80+80 MHz channel segments are invalid
mac80211: fix ieee80211_ie_build_vht_cap indentation
mac80211: clean up ieee80211_quiesce
mac80211: clean up association better in suspend
mac80211: fix channel context iteration
mac80211: track enable_beacon explicitly
mac80211: reconfig bss_info_changed only if beaconing
mac80211: further simplify ieee80211_bss_info_change_notify
mac80211: assign bss_conf.bssid only once
mac80211: restrict assoc request VHT capabilities
cfg80211: move some AP code to right file
nl80211/mac80211: support full station state in AP mode
mac80211: split aggregation stop by reason
mac80211: split out aggregation TX removal
mac80211: move ieee80211_remove_tid_tx function
mac80211: split TX aggregation stop action
wireless: use __packed in ieee80211.h
mac80211: support HT notify channel width action
wireless: use __aligned
mac80211: unset peer's HT 40 MHz support if not usable
cfg80211: disallow more station changes
iwlwifi: use __packed
iwlwifi: request IRQ only once
iwlwifi: move some PCIe calls to better places
regulatory: fix uevent
regulatory: fix restore_regulatory_settings
mac80211: fix HT40 connections
iwlwifi: don't memset scalar values
iwlwifi: don't enable all interrupts on resuming
iwlwifi: simplify scheduler memory clearing
iwlwifi: enable communication with WoWLAN firmware
mac80211: fix FT roaming
mac80211: fix resume from WoWLAN
mac80211: call restart complete at wowlan resume time
mac80211: split out chandef tracing macros
John W. Linville (9):
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
Merge tag 'nfc-next-3.9-1' of git://git.kernel.org/.../sameo/nfc-next
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem
Jouni Malinen (1):
cfg80211: Allow use_mfp to be specified with the connect command
Julia Lawall (2):
NFC: nfcwilink: Use devm_kzalloc
drivers/nfc/nfcwilink.c: use devm_kzalloc
Larry Finger (1):
rtlwifi: Fix build warning introduced by commit a290593
Lauro Ramos Venancio (1):
NFC: Change nfc.h license
Luis R. Rodriguez (4):
cfg80211: do not process beacon hints if one is already queued
cfg80211: move reg_is_world_roaming()
cfg80211: move world roaming check for beacon hints
wireless: make the reg_notifier() void
Marco Porsch (5):
nl80211: add range checks to mesh parameters
mac80211: update mesh peer link counter during userspace peering
mac80211: move add_tim to subfunction
{cfg,nl,mac}80211: set beacon interval and DTIM period on mesh join
{cfg,nl}80211: mesh power mode primitives and userspace access
Nathan Hintz (8):
bcma: return the mips irq number in bcma_core_irq
bcma: update pci configuration for bcm4706/bcm4716
bcma: fix bcm4716/bcm4748 i2s irqflag
bcma: delete duplicate readl
bcma: jump to 'out' label for invalid 'func' value
bcma: don't map/unmap a subset of the PCI config space
bcma: add support for 1 and 2 byte extended config space access
bcma: use consistent case for 'hex' constants
Nishant Sarmukadam (2):
mwl8k: Disable tx_wait completion
mwl8k: Wake up queues in mwl8k_start
Piotr Haber (3):
brcmsmac: increase timer reference count for new timers only
brcmsmac: remove dead code
brcmsmac: increase timer reference count for new timers only
Rafał Miłecki (2):
ssb: add place for serial flash driver
ssb: add database of serial flash memories
Samuel Ortiz (9):
NFC: llcp: Remove the tx backlog queue
NFC: llcp: Fix Rx memory leak
NFC: pn544: Separate the core code and the i2c one into different modules
NFC: pn544: Use module_i2c_driver
NFC: pn544: Use devm_kzalloc API
NFC: Initial Secure Element API
NFC: Update pn544 documentation
NFC: Avoid memcpy on LLCP connection less Rx path
NFC: Use skb_copy_datagram_iovec
Sasha Levin (1):
wireless: mwifiex: remove unreachable paths
Sergio Cambra (1):
Bluetooth device 04ca:3008 should use ath3k
Simon Wunderlich (3):
ath9k: add spectral scan feature
ath9k: fix spectral scan endless mode on AR9002
cfg80211: check radar interface combinations
Stanislaw Gruszka (5):
rt2800: refactor RFCSR initialization
iwlegacy: add flush callback
iwlegacy: allow to enable PS
mac80211: synchronize scan off/on-channel and PS states
iwlegacy: fix IBSS cleanup
Sujith Manoharan (11):
ath9k_hw: Remove AR9485 1.0 macro
ath9k_hw: Enable calibration types in init_cal_settings
ath9k_hw: Remove TEMP_COMP_CAL
ath9k_hw: Fix calibration for AR9340
ath9k_hw: Do not enable IQ-CAL for half/quarter rates
ath9k_hw: Fix MCI init for AGC calibration
ath9k_hw: Use helper routines to simplify ar9003_hw_init_cal()
ath9k_hw: Update initvals for QCA955x
ath9k_hw: Add TempCompensation feature for AR9550
ath9k_hw: Fix radio programming for AR9550
ath9k_htc: Fix memory leak
Szymon Janc (1):
Bluetooth: Fix sending HCI commands after reset
Thierry Escande (2):
NFC: Add support for SO_TIMESTAMP LLCP socket option
NFC: pn533: Fix bad allocation size
Thomas Pedersen (4):
mac80211_hwsim: fix tsf adjustment
mac80211_hwsim: hrtimer beacon
mac80211_hwsim: fix beacon timing
mac80211_hwsim: fix beacon timestamp and mactime
Vladimir Kondratiev (1):
wireless: more 'capability info' bits
Waldemar Rymarkiewicz (28):
NFC: pn533: Remove in/out_maxlen as it is not used
NFC: pn533: Remove unused definitions
NFC: pn533: Add frame header length define
NFC: pn533: Remove pointless flags param
NFC: pn533: Add a new pn533_send_cmd_async iface
NFC: pn533: Add a new pn533_send_data_async iface
NFC: pn533: Add a new pn533_send_sync iface
NFC: pn533: Add pn533_alloc_skb for req allocation
NFC: pn533: Remove pn533_send_cmd_frame_sync
NFC: pn533: Del frame logic from TgGet/SetData cmd
NFC: pn533: Del frame logic from InJumForDep cmd
NFC: pn533: Del frame logic from Data Exchange cmd
NFC: pn533: Dump tx and rx data in debug mode
NFC: pn533: Remove frame logic from poll cmds
NFC: pn533: Fix quoted strings split across lines
NFC: pn533: Fix spacing issues
NFC: pn533: Fix open parenthesis alignment
NFC: pn533: Fix minor style issues
NFC: pn533: Remove unused pn533_send_cmd_frame_asy
NFC: pn533: Fix urb->status handling
NFC: pn533: Cleanup debug messages
NFC: pn533: Don't use out_frame in pn533_send_ack
NFC: pn533: Use skb in __pn533_send_cmd_frame_asyn
NFC: pn533: Remove deprecated dev->out_frame buff
NFC: pn533: Cleanup pn533_cmd_complete_t
NFC: pn533: Remove unused dev->wq_in_frame
NFC: pn533: Introduce ops for frame logic
NFC: pn533: Fix missing parenthesis
Yacine Belkadi (1):
{cfg,mac}80211.h: fix some kernel-doc warnings
Yogesh Ashok Powar (8):
mwl8k: Remove redundant txq_idx
mwl8k: set ack policy to normal
mwl8k: Enable support to support additional ampdu streams
mwl8k: changing mwl8k_destroy_ba prototype
mwl8k: Handle Watchdog events for the new ampdu streams
mwl8k: Handle watchdog event with highest prioriry
mwl8k: bump firmware API to 3
mwl8k: Delete ampdu streams with state AMPDU_STREAM_NEW in sta remove
Documentation/nfc/nfc-hci.txt | 129 +-
Documentation/nfc/nfc-pn544.txt | 84 +-
arch/mips/bcm47xx/serial.c | 2 +-
drivers/bcma/bcma_private.h | 2 +
drivers/bcma/driver_chipcommon.c | 2 +-
drivers/bcma/driver_mips.c | 157 +-
drivers/bcma/driver_pci_host.c | 62 +-
drivers/bcma/main.c | 4 +-
drivers/bluetooth/ath3k.c | 10 +
drivers/bluetooth/btusb.c | 5 +
drivers/net/wireless/ath/ath5k/base.c | 5 +-
drivers/net/wireless/ath/ath6kl/cfg80211.c | 16 +-
drivers/net/wireless/ath/ath9k/ahb.c | 22 +-
drivers/net/wireless/ath/ath9k/ani.c | 33 +-
drivers/net/wireless/ath/ath9k/ani.h | 8 -
drivers/net/wireless/ath/ath9k/ar5008_initvals.h | 8 +-
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 50 +-
drivers/net/wireless/ath/ath9k/ar9001_initvals.h | 4 +-
drivers/net/wireless/ath/ath9k/ar9002_hw.c | 23 +-
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 66 +-
.../net/wireless/ath/ath9k/ar9003_2p2_initvals.h | 180 +++
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 145 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 128 +-
drivers/net/wireless/ath/ath9k/ar9003_hw.c | 69 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 122 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 +-
drivers/net/wireless/ath/ath9k/ar9340_initvals.h | 100 ++
drivers/net/wireless/ath/ath9k/ar9485_initvals.h | 146 ++
.../net/wireless/ath/ath9k/ar955x_1p0_initvals.h | 132 +-
.../net/wireless/ath/ath9k/ar9580_1p0_initvals.h | 76 +
drivers/net/wireless/ath/ath9k/ath9k.h | 165 +-
drivers/net/wireless/ath/ath9k/beacon.c | 4 +-
drivers/net/wireless/ath/ath9k/debug.c | 116 +-
drivers/net/wireless/ath/ath9k/debug.h | 7 +-
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 8 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 4 +-
drivers/net/wireless/ath/ath9k/htc_hst.c | 2 +
drivers/net/wireless/ath/ath9k/hw-ops.h | 16 -
drivers/net/wireless/ath/ath9k/hw.c | 48 +-
drivers/net/wireless/ath/ath9k/hw.h | 59 +-
drivers/net/wireless/ath/ath9k/init.c | 116 +-
drivers/net/wireless/ath/ath9k/mac.h | 3 +-
drivers/net/wireless/ath/ath9k/main.c | 163 +-
drivers/net/wireless/ath/ath9k/mci.c | 7 +-
drivers/net/wireless/ath/ath9k/pci.c | 39 +-
drivers/net/wireless/ath/ath9k/recv.c | 171 ++-
drivers/net/wireless/ath/ath9k/reg.h | 7 +-
drivers/net/wireless/ath/ath9k/xmit.c | 145 +-
drivers/net/wireless/ath/carl9170/carl9170.h | 19 +-
drivers/net/wireless/ath/carl9170/fw.c | 37 +-
drivers/net/wireless/ath/carl9170/fwcmd.h | 8 +
drivers/net/wireless/ath/carl9170/hw.h | 2 +-
drivers/net/wireless/ath/carl9170/main.c | 113 +-
drivers/net/wireless/ath/carl9170/tx.c | 133 +-
drivers/net/wireless/ath/carl9170/version.h | 6 +-
drivers/net/wireless/ath/regd.c | 37 +-
drivers/net/wireless/ath/regd.h | 10 +-
drivers/net/wireless/b43/tables_nphy.c | 30 +-
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 2 -
.../net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 2 -
drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 39 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h | 19 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c | 48 +-
.../net/wireless/brcm80211/brcmfmac/dhd_common.c | 2 -
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h | 35 +-
.../net/wireless/brcm80211/brcmfmac/dhd_linux.c | 90 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 24 +-
.../net/wireless/brcm80211/brcmfmac/sdio_chip.c | 2 -
drivers/net/wireless/brcm80211/brcmfmac/usb.c | 27 +-
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 94 +-
drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 7 +-
drivers/net/wireless/brcm80211/brcmsmac/channel.c | 13 +-
.../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 14 +-
drivers/net/wireless/brcm80211/brcmsmac/main.c | 9 +-
drivers/net/wireless/brcm80211/brcmsmac/scb.h | 1 -
drivers/net/wireless/iwlegacy/3945-mac.c | 6 +-
drivers/net/wireless/iwlegacy/4965-mac.c | 10 +-
drivers/net/wireless/iwlegacy/common.c | 71 +-
drivers/net/wireless/iwlegacy/common.h | 1 +
drivers/net/wireless/iwlwifi/dvm/commands.h | 8 +-
drivers/net/wireless/iwlwifi/dvm/debugfs.c | 4 +-
drivers/net/wireless/iwlwifi/dvm/led.c | 2 +-
drivers/net/wireless/iwlwifi/dvm/mac80211.c | 20 +-
drivers/net/wireless/iwlwifi/dvm/main.c | 21 +-
drivers/net/wireless/iwlwifi/dvm/tt.c | 4 +-
drivers/net/wireless/iwlwifi/dvm/tx.c | 51 +-
drivers/net/wireless/iwlwifi/dvm/ucode.c | 96 +-
drivers/net/wireless/iwlwifi/iwl-csr.h | 4 +-
drivers/net/wireless/iwlwifi/iwl-fh.h | 4 +
drivers/net/wireless/iwlwifi/iwl-io.c | 168 +--
drivers/net/wireless/iwlwifi/iwl-io.h | 21 +-
drivers/net/wireless/iwlwifi/iwl-test.c | 53 +-
drivers/net/wireless/iwlwifi/iwl-trans.h | 99 +-
drivers/net/wireless/iwlwifi/pcie/internal.h | 8 +-
drivers/net/wireless/iwlwifi/pcie/rx.c | 14 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 309 +++-
drivers/net/wireless/iwlwifi/pcie/tx.c | 79 +-
drivers/net/wireless/libertas/cfg.c | 33 +-
drivers/net/wireless/libertas/cfg.h | 3 -
drivers/net/wireless/mac80211_hwsim.c | 177 ++-
drivers/net/wireless/mwifiex/11n.c | 4 +-
drivers/net/wireless/mwifiex/11n_aggr.c | 6 +-
drivers/net/wireless/mwifiex/cfg80211.c | 25 +-
drivers/net/wireless/mwifiex/decl.h | 18 +
drivers/net/wireless/mwifiex/fw.h | 14 +-
drivers/net/wireless/mwifiex/init.c | 6 +
drivers/net/wireless/mwifiex/ioctl.h | 3 +-
drivers/net/wireless/mwifiex/join.c | 30 +-
drivers/net/wireless/mwifiex/main.h | 6 +
drivers/net/wireless/mwifiex/pcie.c | 656 +++++---
drivers/net/wireless/mwifiex/pcie.h | 33 +-
drivers/net/wireless/mwifiex/sta_cmd.c | 10 +-
drivers/net/wireless/mwifiex/sta_ioctl.c | 14 +
drivers/net/wireless/mwifiex/txrx.c | 6 +-
drivers/net/wireless/mwifiex/uap_cmd.c | 44 +
drivers/net/wireless/mwifiex/usb.c | 30 +-
drivers/net/wireless/mwifiex/util.h | 8 +-
drivers/net/wireless/mwifiex/wmm.c | 8 +-
drivers/net/wireless/mwl8k.c | 151 +-
drivers/net/wireless/p54/p54pci.c | 7 +-
drivers/net/wireless/prism54/isl_ioctl.c | 1 +
drivers/net/wireless/ray_cs.c | 19 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 814 +++++-----
drivers/net/wireless/rt2x00/rt2800lib.h | 8 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 35 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 12 +-
drivers/net/wireless/rt2x00/rt2x00.h | 20 +
drivers/net/wireless/rt2x00/rt2x00dev.c | 101 +-
drivers/net/wireless/rt2x00/rt2x00queue.c | 47 +
drivers/net/wireless/rtlwifi/Kconfig | 4 +-
drivers/net/wireless/rtlwifi/core.c | 4 +-
drivers/net/wireless/rtlwifi/regd.c | 37 +-
drivers/net/wireless/rtlwifi/regd.h | 6 +-
drivers/net/wireless/rtlwifi/rtl8192de/trx.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192se/trx.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c | 2 +-
drivers/net/wireless/ti/wlcore/main.c | 10 +-
drivers/nfc/Kconfig | 15 +-
drivers/nfc/Makefile | 2 +-
drivers/nfc/nfcwilink.c | 10 +-
drivers/nfc/pn533.c | 1593 ++++++++++----------
drivers/nfc/pn544/Kconfig | 23 +
drivers/nfc/pn544/Makefile | 5 +-
drivers/nfc/pn544/i2c.c | 44 +-
drivers/nfc/pn544/pn544.c | 65 +-
drivers/ssb/Kconfig | 5 +
drivers/ssb/Makefile | 1 +
drivers/ssb/driver_chipcommon_sflash.c | 140 ++
drivers/ssb/driver_mipscore.c | 3 +-
drivers/ssb/ssb_private.h | 11 +
include/linux/bcma/bcma_driver_mips.h | 4 +-
include/linux/bcma/bcma_driver_pci.h | 2 +
include/linux/ieee80211.h | 100 +-
include/net/cfg80211.h | 212 ++-
include/net/mac80211.h | 112 +-
include/net/nfc/hci.h | 22 +-
include/net/nfc/nci_core.h | 1 +
include/net/nfc/nfc.h | 8 +
include/net/regulatory.h | 4 +
include/uapi/linux/nfc.h | 37 +-
include/uapi/linux/nl80211.h | 72 +-
net/bluetooth/hci_core.c | 8 -
net/bluetooth/hci_event.c | 2 +-
net/bluetooth/hidp/core.c | 2 +-
net/bluetooth/l2cap_core.c | 11 +
net/bluetooth/sco.c | 2 +-
net/mac80211/agg-tx.c | 253 ++--
net/mac80211/cfg.c | 179 ++-
net/mac80211/chan.c | 3 +-
net/mac80211/driver-ops.h | 23 +-
net/mac80211/ht.c | 33 +-
net/mac80211/ibss.c | 57 +-
net/mac80211/ieee80211_i.h | 29 +-
net/mac80211/iface.c | 38 +-
net/mac80211/main.c | 70 +-
net/mac80211/mesh.c | 35 +-
net/mac80211/mesh.h | 16 +-
net/mac80211/mesh_hwmp.c | 10 +-
net/mac80211/mesh_plink.c | 14 -
net/mac80211/mlme.c | 72 +-
net/mac80211/offchannel.c | 34 +-
net/mac80211/pm.c | 64 +-
net/mac80211/rx.c | 31 +-
net/mac80211/scan.c | 24 +-
net/mac80211/sta_info.c | 48 +-
net/mac80211/sta_info.h | 42 +-
net/mac80211/trace.h | 24 +-
net/mac80211/tx.c | 56 +-
net/mac80211/util.c | 25 +-
net/nfc/core.c | 50 +-
net/nfc/hci/command.c | 7 +-
net/nfc/hci/core.c | 57 +-
net/nfc/hci/hcp.c | 7 +
net/nfc/llcp/commands.c | 2 +
net/nfc/llcp/llcp.c | 44 +-
net/nfc/llcp/llcp.h | 1 -
net/nfc/llcp/sock.c | 22 +-
net/nfc/nci/core.c | 2 +
net/nfc/netlink.c | 1 +
net/wireless/ap.c | 62 +
net/wireless/chan.c | 4 +
net/wireless/core.c | 26 +-
net/wireless/core.h | 25 +-
net/wireless/mesh.c | 8 +
net/wireless/mlme.c | 62 -
net/wireless/nl80211.c | 268 ++--
net/wireless/reg.c | 1124 ++++++--------
net/wireless/reg.h | 7 +-
net/wireless/sme.c | 9 +-
net/wireless/util.c | 41 +-
210 files changed, 7702 insertions(+), 4987 deletions(-)
create mode 100644 drivers/nfc/pn544/Kconfig
create mode 100644 drivers/ssb/driver_chipcommon_sflash.c
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ 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