[2.6 patch] forgotten bits of Sangoma drivers removal

2008-02-24 Thread Adrian Bunk
Robert P. J. Day spotted that my removal of the Sangoma drivers missed a 
few bits.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/networking/00-INDEX   |2 
 Documentation/networking/wan-router.txt |  621 
 include/linux/Kbuild|1 
 include/linux/if_wanpipe.h  |  124 
 4 files changed, 748 deletions(-)

b448ba4228b3dfaacfa7e043e3aa23579d06d36b diff --git 
a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index 02e56d4..61ac35a 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -103,8 +103,6 @@ tuntap.txt
- TUN/TAP device driver, allowing user space Rx/Tx of packets.
 vortex.txt
- info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards.
-wan-router.txt
-   - WAN router documentation
 wavelan.txt
- ATT GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver
 x25.txt
diff --git a/Documentation/networking/wan-router.txt 
b/Documentation/networking/wan-router.txt
deleted file mode 100644
index bc2ab41..000
--- a/Documentation/networking/wan-router.txt
+++ /dev/null
@@ -1,621 +0,0 @@
---
-Linux WAN Router Utilities Package
---
-Version 2.2.1 
-Mar 28, 2001
-Author: Nenad Corbic [EMAIL PROTECTED]
-Copyright (c) 1995-2001 Sangoma Technologies Inc.
---
-
-INTRODUCTION
-
-Wide Area Networks (WANs) are used to interconnect Local Area Networks (LANs)
-and/or stand-alone hosts over vast distances with data transfer rates
-significantly higher than those achievable with commonly used dial-up
-connections.
-
-Usually an external device called `WAN router' sitting on your local network
-or connected to your machine's serial port provides physical connection to
-WAN.  Although router's job may be as simple as taking your local network
-traffic, converting it to WAN format and piping it through the WAN link, these
-devices are notoriously expensive, with prices as much as 2 - 5 times higher
-then the price of a typical PC box.
-
-Alternatively, considering robustness and multitasking capabilities of Linux,
-an internal router can be built (most routers use some sort of stripped down
-Unix-like operating system anyway). With a number of relatively inexpensive WAN
-interface cards available on the market, a perfectly usable router can be
-built for less than half a price of an external router.  Yet a Linux box
-acting as a router can still be used for other purposes, such as fire-walling,
-running FTP, WWW or DNS server, etc.
-
-This kernel module introduces the notion of a WAN Link Driver (WLD) to Linux
-operating system and provides generic hardware-independent services for such
-drivers.  Why can existing Linux network device interface not be used for
-this purpose?  Well, it can.  However, there are a few key differences between
-a typical network interface (e.g. Ethernet) and a WAN link.
-
-Many WAN protocols, such as X.25 and frame relay, allow for multiple logical
-connections (known as `virtual circuits' in X.25 terminology) over a single
-physical link.  Each such virtual circuit may (and almost always does) lead
-to a different geographical location and, therefore, different network.  As a
-result, it is the virtual circuit, not the physical link, that represents a
-route and, therefore, a network interface in Linux terms.
-
-To further complicate things, virtual circuits are usually volatile in nature
-(excluding so called `permanent' virtual circuits or PVCs).  With almost no
-time required to set up and tear down a virtual circuit, it is highly desirable
-to implement on-demand connections in order to minimize network charges.  So
-unlike a typical network driver, the WAN driver must be able to handle multiple
-network interfaces and cope as multiple virtual circuits come into existence
-and go away dynamically.
- 
-Last, but not least, WAN configuration is much more complex than that of say
-Ethernet and may well amount to several dozens of parameters.  Some of them
-are link-wide  while others are virtual circuit-specific.  The same holds
-true for WAN statistics which is by far more extensive and extremely useful
-when troubleshooting WAN connections.  Extending the ifconfig utility to suit
-these needs may be possible, but does not seem quite reasonable.  Therefore, a
-WAN configuration utility and corresponding application programmer's interface
-is needed for this purpose.
-
-Most of these problems are taken care of by this module.  Its goal is to
-provide a user with more-or-less standard look and feel for all WAN devices and
-assist a WAN device driver writer by providing common services, such as:
-
- o User-level interface via /proc file system
- o Centralized configuration
- o

[2.6 patch] unexport ip6_find_1stfragopt

2008-02-22 Thread Adrian Bunk
This patch removes the no longer used 
EXPORT_SYMBOL_GPL(ip6_find_1stfragopt).

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 30 Jan 2008

961bcbf7370019e35920a75d2d34c91b71708dfe 
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 15c4f6c..ca707c0 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -595,7 +595,6 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr)
 
return offset;
 }
-EXPORT_SYMBOL_GPL(ip6_find_1stfragopt);
 
 static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
 {


--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6.25 patch] fix broken error handling in ieee80211_sta_process_addba_request()

2008-02-19 Thread Adrian Bunk
The Coverity checker spotted this buggy error handling added by
commit 07db218396650933abff3c5c1ad1e2a6e0cfedeb.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
6003e3d899a8fd6425ff509363b776f8807df25d diff --git 
a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 2019b4f..094565e 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct 
net_device *dev,
/* prepare reordering buffer */
tid_agg_rx-reorder_buf =
kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC);
-   if ((!tid_agg_rx-reorder_buf)  net_ratelimit()) {
-   printk(KERN_ERR can not allocate reordering buffer 
-   to tid %d\n, tid);
+   if (!tid_agg_rx-reorder_buf) {
+   if (net_ratelimit())
+   printk(KERN_ERR can not allocate reordering buffer 
+   to tid %d\n, tid);
goto end;
}
memset(tid_agg_rx-reorder_buf, 0,

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC: 2.6.25 patch] ipv4/fib_hash.c: fix NULL dereference

2008-02-19 Thread Adrian Bunk
Unless I miss a guaranteed relation between between f and 
new_fa-fa_info this patch is required for fixing a NULL dereference
introduced by commit a6501e080c318f8d4467679d17807f42b3a33cd5 and 
spotted by the Coverity checker.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 net/ipv4/fib_hash.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

--- linux-2.6/net/ipv4/fib_hash.c.old   2008-02-19 23:23:14.0 +0200
+++ linux-2.6/net/ipv4/fib_hash.c   2008-02-19 23:38:28.0 +0200
@@ -367,17 +367,18 @@ static struct fib_node *fib_find_node(st
}
 
return NULL;
 }
 
 static int fn_hash_insert(struct fib_table *tb, struct fib_config *cfg)
 {
struct fn_hash *table = (struct fn_hash *) tb-tb_data;
-   struct fib_node *new_f, *f;
+   struct fib_node *new_f = NULL;
+   struct fib_node *f;
struct fib_alias *fa, *new_fa;
struct fn_zone *fz;
struct fib_info *fi;
u8 tos = cfg-fc_tos;
__be32 key;
int err;
 
if (cfg-fc_dst_len  32)
@@ -491,33 +492,32 @@ static int fn_hash_insert(struct fib_tab
}
 
err = -ENOENT;
if (!(cfg-fc_nlflags  NLM_F_CREATE))
goto out;
 
err = -ENOBUFS;
 
-   new_f = NULL;
if (!f) {
new_f = kmem_cache_zalloc(fn_hash_kmem, GFP_KERNEL);
if (new_f == NULL)
goto out;
 
INIT_HLIST_NODE(new_f-fn_hash);
INIT_LIST_HEAD(new_f-fn_alias);
new_f-fn_key = key;
f = new_f;
}
 
new_fa = f-fn_embedded_alias;
if (new_fa-fa_info != NULL) {
new_fa = kmem_cache_alloc(fn_alias_kmem, GFP_KERNEL);
if (new_fa == NULL)
-   goto out_free_new_f;
+   goto out;
}
new_fa-fa_info = fi;
new_fa-fa_tos = tos;
new_fa-fa_type = cfg-fc_type;
new_fa-fa_scope = cfg-fc_scope;
new_fa-fa_state = 0;
 
/*
@@ -535,19 +535,19 @@ static int fn_hash_insert(struct fib_tab
if (new_f)
fz-fz_nent++;
rt_cache_flush(-1);
 
rtmsg_fib(RTM_NEWROUTE, key, new_fa, cfg-fc_dst_len, tb-tb_id,
  cfg-fc_nlinfo, 0);
return 0;
 
-out_free_new_f:
-   kmem_cache_free(fn_hash_kmem, new_f);
 out:
+   if (new_f)
+   kmem_cache_free(fn_hash_kmem, new_f);
fib_release_info(fi);
return err;
 }
 
 
 static int fn_hash_delete(struct fib_table *tb, struct fib_config *cfg)
 {
struct fn_hash *table = (struct fn_hash*)tb-tb_data;

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/phy/mdio_bus.c: fix a check-after-use

2008-02-19 Thread Adrian Bunk
This patch fixes a check-after-use spotted by the Coverity checker.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
6beeb3ac577d74d72b2f91bd654eecb904c3c17e diff --git 
a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 6e9f619..963630c 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -49,13 +49,13 @@ int mdiobus_register(struct mii_bus *bus)
int i;
int err = 0;
 
-   mutex_init(bus-mdio_lock);
-
if (NULL == bus || NULL == bus-name ||
NULL == bus-read ||
NULL == bus-write)
return -EINVAL;
 
+   mutex_init(bus-mdio_lock);
+
if (bus-reset)
bus-reset(bus);
 

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove include/linux/netfilter_ipv4/ipt_SAME.h

2008-02-17 Thread Adrian Bunk
This patch removes the no longer used include/linux/netfilter_ipv4/ipt_SAME.h

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 include/linux/netfilter_ipv4/Kbuild |1 -
 include/linux/netfilter_ipv4/ipt_SAME.h |   19 ---
 2 files changed, 20 deletions(-)

553bf355efd03581a094d8a4e0b278e04228aae8 diff --git 
a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild
index 3a7105b..646d104 100644
--- a/include/linux/netfilter_ipv4/Kbuild
+++ b/include/linux/netfilter_ipv4/Kbuild
@@ -7,7 +7,6 @@ header-y += ipt_LOG.h
 header-y += ipt_MARK.h
 header-y += ipt_NFQUEUE.h
 header-y += ipt_REJECT.h
-header-y += ipt_SAME.h
 header-y += ipt_TCPMSS.h
 header-y += ipt_TOS.h
 header-y += ipt_TTL.h
diff --git a/include/linux/netfilter_ipv4/ipt_SAME.h 
b/include/linux/netfilter_ipv4/ipt_SAME.h
deleted file mode 100644
index be6e682..000
--- a/include/linux/netfilter_ipv4/ipt_SAME.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _IPT_SAME_H
-#define _IPT_SAME_H
-
-#define IPT_SAME_MAX_RANGE 10
-
-#define IPT_SAME_NODST 0x01
-
-struct ipt_same_info
-{
-   unsigned char info;
-   u_int32_t rangesize;
-   u_int32_t ipnum;
-   u_int32_t *iparray;
-
-   /* hangs off end. */
-   struct nf_nat_range range[IPT_SAME_MAX_RANGE];
-};
-
-#endif /*_IPT_SAME_H*/

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] unexport __inet_hash_connect

2008-02-13 Thread Adrian Bunk
This patch removes the unused EXPORT_SYMBOL_GPL(__inet_hash_connect).

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
ffa30930d4ba630514fd93ded245456f05358140 diff --git 
a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 9cac6c0..e6a0072 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -494,7 +494,6 @@ out:
return ret;
}
 }
-EXPORT_SYMBOL_GPL(__inet_hash_connect);
 
 /*
  * Bind a port for a connect operation and hash it.

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] unexport inet_listen_wlock

2008-02-13 Thread Adrian Bunk
This patch removes the no linger used EXPORT_SYMBOL(inet_listen_wlock).

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
08c580a0a3219ce72f5c534c8868e75c4c224e01 diff --git 
a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index e6a0072..1aba606 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -120,8 +120,6 @@ void inet_listen_wlock(struct inet_hashinfo *hashinfo)
}
 }
 
-EXPORT_SYMBOL(inet_listen_wlock);
-
 /*
  * Don't inline this cruft. Here are some nice properties to exploit here. The
  * BSD API does not allow a listening sock to specify the remote port nor the

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make s2io.c:init_tti() static

2008-02-13 Thread Adrian Bunk
This patch makes the needlessly global init_tti() static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 30 Jan 2008

1e8c2b07be955b181814e4c24366517a66557908 
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 5fab7d7..bc94e84 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -1088,7 +1088,7 @@ static int s2io_print_pci_mode(struct s2io_nic *nic)
  *  '-1' on failure
  */
 
-int init_tti(struct s2io_nic *nic, int link)
+static int init_tti(struct s2io_nic *nic, int link)
 {
struct XENA_dev_config __iomem *bar0 = nic-bar0;
register u64 val64 = 0;

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/phy/fixed.c: fix a use-after-free

2008-02-02 Thread Adrian Bunk
This patch fixes a use-after-free introduced by
commit a79d8e93d300adb8438ac396cfb118c238ad and spotted by the 
Coverity checker.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
20c51455b2faed63c3026fd4d7139e5a6a917d31 
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 73b6d39..ca9b040 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -236,12 +236,12 @@ module_init(fixed_mdio_bus_init);
 static void __exit fixed_mdio_bus_exit(void)
 {
struct fixed_mdio_bus *fmb = platform_fmb;
-   struct fixed_phy *fp;
+   struct fixed_phy *fp, *tmp;
 
mdiobus_unregister(fmb-mii_bus);
platform_device_unregister(pdev);
 
-   list_for_each_entry(fp, fmb-phys, node) {
+   list_for_each_entry_safe(fp, tmp, fmb-phys, node) {
list_del(fp-node);
kfree(fp);
}

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


inet6_hash_connect() no longer uses secure_ipv6_port_ephemeral()

2008-02-02 Thread Adrian Bunk
I do not claim to understand this code, but it doesn't seem to be 
intentional that after commit 5ee31fc1ecdcbc234c8c56dcacef87c8e09909d8 
inet6_hash_connect() now uses secure_ipv4_port_ephemeral() instead of 
secure_ipv6_port_ephemeral() (inet6_sk_port_offset() is no longer 
used and __inet_hash_connect() uses secure_ipv4_port_ephemeral()
through inet_sk_port_offset())?

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] xfrm4_beet_input(): fix an if()

2008-02-02 Thread Adrian Bunk
A bug every C programmer makes at some point in time...

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
3125760a05c6e97097882a810dc1c5342296aae9 
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c
index e093a7b..b47030b 100644
--- a/net/ipv4/xfrm4_mode_beet.c
+++ b/net/ipv4/xfrm4_mode_beet.c
@@ -102,7 +102,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct 
sk_buff *skb)
 
XFRM_MODE_SKB_CB(skb)-protocol = ph-nexthdr;
 
-   if (!pskb_may_pull(skb, phlen));
+   if (!pskb_may_pull(skb, phlen))
goto out;
__skb_pull(skb, phlen);
}

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] rtnetlink.c: remove no longer used functions

2008-02-01 Thread Adrian Bunk
On Wed, Jan 30, 2008 at 09:04:33PM +0100, Patrick McHardy wrote:
 Adrian Bunk wrote:
 This patch #if 0's the following no longer used functions:
 - rtattr_parse()
 - rtattr_strlcpy()
 - __rtattr_parse_nested_compat()
   

 Please remove them instead.

Updated patch below.

cu
Adrian


--  snip  --


This patch removes the following no longer used functions:
- rtattr_parse()
- rtattr_strlcpy()
- __rtattr_parse_nested_compat()

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 include/linux/rtnetlink.h |   12 --
 net/core/rtnetlink.c  |   44 --
 2 files changed, 56 deletions(-)

dcfe6b63a05c4944afcfc22fd4f2d2b495dc04c6 
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index b014f6b..b9e1740 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -602,24 +602,12 @@ struct tcamsg
 
 #include linux/mutex.h
 
-extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t 
size);
 static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str)
 {
int len = strlen(str) + 1;
return len  rta-rta_len || memcmp(RTA_DATA(rta), str, len);
 }
 
-extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, 
int len);
-extern int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr,
-   struct rtattr *rta, int len);
-
-#define rtattr_parse_nested(tb, max, rta) \
-   rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta)))
-
-#define rtattr_parse_nested_compat(tb, max, rta, data, len) \
-({ data = RTA_PAYLOAD(rta) = len ? RTA_DATA(rta) : NULL; \
-   __rtattr_parse_nested_compat(tb, max, rta, len); })
-
 extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 
group, int echo);
 extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid);
 extern int rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 
group,
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index ddbdde8..61ac8d0 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -82,32 +82,6 @@ int rtnl_trylock(void)
return mutex_trylock(rtnl_mutex);
 }
 
-int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len)
-{
-   memset(tb, 0, sizeof(struct rtattr*)*maxattr);
-
-   while (RTA_OK(rta, len)) {
-   unsigned flavor = rta-rta_type;
-   if (flavor  flavor = maxattr)
-   tb[flavor-1] = rta;
-   rta = RTA_NEXT(rta, len);
-   }
-   return 0;
-}
-
-int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr,
-struct rtattr *rta, int len)
-{
-   if (RTA_PAYLOAD(rta)  len)
-   return -1;
-   if (RTA_PAYLOAD(rta) = RTA_ALIGN(len) + sizeof(struct rtattr)) {
-   rta = RTA_DATA(rta) + RTA_ALIGN(len);
-   return rtattr_parse_nested(tb, maxattr, rta);
-   }
-   memset(tb, 0, sizeof(struct rtattr *) * maxattr);
-   return 0;
-}
-
 static struct rtnl_link *rtnl_msg_handlers[NPROTO];
 
 static inline int rtm_msgindex(int msgtype)
@@ -442,21 +416,6 @@ void __rta_fill(struct sk_buff *skb, int attrtype, int 
attrlen, const void *data
memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size);
 }
 
-size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size)
-{
-   size_t ret = RTA_PAYLOAD(rta);
-   char *src = RTA_DATA(rta);
-
-   if (ret  0  src[ret - 1] == '\0')
-   ret--;
-   if (size  0) {
-   size_t len = (ret = size) ? size - 1 : ret;
-   memset(dest, 0, size);
-   memcpy(dest, src, len);
-   }
-   return ret;
-}
-
 int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned 
group, int echo)
 {
struct sock *rtnl = net-rtnl;
@@ -1411,9 +1370,6 @@ void __init rtnetlink_init(void)
 }
 
 EXPORT_SYMBOL(__rta_fill);
-EXPORT_SYMBOL(rtattr_strlcpy);
-EXPORT_SYMBOL(rtattr_parse);
-EXPORT_SYMBOL(__rtattr_parse_nested_compat);
 EXPORT_SYMBOL(rtnetlink_put_metrics);
 EXPORT_SYMBOL(rtnl_lock);
 EXPORT_SYMBOL(rtnl_trylock);

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove obsolete tokenring maintainer information

2008-02-01 Thread Adrian Bunk
- Peter's email address is bouncing
- the project webpage no longer exists
- neither Peter nor Mike had a single patch included in the kernel
  since 2.6.12-rc2 (when the git history begins)

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 MAINTAINERS |   23 ---
 1 file changed, 23 deletions(-)

c6ad2e060090ec05fb0cb58f885079360ad48234 
diff --git a/MAINTAINERS b/MAINTAINERS
index ba05e80..f09e844 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -84,13 +84,6 @@ S: Status, one of the following:
it has been replaced by a better system and you
should be using that.
 
-3C359 NETWORK DRIVER
-P: Mike Phillips
-M: [EMAIL PROTECTED]
-L: netdev@vger.kernel.org
-W: http://www.linuxtr.net
-S: Maintained
-
 3C505 NETWORK DRIVER
 P: Philip Blundell
 M: [EMAIL PROTECTED]
@@ -2864,15 +2857,6 @@ L:   [EMAIL PROTECTED]
 W: http://oss.oracle.com/projects/ocfs2/
 S: Supported
 
-OLYMPIC NETWORK DRIVER
-P: Peter De Shrijver
-M: [EMAIL PROTECTED]
-P: Mike Phillips
-M: [EMAIL PROTECTED]
-L: netdev@vger.kernel.org
-W: http://www.linuxtr.net
-S: Maintained
-
 OMNIKEY CARDMAN 4000 DRIVER
 P: Harald Welte
 M: [EMAIL PROTECTED]
@@ -3786,13 +3770,6 @@ L:   [EMAIL PROTECTED] (subscribers-only)
 W: http://sourceforge.net/projects/tlan/
 S: Maintained
 
-TOKEN-RING NETWORK DRIVER
-P: Mike Phillips
-M: [EMAIL PROTECTED]
-L: netdev@vger.kernel.org
-W: http://www.linuxtr.net
-S: Maintained
-
 TOSHIBA ACPI EXTRAS DRIVER
 P: John Belmonte
 M: [EMAIL PROTECTED]

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Strange commit 42a73808ed4f30b739eb52bcbb33a02fe62ceef5

2008-01-30 Thread Adrian Bunk
Commit 42a73808ed4f30b739eb52bcbb33a02fe62ceef5
([RAW]: Consolidate proc interface.) did not only change raw6_seq_ops
(including adding 3 EXPORT_SYMBOL_GPL's to net/ipv4/raw.c for accessing 
functions from there), it also removed the only user of raw6_seq_ops...

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] via-rhine.c:rhine_hw_init() must be __devinit

2008-01-30 Thread Adrian Bunk
Thie patch fixes the following section mismatch:

--  snip  --

...
WARNING: drivers/net/built-in.o(.text+0xdd840): Section mismatch in reference 
from the function rhine_hw_init() to the function 
.devinit.text:rhine_reload_eeprom()
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
a79db62b73dab2b71fa2f47398fd39364d7aae31 
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 87c180b..7c851b1 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -606,7 +606,7 @@ static int rhine_napipoll(struct napi_struct *napi, int 
budget)
 }
 #endif
 
-static void rhine_hw_init(struct net_device *dev, long pioaddr)
+static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr)
 {
struct rhine_private *rp = netdev_priv(dev);
 

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] olympic_open() must be __devinit

2008-01-30 Thread Adrian Bunk
This patch fixes the following section mismatch:

--  snip  --

...
WARNING: drivers/net/built-in.o(.text+0x155573): Section mismatch in reference 
from the function olympic_open() to the function .devinit.text:olympic_init()
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
fd1e6e0bb5b17dc85cd24d6263e8751e816f59e6 
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index e7b4adc..433c994 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -434,7 +434,7 @@ static int __devinit olympic_init(struct net_device *dev)
 
 }
 
-static int olympic_open(struct net_device *dev) 
+static int __devinit olympic_open(struct net_device *dev) 
 {
struct olympic_private *olympic_priv=netdev_priv(dev);
u8 __iomem *olympic_mmio=olympic_priv-olympic_mmio,*init_srb;


--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] ibmlana_adapter_names[] must be __devinitdata

2008-01-30 Thread Adrian Bunk
This patch fixes the following section mismatch:

--  snip  --

...
WARNING: drivers/net/built-in.o(.devinit.text+0x1baa4): Section mismatch in 
reference from the function ibmlana_init_one() to the variable 
.init.data:ibmlana_adapter_names
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
50492d4a3ae5358858e6db3572370fb874203074 
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
index 4ccc1cd..95e3464 100644
--- a/drivers/net/ibmlana.c
+++ b/drivers/net/ibmlana.c
@@ -901,7 +901,7 @@ static short ibmlana_adapter_ids[] __initdata = {
0x
 };
 
-static char *ibmlana_adapter_names[] __initdata = {
+static char *ibmlana_adapter_names[] __devinitdata = {
IBM LAN Adapter/A,
NULL
 };

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] ibmlana_init_one() must be __devinit

2008-01-30 Thread Adrian Bunk
This patch fixes the following section mismatch:

--  snip  --

...
WARNING: drivers/net/built-in.o(.text+0x1148a5): Section mismatch in reference 
from the function ibmlana_init_one() to the variable 
.init.data:ibmlana_adapter_names
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
ec20d90864ce5b935b10bb9190be09686aa94904 
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
index 46e2c52..4ccc1cd 100644
--- a/drivers/net/ibmlana.c
+++ b/drivers/net/ibmlana.c
@@ -906,7 +906,7 @@ static char *ibmlana_adapter_names[] __initdata = {
NULL
 };
 
-static int ibmlana_init_one(struct device *kdev)
+static int __devinit ibmlana_init_one(struct device *kdev)
 {
struct mca_device *mdev = to_mca_device(kdev);
struct net_device *dev;


--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/xfrm/: remove unused exports

2008-01-30 Thread Adrian Bunk
This patch removes the following no longer used EXPORT_SYMBOL's:
- xfrm_input.c: xfrm_parse_spi
- xfrm_state.c: xfrm_replay_check
- xfrm_state.c: xfrm_replay_advance

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 net/xfrm/xfrm_input.c |1 -
 net/xfrm/xfrm_state.c |2 --
 2 files changed, 3 deletions(-)

03a968fa089d9d1a700875af339b263b6fff4ff3 
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 039e701..d32b67a 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -81,7 +81,6 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 
*spi, __be32 *seq)
*seq = *(__be32*)(skb_transport_header(skb) + offset_seq);
return 0;
 }
-EXPORT_SYMBOL(xfrm_parse_spi);
 
 int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb)
 {
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 3003503..15daed0 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1645,7 +1645,6 @@ err:
xfrm_audit_state_replay(x, skb, net_seq);
return -EINVAL;
 }
-EXPORT_SYMBOL(xfrm_replay_check);
 
 void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq)
 {
@@ -1667,7 +1666,6 @@ void xfrm_replay_advance(struct xfrm_state *x, __be32 
net_seq)
if (xfrm_aevent_is_on())
xfrm_replay_notify(x, XFRM_REPLAY_UPDATE);
 }
-EXPORT_SYMBOL(xfrm_replay_advance);
 
 static LIST_HEAD(xfrm_km_list);
 static DEFINE_RWLOCK(xfrm_km_lock);

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] unexport sysctl_tcp_tso_win_divisor

2008-01-30 Thread Adrian Bunk
This patch removes the no longer used 
EXPORT_SYMBOL(sysctl_tcp_tso_win_divisor).

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
4884e7997ba5f63f2efeaeead21ed2768fb3f4de 
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 89f0188..ed750f9 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2564,5 +2564,4 @@ EXPORT_SYMBOL(tcp_connect);
 EXPORT_SYMBOL(tcp_make_synack);
 EXPORT_SYMBOL(tcp_simple_retransmit);
 EXPORT_SYMBOL(tcp_sync_mss);
-EXPORT_SYMBOL(sysctl_tcp_tso_win_divisor);
 EXPORT_SYMBOL(tcp_mtup_init);

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] unexport ip6_find_1stfragopt

2008-01-30 Thread Adrian Bunk
This patch removes the no longer used 
EXPORT_SYMBOL_GPL(ip6_find_1stfragopt).

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
961bcbf7370019e35920a75d2d34c91b71708dfe 
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 15c4f6c..ca707c0 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -595,7 +595,6 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr)
 
return offset;
 }
-EXPORT_SYMBOL_GPL(ip6_find_1stfragopt);
 
 static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
 {

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] IBMLANA no longer has to depend on MCA_LEGACY

2008-01-30 Thread Adrian Bunk
This patch removes the no longer required dependency of IBMLANA
on MCA_LEGACY.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
d83989118e59f403200ea9c71d2293337b49df01 
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index af40ff4..578ae2c 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1199,7 +1199,7 @@ config NE2_MCA
 
 config IBMLANA
tristate IBM LAN Adapter/A support
-   depends on MCA  MCA_LEGACY
+   depends on MCA
---help---
  This is a Micro Channel Ethernet adapter.  You need to set
  CONFIG_MCA to use this driver.  It is both available as an in-kernel

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] e1000e/ethtool.c: make a function static

2008-01-30 Thread Adrian Bunk
This patch makes the needlessly global reg_pattern_test_array() static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
ed72e457f06311390d9a9e51a00c904939466aff 
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 6d9c27f..a2034cf 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -690,8 +690,8 @@ err_setup:
return err;
 }
 
-bool reg_pattern_test_array(struct e1000_adapter *adapter, u64 *data,
-   int reg, int offset, u32 mask, u32 write)
+static bool reg_pattern_test_array(struct e1000_adapter *adapter, u64 *data,
+  int reg, int offset, u32 mask, u32 write)
 {
int i;
u32 read;

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make struct ipv4_devconf static

2008-01-30 Thread Adrian Bunk
struct ipv4_devconf can now become static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 include/linux/inetdevice.h |2 --
 net/ipv4/devinet.c |2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

20262a3317069b1bdbf2b37f4002fa5322445914 
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index 8d9eaae..fc4e3db 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -17,8 +17,6 @@ struct ipv4_devconf
DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1);
 };
 
-extern struct ipv4_devconf ipv4_devconf;
-
 struct in_device
 {
struct net_device   *dev;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 21f71bf..5ab5acc 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -64,7 +64,7 @@
 #include net/rtnetlink.h
 #include net/net_namespace.h
 
-struct ipv4_devconf ipv4_devconf = {
+static struct ipv4_devconf ipv4_devconf = {
.data = {
[NET_IPV4_CONF_ACCEPT_REDIRECTS - 1] = 1,
[NET_IPV4_CONF_SEND_REDIRECTS - 1] = 1,

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make nf_ct_path[] static

2008-01-30 Thread Adrian Bunk
This patch makes the needlessly global nf_ct_path[] static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
6396fbcebe3eb61f7e6eb1a671920a515912b005 
diff --git a/net/netfilter/nf_conntrack_standalone.c 
b/net/netfilter/nf_conntrack_standalone.c
index 696074a..5bd38a6 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -380,7 +380,7 @@ static ctl_table nf_ct_netfilter_table[] = {
{ .ctl_name = 0 }
 };
 
-struct ctl_path nf_ct_path[] = {
+static struct ctl_path nf_ct_path[] = {
{ .procname = net, .ctl_name = CTL_NET, },
{ }
 };

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] rtnetlink.c: #if 0 no longer used functions

2008-01-30 Thread Adrian Bunk
This patch #if 0's the following no longer used functions:
- rtattr_parse()
- rtattr_strlcpy()
- __rtattr_parse_nested_compat()

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 include/linux/rtnetlink.h |   12 
 net/core/rtnetlink.c  |9 ++---
 2 files changed, 6 insertions(+), 15 deletions(-)

06cd9ace5f9ca3d8070364d33ca76d1fa4cd203b 
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index b014f6b..b9e1740 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -602,24 +602,12 @@ struct tcamsg
 
 #include linux/mutex.h
 
-extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t 
size);
 static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str)
 {
int len = strlen(str) + 1;
return len  rta-rta_len || memcmp(RTA_DATA(rta), str, len);
 }
 
-extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, 
int len);
-extern int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr,
-   struct rtattr *rta, int len);
-
-#define rtattr_parse_nested(tb, max, rta) \
-   rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta)))
-
-#define rtattr_parse_nested_compat(tb, max, rta, data, len) \
-({ data = RTA_PAYLOAD(rta) = len ? RTA_DATA(rta) : NULL; \
-   __rtattr_parse_nested_compat(tb, max, rta, len); })
-
 extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 
group, int echo);
 extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid);
 extern int rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 
group,
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index ddbdde8..a689f17 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -82,6 +82,8 @@ int rtnl_trylock(void)
return mutex_trylock(rtnl_mutex);
 }
 
+#if 0
+
 int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len)
 {
memset(tb, 0, sizeof(struct rtattr*)*maxattr);
@@ -108,6 +110,8 @@ int __rtattr_parse_nested_compat(struct rtattr *tb[], int 
maxattr,
return 0;
 }
 
+#endif  /*  0  */
+
 static struct rtnl_link *rtnl_msg_handlers[NPROTO];
 
 static inline int rtm_msgindex(int msgtype)
@@ -442,6 +446,7 @@ void __rta_fill(struct sk_buff *skb, int attrtype, int 
attrlen, const void *data
memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size);
 }
 
+#if 0
 size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size)
 {
size_t ret = RTA_PAYLOAD(rta);
@@ -456,6 +461,7 @@ size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, 
size_t size)
}
return ret;
 }
+#endif  /*  0  */
 
 int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned 
group, int echo)
 {
@@ -1411,9 +1417,6 @@ void __init rtnetlink_init(void)
 }
 
 EXPORT_SYMBOL(__rta_fill);
-EXPORT_SYMBOL(rtattr_strlcpy);
-EXPORT_SYMBOL(rtattr_parse);
-EXPORT_SYMBOL(__rtattr_parse_nested_compat);
 EXPORT_SYMBOL(rtnetlink_put_metrics);
 EXPORT_SYMBOL(rtnl_lock);
 EXPORT_SYMBOL(rtnl_trylock);

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make net/802/tr.c:sysctl_tr_rif_timeout static

2008-01-30 Thread Adrian Bunk
sysctl_tr_rif_timeout can now become static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
e5accd81b924224d40a3f38204c08cf6896ed79b 
diff --git a/net/802/tr.c b/net/802/tr.c
index 3f16b17..18c6647 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -76,7 +76,7 @@ static DEFINE_SPINLOCK(rif_lock);
 
 static struct timer_list rif_timer;
 
-int sysctl_tr_rif_timeout = 60*10*HZ;
+static int sysctl_tr_rif_timeout = 60*10*HZ;
 
 static inline unsigned long rif_hash(const unsigned char *addr)
 {

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make e1000_dump_eeprom() static

2008-01-30 Thread Adrian Bunk
This patch makes the needlessly global e1000_dump_eeprom() static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
b5fd924a1388d4aaa94cf05e42e317c2b1fb5748 
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7f5b2ae..8a6645b 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -820,7 +820,7 @@ e1000_reset(struct e1000_adapter *adapter)
 /**
  *  Dump the eeprom for users having checksum issues
  **/
-void e1000_dump_eeprom(struct e1000_adapter *adapter)
+static void e1000_dump_eeprom(struct e1000_adapter *adapter)
 {
struct net_device *netdev = adapter-netdev;
struct ethtool_eeprom eeprom;

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/sunqe.c section fix

2008-01-30 Thread Adrian Bunk
This patch fixes the following section mismatch:

--  snip  --

...
WARNING: drivers/net/sunqe.o(.devinit.text+0x4): Section mismatch in reference 
from the function qec_sbus_probe() to the function .init.text:qec_ether_init()
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/sunqe.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

bee65cb0dd698bbda02b1087bffed51e3a2488cb 
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index ff23c64..e811331 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -747,7 +747,7 @@ static inline void qec_init_once(struct sunqec *qecp, 
struct sbus_dev *qsdev)
qecp-gregs + GLOB_RSIZE);
 }
 
-static u8 __init qec_get_burst(struct device_node *dp)
+static u8 __devinit qec_get_burst(struct device_node *dp)
 {
u8 bsizes, bsizes_more;
 
@@ -767,7 +767,7 @@ static u8 __init qec_get_burst(struct device_node *dp)
return bsizes;
 }
 
-static struct sunqec * __init get_qec(struct sbus_dev *child_sdev)
+static struct sunqec * __devinit get_qec(struct sbus_dev *child_sdev)
 {
struct sbus_dev *qec_sdev = child_sdev-parent;
struct sunqec *qecp;
@@ -823,7 +823,7 @@ fail:
return NULL;
 }
 
-static int __init qec_ether_init(struct sbus_dev *sdev)
+static int __devinit qec_ether_init(struct sbus_dev *sdev)
 {
static unsigned version_printed;
struct net_device *dev;

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/sunbmac.c section fix

2008-01-30 Thread Adrian Bunk
This patch fixes the following section mismatch:

--  snip  --

...
WARNING: drivers/net/sunbmac.o(.devinit.text+0x24): Section mismatch in 
reference from the function bigmac_sbus_probe() to the function 
.init.text:bigmac_ether_init()
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
c4238b1ec3c23ec9dbe8b4da932cfd381ef0f376 
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c
index fe3ac6f..0e4a88d 100644
--- a/drivers/net/sunbmac.c
+++ b/drivers/net/sunbmac.c
@@ -1075,7 +1075,7 @@ static const struct ethtool_ops bigmac_ethtool_ops = {
.get_link   = bigmac_get_link,
 };
 
-static int __init bigmac_ether_init(struct sbus_dev *qec_sdev)
+static int __devinit bigmac_ether_init(struct sbus_dev *qec_sdev)
 {
struct net_device *dev;
static int version_printed;

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/sunvnet.c:print_version() must be __devinit

2008-01-30 Thread Adrian Bunk
This patch fixes the following section mismatches:

--  snip  --

...
WARNING: drivers/net/sunvnet.o(.text+0x220): Section mismatch in reference from 
the function print_version() to the variable .devinit.data:version
WARNING: drivers/net/sunvnet.o(.text+0x228): Section mismatch in reference from 
the function print_version() to the variable .devinit.data:version
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
f865222179806c4475cd79c2fb92ec622f88da3f 
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c
index 4a0035f..6415ce1 100644
--- a/drivers/net/sunvnet.c
+++ b/drivers/net/sunvnet.c
@@ -1130,7 +1130,7 @@ static struct vio_driver_ops vnet_vio_ops = {
.handshake_complete = vnet_handshake_complete,
 };
 
-static void print_version(void)
+static void __devinit print_version(void)
 {
static int version_printed;
 

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make s2io.c:init_tti() static

2008-01-30 Thread Adrian Bunk
This patch makes the needlessly global init_tti() static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
1e8c2b07be955b181814e4c24366517a66557908 
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 5fab7d7..bc94e84 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -1088,7 +1088,7 @@ static int s2io_print_pci_mode(struct s2io_nic *nic)
  *  '-1' on failure
  */
 
-int init_tti(struct s2io_nic *nic, int link)
+static int init_tti(struct s2io_nic *nic, int link)
 {
struct XENA_dev_config __iomem *bar0 = nic-bar0;
register u64 val64 = 0;

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Mostly revert e1000/e1000e: Move PCI-Express device IDs over to e1000e

2008-01-30 Thread Adrian Bunk
On Wed, Jan 30, 2008 at 04:51:04PM +1100, Linus Torvalds wrote:
 
 
 On Tue, 29 Jan 2008, Randy Dunlap wrote:
  
  Andrew was concerned about this when the driver was in -mm.
  He asked for a patch that would set E1000E to same value as E1000
  and I supplied that.  Auke acked it IIRC.  Other people vetoed it.  :(
 
 Yeah, I've been discussing with Jeff and the gang.
 
 I think we have agreed on a solution where the ID's show up in the old 
 driver if the new driver is not enabled at all.
 
 (And as a side note: it turns out that the problem I experienced didn't 
 come from the new e1000e driver after all, so I'll be removing the 
 EXPERIMENTAL flag again).
 
 So I'd suggest the final patch be something like this, but I'm sendign it 
 out just as an example of how we could solve this, not necessarily as a 
 final patch.
 
 Jeff, Auke, would something like this be acceptable? It makes it very 
 obvious in the driver table which entries are for the PCIE versions that 
 would be handled by the E1000E driver if it is enabled..
 
 Untested, but as mentioned, this is more of a this looks maintainable and 
 like it should solve the issues rather than anything I was planning on 
 committing now.

I don't like it:

We should aim at having exactly one driver for one card.

Your patch has effects like e.g. a kernel behaving differently when 
adding and compiling the e1000e module later compared to having it 
originally in the .config.

And fun like The card works on my machine with the e1000 driver, why 
doesn't it work in your machine with the e1000 driver?.

And in terms of maintainability, people will disable the e1000e driver 
in their kernel for working around bugs in it instead of reporting the 
bugs. Exactly what we want to not happen.

And unless we want to keep this situation forever, we anyway have to 
remove the support for the PCI-Express adapters from the e1000 driver at 
some point in time, so why not make a clear cut now? Whatever problems 
this causes will be the same now or in a few years.

   Linus

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] security/selinux/netlabel.c: fix double free

2008-01-28 Thread Adrian Bunk
This patch fixes a double free (security_netlbl_sid_to_secattr() already 
calls netlbl_secattr_destroy() when it returns !0) introduced by
commit 45c950e0f839fded922ebc0bfd59b1081cc71b70 and spotted by the 
Coverity checker.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
--- linux-2.6/security/selinux/netlabel.c.old   2008-01-23 00:38:19.0 
+0200
+++ linux-2.6/security/selinux/netlabel.c   2008-01-23 00:39:09.0 
+0200
@@ -58,22 +58,22 @@ static int selinux_netlbl_sock_setsid(st
rc = security_netlbl_sid_to_secattr(sid, secattr);
if (rc != 0)
goto sock_setsid_return;
rc = netlbl_sock_setattr(sk, secattr);
if (rc == 0) {
spin_lock_bh(sksec-nlbl_lock);
sksec-nlbl_state = NLBL_LABELED;
spin_unlock_bh(sksec-nlbl_lock);
}
 
-sock_setsid_return:
netlbl_secattr_destroy(secattr);
+sock_setsid_return:
return rc;
 }
 
 /**
  * selinux_netlbl_cache_invalidate - Invalidate the NetLabel cache
  *
  * Description:
  * Invalidate the NetLabel security attribute mapping cache.
  *
  */

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove the obsolete xircom_tulip_cb driver

2008-01-28 Thread Adrian Bunk
The xircom_tulip_cb driver has been replaced the xircom_cb driver, and 
since it depended on BROKEN_ON_SMP it e.g. was no longer present in many 
distribution kernels.

This patch therefore removes it.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/tulip/Kconfig   |   15 
 drivers/net/tulip/Makefile  |1 
 drivers/net/tulip/xircom_tulip_cb.c | 1726 
 3 files changed, 1 insertion(+), 1741 deletions(-)

fe38501034c6105dbb1ad770dafda42548357ea9 
diff --git a/drivers/net/tulip/Kconfig b/drivers/net/tulip/Kconfig
index 20ac150..d913405 100644
--- a/drivers/net/tulip/Kconfig
+++ b/drivers/net/tulip/Kconfig
@@ -141,7 +141,7 @@ config ULI526X
  be called uli526x.
  
 config PCMCIA_XIRCOM
-   tristate Xircom CardBus support (new driver)
+   tristate Xircom CardBus support
depends on CARDBUS
---help---
  This driver is for the Digital Tulip Ethernet CardBus adapters.
@@ -152,17 +152,4 @@ config PCMCIA_XIRCOM
  To compile this driver as a module, choose M here. The module will
  be called xircom_cb.  If unsure, say N.
 
-config PCMCIA_XIRTULIP
-   tristate Xircom Tulip-like CardBus support (old driver)
-   depends on CARDBUS  BROKEN_ON_SMP
-   select CRC32
-   ---help---
- This driver is for the Digital Tulip Ethernet CardBus adapters.
- It should work with most DEC 21*4*-based chips/ethercards, as well
- as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
- ASIX.
-
- To compile this driver as a module, choose M here. The module will
- be called xircom_tulip_cb.  If unsure, say N.
-
 endif # NET_TULIP
diff --git a/drivers/net/tulip/Makefile b/drivers/net/tulip/Makefile
index 451090d..200cbf7 100644
--- a/drivers/net/tulip/Makefile
+++ b/drivers/net/tulip/Makefile
@@ -2,7 +2,6 @@
 # Makefile for the Linux Tulip family network device drivers.
 #
 
-obj-$(CONFIG_PCMCIA_XIRTULIP)  += xircom_tulip_cb.o
 obj-$(CONFIG_PCMCIA_XIRCOM)+= xircom_cb.o
 obj-$(CONFIG_DM9102)   += dmfe.o
 obj-$(CONFIG_WINBOND_840)  += winbond-840.o
diff --git a/drivers/net/tulip/xircom_tulip_cb.c 
b/drivers/net/tulip/xircom_tulip_cb.c
deleted file mode 100644
index c3f8e30..000
--- a/drivers/net/tulip/xircom_tulip_cb.c
+++ /dev/null
@@ -1,1726 +0,0 @@
-/* xircom_tulip_cb.c: A Xircom CBE-100 ethernet driver for Linux. */
-/*
-   Written/copyright 1994-1999 by Donald Becker.
-
-   This software may be used and distributed according to the terms
-   of the GNU General Public License, incorporated herein by reference.
-
-   The author may be reached as [EMAIL PROTECTED], or C/O
-   Scyld Computing Corporation
-   410 Severn Ave., Suite 210
-   Annapolis MD 21403
-
-*/
-
-#define DRV_NAME   xircom_tulip_cb
-#define DRV_VERSION0.92
-#define DRV_RELDATEJune 27, 2006
-
-/* A few user-configurable values. */
-
-#define xircom_debug debug
-#ifdef XIRCOM_DEBUG
-static int xircom_debug = XIRCOM_DEBUG;
-#else
-static int xircom_debug = 1;
-#endif
-
-/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 25;
-
-#define MAX_UNITS 4
-/* Used to pass the full-duplex flag, etc. */
-static int full_duplex[MAX_UNITS];
-static int options[MAX_UNITS];
-static int mtu[MAX_UNITS]; /* Jumbo MTU for interfaces. */
-
-/* Keep the ring sizes a power of two for efficiency.
-   Making the Tx ring too large decreases the effectiveness of channel
-   bonding and packet priority.
-   There are no ill effects from too-large receive rings. */
-#define TX_RING_SIZE   16
-#define RX_RING_SIZE   32
-
-/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */
-#ifdef __alpha__
-static int rx_copybreak = 1518;
-#else
-static int rx_copybreak = 100;
-#endif
-
-/*
-  Set the bus performance register.
-   Typical: Set 16 longword cache alignment, no burst limit.
-   Cache alignment bits 15:14   Burst length 13:8
-   No alignment  0x unlimited  0800 8 
longwords
-   40008  longwords0100 1 longword 1000 16 
longwords
-   800016 longwords0200 2 longwords2000 32 
longwords
-   C00032  longwords   0400 4 longwords
-   Warning: many older 486 systems are broken and require setting 
0x00A04800
-  8 longword cache alignment, 8 longword burst.
-   ToDo: Non-Intel setting could be better.
-*/
-
-#if defined(__alpha__) || defined(__ia64__) || defined(__x86_64__)
-static int csr0 = 0x01A0 | 0xE000;
-#elif defined(__powerpc__)
-static int csr0 = 0x01B0 | 0x8000;
-#elif defined(CONFIG_SPARC)
-static int csr0 = 0x01B00080 | 0x8000;
-#elif defined(__i386__)
-static int csr0 = 0x01A0 | 0x8000;
-#else
-#warning Processor architecture undefined!
-static int csr0 = 0x00A0 | 0x4800

Re: [2.6 patch] security/selinux/netlabel.c: fix double free

2008-01-28 Thread Adrian Bunk
On Mon, Jan 28, 2008 at 05:23:46PM -0500, Paul Moore wrote:
 On Monday 28 January 2008 5:09:38 pm Adrian Bunk wrote:
  This patch fixes a double free (security_netlbl_sid_to_secattr()
  already calls netlbl_secattr_destroy() when it returns !0) introduced
  by commit 45c950e0f839fded922ebc0bfd59b1081cc71b70 and spotted by the
  Coverity checker.
 
 Hi Adrian,

Hi Paul,

 Thanks for finding this mistake, however, I'd rather see it fixed by 
 removing the netlbl_secattr_destroy() call in 
 security_netlbl_sid_to_secattr() as it really shouldn't be there 
 anymore.  We moved the matching _init() call into 
 selinux_netlbl_sock_setsid() and I'd like to see the _init() and 
 _destroy() calls done in the same function.  I can push a revised patch 
 for this if you would prefer, otherwise I'll be happy to ack an updated 
 version ...

doing the patch is trivial but you are able to write a better 
changelog for it - just push a revised patch.

 paul moore

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] atm/idt77105.c: fix section mismatch

2008-01-19 Thread Adrian Bunk
EXPORT_SYMBOL'ed code mustn't be __*init.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
--- linux-2.6/drivers/atm/idt77105.c.old2008-01-19 11:19:53.0 
+0200
+++ linux-2.6/drivers/atm/idt77105.c2008-01-19 11:20:10.0 +0200
@@ -354,13 +354,13 @@ static const struct atmphy_ops idt77105_
.ioctl =idt77105_ioctl,
.interrupt =idt77105_int,
.stop = idt77105_stop,
 };
 
 
-int __devinit idt77105_init(struct atm_dev *dev)
+int idt77105_init(struct atm_dev *dev)
 {
dev-phy = idt77105_ops;
return 0;
 }
 
 EXPORT_SYMBOL(idt77105_init);

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] atm/suni.c: fix section mismatch

2008-01-19 Thread Adrian Bunk
EXPORT_SYMBOL'ed code mustn't be __*init.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
--- linux-2.6/drivers/atm/suni.c.old2008-01-19 12:16:41.0 +0200
+++ linux-2.6/drivers/atm/suni.c2008-01-19 12:17:23.0 +0200
@@ -275,35 +275,35 @@ static int suni_stop(struct atm_dev *dev
*walk = PRIV((*walk)-dev)-next;
if (!sunis) del_timer_sync(poll_timer);
spin_unlock_irqrestore(sunis_lock,flags);
kfree(PRIV(dev));
 
return 0;
 }
 
 
 static const struct atmphy_ops suni_ops = {
.start  = suni_start,
.ioctl  = suni_ioctl,
.interrupt  = suni_int,
.stop   = suni_stop,
 };
 
 
-int __devinit suni_init(struct atm_dev *dev)
+int suni_init(struct atm_dev *dev)
 {
unsigned char mri;
 
mri = GET(MRI); /* reset SUNI */
PUT(mri | SUNI_MRI_RESET,MRI);
PUT(mri,MRI);
PUT((GET(MT)  SUNI_MT_DS27_53),MT); /* disable all tests */
REG_CHANGE(SUNI_TPOP_APM_S,SUNI_TPOP_APM_S_SHIFT,SUNI_TPOP_S_SONET,
TPOP_APM); /* use SONET */
REG_CHANGE(SUNI_TACP_IUCHP_CLP,0,SUNI_TACP_IUCHP_CLP,
TACP_IUCHP); /* idle cells */
PUT(SUNI_IDLE_PATTERN,TACP_IUCPOP);
dev-phy = suni_ops;
return 0;
 }
 
 EXPORT_SYMBOL(suni_init);

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] skge 0000:02:05: read data parity error

2008-01-14 Thread Adrian Bunk
On Mon, Jan 14, 2008 at 12:52:00PM -0800, Stephen Hemminger wrote:
 On Mon, 14 Jan 2008 20:57:49 +0100
 Oliver Pinter (Pintér Olivér) [EMAIL PROTECTED] wrote:
 
  Hi All!
  
  It is fully reproductable under 2.6.22.15, 2.6.23.13 (all tainted and
  not tainted [4 different kernel] ) and 2 different PC:
  
  [BUG] skge :02:05: read data parity error
  [BUG] skge :02:05: read data parity error
  
  steps:
  1. login as root
  2. start mc
  3. cd /sys/bus/pci/drivers/skge/:02:05.0
  4. press F3 (mcview) on resource0
  5. the system hang up, without panic or bug ... only this message
  printed 2x: [BUG] skge :02:05: read data parity error
 
 This is not a bug.
 
 The hardware has some debug registers that if accessed cause a read
 back to the host. Since this can point anywhere, it will cause errors
 or system hang.
 
 The point is don't do it.

Is it really a good idea that _reading_ files under /sys can kill your 
machine?

That sounds like a huge trap for people debugging their machine (or e.g. 
forgetting to exclude /sys from their backup).

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] skge 0000:02:05: read data parity error

2008-01-14 Thread Adrian Bunk
On Mon, Jan 14, 2008 at 10:31:03PM +0100, Oliver Pinter (Pintér Olivér) wrote:
 I think, it is a potential security breakpoint, when applications with
 root permission its read, then a machine is freezed, or only i thin
 it's?

When you are root there are infinite ways to kill your machine, so 
there's nothing security related about this issue.

 Thanks,
 Oliver

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] skge 0000:02:05: read data parity error

2008-01-14 Thread Adrian Bunk
On Mon, Jan 14, 2008 at 10:41:52PM +0100, Oliver Pinter (Pintér Olivér) wrote:
 On 1/14/08, Adrian Bunk [EMAIL PROTECTED] wrote:
  On Mon, Jan 14, 2008 at 10:31:03PM +0100, Oliver Pinter (Pintér Olivér)
  wrote:
   I think, it is a potential security breakpoint, when applications with
   root permission its read, then a machine is freezed, or only i thin
   it's?
 
  When you are root there are infinite ways to kill your machine, so
  there's nothing security related about this issue.
 
 Yes, i know, but when some application or daemons read some file with
 running root privileges, then ...
 
 thanks, then it is only a feature and not bug.

It might be a bug in the application.

But there are worse things than crashing your machine (e.g. getting your 
/etc/shadow) that can happen when someone with bad intentions can read 
files with root privileges.

 Thanks,
 Oliver

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6.24 patch] fix netx-eth.c compilation

2008-01-05 Thread Adrian Bunk
This was missed when commit e2ac455a18806b31c2d0da0a51d8740af5010b7a 
fixed the compile errors in drivers/net/netx-eth.c caused by
commit 09f75cd7bf13720738e6a196cc0107ce9a5bd5a0.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
15e5efb728c61333ca10648334185efba86c4815 
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c
index 5267e03..78d34af 100644
--- a/drivers/net/netx-eth.c
+++ b/drivers/net/netx-eth.c
@@ -169,8 +169,8 @@ static void netx_eth_receive(struct net_device *ndev)
ndev-last_rx = jiffies;
skb-protocol = eth_type_trans(skb, ndev);
netif_rx(skb);
-   dev-stats.rx_packets++;
-   dev-stats.rx_bytes += len;
+   ndev-stats.rx_packets++;
+   ndev-stats.rx_bytes += len;
 }
 
 static irqreturn_t

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: forcedeth: MAC-address reversed on resume from suspend

2008-01-02 Thread Adrian Bunk
[ original bug report: http://lkml.org/lkml/2008/1/2/253 ]

On Wed, Jan 02, 2008 at 10:48:43PM +0100, Andreas Mohr wrote:
 Hi,
 
 On Wed, Jan 02, 2008 at 10:04:49PM +0100, Richard Jonsson wrote:
  Bugreport regarding forcedeth driver.
 
  When returning from suspend-to-RAM the MAC-address byteorder is reversed. 
  After another suspend-resume cycle the MAC-address is again correct. This 
  brings a great deal of pain since the NIC is assigned a random MAC-address 
  when it is detected as invalid.
 
  I cannot say if this issue appeared recently or if it's been in the kernel 
  for a while, as I've been using wireless until recently.
 
  I read somewhere on lkml that the mac is read from the device, then 
  reversed and finally written back to the device. Can it be that it is read 
  again on resume and reversed, and then again written to the device? This 
  would explain why it's ok every other resume cycle.
 
 Uh, Use The Source, Luke?
 
 But no, I think it's simply driver dainbreadness, not a matter of
 complicated writing and reading back in reversed order.
 
 drivers/net/forcedeth.c has a nice DEV_HAS_CORRECT_MACADDR flag which is
 being enabled for certain cards (those which need this) and disabled for 
 others.
 
 The nv_probe() function then nicely obeys this flag by reversing the
 address if needed, _however_ there's another function, nv_copy_mac_to_hw(),
 which does _NOT_ obey it and simply copies the _raw_ netdev dev_addr
 to the card register (NvRegMacAddrA etc.).
 
 I don't know, this all looks a bit dirty to me, MAC reading/writing
 should have been implemented in a more central way, then those people
 wouldn't have confused heaven and hell with MAC address fiddling.
 
 And yeah, this certainly looks like a bug that should be fixed ASAP,
 unless my short analysis somehow happened to be wrong.
 (I could probably fix it, but then the forcedeth people
 most likely know better how they would like to see it implemented)
 
 Thank you for your report!
 
 Now the only thing remaining would be: is there a specific way to
 contact forcedeth-related people? I didn't find anything within a short
 search.

Cc's added.

 Andreas Mohr

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] the scheduled shaper removal

2008-01-01 Thread Adrian Bunk
This patch contains the scheduled removal of the shaper driver.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/feature-removal-schedule.txt |9 
 Documentation/networking/00-INDEX  |2 
 Documentation/networking/shaper.txt|   48 -
 drivers/net/Kconfig|   17 
 drivers/net/Makefile   |1 
 drivers/net/shaper.c   |  603 -
 include/linux/Kbuild   |1 
 include/linux/if_shaper.h  |   51 -
 8 files changed, 732 deletions(-)

307a9184aa372b39b15d7ca941a1302dbd053049 
diff --git a/Documentation/feature-removal-schedule.txt 
b/Documentation/feature-removal-schedule.txt
index a9b00f9..75e9c41 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -305,11 +305,2 @@ Who:   Thomas Gleixner [EMAIL PROTECTED]
 ---
-
-What:  shaper network driver
-When:  January 2008
-Files: drivers/net/shaper.c, include/linux/if_shaper.h
-Why:   This driver has been marked obsolete for many years.
-   It was only designed to work on lower speed links and has design
-   flaws that lead to machine crashes. The qdisc infrastructure in
-   2.4 or later kernels, provides richer features and is more robust.
-Who:   Stephen Hemminger [EMAIL PROTECTED]
 
diff --git a/Documentation/networking/00-INDEX 
b/Documentation/networking/00-INDEX
index 563e442..6196668 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -82,8 +82,6 @@ policy-routing.txt
- IP policy-based routing
 ray_cs.txt
- Raylink Wireless LAN card driver info.
-shaper.txt
-   - info on the module that can shape/limit transmitted traffic.
 sk98lin.txt
- Marvell Yukon Chipset / SysKonnect SK-98xx compliant Gigabit
  Ethernet Adapter family driver info
diff --git a/Documentation/networking/shaper.txt 
b/Documentation/networking/shaper.txt
deleted file mode 100644
index 6c4ebb6..000
--- a/Documentation/networking/shaper.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-Traffic Shaper For Linux
-
-This is the current BETA release of the traffic shaper for Linux. It works
-within the following limits:
-
-o  Minimum shaping speed is currently about 9600 baud (it can only
-shape down to 1 byte per clock tick)
-
-o  Maximum is about 256K, it will go above this but get a bit blocky.
-
-o  If you ifconfig the master device that a shaper is attached to down
-then your machine will follow.
-
-o  The shaper must be a module.
-
-
-Setup:
-
-   A shaper device is configured using the shapeconfig program.
-Typically you will do something like this
-
-shapecfg attach shaper0 eth1
-shapecfg speed shaper0 64000
-ifconfig shaper0 myhost netmask 255.255.255.240 broadcast 1.2.3.4.255 up
-route add -net some.network netmask a.b.c.d dev shaper0
-
-The shaper should have the same IP address as the device it is attached to
-for normal use.
-
-Gotchas:
-
-   The shaper shapes transmitted traffic. It's rather impossible to
-shape received traffic except at the end (or a router) transmitting it.
-
-   Gated/routed/rwhod/mrouted all see the shaper as an additional device
-and will treat it as such unless patched. Note that for mrouted you can run
-mrouted tunnels via a traffic shaper to control bandwidth usage.
-
-   The shaper is device/route based. This makes it very easy to use
-with any setup BUT less flexible. You may need to use iproute2 to set up
-multiple route tables to get the flexibility.
-
-   There is no borrowing or sharing scheme. This is a simple
-traffic limiter. We implement Van Jacobson and Sally Floyd's CBQ
-architecture into Linux 2.2. This is the preferred solution. Shaper is
-for simple or back compatible setups.
-
-Alan
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index d9107e5..1a33b6d 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -3021,23 +3021,6 @@ config NET_FC
  adaptor below. You also should have said Y to SCSI support and
  SCSI generic support.
 
-config SHAPER
-   tristate Traffic Shaper (OBSOLETE)
-   depends on EXPERIMENTAL
-   ---help---
- The traffic shaper is a virtual network device that allows you to
- limit the rate of outgoing data flow over some other network device.
- The traffic that you want to slow down can then be routed through
- these virtual devices. See
- file:Documentation/networking/shaper.txt for more information.
-
- An alternative to this traffic shaper are traffic schedulers which
- you'll get if you say Y to QoS and/or fair queuing in
- Networking options.
-
- To compile this driver as a module, choose M here: the module
- will be called shaper.  If unsure, say N.
-
 config NETCONSOLE
tristate Network console logging support (EXPERIMENTAL)
depends

Re: [PATCH] MAINTAINERS: remove Adam Fritzler, update his email address in other sources

2007-12-17 Thread Adrian Bunk
On Mon, Dec 17, 2007 at 08:28:00PM -0800, Andrew Morton wrote:
...
 I'd suggest that you find out if Adrian is still running the trivial tree
 and if so, patchbomb him.

I do.

Simply Cc [EMAIL PROTECTED] for trivial patches and they might 
magically appear in Linus' tree during the next merge window.  :)

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 01/10] e1000e: make E1000E default to the same kconfig setting as E1000

2007-12-14 Thread Adrian Bunk
On Fri, Dec 14, 2007 at 03:39:26PM -0500, Jeff Garzik wrote:
 [EMAIL PROTECTED] wrote:
 From: Randy Dunlap [EMAIL PROTECTED]
...
 So I think the breakage that occurs is mitigated by two factors:
 1) kernel hackers that do their own configs are expected to be able to 
 figure this stuff.
 2) kernel builders (read: distros, mainly) are expected to have put thought 
 into the Kconfig selection and driver migration strategies.
...
 I would prefer simply to communicate to kernel experts and builders about a 
 Kconfig issue that could potentially their booting/networking...  because 
 this patch is only needed if the kernel experts do not already know about a 
 necessary config update.

You miss the vast majority of kconfig users:

3) system administrators etc. who for different reasons compile their 
own kernels but neither are nor want to be kernel developers

There's a reason why e.g. LPI requires you to be able to compile your 
own kernel even for getting a Junior Level Linux Professional 
certificate.

Or that one of the authors of Linux Device drivers has written a book 
covering only how to build and run your own kernel.

   Jeff

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 01/10] e1000e: make E1000E default to the same kconfig setting as E1000

2007-12-14 Thread Adrian Bunk
On Fri, Dec 14, 2007 at 06:17:55PM -0500, Jeff Garzik wrote:
 Adrian Bunk wrote:
 On Fri, Dec 14, 2007 at 03:39:26PM -0500, Jeff Garzik wrote:
 [EMAIL PROTECTED] wrote:
 From: Randy Dunlap [EMAIL PROTECTED]
 ...
 So I think the breakage that occurs is mitigated by two factors:
 1) kernel hackers that do their own configs are expected to be able to 
 figure this stuff.
 2) kernel builders (read: distros, mainly) are expected to have put 
 thought into the Kconfig selection and driver migration strategies.
 ...
 I would prefer simply to communicate to kernel experts and builders about 
 a Kconfig issue that could potentially their booting/networking...  
 because this patch is only needed if the kernel experts do not already 
 know about a necessary config update.

 You miss the vast majority of kconfig users:

 3) system administrators etc. who for different reasons compile their own 
 kernels but neither are nor want to be kernel developers

 There's a reason why e.g. LPI requires you to be able to compile your own 
 kernel even for getting a Junior Level Linux Professional certificate.

 Great!


 Or that one of the authors of Linux Device drivers has written a book 
 covering only how to build and run your own kernel.

 Nonetheless, it will always be true that configuring your own kernel 
 requires knowledge of the options you are setting.

We are not talking about Aunt Tillie, system administrator is the use 
case that might cover this (quite diverse) group of users best.

We can expect kconfig users to know what filesystems their data is on 
and to have some knowledge of their hardware, but every other knowledge 
we must give through kconfig.

   Jeff

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.24-rc5-mm1

2007-12-13 Thread Adrian Bunk
On Thu, Dec 13, 2007 at 05:07:44PM +0100, Borislav Petkov wrote:
 On Thu, Dec 13, 2007 at 04:01:34PM +0100, Benjamin Thery wrote:
  The problem comes from the new macro UDPX_INC_STATS_BH introduced
  by Herbert, which was a nice addition to increment the correct 
  UDP MIB depending on the socket family, but unfortunately 
  the use of this macro from kernel code (I mean code not compiled 
  as module) requires that IPv6 is also compiled in kernel 
  (CONFIG_IPv6=y) in order to have udp_stats_in6 defined at link 
  time.
  
  Benjamin
  
  Pierre Peiffer wrote:
   Hi,
   
 My config does not link any more:
   
   ...
 CHK include/linux/compile.h
 UPD include/linux/compile.h
 CC  init/version.o
 LD  init/built-in.o
 LD  .tmp_vmlinux1
   net/built-in.o: In function `xs_udp_data_ready':
   /home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:842:
   undefined reference to `udp_stats_in6'
   /home/peifferp/containers/kernel/linux-2.6.24-rc5-mm1/net/sunrpc/xprtsock.c:846:
   undefined reference to `udp_stats_in6'
   make[1]: *** [.tmp_vmlinux1] Error 1
   make: *** [sub-make] Error 2
   
   After a first look, udp_stats_in6 seems to be defined in ipv6 (file
   net/ipv6/udp.c) but I have
   
   CONFIG_IPV6=m
   and
   CONFIG_SUNRPC=y
   
   So, SUNRPC uses something defined in a module in my case ?
   
   ... looking more, this dependency seems to have been introduced by the 
   patch
   [UDP]: Restore missing inDatagrams increments
   ( http://thread.gmane.org/gmane.linux.network/79716/focus=79831 )
   
   (I cc netdev)
   
   I don't know what is the right way to fix this ... ?
 
 you might do select IPV6 in the SUNRPC section of fs/Kconfig, however 
 select is
 evil...

select itself isn't evil.

Nonsensical selects like the one you suggest (sunrpc does not require 
IPV6) are evil.

 Regards/Gruß,
 Boris.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/ipg.c: add __devexit annotation

2007-12-11 Thread Adrian Bunk
ipg_remove() can become __devexit.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
97ace7a0e52ceac30caae20e1a3fe72c4644bce7 
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index dbd23bb..285ebbc 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -2214,7 +2214,7 @@ static struct ethtool_ops ipg_ethtool_ops = {
.nway_reset   = ipg_nway_reset,
 };
 
-static void ipg_remove(struct pci_dev *pdev)
+static void __devexit ipg_remove(struct pci_dev *pdev)
 {
struct net_device *dev = pci_get_drvdata(pdev);
struct ipg_nic_private *sp = netdev_priv(dev);

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/s2io.c section fixes

2007-12-11 Thread Adrian Bunk
Code used by the non-__devinit s2io_open() mustn't be __devinit.

This patch fixes the following section mismatch with CONFIG_HOTPLUG=n:

--  snip  --

...
WARNING: vmlinux.o(.text+0x6f6e3e): Section mismatch: reference to 
.init.text.20:s2io_test_intr (between 's2io_open' and 's2io_ethtool_sset')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/s2io.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

50fb761b99d7ee0b234359d02144f84a87e2faff 
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 121cb10..9d80f1c 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3737,7 +3737,7 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
 }
 
 /* Handle software interrupt used during MSI(X) test */
-static irqreturn_t __devinit s2io_test_intr(int irq, void *dev_id)
+static irqreturn_t s2io_test_intr(int irq, void *dev_id)
 {
struct s2io_nic *sp = dev_id;
 
@@ -3748,7 +3748,7 @@ static irqreturn_t __devinit s2io_test_intr(int irq, void 
*dev_id)
 }
 
 /* Test interrupt path by forcing a a software IRQ */
-static int __devinit s2io_test_msi(struct s2io_nic *sp)
+static int s2io_test_msi(struct s2io_nic *sp)
 {
struct pci_dev *pdev = sp-pdev;
struct XENA_dev_config __iomem *bar0 = sp-bar0;
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/sis190.c section fix

2007-12-11 Thread Adrian Bunk
This patch fixes the following section mismatch with CONFIG_HOTPLUG=n:

--  snip  --

...
WARNING: vmlinux.o(.init.text.20+0x4cb25): Section mismatch: reference to 
.exit.text:sis190_mii_remove (between 'sis190_init_one' and 'read_eeprom')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
29fae057ba15a552a7cad1e731d3238d567032ba 
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 7200883..49f767b 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1381,7 +1381,7 @@ out:
return rc;
 }
 
-static void __devexit sis190_mii_remove(struct net_device *dev)
+static void sis190_mii_remove(struct net_device *dev)
 {
struct sis190_private *tp = netdev_priv(dev);
 

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: namespace support requires network modules to say GPL

2007-12-02 Thread Adrian Bunk
On Sun, Dec 02, 2007 at 09:03:56PM +0100, Patrick McHardy wrote:
 Ben Greear wrote:
 Stephen Hemminger wrote:

 Naw, enterprise (or any other) distro vendors shouldn't have any issues 
 here,
 since they can just patch their kernels around any issues.

 But it looks like Eric has this one thought out well enough.
 

 So you are saying all this is not a problem, fine.
 Any affected parties can certainly lobby for themselves. But I suspect
 they all think the kernel community is a bunch of ... and will just 
 ignore
 the problem.   
 
 I have a binary module that uses dev_get_by_name...it's sort of a 
 bridge-like thing and
 needs user-space to tell it which device to listen for packets on...

 This code doesn't need or care about name-spaces, so I don't see how it 
 could really
 be infringing on the author's code (any worse than loading a binary driver 
 into the kernel
 ever does).

 I would certainly prefer to not have to patch around any problems with 
 calling dev_get_by_name
 from a non-gpl module, but if required, I can probably figure something 
 out...


 For all I care binary modules can break, but frankly I don't see
 how encapsulating a couple of structures and pointers in a new
 structure and adding a new argument to existing functions shifts
 the decision about how a function should be usable to the namespace
 guys. IMO all functions should continue to be usable as before,
 as decided by whoever actually wrote them.
...

Even ignoring the fact that it's unclear whether distributing modules 
with not GPLv2 compatible licences is legal at all or might bring you in 
jail, your statement has an interesting implication:

Stuff like e.g. the EXPORT_SYMBOL(sk_alloc) predates the 
EXPORT_SYMBOL_GPL stuff.

Who is considered the author of this code?

And when should he state whether he prefers to use EXPORT_SYMBOL_GPL 
but wasn't able to use it at that when he wrote it since his code 
predates it and is glad to be able to decide this now?

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: namespace support requires network modules to say GPL

2007-12-02 Thread Adrian Bunk
On Sun, Dec 02, 2007 at 10:59:46PM +0100, Patrick McHardy wrote:
 Adrian Bunk wrote:
 On Sun, Dec 02, 2007 at 09:03:56PM +0100, Patrick McHardy wrote:
...
 your statement has an interesting implication:

 Stuff like e.g. the EXPORT_SYMBOL(sk_alloc) predates the EXPORT_SYMBOL_GPL 
 stuff.

 Who is considered the author of this code?

 And when should he state whether he prefers to use EXPORT_SYMBOL_GPL but 
 wasn't able to use it at that when he wrote it since his code predates it 
 and is glad to be able to decide this now?

 He can state it when he feels like it, I don't see the point.
 Authors generally get to decide whether they use EXPORT_SYMBOL
 or EXPORT_SYMBOL_GPL unless in cases where its really clear-cut
 that EXPORT_SYMBOL is inapproriate. But thats a different matter.
...

You miss my point.

Stuff like sk_alloc was exported to modules before EXPORT_SYMBOL_GPL 
existed (it was even exported to modules before EXPORT_SYMBOL existed).

We are talking about code and exports that are at about 12 years old, 
which is at about twice as old as EXPORT_SYMBOL_GPL.

So what should happen in your opinion if e.g. Alan checks which of the 
network code he had written when it was exported a dozen years ago, 
stating that he never wanted it to be available to non-GPL modules?

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC] [1/9] Core module symbol namespaces code and intro.

2007-11-28 Thread Adrian Bunk
On Wed, Nov 28, 2007 at 12:06:45AM +0100, Andi Kleen wrote:
 On Tue, Nov 27, 2007 at 03:00:22PM -0800, Stephen Hemminger wrote:
...
  of a modular ipv6 is flawed. 
 
 Modules that cannot be unloaded are still useful. Standard case: Distributions
 like to offer an option to not use ipv6 because that is popular workaround
 for the common DNS server eats  queries and causes delays issue.
 Forcing the user to rebuild the kernel for this wouldn't be practical.
 If ipv6 wasn't modular that would be hard to do.

It should be trivial doing it similar to the selinux=0 boot option.

 -Andi

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC] [1/9] Core module symbol namespaces code and intro.

