Netdev List
 help / color / mirror / Atom feed
* Re: [PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared
From: Jarek Poplawski @ 2008-01-29  8:49 UTC (permalink / raw)
  To: Julian Anastasov; +Cc: David S. Miller, netdev, Joonwoo Park
In-Reply-To: <Pine.LNX.4.58.0801290139450.3181@u.domain.uli>

On Tue, Jan 29, 2008 at 02:30:47AM +0200, Julian Anastasov wrote:
> 
> 	Hello,
> 
> On Mon, 28 Jan 2008, Jarek Poplawski wrote:
> 
> > BTW, the way "add" works wasn't questioned now, but it seems could be,
> > or man ip should call it e.g. "ip route add - add new destination",
> > and append "ip route append" (unless I have old man).
> 
> 	"add" is similar to "prepend", only that checks NLM_F_EXCL
> to avoid many alternative routes, only one route for tos+priority is
> allowed for "add". As for the sorting by tos/priority and the
> insertion position I remember for thread on this issue:

Yes but I've meant this man (8) ip description could be confusing:

"  ip route add - add new route
   ip route change - change route
   ip route replace - change or add new one"

One can wonder why there is an error while adding two new routes with
"add", but OK to do the same with "replace". But, it's "man" problem
of course.

> 
> http://marc.info/?t=109614290600002&r=1&w=2
> 
> > > +		fa = list_entry(fa->fa_list.prev, struct fib_alias, fa_list);
> > > +		list_for_each_entry_continue(fa, &f->fn_alias, fa_list) {
> > > +			if (fa->fa_tos != tos)
> > > +				break;
> > > +			if (fa->fa_info->fib_priority != fi->fib_priority)
> > > +				break;
> > > +			if (fa->fa_type == cfg->fc_type &&
> > > +			    fa->fa_scope == cfg->fc_scope &&
> > > +			    fa->fa_info == fi) {
> > > +				fa_match = fa;
> > > +				break;
> > 
> > Why can't we try goto out from here? (less reading...)
> 
> 	The case with NLM_F_REPLACE needs to check more things, one
> day one can combine NLM_F_APPEND+NLM_F_REPLACE to replace last
> alternative route, not only the first one as currently implemented.

I'm not sure I can understand your point: do you mean there could be
something to do for these options is fa_match exists? But, maybe it
relates to my question below...

> 
> > > +			fa = fa_first;
> > > +			if (fa_match) {
> > > +				if (fa == fa_match)
> > > +					err = 0;
> > 
> > Could you comment more why returning an error seems to depend on the
> > order of aliases here? But, IMHO there is no reason to change the old
> > behavior WRT this error, so probably this err = 0 should be always if
> > NLM_F_REPLACE is set.
> 
> 	fa_match is some existing alias that matches all new parameters.
> As NLM_F_REPLACE changes the first alternative route for 
> tos+priority if fa_match == fa_first (we are replacing alias that
> matches all parameters) we return 0, only that routing cache is not 
> flushed - nothing is replaced/changed. So, "fa == fa_match" means
> "replace will not change existing parameters", return 0 as this is
> not an error.

Probably I miss something, but what parameters do we change if
(fa_match) && (fa != fa_match)? Isn't this "goto out" in any case?

> 
> > PS: I think, this FIB info you sent earlier is just fine for
> > Documentation/networking without any changes! (Maybe one more patch?)
> 
> 	This is so small part of the picture, such 15-minute listing
> is not enough to explain everything. May be such and other information
> can be added as part of some known documentation.

This is small but condensed, and IMHO it fits very well what is now
in this directory.

Thanks,
Jarek P.

^ permalink raw reply

* [PATCH] Add another Prism2 card to hostap
From: Marcin Juszkiewicz @ 2008-01-29  8:42 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: Jouni Malinen, Pavel Roskin, netdev-u79uwXL29TY76Z2rM5mHXA


From: Marcin Juszkiewicz <openembedded-sbG99h22wavzs492ZWNkEA@public.gmane.org>

Card reported by Ångström user:
http://bugs.openembedded.net/show_bug.cgi?id=3236

Socket 1:
   product info: "Wireless LAN", "11Mbps PC Card", "Version 01.02", ""
   manfid: 0x0156, 0x0002
   function: 6 (network)

Signed-off-by: Marcin Juszkiewicz <openembedded-sbG99h22wavzs492ZWNkEA@public.gmane.org>

diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 877d3bd..4f6707c 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -894,6 +894,9 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
                "The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P",
                "RevA",
                0xa5f472c2, 0x9c05598d, 0xc9049a39, 0x57a66194),
+       PCMCIA_DEVICE_PROD_ID123(
+           "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
+               0x4b8870ff, 0x70e946d1, 0x4b74baa0),
        PCMCIA_DEVICE_NULL
 };
 MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);

-- 
JID: hrw-jabber.org
OpenEmbedded developer/consultant

         Computers are not intelligent. They only think they are.

^ permalink raw reply related

* Re: [PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared
From: Jarek Poplawski @ 2008-01-29  9:10 UTC (permalink / raw)
  To: Julian Anastasov; +Cc: David S. Miller, netdev, Joonwoo Park
In-Reply-To: <20080129084915.GA1624@ff.dom.local>

On Tue, Jan 29, 2008 at 09:49:15AM +0100, Jarek Poplawski wrote:
> On Tue, Jan 29, 2008 at 02:30:47AM +0200, Julian Anastasov wrote:
...
> > 	fa_match is some existing alias that matches all new parameters.
> > As NLM_F_REPLACE changes the first alternative route for 
> > tos+priority if fa_match == fa_first (we are replacing alias that
> > matches all parameters) we return 0, only that routing cache is not 
> > flushed - nothing is replaced/changed. So, "fa == fa_match" means
> > "replace will not change existing parameters", return 0 as this is
> > not an error.
> 
> Probably I miss something, but what parameters do we change if
> (fa_match) && (fa != fa_match)? Isn't this "goto out" in any case?

OOPS! You mean change is needed, but we can't do this! (I'm so slow...)

All correct!

Thanks again,
Jarek P.

^ permalink raw reply

* Re: [PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared
From: Jarek Poplawski @ 2008-01-29  9:52 UTC (permalink / raw)
  To: Julian Anastasov; +Cc: David S. Miller, netdev, Joonwoo Park
In-Reply-To: <20080129091030.GB1624@ff.dom.local>

On Tue, Jan 29, 2008 at 10:10:30AM +0100, Jarek Poplawski wrote:
> On Tue, Jan 29, 2008 at 09:49:15AM +0100, Jarek Poplawski wrote:
> > On Tue, Jan 29, 2008 at 02:30:47AM +0200, Julian Anastasov wrote:
> ...
> > > 	fa_match is some existing alias that matches all new parameters.
> > > As NLM_F_REPLACE changes the first alternative route for 
> > > tos+priority if fa_match == fa_first (we are replacing alias that
> > > matches all parameters) we return 0, only that routing cache is not 
> > > flushed - nothing is replaced/changed. So, "fa == fa_match" means
> > > "replace will not change existing parameters", return 0 as this is
> > > not an error.
> > 
> > Probably I miss something, but what parameters do we change if
> > (fa_match) && (fa != fa_match)? Isn't this "goto out" in any case?
> 
> OOPS! You mean change is needed, but we can't do this! (I'm so slow...)

...On the other hand, I wonder how bad would be switching these two
to avoid this error? After all "replace" with this "add or change"
meaning looks quite permissive, and after all it was used before with
no such errors, so, even if correct, it could still break some
scripts...

Jarek P.

^ permalink raw reply

* Re: Udev coldplugging loads 8139too driver instead of 8139cp
From: Michael Tokarev @ 2008-01-29 10:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, linux-kernel
In-Reply-To: <20080128170830.6f67fa5a@deepthought>

Stephen Hemminger wrote:
> On Tue, 29 Jan 2008 03:46:08 +0300
> Michael Tokarev <mjt@tls.msk.ru> wrote:
[]
>> There are 2 drivers for 8139-based NICs.  For really different two kinds
>> of hardware, which both uses the same PCI identifiers.  Both drivers
>> "claims" to work with all NICs with those PCI ids, because "externally"
>> (by means of udev for example) it's impossible to distinguish the two
>> kinds of hardware, it becomes clean only when the driver (either of the
>> two) loads and actually checks which hardware we have here.
> 
> Is there any chance of using subdevice or subversion to tell them apart?
> That worked for other vendors like DLINK who slapped same ID on different
> cards.

If it were that simple... ;)

