Netdev List
 help / color / mirror / Atom feed
* [TCP]: Fix sock_orphan dead lock
From: Herbert Xu @ 2006-04-29 13:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: David S. Miller, Arjan van de Ven, netdev
In-Reply-To: <20060429111507.GA3077@gondor.apana.org.au>

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

On Sat, Apr 29, 2006 at 09:15:07PM +1000, herbert wrote:
> 
> Unfortunately this is only true for TCP.  All of the connectionless
> protocols use the callback lock without the socket lock so it does
> still serve a purpose.
> 
> I'd be happy to see your patch included.

I've just changed my mind :) Instead of disabling BH on the read_lock
callers, we can instead move sock_orphan outside bh_lock_sock.

[TCP]: Fix sock_orphan dead lock

Calling sock_orphan inside bh_lock_sock in tcp_close can lead to dead
locks.  For example, the inet_diag code holds sk_callback_lock without
disabling BH.  If an inbound packet arrives during that admittedly tiny
window, it will cause a dead lock on bh_lock_sock.  Another possible
path would be through sock_wfree if the network device driver frees the
tx skb in process context with BH enabled.

We can fix this by moving sock_orphan out of bh_lock_sock.

The tricky bit is to work out when we need to destroy the socket
ourselves and when it has already been destroyed by someone else.

By moving sock_orphan before the release_sock we can solve this
problem.  This is because as long as we own the socket lock its
state cannot change.

So we simply record the socket state before the release_sock
and then check the state again after we regain the socket lock.
If the socket state has transitioned to TCP_CLOSE in the time being,
we know that the socket has been destroyed.  Otherwise the socket is
still ours to keep.

Note that I've also moved the increment on the orphan count forward.
This may look like a problem as we're increasing it even if the socket
is just about to be destroyed where it'll be decreased again.  However,
this simply enlarges a window that already exists.  This also changes
the orphan count test by one.

Considering what the orphan count is meant to do this is no big deal.