2007-11-27 Thread Adrian Bunk
On Mon, Nov 26, 2007 at 11:35:42PM -0600, Tom Tucker wrote:
 On Tue, 2007-11-27 at 15:49 +1100, Rusty Russell wrote:
...
  No.  That's the wrong question.  What's the real upside?
 
 Explicitly documenting what comprises the kernel API (external,
 supported) and what comprises the kernel implementation (internal, not
 supported).
...

There is not, never was, and never will be, any supported external API 
of the kernel.
 
cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC] [1/9] Core module symbol namespaces code and intro.

2007-11-27 Thread Adrian Bunk
On Tue, Nov 27, 2007 at 10:02:22AM +0100, Andi Kleen wrote:
...
 That is EXPORT_SYMBOL already. The trouble is just that it covers
 too much. My patchkit is trying to limit it again for a specific
 use case -- exporting an internal interface to another module.
 Or rather a set of modules. 
 
 Standard example is TCP: TCP exports nearly everything and the
 single user is the TCP code in ipv6.ko. Instead those symbols should
 be limited to be only accessable to ipv6.ko. 
...

Let's forget about external modules that are anyway irrelevant for 
upstream kernel development.

Do you have past examples where this would have brought advantages 
for the upstream kernel justifying all the work required for creating 
and maintaining these namespaces?