No.  The difference is in PCI revision number (byte #8 in PCI config space).
If it's >= 0x40 - it's 8139too, < 0x40 - 8139cp.  Or 0x20 - I forgot.

Here's a code snippet from a shell script I used ages ago to automatically
load modules (similar to what udev does nowadays):

  # special hack for 8139{too,cp} stuff
  case "$modalias" in
  *v000010ECd00008139*)
    rev="$(dd if="$1/config" bs=1 skip=8 count=1 2>/dev/null)"
    if [ -n "$rev" ]; then
      list=
      for module in $modlist; do
        case "$module" in
        8139cp)
          if [ ".$rev" \< ". " ]; then
            $vecho1 "$TAG: not loading $module for this device"
            continue
          fi
          ;;
        8139too)
          if [ ".$rev" \> ". " ]; then
            $vecho1 "$TAG: not loading $module for this device"
            continue
          fi
          ;;
        esac
        list="$list $module"
      done
      modlist="$list"
    fi
    ;;
  esac

/mjt

^ permalink raw reply

* [PATCH net-2.6.25] [NETNS] change net/Kconfig to avoid a broken build when building with network namesapce support.
From: Rami Rosen @ 2008-01-29 10:53 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

Hi,

The build is broken with the following kernel configuration:

- net-2.6.25
- Support for network namespaces enabled (CONFIG_NET_NS=y)
- CONFIG_RCU_TRACE=y
	CONFIG_RCU_TRACE can be set by:
	 make menuconfig ->Processor type and features->Enable tracing for RCU.
	
- The error in build is :
	  fs/built-in.o: In function `debugfs_init':
	 /work/src/netGit2.6.25/2.6.25/fs/debugfs/inode.c:435: undefined
	 reference to `kernel_kobj'
	 make: *** [.tmp_vmlinux1] Error 1

The reason is : RCU_TRACE selects DEBUG_FS,
 but CONFIG_NET_NS depends on EXPERIMENTAL && !SYSFS;
 debugfs can't be built without sysfs.

 There is currently a bit of mess with SYSFS and in fact it seems that
maybe selecting DEBUG_FS
should depend on SYSFS; to avoid this problem in the build,
 this patch adds !DEBUG_FS to CONFIG_NET_NS dependencies in net/Kconfig.
 This way, if CONFIG_RCU_TRACE is set, ( or other configuration items which
selects DEBUG_FS), we cannot set CONFIG_NET_NS.

Regards,
Rami Rosen


Signed-off-by: Rami Rosen <ramirose@gmail.com>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 397 bytes --]

diff --git a/net/Kconfig b/net/Kconfig
index b6a5d45..82337e2 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -30,7 +30,7 @@ menu "Networking options"
 config NET_NS
 	bool "Network namespace support"
 	default n
-	depends on EXPERIMENTAL && !SYSFS
+	depends on EXPERIMENTAL && !SYSFS && !DEBUG_FS
 	help
 	  Allow user space to create what appear to be multiple instances
 	  of the network stack.

^ permalink raw reply related

* [PATCH] bfin_mac: Fix MDIO clock frequency
From: Kalle Pokki @ 2008-01-29 12:27 UTC (permalink / raw)
  To: netdev, Bryan Wu

The clock divisor is set to all ones at reset.
---
 drivers/net/bfin_mac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index eb97175..c199633 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -425,7 +425,7 @@ static int mii_probe(struct net_device *dev)
 
 	/* MDC  = 2.5 MHz */
 	sysctl = bfin_read_EMAC_SYSCTL();
-	sysctl |= SET_MDCDIV(24);
+	sysctl = (sysctl & ~MDCDIV) | SET_MDCDIV(24);
 	bfin_write_EMAC_SYSCTL(sysctl);
 
 	/* search for connect PHY device */
-- 
1.4.4.2


^ permalink raw reply related

* [PATCH] bfin_mac: Make the MDIO polling faster
From: Kalle Pokki @ 2008-01-29 12:28 UTC (permalink / raw)
  To: netdev, Bryan Wu

The poll routine always got 10 ms penalty when called immediately
after starting the transfer. The MDIO transfer takes 25.6 us at the
nominal 2.5 MHz, so MAX_TIMEOUT_CNT being 500 is still big enough.
---
 drivers/net/bfin_mac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index c199633..d2e6813 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -296,7 +296,7 @@ static void mdio_poll(void)
 
 	/* poll the STABUSY bit */
 	while ((bfin_read_EMAC_STAADD()) & STABUSY) {
-		mdelay(10);
+		udelay(1);
 		if (timeout_cnt-- < 0) {
 			printk(KERN_ERR DRV_NAME
 			": wait MDC/MDIO transaction to complete timeout\n");
-- 
1.4.4.2


^ permalink raw reply related

* Re: [PATCH 2/2] [NETFILTER] nf_conntrack_core: kill unused static inline (do_iter)
From: Patrick McHardy @ 2008-01-29 13:41 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: netfilter-devel, David Miller, netdev
In-Reply-To: <12013009401505-git-send-email-ilpo.jarvinen@helsinki.fi>

Ilpo Järvinen wrote:
> From: =?ISO-8859-1?q?Ilpo=20J=E4rvinen?= <ilpo.jarvinen@helsinki.fi>
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> ---
>  net/netfilter/nf_conntrack_core.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)

Applied.
-
To unsubscribe from this list: send the line "unsubscribe netfilter-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

* Re: [PATCH 1/2] [NETFILTER] ipt_CLUSTERIP: kill clusterip_config_entry_get
From: Patrick McHardy @ 2008-01-29 13:40 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: netfilter-devel, David Miller, netdev
In-Reply-To: <12013009403114-git-send-email-ilpo.jarvinen@helsinki.fi>

Ilpo Järvinen wrote:
> From: =?ISO-8859-1?q?Ilpo=20J=E4rvinen?= <ilpo.jarvinen@helsinki.fi>
> 
> It's unused static inline.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>

Applied, thanks.

^ permalink raw reply

* pppoe, /proc/net/pppoe wrong (extra entries)
From: Denys Fedoryshchenko @ 2008-01-29 14:36 UTC (permalink / raw)
  To: netdev; +Cc: paulus, mostrows

Hi again

I notice strange thing, with /proc/net/pppoe, not sure if it is bug, but for 
me it looks wrong.

cat /proc/net/pppoe
there is normal entries of users, but at the end i have 
....
00000D00 00:16:D3:0B:F9:34     eth1
00004000 00:50:22:00:1C:FC     eth1
00007E00 00:03:47:BD:34:25     eth1
00007E00 00:03:47:BD:34:25     eth1
00007E00 00:03:47:BD:34:25     eth1
00007E00 00:03:47:BD:34:25     eth1
00007E00 00:03:47:BD:34:25     eth1
....
and last entry duplicates till end.

i have script to get customers interfaces, so i am using it to calculate 
amount of users logged in

defaulthost ~ #cat /proc/net/pppoe |grep -i '00:03:47:BD:34:25'|wc -l
40
defaulthost ~ #cat /proc/net/pppoe |wc -l
113
defaulthost ~ #pppctrl |wc -l
73

It means there is 40 extra entries. 00:03:47:BD:34:25 host have established, 
but only one session. I am seeing similar issue on all remaining pppoe 
servers, extra entries with same mac at the end.

If you need more info or access, please let me know.

--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.


^ permalink raw reply

* [GIT PULL] pull request for lblnet-2.6_testing
From: Paul Moore @ 2008-01-29 15:09 UTC (permalink / raw)
  To: James Morris; +Cc: selinux, linux-security-module, netdev

Hi James,

I've just rebased the lblnet-2.6_testing tree against Linus' latest 
which already includes DaveM's net-2.6.25 tree so there shouldn't be 
any collisions with the core networking bits.  Other than minor changes 
needed to merge cleanly with the current linux-2.6 tree there have been 
no changes to the labeled networking patches since they were last 
posted.  The git tree can be found here:

 * git://git.infradead.org/users/pcmoore/lblnet-2.6_testing

In the interest of full disclosure, I was not able to test this tree as 
there are a few compile errors in the drivers area which are preventing 
me from getting a kernel built.  However, all of the relevant areas 
(security/selinux, net/netlabel, net/netfilter, net/xfrm, net/ipv4, 
net/ipv6) compiled without issue.  I will continue to try and get a 
kernel compiled but I thought getting this out in a reasonable 
timeframe to minimize merge issues was a better decision.  Thse patches 
applied to 2.6.24 do compile, boot, and run without any known 
regressions.

-- 
paul moore
linux security @ hp

^ permalink raw reply

* [VLAN]: set_rx_mode support for unicast address list
From: Patrick McHardy @ 2008-01-29 15:09 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 8731 bytes --]

