Re: [PATCH 0/4] [IrDA] IrDA fixes for net-2.6.25

2008-01-19 Thread David Miller
From: [EMAIL PROTECTED]
Date: Sat, 19 Jan 2008 01:02:05 +0100

 Here goes a batch of 4 IrDA patches against your latest net-2.6.25 tree.

All 4 patches applied, thanks Sam.

You might want to consider submitting those first two
patches for 2.6.24 as they look like pure fixes.
--
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] [IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.

2008-01-19 Thread David Miller
From: YOSHIFUJI Hideaki / 吉藤英明 [EMAIL PROTECTED]
Date: Sat, 19 Jan 2008 02:00:30 +0900 (JST)

 We omit (or delay) sending NSes for known-to-unreachable routers
 (in NUD_FAILED state) according to RFC 4191 (Default Router Preferences
 and More-Specific Routes).
 But this is not fully compatible with RFC 4861 (Neighbor Discovery Protocol
 for IPv6), which does not remember unreachability of neighbors.
 
 So, let's avoid mixing sending algorithm of RFC 4191 and that of RFC 4861,
 and make the algorithm more friendly with RFC 4861 if RFC 4191 is disabled.
 
 Issue was found by IPv6 Ready Logo Core Self_Test 1.5.0b2 (by TAHI Project),
 and has been tracked down by Mitsuru Chinen [EMAIL PROTECTED].
 
 Signed-off-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]

Applied to net-2.6, thanks.
--
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


[PATCH net-2.6.25] [XFRM] Remove unneeded export of xfrm_output_resume() and remove its declaration from net/xfrm.h.

2008-01-19 Thread Rami Rosen
Hi,

The method xfrm_output_resume() is used only in net/xfrm/xfrm_output.c.

This patch removes using unneeded EXPORT_SYMBOL_GPL to export it in
net/xfrm/xfrm_output.c and also removes its declaration in net/xfrm.h.

Regards,
Rami Rosen


Signed-off-by: Rami Rosen [EMAIL PROTECTED]
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 5ebb9ba..40ae133 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1242,7 +1242,6 @@ extern int xfrm_prepare_input(struct xfrm_state *x, 
struct sk_buff *skb);
 extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi,
  int encap_type);
 extern int xfrm_input_resume(struct sk_buff *skb, int nexthdr);
-extern int xfrm_output_resume(struct sk_buff *skb, int err);
 extern int xfrm_output(struct sk_buff *skb);
 extern int xfrm4_extract_header(struct sk_buff *skb);
 extern int xfrm4_extract_input(struct xfrm_state *x, struct sk_buff *skb);
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index f4a1047..9a6e92e 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -136,7 +136,6 @@ int xfrm_output_resume(struct sk_buff *skb, int err)
 out:
return err;
 }
-EXPORT_SYMBOL_GPL(xfrm_output_resume);
 
 static int xfrm_output2(struct sk_buff *skb)
 {


[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: [2.6 patch] atm/idt77105.c: fix section mismatch

2008-01-19 Thread Sam Ravnborg
On Sat, Jan 19, 2008 at 03:18:49PM +0200, Adrian Bunk wrote:
 EXPORT_SYMBOL'ed code mustn't be __*init.
 
 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Acked-by: Sam Ravnborg [EMAIL PROTECTED]
 
 ---
 --- linux-2.6/drivers/atm/idt77105.c.old  2008-01-19 11:19:53.0 
 +0200
 +++ linux-2.6/drivers/atm/idt77105.c  2008-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
--
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] atm/suni.c: fix section mismatch

2008-01-19 Thread Sam Ravnborg
On Sat, Jan 19, 2008 at 03:18:51PM +0200, Adrian Bunk wrote:
 EXPORT_SYMBOL'ed code mustn't be __*init.
 
 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Acked-by: Sam Ravnborg [EMAIL PROTECTED]
 
 ---
 --- linux-2.6/drivers/atm/suni.c.old  2008-01-19 12:16:41.0 +0200
 +++ linux-2.6/drivers/atm/suni.c  2008-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
--
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] IPv4: Enable use of 240/4 address space

2008-01-19 Thread Jan Engelhardt

On Jan 18 2008 11:13, YOSHIFUJI Hideaki / 吉藤英明 wrote:
 -static inline bool ipv4_is_badclass(__be32 addr)
 +static inline bool ipv4_is_broadcast(__be32 addr)
  {

I'm just afraid that people might think ipv4_is_broadcast
is for testing subnet broadcast address.

255.255.255.255 is limited broadcast address
(vs subnet broadcast address, which can be forwarded by routers).



From 84bccef295aa9754ee662191e32ba1d64edce2ba Mon Sep 17 00:00:00 2001
From: Jan Engelhardt [EMAIL PROTECTED]
Date: Fri, 18 Jan 2008 02:10:44 +0100
Subject: [PATCH] IPv4: enable use of 240/4 address space

This short patch modifies the IPv4 networking to enable use of the
240.0.0.0/4 (aka class-E) address space as propsed in the internet
draft draft-fuller-240space-00.txt.

Signed-off-by: Jan Engelhardt [EMAIL PROTECTED]
---
 include/linux/in.h  |5 +++--
 include/net/addrconf.h  |2 +-
 net/core/pktgen.c   |2 +-
 net/ipv4/fib_frontend.c |2 +-
 net/ipv4/route.c|   12 ++--
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/include/linux/in.h b/include/linux/in.h
index 27d8a5a..70c6df8 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -262,9 +262,10 @@ static inline bool ipv4_is_local_multicast(__be32 addr)
return (addr  htonl(0xff00)) == htonl(0xe000);
 }
 
-static inline bool ipv4_is_badclass(__be32 addr)
+static inline bool ipv4_is_lbcast(__be32 addr)
 {
-   return (addr  htonl(0xf000)) == htonl(0xf000);
+   /* limited broadcast */
+   return addr == INADDR_BROADCAST;
 }
 
 static inline bool ipv4_is_zeronet(__be32 addr)
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 8b1509b..496503c 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -262,7 +262,7 @@ static inline int ipv6_isatap_eui64(u8 *eui, __be32 addr)
  ipv4_is_private_172(addr) || ipv4_is_test_192(addr) ||
  ipv4_is_anycast_6to4(addr) || ipv4_is_private_192(addr) ||
  ipv4_is_test_198(addr) || ipv4_is_multicast(addr) ||
- ipv4_is_badclass(addr)) ? 0x00 : 0x02;
+ ipv4_is_lbcast(addr)) ? 0x00 : 0x02;
eui[1] = 0;
eui[2] = 0x5E;
eui[3] = 0xFE;
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index d18fdb1..eebccdb 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2266,7 +2266,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
 
while (ipv4_is_loopback(s) ||
   ipv4_is_multicast(s) ||
-  ipv4_is_badclass(s) ||
+  ipv4_is_lbcast(s) ||
   ipv4_is_zeronet(s) ||
   ipv4_is_local_multicast(s)) {
t = random32() % (imx - imn) + 
imn;
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 8ddcd3f..995b453 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -176,7 +176,7 @@ static inline unsigned __inet_dev_addr_type(struct net *net,
unsigned ret = RTN_BROADCAST;
struct fib_table *local_table;
 
-   if (ipv4_is_zeronet(addr) || ipv4_is_badclass(addr))
+   if (ipv4_is_zeronet(addr) || ipv4_is_lbcast(addr))
return RTN_BROADCAST;
if (ipv4_is_multicast(addr))
return RTN_MULTICAST;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1e59c0d..1e484f7 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1154,7 +1154,7 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 
new_gw,
return;
 
if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev)
-   || ipv4_is_multicast(new_gw) || ipv4_is_badclass(new_gw)
+   || ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw)
|| ipv4_is_zeronet(new_gw))
goto reject_redirect;
 