IOW, where modules were submitted for upstream inclusion and merging 
them was impossible or much harder only because they were developed 
aginst the wrong API?

 -ANdi

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC] [1/9] Core module symbol namespaces code and intro.

2007-11-27 Thread Adrian Bunk
On Tue, Nov 27, 2007 at 11:45:37AM -0600, Tom Tucker wrote:
 
 On Tue, 2007-11-27 at 18:15 +0100, Adrian Bunk wrote:
  On Mon, Nov 26, 2007 at 11:35:42PM -0600, Tom Tucker wrote:
   On Tue, 2007-11-27 at 15:49 +1100, Rusty Russell wrote:
  ...
No.  That's the wrong question.  What's the real upside?
   
   Explicitly documenting what comprises the kernel API (external,
   supported) and what comprises the kernel implementation (internal, not
   supported).
  ...
  
  There is not, never was, and never will be, any supported external API 
  of the kernel.
 
 Philosophically I understand what you're saying, but in practical terms
 there is the issue of managing core API like kmalloc. Although kmalloc
 _could_ change, doing so would be extremely painful. In fact anyone who
 proposed such a change would have to have a profoundly powerful argument
 as to why it was necessary.

The latter should at least in theory be required for all changes no 
matter how core they are...

 I think this patchset is an attempt to make it easier to identify and
 review these kinds of interfaces.