commit fbf2742ff936c751444ae610ae45c6ef54c14658
Author: Chris Leech <christopher.leech@intel.com>
Date:   Thu Jan 24 18:24:53 2008 +0100

    [VLAN]: set_rx_mode support for unicast address list
    
    Reuse the existing logic for multicast list synchronization for the unicast
    address list. The core of dev_mc_sync/unsync are split out as
    __dev_addr_sync/unsync and moved from dev_mcast.c to dev.c.  These are then
    used to implement dev_unicast_sync/unsync as well.
    
    I'm working on cleaning up Intel's FCoE stack, which generates new MAC
    addresses from the fibre channel device id assigned by the fabric as per the
    current draft specification in T11.  When using such a protocol in a VLAN
    environment it would be nice to not always be forced into promiscuous mode,
    assuming the underlying Ethernet driver supports multiple unicast addresses as
    well.
    
    Signed-off-by: Chris Leech <christopher.leech@intel.com>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b0813c3..047d432 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1414,12 +1414,16 @@ extern void		dev_set_rx_mode(struct net_device *dev);
 extern void		__dev_set_rx_mode(struct net_device *dev);
 extern int		dev_unicast_delete(struct net_device *dev, void *addr, int alen);
 extern int		dev_unicast_add(struct net_device *dev, void *addr, int alen);
+extern int		dev_unicast_sync(struct net_device *to, struct net_device *from);
+extern void		dev_unicast_unsync(struct net_device *to, struct net_device *from);
 extern int 		dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
 extern int		dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly);
 extern int		dev_mc_sync(struct net_device *to, struct net_device *from);
 extern void		dev_mc_unsync(struct net_device *to, struct net_device *from);
 extern int 		__dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all);
 extern int		__dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly);
+extern int		__dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
+extern void		__dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
 extern void		dev_set_promiscuity(struct net_device *dev, int inc);
 extern void		dev_set_allmulti(struct net_device *dev, int inc);
 extern void		netdev_state_change(struct net_device *dev);
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 8059fa4..77f04e4 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -563,6 +563,7 @@ static int vlan_dev_stop(struct net_device *dev)
 	struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
 
 	dev_mc_unsync(real_dev, dev);
+	dev_unicast_unsync(real_dev, dev);
 	if (dev->flags & IFF_ALLMULTI)
 		dev_set_allmulti(real_dev, -1);
 	if (dev->flags & IFF_PROMISC)
@@ -634,9 +635,10 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
 		dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1);
 }
 
-static void vlan_dev_set_multicast_list(struct net_device *vlan_dev)
+static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
 {
 	dev_mc_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev);