@@ -1634,7 +1634,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 
daddr, __be32 saddr,
if (in_dev == NULL)
return -EINVAL;
 
-   if (ipv4_is_multicast(saddr) || ipv4_is_badclass(saddr) ||
+   if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr) ||
ipv4_is_loopback(saddr) || skb-protocol != htons(ETH_P_IP))
goto e_inval;
 
@@ -1891,7 +1891,7 @@ static int ip_route_input_slow(struct sk_buff *skb, 
__be32 daddr, __be32 saddr,
   by fib_lookup.
 */
 
-   if (ipv4_is_multicast(saddr) || ipv4_is_badclass(saddr) ||
+   if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr) ||
ipv4_is_loopback(saddr))
goto martian_source;
 
@@ -1904,7 +1904,7 @@ static int ip_route_input_slow(struct sk_buff *skb, 
__be32 daddr, __be32 saddr,
if (ipv4_is_zeronet(saddr))
goto martian_source;
 
-   if (ipv4_is_badclass(daddr) || 

Re: [PATCH][NEIGH] Fix race between neigh_parms_release and neightbl_fill_parms

2008-01-19 Thread Andrey Rahmatullin
This patch causes messages like 'unregister_netdevice: waiting for ppp0 to
become free. Usage count = 1' when I try 'ifdown ppp0'. This happens in all
kernel versions containing this commit and doesn't happen in 2.6.24-rc8
with this commit reverted.

-- 
WBR, wRAR (ALT Linux Team)


signature.asc
Description: Digital signature


Re: [PATCH] IPv4: Enable use of 240/4 address space

2008-01-19 Thread YOSHIFUJI Hideaki / 吉藤英明
In article [EMAIL PROTECTED] (at Sat, 19 Jan 2008 14:44:13 +0100 (CET)), Jan 
Engelhardt [EMAIL PROTECTED] says:

 From 84bccef295aa9754ee662191e32ba1d64edce2ba Mon Sep 17 00:00:00 2001
 From: Jan Engelhardt [EMAIL PROTECTED]
 Date: Fri, 18 Jan 2008 02:10:44 +0100
 Subject: [PATCH] IPv4: enable use of 240/4 address space
 
 This short patch modifies the IPv4 networking to enable use of the
 240.0.0.0/4 (aka class-E) address space as propsed in the internet
 draft draft-fuller-240space-00.txt.
 
 Signed-off-by: Jan Engelhardt [EMAIL PROTECTED]
Acked-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]

--yoshfuji
--
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: [Bugme-new] [Bug 9773] New: pptp/ppp connection die at high speed on Athlon X2 6000+

2008-01-19 Thread Jarek Poplawski
Andrew Morton wrote, On 01/18/2008 08:48 AM:

 On Thu, 17 Jan 2008 23:33:54 -0800 (PST) [EMAIL PROTECTED] wrote:
 
 http://bugzilla.kernel.org/show_bug.cgi?id=9773

Summary: pptp/ppp connection die at high speed on Athlon X2 6000+
Product: Networking
Version: 2.5
  KernelVersion: 2.6.23.12


...

 kernel 2.6.24rc8 makes it worst. As I see it just hangs my console with 
 message
 something like waiting for ppp0 finish or so... I don't remember exactly
 message.

Could you please:

- check this after echo 1  /proc/sys/kernel/sched_compat_yield
- check this with 2.6.22

Regards,
Jarek P.
--
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


[PATCH] mv643xx: fix byte order when checksum offload is enabled

2008-01-19 Thread Byron Bradley
The Marvell Orion system on chips have an integrated mv643xx MAC.
On these little endian ARM devices mv643xx will oops when checksum
offload is enabled. Swapping the byte order of the protocol and
checksum solves this problem.

Signed-off-by: Byron Bradley [EMAIL PROTECTED]
Cc: Dale Farnsworth [EMAIL PROTECTED]
Cc: Manish Lachwani [EMAIL PROTECTED]
Cc: Tzachi Perelstein [EMAIL PROTECTED]
---

This patch has only been tested on two Marvell Orion based boards so it
should be considered only very lightly tested. It applies against
2.6.24-rc8-mm1.

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

diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 651c269..5d16a5d 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1689,7 +1689,7 @@ static void eth_tx_submit_descs_for_skb(struct 
mv643xx_private *mp,
desc-buf_ptr = dma_map_single(NULL, skb-data, length, DMA_TO_DEVICE);
 
if (skb-ip_summed == CHECKSUM_PARTIAL) {
-   BUG_ON(skb-protocol != ETH_P_IP);
+   BUG_ON(skb-protocol != htons(ETH_P_IP));
 
cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM |
   ETH_GEN_IP_V_4_CHECKSUM  |
@@ -1698,10 +1698,10 @@ static void eth_tx_submit_descs_for_skb(struct 
mv643xx_private *mp,
switch (ip_hdr(skb)-protocol) {
case IPPROTO_UDP:
cmd_sts |= ETH_UDP_FRAME;
-   desc-l4i_chk = udp_hdr(skb)-check;
+   desc-l4i_chk = htons(udp_hdr(skb)-check);
break;
case IPPROTO_TCP:
-   desc-l4i_chk = tcp_hdr(skb)-check;
+   desc-l4i_chk = htons(tcp_hdr(skb)-check);
break;
default:
BUG();
-- 
1.5.4.rc2.38.gd6da3


--
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] mv643xx: fix byte order when checksum offload is enabled

2008-01-19 Thread Al Viro
On Sat, Jan 19, 2008 at 07:27:38PM +, Byron Bradley wrote:
   case IPPROTO_UDP:
   cmd_sts |= ETH_UDP_FRAME;
 - desc-l4i_chk = udp_hdr(skb)-check;
 + desc-l4i_chk = htons(udp_hdr(skb)-check);
   break;
   case IPPROTO_TCP:
 - desc-l4i_chk = tcp_hdr(skb)-check;
 + desc-l4i_chk = htons(tcp_hdr(skb)-check);
   break;

The first part was OK, but this one...  AFAICS, the sucker byteswaps
64bit words in descriptors wholesale, right?  Then the right way to spell
that would be ntohs((__force __be16)-check).

What's happening here is that we take a fixed-endian (checksum) and then
correct for conversion done in hardware - i.e. we store it in something
that expects a _host_-endian value and would convert that to fixed-endian.
So we need to counter that correction and that's where the damn thing is
coming from.

It's not particulary rare - drivers that do hardware byteswap tend to need
it.  For now I'd suggest explicit form (with force-cast from __csum to
__be16 and ntohs() on top of it); if anybody has good ideas for helper
names, though...  csum_as_le() and csum_as_be(), perhaps?  Interpret
__csum (fixed-endian) and another fixed-endian type, with proper checks;
i.e. something along the lines of
static inline __be16 csum_as_be(__csum sum)
{
return (__force __be16)sum;
}
and this stuff becoming ntohs(csum_as_be(udp_hdr(skb)-check)), etc.
--
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


[PATCH] mv643xx_eth: fix byte order when checksum offload is enabled

2008-01-19 Thread Dale Farnsworth
From: Byron Bradley [EMAIL PROTECTED]

The Marvell Orion system on chips have an integrated mv643xx MAC.
On these little endian ARM devices mv643xx will oops when checksum
offload is enabled. Swapping the byte order of the protocol and
checksum solves this problem.

Signed-off-by: Byron Bradley [EMAIL PROTECTED]
Signed-off-by: Dale Farnsworth [EMAIL PROTECTED]
Cc: Manish Lachwani [EMAIL PROTECTED]
Cc: Tzachi Perelstein [EMAIL PROTECTED]

---

Byron Bradley wrote:
 This patch has only been tested on two Marvell Orion based boards so it
 should be considered only very lightly tested. It applies against
 2.6.24-rc8-mm1.

Dale Farnsworth:
Looks good to me and I successfully booted it on a big-endian prpmc2800 board.

Jeff, please pick this up.  My mv643xx queue is otherwise empty.

Thanks,
-Dale

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

diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 651c269..5d16a5d 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1689,7 +1689,7 @@ static void eth_tx_submit_descs_for_skb(struct 
mv643xx_private *mp,
desc-buf_ptr = dma_map_single(NULL, skb-data, length, DMA_TO_DEVICE);
 
if (skb-ip_summed == CHECKSUM_PARTIAL) {
-   BUG_ON(skb-protocol != ETH_P_IP);
+   BUG_ON(skb-protocol != htons(ETH_P_IP));
 
cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM |
   ETH_GEN_IP_V_4_CHECKSUM  |
@@ -1698,10 +1698,10 @@ static void eth_tx_submit_descs_for_skb(struct 
mv643xx_private *mp,
switch (ip_hdr(skb)-protocol) {
case IPPROTO_UDP:
cmd_sts |= ETH_UDP_FRAME;
-   desc-l4i_chk = udp_hdr(skb)-check;
+   desc-l4i_chk = htons(udp_hdr(skb)-check);
break;
case IPPROTO_TCP:
-   desc-l4i_chk = tcp_hdr(skb)-check;
+   desc-l4i_chk = htons(tcp_hdr(skb)-check);
break;
default:
BUG();
-- 
1.5.4.rc2.38.gd6da3


--
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 net-2.6.25] [XFRM] Remove unneeded export of xfrm_output_resume() and remove its declaration from net/xfrm.h.

2008-01-19 Thread Herbert Xu
Rami Rosen [EMAIL PROTECTED] wrote:
 
 The method xfrm_output_resume() is used only in net/xfrm/xfrm_output.c.
 
 This patch removes using unneeded EXPORT_SYMBOL_GPL to export it in
 net/xfrm/xfrm_output.c and also removes its declaration in net/xfrm.h.

This will be used ESP.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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] mv643xx_eth: fix byte order when checksum offload is enabled

2008-01-19 Thread Dale Farnsworth
OK, after digesting Al Viro's comments on this, I agree with him
and retract this.  These multiple byte swaps sure are confusing.

Byron, would you please resubmit?

Thanks,
-Dale

On Sat, Jan 19, 2008 at 01:23:01PM -0700, Dale Farnsworth wrote:
 From: Byron Bradley [EMAIL PROTECTED]
 
 The Marvell Orion system on chips have an integrated mv643xx MAC.
 On these little endian ARM devices mv643xx will oops when checksum
 offload is enabled. Swapping the byte order of the protocol and
 checksum solves this problem.
 
 Signed-off-by: Byron Bradley [EMAIL PROTECTED]
 Signed-off-by: Dale Farnsworth [EMAIL PROTECTED]
 Cc: Manish Lachwani [EMAIL PROTECTED]
 Cc: Tzachi Perelstein [EMAIL PROTECTED]
 
 ---
 
 Byron Bradley wrote:
  This patch has only been tested on two Marvell Orion based boards so it
  should be considered only very lightly tested. It applies against
  2.6.24-rc8-mm1.
 
 Dale Farnsworth:
 Looks good to me and I successfully booted it on a big-endian prpmc2800 board.
 
 Jeff, please pick this up.  My mv643xx queue is otherwise empty.
 
 Thanks,
 -Dale
 
  drivers/net/mv643xx_eth.c |6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
 index 651c269..5d16a5d 100644
 --- a/drivers/net/mv643xx_eth.c
 +++ b/drivers/net/mv643xx_eth.c
 @@ -1689,7 +1689,7 @@ static void eth_tx_submit_descs_for_skb(struct 
 mv643xx_private *mp,
   desc-buf_ptr = dma_map_single(NULL, skb-data, length, DMA_TO_DEVICE);
  
   if (skb-ip_summed == CHECKSUM_PARTIAL) {
 - BUG_ON(skb-protocol != ETH_P_IP);
 + BUG_ON(skb-protocol != htons(ETH_P_IP));
  
   cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM |
  ETH_GEN_IP_V_4_CHECKSUM  |
 @@ -1698,10 +1698,10 @@ static void eth_tx_submit_descs_for_skb(struct 
 mv643xx_private *mp,
   switch (ip_hdr(skb)-protocol) {
   case IPPROTO_UDP:
   cmd_sts |= ETH_UDP_FRAME;
 - desc-l4i_chk = udp_hdr(skb)-check;
 + desc-l4i_chk = htons(udp_hdr(skb)-check);
   break;
   case IPPROTO_TCP:
 - desc-l4i_chk = tcp_hdr(skb)-check;
 + desc-l4i_chk = htons(tcp_hdr(skb)-check);
   break;
   default:
   BUG();
 -- 
 1.5.4.rc2.38.gd6da3
 
 
--
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: Packetlost when tc qdisc del dev eth0 root

2008-01-19 Thread Jarek Poplawski
Patrick McHardy wrote, On 01/16/2008 06:12 AM:

 [EMAIL PROTECTED] wrote:
 Good night! =)

 Sorry... i was wrong...
 I see that problem more serious

 Lets see to scheme

 Class 1
 ---qdisc
 --- 10k classes
 Class 2
 ---qdisc
 --- 10k classes

 All traffic go to class 2... class 1 qdisc not have packets and if we 
 delete it - packets not lost... in theory... lets try delete class 1 
 qdisc (all childrens delete too)...
 PC freeze on 2-5 seconds... its not forward any traffic at this 
 moment... its great tree lock?

 Its normal or code need to more accurate lock?
 
 
 htb class destruction can be quite expansive if one of the rb trees
 needs to be rebalanced. Doing that for 1 classes would explain
 the delay.

I've just looked at this and it seems there should be no rbtrees operations
during htb qdisc deletion (or I miss something).

Slavon, I see nearby that you teach oprofile...

Regards,
Jarek P.
--
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


[PATCH 00/14] RFC: Driver for Wireless RNDIS USB devices.

2008-01-19 Thread Jussi Kivilinna
Hello,

This is second try on wireless RNDIS patchset started by Bjorge Dijkstra. Since
Bjorge has disappeared, I claim maintainership of rndis_wext and this patchset
until he returns.

This patchset adds support for various 802.11 USB devices based on Broadcom
4320 chip. Chip uses RNDIS to communicate with the host, so module depend
heavily on rndis_host/cdc_ether/usbnet and needs some changes on these 
modules in order to work.

Patches 1-6 are from first patchset:
 1. Fix sparse warning: returning void valued expression
 2. [cdc_ether] Hardwire CDC descriptors when missing
 3. [rndis_host] Use 1KB buffer in rndis_unbind
 4. [rndis_host] Halt device if rndis_bind fails
 5. [rndis_host] Fix rndis packet filter flags
 6. [usbnet] Use wlan device name for RNDIS wireless devices

Of these 1, 3 and 4 are not required for this version of rndis_wext to work.

Actual wireless part is changed from extension on rndis_host to separate 
driver. Different devices are detected by device specific USB vendor/product 
IDs as the way done with Windows drivers instead of detecting RNDIS media type 
like in first patchset.

New patches 7-14:
 7. [rndis_host] Split up rndis_host.c
 8. [rndis_host] export functions
 9. [usbnet] add driver_priv pointer to 'struct usbnet'
10. [rndis_host] Add rndis_early_init function pointer to 'struct rndis_data'.
11. [rndis_host] Add rndis_link_change function pointer to 'struct rndis_data'.
12. Move usbnet.h and rndis_host.h to include/linux/usb
13. [rndis_host] blacklist known wireless RNDIS devices
14. Add new driver 'rndis_wext' for wireless RNDIS devices.

Patches should be applied in order, series apply cleanly to 2.6.24-rc8.

 - Jussi Kivilinna

--
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


[PATCH 01/14] Fix sparse warning: returning void-valued expression

2008-01-19 Thread Jussi Kivilinna
From: Bjorge Dijkstra [EMAIL PROTECTED]

rndis_unbind and usbnet_cdc_unbind don't return anything.

Signed-off-by: Bjorge Dijkstra [EMAIL PROTECTED]
Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 1ebe325..96ef6a9 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -585,7 +585,7 @@ static void rndis_unbind(struct usbnet *dev, struct 
usb_interface *intf)
kfree(halt);
}
 
-   return usbnet_cdc_unbind(dev, intf);
+   usbnet_cdc_unbind(dev, intf);
 }
 
 /*

--
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


[PATCH 02/14] [cdc_ether] Hardwire CDC descriptors when missing

2008-01-19 Thread Jussi Kivilinna
From: Bjorge Dijkstra [EMAIL PROTECTED]

Just as ActiveSync devices, some regular RNDIS devices also lack
the CDC descriptors (e.g. devices based on BCM4320 WLAN chip).
This patch hardwires the CDC descriptors for all RNDIS style devices
when they are missing.

Signed-off-by: Bjorge Dijkstra [EMAIL PROTECTED]
Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/cdc_ether.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index a42acc3..97c17bb 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -228,15 +228,16 @@ next_desc:
buf += buf [0];
}
 
-   /* Microsoft ActiveSync based RNDIS devices lack the CDC descriptors,
-* so we'll hard-wire the interfaces and not check for descriptors.
+   /* Microsoft ActiveSync based and some regular RNDIS devices lack the
+* CDC descriptors, so we'll hard-wire the interfaces and not check
+* for descriptors.
 */
-   if (is_activesync(intf-cur_altsetting-desc)  !info-u) {
+   if (rndis  !info-u) {
info-control = usb_ifnum_to_if(dev-udev, 0);
info-data = usb_ifnum_to_if(dev-udev, 1);
if (!info-control || !info-data) {
dev_dbg(intf-dev,
-   activesync: master #0/%p slave #1/%p\n,
+   rndis: master #0/%p slave #1/%p\n,
info-control,
info-data);
goto bad_desc;
@@ -316,7 +317,6 @@ void usbnet_cdc_unbind(struct usbnet *dev, struct 
usb_interface *intf)
 }
 EXPORT_SYMBOL_GPL(usbnet_cdc_unbind);
 
-
 /*-
  *
  * Communications Device Class, Ethernet Control model

--
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


[PATCH 03/14] [rndis_host] Use 1KB buffer in rndis_unbind

2008-01-19 Thread Jussi Kivilinna
rndis_command requires the caller to pass in a buffer of at least 1KB.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
Signed-off-by: Bjorge Dijkstra [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 96ef6a9..42b161c 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -577,7 +577,7 @@ static void rndis_unbind(struct usbnet *dev, struct 
usb_interface *intf)
struct rndis_halt   *halt;
 
/* try to clear any rndis state/activity (no i/o from stack!) */
-   halt = kzalloc(sizeof *halt, GFP_KERNEL);
+   halt = kzalloc(CONTROL_BUFFER_SIZE, GFP_KERNEL);
if (halt) {
halt-msg_type = RNDIS_MSG_HALT;
halt-msg_len = ccpu2(sizeof *halt);

--
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


[PATCH 04/14] [rndis_host] Halt device if rndis_bind fails.

2008-01-19 Thread Jussi Kivilinna
When bind fails after device was initialized, shutdown device properly
by sending RNDIS_MSG_HALT.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
Signed-off-by: Bjorge Dijkstra [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 42b161c..c686025 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -467,6 +467,7 @@ static int rndis_bind(struct usbnet *dev, struct 
usb_interface *intf)
struct rndis_query_c*get_c;
struct rndis_set*set;
struct rndis_set_c  *set_c;
+   struct rndis_halt   *halt;
} u;
u32 tmp;
int reply_len;
@@ -517,7 +518,7 @@ static int rndis_bind(struct usbnet *dev, struct 
usb_interface *intf)
dev can't take %u byte packets (max %u)\n,
dev-hard_mtu, tmp);
retval = -EINVAL;
-   goto fail_and_release;
+   goto halt_fail_and_release;
}
dev-hard_mtu = tmp;
net-mtu = dev-hard_mtu - net-hard_header_len;
@@ -539,7 +540,7 @@ static int rndis_bind(struct usbnet *dev, struct 
usb_interface *intf)
48, (void **) bp, reply_len);
if (unlikely(retval 0)) {
dev_err(intf-dev, rndis get ethaddr, %d\n, retval);
-   goto fail_and_release;
+   goto halt_fail_and_release;
}
memcpy(net-dev_addr, bp, ETH_ALEN);
 
@@ -555,7 +556,7 @@ static int rndis_bind(struct usbnet *dev, struct 
usb_interface *intf)
retval = rndis_command(dev, u.header);
if (unlikely(retval  0)) {
dev_err(intf-dev, rndis set packet filter, %d\n, retval);
-   goto fail_and_release;
+   goto halt_fail_and_release;
}
 
retval = 0;
@@ -563,6 +564,11 @@ static int rndis_bind(struct usbnet *dev, struct 
usb_interface *intf)
kfree(u.buf);
return retval;
 
+halt_fail_and_release:
+   memset(u.halt, 0, sizeof *u.halt);
+   u.halt-msg_type = RNDIS_MSG_HALT;
+   u.halt-msg_len = ccpu2(sizeof *u.halt);
+   (void) rndis_command(dev, (void *)u.halt);
 fail_and_release:
usb_set_intfdata(info-data, NULL);
usb_driver_release_interface(driver_of(intf), info-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


[PATCH 05/14] [rndis_host] Fix rndis packet filter flags.

2008-01-19 Thread Jussi Kivilinna
RNDIS packet filter flags are not exactly the same as CDC flags
so we cannot reuse them.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
Signed-off-by: Bjorge Dijkstra [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |   23 ++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index c686025..12daf9c 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -256,6 +256,27 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */
 #define OID_GEN_MAXIMUM_FRAME_SIZE ccpu2(0x00010106)
 #define OID_GEN_CURRENT_PACKET_FILTER  ccpu2(0x0001010e)
 
+/* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */
+#define RNDIS_PACKET_TYPE_DIRECTED ccpu2(0x0001)
+#define RNDIS_PACKET_TYPE_MULTICASTccpu2(0x0002)
+#define RNDIS_PACKET_TYPE_ALL_MULTICASTccpu2(0x0004)
+#define RNDIS_PACKET_TYPE_BROADCASTccpu2(0x0008)
+#define RNDIS_PACKET_TYPE_SOURCE_ROUTING   ccpu2(0x0010)
+#define RNDIS_PACKET_TYPE_PROMISCUOUS  ccpu2(0x0020)
+#define RNDIS_PACKET_TYPE_SMT  ccpu2(0x0040)
+#define RNDIS_PACKET_TYPE_ALL_LOCALccpu2(0x0080)
+#define RNDIS_PACKET_TYPE_GROUPccpu2(0x1000)
+#define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL   ccpu2(0x2000)
+#define RNDIS_PACKET_TYPE_FUNCTIONAL   ccpu2(0x4000)
+#define RNDIS_PACKET_TYPE_MAC_FRAMEccpu2(0x8000)
+
+/* default filter used with RNDIS devices */
+#define RNDIS_DEFAULT_FILTER ( \
+   RNDIS_PACKET_TYPE_DIRECTED | \
+   RNDIS_PACKET_TYPE_BROADCAST | \
+   RNDIS_PACKET_TYPE_ALL_MULTICAST | \
+   RNDIS_PACKET_TYPE_PROMISCUOUS)
+
 /*
  * RNDIS notifications from device: command completion; reverse
  * keepalives; etc
@@ -551,7 +572,7 @@ static int rndis_bind(struct usbnet *dev, struct 
usb_interface *intf)
u.set-oid = OID_GEN_CURRENT_PACKET_FILTER;
u.set-len = ccpu2(4);
u.set-offset = ccpu2((sizeof *u.set) - 8);
-   *(__le32 *)(u.buf + sizeof *u.set) = ccpu2(DEFAULT_FILTER);
+   *(__le32 *)(u.buf + sizeof *u.set) = RNDIS_DEFAULT_FILTER;
 
retval = rndis_command(dev, u.header);
if (unlikely(retval  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


[PATCH 06/14] [usbnet] Use wlan device name for RNDIS wireless devices

2008-01-19 Thread Jussi Kivilinna
Use wlan device name for RNDIS wireless devices.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
Signed-off-by: Bjorge Dijkstra [EMAIL PROTECTED]
---

 drivers/net/usb/usbnet.c |3 +++
 drivers/net/usb/usbnet.h |2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 8ed1fc5..a2a2d5e 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1204,6 +1204,9 @@ usbnet_probe (struct usb_interface *udev, const struct 
usb_device_id *prod)
if ((dev-driver_info-flags  FLAG_ETHER) != 0
 (net-dev_addr [0]  0x02) == 0)
strcpy (net-name, eth%d);
+   /* WLAN devices should always be named wlan%d */
+   if ((dev-driver_info-flags  FLAG_WLAN) != 0)
+   strcpy(net-name, wlan%d);
 
/* maybe the remote can't receive an Ethernet MTU */
if (net-mtu  (dev-hard_mtu - net-hard_header_len))
diff --git a/drivers/net/usb/usbnet.h b/drivers/net/usb/usbnet.h
index 1fae434..29ab92e 100644
--- a/drivers/net/usb/usbnet.h
+++ b/drivers/net/usb/usbnet.h
@@ -87,6 +87,8 @@ struct driver_info {
 #define FLAG_ETHER 0x0020  /* maybe use eth%d names */
 
 #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */
+#define FLAG_WLAN  0x0080  /* use wlan%d names */
+
 
/* init device ... can sleep, or cause probe() failure */
int (*bind)(struct usbnet *, struct usb_interface *);

--
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


[PATCH 10/14] [rndis_host] Add rndis_early_init function pointer to 'struct rndis_data'.

2008-01-19 Thread Jussi Kivilinna
Function pointer is for rndis minidrivers that need to do work on device right
after RNDIS_INIT. For example setting device specific configuration parameters
with OID_GEN_RNDIS_CONFIG_PARAMETER.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |6 ++
 drivers/net/usb/usbnet.h |3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 1d6bf0a..22e5ca1 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -336,6 +336,12 @@ int generic_rndis_bind(struct usbnet *dev, struct 
usb_interface *intf)
dev-hard_mtu, tmp, dev-rx_urb_size,
1  le32_to_cpu(u.init_c-packet_alignment));
 
+   /* module has some device initialization code needs to be done right
+* after RNDIS_INIT */
+   if (dev-driver_info-rndis_early_init 
+   dev-driver_info-rndis_early_init(dev) != 0)
+   goto halt_fail_and_release;
+
/* Get designated host ethernet address */
reply_len = ETH_ALEN;
retval = rndis_query(dev, intf, u.buf, OID_802_3_PERMANENT_ADDRESS,
diff --git a/drivers/net/usb/usbnet.h b/drivers/net/usb/usbnet.h
index 0b4bf09..2bc5f76 100644
--- a/drivers/net/usb/usbnet.h
+++ b/drivers/net/usb/usbnet.h
@@ -116,6 +116,9 @@ struct driver_info {
struct sk_buff  *(*tx_fixup)(struct usbnet *dev,
struct sk_buff *skb, gfp_t flags);
 
+   /* rndis minidriver early initialization code, can sleep */
+   int (*rndis_early_init)(struct usbnet *dev);
+
/* for new devices, use the descriptor-reading code instead */
int in; /* rx endpoint */
int out;/* tx endpoint */

--
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


[PATCH 11/14] [rndis_host] Add rndis_link_change function pointer to 'struct rndis_data'.

2008-01-19 Thread Jussi Kivilinna
Callback to signal link state changes to rndis_wext.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |   24 
 drivers/net/usb/usbnet.h |3 +++
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 22e5ca1..c295fa1 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -148,10 +148,26 @@ int rndis_command(struct usbnet *dev, struct 
rndis_msg_hdr *buf)
request_id, xid);
/* then likely retry */
} else switch (buf-msg_type) {
-   case RNDIS_MSG_INDICATE: {  /* fault */
-   // struct rndis_indicate *msg = (void *)buf;
-   dev_info(info-control-dev,
-   rndis fault indication\n);
+   case RNDIS_MSG_INDICATE: {  /* fault/event */
+   struct rndis_indicate *msg = (void *)buf;
+   int state = 0;
+
+   switch (msg-status) {
+   case RNDIS_STATUS_MEDIA_CONNECT:
+   state = 1;
+   case RNDIS_STATUS_MEDIA_DISCONNECT:
+   dev_info(info-control-dev,
+   rndis media %sconnect\n,
+   !state?dis:);
+   if (dev-driver_info-rndis_link_change)
+   
dev-driver_info-rndis_link_change(
+   dev, state);
+   break;
+   default:
+   dev_info(info-control-dev,
+   rndis indication: 0x%08x\n,
+   le32_to_cpu(msg-status));
+   }
}
break;
case RNDIS_MSG_KEEPALIVE: { /* ping */
diff --git a/drivers/net/usb/usbnet.h b/drivers/net/usb/usbnet.h
index 2bc5f76..5f5b309 100644
--- a/drivers/net/usb/usbnet.h
+++ b/drivers/net/usb/usbnet.h
@@ -119,6 +119,9 @@ struct driver_info {
/* rndis minidriver early initialization code, can sleep */
int (*rndis_early_init)(struct usbnet *dev);
 
+   /* called when link state changes, state: 0=disconnect, 1=connect */
+   void(*rndis_link_change)(struct usbnet *dev, int state);
+
/* for new devices, use the descriptor-reading code instead */
int in; /* rx endpoint */
int out;/* tx endpoint */

--
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


[PATCH 12/14] Move usbnet.h and rndis_host.h to include/linux/usb

2008-01-19 Thread Jussi Kivilinna
Move headers usbnet.h and rndis_host.h to include/linux/usb and fix includes
for drivers/net/usb modules. Headers are moved because rndis_wext will be
outside drivers/net/usb in drivers/net/wireless and yet need these headers.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/asix.c |3 
 drivers/net/usb/cdc_ether.c|3 
 drivers/net/usb/cdc_subset.c   |3 
 drivers/net/usb/dm9601.c   |3 
 drivers/net/usb/gl620a.c   |3 
 drivers/net/usb/mcs7830.c  |3 
 drivers/net/usb/net1080.c  |3 
 drivers/net/usb/plusb.c|3 
 drivers/net/usb/rndis_host.c   |5 -
 drivers/net/usb/rndis_host.h   |  257 
 drivers/net/usb/usbnet.c   |3 
 drivers/net/usb/usbnet.h   |  211 -
 drivers/net/usb/zaurus.c   |3 
 include/linux/usb/rndis_host.h |  257 
 include/linux/usb/usbnet.h |  211 +
 15 files changed, 480 insertions(+), 491 deletions(-)

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 569028b..6f245cf 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -33,8 +33,7 @@
 #include linux/mii.h
 #include linux/usb.h
 #include linux/crc32.h
-
-#include usbnet.h
+#include linux/usb/usbnet.h
 
 #define DRIVER_VERSION 14-Jun-2006
 static const char driver_name [] = asix;
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 97c17bb..a934428 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -31,8 +31,7 @@
 #include linux/mii.h
 #include linux/usb.h
 #include linux/usb/cdc.h
-
-#include usbnet.h
+#include linux/usb/usbnet.h
 
 
 #if defined(CONFIG_USB_NET_RNDIS_HOST) || 
defined(CONFIG_USB_NET_RNDIS_HOST_MODULE)
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c
index 943988e..0ec7936 100644
--- a/drivers/net/usb/cdc_subset.c
+++ b/drivers/net/usb/cdc_subset.c
@@ -26,8 +26,7 @@
 #include linux/workqueue.h
 #include linux/mii.h
 #include linux/usb.h
-
-#include usbnet.h
+#include linux/usb/usbnet.h
 
 
 /*
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 1ffdd10..5a4e40c 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -20,8 +20,7 @@
 #include linux/mii.h
 #include linux/usb.h
 #include linux/crc32.h
-
-#include usbnet.h
+#include linux/usb/usbnet.h
 
 /* datasheet:
  http://www.davicom.com.tw/big5/download/Data%20Sheet/DM9601-DS-P01-930914.pdf
diff --git a/drivers/net/usb/gl620a.c b/drivers/net/usb/gl620a.c
index 031cf5c..f7ccfad 100644
--- a/drivers/net/usb/gl620a.c
+++ b/drivers/net/usb/gl620a.c
@@ -29,8 +29,7 @@
 #include linux/workqueue.h
 #include linux/mii.h
 #include linux/usb.h
-
-#include usbnet.h
+#include linux/usb/usbnet.h
 
 
 /*
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c
index 5ea7411..c3d119f 100644
--- a/drivers/net/usb/mcs7830.c
+++ b/drivers/net/usb/mcs7830.c
@@ -31,8 +31,7 @@
 #include linux/module.h
 #include linux/netdevice.h
 #include linux/usb.h
-
-#include usbnet.h
+#include linux/usb/usbnet.h
 
 /* requests */
 #define MCS7830_RD_BMREQ   (USB_DIR_IN  | USB_TYPE_VENDOR | \
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c
index 19bf8da..034e8a7 100644
--- a/drivers/net/usb/net1080.c
+++ b/drivers/net/usb/net1080.c
@@ -28,11 +28,10 @@
 #include linux/workqueue.h
 #include linux/mii.h
 #include linux/usb.h
+#include linux/usb/usbnet.h
 
 #include asm/unaligned.h
 
-#include usbnet.h
-
 
 /*
  * Netchip 1080 driver ... http://www.netchip.com
diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c
index 4530093..08555f8 100644
--- a/drivers/net/usb/plusb.c
+++ b/drivers/net/usb/plusb.c
@@ -28,8 +28,7 @@
 #include linux/workqueue.h
 #include linux/mii.h
 #include linux/usb.h
-
-#include usbnet.h
+#include linux/usb/usbnet.h
 
 
 /*
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index c295fa1..1ffbbb3 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -29,9 +29,8 @@
 #include linux/mii.h
 #include linux/usb.h
 #include linux/usb/cdc.h
-
-#include usbnet.h
-#include rndis_host.h
+#include linux/usb/usbnet.h
+#include linux/usb/rndis_host.h
 
 
 /*
diff --git a/drivers/net/usb/rndis_host.h b/drivers/net/usb/rndis_host.h
deleted file mode 100644
index 61f1fd8..000
--- a/drivers/net/usb/rndis_host.h
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Host Side support for RNDIS Networking Links
- * Copyright (C) 2005 by David Brownell
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of

[PATCH 13/14] [rndis_host] blacklist known wireless RNDIS devices

2008-01-19 Thread Jussi Kivilinna
Blacklist known wireless RNDIS devices that will be handled by
rndis_wext module.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |  104 ++
 1 files changed, 104 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 1ffbbb3..cd1f953 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -530,6 +530,110 @@ static const struct driver_info   rndis_info = {
 /*-*/
 
 static const struct usb_device_id  products [] = {
+/*
+ * BLACKLIST !!
+ *
+ * Blacklist RNDIS devices that are handled in separate RNDIS modules.
+ */
+
+#defineRNDIS_MASTER_INTERFACE \
+   .bInterfaceClass= USB_CLASS_COMM, \
+   .bInterfaceSubClass = 2 /* ACM */, \
+   .bInterfaceProtocol = 0x0ff
+
+/* Wireless RNDIS devices, rndis_wext module */
+{
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x0411,
+   .idProduct  = 0x00bc,   /* Buffalo WLI-U2-KG125S */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x0baf,
+   .idProduct  = 0x011b,   /* U.S. Robotics USR5421 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x050d,
+   .idProduct  = 0x011b,   /* Belkin F5D7051 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x1799,   /* Belkin has two vendor ids */
+   .idProduct  = 0x011b,   /* Belkin F5D7051 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x13b1,
+   .idProduct  = 0x0014,   /* Linksys WUSB54GSv2 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x13b1,
+   .idProduct  = 0x0026,   /* Linksys WUSB54GSC */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x0b05,
+   .idProduct  = 0x1717,   /* Asus WL169gE */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x0a5c,
+   .idProduct  = 0xd11b,   /* Eminent EM4045 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x1690,
+   .idProduct  = 0x0715,   /* BT Voyager 1055 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x13b1,
+   .idProduct  = 0x000e,   /* Linksys WUSB54GSv1 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x0baf,
+   .idProduct  = 0x0111,   /* U.S. Robotics USR5420 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x0411,
+   .idProduct  = 0x004b,   /* BUFFALO WLI-USB-G54 */
+   RNDIS_MASTER_INTERFACE,
+   .driver_info= 0,
+},
+
+/*
+ * WHITELIST!!!
+ *
+ * All other RNDIS devices that do not need special OID handling in order
+ * to work.
+ */
 {
/* RNDIS is MSFT's un-official variant of CDC ACM */
USB_INTERFACE_INFO(USB_CLASS_COMM, 2 /* ACM */, 0x0ff),

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to 

Re: [PATCH] [IrDA] af_irda memory leak fixes

2008-01-19 Thread Jesper Juhl
On 18/01/2008, Samuel Ortiz [EMAIL PROTECTED] wrote:
 Hi Dave,

 Here goes an IrDA patch against your latest net-2.6 tree.

 This patch fixes some af_irda memory leaks.
 It also checks for irias_new_obect() return value.

 Signed-off-by: Jesper Juhl [EMAIL PROTECTED]
 Signed-off-by: Samuel Ortiz [EMAIL PROTECTED]
...

Looks good Samuel.
Thank you for improving on my original suggested patch.

Now let's hope someone queues it up for mainline :)

-- 
Jesper Juhl [EMAIL PROTECTED]
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please  http://www.expita.com/nomime.html
--
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


[PATCH 09/14] [usbnet] add driver_priv pointer to 'struct usbnet'

2008-01-19 Thread Jussi Kivilinna
Add a private data pointer to usbnet for rndis_wext module to use.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/usbnet.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/usbnet.h b/drivers/net/usb/usbnet.h
index 29ab92e..0b4bf09 100644
--- a/drivers/net/usb/usbnet.h
+++ b/drivers/net/usb/usbnet.h
@@ -31,6 +31,7 @@ struct usbnet {
struct usb_interface*intf;
struct driver_info  *driver_info;
const char  *driver_name;
+   void*driver_priv;
wait_queue_head_t   *wait;
struct mutexphy_mutex;
unsigned char   suspend_count;

--
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


[PATCH 07/14] [rndis_host] Split up rndis_host.c

2008-01-19 Thread Jussi Kivilinna
Split up rndis_host.c into rndis_host.h and rndis_base.c. This is done so
that rndis_wext can reuse common parts with rndis_host.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |  223 --
 drivers/net/usb/rndis_host.h |  248 ++
 2 files changed, 249 insertions(+), 222 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 12daf9c..29d7e3b 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -31,6 +31,7 @@
 #include linux/usb/cdc.h
 
 #include usbnet.h
+#include rndis_host.h
 
 
 /*
@@ -56,228 +57,6 @@
  */
 
 /*
- * CONTROL uses CDC encapsulated commands with funky notifications.
- *  - control-out:  SEND_ENCAPSULATED
- *  - interrupt-in:  RESPONSE_AVAILABLE
- *  - control-in:  GET_ENCAPSULATED
- *
- * We'll try to ignore the RESPONSE_AVAILABLE notifications.
- *
- * REVISIT some RNDIS implementations seem to have curious issues still
- * to be resolved.
- */
-struct rndis_msg_hdr {
-   __le32  msg_type;   /* RNDIS_MSG_* */
-   __le32  msg_len;
-   // followed by data that varies between messages
-   __le32  request_id;
-   __le32  status;
-   // ... and more
-} __attribute__ ((packed));
-
-/* MS-Windows uses this strange size, but RNDIS spec says 1024 minimum */
-#defineCONTROL_BUFFER_SIZE 1025
-
-/* RNDIS defines an (absurdly huge) 10 second control timeout,
- * but ActiveSync seems to use a more usual 5 second timeout
- * (which matches the USB 2.0 spec).
- */
-#defineRNDIS_CONTROL_TIMEOUT_MS(5 * 1000)
-
-
-#define ccpu2 __constant_cpu_to_le32
-
-#define RNDIS_MSG_COMPLETION   ccpu2(0x8000)
-
-/* codes for msg_type field of rndis messages;
- * only the data channel uses packet messages (maybe batched);
- * everything else goes on the control channel.
- */
-#define RNDIS_MSG_PACKET   ccpu2(0x0001)   /* 1-N packets */
-#define RNDIS_MSG_INIT ccpu2(0x0002)
-#define RNDIS_MSG_INIT_C   (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION)
-#define RNDIS_MSG_HALT ccpu2(0x0003)
-#define RNDIS_MSG_QUERYccpu2(0x0004)
-#define RNDIS_MSG_QUERY_C  (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION)
-#define RNDIS_MSG_SET  ccpu2(0x0005)
-#define RNDIS_MSG_SET_C(RNDIS_MSG_SET|RNDIS_MSG_COMPLETION)
-#define RNDIS_MSG_RESETccpu2(0x0006)
-#define RNDIS_MSG_RESET_C  (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION)
-#define RNDIS_MSG_INDICATE ccpu2(0x0007)
-#define RNDIS_MSG_KEEPALIVEccpu2(0x0008)
-#define RNDIS_MSG_KEEPALIVE_C  (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION)
-
-/* codes for status field of completion messages */
-#defineRNDIS_STATUS_SUCCESSccpu2(0x)
-#defineRNDIS_STATUS_FAILUREccpu2(0xc001)
-#defineRNDIS_STATUS_INVALID_DATA   ccpu2(0xc0010015)
-#defineRNDIS_STATUS_NOT_SUPPORTED  ccpu2(0xc0bb)
-#defineRNDIS_STATUS_MEDIA_CONNECT  ccpu2(0x4001000b)
-#defineRNDIS_STATUS_MEDIA_DISCONNECT   ccpu2(0x4001000c)
-
-
-struct rndis_data_hdr {
-   __le32  msg_type;   /* RNDIS_MSG_PACKET */
-   __le32  msg_len;// rndis_data_hdr + data_len + pad
-   __le32  data_offset;// 36 -- right after header
-   __le32  data_len;   // ... real packet size
-
-   __le32  oob_data_offset;// zero
-   __le32  oob_data_len;   // zero
-   __le32  num_oob;// zero
-   __le32  packet_data_offset; // zero
-
-   __le32  packet_data_len;// zero
-   __le32  vc_handle;  // zero
-   __le32  reserved;   // zero
-} __attribute__ ((packed));
-
-struct rndis_init {/* OUT */
-   // header and:
-   __le32  msg_type;   /* RNDIS_MSG_INIT */
-   __le32  msg_len;// 24
-   __le32  request_id;
-   __le32  major_version;  // of rndis (1.0)
-   __le32  minor_version;
-   __le32  max_transfer_size;
-} __attribute__ ((packed));
-
-struct rndis_init_c {  /* IN */
-   // header and:
-   __le32  msg_type;   /* RNDIS_MSG_INIT_C */
-   __le32  msg_len;
-   __le32  request_id;
-   __le32  status;
-   __le32  major_version;  // of rndis (1.0)
-   __le32  minor_version;
-   __le32  device_flags;
-   __le32  medium; // zero == 802.3
-   __le32  max_packets_per_message;
-   __le32  max_transfer_size;
-   __le32  packet_alignment;   // max 7; (1n) bytes
-   __le32  af_list_offset; // zero
-   __le32  af_list_size;   // zero
-} __attribute__ ((packed));
-
-struct rndis_halt {/* OUT (no reply) */

[PATCH 08/14] [rndis_host] export functions

2008-01-19 Thread Jussi Kivilinna
Export rndis_host functions and also rename rndis_bind() to
generic_rndis_bind() for modules using rndis_host as base.

Signed-off-by: Jussi Kivilinna [EMAIL PROTECTED]
---

 drivers/net/usb/rndis_host.c |   20 +---
 drivers/net/usb/rndis_host.h |9 +
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 29d7e3b..1d6bf0a 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -60,13 +60,14 @@
  * RNDIS notifications from device: command completion; reverse
  * keepalives; etc
  */
-static void rndis_status(struct usbnet *dev, struct urb *urb)
+void rndis_status(struct usbnet *dev, struct urb *urb)
 {
devdbg(dev, rndis status urb, len %d stat %d,
urb-actual_length, urb-status);
// FIXME for keepalives, respond immediately (asynchronously)
// if not an RNDIS status, do like cdc_status(dev,urb) does
 }
+EXPORT_SYMBOL_GPL(rndis_status);
 
 /*
  * RPC done RNDIS-style.  Caller guarantees:
@@ -78,7 +79,7 @@ static void rndis_status(struct usbnet *dev, struct urb *urb)
  * Call context is likely probe(), before interface name is known,
  * which is why we won't try to use it in the diagnostics.
  */
-static int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf)
+int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf)
 {
struct cdc_state*info = (void *) dev-data;
int master_ifnum;
@@ -187,6 +188,7 @@ static int rndis_command(struct usbnet *dev, struct 
rndis_msg_hdr *buf)
dev_dbg(info-control-dev, rndis response timeout\n);
return -ETIMEDOUT;
 }
+EXPORT_SYMBOL_GPL(rndis_command);
 
 /*
  * rndis_query:
@@ -253,7 +255,7 @@ response_error:
return -EDOM;
 }
 
-static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
+int generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf)
 {
int retval;
struct net_device   *net = dev-net;
@@ -377,8 +379,9 @@ fail:
kfree(u.buf);
return retval;
 }
+EXPORT_SYMBOL_GPL(generic_rndis_bind);
 
-static void rndis_unbind(struct usbnet *dev, struct usb_interface *intf)
+void rndis_unbind(struct usbnet *dev, struct usb_interface *intf)
 {
struct rndis_halt   *halt;
 
@@ -393,11 +396,12 @@ static void rndis_unbind(struct usbnet *dev, struct 
usb_interface *intf)
 
usbnet_cdc_unbind(dev, intf);
 }
+EXPORT_SYMBOL_GPL(rndis_unbind);
 
 /*
  * DATA -- host must not write zlps
  */
-static int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 {
/* peripheral may have batched packets to us... */
while (likely(skb-len)) {
@@ -439,8 +443,9 @@ static int rndis_rx_fixup(struct usbnet *dev, struct 
sk_buff *skb)
/* caller will usbnet_skb_return the remaining packet */
return 1;
 }
+EXPORT_SYMBOL_GPL(rndis_rx_fixup);
 
-static struct sk_buff *
+struct sk_buff *
 rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
 {
struct rndis_data_hdr   *hdr;
@@ -485,12 +490,13 @@ fill:
/* FIXME make the last packet always be short ... */
return skb;
 }
+EXPORT_SYMBOL_GPL(rndis_tx_fixup);
 
 
 static const struct driver_inforndis_info = {
.description =  RNDIS device,
.flags =FLAG_ETHER | FLAG_FRAMING_RN | FLAG_NO_SETINT,
-   .bind = rndis_bind,
+   .bind = generic_rndis_bind,
.unbind =   rndis_unbind,
.status =   rndis_status,
.rx_fixup = rndis_rx_fixup,
diff --git a/drivers/net/usb/rndis_host.h b/drivers/net/usb/rndis_host.h
index 1386a17..61f1fd8 100644
--- a/drivers/net/usb/rndis_host.h
+++ b/drivers/net/usb/rndis_host.h
@@ -244,5 +244,14 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */
RNDIS_PACKET_TYPE_ALL_MULTICAST | \
RNDIS_PACKET_TYPE_PROMISCUOUS)
 
+
+extern void rndis_status(struct usbnet *dev, struct urb *urb);
+extern int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf);
+extern int generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf);
+extern void rndis_unbind(struct usbnet *dev, struct usb_interface *intf);
+extern int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb);
+extern struct sk_buff *
+rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags);
+
 #endif /* __RNDIS_HOST_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


Re: [Bugme-new] [Bug 9778] New: unregister_netdevice: waiting for [device] to become free

2008-01-19 Thread Andrew Morton
On Sat, 19 Jan 2008 12:20:28 -0800 (PST) [EMAIL PROTECTED] wrote:

 http://bugzilla.kernel.org/show_bug.cgi?id=9778
 
Summary: unregister_netdevice: waiting for [device] to become
 free
Product: Networking
Version: 2.5
  KernelVersion: 2.6.24-rc8
   Platform: All
 OS/Version: Linux
   Tree: Mainline
 Status: NEW
   Severity: blocking
   Priority: P1
  Component: Other
 AssignedTo: [EMAIL PROTECTED]
 ReportedBy: [EMAIL PROTECTED]
 
 
 Latest working kernel version: 2.6.24-rc7
 Earliest failing kernel version: 2.6.24-rc8
 Distribution: Ubuntu Gutsy
 Hardware Environment: AMD64, Atheros 5212 chipset
 Software Environment: Fairly recent madwifi svn.
 Problem Description: Patch [PATCH][NEIGH] Fix race between 
 neigh_parms_release
 and neightbl_fill_parms (9cd40029423701c376391da59d2c6469672b4bed) causes the
 error described in the subject line to occur when seeking to unload a device.
 Also seen by some of my TuxOnIce users with e1000 and ppp42.
 
 Steps to reproduce: Run a kernel with the above patch, bring up a 
 (nonloopback)
 interface, seek to take it down.
 

ouch.
--
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: ESFQ (or SFQ updates) mainline status?

2008-01-19 Thread Stephen Hemminger
On Fri, 04 Jan 2008 11:21:15 -0800
Jeff Gustafson [EMAIL PROTECTED] wrote:

 Hi all,
   I have a question about the status of the spiffy updates to SFQ.  I
 *really* like the ESFQ idea.  I appears to be exactly what I'm looking
 for.  From what I can tell from this mailing list, SFQ is getting some
 or all of the ESFQ features.  Although the ESFQ web site gives detailed
 information about the status for inclusion in mainline, I am having
 trouble finding out exactly what (if any) parts of ESFQ got into SFQ in
 mainline.
   Did any of the ESFQ-like enhancements for SFQ reach .23 or do I still
 need to patch?  I am running a stripped-down Fedora 8 box and it would
 be very convenient if the patches were already in .23 or added by the
 Fedora team.
   I tried to run the ESFQ command against SFQ, but the command was
 rejected:
 
 /sbin/tc qdisc add dev eth1 parent 1:12 handle 12: sfq perturb 10 hash
 ctnatchg
 
   It appears the even if the kernel does have the patches, the shipped
 version tc does not.
 
   ..Jeff

The mainline kernel doesn't have ESFQ, so the distribute version of iproute2
does not. If your distro chooses to add ESFQ to their kernel, then they
need to extend tc as well.


-- 
Stephen Hemminger [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