As long as the submitter fixes all in-kernel users these interfaces are 
not handled differently from interfaces with fewer users.

And I remember at least one commit that changed  1000 files because it 
changed a frequently used driver API. [1]

cu
Adrian

[1] commit 7d12e780e003f93433d49ce78cfedf4b4c52adc5

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC] [1/9] Core module symbol namespaces code and intro.

2007-11-27 Thread Adrian Bunk
On Tue, Nov 27, 2007 at 02:00:37PM -0500, Dave Jones wrote:
 On Mon, Nov 26, 2007 at 10:25:33AM -0800, Stephen Hemminger wrote:
  
   1) Why is everyone so concerned that export symbol space is large?
  - does it cost cpu or running memory?
  - does it cause bugs?
  - or are you just worried about evil modules?
 
 To clarify something here, by evil, don't necessarily think binary only. 
 
 Out of tree modules are frequently using symbols that they shouldn't be.
 Because they get no peer-review here, they 'get away with it' for the most 
 part.
 Until distro vendors push rebased kernel updates that removed exports that
 should never have been exported, and suddenly people like me get bombed
 with Fedora broke my xyz driver mails.
...

The real problem is that these drivers are not in the upstream kernel.

Are there common reasons why these drivers are not upstream?

   Dave

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC] [1/9] Core module symbol namespaces code and intro.

2007-11-27 Thread Adrian Bunk
On Tue, Nov 27, 2007 at 01:15:23PM -0800, Rick Jones wrote:
 The real problem is that these drivers are not in the upstream kernel.

 Are there common reasons why these drivers are not upstream?

 One might be that upstream has not accepted them.  Anything doing or 
 smelling of TOE comes to mind right away.

Which modules doing or smelling of TOE do work with unmodified vendor 
kernels?