+	dev_unicast_sync(vlan_dev_info(vlan_dev)->real_dev, vlan_dev);
 }
 
 /*
@@ -702,7 +704,8 @@ void vlan_setup(struct net_device *dev)
 	dev->open		= vlan_dev_open;
 	dev->stop		= vlan_dev_stop;
 	dev->set_mac_address	= vlan_dev_set_mac_address;
-	dev->set_multicast_list	= vlan_dev_set_multicast_list;
+	dev->set_rx_mode	= vlan_dev_set_rx_mode;
+	dev->set_multicast_list	= vlan_dev_set_rx_mode;
 	dev->change_rx_flags	= vlan_dev_change_rx_flags;
 	dev->do_ioctl		= vlan_dev_ioctl;
 	dev->destructor		= free_netdev;
diff --git a/net/core/dev.c b/net/core/dev.c
index c9c593e..edaff27 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2962,6 +2962,102 @@ int dev_unicast_add(struct net_device *dev, void *addr, int alen)
 }
 EXPORT_SYMBOL(dev_unicast_add);
 
+int __dev_addr_sync(struct dev_addr_list **to, int *to_count,
+		    struct dev_addr_list **from, int *from_count)
+{
+	struct dev_addr_list *da, *next;
+	int err = 0;
+
+	da = *from;
+	while (da != NULL) {
+		next = da->next;
+		if (!da->da_synced) {
+			err = __dev_addr_add(to, to_count,
+					     da->da_addr, da->da_addrlen, 0);
+			if (err < 0)
+				break;
+			da->da_synced = 1;
+			da->da_users++;
+		} else if (da->da_users == 1) {
+			__dev_addr_delete(to, to_count,
+					  da->da_addr, da->da_addrlen, 0);
+			__dev_addr_delete(from, from_count,
+					  da->da_addr, da->da_addrlen, 0);
+		}
+		da = next;
+	}
+	return err;
+}
+
+void __dev_addr_unsync(struct dev_addr_list **to, int *to_count,
+		       struct dev_addr_list **from, int *from_count)
+{
+	struct dev_addr_list *da, *next;
+
+	da = *from;
+	while (da != NULL) {
+		next = da->next;
+		if (da->da_synced) {
+			__dev_addr_delete(to, to_count,
+					  da->da_addr, da->da_addrlen, 0);
+			da->da_synced = 0;
+			__dev_addr_delete(from, from_count,
+					  da->da_addr, da->da_addrlen, 0);
+		}
+		da = next;
+	}
+}
+
+/**
+ *	dev_unicast_sync - Synchronize device's unicast list to another device
+ *	@to: destination device
+ *	@from: source device
+ *
+ *	Add newly added addresses to the destination device and release
+ *	addresses that have no users left. The source device must be
+ *	locked by netif_tx_lock_bh.
+ *
+ *	This function is intended to be called from the dev->set_rx_mode
+ *	function of layered software devices.
+ */
+int dev_unicast_sync(struct net_device *to, struct net_device *from)
+{
+	int err = 0;
+
+	netif_tx_lock_bh(to);
+	err = __dev_addr_sync(&to->uc_list, &to->uc_count,
+			      &from->uc_list, &from->uc_count);
+	if (!err)
+		__dev_set_rx_mode(to);
+	netif_tx_unlock_bh(to);
+	return err;
+}
+EXPORT_SYMBOL(dev_unicast_sync);
+
+/**
+ *	dev_unicast_unsync - Remove synchronized addresses from the destination
+ *			     device
+ *	@to: destination device
+ *	@from: source device
+ *
+ *	Remove all addresses that were added to the destination device by
+ *	dev_unicast_sync(). This function is intended to be called from the
+ *	dev->stop function of layered software devices.
+ */
+void dev_unicast_unsync(struct net_device *to, struct net_device *from)
+{
+	netif_tx_lock_bh(from);
+	netif_tx_lock_bh(to);
+
+	__dev_addr_unsync(&to->uc_list, &to->uc_count,
+			  &from->uc_list, &from->uc_count);
+	__dev_set_rx_mode(to);
+
+	netif_tx_unlock_bh(to);
+	netif_tx_unlock_bh(from);
+}
+EXPORT_SYMBOL(dev_unicast_unsync);
+
 static void __dev_addr_discard(struct dev_addr_list **list)
 {
 	struct dev_addr_list *tmp;
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index cadbfbf..cec5825 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -113,32 +113,15 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
  * 	locked by netif_tx_lock_bh.
  *
  *	This function is intended to be called from the dev->set_multicast_list
- *	function of layered software devices.
+ *	or dev->set_rx_mode function of layered software devices.
  */
 int dev_mc_sync(struct net_device *to, struct net_device *from)
 {
-	struct dev_addr_list *da, *next;
 	int err = 0;
 
 	netif_tx_lock_bh(to);
-	da = from->mc_list;
-	while (da != NULL) {
-		next = da->next;
-		if (!da->da_synced) {
-			err = __dev_addr_add(&to->mc_list, &to->mc_count,
-					     da->da_addr, da->da_addrlen, 0);
-			if (err < 0)
-				break;
-			da->da_synced = 1;
-			da->da_users++;
-		} else if (da->da_users == 1) {
-			__dev_addr_delete(&to->mc_list, &to->mc_count,
-					  da->da_addr, da->da_addrlen, 0);
-			__dev_addr_delete(&from->mc_list, &from->mc_count,
-					  da->da_addr, da->da_addrlen, 0);
-		}
-		da = next;
-	}
+	err = __dev_addr_sync(&to->mc_list, &to->mc_count,
+			      &from->mc_list, &from->mc_count);
 	if (!err)
 		__dev_set_rx_mode(to);
 	netif_tx_unlock_bh(to);
@@ -160,23 +143,11 @@ EXPORT_SYMBOL(dev_mc_sync);
  */
 void dev_mc_unsync(struct net_device *to, struct net_device *from)
 {
-	struct dev_addr_list *da, *next;
-
 	netif_tx_lock_bh(from);
 	netif_tx_lock_bh(to);
 
-	da = from->mc_list;
-	while (da != NULL) {
-		next = da->next;
-		if (da->da_synced) {
-			__dev_addr_delete(&to->mc_list, &to->mc_count,
-					  da->da_addr, da->da_addrlen, 0);
-			da->da_synced = 0;
-			__dev_addr_delete(&from->mc_list, &from->mc_count,
-					  da->da_addr, da->da_addrlen, 0);
-		}
-		da = next;
-	}
+	__dev_addr_unsync(&to->mc_list, &to->mc_count,
+			  &from->mc_list, &from->mc_count);
 	__dev_set_rx_mode(to);
 
 	netif_tx_unlock_bh(to);

^ permalink raw reply related

* [PATCH net-2.6.25] [MACVLAN] Setting macvlan_handle_frame_hook to NULL when rtnl_link_register() fails.
From: Rami Rosen @ 2008-01-29 15:14 UTC (permalink / raw)
  To: kaber, netdev

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Hi,
  In drivers/net/macvlan.c, when rtnl_link_register() fails
in macvlan_init_module(), there is no point to set it (second time in this
method) to macvlan_handle_frame; macvlan_init_module() will return a negative
number, so instead this patch sets macvlan_handle_frame_hook to NULL.

Regards,
Rami Rosen


Signed-off-by: Rami Rosen <ramirose@gmail.com>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 405 bytes --]

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 6ef6b8b..f651a81 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -508,7 +508,7 @@ static int __init macvlan_init_module(void)
 		goto err1;
 	return 0;
 err1:
-	macvlan_handle_frame_hook = macvlan_handle_frame;
+	macvlan_handle_frame_hook = NULL;
 	unregister_netdevice_notifier(&macvlan_notifier_block);
 	return err;
 }

^ permalink raw reply related

* Re: [PATCH net-2.6.25] [MACVLAN] Setting macvlan_handle_frame_hook to NULL when rtnl_link_register() fails.
From: Patrick McHardy @ 2008-01-29 15:19 UTC (permalink / raw)
  To: Rami Rosen; +Cc: netdev, David S. Miller
In-Reply-To: <eb3ff54b0801290714ja7e7e67t3349028b7db8dc5e@mail.gmail.com>

Rami Rosen wrote:
> Hi,
>   In drivers/net/macvlan.c, when rtnl_link_register() fails
> in macvlan_init_module(), there is no point to set it (second time in this
> method) to macvlan_handle_frame; macvlan_init_module() will return a negative
> number, so instead this patch sets macvlan_handle_frame_hook to NULL.


Indeed, that seems to be a stupid cut-and-paste error. Thanks for
catching this.

Dave, please apply.

^ permalink raw reply

* Re: sky2: tx hang on dual-port Yukon XL when rx csum disabled
From: Tony Battersby @ 2008-01-29 15:26 UTC (permalink / raw)
  To: Stephen Hemminger, netdev
In-Reply-To: <479E2247.8080109@cybernetics.com>

Tony Battersby wrote:
> "iperf -c 192.168.1.1" never finishes, but "iperf -c 192.168.2.1" does
> finish.  Press Ctrl-C to abort the hung iperf.  Ping 192.168.1.1 does
> not respond.  Ping 192.168.2.1 does respond, but each ping has almost
> exactly 1 second latency (the latency should be < 1 ms).
>
>   

Update: after triggering the problem, the ping latency on the interface
that still responds is the same as the ping interval.  The default ping
interval is 1 second, so in my initial test I was seeing a 1 second ping
latency.  If I do "ping -i 2 192.168.2.1", then each ping takes 2
seconds to receive the response.  If I do "ping -i 5 192.168.2.1", then
each ping takes 5 seconds to receive the response.  This implies that
the network stack doesn't realize that it received the ping reply until
it goes to send another ping.

Hope that helps.

Tony Battersby
Cybernetics


^ permalink raw reply

* [NET_SCHED]: sch_ingress: remove netfilter support
From: Patrick McHardy @ 2008-01-29 15:28 UTC (permalink / raw)
  To: David S. Miller; +Cc: jamal, Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 4402 bytes --]

