* -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported?
@ 2006-06-25 20:51 Adrian Bunk
2006-06-26 19:28 ` Krzysztof Halasa
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2006-06-25 20:51 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: Jeff Garzik, linux-kernel, netdev
Commit 4a31e348e3ecaf54c50240109ac4574b180f8840 added an
EXPORT_SYMBOL(hdlc_setup) with the justification
hdlc_setup() is now EXPORTed as per David's request.
Is a usage of this export pending for the near future or could this
export be reverted until a user is submitted for inclusion?
TIA
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported?
@ 2006-06-26 6:11 David Boggs
2006-06-26 9:35 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: David Boggs @ 2006-06-26 6:11 UTC (permalink / raw)
To: Adrian Bunk; +Cc: netdev
[Resent because I forgot to copy netdev on my answer]
I asked Krzysztof to export that so that I could use it
in a re-written driver for LMC WAN cards which I put out
for comments on netdev in March.
I have incorporated the comments from the March posting and
intend to repost the new driver very soon. If you delete
the export then I will have to write some nasty code to work
around it.
/David Boggs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported?
2006-06-26 6:11 -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported? David Boggs
@ 2006-06-26 9:35 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2006-06-26 9:35 UTC (permalink / raw)
To: David Boggs; +Cc: Adrian Bunk, netdev
On Sun, Jun 25, 2006 at 11:11:30PM -0700, David Boggs wrote:
> [Resent because I forgot to copy netdev on my answer]
>
> I asked Krzysztof to export that so that I could use it
> in a re-written driver for LMC WAN cards which I put out
> for comments on netdev in March.
>
> I have incorporated the comments from the March posting and
> intend to repost the new driver very soon. If you delete
> the export then I will have to write some nasty code to work
> around it.
Why can't you use alloc_hdlcdev?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported?
2006-06-25 20:51 -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported? Adrian Bunk
@ 2006-06-26 19:28 ` Krzysztof Halasa
2006-11-25 19:16 ` [2.6 patch] make hdlc_setup() static again Adrian Bunk
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Halasa @ 2006-06-26 19:28 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Jeff Garzik, linux-kernel, netdev
Adrian Bunk <bunk@stusta.de> writes:
> hdlc_setup() is now EXPORTed as per David's request.
>
> Is a usage of this export pending for the near future
I'm told it is.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported?
@ 2006-06-27 11:09 David Boggs
0 siblings, 0 replies; 7+ messages in thread
From: David Boggs @ 2006-06-27 11:09 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Krzysztof Halasa, netdev
In March I posted a request for comments on a rewrite of
the LMC wan driver (see ftp.isc.org/pub/other/lmc).
I designed the LMC wan cards.
The new driver works with Linux, FreeBSD, NetBSD, OpenBSD
and BSD/OS. FreeBSD and NetBSD have adopted it; OpenBSD is
still thinking about it (their principal comments mirrored
the Linux comments: remove the code for other OSs and adopt
their kernel coding style). Before I resubmit the new driver
for more Linux comments I will do this. BTW: FreeBSD and
NetBSD did not insist on this -- an interesting policy
contrast. Nobody objected to the code for other OSs and
only one person cleared his throat about coding style.
Anyway, the new driver deals with FIVE line protocol stacks:
Generic-HDLC and SyncPPP (Linux), SPPP (FreeBSD, NetBSD, OpenBSD)
Netgraph (FreeBSD), and P2P (BSD/OS). Linux's SyncPPP stack is
a renamed version of SPPP, with different interfaces to drivers
and the kernel. SyncPPP implements PPP and Cisco-HDLC.
Generic-HDLC uses the PPP part but implements its own version
of Cisco-HDLC.
The Linux version of my driver, can be configured to use
Generic-HDLC or SyncPPP, or both with the choice made at
run-time. Configuring only SyncPPP avoids loading the
Generic-HDLC module if all you need is PPP or Cisco-HDLC.
The driver can switch from one line protocol stack to another
at run time. This requires detaching from the current stack
and attaching to another. There is a way to detach Generic-HDLC
but there is no way to reattach it because the initialization
code is called from within alloc_hdlcdev() and is not exported.
I have been working around this by duplicating the code in
hdlc_setup() in my driver. This is ugly and requires that
the driver know "private" things about Generic-HDLC. While
studying Generic-HDLC, I noticed that register_hdlc_device() had
some redundant code which had been subsumed by register_netdev().
I pointed this out to Krzysztof Halasa, the maintainer of
Generic-HDLC, and at the same time I asked him to export
hdlc_setup() so that I could remove the duplicate code in
my driver, which he graciously did recently.
I've subscribed to the netdev list since March and I've
read the archives back a year or two. Whenever I see
something relevant to my new driver, I change it to conform.
Right now I'm busy booting Linux on a PPC inside a Xilinx chip
so I haven't done the final testing and documentation updates
necessary before resubmitting the driver to Linux, but I
promise I will do so Real Soon Now -- before mid-August.
/David Boggs
^ permalink raw reply [flat|nested] 7+ messages in thread
* [2.6 patch] make hdlc_setup() static again
2006-06-26 19:28 ` Krzysztof Halasa
@ 2006-11-25 19:16 ` Adrian Bunk
2006-11-26 19:22 ` Krzysztof Halasa
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2006-11-25 19:16 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: Jeff Garzik, linux-kernel, netdev
On Mon, Jun 26, 2006 at 09:28:14PM +0200, Krzysztof Halasa wrote:
> Adrian Bunk <bunk@stusta.de> writes:
>
> > hdlc_setup() is now EXPORTed as per David's request.
> >
> > Is a usage of this export pending for the near future
>
> I'm told it is.
It's still not used...
So let's unexport it again until some driver that actually uses it shows up.
> Krzysztof Halasa
cu
Adrian
<-- snip -->
hdlc_setup was exported, but this export was never used.
If adriver using it actually shows up it can still be exported again.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.19-rc6-mm1/drivers/net/wan/hdlc.c.old 2006-11-25 00:16:13.000000000 +0100
+++ linux-2.6.19-rc6-mm1/drivers/net/wan/hdlc.c 2006-11-25 00:16:26.000000000 +0100
@@ -222,7 +222,7 @@
return -EINVAL;
}
-void hdlc_setup(struct net_device *dev)
+static void hdlc_setup(struct net_device *dev)
{
hdlc_device *hdlc = dev_to_hdlc(dev);
@@ -325,7 +325,6 @@
EXPORT_SYMBOL(hdlc_open);
EXPORT_SYMBOL(hdlc_close);
EXPORT_SYMBOL(hdlc_ioctl);
-EXPORT_SYMBOL(hdlc_setup);
EXPORT_SYMBOL(alloc_hdlcdev);
EXPORT_SYMBOL(unregister_hdlc_device);
EXPORT_SYMBOL(register_hdlc_protocol);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [2.6 patch] make hdlc_setup() static again
2006-11-25 19:16 ` [2.6 patch] make hdlc_setup() static again Adrian Bunk
@ 2006-11-26 19:22 ` Krzysztof Halasa
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Halasa @ 2006-11-26 19:22 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Jeff Garzik, linux-kernel, netdev
Adrian Bunk <bunk@stusta.de> writes:
> It's still not used...
>
> So let's unexport it again until some driver that actually uses it shows up.
Fair enough.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-11-26 19:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-25 20:51 -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported? Adrian Bunk
2006-06-26 19:28 ` Krzysztof Halasa
2006-11-25 19:16 ` [2.6 patch] make hdlc_setup() static again Adrian Bunk
2006-11-26 19:22 ` Krzysztof Halasa
-- strict thread matches above, loose matches on Subject: below --
2006-06-26 6:11 -git: Why is drivers/net/wan/hdlc_generic.c:hdlc_setup() exported? David Boggs
2006-06-26 9:35 ` Christoph Hellwig
2006-06-27 11:09 David Boggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).