AFAIR TOE was both not a module and required some hooks in the network 
stack, so it's completely outside the scope of this thread.

 rick jones

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [2.6 patch] ipv4/arp.c:arp_process(): remove bogus #ifdef mess

2007-11-26 Thread Adrian Bunk
On Mon, Nov 26, 2007 at 11:19:26PM +0800, Herbert Xu wrote:
 On Sun, Nov 25, 2007 at 04:30:03PM +, Adrian Bunk wrote:

Please look at net/ipv4/arp.c:arp_process()

Am I right that CONFIG_NET_ETHERNET=n and CONFIG_NETDEV_1000=y or 
CONFIG_NETDEV_1=y will not be handled correctly there?

And the best solution is to nuke all #ifdef's in this function and make 
the code unconditionally available?
   
   I think removing those specific ifdefs in arp_process()
   is the best option, yes.
  
  Patch below.
 
 Thanks Adrian.  Patch applied to net-2.6.
 
 Do we need this for stable too?

Unless I'm misunderstanding the code we currently wrongly ignore 
some ARP packages based on the setting of an unrelated option, so
it seems to be a -stable candidate when it's in Linus' tree.

 Chers,

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] ipv4/arp.c:arp_process(): remove bogus #ifdef mess

2007-11-25 Thread Adrian Bunk
On Mon, Nov 19, 2007 at 09:26:39PM -0800, David Miller wrote:
 From: Adrian Bunk [EMAIL PROTECTED]
 Date: Thu, 8 Nov 2007 04:30:10 +0100
 
  @davem:
  
  Please look at net/ipv4/arp.c:arp_process()
  
  Am I right that CONFIG_NET_ETHERNET=n and CONFIG_NETDEV_1000=y or 
  CONFIG_NETDEV_1=y will not be handled correctly there?
  
  And the best solution is to nuke all #ifdef's in this function and make 
  the code unconditionally available?
 
 I think removing those specific ifdefs in arp_process()
 is the best option, yes.

Patch below.

cu
Adrian


--  snip  --


The #ifdef's in arp_process() were not only a mess, they were also wrong 
in the CONFIG_NET_ETHERNET=n and (CONFIG_NETDEV_1000=y or 
CONFIG_NETDEV_1=y) cases.

Since they are not required this patch removes them.

Also removed are some #ifdef's around #include's that caused compile 
errors after this change.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 net/ipv4/arp.c |   19 ---
 1 file changed, 19 deletions(-)

759b820456b1400b2a6b061eca9667bf7a6f053d 
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 36d6798..0c5d549 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -111,12 +111,8 @@
 #include net/tcp.h
 #include net/sock.h
 #include net/arp.h
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
 #include net/ax25.h
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
 #include net/netrom.h
-#endif
-#endif
 #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
 #include net/atmclip.h
 struct neigh_table *clip_tbl_hook;
@@ -731,20 +727,10 @@ static int arp_process(struct sk_buff *skb)
htons(dev_type) != arp-ar_hrd)
goto out;
break;
-#ifdef CONFIG_NET_ETHERNET
case ARPHRD_ETHER:
-#endif
-#ifdef CONFIG_TR
case ARPHRD_IEEE802_TR:
-#endif
-#ifdef CONFIG_FDDI
case ARPHRD_FDDI:
-#endif
-#ifdef CONFIG_NET_FC
case ARPHRD_IEEE802:
-#endif
-#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_TR) || \
-defined(CONFIG_FDDI)|| defined(CONFIG_NET_FC)
/*
 * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802
 * devices, according to RFC 2625) devices will accept ARP
@@ -759,21 +745,16 @@ static int arp_process(struct sk_buff *skb)
arp-ar_pro != htons(ETH_P_IP))
goto out;
break;
-#endif
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
case ARPHRD_AX25:
if (arp-ar_pro != htons(AX25_P_IP) ||
arp-ar_hrd != htons(ARPHRD_AX25))
goto out;
break;
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
case ARPHRD_NETROM:
if (arp-ar_pro != htons(AX25_P_IP) ||
arp-ar_hrd != htons(ARPHRD_NETROM))
goto out;
break;
-#endif
-#endif
}
 
/* Understand only these message types */

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/core/request_sock.c: remove unused exports

2007-11-17 Thread Adrian Bunk
This patch removes the following unused EXPORT_SYMBOL's:
- reqsk_queue_alloc
- __reqsk_queue_destroy
- reqsk_queue_destroy

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 net/core/request_sock.c |5 -
 1 file changed, 5 deletions(-)

3761f092ccd5d87a1517b55e2001ac9ef189b901 
diff --git a/net/core/request_sock.c b/net/core/request_sock.c
index 45aed75..2d3035d 100644
--- a/net/core/request_sock.c
+++ b/net/core/request_sock.c
@@ -69,8 +69,6 @@ int reqsk_queue_alloc(struct request_sock_queue *queue,
return 0;
 }
 
-EXPORT_SYMBOL(reqsk_queue_alloc);
-
 void __reqsk_queue_destroy(struct request_sock_queue *queue)
 {
struct listen_sock *lopt;
@@ -91,8 +89,6 @@ void __reqsk_queue_destroy(struct request_sock_queue *queue)
kfree(lopt);
 }
 
-EXPORT_SYMBOL(__reqsk_queue_destroy);
-
 static inline struct listen_sock *reqsk_queue_yank_listen_sk(
struct request_sock_queue *queue)
 {
@@ -134,4 +130,3 @@ void reqsk_queue_destroy(struct request_sock_queue *queue)
kfree(lopt);
 }
 
-EXPORT_SYMBOL(reqsk_queue_destroy);

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 07:57:54AM -0800, Ray Lee wrote:
 On Nov 13, 2007 7:24 AM, Giacomo A. Catenazzi [EMAIL PROTECTED] wrote:
  As a long time kernel tester, I see some problem with the
  newer new development model. In the short merge windows,
  after to much time, there are to many patches.
 
 I think the root issue there is that it's hard to get all testers to
 run a bisect, but easy to ask them to test snapshots. Right now the
 snapshots are generated nightly, but I think it would make more sense
 if they were generated every N patches, for some value of N...
...

I don't see a point in doing that - that would be a more manual 
bisecting, and the result would not be one guilty commit.

Testers are not expected to be able to hack a kernel, but it's 
reasonable to expect testers to be able to build their own kernels
(and your proposal wouldn't change that).

The small instruction below is enough for everyone who is able to 
build his own kernel to do a git bisect.

 Ray

cu
Adrian


--  snip  --


# install git

# clone Linus' tree:
git clone \ 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

# start bisecting:
cd linux-2.6
git bisect start
git bisect bad v2.6.21
git bisect good v2.6.20
cp /path/to/.config .

# start a round
make oldconfig
make
# install kernel, check whether it's good or bad, then:
git bisect [bad|good]
# start next round


After at about 10-15 reboots you'll have found the guilty commit
(...  is first bad commit).


More information on git bisecting:
  man git-bisect

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 12:13:56PM -0500, Theodore Tso wrote:
 On Tue, Nov 13, 2007 at 04:52:32PM +0100, Benoit Boissinot wrote:
  Btw, I used to test every -mm kernel. But since I've switched distros
  (gentoo-ubuntu)
  and I have less time, I feel it's harder to test -rc or -mm kernels (I
  know this isn't a lkml problem
  but more a distro problem, but I would love having an ubuntu blessed
  repo with current dev kernel
  for the latest stable ubuntu release).
 
 There are two parts to this.  One is a Ubuntu development kernel which
 we can give to large numbers of people to expand our testing pool.
 But if we don't do a better job of responding to bug reports that
 would be generated by expanded testing this won't necessarily help us.
...

The main problem aren't missing testers [1] - we already have relatively 
experienced people testing kernels and/or reporting bugs, and we slowly 
scare them away due to the many bug reports without any reaction.

The main problem is finding experienced developers who spend time on 
looking into bug reports.

Getting many relatively unexperienced users (who need more guidance for 
debugging issues) as additional testers is therefore IMHO not 
necessarily a good idea.

   - Ted

cu
Adrian

[1] and e.g. when Greg says he has a few hundred people who want to
write drivers it would most likely be possible to find a few
dozen additional -rc testers among them

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 12:50:08PM -0500, Mark Lord wrote:
 Ingo Molnar wrote:

 for example git-bisect was godsent. I remember that years ago bisection of 
 a bug was a very laborous task so that it was only used as a final, 
 last-ditch approach for really nasty bugs. Today we can autonomouly bisect 
 build bugs via a simple shell command around git-bisect run, without any 
 human interaction! This freed up testing resources 
 ..

 It's only a godsend for the few people who happen to be kernel developers

It's also godsend for users who want a regression they observe fixed.

If you can tell which patch broke it you often turned a very hard to 
debug problem into a relatively easy fixable problem.

As an example, [1] was an issue a normal user could discover, and 
bisecting made the difference between nearly undebuggable and
easily fixable by revertng a commit.

 and who happen to already use git.

As already said in thread, the required instructions for bisecting are 
relatively short and simple (assuming the user can build his own 
kernels).

 It's a 540MByte download over a slow link for everyone else.

Not everyone has a slow connection.

For me, the speed of cloning a tree from git.kernel.org is completely 
cpu bound and limited by the speed of the 1.8 Ghz Athlon in my 
computer...

But if there is a real life problem like people with extremely slow and 
expensive internet connections not being able to bisect bugs these 
problems should be named and fixed (e.g. by sending CDs).

 -ml

cu
Adrian

[1] http://lkml.org/lkml/2007/11/12/154

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 01:18:43PM -0500, Mark Lord wrote:
 Adrian Bunk wrote:
 On Tue, Nov 13, 2007 at 12:50:08PM -0500, Mark Lord wrote:
 Ingo Molnar wrote:
 for example git-bisect was godsent. I remember that years ago bisection 
 of a bug was a very laborous task so that it was only used as a final, 
 last-ditch approach for really nasty bugs. Today we can autonomouly 
 bisect build bugs via a simple shell command around git-bisect run, 
 without any human interaction! This freed up testing resources 
 ..

 It's only a godsend for the few people who happen to be kernel developers

 It's also godsend for users who want a regression they observe fixed.

 If you can tell which patch broke it you often turned a very hard to debug 
 problem into a relatively easy fixable problem.
 ..

 Oh yes, definitely.  When that use happens to be a kernel dev + git user,
 it saves the *fool who broke it* a hell of a lot of time, because they can
 slough it off onto the poor bloke who notices it.

fool who broke it are hard works. Bugs are part of software 
development, so you'd have to name everyone who develops software
a fool.

But the main point is that often you don't know who broke it until you 
know which commit broke it.

 Mind you, no arguing that this is effective when that poor bloke
 has a day free to download the git-tree and build/reboot a dozen times.

I did bisecting myself, and I know that it costs time and work.

But the first point is the above one that it makes otherwise nearly 
undebuggable problems debuggable and fixable.

Another point is that it shifts the work from the few experienced 
developers to the many users. Users (and voluntary testers) we have
many, but developer time for debugging bug reports is a quite scarce 
resource.

And why poor bloke? Bisecting takes time, but that's not different 
from e.g. writing code or cleaning up code or going through bug reports.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 01:47:10PM -0500, Mark Lord wrote:
 Adrian Bunk wrote:
 ...
 I did bisecting myself, and I know that it costs time and work.

 But the first point is the above one that it makes otherwise nearly 
 undebuggable problems debuggable and fixable.
 ..

 Definitely useful, no question.

 But the problem is now that kernel devs are addicted to it,
 many won't even consider resolving a problem any other way.

 That's not maintaining (or supporting) one's code.

What you replaced with two dots contained the answer to this:

Another point is that it shifts the work from the few experienced 
developers to the many users. Users (and voluntary testers) we have
many, but developer time for debugging bug reports is a quite scarce 
resource.

 And when a maintainer is too busy to find/fix their own bugs,
 that could be a sign that they've bitten off too big of a chunk
 of the kernel, and it's time for them to distribute code maintainership.

The problem is: Maintainers don't grow on trees.

You need people who are both technically capable and willing to spend 
time on the non-sexy task of debugging problems.

Where do you plan to find them?

If you don't believe me, please find a maintainer for the currently 
unmaintained parallel port support.

Or if you want a harder task, find a maintainer for the floppy driver...

 Cheers

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 02:26:05PM -0500, Mark Lord wrote:
 Adrian Bunk wrote:
 On Tue, Nov 13, 2007 at 01:47:10PM -0500, Mark Lord wrote:
 Adrian Bunk wrote:
 ..
 Another point is that it shifts the work from the few experienced 
 developers to the many users. Users (and voluntary testers) we have
 many, but developer time for debugging bug reports is a quite scarce 
 resource.

 And when a maintainer is too busy to find/fix their own bugs,
 that could be a sign that they've bitten off too big of a chunk
 of the kernel, and it's time for them to distribute code maintainership.

 The problem is: Maintainers don't grow on trees.
 ..

 Hey, if somebody has time to break things, then they damn well ought
 to be able to make time to fix them again.  And the best developers
 here on LKML do just that (fix what they break).

 You broke it, you fix it.  A simple rule.

 Translation for the particularly daft:

 If you've been making significant updates to a driver/subsystem,
 and people are reporting that it is now broken for them,

What are significant updates?

Sometimes one person makes one small patch and this patch contains
a typo.

 then it's your job to make it right.

We have some open drivers/ata/ regressions.

I see some person named Mark Lord being responsible for 4 commits.

What pubishment do you plan for him if 2.6.24 ships with any libata 
regressions?

Let George W. Bush wrongly accuse him of possessing weapons of 
mass destructions and invade Canada?

 The reporters can help,
 and many may even git-bisect or send patches.  
 But you cannot *expect* or *insist* upon them doing your job.

Bullshit.

Bug fixing is not about finding someone to blame, it's about getting the 
bug fixed.

The bug reporter is the person who can reproduce the problem, and if 
it's a regression then bisecting is the natural way of getting nearer 
at getting it fixed.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 07:46:49PM +, Russell King wrote:
 On Tue, Nov 13, 2007 at 08:30:35PM +0100, Adrian Bunk wrote:
  There is this silly limit that noone can work more than 168 hours per 
  week on the Linux kernel, and some kernel developers seem to take the 
  liberty of spending even less time on kernel development...
 
 That limit of 168 hours applies all around the world to everyone.
 Moreover, not all kernel developers are employed to hack on the
 kernel for 168 hours a week.
 
 For me, personally, that figure is in reality about 24 hours a
 week.  Yes, just 24.  The rest of the time (like *now*) is time I'm
 volunteering because I happen to be reading my email...
 
 ... and happen to be wasting replying to discussions like this rather
 than reading that message which has just arrived on the ARM kernel
 mailing list from someone having problems using copy_from_user()
 with a kernel pointer.
 
 So, please, stop this idea that somehow kernel developers can
 somehow spend infinite amounts of time solving lots and lots of
 bugs.

Sorry, that happens when using irony in a non-native language...

What I wanted to express:
Noone has unlimited time for kernel development.

 Russell King

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 07:32:19PM +, Russell King wrote:
...
 There's another issue I want to raise concerning bugzilla.  We have the
 classic case of not enough people reading bugzilla bugs - which is one
 of the biggest problems with bugzilla.  Virtually no one in the ARM
 community looks for ARM bugs in bugzilla.
 
 Let's not forget that it would be a waste of time for people to manually
 check bugzilla for ARM bugs.  There's soo few people reporting ARM bugs
 into bugzilla that a weekly manual check by every maintainer would just
 return the same old boring results for months and months at a time.
...

What about having all ARM bugs in Bugzilla by default assigned to 
[EMAIL PROTECTED] [1]

 Russell King

cu
Adrian

[1] Either directly or through a pseudo address, but that's just a
technical detail.

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 03:13:46PM -0500, Mark Lord wrote:
 Adrian Bunk wrote:
 On Tue, Nov 13, 2007 at 02:26:05PM -0500, Mark Lord wrote:
 ..
 If you've been making significant updates to a driver/subsystem,
 and people are reporting that it is now broken for them,

 What are significant updates?

 Sometimes one person makes one small patch and this patch contains
 a typo.
 ..

 Then that person should double check their changes against
 the problems reported, and re-convince themselves that the
 breakage wasn't from those.  Simple. 

Simple?

Everything you have in mind with should double check their changes is 
simply not realistic with dozens of known unfixed regressions within 
more than half a million changed or new lines of code written by more 
than 800 people - all numbers only counted since 2.6.23.

...
 The reporters can help,
 and many may even git-bisect or send patches.  But you cannot *expect* or 
 *insist* upon them doing your job.

 Bullshit.

 Bug fixing is not about finding someone to blame, it's about getting the 
 bug fixed.
 ..

 It's not about blame, it's about paying attention to breakages in code that a
 person claims to be supporting, and then doing their best to resolve the 
 issues.

Maintainers are just humans with limited time. 

You were the one who suggested to distribute code maintainership, 
so you should explain how to find the additional maintainers.

 Again, if one has the time to actively write/modify code such that something 
 breaks,
 then that person should also make time to fix the breakages.

code writer != subsystem maintainer

And git-bisect is the tool that tells you who broke it.

 The bug reporter is the person who can reproduce the problem, and if it's 
 a regression then bisecting is the natural way of getting nearer at 
 getting it fixed.
 ..
 For the third time, no disagreement here.  git-bsect can help in many cases,
 but not in all cases.  And it requires a great time commitment from somebody
 who's system used to work and now doesn't work.  The person who broke it has
 a fair bit of responsibility there, too.

git-bisect can help only for regressions, and it can help for most 
regressions.

And you shouldn't try to make a problem out of something that isn't a 
problem:

Bug submitters are either volunteers who test -rc or even -git or -mm 
kernels for finding bugs or people who want a problem they experience 
fixed.

In both cases the submitters are usually willing to invest some time for 
helping to get the bug fixed.

 cheers

cu
Adrian

--

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] New Kernel Bugs

2007-11-13 Thread Adrian Bunk
On Tue, Nov 13, 2007 at 05:39:45PM -0700, Denys Vlasenko wrote:
 On Tuesday 13 November 2007 10:56, Adrian Bunk wrote:
  On Tue, Nov 13, 2007 at 12:13:56PM -0500, Theodore Tso wrote:
   On Tue, Nov 13, 2007 at 04:52:32PM +0100, Benoit Boissinot wrote:
Btw, I used to test every -mm kernel. But since I've switched distros
(gentoo-ubuntu)
and I have less time, I feel it's harder to test -rc or -mm kernels (I
know this isn't a lkml problem
but more a distro problem, but I would love having an ubuntu blessed
repo with current dev kernel
for the latest stable ubuntu release).
  
   There are two parts to this.  One is a Ubuntu development kernel which
   we can give to large numbers of people to expand our testing pool.
   But if we don't do a better job of responding to bug reports that
   would be generated by expanded testing this won't necessarily help us.
  ...
 
  The main problem aren't missing testers [1] - we already have relatively
  experienced people testing kernels and/or reporting bugs, and we slowly
  scare them away due to the many bug reports without any reaction.
 
  The main problem is finding experienced developers who spend time on
  looking into bug reports.
 
  Getting many relatively unexperienced users (who need more guidance for
  debugging issues) as additional testers is therefore IMHO not
  necessarily a good idea.
 
 And where experienced developrs are coming from?
 They are not born with Linux kernel skills.
 They grow up from within user base.
 
 Bigger user base - more developers (eventually)