commit 3b27667029825ba16f8509fb119bca1b445a3dc9
Author: Patrick McHardy <kaber@trash.net>
Date:   Mon Jan 28 13:57:56 2008 +0100

    [NET_SCHED]: sch_ingress: remove netfilter support
    
    Since the old policer code is gone, TC actions are needed for policing.
    The ingress qdisc can get packets directly from netif_receive_skb()
    in case TC actions are enabled or through netfilter otherwise, but
    since without TC actions there is no policer the only thing it actually
    does is count packets.
    
    Remove the netfilter support and always require TC actions.
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index 87af7c9..7d4085a 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -198,7 +198,7 @@ config NET_SCH_NETEM
 
 config NET_SCH_INGRESS
 	tristate "Ingress Qdisc"
-	depends on NET_CLS_ACT || NETFILTER
+	depends on NET_CLS_ACT
 	---help---
 	  Say Y here if you want to use classifiers for incoming packets.
 	  If unsure, say Y.
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c
index 3f72d52..274b1dd 100644
--- a/net/sched/sch_ingress.c
+++ b/net/sched/sch_ingress.c
@@ -12,18 +12,10 @@
 #include <linux/list.h>
 #include <linux/skbuff.h>
 #include <linux/rtnetlink.h>
-#include <linux/netfilter_ipv4.h>
-#include <linux/netfilter_ipv6.h>
-#include <linux/netfilter.h>
 #include <net/netlink.h>
 #include <net/pkt_sched.h>
 
 
-/* Thanks to Doron Oz for this hack */
-#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
-static int nf_registered;
-#endif
-
 struct ingress_qdisc_data {
 	struct tcf_proto	*filter_list;
 };
@@ -84,11 +76,6 @@ static int ingress_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 
 	result = tc_classify(skb, p->filter_list, &res);
 
-	/*
-	 * Unlike normal "enqueue" functions, ingress_enqueue returns a
-	 * firewall FW_* code.
-	 */
-#ifdef CONFIG_NET_CLS_ACT
 	sch->bstats.packets++;
 	sch->bstats.bytes += skb->len;
 	switch (result) {
@@ -107,71 +94,10 @@ static int ingress_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 		result = TC_ACT_OK;
 		break;
 	}
-#else
-	result = NF_ACCEPT;
-	sch->bstats.packets++;
-	sch->bstats.bytes += skb->len;
-#endif
 
 	return result;
 }
 
-#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
-static unsigned int ing_hook(unsigned int hook, struct sk_buff *skb,
-			     const struct net_device *indev,
-			     const struct net_device *outdev,
-			     int (*okfn)(struct sk_buff *))
-{
-
-	struct Qdisc *q;
-	struct net_device *dev = skb->dev;
-	int fwres = NF_ACCEPT;
-
-	if (dev->qdisc_ingress) {
-		spin_lock(&dev->ingress_lock);
-		if ((q = dev->qdisc_ingress) != NULL)
-			fwres = q->enqueue(skb, q);
-		spin_unlock(&dev->ingress_lock);
-	}
-
-	return fwres;
-}
-
-/* after ipt_filter */
-static struct nf_hook_ops ing_ops[] __read_mostly = {
-	{
-		.hook           = ing_hook,
-		.owner		= THIS_MODULE,
-		.pf             = PF_INET,
-		.hooknum        = NF_INET_PRE_ROUTING,
-		.priority       = NF_IP_PRI_FILTER + 1,
-	},
-	{
-		.hook           = ing_hook,
-		.owner		= THIS_MODULE,
-		.pf             = PF_INET6,
-		.hooknum        = NF_INET_PRE_ROUTING,
-		.priority       = NF_IP6_PRI_FILTER + 1,
-	},
-};
-#endif
-
-static int ingress_init(struct Qdisc *sch, struct nlattr *opt)
-{
-#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
-	printk("Ingress scheduler: Classifier actions prefered over netfilter\n");
-
-	if (!nf_registered) {
-		if (nf_register_hooks(ing_ops, ARRAY_SIZE(ing_ops)) < 0) {
-			printk("ingress qdisc registration error \n");
-			return -EINVAL;
-		}
-		nf_registered++;
-	}
-#endif
-	return 0;
-}
-
 /* ------------------------------------------------------------- */
 
 static void ingress_destroy(struct Qdisc *sch)
@@ -213,7 +139,6 @@ static struct Qdisc_ops ingress_qdisc_ops __read_mostly = {
 	.id		=	"ingress",
 	.priv_size	=	sizeof(struct ingress_qdisc_data),
 	.enqueue	=	ingress_enqueue,
-	.init		=	ingress_init,
 	.destroy	=	ingress_destroy,
 	.dump		=	ingress_dump,
 	.owner		=	THIS_MODULE,
@@ -227,10 +152,6 @@ static int __init ingress_module_init(void)
 static void __exit ingress_module_exit(void)
 {
 	unregister_qdisc(&ingress_qdisc_ops);
-#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
-	if (nf_registered)
-		nf_unregister_hooks(ing_ops, ARRAY_SIZE(ing_ops));
-#endif
 }
 
 module_init(ingress_module_init)

^ permalink raw reply related

* [PATCH] PHYLIB: Locking fixes for PHY I/O potentially sleeping
From: Nate Case @ 2008-01-29 16:05 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Andy Fleming, David S. Miller, netdev
In-Reply-To: <479E76A2.8020304@garzik.org>

PHY read/write functions can potentially sleep (e.g., a PHY accessed
via I2C).  The following changes were made to account for this:

    * Change spin locks to mutex locks
    * Add a BUG_ON() to phy_read() phy_write() to warn against
      calling them from an interrupt context.
    * Use work queue for PHY state machine handling since
      it can potentially sleep
    * Change phydev lock from spinlock to mutex

Signed-off-by: Nate Case <ncase@xes-inc.com>
Acked-by: Andy Fleming <afleming@freescale.com>

---
Note: This is a resend of the patch submitted on January 3rd, 2008

 drivers/net/phy/mdio_bus.c   |    2 +-
 drivers/net/phy/phy.c        |   68 ++++++++++++++++++++++++++++-------------
 drivers/net/phy/phy_device.c |   11 +++----
 include/linux/phy.h          |    5 ++-
 4 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index c30196d..6e9f619 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -49,7 +49,7 @@ int mdiobus_register(struct mii_bus *bus)
 	int i;
 	int err = 0;
 
-	spin_lock_init(&bus->mdio_lock);
+	mutex_init(&bus->mdio_lock);
 
 	if (NULL == bus || NULL == bus->name ||
 			NULL == bus->read ||
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 7c9e6e3..12fccb1 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -26,7 +26,6 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
-#include <linux/spinlock.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/mii.h>
@@ -72,9 +71,11 @@ int phy_read(struct phy_device *phydev, u16 regnum)
 	int retval;
 	struct mii_bus *bus = phydev->bus;
 
-	spin_lock_bh(&bus->mdio_lock);
+	BUG_ON(in_interrupt());
+
+	mutex_lock(&bus->mdio_lock);
 	retval = bus->read(bus, phydev->addr, regnum);
-	spin_unlock_bh(&bus->mdio_lock);
+	mutex_unlock(&bus->mdio_lock);
 
 	return retval;
 }
@@ -95,9 +96,11 @@ int phy_write(struct phy_device *phydev, u16 regnum, u16 val)
 	int err;
 	struct mii_bus *bus = phydev->bus;
 
-	spin_lock_bh(&bus->mdio_lock);
+	BUG_ON(in_interrupt());
+
+	mutex_lock(&bus->mdio_lock);
 	err = bus->write(bus, phydev->addr, regnum, val);
-	spin_unlock_bh(&bus->mdio_lock);
+	mutex_unlock(&bus->mdio_lock);
 
 	return err;
 }
