* [PATCH net-next 2/5] be2net: Add code to display nic speeds other than 1Gbps/10Gbps
From: Ajit Khaparde @ 2011-04-19 22:10 UTC (permalink / raw)
To: davem; +Cc: netdev
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
drivers/net/benet/be_ethtool.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index 22523b9..33c2bec 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -384,12 +384,21 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
ecmd->speed = link_speed*10;
} else {
switch (mac_speed) {
+ case PHY_LINK_SPEED_10MBPS:
+ ecmd->speed = SPEED_10;
+ break;
+ case PHY_LINK_SPEED_100MBPS:
+ ecmd->speed = SPEED_100;
+ break;
case PHY_LINK_SPEED_1GBPS:
ecmd->speed = SPEED_1000;
break;
case PHY_LINK_SPEED_10GBPS:
ecmd->speed = SPEED_10000;
break;
+ case PHY_LINK_SPEED_ZERO:
+ ecmd->speed = 0;
+ break;
}
}
--
1.7.1
^ permalink raw reply related
* [PATCH net-next 1/5] be2net: allow register dump only for PFs
From: Ajit Khaparde @ 2011-04-19 22:10 UTC (permalink / raw)
To: davem; +Cc: netdev
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
drivers/net/benet/be_ethtool.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index 28716a6..22523b9 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -161,7 +161,9 @@ be_get_reg_len(struct net_device *netdev)
struct be_adapter *adapter = netdev_priv(netdev);
u32 log_size = 0;
- be_cmd_get_reg_len(adapter, &log_size);
+ if (be_physfn(adapter))
+ be_cmd_get_reg_len(adapter, &log_size);
+
return log_size;
}
@@ -170,8 +172,10 @@ be_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *buf)
{
struct be_adapter *adapter = netdev_priv(netdev);
- memset(buf, 0, regs->len);
- be_cmd_get_regs(adapter, regs->len, buf);
+ if (be_physfn(adapter)) {
+ memset(buf, 0, regs->len);
+ be_cmd_get_regs(adapter, regs->len, buf);
+ }
}
static int
--
1.7.1
^ permalink raw reply related
* [PATCH net-next 0/5] be2net: allow register dump only for PFs
From: Ajit Khaparde @ 2011-04-19 22:10 UTC (permalink / raw)
To: davem; +Cc: netdev
Series of 5 patches against net-next-2.6
Please apply.
Thanks
-Ajit
[1/5] allow register dump only for PFs
[2/5] Add code to display nic speeds other than 1Gbps/10Gbps
[3/5] fix be_mcc_compl_process to identify eth_get_stat command
[4/5] pass domain id to be_cmd_link_status_query
[5/5] add code to display default value of tx rate for VFs
^ permalink raw reply
* Re: [PATCH 1/3] IPVS: Change of socket usage to enable name space exit.
From: Simon Horman @ 2011-04-19 22:11 UTC (permalink / raw)
To: Hans Schillstrom
Cc: ja, ebiederm, lvs-devel, netdev, netfilter-devel,
hans.schillstrom
In-Reply-To: <1303226705-29178-1-git-send-email-hans@schillstrom.com>
On Tue, Apr 19, 2011 at 05:25:03PM +0200, Hans Schillstrom wrote:
> This is the first patch in a series of three.
> The cleanup doesn't work when not exit in a clean way by using ipvsadm.
> Killing of a namespace causes a hanging ipvs, this series will cure that.
>
> If the sync daemons run in a namespace while it crashes
> or get killed, there is no way to stop them except for a reboot.
>
> Kernel threads should not increment the use count of a socket.
> By calling sk_change_net() after creating a socket this is avoided.
> sock_release cant be used, instead sk_release_kernel() should be used.
>
> Thanks to Eric W Biederman.
>
> This patch is based on net-next-2.6 ver 2.6.39-rc2
Thanks Hans and Eric.
Is it only this 1st patch that is intended for 2.6.39?
The entire series feels a bit long to be applied
this late in the rc series.
In any case, I'll hold off for comment from Eric and Julian
before pushing any of these patches anywhere.
> Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
> ---
> net/netfilter/ipvs/ip_vs_sync.c | 28 +++++++++++++++++++---------
> 1 files changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
> index 3e7961e..3f87555 100644
> --- a/net/netfilter/ipvs/ip_vs_sync.c
> +++ b/net/netfilter/ipvs/ip_vs_sync.c
> @@ -1309,7 +1309,12 @@ static struct socket *make_send_sock(struct net *net)
> pr_err("Error during creation of socket; terminating\n");
> return ERR_PTR(result);
> }
> -
> + /*
> + * Kernel sockets that are a part of a namespace, should not
> + * hold a reference to a namespace in order to allow to stop it.
> + * After sk_change_net should be released using sk_release_kernel.
> + */
> + sk_change_net(sock->sk, net);
> result = set_mcast_if(sock->sk, ipvs->master_mcast_ifn);
> if (result < 0) {
> pr_err("Error setting outbound mcast interface\n");
> @@ -1334,8 +1339,8 @@ static struct socket *make_send_sock(struct net *net)
>
> return sock;
>
> - error:
> - sock_release(sock);
> +error:
> + sk_release_kernel(sock->sk);
> return ERR_PTR(result);
> }
>
> @@ -1355,7 +1360,12 @@ static struct socket *make_receive_sock(struct net *net)
> pr_err("Error during creation of socket; terminating\n");
> return ERR_PTR(result);
> }
> -
> + /*
> + * Kernel sockets that are a part of a namespace, should not
> + * hold a reference to a namespace in order to allow to stop it.
> + * After sk_change_net should be released using sk_release_kernel.
> + */
> + sk_change_net(sock->sk, net);
> /* it is equivalent to the REUSEADDR option in user-space */
> sock->sk->sk_reuse = 1;
>
> @@ -1377,8 +1387,8 @@ static struct socket *make_receive_sock(struct net *net)
>
> return sock;
>
> - error:
> - sock_release(sock);
> +error:
> + sk_release_kernel(sock->sk);
> return ERR_PTR(result);
> }
>
> @@ -1473,7 +1483,7 @@ static int sync_thread_master(void *data)
> ip_vs_sync_buff_release(sb);
>
> /* release the sending multicast socket */
> - sock_release(tinfo->sock);
> + sk_release_kernel(tinfo->sock->sk);
> kfree(tinfo);
>
> return 0;
> @@ -1513,7 +1523,7 @@ static int sync_thread_backup(void *data)
> }
>
> /* release the sending multicast socket */
> - sock_release(tinfo->sock);
> + sk_release_kernel(tinfo->sock->sk);
> kfree(tinfo->buf);
> kfree(tinfo);
>
> @@ -1601,7 +1611,7 @@ outtinfo:
> outbuf:
> kfree(buf);
> outsocket:
> - sock_release(sock);
> + sk_release_kernel(sock->sk);
> out:
> return result;
> }
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* winner
From: Microsoft @ 2011-04-20 5:57 UTC (permalink / raw)
You have won 500.000 GBP
send your phone number
and address
^ permalink raw reply
* Re: [Bugme-new] [Bug 33502] New: Caught 64-bit read from uninitialized memory in __alloc_skb
From: Christoph Lameter @ 2011-04-19 21:18 UTC (permalink / raw)
To: Eric Dumazet
Cc: Andrew Morton, netdev, bugzilla-daemon, bugme-daemon,
casteyde.christian, Vegard Nossum, Pekka Enberg
In-Reply-To: <1303244270.2756.3.camel@edumazet-laptop>
On Tue, 19 Apr 2011, Eric Dumazet wrote:
> > Ugg.. Isnt there some way to indicate to kmemcheck that a speculative
> > access is occurring?
>
> Yes, here is a totally untested patch (only compiled here), to keep
> kmemcheck & cmpxchg_double together.
Ok looks somewhat saner. Why does DEBUG_PAGEALLOC need this? Pages are
never freed as long as a page is frozen and a page needs to be frozen to
be allocated from. I dont see how we could reference a free page.
^ permalink raw reply
* Re: [PATCH] net: batman-adv: remove rx_csum ethtool_ops
From: Sven Eckelmann @ 2011-04-19 20:51 UTC (permalink / raw)
To: Michał Mirosław,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
Cc: netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20110419104320.0675D1389B-CoA6ZxLDdyEEUmgCuDUIdw@public.gmane.org>
[-- Attachment #1: Type: Text/Plain, Size: 144 bytes --]
Michał Mirosław wrote:
> Signed-off-by: Michał Mirosław <mirq-linux-CoA6ZxLDdyEEUmgCuDUIdw@public.gmane.org>
Applied
thanks,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2011-04-19 20:44 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
It's the all new Linux networking, now with less OOPS:
1) inetpeer tree traversal uses an on-stack stack, which is fine, but
when we miss and end up creating a new entry we can trigger into
the tree cleanup code which will allocate yet another one of these
stacks on the stack.
Several reported crashes are believed to be caused by this.
Fix by sharing the stack state between these two code paths, from
Eric Dumazet.
2) igmp_max_memberships has real meaning even when CONFIG_IP_MULTICAST
is not set, so do not use that config knob to control whether the
sysctl for it is available or not. Fix from Joakim Tjernlund.
3) Fix double skb free in connector, from Patrick McHardy.
4) sis900 and natsemi forget to store permanent mac address, fix from
Otavio Salvador.
5) irda_sendmsg() has locking imbalance, fix from Dave Jones.
6) ieee802154 has bogus cflags overrides in it's makefile, causes build
issues of various sorts (reported by Dave Jones). Just kill them.
7) We properly disable TSO when scatter-gather is disabled for a device,
but we forget to handle TSO6 too.
Similarly, when both TSO features are turned off it makes no sense
to have TSO_ECN turned on.
Fixes from Ben Hutchings.
8) SCTP oops fixes wrt retransmits and transport references to retrans
paths, from Wei Yongjun.
9) ipset bug fixes from Jozsef Kadlecsik. Dumping order was wrong, and
entry reclaim was buggy.
10) OF layer conversion of mpc5xxx_can driver broke the build, fix
from Anatolij Gustschin.
11) qlcnic and netxen have fragment handling issues causing deadlocks,
fixes from Amit Kumar Salecha.
12) CAIF needs to use list_for_each_entry_safe() in cfmuxl_ctrlcmd() since
the loop removes nodes. Fix from Sjur Brændeland.
13) Length check is busted, and assumes linear SKBs, in llc_fixup_skb().
Fixes bugzilla #32872
14) sfc driver fixes from Ben Hutchings, loopback self-tests leave
TX queues active, and online self-test had unintended side effects.
15) Comment and log message typo fixes from Weiping Pan.
16) Fix some more cases of IP option parsing when coming out of a
bridge, from Eric Dumazet. Also, make ip_options_compile()
resilient to packets with no attached route.
17) FLAG_POINTTOPOINT and FLAG_MULTI_PACKET overlap in usbnet layer,
oops. Fix from Huajun Li.
18) RX path memory leak in ban driver, from Debashis Dutt.
19) Allowing VLAN over loopback causes crashes, particularly in ipv6
routing, simply disallow this. From Krishna Kumar.
20) Revert TCP bind() change that causes regressions for various
programs, such as haproxy and amavisd. Fixes kernel bugzilla 32832.
Please pull, thanks a lot!
The following changes since commit f0e615c3cb72b42191b558c130409335812621d8:
Linux 2.6.39-rc4 (2011-04-18 21:26:00 -0700)
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
Amit Kumar Salecha (1):
qlcnic: limit skb frags for non tso packet
Anatolij Gustschin (1):
net: can: mscan: fix build breakage in mpc5xxx_can
Ben Hutchings (3):
sfc: Do not use efx_process_channel_now() in online self-test
net: Disable all TSO features when SG is disabled
net: Disable NETIF_F_TSO_ECN when TSO is disabled
Brian Cavagnolo (1):
mwl8k: do not free unrequested irq
Christian Lamparter (1):
ath: add missing regdomain pair 0x5c mapping
Dave Jones (1):
irda: fix locking unbalance in irda_sendmsg
David S. Miller (7):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
llc: Fix length check in llc_fixup_skb().
ieee802154: Remove hacked CFLAGS in net/ieee802154/Makefile
Merge branch 'sfc-2.6.39' of git://git.kernel.org/.../bwh/sfc-2.6
Revert "tcp: disallow bind() to reuse addr/port"
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
Merge branch 'master' of git://git.kernel.org/.../kaber/nf-2.6
Eric Dumazet (3):
bridge: reset IPCB in br_parse_ip_options
inetpeer: reduce stack usage
ip: ip_options_compile() resilient to NULL skb route
Felix Fietkau (2):
ath9k: fix missing ath9k_ps_wakeup/ath9k_ps_restore calls
ath9k_hw: fix stopping rx DMA during resets
Francois Romieu (1):
r8169: add Realtek as maintainer.
Giuseppe CAVALLARO (3):
stmmac: fixed dma lib build when turn-on the debug option
stmmac: fix open funct when exit on error
stmmac: fix Transmit Underflow error
Jason Conti (1):
p54: Initialize extra_len in p54_tx_80211
Joakim Tjernlund (1):
net: Do not wrap sysctl igmp_max_memberships in IP_MULTICAST
Johannes Berg (1):
iwlagn: override 5300 EEPROM # of chains
John W. Linville (1):
iwlegacy: make iwl3945 and iwl4965 select IWLWIFI_LEGACY
Jozsef Kadlecsik (5):
netfilter: ipset: list:set timeout variant fixes
netfilter: ipset: References are protected by rwlock instead of mutex
netfilter: ipset: bitmap:ip,mac type requires "src" for MAC
netfilter: ipset: set match and SET target fixes
netfilter: ipset: Fix the order of listing of sets
Krishna Kumar (1):
ip6_pol_route panic: Do not allow VLAN on loopback
Neil Turton (2):
sfc: Stop the TX queues during loopback self-tests
sfc: Use rmb() to ensure reads occur in order
Otavio Salvador (2):
net/sis900: store MAC into perm_addr for SiS 900, 630E, 635 and 96x variants
net/natsami: store MAC into perm_addr
Patrick McHardy (2):
connector: fix skb double free in cn_rx_skb()
Merge branch 'master' of ssh://master.kernel.org/.../kaber/nf-2.6
Peter Pan(潘卫平) (5):
bonding:set save_load to 0 when initializing
bonding:delete unused alb_timer
bonding:delete unused rlb_interval_counter
net: fix tranmitted/tranmitting typo
bonding:fix two typos
Rasesh Mody (2):
bna: fix for clean fw re-initialization
bna: fix memory leak during RX path cleanup
Sjur Brændeland (2):
caif: Bugfix use for_each_safe when removing list nodes.
caif: performance bugfix - allow radio stack to prioritize packets.
Stanislaw Gruszka (1):
iwlegacy: fix tx_power initialization
Sujith Manoharan (1):
ath9k_htc: Fix ethtool reporting
Vlad Yasevich (1):
sctp: fix oops when updating retransmit path with DEBUG on
Wei Yongjun (1):
sctp: fix oops while removed transport still using as retran path
Yaniv Rosner (1):
bnx2x: Fix port identification problem
amit salecha (1):
netxen: limit skb frags for non tso packet
huajun li (1):
usbnet: Fix up 'FLAG_POINTTOPOINT' and 'FLAG_MULTI_PACKET' overlaps.
MAINTAINERS | 1 +
drivers/connector/connector.c | 1 +
drivers/net/bna/bfa_ioc.c | 31 +++++++++-------
drivers/net/bna/bfa_ioc.h | 1 +
drivers/net/bna/bfa_ioc_ct.c | 28 +++++++++++++++
drivers/net/bna/bfi.h | 6 ++-
drivers/net/bna/bnad.c | 1 -
drivers/net/bnx2x/bnx2x_ethtool.c | 9 ++---
drivers/net/bonding/bond_alb.c | 6 ++--
drivers/net/bonding/bond_alb.h | 4 +--
drivers/net/can/mscan/mpc5xxx_can.c | 2 +-
drivers/net/loopback.c | 3 +-
drivers/net/natsemi.c | 3 ++
drivers/net/netxen/netxen_nic.h | 4 +-
drivers/net/netxen/netxen_nic_main.c | 17 +++++++++
drivers/net/qlcnic/qlcnic.h | 1 +
drivers/net/qlcnic/qlcnic_main.c | 14 +++++++
drivers/net/sfc/efx.c | 6 ++-
drivers/net/sfc/io.h | 2 +
drivers/net/sfc/net_driver.h | 2 -
drivers/net/sfc/nic.c | 22 ++++++++----
drivers/net/sfc/nic.h | 1 +
drivers/net/sfc/selftest.c | 25 +++----------
drivers/net/sfc/tx.c | 3 +-
drivers/net/sis900.c | 23 ++++++++++--
drivers/net/stmmac/dwmac_lib.c | 28 +++++++-------
drivers/net/stmmac/stmmac_main.c | 49 +++++++++++++++-----------
drivers/net/tokenring/3c359.c | 4 +-
drivers/net/tokenring/lanstreamer.c | 2 +-
drivers/net/tokenring/olympic.c | 2 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 4 +-
drivers/net/wireless/ath/ath9k/hw.c | 9 -----
drivers/net/wireless/ath/ath9k/mac.c | 25 +++++++++++--
drivers/net/wireless/ath/ath9k/mac.h | 2 +-
drivers/net/wireless/ath/ath9k/main.c | 12 +++++-
drivers/net/wireless/ath/ath9k/recv.c | 6 ++--
drivers/net/wireless/ath/regd_common.h | 1 +
drivers/net/wireless/iwlegacy/Kconfig | 9 +++--
drivers/net/wireless/iwlegacy/iwl-3945-hw.h | 2 -
drivers/net/wireless/iwlegacy/iwl-4965-hw.h | 3 --
drivers/net/wireless/iwlegacy/iwl-core.c | 17 ++++++---
drivers/net/wireless/iwlegacy/iwl-eeprom.c | 7 ----
drivers/net/wireless/iwlegacy/iwl3945-base.c | 4 --
drivers/net/wireless/iwlegacy/iwl4965-base.c | 6 ---
drivers/net/wireless/iwlwifi/iwl-5000.c | 3 ++
drivers/net/wireless/mwl8k.c | 9 ++++-
drivers/net/wireless/p54/txrx.c | 2 +-
include/linux/usb/usbnet.h | 4 +-
net/bridge/br_netfilter.c | 6 +--
net/caif/cfdgml.c | 6 +++-
net/caif/cfmuxl.c | 4 +-
net/core/dev.c | 10 ++++--
net/ieee802154/Makefile | 2 -
net/ipv4/inet_connection_sock.c | 5 +--
net/ipv4/inetpeer.c | 13 ++++---
net/ipv4/ip_options.c | 6 ++--
net/ipv4/sysctl_net_ipv4.c | 3 --
net/ipv6/inet6_connection_sock.c | 2 +-
net/irda/af_irda.c | 3 +-
net/llc/llc_input.c | 3 +-
net/netfilter/ipset/ip_set_bitmap_ipmac.c | 4 ++
net/netfilter/ipset/ip_set_core.c | 18 +++++----
net/netfilter/xt_set.c | 18 ++++++++-
net/sctp/associola.c | 4 ++
64 files changed, 330 insertions(+), 203 deletions(-)
^ permalink raw reply
* Re: [Bugme-new] [Bug 33502] New: Caught 64-bit read from uninitialized memory in __alloc_skb
From: Eric Dumazet @ 2011-04-19 20:17 UTC (permalink / raw)
To: Christoph Lameter
Cc: Andrew Morton, netdev, bugzilla-daemon, bugme-daemon,
casteyde.christian, Vegard Nossum, Pekka Enberg
In-Reply-To: <alpine.DEB.2.00.1104191210011.17888@router.home>
Le mardi 19 avril 2011 à 12:10 -0500, Christoph Lameter a écrit :
> On Tue, 19 Apr 2011, Eric Dumazet wrote:
>
> > }
> > }
> >
> > -#ifdef CONFIG_CMPXCHG_LOCAL
> > +#if defined(CONFIG_CMPXCHG_LOCAL) && \
> > + !defined(CONFIG_KMEMCHECK) && !defined(DEBUG_PAGEALLOC)
> > +#define SLUB_USE_CMPXCHG_DOUBLE
> > +#endif
> > +
> > +#ifdef SLUB_USE_CMPXCHG_DOUBLE
> > #ifdef CONFIG_PREEMPT
> > /*
>
> Ugg.. Isnt there some way to indicate to kmemcheck that a speculative
> access is occurring?
Yes, here is a totally untested patch (only compiled here), to keep
kmemcheck & cmpxchg_double together.
diff --git a/mm/slub.c b/mm/slub.c
index 94d2a33..43c08c7 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -261,6 +261,14 @@ static inline void *get_freepointer(struct kmem_cache *s, void *object)
return *(void **)(object + s->offset);
}
+static inline void *get_freepointer_mark(struct kmem_cache *s, void *object)
+{
+ void *ptr = object + s->offset;
+
+ kmemcheck_mark_initialized(ptr, sizeof(void *));
+ return *(void **)ptr;
+}
+
static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp)
{
*(void **)(object + s->offset) = fp;
@@ -1540,7 +1548,11 @@ static void unfreeze_slab(struct kmem_cache *s, struct page *page, int tail)
}
}
-#ifdef CONFIG_CMPXCHG_LOCAL
+#if defined(CONFIG_CMPXCHG_LOCAL) && !defined(DEBUG_PAGEALLOC)
+#define SLUB_USE_CMPXCHG_DOUBLE
+#endif
+
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
#ifdef CONFIG_PREEMPT
/*
* Calculate the next globally unique transaction for disambiguiation
@@ -1604,7 +1616,7 @@ static inline void note_cmpxchg_failure(const char *n,
void init_kmem_cache_cpus(struct kmem_cache *s)
{
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
int cpu;
for_each_possible_cpu(cpu)
@@ -1643,7 +1655,7 @@ static void deactivate_slab(struct kmem_cache *s, struct kmem_cache_cpu *c)
page->inuse--;
}
c->page = NULL;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
c->tid = next_tid(c->tid);
#endif
unfreeze_slab(s, page, tail);
@@ -1780,7 +1792,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
{
void **object;
struct page *new;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long flags;
local_irq_save(flags);
@@ -1819,7 +1831,7 @@ load_freelist:
c->node = page_to_nid(c->page);
unlock_out:
slab_unlock(c->page);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
c->tid = next_tid(c->tid);
local_irq_restore(flags);
#endif
@@ -1858,7 +1870,7 @@ new_slab:
}
if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
slab_out_of_memory(s, gfpflags, node);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
return NULL;
@@ -1887,7 +1899,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
{
void **object;
struct kmem_cache_cpu *c;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long tid;
#else
unsigned long flags;
@@ -1896,7 +1908,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
if (slab_pre_alloc_hook(s, gfpflags))
return NULL;
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_save(flags);
#else
redo:
@@ -1910,7 +1922,7 @@ redo:
*/
c = __this_cpu_ptr(s->cpu_slab);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
/*
* The transaction ids are globally unique per cpu and per operation on
* a per cpu queue. Thus they can be guarantee that the cmpxchg_double
@@ -1927,7 +1939,7 @@ redo:
object = __slab_alloc(s, gfpflags, node, addr, c);
else {
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
/*
* The cmpxchg will only match if there was no additional
* operation and if we are on the right processor.
@@ -1943,7 +1955,8 @@ redo:
if (unlikely(!this_cpu_cmpxchg_double(
s->cpu_slab->freelist, s->cpu_slab->tid,
object, tid,
- get_freepointer(s, object), next_tid(tid)))) {
+ get_freepointer_mark(s, object),
+ next_tid(tid)))) {
note_cmpxchg_failure("slab_alloc", s, tid);
goto redo;
@@ -1954,7 +1967,7 @@ redo:
stat(s, ALLOC_FASTPATH);
}
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
@@ -2034,7 +2047,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
{
void *prior;
void **object = (void *)x;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long flags;
local_irq_save(flags);
@@ -2070,7 +2083,7 @@ checks_ok:
out_unlock:
slab_unlock(page);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
return;
@@ -2084,7 +2097,7 @@ slab_empty:
stat(s, FREE_REMOVE_PARTIAL);
}
slab_unlock(page);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
stat(s, FREE_SLAB);
@@ -2113,7 +2126,7 @@ static __always_inline void slab_free(struct kmem_cache *s,
{
void **object = (void *)x;
struct kmem_cache_cpu *c;
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
unsigned long tid;
#else
unsigned long flags;
@@ -2121,7 +2134,7 @@ static __always_inline void slab_free(struct kmem_cache *s,
slab_free_hook(s, x);
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_save(flags);
#else
@@ -2136,7 +2149,7 @@ redo:
*/
c = __this_cpu_ptr(s->cpu_slab);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
tid = c->tid;
barrier();
#endif
@@ -2144,7 +2157,7 @@ redo:
if (likely(page == c->page && c->node != NUMA_NO_NODE)) {
set_freepointer(s, object, c->freelist);
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
if (unlikely(!this_cpu_cmpxchg_double(
s->cpu_slab->freelist, s->cpu_slab->tid,
c->freelist, tid,
@@ -2160,7 +2173,7 @@ redo:
} else
__slab_free(s, page, x, addr);
-#ifndef CONFIG_CMPXCHG_LOCAL
+#ifndef SLUB_USE_CMPXCHG_DOUBLE
local_irq_restore(flags);
#endif
}
@@ -2354,7 +2367,7 @@ static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
SLUB_PAGE_SHIFT * sizeof(struct kmem_cache_cpu));
-#ifdef CONFIG_CMPXCHG_LOCAL
+#ifdef SLUB_USE_CMPXCHG_DOUBLE
/*
* Must align to double word boundary for the double cmpxchg instructions
* to work.
^ permalink raw reply related
* [PATCH] ehea: Fix a DLPAR bug on ehea_rereg_mrs().
From: Breno Leitao @ 2011-04-19 19:39 UTC (permalink / raw)
To: davem; +Cc: netdev, Breno Leitao
We are currently continuing if ehea_restart_qps() fails, when we
do a memory DLPAR (remove or add more memory to the system).
This patch just let the NAPI disabled if the ehea_restart_qps()
fails.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
---
drivers/net/ehea/ehea_main.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index f75d314..53c0f04 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -3040,11 +3040,14 @@ static void ehea_rereg_mrs(void)
if (dev->flags & IFF_UP) {
mutex_lock(&port->port_lock);
- port_napi_enable(port);
ret = ehea_restart_qps(dev);
- check_sqs(port);
- if (!ret)
+ if (!ret) {
+ check_sqs(port);
+ port_napi_enable(port);
netif_wake_queue(dev);
+ } else {
+ netdev_err(dev, "Unable to restart QPS\n");
+ }
mutex_unlock(&port->port_lock);
}
}
--
1.7.1
^ permalink raw reply related
* Re: [PATCH net-next-2.6 3/3] bonding,ipv4,ipv6,vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS
From: Brian Haley @ 2011-04-19 19:34 UTC (permalink / raw)
To: Jay Vosburgh
Cc: Ben Hutchings, David Miller, Andy Gospodarek, Patrick McHardy,
netdev
In-Reply-To: <26398.1303240321@death>
On 04/19/2011 03:12 PM, Jay Vosburgh wrote:
>>> Brian Haley added the unsolicited NAs; I've added him to the cc
>>> so perhaps he (or somebody else) can comment on the necessity of keeping
>>> the ability to send multiple NAs.
>> [...]
>>
>> How about restoring the parameters like this:
>
> I think the patch below is better than Brian's suggestion (new
> single parameter) because it won't break existing configurations, even
> though it is doing magic under the covers. If the magic is a real
> concern, we could add logic to detect when both parameters are used and
> set to different values, but I'm not really that worked up about it as
> long as the magic is clearly documented.
My patch was on-top of Ben's, it still left the old options around, just
gave people time to notice they didn't work as before. It's not a big
deal either way.
-Brian
^ permalink raw reply
* Re: ip_rt_bug questions.
From: David Miller @ 2011-04-19 19:22 UTC (permalink / raw)
To: davej; +Cc: netdev
In-Reply-To: <20110419181322.GA2034@redhat.com>
From: Dave Jones <davej@redhat.com>
Date: Tue, 19 Apr 2011 14:13:22 -0400
> So I hit that twice in the same hour yesterday, but haven't been
> able to reproduce it since. My fuzzer must have been dependant
> upon something I can't influence (memory contents perhaps, I pass
> around random pointers).
>
> I'll keep the WARN_ON in there in case I do stumble across it again.
Maybe it only triggers when a certain combination of your analog synths
are turned on?
^ permalink raw reply
* network stack bypassing with hw queue classification and QOS?
From: Daniel Nilsson @ 2011-04-19 19:17 UTC (permalink / raw)
To: netdev
I have hardware that can classify incoming IP-packets L2-L4, and on
the DS field.
This classification allows me to know what outgoing NIC the packets
should end up on, but I still want normal QOS functionality for this
traffic, so I can't push the packets across while staying in the
driver.
Is there any good way of making use of the availability of a
TCAM-alike packet rule classifier while still having the kernel
sort/drop/queue the packets according to various QOS-settings (with no
limitation on what king of policy that can be used for a certain flow)
before they end up in the outgoind NIC? The aim for this application
is to get good packet rate in a system that doesn't have much CPU to
spare.
/Daniel
^ permalink raw reply
* Re: [PATCH net-next-2.6 3/3] bonding,ipv4,ipv6,vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS
From: Jay Vosburgh @ 2011-04-19 19:12 UTC (permalink / raw)
To: Ben Hutchings
Cc: David Miller, Andy Gospodarek, Patrick McHardy, netdev,
Brian Haley
In-Reply-To: <1303153792.2857.32.camel@bwh-desktop>
Ben Hutchings <bhutchings@solarflare.com> wrote:
>On Fri, 2011-04-15 at 17:30 -0700, Jay Vosburgh wrote:
>> Ben Hutchings <bhutchings@solarflare.com> wrote:
>>
>> >It is undesirable for the bonding driver to be poking into higher
>> >level protocols, and notifiers provide a way to avoid that. This does
>> >mean removing the ability to configure reptitition of gratuitous ARPs
>> >and unsolicited NAs.
>>
>> In principle I think this is a good thing (getting rid of some
>> of those dependencies, duplicated code, etc).
>>
>> However, the removal of the multiple grat ARP and NAs may be an
>> issue for some users. I don't know that we can just remove this (along
>> with its API) without going through the feature removal process.
>
>Right.
>
>> As I recall, the multiple gratuitous ARP stuff was added for
>> Infiniband, because it is dependent on the grat ARP for a smooth
>> failover.
>>
>> There is also currently logic to check the linkwatch link state
>> to wait for the link to go up prior to sending a grat ARP; this is also
>> for IB.
>
>Why would we activate a slave without link up? Perhaps if the previous
>active slave is removed?
It's special sauce for Infiniband; I don't recall the details
except that the submitter said that without it the initial gratuitous
ARP could be lost. I didn't (and still don't) have IB hardware to test
this on.
Ideally, I'd like to test the current situation (no checking of
linkwatch) for IB and see if the linkwatch trick is still necessary. It
may have been due to some behavior of the device driver that is now
different. For now, though, keeping it (as you've done) just in case
seems prudent.
>> Brian Haley added the unsolicited NAs; I've added him to the cc
>> so perhaps he (or somebody else) can comment on the necessity of keeping
>> the ability to send multiple NAs.
>[...]
>
>How about restoring the parameters like this:
I think the patch below is better than Brian's suggestion (new
single parameter) because it won't break existing configurations, even
though it is doing magic under the covers. If the magic is a real
concern, we could add logic to detect when both parameters are used and
set to different values, but I'm not really that worked up about it as
long as the magic is clearly documented.
>---
>From: Ben Hutchings <bhutchings@solarflare.com>
>Date: Mon, 18 Apr 2011 19:36:48 +0100
>Subject: [PATCH net-next-2.6] ipv4,ipv6,bonding: Restore control over number of peer notifications
>
>For backward compatibility, we should retain the module parameters and
>sysfs attributes to control the number of peer notifications
>(gratuitous ARPs and unsolicited NAs) sent after bonding failover.
>Also, it is possible for failover to take place even though the new
>active slave does not have link up, and in that case the peer
>notification should be deferred until it does.
>
>Change ipv4 and ipv6 so they do not automatically send peer
>notifications on bonding failover. Change the bonding driver to send
>separate NETDEV_NOTIFY_PEERS notifications when the link is up, as
>many times as requested. Since it does not directly control which
>protocols send notifications, make num_grat_arp and num_unsol_na
>aliases for a single parameter.
>
>Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
>---
> Documentation/networking/bonding.txt | 31 ++++++++----------
> drivers/net/bonding/bond_main.c | 59 ++++++++++++++++++++++++++++++++++
> drivers/net/bonding/bond_sysfs.c | 26 +++++++++++++++
> drivers/net/bonding/bonding.h | 2 +
> net/ipv4/devinet.c | 1 -
> net/ipv6/ndisc.c | 1 -
> 6 files changed, 101 insertions(+), 19 deletions(-)
>
>diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
>index e27202b..511b4e5 100644
>--- a/Documentation/networking/bonding.txt
>+++ b/Documentation/networking/bonding.txt
>@@ -1,7 +1,7 @@
>
> Linux Ethernet Bonding Driver HOWTO
>
>- Latest update: 23 September 2009
>+ Latest update: 18 April 2011
>
> Initial release : Thomas Davis <tadavis at lbl.gov>
> Corrections, HA extensions : 2000/10/03-15 :
>@@ -585,25 +585,22 @@ mode
> chosen.
>
> num_grat_arp
>-
>- Specifies the number of gratuitous ARPs to be issued after a
>- failover event. One gratuitous ARP is issued immediately after
>- the failover, subsequent ARPs are sent at a rate of one per link
>- monitor interval (arp_interval or miimon, whichever is active).
>-
>- The valid range is 0 - 255; the default value is 1. This option
>- affects only the active-backup mode. This option was added for
>- bonding version 3.3.0.
>-
> num_unsol_na
>
>- Specifies the number of unsolicited IPv6 Neighbor Advertisements
>- to be issued after a failover event. One unsolicited NA is issued
>- immediately after the failover.
>+ Specify the number of peer notifications (gratuitous ARPs and
>+ unsolicited IPv6 Neighbor Advertisements) to be issued after a
>+ failover event. As soon as the link is up on the new slave
>+ (possibly immediately) a peer notification is sent on the
>+ bonding device and each VLAN sub-device. This is repeated at
>+ each link monitor interval (arp_interval or miimon, whichever
>+ is active) if the number is greater than 1.
>+
>+ These notifications are now generated by the ipv4 and ipv6 code
>+ and the numbers of repetitions cannot be set independently.
I think it would be good for the long run to be specific about
"now," i.e., bump the bonding version and specify that here.
>- The valid range is 0 - 255; the default value is 1. This option
>- affects only the active-backup mode. This option was added for
>- bonding version 3.4.0.
>+ The valid range is 0 - 255; the default value is 1. These options
>+ affect only the active-backup mode. These options were added for
>+ bonding versions 3.3.0 and 3.4.0 respectively.
>
> primary
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 5cd4766..c9043db 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -89,6 +89,7 @@
>
> static int max_bonds = BOND_DEFAULT_MAX_BONDS;
> static int tx_queues = BOND_DEFAULT_TX_QUEUES;
>+static int num_peer_notif = 1;
> static int miimon = BOND_LINK_MON_INTERV;
> static int updelay;
> static int downdelay;
>@@ -111,6 +112,10 @@ module_param(max_bonds, int, 0);
> MODULE_PARM_DESC(max_bonds, "Max number of bonded devices");
> module_param(tx_queues, int, 0);
> MODULE_PARM_DESC(tx_queues, "Max number of transmit queues (default = 16)");
>+module_param_named(num_grat_arp, num_peer_notif, int, 0644);
>+MODULE_PARM_DESC(num_grat_arp, "Number of peer notifications to send on failover event");
>+module_param_named(num_unsol_na, num_peer_notif, int, 0644);
>+MODULE_PARM_DESC(num_unsol_na, "Number of peer notifications to send on failover event");
Perhaps add "alias of num_grat_arp" here so it shows up in modinfo?
In any event, with the version number thing I mentioned above, I
think this is a reasonable way to proceed.
-J
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
> module_param(miimon, int, 0);
> MODULE_PARM_DESC(miimon, "Link check interval in milliseconds");
> module_param(updelay, int, 0);
>@@ -1080,6 +1085,21 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
> return bestslave;
> }
>
>+static bool bond_should_notify_peers(struct bonding *bond)
>+{
>+ struct slave *slave = bond->curr_active_slave;
>+
>+ pr_debug("bond_should_notify_peers: bond %s slave %s\n",
>+ bond->dev->name, slave ? slave->dev->name : "NULL");
>+
>+ if (!slave || !bond->send_peer_notif ||
>+ test_bit(__LINK_STATE_LINKWATCH_PENDING, &slave->dev->state))
>+ return false;
>+
>+ bond->send_peer_notif--;
>+ return true;
>+}
>+
> /**
> * change_active_interface - change the active slave into the specified one
> * @bond: our bonding struct
>@@ -1147,16 +1167,28 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
> bond_set_slave_inactive_flags(old_active);
>
> if (new_active) {
>+ bool should_notify_peers = false;
>+
> bond_set_slave_active_flags(new_active);
>
> if (bond->params.fail_over_mac)
> bond_do_fail_over_mac(bond, new_active,
> old_active);
>
>+ if (netif_running(bond->dev)) {
>+ bond->send_peer_notif =
>+ bond->params.num_peer_notif;
>+ should_notify_peers =
>+ bond_should_notify_peers(bond);
>+ }
>+
> write_unlock_bh(&bond->curr_slave_lock);
> read_unlock(&bond->lock);
>
> netdev_bonding_change(bond->dev, NETDEV_BONDING_FAILOVER);
>+ if (should_notify_peers)
>+ netdev_bonding_change(bond->dev,
>+ NETDEV_NOTIFY_PEERS);
>
> read_lock(&bond->lock);
> write_lock_bh(&bond->curr_slave_lock);
>@@ -2555,6 +2587,7 @@ void bond_mii_monitor(struct work_struct *work)
> {
> struct bonding *bond = container_of(work, struct bonding,
> mii_work.work);
>+ bool should_notify_peers = false;
>
> read_lock(&bond->lock);
> if (bond->kill_timers)
>@@ -2563,6 +2596,8 @@ void bond_mii_monitor(struct work_struct *work)
> if (bond->slave_cnt == 0)
> goto re_arm;
>
>+ should_notify_peers = bond_should_notify_peers(bond);
>+
> if (bond_miimon_inspect(bond)) {
> read_unlock(&bond->lock);
> rtnl_lock();
>@@ -2581,6 +2616,12 @@ re_arm:
> msecs_to_jiffies(bond->params.miimon));
> out:
> read_unlock(&bond->lock);
>+
>+ if (should_notify_peers) {
>+ rtnl_lock();
>+ netdev_bonding_change(bond->dev, NETDEV_NOTIFY_PEERS);
>+ rtnl_unlock();
>+ }
> }
>
> static __be32 bond_glean_dev_ip(struct net_device *dev)
>@@ -3178,6 +3219,7 @@ void bond_activebackup_arp_mon(struct work_struct *work)
> {
> struct bonding *bond = container_of(work, struct bonding,
> arp_work.work);
>+ bool should_notify_peers = false;
> int delta_in_ticks;
>
> read_lock(&bond->lock);
>@@ -3190,6 +3232,8 @@ void bond_activebackup_arp_mon(struct work_struct *work)
> if (bond->slave_cnt == 0)
> goto re_arm;
>
>+ should_notify_peers = bond_should_notify_peers(bond);
>+
> if (bond_ab_arp_inspect(bond, delta_in_ticks)) {
> read_unlock(&bond->lock);
> rtnl_lock();
>@@ -3209,6 +3253,12 @@ re_arm:
> queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks);
> out:
> read_unlock(&bond->lock);
>+
>+ if (should_notify_peers) {
>+ rtnl_lock();
>+ netdev_bonding_change(bond->dev, NETDEV_NOTIFY_PEERS);
>+ rtnl_unlock();
>+ }
> }
>
> /*-------------------------- netdev event handling --------------------------*/
>@@ -3568,6 +3618,8 @@ static int bond_close(struct net_device *bond_dev)
>
> write_lock_bh(&bond->lock);
>
>+ bond->send_peer_notif = 0;
>+
> /* signal timers not to re-arm */
> bond->kill_timers = 1;
>
>@@ -4644,6 +4696,12 @@ static int bond_check_params(struct bond_params *params)
> use_carrier = 1;
> }
>
>+ if (num_peer_notif < 0 || num_peer_notif > 255) {
>+ pr_warning("Warning: num_grat_arp/num_unsol_na (%d) not in range 0-255 so it was reset to 1\n",
>+ num_peer_notif);
>+ num_peer_notif = 1;
>+ }
>+
> /* reset values for 802.3ad */
> if (bond_mode == BOND_MODE_8023AD) {
> if (!miimon) {
>@@ -4833,6 +4891,7 @@ static int bond_check_params(struct bond_params *params)
> params->mode = bond_mode;
> params->xmit_policy = xmit_hashtype;
> params->miimon = miimon;
>+ params->num_peer_notif = num_peer_notif;
> params->arp_interval = arp_interval;
> params->arp_validate = arp_validate_value;
> params->updelay = updelay;
>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>index 259ff32..58fb3e9 100644
>--- a/drivers/net/bonding/bond_sysfs.c
>+++ b/drivers/net/bonding/bond_sysfs.c
>@@ -874,6 +874,30 @@ static DEVICE_ATTR(ad_select, S_IRUGO | S_IWUSR,
> bonding_show_ad_select, bonding_store_ad_select);
>
> /*
>+ * Show and set the number of peer notifications to send after a failover event.
>+ */
>+static ssize_t bonding_show_num_peer_notif(struct device *d,
>+ struct device_attribute *attr,
>+ char *buf)
>+{
>+ struct bonding *bond = to_bond(d);
>+ return sprintf(buf, "%d\n", bond->params.num_peer_notif);
>+}
>+
>+static ssize_t bonding_store_num_peer_notif(struct device *d,
>+ struct device_attribute *attr,
>+ const char *buf, size_t count)
>+{
>+ struct bonding *bond = to_bond(d);
>+ int err = kstrtou8(buf, 10, &bond->params.num_peer_notif);
>+ return err ? err : count;
>+}
>+static DEVICE_ATTR(num_grat_arp, S_IRUGO | S_IWUSR,
>+ bonding_show_num_peer_notif, bonding_store_num_peer_notif);
>+static DEVICE_ATTR(num_unsol_na, S_IRUGO | S_IWUSR,
>+ bonding_show_num_peer_notif, bonding_store_num_peer_notif);
>+
>+/*
> * Show and set the MII monitor interval. There are two tricky bits
> * here. First, if MII monitoring is activated, then we must disable
> * ARP monitoring. Second, if the timer isn't running, we must
>@@ -1572,6 +1596,8 @@ static struct attribute *per_bond_attrs[] = {
> &dev_attr_lacp_rate.attr,
> &dev_attr_ad_select.attr,
> &dev_attr_xmit_hash_policy.attr,
>+ &dev_attr_num_grat_arp.attr,
>+ &dev_attr_num_unsol_na.attr,
> &dev_attr_miimon.attr,
> &dev_attr_primary.attr,
> &dev_attr_primary_reselect.attr,
>diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
>index 77180b1..5bf3b89 100644
>--- a/drivers/net/bonding/bonding.h
>+++ b/drivers/net/bonding/bonding.h
>@@ -149,6 +149,7 @@ struct bond_params {
> int mode;
> int xmit_policy;
> int miimon;
>+ u8 num_peer_notif;
> int arp_interval;
> int arp_validate;
> int use_carrier;
>@@ -229,6 +230,7 @@ struct bonding {
> rwlock_t lock;
> rwlock_t curr_slave_lock;
> s8 kill_timers;
>+ u8 send_peer_notif;
> s8 setup_by_slave;
> s8 igmp_retrans;
> #ifdef CONFIG_PROC_FS
>diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
>index acf553f..5345b0b 100644
>--- a/net/ipv4/devinet.c
>+++ b/net/ipv4/devinet.c
>@@ -1203,7 +1203,6 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
> break;
> /* fall through */
> case NETDEV_NOTIFY_PEERS:
>- case NETDEV_BONDING_FAILOVER:
> /* Send gratuitous ARP to notify of link change */
> inetdev_send_gratuitous_arp(dev, in_dev);
> break;
>diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
>index 6f7d491..a51fa74c 100644
>--- a/net/ipv6/ndisc.c
>+++ b/net/ipv6/ndisc.c
>@@ -1746,7 +1746,6 @@ static int ndisc_netdev_event(struct notifier_block *this, unsigned long event,
> fib6_run_gc(~0UL, net);
> break;
> case NETDEV_NOTIFY_PEERS:
>- case NETDEV_BONDING_FAILOVER:
> ndisc_send_unsol_na(dev);
> break;
> default:
>--
>1.7.4
>
>
>--
>Ben Hutchings, Senior Software 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.
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* Re: [PATCH 0/3] netfilter: netfilter fixes for 2.6.39-rc4
From: David Miller @ 2011-04-19 19:05 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <1303224705-17400-1-git-send-email-kaber@trash.net>
From: kaber@trash.net
Date: Tue, 19 Apr 2011 16:51:42 +0200
> Hi Dave,
>
> following are three netfilter fixes for 2.6.39-rc4, containing:
>
> - a fix for the bitmap:ip,mac set type to require the src/dst parameter
> to be set to src, from Jozsef
>
> - a fix to make --del-set of the SET target work, from Jozsef
>
> - a patch to fix the order in which sets are dumped, from Jozsef
>
> Please pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git master
Pulled, thanks!
^ permalink raw reply
* Re: 2.6.38 dev_watchdog WARNING
From: Ben Hutchings @ 2011-04-19 18:49 UTC (permalink / raw)
To: tim.gardner; +Cc: netdev
In-Reply-To: <4DADC8F2.9050700@canonical.com>
On Tue, 2011-04-19 at 11:40 -0600, Tim Gardner wrote:
> I'm seeing a lot of these kinds of bugs: WARNING: at
> /build/buildd/linux-2.6.38/net/sched/sch_generic.c:256
> dev_watchdog+0x213/0x220()
>
> The kernel is 2.6.38.2 plus Ubuntu cruft.
>
> A spot check of the 200+ hits on this string indicates they are
> primarily due to these drivers:
>
> ipheth
> atl1c
> sis900
> r8169
>
> As far as I can tell the warning happens when link is down on the media
> (and has never been link UP) and are sent a transmit packet which never
> completes. Is there a net/core or net/sched requirement to which these
> drivers do not conform ? Are they not correctly indicating link status?
The watchdog fires when the software queue has been stopped *and* the
link has been reported as up for over dev->watchdog_timeo ticks.
The software queue should be stopped iff the hardware queue is full or
nearly full. If the software queue remains stopped and the link is
still reported up, then one of these things is happening:
1. The link went down but the driver didn't notice
2. TX completions are not being indicated or handled correctly
3. The hardware TX path has locked up
4. The link is stalled by excessive pause frames or collisions
5. Timeout is too low and/or low watermark is too high
(there may be other explanations)
I think the watchdog is primarily meant to deal with case 3, though all
of cases 1-3 may be worked around by resetting the hardware.
Ben.
--
Ben Hutchings, Senior Software 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 0/3] netfilter: netfilter update
From: David Miller @ 2011-04-19 18:28 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <1303223492-13549-1-git-send-email-kaber@trash.net>
From: kaber@trash.net
Date: Tue, 19 Apr 2011 16:31:29 +0200
> following is a small netfilter update for net-next, containing:
>
> - a patch from Eric to remove some atomic ops in the *tables fastpath
>
> - removal of an unnecessary ifdef from IPVS by Simon
>
> - SCTP and UDPLITE support for ipset, from Jozsef
>
> Please pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git master
Pulled, thanks!
^ permalink raw reply
* Re: 2.6.38 dev_watchdog WARNING
From: Ben Greear @ 2011-04-19 18:20 UTC (permalink / raw)
To: tim.gardner; +Cc: netdev
In-Reply-To: <4DADC8F2.9050700@canonical.com>
On 04/19/2011 10:40 AM, Tim Gardner wrote:
> I'm seeing a lot of these kinds of bugs: WARNING: at
> /build/buildd/linux-2.6.38/net/sched/sch_generic.c:256
> dev_watchdog+0x213/0x220()
>
> The kernel is 2.6.38.2 plus Ubuntu cruft.
>
> A spot check of the 200+ hits on this string indicates they are
> primarily due to these drivers:
>
> ipheth
> atl1c
> sis900
> r8169
>
> As far as I can tell the warning happens when link is down on the media
> (and has never been link UP) and are sent a transmit packet which never
> completes. Is there a net/core or net/sched requirement to which these
> drivers do not conform ? Are they not correctly indicating link status?
r8169 doesn't report link right for me...
No idea about the rest.
Ben
>
> rtg
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: ip_rt_bug questions.
From: Dave Jones @ 2011-04-19 18:13 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110418.220419.226797064.davem@davemloft.net>
On Mon, Apr 18, 2011 at 10:04:19PM -0700, David Miller wrote:
> From: Dave Jones <davej@redhat.com>
> Date: Mon, 18 Apr 2011 17:59:23 -0400
>
> > On Mon, Apr 18, 2011 at 02:50:23PM -0700, David Miller wrote:
> >
> > > BTW, if you could modify this thing to spit out a stack
> > > trace (probably by using WARN_ON() or similar) that will
> > > probably show us where the bug is coming from.
> >
> > Ok, I'll add that, and see if I can reproduce it again.
>
> Thanks a lot Dave.
So I hit that twice in the same hour yesterday, but haven't been
able to reproduce it since. My fuzzer must have been dependant
upon something I can't influence (memory contents perhaps, I pass
around random pointers).
I'll keep the WARN_ON in there in case I do stumble across it again.
Dave
^ permalink raw reply
* 2.6.38 dev_watchdog WARNING
From: Tim Gardner @ 2011-04-19 17:40 UTC (permalink / raw)
To: netdev
I'm seeing a lot of these kinds of bugs: WARNING: at
/build/buildd/linux-2.6.38/net/sched/sch_generic.c:256
dev_watchdog+0x213/0x220()
The kernel is 2.6.38.2 plus Ubuntu cruft.
A spot check of the 200+ hits on this string indicates they are
primarily due to these drivers:
ipheth
atl1c
sis900
r8169
As far as I can tell the warning happens when link is down on the media
(and has never been link UP) and are sent a transmit packet which never
completes. Is there a net/core or net/sched requirement to which these
drivers do not conform ? Are they not correctly indicating link status?
rtg
--
Tim Gardner tim.gardner@canonical.com
^ permalink raw reply
* Re: [PATCH] usbnet: Resubmit interrupt URB more often
From: Paul Stewart @ 2011-04-19 17:51 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev, davem
In-Reply-To: <1303233066.2988.14.camel@bwh-desktop>
Thanks, Ben. I've made some changes. usbnet.c is a little bit a of
mess style-wise, and I let myself get sucked in. :-)
--
Paul
On Tue, Apr 19, 2011 at 10:11 AM, Ben Hutchings
<bhutchings@solarflare.com> wrote:
>
> On Tue, 2011-04-19 at 09:35 -0700, Paul Stewart wrote:
> [...]
> > index 4342bd9..e4dbb29 100644
> > --- a/drivers/usb/core/urb.c
> > +++ b/drivers/usb/core/urb.c
> > @@ -295,7 +295,9 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
> > struct usb_host_endpoint *ep;
> > int is_out;
> >
> > - if (!urb || urb->hcpriv || !urb->complete)
> > + if (urb->hcpriv)
> > + return -EALREADY;
> > + if (!urb || !urb->complete)
> > return -EINVAL;
> [...]
>
> The test for !urb must come before the test on urb->hcpriv.
>
> Also, the kernel coding style does not allow '//' comments. Please use
> scripts/checkpatch.pl to check for style and other common errors.
>
> Ben.
>
> --
> Ben Hutchings, Senior Software 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
* [PATCHv2] usbnet: Resubmit interrupt URB more often
From: Paul Stewart @ 2011-04-19 17:44 UTC (permalink / raw)
To: netdev; +Cc: davem, bhutchings
In-Reply-To: <1303233066.2988.14.camel@bwh-desktop>
I previously sent a patch to resubmit the interrupt URB when
coming out of suspend. I haven't seen much activity on the
list about it, and thought I'd send a slight variant of this
change. This one unconditionally resubmits the interrupt urb
in usbnet_bh. The consequences for resubmitting the URB often
are not large. In most HCI cases this just means usb_submit_urb
returns immediately and leaves the previous request outstanding.
Doing things this way allows us to avoid keeping track of the
URB transmit status, which may change silently over suspend-
resume transitions and is not tracked in any way currently by
usbnet.
I've designed this change on two types of systems: the first
class of system leaves USB devices powered during suspend.
This might silently cause the interrupt URB to disappear (or at
least not be resubmitted in intr_complete). Resubmission after
system resume will prevent this from causing problems.
The second class of device are those which shut down the device
during suspend. During a suspend-resume cycle, the device is
re-enumerated at system resume, and for whatever reason
usbnet_resume may be called on the device during the call-tree
from usbnet_open-> usb_autopm_get_interface, which may cause a
race where the first change above may cause the bh to submit the
interrupt urb before usbnet_open() does. As a result, I've added
an EALREADY check and a fix to urb.c to send one.
Signed-off-by: Paul Stewart <pstew@chromium.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/usb/usbnet.c | 14 +++++++++++++-
drivers/usb/core/urb.c | 5 +++--
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 02d25c7..1718898 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -636,7 +636,12 @@ static int usbnet_open (struct net_device *net)
/* start any status interrupt transfer */
if (dev->interrupt) {
retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
- if (retval < 0) {
+ if (retval == -EALREADY) {
+ /*
+ * It is not an error if interrupt urb is alredy active
+ */
+ retval = 0;
+ } else if (retval < 0) {
if (netif_msg_ifup (dev))
deverr (dev, "intr submit %d", retval);
goto done;
@@ -1065,6 +1070,10 @@ static void usbnet_bh (unsigned long param)
if (dev->txq.qlen < TX_QLEN (dev))
netif_wake_queue (dev->net);
}
+
+ /* Re-submit interrupt urb (doesn't hurt to retry) */
+ if (netif_running(dev->net))
+ usb_submit_urb(dev->interrupt, GFP_KERNEL);
}
@@ -1285,6 +1294,9 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
* wake the device
*/
netif_device_attach (dev->net);
+ /* Stop interrupt urbs while in suspend */
+ if (dev->interrupt)
+ usb_kill_urb(dev->interrupt);
}
return 0;
}
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 4342bd9..ff85f50 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -295,8 +295,10 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
struct usb_host_endpoint *ep;
int is_out;
- if (!urb || urb->hcpriv || !urb->complete)
+ if (!urb)
return -EINVAL;
+ if (!urb->complete || urb->hcpriv)
+ return -EALREADY;
dev = urb->dev;
if ((!dev) || (dev->state < USB_STATE_DEFAULT))
return -ENODEV;
@@ -807,4 +809,3 @@ int usb_anchor_empty(struct usb_anchor *anchor)
}
EXPORT_SYMBOL_GPL(usb_anchor_empty);
-
--
1.7.3.1
^ permalink raw reply related
* [PATCHv6] usbnet: Resubmit interrupt URB if device is open
From: Paul Stewart @ 2011-04-19 17:44 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
linux-usb-u79uwXL29TY76Z2rM5mHXA, oliver-GvhC2dPhHPQdnm+yROfE0A,
davem-fT/PcQaiUtIeIZ0/mPfg9Q, bhutchings-s/n/eUQHGBpZroRs9YW3xA,
linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <Pine.LNX.4.44L0.1104221129530.1877-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
Resubmit interrupt URB if device is open. Use a flag set in
usbnet_open() to determine this state. Also kill and free
interrupt URB in usbnet_disconnect().
Signed-off-by: Paul Stewart <pstew-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
drivers/net/usb/usbnet.c | 11 +++++++++++
include/linux/usb/usbnet.h | 1 +
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 02d25c7..b4572c3 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -643,6 +643,7 @@ static int usbnet_open (struct net_device *net)
}
}
+ set_bit(EVENT_DEV_OPEN, &dev->flags);
netif_start_queue (net);
if (netif_msg_ifup (dev)) {
char *framing;
@@ -1105,6 +1106,9 @@ void usbnet_disconnect (struct usb_interface *intf)
if (dev->driver_info->unbind)
dev->driver_info->unbind (dev, intf);
+ usb_kill_urb(dev->interrupt);
+ usb_free_urb(dev->interrupt);
+
free_netdev(net);
usb_put_dev (xdev);
}
@@ -1285,6 +1289,9 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
* wake the device
*/
netif_device_attach (dev->net);
+
+ /* Stop interrupt URBs */
+ usb_kill_urb(dev->interrupt);
}
return 0;
}
@@ -1297,6 +1304,10 @@ int usbnet_resume (struct usb_interface *intf)
if (!--dev->suspend_count)
tasklet_schedule (&dev->bh);
+ /* resume interrupt URBs */
+ if (test_bit(EVENT_DEV_OPEN, &dev->flags))
+ usb_submit_urb(dev->interrupt, GFP_NOIO);
+
return 0;
}
EXPORT_SYMBOL_GPL(usbnet_resume);
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index ba09fe8..d148cca 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -64,6 +64,7 @@ struct usbnet {
# define EVENT_RX_MEMORY 2
# define EVENT_STS_SPLIT 3
# define EVENT_LINK_RESET 4
+# define EVENT_DEV_OPEN 5
};
static inline struct usb_driver *driver_of(struct usb_interface *intf)
--
1.7.3.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
* [PATCHv5] usbnet: Resubmit interrupt URB once if halted
From: Paul Stewart @ 2011-04-19 17:44 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
linux-usb-u79uwXL29TY76Z2rM5mHXA, oliver-GvhC2dPhHPQdnm+yROfE0A,
davemloft.net-hpIqsD4AKlfQT0dZR+AlfA,
bhutchings-s/n/eUQHGBpZroRs9YW3xA,
linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <Pine.LNX.4.44L0.1104211436540.1939-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
Resubmit interrupt URB if device is open. Use a flag set in
usbnet_open() to determine this state. Also kill and free
interrupt URB in usbnet_disconnect().
Signed-off-by: Paul Stewart <pstew-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
drivers/net/usb/usbnet.c | 14 ++++++++++++++
include/linux/usb/usbnet.h | 1 +
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 02d25c7..c7cf4af 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -643,6 +643,7 @@ static int usbnet_open (struct net_device *net)
}
}
+ set_bit(EVENT_DEV_OPEN, &dev->flags);
netif_start_queue (net);
if (netif_msg_ifup (dev)) {
char *framing;
@@ -1105,6 +1106,11 @@ void usbnet_disconnect (struct usb_interface *intf)
if (dev->driver_info->unbind)
dev->driver_info->unbind (dev, intf);
+ if (dev->interrupt) {
+ usb_kill_urb(dev->interrupt);
+ usb_free_urb(dev->interrupt);
+ }
+
free_netdev(net);
usb_put_dev (xdev);
}
@@ -1285,6 +1291,10 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
* wake the device
*/
netif_device_attach (dev->net);
+
+ /* Stop interrupt URBs */
+ if (dev->interrupt)
+ usb_kill_urb(dev->interrupt);
}
return 0;
}
@@ -1297,6 +1307,10 @@ int usbnet_resume (struct usb_interface *intf)
if (!--dev->suspend_count)
tasklet_schedule (&dev->bh);
+ /* resume interrupt URBs */
+ if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags))
+ usb_submit_urb(dev->interrupt, GFP_NOIO);
+
return 0;
}
EXPORT_SYMBOL_GPL(usbnet_resume);
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index ba09fe8..d148cca 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -64,6 +64,7 @@ struct usbnet {
# define EVENT_RX_MEMORY 2
# define EVENT_STS_SPLIT 3
# define EVENT_LINK_RESET 4
+# define EVENT_DEV_OPEN 5
};
static inline struct usb_driver *driver_of(struct usb_interface *intf)
--
1.7.3.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
* [PATCHv4] usbnet: Resubmit interrupt URB once if halted
From: Paul Stewart @ 2011-04-19 17:44 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
greg-U8xfFu+wG4EAvxtiuMwx3w
In-Reply-To: <BANLkTi=N3T-V8VNOcbKu6COKvbEHqMoAog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Set a flag if the interrupt URB completes with ENOENT as this
occurs legitimately during system suspend. When the
usbnet_resume is called, test this flag and try once to resubmit
the interrupt URB.
This version of the patch moves the urb submit directly into
usbnet_resume. Is it okay to submit a GFP_KERNEL urb from
usbnet_resume()?
Signed-off-by: Paul Stewart <pstew-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
drivers/net/usb/usbnet.c | 13 ++++++++++++-
include/linux/usb/usbnet.h | 1 +
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 02d25c7..3651a48 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -482,6 +482,7 @@ static void intr_complete (struct urb *urb)
case -ESHUTDOWN: /* hardware gone */
if (netif_msg_ifdown (dev))
devdbg (dev, "intr shutdown, code %d", status);
+ set_bit(EVENT_INTR_HALT, &dev->flags);
return;
/* NOTE: not throttling like RX/TX, since this endpoint
@@ -1294,9 +1295,19 @@ int usbnet_resume (struct usb_interface *intf)
{
struct usbnet *dev = usb_get_intfdata(intf);
- if (!--dev->suspend_count)
+ if (!--dev->suspend_count) {
tasklet_schedule (&dev->bh);
+ /* resubmit interrupt URB if it was halted by suspend */
+ if (dev->interrupt && netif_running(dev->net) &&
+ netif_device_present(dev->net) &&
+ test_bit(EVENT_INTR_HALT, &dev->flags)) {
+ clear_bit(EVENT_INTR_HALT, &dev->flags);
+ usb_submit_urb(dev->interrupt, GFP_KERNEL);
+ }
+ }
+}
+
return 0;
}
EXPORT_SYMBOL_GPL(usbnet_resume);
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index ba09fe8..6c4b5f8 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -64,6 +64,7 @@ struct usbnet {
# define EVENT_RX_MEMORY 2
# define EVENT_STS_SPLIT 3
# define EVENT_LINK_RESET 4
+# define EVENT_INTR_HALT 5
};
static inline struct usb_driver *driver_of(struct usb_interface *intf)
--
1.7.3.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
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