You missed the following in my email:
we slowly scare them away due to the many bug reports without any 
 reaction.

The problem is that bug reports take time. If you go away from easy 
things like compile errors then even things like describing what does
no longer work, ideally producing a scenario where you can reproduce it 
and verifying whether it was present in previous kernels can easily take 
many hours that are spent before the initial bug report.

If the bug report then gets ignored we discourage the person who sent 
the bug report to do any work related to the kernel again.

 vda

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


drivers/net/ax88796.c compile error on sh64

2007-11-11 Thread Adrian Bunk
Commit 8687991a734a67f1638782c968f46fff0f94bb1f causes the following 
compile error on sh64:

--  snip  --

...
  CC [M]  drivers/net/ax88796.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c: In function 
'ax_get_8390_hdr':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:187: error: 
implicit declaration of function 'readsw'
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:189: error: 
implicit declaration of function 'readsb'
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c: In function 
'ax_block_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:275: error: 
implicit declaration of function 'writesw'
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:277: error: 
implicit declaration of function 'writesb'
make[3]: *** [drivers/net/ax88796.o] Error 1

--  snip --


cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [2.6 patch] net/ipv4/ipvs/: remove unused exports

2007-11-11 Thread Adrian Bunk
On Sun, Nov 11, 2007 at 04:09:40PM +0900, Simon Horman wrote:
 On Sun, Nov 11, 2007 at 07:48:40AM +0100, Adrian Bunk wrote:
  This patch removes the following unused EXPORT_SYMBOL's:
  - ip_vs_try_bind_dest
  - ip_vs_find_dest
  
  Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
 
 Looks fine to me.
 
 Should Dave Miller put this in his tree,
 or do you want to handle it a different way?
...

If Dave applies it that would be perfect.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] unexport sysctl_{r,w}mem_max

2007-11-10 Thread Adrian Bunk
sysctl_{r,w}mem_max can now be unexported.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
d49d51e5f46615c30e0f96c5333733e0ab1c85e6 
diff --git a/net/core/sock.c b/net/core/sock.c
index 8fc2f84..c519b43 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2097,7 +2097,3 @@ EXPORT_SYMBOL(sock_wmalloc);
 EXPORT_SYMBOL(sock_i_uid);
 EXPORT_SYMBOL(sock_i_ino);
 EXPORT_SYMBOL(sysctl_optmem_max);
-#ifdef CONFIG_SYSCTL
-EXPORT_SYMBOL(sysctl_rmem_max);
-EXPORT_SYMBOL(sysctl_wmem_max);
-#endif

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/ipv4/ipvs/: remove unused exports

2007-11-10 Thread Adrian Bunk
This patch removes the following unused EXPORT_SYMBOL's:
- ip_vs_try_bind_dest
- ip_vs_find_dest

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 net/ipv4/ipvs/ip_vs_conn.c |1 -
 net/ipv4/ipvs/ip_vs_ctl.c  |1 -
 2 files changed, 2 deletions(-)

ad9f400d4f66ea3423f97e609d6ef2572055c603 
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index b7eeae6..0a9f3c3 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -441,7 +441,6 @@ struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn 
*cp)
} else
return NULL;
 }
-EXPORT_SYMBOL(ip_vs_try_bind_dest);
 
 
 /*
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 3c4d22a..b64cf45 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -604,7 +604,6 @@ struct ip_vs_dest *ip_vs_find_dest(__be32 daddr, __be16 
dport,
ip_vs_service_put(svc);
return dest;
 }
-EXPORT_SYMBOL(ip_vs_find_dest);
 
 /*
  *  Lookup dest by {svc,addr,port} in the destination trash.

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove references to net-modules.txt

2007-11-08 Thread Adrian Bunk
When I removed net-modules.txt because it only contained ancient 
information I missed that many Kconfig entries pointed to this ancient 
information.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/networking/3c505.txt |3 
 drivers/net/Kconfig|  199 ++---
 drivers/net/arcnet/Kconfig |   15 --
 drivers/net/tulip/Kconfig  |   21 +--
 4 files changed, 82 insertions(+), 156 deletions(-)

6451db6bafae46e17885b8c7b243095fc257e8ed 
diff --git a/Documentation/networking/3c505.txt 
b/Documentation/networking/3c505.txt
index b9d5b72..72f38b1 100644
--- a/Documentation/networking/3c505.txt
+++ b/Documentation/networking/3c505.txt
@@ -14,8 +14,7 @@ If no base address is given at boot time, the driver will 
autoprobe
 ports 0x300, 0x280 and 0x310 (in that order).  If no IRQ is given, the driver
 will try to probe for it.
 
-The driver can be used as a loadable module.  See net-modules.txt for details
-of the parameters it can take.  
+The driver can be used as a loadable module.
 
 Theoretically, one instance of the driver can now run multiple cards,
 in the standard way (when loading a module, say modprobe 3c505
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 5f800a6..0fdcf72 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -365,8 +365,7 @@ config MAC89x0
  read the Ethernet-HOWTO, available from
  http://www.tldp.org/docs.html#howto.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt.  This module will
+ To compile this driver as a module, choose M here. This module will
  be called mac89x0.
 
 config MACSONIC
@@ -379,8 +378,7 @@ config MACSONIC
  one of these say Y and read the Ethernet-HOWTO, available from
  http://www.tldp.org/docs.html#howto.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt.  This module will
+ To compile this driver as a module, choose M here. This module will
  be called macsonic.
 
 config MACMACE
@@ -618,8 +616,7 @@ config EL1
  have problems.  Some people suggest to ping (man ping) a nearby
  machine every minute (man cron) when using this card.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt. The module
+ To compile this driver as a module, choose M here. The module
  will be called 3c501.
 
 config EL2
@@ -631,8 +628,7 @@ config EL2
  the Ethernet-HOWTO, available from
  http://www.tldp.org/docs.html#howto.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt. The module
+ To compile this driver as a module, choose M here. The module
  will be called 3c503.
 
 config ELPLUS
@@ -644,8 +640,7 @@ config ELPLUS
  this type, say Y and read the Ethernet-HOWTO, available from
  http://www.tldp.org/docs.html#howto.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt. The module
+ To compile this driver as a module, choose M here. The module
  will be called 3c505.
 
 config EL16
@@ -656,8 +651,7 @@ config EL16
  the Ethernet-HOWTO, available from
  http://www.tldp.org/docs.html#howto.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt. The module
+ To compile this driver as a module, choose M here. The module
  will be called 3c507.
 
 config EL3
@@ -672,8 +666,7 @@ config EL3
  setup disk to disable Plug  Play mode, and to select the default
  media type.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt. The module
+ To compile this driver as a module, choose M here. The module
  will be called 3c509.
 
 config 3C515
@@ -684,8 +677,7 @@ config 3C515
  network card, say Y and read the Ethernet-HOWTO, available from
  http://www.tldp.org/docs.html#howto.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt. The module
+ To compile this driver as a module, choose M here. The module
  will be called 3c515.
 
 config ELMC
@@ -696,8 +688,7 @@ config ELMC
  the Ethernet-HOWTO, available from
  http://www.tldp.org/docs.html#howto.
 
- To compile this driver as a module, choose M here and read
- file:Documentation/networking/net-modules.txt. The module
+ To compile this driver as a module, choose M here. The module
  will be called 3c523.
 
 config ELMC_II
@@ -708,8 +699,7 @@ config ELMC_II

Re: build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings':

2007-11-07 Thread Adrian Bunk
On Wed, Nov 07, 2007 at 11:52:32PM +0100, Adrian Bunk wrote:
 On Wed, Nov 07, 2007 at 02:34:52PM -0800, David Brownell wrote:
But on the other hand, it seems that only the ASIX code will work
right; the DM9601 and MCS7830 Kconfig is different/wrong.
   
   I'm not seeing the problem.
   
   Which configuration will be handled wrongly?
  
  Notice how only the ASIX kconfig depended on NET_ETHERNET...
  since MII depends on NET_ETHERNET, and (last I knew) the
  reverse dependencies didn't capture the complete dependency
  tree, selecting only MII would leave out some stuff.
 
 Except for one s390 net driver (I'll check why it's doing this) the 
 NET_ETHERNET option does not influence what code is being generated - 
 it's just a Kconfig-internal option allowing to disable a huge bunch
 of drivers at once.

Damn, I shouldn't have only grep'ed under drivers/.

@davem:

Please look at net/ipv4/arp.c:arp_process()

Am I right that CONFIG_NET_ETHERNET=n and CONFIG_NETDEV_1000=y or 
CONFIG_NETDEV_1=y will not be handled correctly there?

And the best solution is to nuke all #ifdef's in this function and make 
the code unconditionally available?

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings':

2007-11-07 Thread Adrian Bunk
On Wed, Nov 07, 2007 at 06:53:48PM -0800, David Brownell wrote:
 On Wednesday 07 November 2007, Adrian Bunk wrote:
  On Wed, Nov 07, 2007 at 02:34:52PM -0800, David Brownell wrote:
 But on the other hand, it seems that only the ASIX code will work
 right; the DM9601 and MCS7830 Kconfig is different/wrong.

I'm not seeing the problem.

Which configuration will be handled wrongly?
   
   Notice how only the ASIX kconfig depended on NET_ETHERNET...
   since MII depends on NET_ETHERNET, and (last I knew) the
   reverse dependencies didn't capture the complete dependency
   tree, selecting only MII would leave out some stuff.
  
  Except for one s390 net driver (I'll check why it's doing this) the 
  NET_ETHERNET option does not influence what code is being generated - 
  it's just a Kconfig-internal option allowing to disable a huge bunch
  of drivers at once.
 
 Drivers like ... AX88xxx, DM9601, and MCS7830!!  Except as
 it turns out, only the first one behaves as intended.
 
 You can tell it's a problem by the way it's inconsistent,
 regardless of the details of the problem.  :)

I'm all for cleanups that make things consistent.  :)

As long as we can agree that there's a difference between a problem like 
a compile or runtime error and an opportunity for making things 
consistent.

 - Dave

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings':

2007-11-07 Thread Adrian Bunk
On Wed, Nov 07, 2007 at 02:34:52PM -0800, David Brownell wrote:
   But on the other hand, it seems that only the ASIX code will work
   right; the DM9601 and MCS7830 Kconfig is different/wrong.
  
  I'm not seeing the problem.
  
  Which configuration will be handled wrongly?
 
 Notice how only the ASIX kconfig depended on NET_ETHERNET...
 since MII depends on NET_ETHERNET, and (last I knew) the
 reverse dependencies didn't capture the complete dependency
 tree, selecting only MII would leave out some stuff.

Except for one s390 net driver (I'll check why it's doing this) the 
NET_ETHERNET option does not influence what code is being generated - 
it's just a Kconfig-internal option allowing to disable a huge bunch
of drivers at once.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [2.6 patch] remove Documentation/networking/net-modules.txt

2007-11-05 Thread Adrian Bunk
On Mon, Oct 29, 2007 at 05:18:14PM +0200, Pekka Pietikainen wrote:
 On Wed, Oct 24, 2007 at 06:25:03PM +0200, Adrian Bunk wrote:
  According to git, the only one who touched this file during the last
  5 years was me when removing drivers...
 
 That's not the only obsolete thing there:
   ncsa-telnet
  - notes on how NCSA telnet (DOS) breaks with MTU discovery enabled.
 And probably others too. Then again, the information there isn't wrong, it's
 just totally useless these days :P

OMG

Thanks for the pointer, this kind of useless crap makes it harder to 
find the part of the documentation that might actually still be useful.

 Pekka Pietikainen

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove comx driver docs

2007-11-05 Thread Adrian Bunk
The drivers have already been removed 3.5 years ago.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/networking/00-INDEX |2 
 Documentation/networking/comx.txt |  248 -
 Documentation/networking/slicecom.hun |  371 --
 Documentation/networking/slicecom.txt |  369 -
 4 files changed, 990 deletions(-)

89b45c57a2a74c6497cd808e15f9ef33077bf352 
diff --git a/Documentation/networking/00-INDEX 
b/Documentation/networking/00-INDEX
index f5a5e6d..c48892e 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -26,8 +26,6 @@ baycom.txt
- info on the driver for Baycom style amateur radio modems
 bridge.txt
- where to get user space programs for ethernet bridging with Linux.
-comx.txt
-   - info on drivers for COMX line of synchronous serial adapters.
 cops.txt
- info on the COPS LocalTalk Linux driver
 cs89x0.txt
diff --git a/Documentation/networking/comx.txt 
b/Documentation/networking/comx.txt
deleted file mode 100644
index d1526eb..000
--- a/Documentation/networking/comx.txt
+++ /dev/null
@@ -1,248 +0,0 @@
-
-   COMX drivers for the 2.2 kernel
-
-Originally written by: Tivadar Szemethy, [EMAIL PROTECTED]
-Currently maintained by: Gergely Madarasz [EMAIL PROTECTED]
-
-Last change: 21/06/1999.
-
-INTRODUCTION
-
-This document describes the software drivers and their use for the 
-COMX line of synchronous serial adapters for Linux version 2.2.0 and
-above.
-The cards are produced and sold by ITC-Pro Ltd. Budapest, Hungary
-For further info contact [EMAIL PROTECTED] 
-or http://www.itc.hu (mostly in Hungarian).
-The firmware files and software are available from ftp://ftp.itc.hu
-
-Currently, the drivers support the following cards and protocols:
-
-COMX (2x64 kbps intelligent board)
-CMX (1x256 + 1x128 kbps intelligent board)
-HiCOMX (2x2Mbps intelligent board)
-LoCOMX (1x512 kbps passive board)
-MixCOM (1x512 or 2x512kbps passive board with a hardware watchdog an
-   optional BRI interface and optional flashROM (1-32M))
-SliceCOM   (1x2Mbps channelized E1 board)
-PciCOM (X21)
-
-At the moment of writing this document, the (Cisco)-HDLC, LAPB, SyncPPP and
-Frame Relay (DTE, rfc1294 IP encapsulation with partially implemented Q933a 
-LMI) protocols are available as link-level protocol. 
-X.25 support is being worked on.
-
-USAGE
-
-Load the comx.o module and the hardware-specific and protocol-specific 
-modules you'll need into the running kernel using the insmod utility.
-This creates the /proc/comx directory.
-See the example scripts in the 'etc' directory.
-
-/proc INTERFACE INTRO
-
-The COMX driver set has a new type of user interface based on the /proc 
-filesystem which eliminates the need for external user-land software doing 
-IOCTL calls. 
-Each network interface or device (i.e. those ones you configure with 'ifconfig'
-and 'route' etc.) has a corresponding directory under /proc/comx. You can
-dynamically create a new interface by saying 'mkdir /proc/comx/comx0' (or you
-can name it whatever you want up to 8 characters long, comx[n] is just a 
-convention).
-Generally the files contained in these directories are text files, which can
-be viewed by 'cat filename' and you can write a string to such a file by
-saying 'echo _string_ filename'. This is very similar to the sysctl interface.
-Don't use a text editor to edit these files, always use 'echo' (or 'cat'
-where appropriate).
-When you've created the comx[n] directory, two files are created automagically
-in it: 'boardtype' and 'protocol'. You have to fill in these files correctly
-for your board and protocol you intend to use (see the board and protocol 
-descriptions in this file below or the example scripts in the 'etc' directory).
-After filling in these files, other files will appear in the directory for 
-setting the various hardware- and protocol-related informations (for example
-irq and io addresses, keepalive values etc.) These files are set to default 
-values upon creation, so you don't necessarily have to change all of them.
-
-When you're ready with filling in the files in the comx[n] directory, you can
-configure the corresponding network interface with the standard network 
-configuration utilities. If you're unable to bring the interfaces up, look up
-the various kernel log files on your system, and consult the messages for
-a probable reason.
-
-EXAMPLE
-
-To create the interface 'comx0' which is the first channel of a COMX card:
-
-insmod comx 
-# insmod comx-hw-comx ; insmod comx-proto-ppp  (these are usually
-autoloaded if you use the kernel module loader)
-
-mkdir /proc/comx/comx0
-echo comx /proc/comx/comx0/boardtype
-echo 0x360 /proc/comx/comx0/io- jumper-selectable I/O port 
-echo 0x0a /proc/comx/comx0/irq- jumper-selectable IRQ line
-echo 0xd000 /proc/comx/comx0/memaddr  - software-configurable memory

[2.6 patch] remove Documentation/networking/Configurable

2007-11-05 Thread Adrian Bunk
After more than 11 years this file does no longer contain much useful 
information.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/networking/00-INDEX |2 -
 Documentation/networking/Configurable |   34 --
 2 files changed, 36 deletions(-)

f200fa4962996e11967e7c1040771b6669829fca 
diff --git a/Documentation/networking/00-INDEX 
b/Documentation/networking/00-INDEX
index c48892e..a9f4acc 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -4,8 +4,6 @@
- information on the 3Com EtherLink Plus (3c505) driver.
 6pack.txt
- info on the 6pack protocol, an alternative to KISS for AX.25
-Configurable
-   - info on some of the configurable network parameters
 DLINK.txt
- info on the D-Link DE-600/DE-620 parallel port pocket adapters
 PLIP.txt
diff --git a/Documentation/networking/Configurable 
b/Documentation/networking/Configurable
deleted file mode 100644
index 69c0dd4..000
--- a/Documentation/networking/Configurable
+++ /dev/null
@@ -1,34 +0,0 @@
-
-There are a few network parameters that can be tuned to better match
-the kernel to your system hardware and intended usage. The defaults
-are usually a good choice for 99% of the people 99% of the time, but
-you should be aware they do exist and can be changed.
-
-The current list of parameters can be found in the files:
-
-   linux/net/TUNABLE
-   Documentation/networking/ip-sysctl.txt
-
-Some of these are accessible via the sysctl interface, and many more are
-scheduled to be added in this way. For example, some parameters related 
-to Address Resolution Protocol (ARP) are very easily viewed and altered.
-
-   # cat /proc/sys/net/ipv4/arp_timeout
-   6000
-   # echo 7000  /proc/sys/net/ipv4/arp_timeout
-   # cat /proc/sys/net/ipv4/arp_timeout
-   7000
-
-Others are already accessible via the related user space programs.
-For example, MAX_WINDOW has a default of 32 k which is a good choice for
-modern hardware, but if you have a slow (8 bit) Ethernet card and/or a slow
-machine, then this will be far too big for the card to keep up with fast 
-machines transmitting on the same net, resulting in overruns and receive 
errors.
-A value of about 4 k would be more appropriate, which can be set via:
-
-   # route add -net 192.168.3.0 window 4096
-
-The remainder of these can only be presently changed by altering a #define
-in the related header file. This means an edit and recompile cycle.
-
-   Paul Gortmaker 06/96

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove Documentation/networking/ncsa-telnet

2007-11-05 Thread Adrian Bunk
Newsflash: There once was a version of NCSA telnet that had some bug.

Spotted by Pekka Pietikainen.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/networking/00-INDEX|2 --
 Documentation/networking/ncsa-telnet |   16 
 2 files changed, 18 deletions(-)

b9ccc5424cc83b4c0ca9c8d380a4b7567916a463 
diff --git a/Documentation/networking/00-INDEX 
b/Documentation/networking/00-INDEX
index a9f4acc..9c64042 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -74,8 +74,6 @@ ltpc.txt
- the Apple or Farallon LocalTalk PC card driver
 multicast.txt
- Behaviour of cards under Multicast
-ncsa-telnet
-   - notes on how NCSA telnet (DOS) breaks with MTU discovery enabled.
 netdevices.txt
- info on network device driver functions exported to the kernel.
 olympic.txt
diff --git a/Documentation/networking/ncsa-telnet 
b/Documentation/networking/ncsa-telnet
deleted file mode 100644
index d77d28b..000
--- a/Documentation/networking/ncsa-telnet
+++ /dev/null
@@ -1,16 +0,0 @@
-NCSA telnet doesn't work with path MTU discovery enabled. This is due to a
-bug in NCSA that also stops it working with other modern networking code
-such as Solaris.
-
-The following information is courtesy of 
-Marek [EMAIL PROTECTED]
-
-There is a fixed version somewhere on ftp.upe.ac.za (sorry, I don't
-remember the exact pathname, and this site is very slow from here).
-It may or may not be faster for you to get it from
-ftp://ftp.ists.pwr.wroc.pl/pub/msdos/telnet/ncsa_upe/tel23074.zip
-(source is in v230704s.zip).  I have tested it with 1.3.79 (with
-path mtu discovery enabled - ncsa 2.3.08 didn't work) and it seems
-to work.  I don't know if anyone is working on this code - this
-version is over a year old.  Too bad - it's faster and often more
-stable than these windoze telnets, and runs on almost anything...

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove Documentation/networking/routing.txt

2007-11-05 Thread Adrian Bunk
This file is so outdated that I can't see any value in keeping it.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/networking/00-INDEX|2 -
 Documentation/networking/routing.txt |   46 ---
 2 files changed, 48 deletions(-)

54b248bbff6345016e060136cfb5c09d43b26b69 
diff --git a/Documentation/networking/00-INDEX 
b/Documentation/networking/00-INDEX
index 5e21f37..563e442 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -82,6 +82,4 @@ policy-routing.txt
 ray_cs.txt
- Raylink Wireless LAN card driver info.
-routing.txt
-   - the new routing mechanism
 shaper.txt
- info on the module that can shape/limit transmitted traffic.
diff --git a/Documentation/networking/routing.txt 
b/Documentation/networking/routing.txt
deleted file mode 100644
index a26838b..000
--- a/Documentation/networking/routing.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-The directory ftp.inr.ac.ru:/ip-routing contains:
-
-- iproute.c - professional routing table maintenance utility.
-
-- rdisc.tar.gz - rdisc daemon, ported from Sun.
-   STRONGLY RECOMMENDED FOR ALL HOSTS.
-
-- routing.tgz - original Mike McLagan's route by source patch.
-   Currently it is obsolete.
-
-- gated.dif-ssNEWEST.gz - gated-R3_6Alpha_2 fixes.
-   Look at README.gated
-
-- mrouted-3.8.dif.gz - mrouted-3.8 fixes.
-
-- rtmon.c - trivial debugging utility: reads and stores netlink.
-
-
-NEWS for user.
-
-- Policy based routing. Routing decisions are made on the basis
-  not only of destination address, but also source address,
-  TOS and incoming interface.
-- Complete set of IP level control messages.
-  Now Linux is the only OS in the world complying to RFC requirements.
-  Great win 8)
-- New interface addressing paradigm.
-  Assignment of address ranges to interface,
-  multiple prefixes etc. etc.
-  Do not bother, it is compatible with the old one. Moreover:
-- You don't need to do route add aaa.bbb.ccc... eth0 anymore,
-  it is done automatically.
-- Abstract UNIX sockets and security enhancements.
-  This is necessary to use TIRPC and TLI emulation library.
-
-NEWS for hacker.
-
-- New destination cache. Flexible, robust and just beautiful.
-- Network stack is reordered, simplified, optimized, a lot of bugs fixed.
-  (well, and new bugs were introduced, but I haven't seen them yet 8))
-  It is difficult to describe all the changes, look into source.
-
-If you see this file, then this patch works 8)
-
-Alexey Kuznetsov.
[EMAIL PROTECTED]

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] remove Documentation/networking/pt.txt

2007-11-05 Thread Adrian Bunk
There's no no point in keeping documentation for a driver that was 
removed many years ago.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/networking/00-INDEX |2 -
 Documentation/networking/pt.txt   |   58 --
 2 files changed, 60 deletions(-)

cfe9580e99bc2406a5a05bae24487ca84619bec7 
diff --git a/Documentation/networking/00-INDEX 
b/Documentation/networking/00-INDEX
index 9c64042..5e21f37 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -80,6 +80,4 @@ olympic.txt
 policy-routing.txt
- IP policy-based routing
-pt.txt
-   - the Gracilis Packetwin AX.25 device driver
 ray_cs.txt
- Raylink Wireless LAN card driver info.
diff --git a/Documentation/networking/pt.txt b/Documentation/networking/pt.txt
deleted file mode 100644
index 72e888c..000
--- a/Documentation/networking/pt.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-This is the README for the Gracilis Packetwin device driver, version 0.5
-ALPHA for Linux 1.3.43.
-
-These files will allow you to talk to the PackeTwin (now know as PT) and
-connect through it just like a pair of TNCs.  To do this you will also
-require the AX.25 code in the kernel enabled.
-
-There are four files in this archive; this readme, a patch file, a .c file
-and finally a .h file.  The two program files need to be put into the
-drivers/net directory in the Linux source tree, for me this is the
-directory /usr/src/linux/drivers/net.  The patch file needs to be patched in
-at the top of the Linux source tree (/usr/src/linux in my case).
-
-You will most probably have to edit the pt.c file to suit your own setup,
-this should just involve changing some of the defines at the top of the file. 
-Please note that if you run an external modem you must specify a speed of 0.
-
-The program is currently setup to run a 4800 baud external modem on port A
-and a Kantronics DE-9600 daughter board on port B so if you have this (or
-something similar) then you're right.
-
-To compile in the driver, put the files in the correct place and patch in
-the diff.  You will have to re-configure the kernel again before you
-recompile it. 
-
-The driver is not real good at the moment for finding the card.  You can
-'help' it by changing the order of the potential addresses in the structure
-found in the pt_init() function so the address of where the card is is put
-first.
-
-After compiling, you have to get them going, they are pretty well like any
-other net device and just need ifconfig to get them going.
-As an example, here is my /etc/rc.net
---
-
-#
-# Configure the PackeTwin, port A.
-/sbin/ifconfig pt0a 44.136.8.87 hw ax25 vk2xlz mtu 512 
-/sbin/ifconfig pt0a 44.136.8.87 broadcast 44.136.8.255 netmask 255.255.255.0
-/sbin/route add -net 44.136.8.0 netmask 255.255.255.0 dev pt0a
-/sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.136.8.68 dev pt0a
-/sbin/route add -net 138.25.16.0 netmask 255.255.240.0 dev pt0a
-/sbin/route add -host 44.136.8.255 dev pt0a
-#
-# Configure the PackeTwin, port B.
-/sbin/ifconfig pt0b 44.136.8.87 hw ax25 vk2xlz-1 mtu 512
-/sbin/ifconfig pt0b 44.136.8.87 broadcast 44.255.255.255 netmask 255.0.0.0
-/sbin/route add -host 44.136.8.216 dev pt0b
-/sbin/route add -host 44.136.8.95  dev pt0b
-/sbin/route add -host 44.255.255.255 dev pt0b
-
-This version of the driver comes under the GNU GPL.  If you have one of my
-previous (non-GPL) versions of the driver, please update to this one.
-
-I hope that this all works well for you.  I would be pleased to hear how
-many people use the driver and if it does its job.
-
-  - Craig vk2xlz [EMAIL PROTECTED]

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/netxen/: cleanups

2007-11-05 Thread Adrian Bunk
This patch contains the following cleanups:
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- #if 0 unused code

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/netxen/netxen_nic.h  |   14 
 drivers/net/netxen/netxen_nic_hw.c   |   19 +++---
 drivers/net/netxen/netxen_nic_hw.h   |8 --
 drivers/net/netxen/netxen_nic_init.c |   70 ---
 drivers/net/netxen/netxen_nic_isr.c  |7 +-
 drivers/net/netxen/netxen_nic_main.c |9 +-
 drivers/net/netxen/netxen_nic_niu.c  |   26 +---
 drivers/net/netxen/netxen_nic_phan_reg.h |7 --
 8 files changed, 76 insertions(+), 84 deletions(-)

dbc7aeed37e41cd37a01cce259e5c0ab01f8dd88 
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index fbc2553..ef9f986 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -1015,14 +1015,8 @@ int netxen_niu_xgbe_enable_phy_interrupts(struct 
netxen_adapter *adapter);
 int netxen_niu_gbe_enable_phy_interrupts(struct netxen_adapter *adapter);
 int netxen_niu_xgbe_disable_phy_interrupts(struct netxen_adapter *adapter);
 int netxen_niu_gbe_disable_phy_interrupts(struct netxen_adapter *adapter);
-int netxen_niu_xgbe_clear_phy_interrupts(struct netxen_adapter *adapter);
-int netxen_niu_gbe_clear_phy_interrupts(struct netxen_adapter *adapter);
 void netxen_nic_xgbe_handle_phy_intr(struct netxen_adapter *adapter);
 void netxen_nic_gbe_handle_phy_intr(struct netxen_adapter *adapter);
-void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter, int port,
-long enable);
-void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, int port,
- long enable);
 int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long reg,
__u32 * readval);
 int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter,
@@ -1045,7 +1039,6 @@ int netxen_nic_hw_write_wx(struct netxen_adapter 
*adapter, u64 off, void *data,
   int len);
 void netxen_crb_writelit_adapter(struct netxen_adapter *adapter,
 unsigned long off, int data);
-int netxen_nic_erase_pxe(struct netxen_adapter *adapter);
 
 /* Functions from netxen_nic_init.c */
 void netxen_free_adapter_offload(struct netxen_adapter *adapter);