@@ -428,7 +431,7 @@ int phy_start_aneg(struct phy_device *phydev)
 {
 	int err;
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 
 	if (AUTONEG_DISABLE == phydev->autoneg)
 		phy_sanitize_settings(phydev);
@@ -449,13 +452,14 @@ int phy_start_aneg(struct phy_device *phydev)
 	}
 
 out_unlock:
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 	return err;
 }
 EXPORT_SYMBOL(phy_start_aneg);
 
 
 static void phy_change(struct work_struct *work);
+static void phy_state_machine(struct work_struct *work);
 static void phy_timer(unsigned long data);
 
 /**
@@ -476,6 +480,7 @@ void phy_start_machine(struct phy_device *phydev,
 {
 	phydev->adjust_state = handler;
 
+	INIT_WORK(&phydev->state_queue, phy_state_machine);
 	init_timer(&phydev->phy_timer);
 	phydev->phy_timer.function = &phy_timer;
 	phydev->phy_timer.data = (unsigned long) phydev;
@@ -493,11 +498,12 @@ void phy_start_machine(struct phy_device *phydev,
 void phy_stop_machine(struct phy_device *phydev)
 {
 	del_timer_sync(&phydev->phy_timer);
+	cancel_work_sync(&phydev->state_queue);
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 	if (phydev->state > PHY_UP)
 		phydev->state = PHY_UP;
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	phydev->adjust_state = NULL;
 }
@@ -541,9 +547,9 @@ static void phy_force_reduction(struct phy_device *phydev)
  */
 void phy_error(struct phy_device *phydev)
 {
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 	phydev->state = PHY_HALTED;
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 }
 
 /**
@@ -705,10 +711,10 @@ static void phy_change(struct work_struct *work)
 	if (err)
 		goto phy_err;
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 	if ((PHY_RUNNING == phydev->state) || (PHY_NOLINK == phydev->state))
 		phydev->state = PHY_CHANGELINK;
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	atomic_dec(&phydev->irq_disable);
 	enable_irq(phydev->irq);
@@ -735,7 +741,7 @@ phy_err:
  */
 void phy_stop(struct phy_device *phydev)
 {
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 
 	if (PHY_HALTED == phydev->state)
 		goto out_unlock;
@@ -751,7 +757,7 @@ void phy_stop(struct phy_device *phydev)
 	phydev->state = PHY_HALTED;
 
 out_unlock:
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	/*
 	 * Cannot call flush_scheduled_work() here as desired because
@@ -773,7 +779,7 @@ out_unlock:
  */
 void phy_start(struct phy_device *phydev)
 {
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 
 	switch (phydev->state) {
 		case PHY_STARTING:
@@ -787,19 +793,26 @@ void phy_start(struct phy_device *phydev)
 		default:
 			break;
 	}
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 }
 EXPORT_SYMBOL(phy_stop);
 EXPORT_SYMBOL(phy_start);
 
-/* PHY timer which handles the state machine */
-static void phy_timer(unsigned long data)
+/**
+ * phy_state_machine - Handle the state machine
+ * @work: work_struct that describes the work to be done
+ *
+ * Description: Scheduled by the state_queue workqueue each time
+ *   phy_timer is triggered.
+ */
+static void phy_state_machine(struct work_struct *work)
 {
-	struct phy_device *phydev = (struct phy_device *)data;
+	struct phy_device *phydev =
+			container_of(work, struct phy_device, state_queue);
 	int needs_aneg = 0;
 	int err = 0;
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 
 	if (phydev->adjust_state)
 		phydev->adjust_state(phydev->attached_dev);
@@ -965,7 +978,7 @@ static void phy_timer(unsigned long data)
 			break;
 	}
 
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	if (needs_aneg)
 		err = phy_start_aneg(phydev);
@@ -976,3 +989,14 @@ static void phy_timer(unsigned long data)
 	mod_timer(&phydev->phy_timer, jiffies + PHY_STATE_TIME * HZ);
 }
 
+/* PHY timer which schedules the state machine work */
+static void phy_timer(unsigned long data)
+{
+	struct phy_device *phydev = (struct phy_device *)data;
+
+	/*
+	 * PHY I/O operations can potentially sleep so we ensure that
+	 * it's done from a process context
+	 */
+	schedule_work(&phydev->state_queue);
+}
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 5b9e175..f4c4fd8 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -25,7 +25,6 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
-#include <linux/spinlock.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/mii.h>
@@ -80,7 +79,7 @@ struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id)
 
 	dev->state = PHY_DOWN;
 
-	spin_lock_init(&dev->lock);
+	mutex_init(&dev->lock);
 
 	return dev;
 }
@@ -656,7 +655,7 @@ static int phy_probe(struct device *dev)
 	if (!(phydrv->flags & PHY_HAS_INTERRUPT))
 		phydev->irq = PHY_POLL;
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 
 	/* Start out supporting everything. Eventually,
 	 * a controller will attach, and may modify one
@@ -670,7 +669,7 @@ static int phy_probe(struct device *dev)
 	if (phydev->drv->probe)
 		err = phydev->drv->probe(phydev);
 
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	return err;
 
@@ -682,9 +681,9 @@ static int phy_remove(struct device *dev)
 
 	phydev = to_phy_device(dev);
 
-	spin_lock_bh(&phydev->lock);
+	mutex_lock(&phydev->lock);
 	phydev->state = PHY_DOWN;
-	spin_unlock_bh(&phydev->lock);
+	mutex_unlock(&phydev->lock);
 
 	if (phydev->drv->remove)
 		phydev->drv->remove(phydev);
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 554836e..5e43ae7 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -88,7 +88,7 @@ struct mii_bus {
 
 	/* A lock to ensure that only one thing can read/write
 	 * the MDIO bus at a time */
-	spinlock_t mdio_lock;
+	struct mutex mdio_lock;
 
 	struct device *dev;
 