This problem was discoverd by Ingo Molnar using his lock validator.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: tcp-sock-orphan.patch --]
[-- Type: text/plain, Size: 1337 bytes --]

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 87f68e7..e2b7b80 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1468,6 +1468,7 @@
 {
 	struct sk_buff *skb;
 	int data_was_unread = 0;
+	int state;
 
 	lock_sock(sk);
 	sk->sk_shutdown = SHUTDOWN_MASK;
@@ -1544,6 +1545,11 @@
 	sk_stream_wait_close(sk, timeout);
 
 adjudge_to_death:
+	state = sk->sk_state;
+	sock_hold(sk);
+	sock_orphan(sk);
+	atomic_inc(sk->sk_prot->orphan_count);
+
 	/* It is the last release_sock in its life. It will remove backlog. */
 	release_sock(sk);
 
@@ -1555,8 +1561,9 @@
 	bh_lock_sock(sk);
 	BUG_TRAP(!sock_owned_by_user(sk));
 
-	sock_hold(sk);
-	sock_orphan(sk);
+	/* Have we already been destroyed by a softirq or backlog? */
+	if (state != TCP_CLOSE && sk->sk_state == TCP_CLOSE)
+		goto out;
 
 	/*	This is a (useful) BSD violating of the RFC. There is a
 	 *	problem with TCP as specified in that the other end could
@@ -1584,7 +1591,6 @@
 			if (tmo > TCP_TIMEWAIT_LEN) {
 				inet_csk_reset_keepalive_timer(sk, tcp_fin_time(sk));
 			} else {
-				atomic_inc(sk->sk_prot->orphan_count);
 				tcp_time_wait(sk, TCP_FIN_WAIT2, tmo);
 				goto out;
 			}
@@ -1603,7 +1609,6 @@
 			NET_INC_STATS_BH(LINUX_MIB_TCPABORTONMEMORY);
 		}
 	}
-	atomic_inc(sk->sk_prot->orphan_count);
 
 	if (sk->sk_state == TCP_CLOSE)
 		inet_csk_destroy_sock(sk);

^ permalink raw reply related

* Re: [PATCH 1/3] Rough VJ Channel Implementation - vj_core.patch
From: Evgeniy Polyakov @ 2006-04-29 13:54 UTC (permalink / raw)
  To: David S. Miller; +Cc: shemminger, caitlinb, kelly, rusty, netdev
In-Reply-To: <20060428.150056.18940876.davem@davemloft.net>

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

On Fri, Apr 28, 2006 at 03:00:56PM -0700, David S. Miller (davem@davemloft.net) wrote:
> From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
> Date: Fri, 28 Apr 2006 23:59:30 +0400
> 
> > kevent can be used as poll without any changes to the socket code.
> > There are two types of network related kevents - socket events
> > (recv/send/accept) and network aio, which can be turned completely off
> > in config.
> > There are following events which are supported by kevent:
> > o usual poll/select notifications
> > o inode notifications (create/remove)
> > o timer notifications
> > o socket notifications (send/recv/accept)
> > o network aio system
> > o fs aio (project closed, aio_sendfile() is being developed instead)
> > 
> > Any of the above can be turned off by config option.
> 
> Feel free to post the current version of your kevent patch
> here so we can discuss something concrete.
> 
> Maybe you have even some toy example user applications that
> use kevent that people can look at too?  That might help
> in understanding how it's supposed to be used.

There are several at project's homepage [1] and in archive [2]:
evserver_epoll.c - epoll-based web server (pure epoll)
evserver_kevent.c - kevent-based web server (socket notifications)
evserver_poll.c - web server which uses kevent-based poll (poll/select
notifications)
evtest.c - can wait for any type of events. It was used to test
timer notifications.
naio_recv.c/naio_send.c - network AIO sending and receiving benchmarks
(sync/async)
aio_sendfile.c - aio sendfile benchmark (sendfile/aio_sendfile). Kernel
implementation is not 100% ready, pages are only asynchronously propagated 
into VFS cache, but are not sent yet.

There are also links to benchmark results, comparison with FreeBSD kqueue, some
conclusions on kevent homepage [1].
Network AIO [3] homepage also contains additional NAIO benchmarks with
some graphs.

1. kevent project home page.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=kevent

2. kevent archive
http://tservice.net.ru/~s0mbre/archive/kevent/

3. Network AIO
http://tservice.net.ru/~s0mbre/old/?section=projects&item=naio

Current development kevent patchset (against 2.6.15-rc7, but could be
applied against later trees too) attached gzipped, sory if you get this
twice.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

-- 
	Evgeniy Polyakov

[-- Attachment #2: kevent_full.diff.gz --]
[-- Type: application/x-gunzip, Size: 23625 bytes --]

^ permalink raw reply

* Your urgent response is required.
From: Steven Alamieyeseigha @ 2006-04-29 14:37 UTC (permalink / raw)
  To: okir

Dear friend, 
 
I can understand how surprise this letter will mean to you, but would advice that you consider it as
a request from a family in dare need of assistance. My name is Steven D. Alamieyeseigha, son of the
embattled Governor of Bayelsa state-Nigeria, my dad was arrested on the 16 September 2005 in United
Kingdom with allegations of money laundering. 
 
I got your contact information from your country's trade journal during my search for a reliable and
God-fearing person that can assist my family. I quite believe on my own that you can be of great
help in this regard even if I am not acquainted to you before. I am contacting you to solicite for
your assistance in helping my family to receive the sum of $11 million US Dollars for safe keeping,
we are also willing to invest this money in your country, since the United Kingdom and Nigeria
Governments are still investigating my father's case. 
 
You can find more details about my dad's arrest through this website: 
http://news.bbc.co.uk/2/hi/africa/4253362.stm 
 
Please! Send your reply to my private email address which is: mr_stevenalamieyeseigha01@yahoo.it 
for security reasons.
 
I am looking forward to hearing from you soon.
 
Best regards, 
Steven .D Alamieyeseigha.
 
 
 


--
Deze mail is verzonden via web.nl
http://mail.web.nl


^ permalink raw reply

* Re: [PATCH 2/3] rt2x00 drivers: rt61pci
From: Francois Romieu @ 2006-04-29 14:58 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: netdev, rt2x00-devel
In-Reply-To: <200604291147.26887.IvDoorn@gmail.com>

Ivo van Doorn <ivdoorn@gmail.com> :
> From: Ivo van Doorn <IvDoorn@gmail.com>
> 
> This adds the rt61pci driver to the tree 
> 
> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
> 
> Available on server:
> http://mendiosus.nl/rt2x00/rt61pci.diff

It is nice that you are doing this work but I still don't feel
the same while reading your patches or tg3.c/sky2.c (for instance).

+static inline void
+rt2x00_register_read(

grep accepts regular expression and ctags works quite well.
Why do you cut an expression which would fit on a 80 columns line ?

[...]
+	u32		reg;
+	u8		counter;

It's (mostly) fine with me if you want to align the declaration
but why do you use more than the minimum amount of required tab ?
Elsewhere the variable is completely shifted right: beyond a point,
it does not make the code more readable.

Not sure if 'unsigned int' would be welcome instead of 'u8' for
counter.

[...]
+	for (counter = 0; counter < REGISTER_BUSY_COUNT; counter++) {
+		rt2x00_register_read(rt2x00pci, PHY_CSR3, &reg);

"i" is more idiomatic C-kernel than "counter".

[...]
+	if (rt2x00_rf(&rt2x00pci->chip, RF5225)
+	|| rt2x00_rf(&rt2x00pci->chip, RF2527))

If you put the || at the end of the previous line, you can indent
the second line with four withspaces, thus aligning the content.

[...]
+static void
+rt61pci_init_firmware_cont(const struct firmware *fw, void *context)
[...]
+	for (counter = 0; counter < 100; counter++) {
+		rt2x00_register_read(rt2x00pci, MCU_CNTL_CSR, &reg);
+		if (rt2x00_get_field32(reg, MCU_CNTL_CSR_READY))
+			break;
+		msleep(1);
+	}
+
+	if (counter == 1000) {
                          ^ -> typo


[...]
static int
+rt61pci_init_firmware(struct rt2x00_pci *rt2x00pci)
+{
+	/*
+	 * Read correct firmware from harddisk.
+	 */
+	if (rt2x00_rt(&rt2x00pci->chip, RT2561))
+		return request_firmware_nowait(THIS_MODULE, 1,
+			"rt2561.bin", &rt2x00pci->pci_dev->dev, rt2x00pci,
+			rt61pci_init_firmware_cont);
+	else if (rt2x00_rt(&rt2x00pci->chip, RT2561s))
+		return request_firmware_nowait(THIS_MODULE, 1,
+			"rt2561s.bin", &rt2x00pci->pci_dev->dev, rt2x00pci,
+			rt61pci_init_firmware_cont);
+	else if (rt2x00_rt(&rt2x00pci->chip, RT2661))
+		return request_firmware_nowait(THIS_MODULE, 1,
+			"rt2661.bin", &rt2x00pci->pci_dev->dev, rt2x00pci,
+			rt61pci_init_firmware_cont);

	struct {
		char *name;
		unsigned int chip;
	} firmware[] = {
		{ "rt2561.bin",		RT2561 },
		{ "rt2561s.bin",	RT2561s },
		{ "rt2561.bin",		RT2661 }
	};
	int rc = -EINVAL;
	unsigned int i;

	for (i = 0; i < ARRAY_SIZE(firmware); i++) {
		if (!rt2x00_rt(&rt2x00pci->chip, firmware[i].chip)) 
			continue;
		rc = request_firmware_nowait(THIS_MODULE, 1,
			firmware[i].name, &rt2x00pci->pci_dev->dev,
			rt2x00pci, rt61pci_init_firmware_cont);
		break;
	}
	return rc;

-- 
Ueimor

^ permalink raw reply

* Re: [PATCH 2/3] rt2x00 drivers: rt61pci
From: Ivo van Doorn @ 2006-04-29 15:35 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev, rt2x00-devel
In-Reply-To: <20060429145850.GA2456@electric-eye.fr.zoreil.com>

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

On Saturday 29 April 2006 16:58, Francois Romieu wrote:
> Ivo van Doorn <ivdoorn@gmail.com> :
> > From: Ivo van Doorn <IvDoorn@gmail.com>
> > 
> > This adds the rt61pci driver to the tree 
> > 
> > Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
> > 
> > Available on server:
> > http://mendiosus.nl/rt2x00/rt61pci.diff
> 
> It is nice that you are doing this work but I still don't feel
> the same while reading your patches or tg3.c/sky2.c (for instance).
> 
> +static inline void
> +rt2x00_register_read(
> 
> grep accepts regular expression and ctags works quite well.
> Why do you cut an expression which would fit on a 80 columns line ?

Part of the coding style I use. Bad habit, I know.
I'll change them.

> [...]
> +	u32		reg;
> +	u8		counter;
> 
> It's (mostly) fine with me if you want to align the declaration
> but why do you use more than the minimum amount of required tab ?
> Elsewhere the variable is completely shifted right: beyond a point,
> it does not make the code more readable.

Unless I am mistaken, 2 tabs are used at a max.
Perhaps in some cases it is more, because the variable beneath
is a long structure name. I'll go over them again, and check where
they could be minimized.

> Not sure if 'unsigned int' would be welcome instead of 'u8' for
> counter.

Not sure about that either. I usually choose the type of the counter
depending on the max size of that counter.

> [...]
> +	for (counter = 0; counter < REGISTER_BUSY_COUNT; counter++) {
> +		rt2x00_register_read(rt2x00pci, PHY_CSR3, &reg);
> 
> "i" is more idiomatic C-kernel than "counter".

Perhaps, but I prefer the usage of the name "counter".
I am not sure if there is a coding style about this? If so I could rename "counter" to "i".

> [...]
> +	if (rt2x00_rf(&rt2x00pci->chip, RF5225)
> +	|| rt2x00_rf(&rt2x00pci->chip, RF2527))
> 
> If you put the || at the end of the previous line, you can indent
> the second line with four withspaces, thus aligning the content.

I'll create a bugreport in the rt2x00 project bugzilla
with some of the coding style change requests.
It could take a while before a patch will be ready since I put higher
priority to get the drivers working correctly. ;)

> [...]
> +static void
> +rt61pci_init_firmware_cont(const struct firmware *fw, void *context)
> [...]
> +	for (counter = 0; counter < 100; counter++) {
> +		rt2x00_register_read(rt2x00pci, MCU_CNTL_CSR, &reg);
> +		if (rt2x00_get_field32(reg, MCU_CNTL_CSR_READY))
> +			break;
> +		msleep(1);
> +	}
> +
> +	if (counter == 1000) {
>                           ^ -> typo

Good call. Thanks. :)

> [...]
> static int
> +rt61pci_init_firmware(struct rt2x00_pci *rt2x00pci)
> +{
> +	/*
> +	 * Read correct firmware from harddisk.
> +	 */
> +	if (rt2x00_rt(&rt2x00pci->chip, RT2561))
> +		return request_firmware_nowait(THIS_MODULE, 1,
> +			"rt2561.bin", &rt2x00pci->pci_dev->dev, rt2x00pci,
> +			rt61pci_init_firmware_cont);
> +	else if (rt2x00_rt(&rt2x00pci->chip, RT2561s))
> +		return request_firmware_nowait(THIS_MODULE, 1,
> +			"rt2561s.bin", &rt2x00pci->pci_dev->dev, rt2x00pci,
> +			rt61pci_init_firmware_cont);
> +	else if (rt2x00_rt(&rt2x00pci->chip, RT2661))
> +		return request_firmware_nowait(THIS_MODULE, 1,
> +			"rt2661.bin", &rt2x00pci->pci_dev->dev, rt2x00pci,
> +			rt61pci_init_firmware_cont);
> 
> 	struct {
> 		char *name;
> 		unsigned int chip;
> 	} firmware[] = {
> 		{ "rt2561.bin",		RT2561 },
> 		{ "rt2561s.bin",	RT2561s },
> 		{ "rt2561.bin",		RT2661 }
> 	};
> 	int rc = -EINVAL;
> 	unsigned int i;
> 
> 	for (i = 0; i < ARRAY_SIZE(firmware); i++) {
> 		if (!rt2x00_rt(&rt2x00pci->chip, firmware[i].chip)) 
> 			continue;
> 		rc = request_firmware_nowait(THIS_MODULE, 1,
> 			firmware[i].name, &rt2x00pci->pci_dev->dev,
> 			rt2x00pci, rt61pci_init_firmware_cont);
> 		break;
> 	}
> 	return rc;

Sounds good to me.
I'll make this fix part of next patch series.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH 2/3] rt2x00 drivers: rt61pci
From: Francois Romieu @ 2006-04-29 16:10 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: netdev, rt2x00-devel
In-Reply-To: <200604291735.12720.IvDoorn@gmail.com>

Ivo van Doorn <ivdoorn@gmail.com> :
[...]
> Not sure about that either. I usually choose the type of the counter
> depending on the max size of that counter.

It is not arch-neutral. powerpc favors unsigned int over int but I am
too lazy to check if the size matters.

[...]
> Perhaps, but I prefer the usage of the name "counter".
> I am not sure if there is a coding style about this? If so I could
> rename "counter" to "i".

Chapter 4 of Documentation/CodingStyle goes in this direction.
The document is not meant to be a taken too literally though.

The repetitive use of 'counter' + foo[counter].blah tends to be a
bit bloaty.

[...]
> I'll create a bugreport in the rt2x00 project bugzilla
> with some of the coding style change requests.

I will not complain if you open a bugreport to provide a git repo
as well.

/me hides...

-- 
Ueimor

^ permalink raw reply

* Re: [PATCH 0/5] sky2: version 1.2
From: Bertrand Jacquin @ 2006-04-29 18:15 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: jgarzik, netdev
In-Reply-To: <20060425175849.372221000@localhost.localdomain>

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

Le Tue, 25 Apr 2006 10:58:49 -0700, Stephen Hemminger <shemminger@osdl.org> m'a avoué:

> Update to sky2 driver. Mostly fixes to try and handle users
> stuck with edge-triggered interrupts. Also, some minor cleanups.
> 
> Patches apply onto 1.1 version in 2.6.17-rc2

Hi,

I've just testing patches and I get still the same bug.

-- 
/* Beber : beber (AT) gna (DOT) org
 * http://guybrush.ath.cx, irc://irc.freenode.net/#{e.fr,gentoofr}
 * Guybrush @ Melee */

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [ROSE] Remove useless prototype for rose_remove_neigh().
From: Ralf Baechle @ 2006-04-29 13:25 UTC (permalink / raw)
  To: David S. Miller, netdev

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 net/rose/rose_route.c |    2 --
 1 file changed, 2 deletions(-)

Index: linux-net.git/net/rose/rose_route.c
===================================================================
--- linux-net.git.orig/net/rose/rose_route.c	2006-04-29 14:18:02.000000000 +0100
+++ linux-net.git/net/rose/rose_route.c	2006-04-29 14:18:58.000000000 +0100
@@ -48,8 +48,6 @@ static DEFINE_SPINLOCK(rose_route_list_l
 
 struct rose_neigh *rose_loopback_neigh;
 
-static void rose_remove_neigh(struct rose_neigh *);
-
 /*
  *	Add a new route to a node, and in the process add the node and the
  *	neighbour if it is new.

^ permalink raw reply

* [AX.25] Spelling fix
From: Ralf Baechle DL5RB @ 2006-04-29 14:24 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-hams

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

---
 net/ax25/ax25_route.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-net.git/net/ax25/ax25_route.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_route.c	2006-04-29 11:52:12.000000000 +0100
+++ linux-net.git/net/ax25/ax25_route.c	2006-04-29 15:23:13.000000000 +0100
@@ -360,7 +360,7 @@ struct file_operations ax25_route_fops =
 /*
  *	Find AX.25 route
  *
- *	Only routes with a refernce rout of zero can be destroyed.
+ *	Only routes with a reference count of zero can be destroyed.
  */
 static ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev)
 {

^ permalink raw reply

* [PATCH 0/3] Eleminate HZ from AX.25, NETROM and ROSE kernel interfaces
From: Ralf Baechle @ 2006-04-29 14:03 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-hams

AX.25, NET/ROM and ROSE unfortunately still use jiffies as the unit of
time for all their timeouts that can be configured through sysctl and
it's procfs equivalents.  This did result in a change of these kernel
interfaces going from Linux 2.4 to 2.6 for anybody who was unlucky enough
to use an affected platform such as i386 and most MIPS but not Alpha.
Making matters worse, it required the sysadmin of the particular system
to know the timing value making it very, very broken inteface design.
The timer interrupt frequency recently becoming configurable made things
even worse, so this really needed to be fixed.  The following series
of patches contains three patches, one for each of the three packet radio
protocols to switch the unit used by the sysadmin to miliseconds thus
resulting in a deterministic interface.

  Ralf

^ permalink raw reply

* [AX25, ROSE] Remove useless SET_MODULE_OWNER calls.
From: Ralf Baechle DL5RB @ 2006-04-29 14:29 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-hams

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

--

 net/netrom/nr_dev.c |    1 -
 net/rose/rose_dev.c |    1 -
 2 files changed, 2 deletions(-)

Index: linux-net.git/net/netrom/nr_dev.c
===================================================================
--- linux-net.git.orig/net/netrom/nr_dev.c	2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/net/netrom/nr_dev.c	2006-04-29 11:38:00.000000000 +0100
@@ -185,7 +185,6 @@ static struct net_device_stats *nr_get_s
 
 void nr_setup(struct net_device *dev)
 {
-	SET_MODULE_OWNER(dev);
 	dev->mtu		= NR_MAX_PACKET_SIZE;
 	dev->hard_start_xmit	= nr_xmit;
 	dev->open		= nr_open;
Index: linux-net.git/net/rose/rose_dev.c
===================================================================
--- linux-net.git.orig/net/rose/rose_dev.c	2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/net/rose/rose_dev.c	2006-04-29 11:38:00.000000000 +0100
@@ -135,7 +135,6 @@ static struct net_device_stats *rose_get
 
 void rose_setup(struct net_device *dev)
 {
-	SET_MODULE_OWNER(dev);
 	dev->mtu		= ROSE_MAX_PACKET_SIZE - 2;
 	dev->hard_start_xmit	= rose_xmit;
 	dev->open		= rose_open;

^ permalink raw reply

* [HAMRADIO] Remove remaining SET_MODULE_OWNER calls from hamradio drivers.
From: Ralf Baechle DL5RB @ 2006-04-29 14:34 UTC (permalink / raw)
  To: Jeff Garzik, netdev, linux-hams

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>

--

 drivers/net/hamradio/dmascc.c |    1 -
 drivers/net/hamradio/scc.c    |    1 -
 drivers/net/hamradio/yam.c    |    1 -
 3 files changed, 3 deletions(-)

Index: linux-net.git/drivers/net/hamradio/dmascc.c
===================================================================
--- linux-net.git.orig/drivers/net/hamradio/dmascc.c	2006-04-29 01:54:04.000000000 +0100
+++ linux-net.git/drivers/net/hamradio/dmascc.c	2006-04-29 11:38:06.000000000 +0100
@@ -582,7 +582,6 @@ static int __init setup_adapter(int card
 		INIT_WORK(&priv->rx_work, rx_bh, priv);
 		dev->priv = priv;
 		sprintf(dev->name, "dmascc%i", 2 * n + i);
-		SET_MODULE_OWNER(dev);
 		dev->base_addr = card_base;
 		dev->irq = irq;
 		dev->open = scc_open;
Index: linux-net.git/drivers/net/hamradio/scc.c
===================================================================
--- linux-net.git.orig/drivers/net/hamradio/scc.c	2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/drivers/net/hamradio/scc.c	2006-04-29 11:38:06.000000000 +0100
@@ -1550,7 +1550,6 @@ static unsigned char ax25_nocall[AX25_AD
 
 static void scc_net_setup(struct net_device *dev)
 {
-	SET_MODULE_OWNER(dev);
 	dev->tx_queue_len    = 16;	/* should be enough... */
 
 	dev->open            = scc_net_open;
Index: linux-net.git/drivers/net/hamradio/yam.c
===================================================================
--- linux-net.git.orig/drivers/net/hamradio/yam.c	2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/drivers/net/hamradio/yam.c	2006-04-29 11:38:06.000000000 +0100
@@ -1098,7 +1098,6 @@ static void yam_setup(struct net_device 
 
 	dev->base_addr = yp->iobase;
 	dev->irq = yp->irq;
-	SET_MODULE_OWNER(dev);
 
 	dev->open = yam_open;
 	dev->stop = yam_close;

^ permalink raw reply

* [PATCH 2/3] Eleminate HZ from NET/ROM kernel interfaces
From: Ralf Baechle @ 2006-04-29 14:16 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-hams

Convert all NET/ROM sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

--

 include/net/netrom.h   |    8 ++++----
 net/netrom/af_netrom.c |   15 ++++++++++-----
 2 files changed, 14 insertions(+), 9 deletions(-)

Index: linux-net.git/include/net/netrom.h
===================================================================
--- linux-net.git.orig/include/net/netrom.h	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/include/net/netrom.h	2006-04-29 11:37:27.000000000 +0100
@@ -42,11 +42,11 @@ enum {
 #define	NR_COND_PEER_RX_BUSY		0x04
 #define	NR_COND_OWN_RX_BUSY		0x08
 
-#define NR_DEFAULT_T1			(120 * HZ)	/* Outstanding frames - 120 seconds */
-#define NR_DEFAULT_T2			(5   * HZ)	/* Response delay     - 5 seconds */
+#define NR_DEFAULT_T1			120000		/* Outstanding frames - 120 seconds */
+#define NR_DEFAULT_T2			5000		/* Response delay     - 5 seconds */
 #define NR_DEFAULT_N2			3		/* Number of Retries - 3 */
-#define	NR_DEFAULT_T4			(180 * HZ)	/* Busy Delay - 180 seconds */
-#define	NR_DEFAULT_IDLE			(0 * 60 * HZ)	/* No Activity Timeout - none */
+#define	NR_DEFAULT_T4			180000		/* Busy Delay - 180 seconds */
+#define	NR_DEFAULT_IDLE			0		/* No Activity Timeout - none */
 #define	NR_DEFAULT_WINDOW		4		/* Default Window Size - 4 */
 #define	NR_DEFAULT_OBS			6		/* Default Obsolescence Count - 6 */
 #define	NR_DEFAULT_QUAL			10		/* Default Neighbour Quality - 10 */
Index: linux-net.git/net/netrom/af_netrom.c
===================================================================
--- linux-net.git.orig/net/netrom/af_netrom.c	2006-04-29 01:54:21.000000000 +0100
+++ linux-net.git/net/netrom/af_netrom.c	2006-04-29 11:37:27.000000000 +0100
@@ -425,11 +425,16 @@ static int nr_create(struct socket *sock
 
 	nr_init_timers(sk);
 
-	nr->t1     = sysctl_netrom_transport_timeout;
-	nr->t2     = sysctl_netrom_transport_acknowledge_delay;
-	nr->n2     = sysctl_netrom_transport_maximum_tries;
-	nr->t4     = sysctl_netrom_transport_busy_delay;
-	nr->idle   = sysctl_netrom_transport_no_activity_timeout;
+	nr->t1     =
+		msecs_to_jiffies(sysctl_netrom_transport_timeout);
+	nr->t2     =
+		msecs_to_jiffies(sysctl_netrom_transport_acknowledge_delay);
+	nr->n2     =
+		msecs_to_jiffies(sysctl_netrom_transport_maximum_tries);
+	nr->t4     =
+		msecs_to_jiffies(sysctl_netrom_transport_busy_delay);
+	nr->idle   =
+		msecs_to_jiffies(sysctl_netrom_transport_no_activity_timeout);
 	nr->window = sysctl_netrom_transport_requested_window_size;
 
 	nr->bpqext = 1;

^ permalink raw reply

* [PATCH 3/3] Eleminate HZ from ROSE kernel interfaces
From: Ralf Baechle @ 2006-04-29 14:19 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-hams

Convert all ROSE sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

--

 include/net/rose.h   |   14 +++++++-------
 net/rose/af_rose.c   |   10 +++++-----
 net/rose/rose_link.c |    6 ++++--
 3 files changed, 16 insertions(+), 14 deletions(-)

Index: linux-net.git/include/net/rose.h
===================================================================
--- linux-net.git.orig/include/net/rose.h	2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/include/net/rose.h	2006-04-29 11:37:34.000000000 +0100
@@ -49,14 +49,14 @@ enum {
 	ROSE_STATE_5			/* Deferred Call Acceptance */
 };
 
-#define ROSE_DEFAULT_T0			(180 * HZ)	/* Default T10 T20 value */
-#define ROSE_DEFAULT_T1			(200 * HZ)	/* Default T11 T21 value */
-#define ROSE_DEFAULT_T2			(180 * HZ)	/* Default T12 T22 value */
-#define	ROSE_DEFAULT_T3			(180 * HZ)	/* Default T13 T23 value */
-#define	ROSE_DEFAULT_HB			(5 * HZ)	/* Default Holdback value */
-#define	ROSE_DEFAULT_IDLE		(0 * 60 * HZ)	/* No Activity Timeout - none */
+#define ROSE_DEFAULT_T0			180000		/* Default T10 T20 value */
+#define ROSE_DEFAULT_T1			200000		/* Default T11 T21 value */
+#define ROSE_DEFAULT_T2			180000		/* Default T12 T22 value */
+#define	ROSE_DEFAULT_T3			180000		/* Default T13 T23 value */
+#define	ROSE_DEFAULT_HB			5000		/* Default Holdback value */
+#define	ROSE_DEFAULT_IDLE		0		/* No Activity Timeout - none */
 #define	ROSE_DEFAULT_ROUTING		1		/* Default routing flag */
-#define	ROSE_DEFAULT_FAIL_TIMEOUT	(120 * HZ)	/* Time until link considered usable */
+#define	ROSE_DEFAULT_FAIL_TIMEOUT	120000		/* Time until link considered usable */
 #define	ROSE_DEFAULT_MAXVC		50		/* Maximum number of VCs per neighbour */
 #define	ROSE_DEFAULT_WINDOW_SIZE	7		/* Default window size */
 
Index: linux-net.git/net/rose/af_rose.c
===================================================================
--- linux-net.git.orig/net/rose/af_rose.c	2006-04-29 01:54:21.000000000 +0100
+++ linux-net.git/net/rose/af_rose.c	2006-04-29 11:37:34.000000000 +0100
@@ -518,11 +518,11 @@ static int rose_create(struct socket *so
 	init_timer(&rose->timer);
 	init_timer(&rose->idletimer);
 
-	rose->t1   = sysctl_rose_call_request_timeout;
-	rose->t2   = sysctl_rose_reset_request_timeout;
-	rose->t3   = sysctl_rose_clear_request_timeout;
-	rose->hb   = sysctl_rose_ack_hold_back_timeout;
-	rose->idle = sysctl_rose_no_activity_timeout;
+	rose->t1   = msecs_to_jiffies(sysctl_rose_call_request_timeout);
+	rose->t2   = msecs_to_jiffies(sysctl_rose_reset_request_timeout);
+	rose->t3   = msecs_to_jiffies(sysctl_rose_clear_request_timeout);
+	rose->hb   = msecs_to_jiffies(sysctl_rose_ack_hold_back_timeout);
+	rose->idle = msecs_to_jiffies(sysctl_rose_no_activity_timeout);
 
 	rose->state = ROSE_STATE_0;
 
Index: linux-net.git/net/rose/rose_link.c
===================================================================
--- linux-net.git.orig/net/rose/rose_link.c	2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/net/rose/rose_link.c	2006-04-29 11:37:34.000000000 +0100
@@ -40,7 +40,8 @@ void rose_start_ftimer(struct rose_neigh
 
 	neigh->ftimer.data     = (unsigned long)neigh;
 	neigh->ftimer.function = &rose_ftimer_expiry;
-	neigh->ftimer.expires  = jiffies + sysctl_rose_link_fail_timeout;
+	neigh->ftimer.expires  =
+		jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout);
 
 	add_timer(&neigh->ftimer);
 }
@@ -51,7 +52,8 @@ static void rose_start_t0timer(struct ro
 
 	neigh->t0timer.data     = (unsigned long)neigh;
 	neigh->t0timer.function = &rose_t0timer_expiry;
-	neigh->t0timer.expires  = jiffies + sysctl_rose_restart_request_timeout;
+	neigh->t0timer.expires  =
+		jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout);
 
 	add_timer(&neigh->t0timer);
 }

^ permalink raw reply

* [PATCH 1/3] Eleminate HZ from AX.25 kernel interfaces
From: Ralf Baechle DL5RB @ 2006-04-29 14:12 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-hams

Convert all AX.25 sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

--

 include/net/ax25.h         |   10 +++---
 net/ax25/af_ax25.c         |   73 +++++++++++++++++++++++++--------------------
 net/ax25/ax25_ds_timer.c   |    3 +
 net/ax25/sysctl_net_ax25.c |   10 +++---
 4 files changed, 53 insertions(+), 43 deletions(-)

Index: linux-net.git/include/net/ax25.h
===================================================================
--- linux-net.git.orig/include/net/ax25.h	2006-04-29 11:32:14.000000000 +0100
+++ linux-net.git/include/net/ax25.h	2006-04-29 11:33:43.000000000 +0100
@@ -145,14 +145,14 @@ enum {
 #define	AX25_DEF_CONMODE	2			/* Connected mode allowed */
 #define	AX25_DEF_WINDOW		2			/* Window=2 */
 #define	AX25_DEF_EWINDOW	32			/* Module-128 Window=32 */
-#define	AX25_DEF_T1		(10 * HZ)		/* T1=10s */
-#define	AX25_DEF_T2		(3 * HZ)		/* T2=3s  */
-#define	AX25_DEF_T3		(300 * HZ)		/* T3=300s */
+#define	AX25_DEF_T1		10000			/* T1=10s */
+#define	AX25_DEF_T2		3000			/* T2=3s  */
+#define	AX25_DEF_T3		300000			/* T3=300s */
 #define	AX25_DEF_N2		10			/* N2=10 */
-#define AX25_DEF_IDLE		(0 * 60 * HZ)		/* Idle=None */
+#define AX25_DEF_IDLE		0			/* Idle=None */
 #define AX25_DEF_PACLEN		256			/* Paclen=256 */
 #define	AX25_DEF_PROTOCOL	AX25_PROTO_STD_SIMPLEX	/* Standard AX.25 */
-#define AX25_DEF_DS_TIMEOUT	(3 * 60 * HZ)		/* DAMA timeout 3 minutes */
+#define AX25_DEF_DS_TIMEOUT	180000			/* DAMA timeout 3 minutes */
 
 typedef struct ax25_uid_assoc {
 	struct hlist_node	uid_node;
Index: linux-net.git/net/ax25/af_ax25.c
===================================================================
--- linux-net.git.orig/net/ax25/af_ax25.c	2006-04-29 11:32:14.000000000 +0100
+++ linux-net.git/net/ax25/af_ax25.c	2006-04-29 11:33:43.000000000 +0100
@@ -426,6 +426,26 @@ static int ax25_ctl_ioctl(const unsigned
 	return 0;
 }
 
+static void ax25_fillin_cb_from_dev(ax25_cb *ax25, ax25_dev *ax25_dev)
+{
+	ax25->rtt     = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T1]) / 2;
+	ax25->t1      = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T1]);
+	ax25->t2      = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T2]);
+	ax25->t3      = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T3]);
+	ax25->n2      = ax25_dev->values[AX25_VALUES_N2];
+	ax25->paclen  = ax25_dev->values[AX25_VALUES_PACLEN];
+	ax25->idle    = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_IDLE]);
+	ax25->backoff = ax25_dev->values[AX25_VALUES_BACKOFF];
+
+	if (ax25_dev->values[AX25_VALUES_AXDEFMODE]) {
+		ax25->modulus = AX25_EMODULUS;
+		ax25->window  = ax25_dev->values[AX25_VALUES_EWINDOW];
+	} else {
+		ax25->modulus = AX25_MODULUS;
+		ax25->window  = ax25_dev->values[AX25_VALUES_WINDOW];
+	}
+}
+
 /*
  *	Fill in a created AX.25 created control block with the default
  *	values for a particular device.
@@ -435,39 +455,28 @@ void ax25_fillin_cb(ax25_cb *ax25, ax25_
 	ax25->ax25_dev = ax25_dev;
 
 	if (ax25->ax25_dev != NULL) {
-		ax25->rtt     = ax25_dev->values[AX25_VALUES_T1] / 2;
-		ax25->t1      = ax25_dev->values[AX25_VALUES_T1];
-		ax25->t2      = ax25_dev->values[AX25_VALUES_T2];
-		ax25->t3      = ax25_dev->values[AX25_VALUES_T3];
-		ax25->n2      = ax25_dev->values[AX25_VALUES_N2];
-		ax25->paclen  = ax25_dev->values[AX25_VALUES_PACLEN];
-		ax25->idle    = ax25_dev->values[AX25_VALUES_IDLE];
-		ax25->backoff = ax25_dev->values[AX25_VALUES_BACKOFF];
-
-		if (ax25_dev->values[AX25_VALUES_AXDEFMODE]) {
-			ax25->modulus = AX25_EMODULUS;
-			ax25->window  = ax25_dev->values[AX25_VALUES_EWINDOW];
-		} else {
-			ax25->modulus = AX25_MODULUS;
-			ax25->window  = ax25_dev->values[AX25_VALUES_WINDOW];
-		}
+		ax25_fillin_cb_from_dev(ax25, ax25_dev);
+		return;
+	}
+
+	/*
+	 * No device, use kernel / AX.25 spec default values
+	 */
+	ax25->rtt     = msecs_to_jiffies(AX25_DEF_T1) / 2;
+	ax25->t1      = msecs_to_jiffies(AX25_DEF_T1);
+	ax25->t2      = msecs_to_jiffies(AX25_DEF_T2);
+	ax25->t3      = msecs_to_jiffies(AX25_DEF_T3);
+	ax25->n2      = AX25_DEF_N2;
+	ax25->paclen  = AX25_DEF_PACLEN;
+	ax25->idle    = msecs_to_jiffies(AX25_DEF_IDLE);
+	ax25->backoff = AX25_DEF_BACKOFF;
+
+	if (AX25_DEF_AXDEFMODE) {
+		ax25->modulus = AX25_EMODULUS;
+		ax25->window  = AX25_DEF_EWINDOW;
 	} else {
-		ax25->rtt     = AX25_DEF_T1 / 2;
-		ax25->t1      = AX25_DEF_T1;
-		ax25->t2      = AX25_DEF_T2;
-		ax25->t3      = AX25_DEF_T3;
-		ax25->n2      = AX25_DEF_N2;
-		ax25->paclen  = AX25_DEF_PACLEN;
-		ax25->idle    = AX25_DEF_IDLE;
-		ax25->backoff = AX25_DEF_BACKOFF;
-
-		if (AX25_DEF_AXDEFMODE) {
-			ax25->modulus = AX25_EMODULUS;
-			ax25->window  = AX25_DEF_EWINDOW;
-		} else {
-			ax25->modulus = AX25_MODULUS;
-			ax25->window  = AX25_DEF_WINDOW;
-		}
+		ax25->modulus = AX25_MODULUS;
+		ax25->window  = AX25_DEF_WINDOW;
 	}
 }
 
Index: linux-net.git/net/ax25/ax25_ds_timer.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_ds_timer.c	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/net/ax25/ax25_ds_timer.c	2006-04-29 11:33:43.000000000 +0100
@@ -61,7 +61,8 @@ void ax25_ds_set_timer(ax25_dev *ax25_de
 		return;
 
 	del_timer(&ax25_dev->dama.slave_timer);
-	ax25_dev->dama.slave_timeout = ax25_dev->values[AX25_VALUES_DS_TIMEOUT] / 10;
+	ax25_dev->dama.slave_timeout =
+		msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10;
 	ax25_ds_add_timer(ax25_dev);
 }
 
Index: linux-net.git/net/ax25/sysctl_net_ax25.c
===================================================================
--- linux-net.git.orig/net/ax25/sysctl_net_ax25.c	2006-04-29 01:54:20.000000000 +0100
+++ linux-net.git/net/ax25/sysctl_net_ax25.c	2006-04-29 11:35:27.000000000 +0100
@@ -18,14 +18,14 @@ static int min_backoff[1],		max_backoff[
 static int min_conmode[1],		max_conmode[] = {2};
 static int min_window[] = {1},		max_window[] = {7};
 static int min_ewindow[] = {1},		max_ewindow[] = {63};
-static int min_t1[] = {1},		max_t1[] = {30 * HZ};
-static int min_t2[] = {1},		max_t2[] = {20 * HZ};
-static int min_t3[1],   		max_t3[] = {3600 * HZ};
-static int min_idle[1],  		max_idle[] = {65535 * HZ};
+static int min_t1[] = {1},		max_t1[] = {30000};
+static int min_t2[] = {1},		max_t2[] = {20000};
+static int min_t3[1],			max_t3[] = {3600000};
+static int min_idle[1],			max_idle[] = {65535000};
 static int min_n2[] = {1},		max_n2[] = {31};
 static int min_paclen[] = {1},		max_paclen[] = {512};
 static int min_proto[1],		max_proto[] = { AX25_PROTO_MAX };
-static int min_ds_timeout[1],   	max_ds_timeout[] = {65535 * HZ};
+static int min_ds_timeout[1],		max_ds_timeout[] = {65535000};
 
 static struct ctl_table_header *ax25_table_header;
 

^ permalink raw reply

* [AX.25] Move AX.25 symbol exports
From: Ralf Baechle @ 2006-04-29 13:40 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: linux-hams

Move AX.25 symbol exports to next to their definitions where they're
supposed to be these days.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 net/ax25/af_ax25.c    |   20 ++------------------
 net/ax25/ax25_addr.c  |    9 +++++++++
 net/ax25/ax25_iface.c |   13 +++++++++++++
 net/ax25/ax25_ip.c    |    3 +++
 net/ax25/ax25_out.c   |    3 +++
 net/ax25/ax25_timer.c |    3 +++
 net/ax25/ax25_uid.c   |    4 ++++
 7 files changed, 37 insertions(+), 18 deletions(-)

Index: linux-net.git/net/ax25/af_ax25.c
===================================================================
--- linux-net.git.orig/net/ax25/af_ax25.c	2006-04-29 01:54:20.000000000 +0100
+++ linux-net.git/net/ax25/af_ax25.c	2006-04-29 11:30:24.000000000 +0100
@@ -228,6 +228,8 @@ ax25_cb *ax25_find_cb(ax25_address *src_
 	return NULL;
 }
 
+EXPORT_SYMBOL(ax25_find_cb);
+
 void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
 {
 	ax25_cb *s;
@@ -1979,24 +1981,6 @@ static struct notifier_block ax25_dev_no
 	.notifier_call =ax25_device_event,
 };
 
-EXPORT_SYMBOL(ax25_hard_header);
-EXPORT_SYMBOL(ax25_rebuild_header);
-EXPORT_SYMBOL(ax25_findbyuid);
-EXPORT_SYMBOL(ax25_find_cb);
-EXPORT_SYMBOL(ax25_linkfail_register);
-EXPORT_SYMBOL(ax25_linkfail_release);
-EXPORT_SYMBOL(ax25_listen_register);
-EXPORT_SYMBOL(ax25_listen_release);
-EXPORT_SYMBOL(ax25_protocol_register);
-EXPORT_SYMBOL(ax25_protocol_release);
-EXPORT_SYMBOL(ax25_send_frame);
-EXPORT_SYMBOL(ax25_uid_policy);
-EXPORT_SYMBOL(ax25cmp);
-EXPORT_SYMBOL(ax2asc);
-EXPORT_SYMBOL(asc2ax);
-EXPORT_SYMBOL(null_ax25_address);
-EXPORT_SYMBOL(ax25_display_timer);
-
 static int __init ax25_init(void)
 {
 	int rc = proto_register(&ax25_proto, 0);
Index: linux-net.git/net/ax25/ax25_addr.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_addr.c	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/net/ax25/ax25_addr.c	2006-04-29 11:30:24.000000000 +0100
@@ -11,6 +11,7 @@
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/string.h>
@@ -33,6 +34,8 @@
  */
 ax25_address null_ax25_address = {{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00}};
 
+EXPORT_SYMBOL(null_ax25_address);
+
 /*
  *	ax25 -> ascii conversion
  */
@@ -64,6 +67,8 @@ char *ax2asc(char *buf, ax25_address *a)
 
 }
 
+EXPORT_SYMBOL(ax2asc);
+
 /*
  *	ascii -> ax25 conversion
  */
@@ -97,6 +102,8 @@ void asc2ax(ax25_address *addr, char *ca
 	addr->ax25_call[6] &= 0x1E;
 }
 
+EXPORT_SYMBOL(asc2ax);
+
 /*
  *	Compare two ax.25 addresses
  */
@@ -116,6 +123,8 @@ int ax25cmp(ax25_address *a, ax25_addres
  	return 2;			/* Partial match */
 }
 
+EXPORT_SYMBOL(ax25cmp);
+
 /*
  *	Compare two AX.25 digipeater paths.
  */
Index: linux-net.git/net/ax25/ax25_iface.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_iface.c	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/net/ax25/ax25_iface.c	2006-04-29 11:30:24.000000000 +0100
@@ -12,6 +12,7 @@
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
 #include <linux/timer.h>
@@ -74,6 +75,8 @@ int ax25_protocol_register(unsigned int 
 	return 1;
 }
 
+EXPORT_SYMBOL(ax25_protocol_register);
+
 void ax25_protocol_release(unsigned int pid)
 {
 	struct protocol_struct *s, *protocol;
@@ -106,6 +109,8 @@ void ax25_protocol_release(unsigned int 
 	write_unlock(&protocol_list_lock);
 }
 
+EXPORT_SYMBOL(ax25_protocol_release);
+
 int ax25_linkfail_register(void (*func)(ax25_cb *, int))
 {
 	struct linkfail_struct *linkfail;
@@ -123,6 +128,8 @@ int ax25_linkfail_register(void (*func)(
 	return 1;
 }
 
+EXPORT_SYMBOL(ax25_linkfail_register);
+
 void ax25_linkfail_release(void (*func)(ax25_cb *, int))
 {
 	struct linkfail_struct *s, *linkfail;
@@ -155,6 +162,8 @@ void ax25_linkfail_release(void (*func)(
 	spin_unlock_bh(&linkfail_lock);
 }
 
+EXPORT_SYMBOL(ax25_linkfail_release);
+
 int ax25_listen_register(ax25_address *callsign, struct net_device *dev)
 {
 	struct listen_struct *listen;
@@ -176,6 +185,8 @@ int ax25_listen_register(ax25_address *c
 	return 1;
 }
 
+EXPORT_SYMBOL(ax25_listen_register);
+
 void ax25_listen_release(ax25_address *callsign, struct net_device *dev)
 {
 	struct listen_struct *s, *listen;
@@ -208,6 +219,8 @@ void ax25_listen_release(ax25_address *c
 	spin_unlock_bh(&listen_lock);
 }
 
+EXPORT_SYMBOL(ax25_listen_release);
+
 int (*ax25_protocol_function(unsigned int pid))(struct sk_buff *, ax25_cb *)
 {
 	int (*res)(struct sk_buff *, ax25_cb *) = NULL;
Index: linux-net.git/net/ax25/ax25_ip.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_ip.c	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/net/ax25/ax25_ip.c	2006-04-29 11:30:24.000000000 +0100
@@ -12,6 +12,7 @@
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/string.h>
@@ -221,3 +222,5 @@ int ax25_rebuild_header(struct sk_buff *
 
 #endif
 
+EXPORT_SYMBOL(ax25_hard_header);
+EXPORT_SYMBOL(ax25_rebuild_header);
Index: linux-net.git/net/ax25/ax25_out.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_out.c	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/net/ax25/ax25_out.c	2006-04-29 11:30:24.000000000 +0100
@@ -14,6 +14,7 @@
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/string.h>
@@ -104,6 +105,8 @@ ax25_cb *ax25_send_frame(struct sk_buff 
 	return ax25;			/* We had to create it */
 }
 
+EXPORT_SYMBOL(ax25_send_frame);
+
 /*
  *	All outgoing AX.25 I frames pass via this routine. Therefore this is
  *	where the fragmentation of frames takes place. If fragment is set to
Index: linux-net.git/net/ax25/ax25_timer.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_timer.c	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/net/ax25/ax25_timer.c	2006-04-29 11:30:24.000000000 +0100
@@ -18,6 +18,7 @@
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/jiffies.h>
 #include <linux/timer.h>
 #include <linux/string.h>
@@ -137,6 +138,8 @@ unsigned long ax25_display_timer(struct 
 	return timer->expires - jiffies;
 }
 
+EXPORT_SYMBOL(ax25_display_timer);
+
 static void ax25_heartbeat_expiry(unsigned long param)
 {
 	int proto = AX25_PROTO_STD_SIMPLEX;
Index: linux-net.git/net/ax25/ax25_uid.c
===================================================================
--- linux-net.git.orig/net/ax25/ax25_uid.c	2006-04-29 01:54:20.000000000 +0100
+++ linux-net.git/net/ax25/ax25_uid.c	2006-04-29 11:30:24.000000000 +0100
@@ -49,6 +49,8 @@ static DEFINE_RWLOCK(ax25_uid_lock);
 
 int ax25_uid_policy = 0;
 
+EXPORT_SYMBOL(ax25_uid_policy);
+
 ax25_uid_assoc *ax25_findbyuid(uid_t uid)
 {
 	ax25_uid_assoc *ax25_uid, *res = NULL;
@@ -67,6 +69,8 @@ ax25_uid_assoc *ax25_findbyuid(uid_t uid
 	return res;
 }
 
+EXPORT_SYMBOL(ax25_findbyuid);
+
 int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax)
 {
 	ax25_uid_assoc *ax25_uid;

^ permalink raw reply

* [ROSE] Fix routing table locking in rose_remove_neigh.
From: Ralf Baechle @ 2006-04-29 13:31 UTC (permalink / raw)
  To: David S. Miller, netdev, Bernard Pidoux, linux-hams

The locking rule for rose_remove_neigh() are that the called needs to
hold rose_neigh_list_lock, so we better don't take it yet again in
rose_neigh_list_lock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 net/rose/rose_route.c |    5 -----
 1 file changed, 5 deletions(-)

Index: linux-net.git/net/rose/rose_route.c
===================================================================
--- linux-net.git.orig/net/rose/rose_route.c	2006-04-29 14:18:58.000000000 +0100
+++ linux-net.git/net/rose/rose_route.c	2006-04-29 14:19:02.000000000 +0100
@@ -233,11 +233,8 @@ static void rose_remove_neigh(struct ros
 
 	skb_queue_purge(&rose_neigh->queue);
 
-	spin_lock_bh(&rose_neigh_list_lock);
-
 	if ((s = rose_neigh_list) == rose_neigh) {
 		rose_neigh_list = rose_neigh->next;
-		spin_unlock_bh(&rose_neigh_list_lock);
 		kfree(rose_neigh->digipeat);
 		kfree(rose_neigh);
 		return;
@@ -246,7 +243,6 @@ static void rose_remove_neigh(struct ros
 	while (s != NULL && s->next != NULL) {
 		if (s->next == rose_neigh) {
 			s->next = rose_neigh->next;
-			spin_unlock_bh(&rose_neigh_list_lock);
 			kfree(rose_neigh->digipeat);
 			kfree(rose_neigh);
 			return;
@@ -254,7 +250,6 @@ static void rose_remove_neigh(struct ros
 
 		s = s->next;
 	}
-	spin_unlock_bh(&rose_neigh_list_lock);
 }
 
 /*

^ permalink raw reply

* Re: [PATCH 2/3] rt2x00 drivers: rt61pci
From: Ivo van Doorn @ 2006-04-29 19:35 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev, rt2x00-devel
In-Reply-To: <20060429161002.GA3345@electric-eye.fr.zoreil.com>

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

On Saturday 29 April 2006 18:10, Francois Romieu wrote:
> Ivo van Doorn <ivdoorn@gmail.com> :
> [...]
> > Not sure about that either. I usually choose the type of the counter
> > depending on the max size of that counter.
> 
> It is not arch-neutral. powerpc favors unsigned int over int but I am
> too lazy to check if the size matters.

Ok, I'll make sure the counters will made of the unsigned int type.

> [...]
> > Perhaps, but I prefer the usage of the name "counter".
> > I am not sure if there is a coding style about this? If so I could
> > rename "counter" to "i".
> 
> Chapter 4 of Documentation/CodingStyle goes in this direction.
> The document is not meant to be a taken too literally though.
> 
> The repetitive use of 'counter' + foo[counter].blah tends to be a
> bit bloaty.
> 
> [...]
> > I'll create a bugreport in the rt2x00 project bugzilla
> > with some of the coding style change requests.
> 
> I will not complain if you open a bugreport to provide a git repo
> as well.
> 
> /me hides...

The git repository has indeed been discussed between the
rt2x00 developers before. And at the moment we see no major
benefit from using git. We need to have something like CVS
for regular users to use rt2x00 and we don't want them to
use git only to use the drivers.
In the CVS tree we have multiple backwards compatibility
fixes for both rt2x00 as the dscape stack to make it work
on kernel 2.6.13 and above. So making a git repository
would mean a lot duplicate work, since we have to keep
2 trees up to date, as well as making sure the wireless-dev
tree contains an up to date version.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: IP1000 gigabit nic driver
From: Pekka Enberg @ 2006-04-29 20:35 UTC (permalink / raw)
  To: David Gómez; +Cc: David Vrabel, Francois Romieu, Linux-kernel, netdev
In-Reply-To: <20060429122119.GA22160@fargo>

Hi David,

On Sat, 2006-04-29 at 14:21 +0200, David Gómez wrote:
> I already had it modified, just needed to create the patch... Anyway,
> have you submitted it to netdev?

No, I haven't. I don't have the hardware, so I can't test the driver.
Furthermore, there's plenty of stuff to fix before it's in any shape for
submission. If someone wants to give this patch a spin, I would love to
hear the results.

					Pekka


^ permalink raw reply

* Re: e1000_down and tx_timeout worker race cleaning the transmit buffers
From: Shaw Vrana @ 2006-04-29 21:57 UTC (permalink / raw)
  To: Auke Kok
  Cc: Andy Gospodarek, Michael Chan, Herbert Xu, netdev, auke-jan.h.kok,
	davem, jgarzik
In-Reply-To: <44504EA7.5050901@foo-projects.org>

Hi Auke,

On 4/26/06, Auke Kok <sofar@foo-projects.org> wrote:

> > I'm concerned about the addition of the netif_running check to
> > e1000_down.  While something like this is needed, I'm not familiar
> > enough w/ the code to know if this is okay.
> > All explanations and comments are greatly appreciated.
> While I appreciate patches ;^) I think we're on a better path by making these
> cleanups, and actually reducing the code in large places. I hope to be able to
> push something out for RFC soon. Added benefit will be that we're dropping a
> whole bunch of irq operations where we didn't need to (soft resets).

Well, it looks like my patch won't work as the e1000_close is called
by dev.c only after it clears the __LINK_STATE_START bit, which means
that e1000_down will exit prematurely when called from e1000_close in
my approach.  Any feedback on the approach would be appreciated, as
your upcoming patch sounds like it might be too aggressive to get put
into a stabilization patch.  ;)

I understand the need to fix the problems associated with the
watchdog_task as well, though I wonder if it wouldn't be better to
remove it altogether given the complexity of cleaning up after these
tasks in general.  I've personally had more problems with the watchdog
task than with the possible sleep in the watchdog timer code.  I can't
help but siding with the RedHat folks who currently ship a version of
the e1000 driver that fixes the mechanism used to sleep instead of the
watchdog_task approach.  Perhaps I missed the discussion of this, I'm
only finding the patch itself with google.

Thanks,
Shaw

^ permalink raw reply

* Re: [ROSE] Fix routing table locking in rose_remove_neigh.
From: Bernard Pidoux @ 2006-04-29 22:59 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: David S. Miller, netdev, linux-hams
In-Reply-To: <20060429133141.GA31820@linux-mips.org>



Ralf Baechle wrote:
> The locking rule for rose_remove_neigh() are that the called needs to
> hold rose_neigh_list_lock, so we better don't take it yet again in
> rose_neigh_list_lock.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

All ROSE and HZ patches applied to kernel 2.6.16
Many thanks Ralf.

73 de Bernard, f6bvp

http://f6bvp.org
http://rose.fpac.free.fr/MINI-HOWTO/
http://rose.fpac.free.fr/MINI-HOWTO-FR/


^ permalink raw reply

* Re: [PATCH 1/6] tg3: Call netif_carrier_off() during phy reset
From: David S. Miller @ 2006-04-30  1:55 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1146267307.4780.14.camel@rh4>

From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 28 Apr 2006 16:35:06 -0700

> Add netif_carrier_off() call during tg3_phy_reset(). This is needed
> to properly track the netif_carrier state in cases where we do a
> PHY reset with interrupts disabled. The SerDes code will not run
> properly if the netif_carrier state is wrong.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH 2/6] tg3: Add phy workaround
From: David S. Miller @ 2006-04-30  1:57 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1146267319.4780.15.camel@rh4>

From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 28 Apr 2006 16:35:19 -0700

> Add some PHY workaround code to reduce jitter on some PHYs.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied, thanks.

It really bugs me that all of this indirect addressing into
the DSP is done with magic addresses and register values.  It
would be great to get some defined in tg3.h that documented
the DSP register set properly.

^ permalink raw reply

* Re: [PATCH 3/6] tg3: Reset chip when changing MAC address
From: David S. Miller @ 2006-04-30  1:58 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1146267335.4780.16.camel@rh4>

From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 28 Apr 2006 16:35:35 -0700

> Do the full chip reset when changing MAC address if ASF is enabled.
> 
> ASF sometimes uses a different MAC address than the driver. Without
> the reset, the ASF MAC address may be overwritten when the driver's
> MAC address is changed.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

A little heavy handed, but I can't think of another way to
deal with this.

Applied, thanks a lot.

^ permalink raw reply

* Re: [PATCH 4/6] tg3: Add reset_phy parameter to chip reset functions
From: David S. Miller @ 2006-04-30  1:59 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1146267368.4780.17.camel@rh4>

From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 28 Apr 2006 16:36:08 -0700

> Add a reset_phy parameter to tg3_reset_hw() and tg3_init_hw(). With
> the full chip reset during MAC address change, the automatic PHY reset
> during chip reset will cause a link down and bonding will not work
> properly as a result. With this reset_phy parameter, we can do a chip
> reset without link down when changing MAC address or MTU.
> 
> Signed-off-by: Gary Zambrano <zambrano@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

Doesn't the signalling interface between the MAC and the
PHY get reset during a chip reset and couldn't that cause
problems if we bypass the PHY reset?

Thanks.

^ permalink raw reply


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