@@ -1064,15 +1057,10 @@ int netxen_flash_erase_secondary(struct netxen_adapter 
*adapter);
 int netxen_flash_erase_primary(struct netxen_adapter *adapter);
 void netxen_halt_pegs(struct netxen_adapter *adapter);
 
-int netxen_rom_fast_write(struct netxen_adapter *adapter, int addr, int data);
 int netxen_rom_se(struct netxen_adapter *adapter, int addr);
-int netxen_do_rom_se(struct netxen_adapter *adapter, int addr);
 
 /* Functions from netxen_nic_isr.c */
 int netxen_nic_link_ok(struct netxen_adapter *adapter);
-void netxen_nic_isr_other(struct netxen_adapter *adapter);
-void netxen_indicate_link_status(struct netxen_adapter *adapter, u32 link);
-void netxen_handle_port_int(struct netxen_adapter *adapter, u32 enable);
 void netxen_initialize_adapter_sw(struct netxen_adapter *adapter);
 void netxen_initialize_adapter_hw(struct netxen_adapter *adapter);
 void *netxen_alloc(struct pci_dev *pdev, size_t sz, dma_addr_t * ptr,
@@ -1089,8 +1077,6 @@ int netxen_nic_tx_has_work(struct netxen_adapter 
*adapter);
 void netxen_watchdog_task(struct work_struct *work);
 void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx,
u32 ringid);
-void netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, u32 ctx,
-u32 ringid);
 int netxen_process_cmd_ring(unsigned long data);
 u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctx, int max);
 void netxen_nic_set_multi(struct net_device *netdev);
diff --git a/drivers/net/netxen/netxen_nic_hw.c 
b/drivers/net/netxen/netxen_nic_hw.c
index 2c19b8d..b2c7861 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -33,7 +33,6 @@
 
 #include netxen_nic.h
 #include netxen_nic_hw.h
-#define DEFINE_GLOBAL_RECV_CRB
 #include netxen_nic_phan_reg.h
 
 
@@ -244,12 +243,15 @@ struct netxen_recv_crb recv_crb_registers[] = {
},
 };
 
-u64 ctx_addr_sig_regs[][3] = {
+static u64 ctx_addr_sig_regs[][3] = {
{NETXEN_NIC_REG(0x188), NETXEN_NIC_REG(0x18c), NETXEN_NIC_REG(0x1c0)},
{NETXEN_NIC_REG(0x190), NETXEN_NIC_REG(0x194), NETXEN_NIC_REG(0x1c4)},
{NETXEN_NIC_REG(0x198), NETXEN_NIC_REG(0x19c), NETXEN_NIC_REG(0x1c8)},
{NETXEN_NIC_REG(0x1a0), NETXEN_NIC_REG(0x1a4), NETXEN_NIC_REG(0x1cc)}
 };
+#define CRB_CTX_ADDR_REG_LO(FUNC_ID)   (ctx_addr_sig_regs[FUNC_ID][0])
+#define CRB_CTX_ADDR_REG_HI(FUNC_ID)   (ctx_addr_sig_regs[FUNC_ID][2])
+#define CRB_CTX_SIGNATURE_REG(FUNC_ID) (ctx_addr_sig_regs[FUNC_ID][1])
 
 
 /*  PCI Windowing for DDR

[2.6 patch] usbnet.c: check for the right MII variable

2007-11-02 Thread Adrian Bunk
On Thu, Nov 01, 2007 at 04:52:39PM -0700, David Brownell wrote:
 On Thursday 01 November 2007, Adrian Bunk wrote:
  All this USB_USBNET_MII trickery is simply not worth it considering how 
  few code it saves.
 
 Depends on what systems you're talking about.  Forcing unused
 code into the kernel is not free, especially if that's made into
 a design policy and applied repeatedly to many subsystems.

If it was turned into a design policy...

My impression is that in some parts of the kernel every byte gets 
counted, while in other parts noone would notice a few kilobytes more or 
less.

  As a side effect, this also fixes the following compile error reported 
  by Toralf Förster:
 
 Why not just fix the thing which changed and broke the build?

Today it's exactly one year since your commit entered the tree.

Dear bug, happy birthday!  ;-)

 Or if reverse dependencies can't be made to work sanely, then
 have those Ethernet-adapter minidrivers depend on NET_ETHERNET
 and then select MII.  (To make the relationships be simple
 enough that current Kconfig can handle them.)

It's not Kconfig's fault that you test for the wrong variable in 
usbnet.c ...

 I have a fair number of usbnet devices.  Not one of them needs
 MII or NET_ETHERNET.

I don't understand why you think this bug was in any way related to 
NET_ETHERNET - set NET_ETHERNET=y and the bug is still present.

If you insist on the #ifdef's take the patch below - it even saves a few 
additional bytes if you have non-usbnet net drivers requiring MII 
enabled statically or as modules in your .config but no usbnet drivers 
requiring MII.

 - Dave

cu
Adrian


--  snip  --


This patch fixes the following compile error with CONFIG_MII=m, 
CONFIG_USB_USBNET=y, CONFIG_USB_USBNET_MII=n:

--  snip  --

...
  LD  .tmp_vmlinux1
drivers/built-in.o: In function `usbnet_set_settings':
(.text+0xf1876): undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `usbnet_get_settings':
(.text+0xf1836): undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `usbnet_get_link':
(.text+0xf18d6): undefined reference to `mii_link_ok'
drivers/built-in.o: In function `usbnet_nway_reset':
(.text+0xf18f6): undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1

--  snip  --

This bug was introduced by commit 18ee91fa9815fa3bb4e51cdcb8229bd0a0f11a70
and reported by Toralf Förster.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

BTW:
The Kconfig part of this patch is not really required, but testing for
  #if defined(CONFIG_USB_USBNET_MII) || defined(CONFIG_USB_USBNET_MII_MODULE)
would look needlessly ugly.

 drivers/net/usb/Kconfig  |5 ++---
 drivers/net/usb/usbnet.c |7 +++
 2 files changed, 5 insertions(+), 7 deletions(-)

a421e4910eb30b140a315e274632e87c7a218df6 
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 5a96d74..9261371 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -94,12 +94,11 @@ config USB_RTL8150
  module will be called rtl8150.
 
 config USB_USBNET_MII
-   tristate
-   default n
+   bool
 
 config USB_USBNET
tristate Multi-purpose USB Networking Framework
-   select MII if USB_USBNET_MII != n
+   select MII if USB_USBNET_MII
---help---
  This driver supports several kinds of network links over USB,
  with minidrivers built around a common network driver core
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index acd5f1c..7393ab0 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -683,8 +683,7 @@ done_nopm:
  * they'll probably want to use this base set.
  */
 
-#if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE)
-#define HAVE_MII
+#ifdef CONFIG_USB_USBNET_MII
 
 int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd)
 {
@@ -744,7 +743,7 @@ int usbnet_nway_reset(struct net_device *net)
 }
 EXPORT_SYMBOL_GPL(usbnet_nway_reset);
 
-#endif /* HAVE_MII */
+#endif /*  CONFIG_USB_USBNET_MII  */
 
 void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
 {
@@ -776,7 +775,7 @@ EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
 
 /* drivers may override default ethtool_ops in their bind() routine */
 static struct ethtool_ops usbnet_ethtool_ops = {
-#ifdef HAVE_MII
+#ifdef CONFIG_USB_USBNET_MII
.get_settings   = usbnet_get_settings,
.set_settings   = usbnet_set_settings,
.get_link   = usbnet_get_link,

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/chelsio/: #if 0 unused functions

2007-11-02 Thread Adrian Bunk
This patch #if 0's the following unused functions:
- espi.c:t1_espi_set_misc_ctrl()
- sge.c:t1_sched_set_max_avail_bytes()
- sge.c:t1_sched_set_drain_bits_per_us()

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/chelsio/espi.c |2 ++
 drivers/net/chelsio/espi.h |1 -
 drivers/net/chelsio/sge.c  |4 
 drivers/net/chelsio/sge.h  |2 --
 4 files changed, 6 insertions(+), 3 deletions(-)

21c8ac8bf68a9ca84d7548003294535484140b59 
diff --git a/drivers/net/chelsio/espi.c b/drivers/net/chelsio/espi.c
index d7c5406..1e0749e 100644
--- a/drivers/net/chelsio/espi.c
+++ b/drivers/net/chelsio/espi.c
@@ -297,6 +297,7 @@ struct peespi *t1_espi_create(adapter_t *adapter)
return espi;
 }
 
+#if 0
 void t1_espi_set_misc_ctrl(adapter_t *adapter, u32 val)
 {
struct peespi *espi = adapter-espi;
@@ -309,6 +310,7 @@ void t1_espi_set_misc_ctrl(adapter_t *adapter, u32 val)
writel(espi-misc_ctrl, adapter-regs + A_ESPI_MISC_CONTROL);
spin_unlock(espi-lock);
 }
+#endif  /*  0  */
 
 u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait)
 {
diff --git a/drivers/net/chelsio/espi.h b/drivers/net/chelsio/espi.h
index 84f2c98..5694aad 100644
--- a/drivers/net/chelsio/espi.h
+++ b/drivers/net/chelsio/espi.h
@@ -62,7 +62,6 @@ void t1_espi_intr_disable(struct peespi *);
 int t1_espi_intr_handler(struct peespi *);
 const struct espi_intr_counts *t1_espi_get_intr_counts(struct peespi *espi);
 
-void t1_espi_set_misc_ctrl(adapter_t *adapter, u32 val);
 u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait);
 int t1_espi_get_mon_t204(adapter_t *, u32 *, u8);
 
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index ffa7e64..e3668d7 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -330,6 +330,8 @@ unsigned int t1_sched_update_parms(struct sge *sge, 
unsigned int port,
return max_avail_segs * (p-mtu - 40);
 }
 