@@ -284,10 +284,11 @@ struct phy_device {
 
 	/* Interrupt and Polling infrastructure */
 	struct work_struct phy_queue;
+	struct work_struct state_queue;
 	struct timer_list phy_timer;
 	atomic_t irq_disable;
 
-	spinlock_t lock;
+	struct mutex lock;
 
 	struct net_device *attached_dev;
 
-- 
1.5.3.3




^ permalink raw reply related

* SKBs with shared fragments
From: kristrev @ 2008-01-29 16:17 UTC (permalink / raw)
  To: netdev

Hello,

I am working on a patch to the TCP-code that, among others, share
fragments between skbs, and have encountered a problem that I'm not sure
if I have solved correctly.

To share a fragment, I copy the skb_frag-struct to the correct place in
the other skbs frags-array, increase the page-counter, skb->data_len,
skb->len, skb->end_seq and gso_segs/gso_size, and calculate a new
checksum.

The problem is the skb->truesize-variable. Currently I do not increase it,
leading to a SKB BUG because truesize is less than (skb->len +
sizeof(struct skb)). When I increase/decrease truesize, both the
wmem_queue and sk_forward_alloc is something else than zero and the socket
leaks memory.

The kernel does not halt and all the data is received correctly in both
cases.

The reason that I currently don't increase/decrease truesize is that, at
least if I have understod the code correctly, truesize says something
about how much memory an skb actually consumes. And since I only copy
existing fragments into it, I don't use any more memory.

Is this correct, or should I increase/decrease truesize as well? Also, is
there a better way to share fragments between skbs?

Thanks in advance for any replies,
Kristian


^ permalink raw reply

* [PATCH] PHYLIB: Add BCM5482 PHY support
From: Nate Case @ 2008-01-29 16:19 UTC (permalink / raw)
  To: Andy Fleming; +Cc: netdev

This Broadcom PHY is similar to other bcm54xx devices.

Signed-off-by: Nate Case <ncase@xes-inc.com>
---
 drivers/net/phy/broadcom.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 29666c8..5b80358 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -141,6 +141,20 @@ static struct phy_driver bcm5461_driver = {
 	.driver 	= { .owner = THIS_MODULE },
 };
 
+static struct phy_driver bcm5482_driver = {
+    .phy_id		= 0x0143bcb0,
+	.phy_id_mask	= 0xfffffff0,
+	.name		= "Broadcom BCM5482",
+	.features	= PHY_GBIT_FEATURES,
+	.flags		= PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+	.config_init	= bcm54xx_config_init,
+	.config_aneg	= genphy_config_aneg,
+	.read_status	= genphy_read_status,
+	.ack_interrupt	= bcm54xx_ack_interrupt,
+	.config_intr	= bcm54xx_config_intr,
+	.driver 	= { .owner = THIS_MODULE },
+};
+
 static int __init broadcom_init(void)
 {
 	int ret;
@@ -154,8 +168,13 @@ static int __init broadcom_init(void)
 	ret = phy_driver_register(&bcm5461_driver);
 	if (ret)
 		goto out_5461;
+	ret = phy_driver_register(&bcm5482_driver);
+	if (ret)
+		goto out_5482;
 	return ret;
 
+out_5482:
+	phy_driver_unregister(&bcm5461_driver);
 out_5461:
 	phy_driver_unregister(&bcm5421_driver);
 out_5421:
@@ -166,6 +185,7 @@ out_5411:
 
 static void __exit broadcom_exit(void)
 {
+	phy_driver_unregister(&bcm5482_driver);
 	phy_driver_unregister(&bcm5461_driver);
 	phy_driver_unregister(&bcm5421_driver);
 	phy_driver_unregister(&bcm5411_driver);
-- 
1.5.3.3




^ permalink raw reply related

* [PATCH] New driver "sfc" for Solarstorm SFC4000 controller
From: Ben Hutchings @ 2008-01-29 16:22 UTC (permalink / raw)
  To: netdev; +Cc: Jeff Garzik, linux-net-drivers

This is a resubmission of a new driver for Solarflare network controllers.

The driver supports several types of PHY (10Gbase-T, XFP, CX4) on six
different 10G and 1G boards.  It is accompanied by an MTD driver that
allows access to the flash/EEPROM.

NICs based on this controller are now available from SMC as part numbers
SMC10GPCIe-XFP and SMC10GPCIe-10BT.

FYI the previous thread was:
  http://marc.info/?l=linux-netdev&m=120067352032298&w=4

Things that have changed since the last patch:

 - Changed ethtool support to use the default ethtool implementations
   where possible
 - Removed unused MDIO functions
 - Combined struct efx_nic and struct efx_nic_port, since the driver
   now only supports 1-port configurations
 - Removed/combined redundant members of struct efx_nic
 - Moved some constant members of struct efx_nic into struct efx_nic_type
 - Moved the two steps of efx_nic::dma_mask initialisation together
 - Eliminated efx_nic::features and efx_nic_type::features; moved all
   feature flag setting into efx_init_netdev()
 - Fixed page-based RX buffer alignment for architectures with strict
   alignment
 - Replaced spinlocks with mutexes where possible
 - Merged efx_{init,fini}_debugfs_nic_symlink into
   efx_{init,fini}_debugfs_netdev
 - Renamed efx_{init,fini}_netdev and corrected comments to
   indicate that they only (un)register the net device
 - Added EFX_FTL - fatal in debug builds otherwise equivalent to EFX_ERR
 - Changed RX FIFO watermarks to more reasonable values
 - Fixed various corner cases in PHY reconfiguration
 - Changed NET_DEV_NAME() to use efx->name, making races with
   (un)registration harmless
 - Fixed repetition of PCI or net device name in log messages
 - Renamed falcon_nic_params structure to falcon_nic_data
 - Fixed spelling, capitalisation, grammar, punctuation, spacing
   in various comments and log messages

We believe this is ready to be merged now and would like to know if
there is anything remaining that we need to fix or improve.

The patch (against netdev-2.6) is at:
  https://support.solarflare.com/netdev/6/netdev-2.6-sfc-2.2.0056.patch

The new files may also be downloaded as a tarball:
  https://support.solarflare.com/netdev/6/netdev-2.6-sfc-2.2.0056.tgz

And for verification there is:
  https://support.solarflare.com/netdev/6/MD5SUMS

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.

^ permalink raw reply

* [PATCH] pktgen: pktgen should not print info that it is spinning
From: Jesse Brandeburg @ 2008-01-28 21:16 UTC (permalink / raw)
  To: netdev; +Cc: davem, auke-jan.h.kok, Jesse Brandeburg, Robert Olsson

when using pktgen to send delay packets the module prints repeatedly to the
kernel log:
sleeping for X
sleeping for X
...

This is probably just a debugging item left in and should not be enabled for
regular use of the module.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Robert Olsson <Robert.Olsson@data.slu.se>
---

 net/core/pktgen.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 285ec3e..b1b1aba 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2138,7 +2138,6 @@ static void spin(struct pktgen_dev *pkt_dev, __u64 spin_until_us)
 	__u64 now;
 
 	start = now = getCurUs();
-	printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));
 	while (now < spin_until_us) {
 		/* TODO: optimize sleeping behavior */
 		if (spin_until_us - now > jiffies_to_usecs(1) + 1)


^ permalink raw reply related

* status inquiry#2  (RE: [PATCH 01/03] ISATAP V2 (header file changes))
From: Templin, Fred L @ 2008-01-29 16:41 UTC (permalink / raw)
  To: netdev; +Cc: YOSHIFUJI Hideaki / 吉藤英明
In-Reply-To: <39C363776A4E8C4A94691D2BD9D1C9A1029EDDAC@XCH-NW-7V2.nw.nos.boeing.com>

Would appreciate a status update on this submission, posted 1/15/08.

Thanks - Fred
fred.l.templin@boeing.com 

> -----Original Message-----
> From: Templin, Fred L 
> Sent: Tuesday, January 15, 2008 11:57 AM
> To: netdev@vger.kernel.org
> Cc: YOSHIFUJI Hideaki / 吉藤英明
> Subject: [PATCH 01/03] ISATAP V2 (header file changes)
> 
> This patch updates the Linux the Intra-Site Automatic Tunnel 
> Addressing
> Protocol (ISATAP) implementation. It places the ISATAP 
> potential router
> list (PRL) in the kernel and adds three new private ioctls for PRL
> management. The diffs are specific to the netdev net-2.6.25 
> development
> tree taken by "git pull" on 1/14/08.
> 
> Signed-off-by: Fred L. Templin <fred.l.templin@boeing.com>
> 
> --- net-2.6.25/include/linux/skbuff.h.orig	2008-01-14 
> 15:33:36.000000000 -0800
> +++ net-2.6.25/include/linux/skbuff.h	2008-01-14 
> 15:43:06.000000000 -0800
> @@ -311,7 +311,8 @@ struct sk_buff {
>  	__u16			tc_verd;	/* traffic 
> control verdict */
>  #endif
>  #endif
> -	/* 2 byte hole */
> +	__u8			rtr_type;
> +	/* 1 byte hole */
>  
>  #ifdef CONFIG_NET_DMA
>  	dma_cookie_t		dma_cookie;
> --- net-2.6.25/include/linux/if_tunnel.h.orig	2008-01-14 
> 15:33:36.000000000 -0800
> +++ net-2.6.25/include/linux/if_tunnel.h	2008-01-14 
> 15:42:14.000000000 -0800
> @@ -7,6 +7,9 @@
>  #define SIOCADDTUNNEL   (SIOCDEVPRIVATE + 1)
>  #define SIOCDELTUNNEL   (SIOCDEVPRIVATE + 2)
>  #define SIOCCHGTUNNEL   (SIOCDEVPRIVATE + 3)
> +#define SIOCADDPRL      (SIOCDEVPRIVATE + 4)
> +#define SIOCDELPRL      (SIOCDEVPRIVATE + 5)
> +#define SIOCCHGPRL      (SIOCDEVPRIVATE + 6)
>  
>  #define GRE_CSUM	__constant_htons(0x8000)
>  #define GRE_ROUTING	__constant_htons(0x4000)
> @@ -17,9 +20,6 @@
>  #define GRE_FLAGS	__constant_htons(0x00F8)
>  #define GRE_VERSION	__constant_htons(0x0007)
>  
> -/* i_flags values for SIT mode */
> -#define	SIT_ISATAP	0x0001
> -
>  struct ip_tunnel_parm
>  {
>  	char			name[IFNAMSIZ];
> @@ -30,5 +30,15 @@ struct ip_tunnel_parm
>  	__be32			o_key;
>  	struct iphdr		iph;
>  };
> +/* SIT-mode i_flags */
> +#define	SIT_ISATAP	0x0001
> +
> +struct ip_tunnel_prladdr {
> +	__be32			addr;
> +	__be16			flags;
> +	__be16			rsvd;
> +};
> +/* PRL flags */
> +#define	PRL_BORDER		0x0001
>  
>  #endif /* _IF_TUNNEL_H_ */
> --- net-2.6.25/include/net/ipip.h.orig	2008-01-14 
> 15:33:36.000000000 -0800
> +++ net-2.6.25/include/net/ipip.h	2008-01-14 
> 15:41:21.000000000 -0800
> @@ -24,6 +24,13 @@ struct ip_tunnel
>  	int			mlink;
>  
>  	struct ip_tunnel_parm	parms;
> +	struct ip_tunnel_prlent	*prl;		/* potential 
> router list */
> +};
> +
> +struct ip_tunnel_prlent
> +{
> +	struct ip_tunnel_prlent	*next;
> +	struct ip_tunnel_prladdr ent;
>  };
>  
>  #define IPTUNNEL_XMIT() do {					
> 	\
> --- net-2.6.25/include/net/ndisc.h.orig	2008-01-14 
> 15:40:28.000000000 -0800
> +++ net-2.6.25/include/net/ndisc.h	2008-01-15 
> 08:43:21.000000000 -0800
> @@ -12,6 +12,16 @@
>  #define NDISC_REDIRECT			137
>  
>  /*
> + * Router type: cross-layer information from link-layer to
> + * IPv6 layer reported by certain link types (e.g., RFC4214).
> + */
> +
> +#define RTRTYPE_UNSPEC			0 /* 
> unspecified (default) */
> +#define RTRTYPE_HOST			1 /* host or 
> unauthorized router */
> +#define RTRTYPE_INTERIOR		2 /* site-interior router */
> +#define RTRTYPE_BORDER			3 /* site 
> border router */
> +
> +/*
>   *	ndisc options
>   */
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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

* Re: Udev coldplugging loads 8139too driver instead of 8139cp
From: Ondrej Zary @ 2008-01-29 16:53 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: Stephen Hemminger, netdev, linux-kernel
In-Reply-To: <479F0369.3080309@msgid.tls.msk.ru>

On Tuesday 29 January 2008 11:43:53 Michael Tokarev wrote:
> Stephen Hemminger wrote:
> > On Tue, 29 Jan 2008 03:46:08 +0300
> > Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> []
>
> >> There are 2 drivers for 8139-based NICs.  For really different two kinds
> >> of hardware, which both uses the same PCI identifiers.  Both drivers
> >> "claims" to work with all NICs with those PCI ids, because "externally"
> >> (by means of udev for example) it's impossible to distinguish the two
> >> kinds of hardware, it becomes clean only when the driver (either of the
> >> two) loads and actually checks which hardware we have here.
> >
> > Is there any chance of using subdevice or subversion to tell them apart?
> > That worked for other vendors like DLINK who slapped same ID on different
> > cards.
>
> If it were that simple... ;)
>
> No.  The difference is in PCI revision number (byte #8 in PCI config
> space). If it's >= 0x40 - it's 8139too, < 0x40 - 8139cp.  Or 0x20 - I
> forgot.

Perhaps a module could be created that will claim this device ID and then use 
the correct driver.

> Here's a code snippet from a shell script I used ages ago to automatically
> load modules (similar to what udev does nowadays):
>
>   # special hack for 8139{too,cp} stuff
>   case "$modalias" in
>   *v000010ECd00008139*)
>     rev="$(dd if="$1/config" bs=1 skip=8 count=1 2>/dev/null)"
>     if [ -n "$rev" ]; then
>       list=
>       for module in $modlist; do
>         case "$module" in
>         8139cp)
>           if [ ".$rev" \< ". " ]; then
>             $vecho1 "$TAG: not loading $module for this device"
>             continue
>           fi
>           ;;
>         8139too)
>           if [ ".$rev" \> ". " ]; then
>             $vecho1 "$TAG: not loading $module for this device"
>             continue
>           fi
>           ;;
>         esac
>         list="$list $module"
>       done
>       modlist="$list"
>     fi
>     ;;
>   esac
>
> /mjt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



-- 
Ondrej Zary

^ permalink raw reply

* [PATCH] forcedeth: mac address mcp77/79
From: Ayaz Abdulla @ 2008-01-28 15:24 UTC (permalink / raw)
  To: Jeff Garzik, Andrew Morton, nedev, stable

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

This patch is a critical fix for MCP77 and MCP79 devices. The feature 
flags were missing the define for correct mac address 
(DEV_HAS_CORRECT_MACADDR).

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>


[-- Attachment #2: patch-forcedeth-macaddr-mcp77-79 --]
[-- Type: text/plain, Size: 4545 bytes --]

--- old/drivers/net/forcedeth.c	2008-01-28 10:15:28.000000000 -0500
+++ new/drivers/net/forcedeth.c	2008-01-28 10:17:38.000000000 -0500
@@ -5603,35 +5603,35 @@
 	},
 	{	/* MCP77 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_32),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{	/* MCP77 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_33),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{	/* MCP77 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_34),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{	/* MCP77 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_35),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{	/* MCP79 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_36),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{	/* MCP79 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_37),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{	/* MCP79 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_38),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{	/* MCP79 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_39),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
 	{0,},
 };

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox