* Re: linux-next: Tree for July 20 (qlcnic)
[not found] <20110720180041.5774ca335e6697c17374dca5@canb.auug.org.au>
@ 2011-07-20 16:19 ` Randy Dunlap
2011-07-20 18:10 ` Anirban Chakraborty
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2011-07-20 16:19 UTC (permalink / raw)
To: Stephen Rothwell, netdev; +Cc: linux-next, LKML, linux-driver
On Wed, 20 Jul 2011 18:00:41 +1000 Stephen Rothwell wrote:
> Hi all,
When CONFIG_VLAN_8021Q is not enabled:
drivers/net/qlcnic/qlcnic_main.c:4207: error: 'struct net_device' has no member named 'vlgrp'
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for July 20 (qlcnic)
2011-07-20 16:19 ` linux-next: Tree for July 20 (qlcnic) Randy Dunlap
@ 2011-07-20 18:10 ` Anirban Chakraborty
2011-07-20 19:43 ` [PATCH] net: vlan: fix compile breakage from 69ecca8 David Lamparter
0 siblings, 1 reply; 4+ messages in thread
From: Anirban Chakraborty @ 2011-07-20 18:10 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, netdev, linux-next@vger.kernel.org,
linux-kernel, Linux Driver, David Lamparter
On Jul 20, 2011, at 9:19 AM, Randy Dunlap wrote:
> On Wed, 20 Jul 2011 18:00:41 +1000 Stephen Rothwell wrote:
>
>> Hi all,
>
> When CONFIG_VLAN_8021Q is not enabled:
>
> drivers/net/qlcnic/qlcnic_main.c:4207: error: 'struct net_device' has no member named 'vlgrp'
This is caused by the following commit:
commit 69ecca86da4890c13a5e29c51b4ac76a1a8a62c9
Refs: v3.0-rc7-1265-g69ecca8
Author: David Lamparter <equinox@diac24.net>
AuthorDate: Sun Jul 17 08:53:12 2011 +0000
Commit: David S. Miller <davem@davemloft.net>
CommitDate: Sun Jul 17 12:33:22 2011 -0700
net: vlan, qlcnic: make vlan_find_dev private
there is only one user of vlan_find_dev outside of the actual vlan code:
qlcnic uses it to iterate over some VLANs it knows.
let's just make vlan_find_dev private to the VLAN code and have the
iteration in qlcnic be a bit more direct. (a few rcu dereferences less
too)
Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Amit Kumar Salecha <amit.salecha@qlogic.com>
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: linux-driver@qlogic.com
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] net: vlan: fix compile breakage from 69ecca8
2011-07-20 18:10 ` Anirban Chakraborty
@ 2011-07-20 19:43 ` David Lamparter
2011-07-20 21:06 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: David Lamparter @ 2011-07-20 19:43 UTC (permalink / raw)
Cc: Stephen Rothwell, netdev, linux-next, linux-kernel,
David Lamparter, linux-driver, Anirban Chakraborty,
David S. Miller, Randy Dunlap
well, there was too much wood to see the tree and I messed up the
configuration dependencies. let's make it work with unset
CONFIG_VLAN_8021Q and remove the second definition of vlan_find_dev.
Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: linux-driver@qlogic.com
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
---
sorry for the mess-up... compiled with CONFIG_VLAN_8021Q=n,m and y
this time; don't have qlcnic hw to test.
drivers/net/qlcnic/qlcnic_main.c | 4 +++-
include/linux/if_vlan.h | 5 -----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 3579229..a2c39e9 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -4198,13 +4198,15 @@ static void
qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event)
{
struct qlcnic_adapter *adapter = netdev_priv(netdev);
- struct vlan_group *grp;
+ struct vlan_group *grp = NULL;
struct net_device *dev;
u16 vid;
qlcnic_config_indev_addr(adapter, netdev, event);
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
grp = rcu_dereference_rtnl(netdev->vlgrp);
+#endif
if (!grp)
return;
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index bc03e40..dbe41dc 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -135,11 +135,6 @@ vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
unsigned int vlan_tci);
#else
-static inline struct net_device *vlan_find_dev(struct net_device *real_dev,
- u16 vlan_id)
-{
- return NULL;
-}
static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
{
--
1.7.5.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: vlan: fix compile breakage from 69ecca8
2011-07-20 19:43 ` [PATCH] net: vlan: fix compile breakage from 69ecca8 David Lamparter
@ 2011-07-20 21:06 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2011-07-20 21:06 UTC (permalink / raw)
To: David Lamparter
Cc: Stephen Rothwell, netdev, linux-next, linux-kernel, linux-driver,
Anirban Chakraborty, David S. Miller
On Wed, 20 Jul 2011 21:43:53 +0200 David Lamparter wrote:
> well, there was too much wood to see the tree and I messed up the
> configuration dependencies. let's make it work with unset
> CONFIG_VLAN_8021Q and remove the second definition of vlan_find_dev.
>
> Signed-off-by: David Lamparter <equinox@diac24.net>
> Cc: linux-driver@qlogic.com
> Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks.
> ---
> sorry for the mess-up... compiled with CONFIG_VLAN_8021Q=n,m and y
> this time; don't have qlcnic hw to test.
>
> drivers/net/qlcnic/qlcnic_main.c | 4 +++-
> include/linux/if_vlan.h | 5 -----
> 2 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
> index 3579229..a2c39e9 100644
> --- a/drivers/net/qlcnic/qlcnic_main.c
> +++ b/drivers/net/qlcnic/qlcnic_main.c
> @@ -4198,13 +4198,15 @@ static void
> qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event)
> {
> struct qlcnic_adapter *adapter = netdev_priv(netdev);
> - struct vlan_group *grp;
> + struct vlan_group *grp = NULL;
> struct net_device *dev;
> u16 vid;
>
> qlcnic_config_indev_addr(adapter, netdev, event);
>
> +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
> grp = rcu_dereference_rtnl(netdev->vlgrp);
> +#endif
> if (!grp)
> return;
>
> diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
> index bc03e40..dbe41dc 100644
> --- a/include/linux/if_vlan.h
> +++ b/include/linux/if_vlan.h
> @@ -135,11 +135,6 @@ vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
> unsigned int vlan_tci);
>
> #else
> -static inline struct net_device *vlan_find_dev(struct net_device *real_dev,
> - u16 vlan_id)
> -{
> - return NULL;
> -}
>
> static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
> {
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-20 21:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110720180041.5774ca335e6697c17374dca5@canb.auug.org.au>
2011-07-20 16:19 ` linux-next: Tree for July 20 (qlcnic) Randy Dunlap
2011-07-20 18:10 ` Anirban Chakraborty
2011-07-20 19:43 ` [PATCH] net: vlan: fix compile breakage from 69ecca8 David Lamparter
2011-07-20 21:06 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).