+#if 0
+
 /*
  * t1_sched_max_avail_bytes() tells the scheduler the maximum amount of
  * data that can be pushed per port.
@@ -357,6 +359,8 @@ void t1_sched_set_drain_bits_per_us(struct sge *sge, 
unsigned int port,
t1_sched_update_parms(sge, port, 0, 0);
 }
 
+#endif  /*  0  */
+
 
 /*
  * get_clock() implements a ns clock (see ktime_get)
diff --git a/drivers/net/chelsio/sge.h b/drivers/net/chelsio/sge.h
index 713d9c5..e1cbded 100644
--- a/drivers/net/chelsio/sge.h
+++ b/drivers/net/chelsio/sge.h
@@ -89,8 +89,6 @@ void t1_sge_intr_disable(struct sge *);
 void t1_sge_intr_clear(struct sge *);
 const struct sge_intr_counts *t1_sge_get_intr_counts(const struct sge *sge);
 void t1_sge_get_port_stats(const struct sge *sge, int port, struct 
sge_port_stats *);
-void t1_sched_set_max_avail_bytes(struct sge *, unsigned int);
-void t1_sched_set_drain_bits_per_us(struct sge *, unsigned int, unsigned int);
 unsigned int t1_sched_update_parms(struct sge *, unsigned int, unsigned int,
   unsigned int);
 

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings':

2007-11-02 Thread Adrian Bunk
On Fri, Nov 02, 2007 at 11:45:15AM -0700, David Brownell wrote:
 On Thursday 01 November 2007, Adrian Bunk wrote:
  The following combination of options is simply an unusual one:
  
  CONFIG_MII=m
  CONFIG_USB_USBNET=y
  CONFIG_USB_USBNET_MII=n
 
 I though that had been fixed for ages ...
 
 This should do a better job of it.
 
 - Dave
 
 ==CUT HERE
 Simplify handling of the MII-dependent usbnet based adapters:  stick
 to forward dependencies, and explicitly handle the core dependency.
 
 Signed-off-by: David Brownell [EMAIL PROTECTED]
 ---
  drivers/net/usb/Kconfig  |   23 ---
  drivers/net/usb/usbnet.c |9 -
  2 files changed, 20 insertions(+), 12 deletions(-)
 
 --- a.orig/drivers/net/usb/Kconfig2007-10-21 10:35:16.0 -0700
 +++ a/drivers/net/usb/Kconfig 2007-11-02 11:32:15.0 -0700
 @@ -93,13 +93,8 @@ config USB_RTL8150
 To compile this driver as a module, choose M here: the
 module will be called rtl8150.
  
 -config USB_USBNET_MII
 - tristate
 - default n
 -
  config USB_USBNET
   tristate Multi-purpose USB Networking Framework
 - select MII if USB_USBNET_MII != n
   ---help---
 This driver supports several kinds of network links over USB,
 with minidrivers built around a common network driver core
 @@ -131,11 +126,19 @@ config USB_USBNET
 To compile this driver as a module, choose M here: the
 module will be called usbnet.
  
 +# usbnet core will support MII when MII is static, or both are modules
 +config USB_NET_MII
 + tristate
 + depends on USB_USBNET  NET_ETHERNET  (MII = y || MII = USB_USBNET)
 + default MII
 +
 +comment MII support is needed for most Ethernet adapters
 + depends on USB_USBNET  USB_NET_MII=n
...

This approach has two disadvantages:
- it's complicated
- the MII stuff is an implementation detail, and we shouldn't bother
  the user with it (especially since we can do better)

If you want to keep the #ifdef's, what's the problem with the second 
patch I proposed to fix this bug?

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings':

2007-11-02 Thread Adrian Bunk
On Fri, Nov 02, 2007 at 12:30:22PM -0700, David Brownell wrote:
 On Friday 02 November 2007, Adrian Bunk wrote:
  This approach has two disadvantages:
  - it's complicated
 
 No more so than the problem itself.
 
 
  - the MII stuff is an implementation detail, and we shouldn't bother
    the user with it (especially since we can do better)
 
 That's a Kconfig policy that's not always followed.

Sure it's not yet always followed.

But kernel developers have to become more aware that the vast majority 
of kconfig users are not kernel hackers and act accordingly.

I'm not talking about the infamous Aunt Tillie, but being able to 
build your own kernel is even required for LPIC-1. [1]

 In this
 case, I was getting fed up with select.  It so rarely does
 what it needs to do, and I've started to think it'd be better
 to just always avoid that fragility than battle it.

Regarding this bug, select is completely innocent...

  If you want to keep the #ifdef's, what's the problem with the second 
  patch I proposed to fix this bug?
 
 For one thing, I didn't see it until after I posted this one...
 other than that, the basic approach could well be fine; I didn't
 go through it in detail.
 
 But on the other hand, it seems that only the ASIX code will work
 right; the DM9601 and MCS7830 Kconfig is different/wrong.

I'm not seeing the problem.

Which configuration will be handled wrongly?

 - Dave

cu
Adrian

[1] 
http://www.lpi.org/en/lpi/english/certification/the_lpic_program/exam_102_detailed_objectives

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings':

2007-11-02 Thread Adrian Bunk
On Fri, Nov 02, 2007 at 11:45:15AM -0700, David Brownell wrote:
...
 --- a.orig/drivers/net/usb/usbnet.c   2007-10-13 15:16:10.0 -0700
 +++ a/drivers/net/usb/usbnet.c2007-11-02 11:39:59.0 -0700
 @@ -682,10 +682,17 @@ done_nopm:
  /* ethtool methods; minidrivers may need to add some more, but
   * they'll probably want to use this base set.
   */
 +#undef HAVE_MII
  
 -#if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE)
 +#if defined(CONFIG_MII)
  #define HAVE_MII
  
 +#elif defined(CONFIG_MII_MODULE)  defined(MODULE)
 +#define HAVE_MII
 +#endif
 +
 +#ifdef HAVE_MII
 +
  int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd)
  {
   struct usbnet *dev = netdev_priv(net);
 

Despite all what you do in Kconfig and what you wrongly blame on 
select the bug is in usbnet.c and this fix to usbnet.c _alone_  
would be enough to fix the bug.

But since you said you care about not including bloat you should better 
take my second patch that results in smaller code in some configurations.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] let USB_USBNET always select MII

2007-11-01 Thread Adrian Bunk
All this USB_USBNET_MII trickery is simply not worth it considering how 
few code it saves.

As a side effect, this also fixes the following compile error reported 
by Toralf Förster:

--  snip  --

...
  LD  .tmp_vmlinux1
drivers/built-in.o: In function `usbnet_set_settings':
(.text+0xf1876): undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `usbnet_get_settings':
(.text+0xf1836): undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `usbnet_get_link':
(.text+0xf18d6): undefined reference to `mii_link_ok'
drivers/built-in.o: In function `usbnet_nway_reset':
(.text+0xf18f6): undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/usb/Kconfig  |9 +
 drivers/net/usb/usbnet.c |7 ---
 2 files changed, 1 insertion(+), 15 deletions(-)

3b7f6290c639b9042fead1698fdbe1c84132c953 
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 5a96d74..a12c9c4 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -93,13 +93,9 @@ config USB_RTL8150
  To compile this driver as a module, choose M here: the
  module will be called rtl8150.
 
-config USB_USBNET_MII
-   tristate
-   default n
-
 config USB_USBNET
tristate Multi-purpose USB Networking Framework
-   select MII if USB_USBNET_MII != n
+   select MII
---help---
  This driver supports several kinds of network links over USB,
  with minidrivers built around a common network driver core
@@ -135,7 +131,6 @@ config USB_NET_AX8817X
tristate ASIX AX88xxx Based USB 2.0 Ethernet Adapters
depends on USB_USBNET  NET_ETHERNET
select CRC32
-   select USB_USBNET_MII
default y
help
  This option adds support for ASIX AX88xxx based USB 2.0
@@ -190,7 +185,6 @@ config USB_NET_DM9601
tristate Davicom DM9601 based USB 1.1 10/100 ethernet devices
depends on USB_USBNET
select CRC32
-   select USB_USBNET_MII
help
  This option adds support for Davicom DM9601 based USB 1.1
  10/100 Ethernet adapters.
@@ -225,7 +219,6 @@ config USB_NET_PLUSB
 config USB_NET_MCS7830
tristate MosChip MCS7830 based Ethernet adapters
depends on USB_USBNET
-   select USB_USBNET_MII
help
  Choose this option if you're using a 10/100 Ethernet USB2
  adapter based on the MosChip 7830 controller. This includes
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index acd5f1c..8ed1fc5 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -683,9 +683,6 @@ done_nopm:
  * they'll probably want to use this base set.
  */
 
-#if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE)
-#define HAVE_MII
-
 int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd)
 {
struct usbnet *dev = netdev_priv(net);
@@ -744,8 +741,6 @@ int usbnet_nway_reset(struct net_device *net)
 }
 EXPORT_SYMBOL_GPL(usbnet_nway_reset);
 
-#endif /* HAVE_MII */
-
 void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
 {
struct usbnet *dev = netdev_priv(net);
@@ -776,12 +771,10 @@ EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
 
 /* drivers may override default ethtool_ops in their bind() routine */
 static struct ethtool_ops usbnet_ethtool_ops = {
-#ifdef HAVE_MII
.get_settings   = usbnet_get_settings,
.set_settings   = usbnet_set_settings,
.get_link   = usbnet_get_link,
.nway_reset = usbnet_nway_reset,
-#endif
.get_drvinfo= usbnet_get_drvinfo,
.get_msglevel   = usbnet_get_msglevel,
.set_msglevel   = usbnet_set_msglevel,
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: build #337 failed for 2.6.24-rc1-gb1d08ac In function `usbnet_set_settings':

2007-11-01 Thread Adrian Bunk
On Thu, Nov 01, 2007 at 04:32:18PM -0700, David Brownell wrote:
 On Thursday 01 November 2007, Randy Dunlap wrote:
  The MII functions aren't available unless NET_ETHERNET=y.

The setting of CONFIG_NET_ETHERNET doesn't matter for this bug.

  Howver, the MII functions aren't always needed...
  
  David, any ideas on this one?
 
 It's been several years since I looked at this.  It
 used to behave just fine.
 
 Something must have changed in the not-too-distant
 past to have broken this mechanism...
...

It seems to be an old bug.

The following combination of options is simply an unusual one:

CONFIG_MII=m
CONFIG_USB_USBNET=y
CONFIG_USB_USBNET_MII=n

 - Dave

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] fix drivers/net/wan/lmc/ compilation

2007-10-30 Thread Adrian Bunk
Documentation/SubmitChecklist, point 1:

--  snip  --

...
  CC  drivers/net/wan/lmc/lmc_main.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/wan/lmc/lmc_main.c: In 
function ‘lmc_ioctl’:
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/wan/lmc/lmc_main.c:239: 
error: expected expression before ‘else’
...
make[5]: *** [drivers/net/wan/lmc/lmc_main.o] Error 1

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
d5e92a30491abf073e0a7f4d46b466c7c97f0f61 
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 64eb578..37c52e1 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -234,7 +234,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, 
int cmd) /*fold00*/
 sc-lmc_xinfo.Magic1 = 0xDEADBEEF;
 
 if (copy_to_user(ifr-ifr_data, sc-lmc_xinfo,
-   sizeof(struct lmc_xinfo))) {
+sizeof(struct lmc_xinfo)))
ret = -EFAULT;
else
ret = 0;

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] always export sysctl_{r,w}mem_max

2007-10-26 Thread Adrian Bunk
This patch fixes the following build error with CONFIG_SYSCTL=n:

--  snip  --

...
ERROR: sysctl_rmem_max [fs/dlm/dlm.ko] undefined!
ERROR: sysctl_wmem_max [drivers/net/rrunner.ko] undefined!
ERROR: sysctl_rmem_max [drivers/net/rrunner.ko] undefined!
make[2]: *** [__modpost] Error 1

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
22ea6cd56e4fa844b0b1bbab2542f09eb6c9a5ab 
diff --git a/net/core/sock.c b/net/core/sock.c
index febbcbc..ee1cc4f 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2004,7 +2004,5 @@ EXPORT_SYMBOL(sock_wmalloc);
 EXPORT_SYMBOL(sock_i_uid);
 EXPORT_SYMBOL(sock_i_ino);
 EXPORT_SYMBOL(sysctl_optmem_max);
-#ifdef CONFIG_SYSCTL
 EXPORT_SYMBOL(sysctl_rmem_max);
 EXPORT_SYMBOL(sysctl_wmem_max);
-#endif

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] net/ipv{4,6}/esp{4,6}.c must #include linux/scatterlist.h

2007-10-26 Thread Adrian Bunk
This patch fixes the following compile errors in some configurations:

--  snip  --

...
  CC  net/ipv4/esp4.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv4/esp4.c: In function 
'esp_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv4/esp4.c:113: error: implicit 
declaration of function 'sg_init_table'
make[3]: *** [net/ipv4/esp4.o] Error 1
...
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv6/esp6.c: In function 
'esp6_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv6/esp6.c:112: error: implicit 
declaration of function 'sg_init_table'
make[3]: *** [net/ipv6/esp6.o] Error 1


--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 net/ipv4/esp4.c |2 +-
 net/ipv6/esp6.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

ecf93220d6af83516dbe04dcd09474a0423ce2ef 
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index ba98401..23b647c 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -3,7 +3,7 @@
 #include net/ip.h
 #include net/xfrm.h
 #include net/esp.h
-#include asm/scatterlist.h
+#include linux/scatterlist.h
 #include linux/crypto.h
 #include linux/kernel.h
 #include linux/pfkeyv2.h
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index f67d51a..f8bb136 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -29,7 +29,7 @@
 #include net/ip.h
 #include net/xfrm.h
 #include net/esp.h
-#include asm/scatterlist.h
+#include linux/scatterlist.h
 #include linux/crypto.h
 #include linux/kernel.h
 #include linux/pfkeyv2.h

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make bonding/bond_main.c:bond_deinit() static

2007-10-24 Thread Adrian Bunk
bond_deinit() can now become static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/bonding/bond_main.c |3 ++-
 drivers/net/bonding/bonding.h   |1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

5e5d2537b927f55a2199a0d9a073f41bb71290f6 
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6f85cc3..8bb0092 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -188,6 +188,7 @@ struct bond_parm_tbl arp_validate_tbl[] = {
 /*-- Forward declarations ---*/
 
 static void bond_send_gratuitous_arp(struct bonding *bond);
+static void bond_deinit(struct net_device *bond_dev);
 
 /* General routines -*/
 
@@ -4404,7 +4405,7 @@ static int bond_init(struct net_device *bond_dev, struct 
bond_params *params)
 /* De-initialize device specific data.
  * Caller must hold rtnl_lock.
  */
-void bond_deinit(struct net_device *bond_dev)
+static void bond_deinit(struct net_device *bond_dev)
 {
struct bonding *bond = bond_dev-priv;
 
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index b818060..aceaabb 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -298,7 +298,6 @@ int bond_dev_queue_xmit(struct bonding *bond, struct 
sk_buff *skb, struct net_de
 int bond_create(char *name, struct bond_params *params, struct bonding 
**newbond);
 void bond_destroy(struct bonding *bond);
 int  bond_release_and_destroy(struct net_device *bond_dev, struct net_device 
*slave_dev);
-void bond_deinit(struct net_device *bond_dev);
 int bond_create_sysfs(void);
 void bond_destroy_sysfs(void);
 void bond_destroy_sysfs_entry(struct bonding *bond);

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] drivers/net/ipg.c: cleanups

2007-10-24 Thread Adrian Bunk
This patch contains the following cleanups:
- make ipg_nic_get_stats() static
- move DefaultPhyParam[] from ipg.h to ipg.c and make it static

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/net/ipg.c |   22 +-
 drivers/net/ipg.h |   20 
 2 files changed, 21 insertions(+), 21 deletions(-)

a3a6ac23118e63f10ff3832dc906da6e9bc3ea3d 
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 6888723..dbd23bb 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -55,6 +55,26 @@ MODULE_DESCRIPTION(IC Plus IP1000 Gigabit Ethernet Adapter 
Linux Driver 
   DrvVer);
 MODULE_LICENSE(GPL);
 
+//variable record -- index by leading revision/length
+//Revision/Length(=N*4), Address1, Data1, Address2, Data2,...,AddressN,DataN
+static unsigned short DefaultPhyParam[] = {
+   // 11/12/03 IP1000A v1-3 rev=0x40
+   
/*--
+   (0x4000|(15*4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 22, 0x85bd, 24, 
0xfff2,
+27, 0x0c10, 28, 0x0c10, 29, 0x2c10, 31, 
0x0003, 23, 0x92f6,
+31, 0x, 23, 0x003d, 30, 0x00de, 20, 
0x20e7,  9, 0x0700,
+ 
--*/
+   // 12/17/03 IP1000A v1-4 rev=0x40
+   (0x4000 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
+   0x,
+   30, 0x005e, 9, 0x0700,
+   // 01/09/04 IP1000A v1-5 rev=0x41
+   (0x4100 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
+   0x,
+   30, 0x005e, 9, 0x0700,
+   0x
+};
+
 static const char *ipg_brand_name[] = {
IC PLUS IP1000 1000/100/10 based NIC,
Sundance Technology ST2021 based NIC,
@@ -990,7 +1010,7 @@ static void ipg_nic_txcleanup(struct net_device *dev)
 }
 
 /* Provides statistical information about the IPG NIC. */
-struct net_device_stats *ipg_nic_get_stats(struct net_device *dev)
+static struct net_device_stats *ipg_nic_get_stats(struct net_device *dev)
 {
struct ipg_nic_private *sp = netdev_priv(dev);
void __iomem *ioaddr = sp-ioaddr;
diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h
index e418b90..d5d092c 100644
--- a/drivers/net/ipg.h
+++ b/drivers/net/ipg.h
@@ -833,24 +833,4 @@ struct ipg_nic_private {
struct delayed_work task;
 };
 
-//variable record -- index by leading revision/length
-//Revision/Length(=N*4), Address1, Data1, Address2, Data2,...,AddressN,DataN
-unsigned short DefaultPhyParam[] = {
-   // 11/12/03 IP1000A v1-3 rev=0x40
-   
/*--
-   (0x4000|(15*4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 22, 0x85bd, 24, 
0xfff2,
-27, 0x0c10, 28, 0x0c10, 29, 0x2c10, 31, 
0x0003, 23, 0x92f6,
-31, 0x, 23, 0x003d, 30, 0x00de, 20, 
0x20e7,  9, 0x0700,
- 
--*/
-   // 12/17/03 IP1000A v1-4 rev=0x40
-   (0x4000 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
-   0x,
-   30, 0x005e, 9, 0x0700,
-   // 01/09/04 IP1000A v1-5 rev=0x41
-   (0x4100 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
-   0x,
-   30, 0x005e, 9, 0x0700,
-   0x
-};
-
 #endif /* __LINUX_IPG_H */

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   3   4   5   6   >