* ipv6_chk_acast_addr remove unused loop
From: Daniel Lezcano @ 2008-02-08 17:23 UTC (permalink / raw)
To: David Miller
Cc: Linux Netdev List,
YOSHIFUJI Hideaki / 吉藤英明
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: ipv6_chk_acast_addr-remove-loop.patch --]
[-- Type: text/x-patch, Size: 1757 bytes --]
Subject: ipv6_chk_acast_addr remove unused loop
From: Daniel Lezcano <dlezcano@fr.ibm.com>
The ipv6_chk_acast_addr is called with a netdev pointer parameter which
can be NULL. This value is used as a wildcard to browse the netdev list
and search if a device is owning the address. But when looking closely
to the code, this function is only called one time in ndisc.c and the
netdev parameter is never NULL. The code browsing the netdev list is
pointless in this case.
This patch removes netdev list browsing code.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
net/ipv6/anycast.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
Index: net-2.6-fixes/net/ipv6/anycast.c
===================================================================
--- net-2.6-fixes.orig/net/ipv6/anycast.c
+++ net-2.6-fixes/net/ipv6/anycast.c
@@ -401,7 +401,7 @@ static int ipv6_dev_ac_dec(struct net_de
/*
* check if the interface has this anycast address
*/
-static int ipv6_chk_acast_dev(struct net_device *dev, struct in6_addr *addr)
+int ipv6_chk_acast_addr(struct net_device *dev, struct in6_addr *addr)
{
struct inet6_dev *idev;
struct ifacaddr6 *aca;
@@ -419,26 +419,6 @@ static int ipv6_chk_acast_dev(struct net
return 0;
}
-/*
- * check if given interface (or any, if dev==0) has this anycast address
- */
-int ipv6_chk_acast_addr(struct net_device *dev, struct in6_addr *addr)
-{
- int found = 0;
-
- if (dev)
- return ipv6_chk_acast_dev(dev, addr);
- read_lock(&dev_base_lock);
- for_each_netdev(&init_net, dev)
- if (ipv6_chk_acast_dev(dev, addr)) {
- found = 1;
- break;
- }
- read_unlock(&dev_base_lock);
- return found;
-}
-
-
#ifdef CONFIG_PROC_FS
struct ac6_iter_state {
struct net_device *dev;
^ permalink raw reply
* Re: ipv6_chk_acast_addr remove unused loop
From: David Stevens @ 2008-02-08 17:42 UTC (permalink / raw)
To: Daniel Lezcano
Cc: David Miller, Linux Netdev List, netdev-owner,
YOSHIFUJI Hideaki / 吉藤英明
In-Reply-To: <47AC8FFD.3090401@fr.ibm.com>
NACK.
Daniel,
This code is part of the in-kernel API for anycast, which is
intended
to be the same as for multicast. By removing support for NULL there,
you're
making a special case for the anycast code that isn't there in the
multicast
code (can't support a NULL dev), and you really aren't buying all that
much for it.
+-DLS
^ permalink raw reply
* Re: + smack-unlabeled-outgoing-ambient-packets.patch added to -mm tree
From: Paul Moore @ 2008-02-08 17:43 UTC (permalink / raw)
To: casey; +Cc: Andrew Morton, davem, jmorris, mingo, sds, linux-kernel, netdev
In-Reply-To: <20080207120459.d4994f44.akpm@linux-foundation.org>
> > > ------------------------------------------------------
> > > Subject: Smack: unlabeled outgoing ambient packets
> > > From: Casey Schaufler <casey@schaufler-ca.com>
> > >
> > > Smack uses CIPSO labeling, but allows for unlabeled packets by
> > > specifying an "ambient" label that is applied to incoming
> > > unlabeled packets. Because the other end of the connection may
> > > dislike IP options, and ssh is one know application that behaves
> > > thus ...
I forgot to mention this earlier, but RHEL/Fedora/Rawhide has a patched
version of SSH (see RH bugzilla #202856 for the discussion/patch) that
fixes the problem of IPv4 options causing SSH to reject the connection.
It turns out that SSH is being a bit overzealous (rejecting all IPv4
options) in trying to reject source-routed packets.
--
paul moore
linux security @ hp
^ permalink raw reply
* Re: [patch 1/7] typhoon section fix
From: Andrew Morton @ 2008-02-08 17:52 UTC (permalink / raw)
To: David Dillow; +Cc: davem, jeff, netdev, sam
In-Reply-To: <1202479150.4349.0.camel@obelisk.thedillows.org>
On Fri, 08 Feb 2008 08:59:10 -0500 David Dillow <dave@thedillows.org> wrote:
>
> On Fri, 2008-02-08 at 03:11 -0800, akpm@linux-foundation.org wrote:
> > From: Andrew Morton <akpm@linux-foundation.org>
> >
> > gcc-3.4.4 on powerpc:
> >
> > drivers/net/typhoon.c:137: error: version causes a section type conflict
> >
> > Cc: Jeff Garzik <jeff@garzik.org>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> > -static const char version[] __devinitdata =
> > +static char version[] __devinitdata =
> > "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
>
> Wouldn't going to __devinitconst be better? I'll try to whip up a patch
> and test-compile it.
Sam told me that doesn't work right, that this approach is the one to use
and, iirc, that __devinitcont and friends will be removed.
I'm not sure why, actually. I think I missed that dicussion.
^ permalink raw reply
* Re: ipv6_chk_acast_addr remove unused loop
From: Daniel Lezcano @ 2008-02-08 17:48 UTC (permalink / raw)
To: David Stevens
Cc: David Miller, Linux Netdev List, netdev-owner,
YOSHIFUJI Hideaki / 吉藤英明
In-Reply-To: <OF1B77A186.F07F897A-ON882573E9.0060B0C5-882573E9.00614E3C@us.ibm.com>
David Stevens wrote:
> NACK.
>
> Daniel,
> This code is part of the in-kernel API for anycast, which is
> intended
> to be the same as for multicast. By removing support for NULL there,
> you're
> making a special case for the anycast code that isn't there in the
> multicast
> code (can't support a NULL dev), and you really aren't buying all that
> much for it.
I was hesitating to send this patch exactly for the reason you are
explaining. Apparently I did the bad choice :)
Thanks.
-- Daniel
^ permalink raw reply
* Re: [NET/IPv6] Race condition with flow_cache_genid?
From: Herbert Xu @ 2008-02-08 18:16 UTC (permalink / raw)
To: Kyle Moffett; +Cc: netdev, linux-kernel, davem
In-Reply-To: <f73f7ab80802061036u64a56abnccafacf68f2ed717@mail.gmail.com>
Kyle Moffett <kyle@moffetthome.net> wrote:
>
> Basically either there is some missing locking here or it does not
> need to be "atomic_t". Judging from the way it *appears* to be used
> to check if cache entries are up-to-date with the latest changes in
> policy, I would guess the former.
You're right that it doesn't really have to be an atomic since
all the writers are from xfrm currently. However, the fact that
it is atomic is used by the current code since sometimes they
increment the value without holding the xfrm policy lock.
Yes it is racy but that is fine for the purpose that this variable
serves. All it does is to make sure that extant flow objects get
killed at some point after the increment. There is absolutely no
requirement that the killing be immediate or synchronised.
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
^ permalink raw reply
* Re: oops with ipcomp
From: Herbert Xu @ 2008-02-08 18:31 UTC (permalink / raw)
To: Beschorner Daniel; +Cc: netdev
In-Reply-To: <3C59DB883F7B0B4D8096010D45ACCD134F20D4@exch.facton.local>
On Fri, Feb 08, 2008 at 11:45:33AM +0100, Beschorner Daniel wrote:
> > No I meant the exact output of ip x p and ip x s.
>
> I know, but as I end up every time with a tainted kernel on our
> production server I didn't turn ipcomp on, but now I got it.
Hmm, that's pretty much what I've got (but I'm on 32-bit still).
Does every packet from A trigger the crash?
Thanks,
--
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
^ permalink raw reply
* Re: [patch 1/7] typhoon section fix
From: David Dillow @ 2008-02-08 18:21 UTC (permalink / raw)
To: Andrew Morton; +Cc: davem, jeff, netdev, sam
In-Reply-To: <20080208095233.722d7c47.akpm@linux-foundation.org>
On Fri, 2008-02-08 at 09:52 -0800, Andrew Morton wrote:
> On Fri, 08 Feb 2008 08:59:10 -0500 David Dillow <dave@thedillows.org> wrote:
> > On Fri, 2008-02-08 at 03:11 -0800, akpm@linux-foundation.org wrote:
> > > From: Andrew Morton <akpm@linux-foundation.org>
> > >
> > > gcc-3.4.4 on powerpc:
> > >
> > > drivers/net/typhoon.c:137: error: version causes a section type conflict
> > >
> > > Cc: Jeff Garzik <jeff@garzik.org>
> > > Cc: Sam Ravnborg <sam@ravnborg.org>
> > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> >
> > > -static const char version[] __devinitdata =
> > > +static char version[] __devinitdata =
> > > "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
> >
> > Wouldn't going to __devinitconst be better? I'll try to whip up a patch
> > and test-compile it.
>
> Sam told me that doesn't work right, that this approach is the one to use
> and, iirc, that __devinitcont and friends will be removed.
>
> I'm not sure why, actually. I think I missed that dicussion.
Thanks for the searchable terms -- this is the thread, I think:
http://lkml.org/lkml/2008/2/3/99
It looks like Jan had an idea to fold the const into the __devinitconst
marker, and if that seems to be viable, then I'd prefer that route to
keep the const'ness where it is possible.
Otherwise, your patch is fine as-is.
Acked-by: David Dillow <dave@thedillows.org>
^ permalink raw reply
* Re: [patch 1/7] typhoon section fix
From: Sam Ravnborg @ 2008-02-08 19:03 UTC (permalink / raw)
To: David Dillow, Jan Beulich; +Cc: Andrew Morton, davem, jeff, netdev
In-Reply-To: <1202494917.5298.3.camel@lap75545.ornl.gov>
On Fri, Feb 08, 2008 at 01:21:57PM -0500, David Dillow wrote:
>
> On Fri, 2008-02-08 at 09:52 -0800, Andrew Morton wrote:
> > On Fri, 08 Feb 2008 08:59:10 -0500 David Dillow <dave@thedillows.org> wrote:
> > > On Fri, 2008-02-08 at 03:11 -0800, akpm@linux-foundation.org wrote:
> > > > From: Andrew Morton <akpm@linux-foundation.org>
> > > >
> > > > gcc-3.4.4 on powerpc:
> > > >
> > > > drivers/net/typhoon.c:137: error: version causes a section type conflict
> > > >
> > > > Cc: Jeff Garzik <jeff@garzik.org>
> > > > Cc: Sam Ravnborg <sam@ravnborg.org>
> > > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > >
> > > > -static const char version[] __devinitdata =
> > > > +static char version[] __devinitdata =
> > > > "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
> > >
> > > Wouldn't going to __devinitconst be better? I'll try to whip up a patch
> > > and test-compile it.
> >
> > Sam told me that doesn't work right, that this approach is the one to use
> > and, iirc, that __devinitcont and friends will be removed.
> >
> > I'm not sure why, actually. I think I missed that dicussion.
After introducing dedicated sections for __devinit, __devinitdata & friends
and introducing __devinitconst for const data we started to see
section type conflict _errors_ emitted from gcc for certain architectures.
64bit powerpc and ia64 being two of them.
That was rooted down by Al to the following:
===================================================================
; cat >a.c <<'EOF'
const char foo[] __attribute__ ((__section__(".blah"))) = "";
const char * const bar __attribute__((__section__(".blah"))) = "";
EOF
; gcc -m32 -S a.c
; gcc -m64 -S a.c
a.c:2: error: bar causes a section type conflict
;
===================================================================
Which tells us that the same data in some cases are put in a readonly
section and in other cases not.
And when we force data for tow different variables where gcc thinks one is
const and the other is not const to the same section gcc errros
out with the "section type conflict" error.
And this is becoming increasingly visible when people start to constify
the data all around and do test build on x86 64bit that does not exhibit
this behaviour.
The rationale behind the increased constification of data is to get
improved use of the DEBUG_RODATA thing.
Another good reason s that this is a good way to let gcc catch accidental
writes to data that otherwise should have been read-only.
But if we advocate for constification of data than we should have
a reliable way to detect the section type conflict errors on x86
(at least 64 bit) which we do not have. Missing that will casue us to see
an increasing flood of error reports from our power pc and ia64 builders.
The rationale behind __devinitconst was to create a dedicated section
for data marked read-only by gcc and thus avoiding the
section type conflict.
But as shown by the above code snippet this is not easy.
For x86 (32 + 64bit) both variables end up in READ-ONLY section.
For Powerpc 64 bit the variable bar end up in a read-write section.
And I see no way to check this for a x86 build so we warn early and
with the most widely used tool-chain.
So do we have other options that to drop the constification and thus
dropping the __devinitconst and the other __*const annotations - I think not :-(
Sam
^ permalink raw reply
* Broadcom 5708 taking a few seconds to get link-up
From: Brian Haley @ 2008-02-08 19:29 UTC (permalink / raw)
To: mchan; +Cc: netdev@vger.kernel.org
Hi Michael,
I'm working on a system that has two on-board 5708's. We've noticed
that it takes about 3 seconds for the link to come up - is this
considered normal? I've tried this with the latest davem tree with
similar results to older kernels/drivers.
# uname -r
2.6.24
# ethtool -i eth3
driver: bnx2
version: 1.7.3
firmware-version: 1.9.3
bus-info: 0000:42:00.0
# lspci -v
42:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708
Gigabit Ethernet (rev 11)
Subsystem: Hewlett-Packard Company Unknown device 7038
Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 34
Memory at fa000000 (64-bit, non-prefetchable) [size=32M]
Capabilities: [40] PCI-X non-bridge device
Capabilities: [48] Power Management version 2
Capabilities: [50] Vital Product Data
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/0 Enable-
# ip link set eth3 up; mii-tool eth3; sleep 1; mii-tool eth3; sleep 1;
mii-tool eth3; sleep 1; mii-tool eth3
eth3: no link
eth3: no link
eth3: no link
eth3: negotiated 100baseTx-FD, link ok
Other drivers I've tried - e1000 and tg3, get up in < 1 second. I'm
asking becuase any packet I try to transmit out this interface before
link-up never gets out.
Thanks for any info,
-Brian
^ permalink raw reply
* [PATCH 4/5] Tsi108_eth: fix link recovery after disconnect
From: Alexandre Bounine @ 2008-02-08 19:17 UTC (permalink / raw)
To: jgarzik, netdev; +Cc: linuxppc-dev, Josh Boyer, Zang Roy-r61911
Bug fix for tsi108_eth network driver.
This patch fixes a problem with link recovery after connection was lost.
Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
---
diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c
linux-2.6.24-fix/drivers/net/tsi108_eth.c
--- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06
16:16:00.000000000 -0500
+++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06
16:57:41.000000000 -0500
@@ -338,22 +338,21 @@ static void tsi108_check_phy(struct net_
TSI_WRITE(TSI108_MAC_CFG2, mac_cfg2_reg);
TSI_WRITE(TSI108_EC_PORTCTRL, portctrl_reg);
+ }
- if (data->link_up == 0) {
- /* The manual says it can take 3-4 usecs
for the speed change
- * to take effect.
- */
- udelay(5);
-
- spin_lock(&data->txlock);
- if (is_valid_ether_addr(dev->dev_addr)
&& data->txfree)
- netif_wake_queue(dev);
+ if (data->link_up == 0) {
+ /* The manual says it can take 3-4 usecs for the
speed change
+ * to take effect.
+ */
+ udelay(5);
- data->link_up = 1;
- spin_unlock(&data->txlock);
- }
- }
+ spin_lock(&data->txlock);
+ if (is_valid_ether_addr(dev->dev_addr) &&
data->txfree)
+ netif_wake_queue(dev);
+ data->link_up = 1;
+ spin_unlock(&data->txlock);
+ }
} else {
if (data->link_up == 1) {
netif_stop_queue(dev);
@@ -1267,12 +1266,11 @@ static void tsi108_init_phy(struct net_d
* PHY_STAT register before the link up status bit is set.
*/
- data->link_up = 1;
+ data->link_up = 0;
while (!((phyval = tsi108_read_mii(data, MII_BMSR)) &
BMSR_LSTATUS)) {
if (i++ > (MII_READ_DELAY / 10)) {
- data->link_up = 0;
break;
}
spin_unlock_irqrestore(&phy_lock, flags);
---
Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you.
^ permalink raw reply
* [PATCH 0/5] Tsi108_eth: set of driver fix-ups
From: Alexandre Bounine @ 2008-02-08 19:16 UTC (permalink / raw)
To: jgarzik, netdev; +Cc: linuxppc-dev, Josh Boyer, Zang Roy-r61911
This is set of small fixes for Tsi108 Ethernet driver.
Based on kernel version 2.6.24
---
Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you.
^ permalink raw reply
* [PATCH 3/5] Tsi108_eth: remove not needed code
From: Alexandre Bounine @ 2008-02-08 19:17 UTC (permalink / raw)
To: jgarzik, netdev; +Cc: linuxppc-dev, Josh Boyer, Zang Roy-r61911
Code clean-up for tsi108_eth network driver.
This patch removes not needed dummy read and the corresponding comment.
The PHY logic requires two reads from the status register to get
current link status. This is done correctly inside mii_check_media().
Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
---
diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c
linux-2.6.24-fix/drivers/net/tsi108_eth.c
--- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06
15:47:35.000000000 -0500
+++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06
15:54:14.000000000 -0500
@@ -297,18 +297,11 @@ static void tsi108_check_phy(struct net_
u32 speed;
unsigned long flags;
- /* Do a dummy read, as for some reason the first read
- * after a link becomes up returns link down, even if
- * it's been a while since the link came up.
- */
-
spin_lock_irqsave(&phy_lock, flags);
if (!data->phy_ok)
goto out;
- tsi108_read_mii(data, MII_BMSR);
-
duplex = mii_check_media(&data->mii_if, netif_msg_link(data),
data->init_media);
data->init_media = 0;
---
Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you.
^ permalink raw reply
* [PATCH 5/5] Tsi108_eth: Add ethtool support
From: Alexandre Bounine @ 2008-02-08 19:17 UTC (permalink / raw)
To: jgarzik, netdev; +Cc: linuxppc-dev, Josh Boyer, Zang Roy-r61911
Add ethtool support to tsi108_eth network driver.
Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
---
diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c
linux-2.6.24-fix/drivers/net/tsi108_eth.c
--- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06
17:10:53.000000000 -0500
+++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06
18:09:43.000000000 -0500
@@ -36,6 +36,7 @@
#include <linux/net.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -1519,12 +1520,46 @@ static void tsi108_init_mac(struct net_d
TSI_WRITE(TSI108_EC_INTMASK, ~0);
}
+static int tsi108_get_settings(struct net_device *dev, struct
ethtool_cmd *cmd)
+{
+ struct tsi108_prv_data *data = netdev_priv(dev);
+ unsigned long flags;
+ int rc;
+
+ spin_lock_irqsave(&data->txlock, flags);
+ rc = mii_ethtool_gset(&data->mii_if, cmd);
+ spin_unlock_irqrestore(&data->txlock, flags);
+
+ return rc;
+}
+
+static int tsi108_set_settings(struct net_device *dev, struct
ethtool_cmd *cmd)
+{
+ struct tsi108_prv_data *data = netdev_priv(dev);
+ unsigned long flags;
+ int rc;
+
+ spin_lock_irqsave(&data->txlock, flags);
+ rc = mii_ethtool_sset(&data->mii_if, cmd);
+ spin_unlock_irqrestore(&data->txlock, flags);
+
+ return rc;
+}
+
static int tsi108_do_ioctl(struct net_device *dev, struct ifreq *rq,
int cmd)
{
struct tsi108_prv_data *data = netdev_priv(dev);
+ if (!netif_running(dev))
+ return -EINVAL;
return generic_mii_ioctl(&data->mii_if, if_mii(rq), cmd, NULL);
}
+static const struct ethtool_ops tsi108_ethtool_ops = {
+ .get_link = ethtool_op_get_link,
+ .get_settings = tsi108_get_settings,
+ .set_settings = tsi108_set_settings,
+};
+
static int
tsi108_init_one(struct platform_device *pdev)
{
@@ -1589,6 +1624,7 @@ tsi108_init_one(struct platform_device *
dev->get_stats = tsi108_get_stats;
netif_napi_add(dev, &data->napi, tsi108_poll, 64);
dev->do_ioctl = tsi108_do_ioctl;
+ dev->ethtool_ops = &tsi108_ethtool_ops;
/* Apparently, the Linux networking code won't use
scatter-gather
* if the hardware doesn't do checksums. However, it's faster
---
Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you.
^ permalink raw reply
* [PATCH 1/5] Tsi108_eth: add missing linking to driver data
From: Alexandre Bounine @ 2008-02-08 19:16 UTC (permalink / raw)
To: jgarzik, netdev; +Cc: linuxppc-dev, Josh Boyer, Zang Roy-r61911
Bug fix for tsi108_eth network driver.
This patch adds missing linking to driver data.
Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
---
diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c
linux-2.6.24-fix/drivers/net/tsi108_eth.c
--- linux-2.6.24/drivers/net/tsi108_eth.c 2008-01-24
17:58:37.000000000 -0500
+++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06
14:30:04.000000000 -0500
@@ -1629,6 +1629,7 @@ tsi108_init_one(struct platform_device *
goto register_fail;
}
+ platform_set_drvdata(pdev, dev);
printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n",
dev->name, print_mac(mac, dev->dev_addr));
#ifdef DEBUG
---
Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you.
^ permalink raw reply
* [PATCH 2/5] Tsi108_eth: fix detection of 1000Mb mode
From: Alexandre Bounine @ 2008-02-08 19:17 UTC (permalink / raw)
To: jgarzik, netdev; +Cc: linuxppc-dev, Josh Boyer, Zang Roy-r61911
Bug fix for tsi108_eth network driver.
This patch fixes a problem with detection of 1000Mb speed.
Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
---
diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c
linux-2.6.24-fix/drivers/net/tsi108_eth.c
--- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06
15:09:19.000000000 -0500
+++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06
15:34:12.000000000 -0500
@@ -1287,6 +1287,7 @@ static void tsi108_init_phy(struct net_d
spin_lock_irqsave(&phy_lock, flags);
}
+ data->mii_if.supports_gmii =
mii_check_gmii_support(&data->mii_if);
printk(KERN_DEBUG "PHY_STAT reg contains %08x\n", phyval);
data->phy_ok = 1;
data->init_media = 1;
@@ -1584,7 +1585,6 @@ tsi108_init_one(struct platform_device *
data->mii_if.phy_id = einfo->phy;
data->mii_if.phy_id_mask = 0x1f;
data->mii_if.reg_num_mask = 0x1f;
- data->mii_if.supports_gmii =
mii_check_gmii_support(&data->mii_if);
data->phy = einfo->phy;
data->phy_type = einfo->phy_type;
---
Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you.
^ permalink raw reply
* Re: Broadcom 5708 taking a few seconds to get link-up
From: Michael Chan @ 2008-02-08 19:42 UTC (permalink / raw)
To: Brian Haley; +Cc: netdev
In-Reply-To: <47ACADA1.1090809@hp.com>
On Fri, 2008-02-08 at 14:29 -0500, Brian Haley wrote:
> Hi Michael,
>
> I'm working on a system that has two on-board 5708's. We've noticed
> that it takes about 3 seconds for the link to come up - is this
> considered normal? I've tried this with the latest davem tree with
> similar results to older kernels/drivers.
Yes, 2 - 3 seconds are normal for autoneg to link up on
10/100/1000baseT. Sometimes it can take even longer, but generally less
than 5 seconds. SerDes is much faster.
>
> # uname -r
> 2.6.24
>
> # ethtool -i eth3
> driver: bnx2
> version: 1.7.3
> firmware-version: 1.9.3
> bus-info: 0000:42:00.0
>
> # lspci -v
> 42:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708
> Gigabit Ethernet (rev 11)
> Subsystem: Hewlett-Packard Company Unknown device 7038
> Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 34
> Memory at fa000000 (64-bit, non-prefetchable) [size=32M]
> Capabilities: [40] PCI-X non-bridge device
> Capabilities: [48] Power Management version 2
> Capabilities: [50] Vital Product Data
> Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
> Queue=0/0 Enable-
>
> # ip link set eth3 up; mii-tool eth3; sleep 1; mii-tool eth3; sleep 1;
> mii-tool eth3; sleep 1; mii-tool eth3
> eth3: no link
> eth3: no link
> eth3: no link
> eth3: negotiated 100baseTx-FD, link ok
>
> Other drivers I've tried - e1000 and tg3, get up in < 1 second. I'm
> asking becuase any packet I try to transmit out this interface before
> link-up never gets out.
>
In BNX2 and TG3, we always reset the PHY when we bring up the device,
causing the link to drop and to renegotiate. The link-up time for TG3
should be about the same (2 - 3 seconds). Other drivers may not reset
the PHY and so the link may be able to come up instantly.
^ permalink raw reply
* [PATCH] isdn: fix section mismatch warning in hfc_sx.c
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller
In-Reply-To: <1202500804-32020-1-git-send-email-sam@ravnborg.org>
Fix the following warning:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x35818): Section mismatch in reference from the function hfcsx_card_msg() to the function .devinit.text:inithfcsx()
hfcsx_card_msg() may be called outside __devinit context.
Following the program logic is looks like the CARD_INIT branch
will only be taken under __devinit context but to be consistent
remove the __devinit annotation of inithfcsx() so we
do not mix non-__devinit and __devinit code.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
drivers/isdn/hisax/hfc_sx.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index 4fd09d2..05482d2 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -1330,8 +1330,7 @@ hfcsx_bh(struct work_struct *work)
/********************************/
/* called for card init message */
/********************************/
-static void __devinit
-inithfcsx(struct IsdnCardState *cs)
+static void inithfcsx(struct IsdnCardState *cs)
{
cs->setstack_d = setstack_hfcsx;
cs->BC_Send_Data = &hfcsx_send_data;
--
1.5.4.rc3.14.g44397
^ permalink raw reply related
* [PATCH] isdn: fix section mismatch warnings in isac.c and isar.c
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller
In-Reply-To: <1202500804-32020-1-git-send-email-sam@ravnborg.org>
Fix the following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b276): Section mismatch in reference from the function inithscxisac() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b286): Section mismatch in reference from the function inithscxisac() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x1fec7): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x21669): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x21671): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2991e): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x29936): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2993e): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:initisar()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2e026): Section mismatch in reference from the function NETjet_S_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2e02e): Section mismatch in reference from the function NETjet_S_card_msg() to the function .devinit.text:initisac()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x37813): Section mismatch in reference from the function BKM_card_msg() to the function .devinit.text:clear_pending_isac_ints()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x37823): Section mismatch in reference from the function BKM_card_msg() to the function .devinit.text:initisac()
initisar(), initisac() and clear_pending_isac_ints()
were all used via a cardmsg fnction - which may be called
ouside __devinit context.
So remove the bogus __devinit annotation of the
above three functions to fix the warnings.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
drivers/isdn/hisax/isac.c | 6 ++----
drivers/isdn/hisax/isar.c | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index 6ae9dde..07b1673 100644
--- a/drivers/isdn/hisax/isac.c
+++ b/drivers/isdn/hisax/isac.c
@@ -615,8 +615,7 @@ dbusy_timer_handler(struct IsdnCardState *cs)
}
}
-void __devinit
-initisac(struct IsdnCardState *cs)
+void initisac(struct IsdnCardState *cs)
{
cs->setstack_d = setstack_isac;
cs->DC_Close = DC_Close_isac;
@@ -647,8 +646,7 @@ initisac(struct IsdnCardState *cs)
cs->writeisac(cs, ISAC_MASK, 0x0);
}
-void __devinit
-clear_pending_isac_ints(struct IsdnCardState *cs)
+void clear_pending_isac_ints(struct IsdnCardState *cs)
{
int val, eval;
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index c547a66..bfeb9b6 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -1894,8 +1894,7 @@ isar_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
return(0);
}
-void __devinit
-initisar(struct IsdnCardState *cs)
+void initisar(struct IsdnCardState *cs)
{
cs->bcs[0].BC_SetStack = setstack_isar;
cs->bcs[1].BC_SetStack = setstack_isar;
--
1.5.4.rc3.14.g44397
^ permalink raw reply related
* [PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller
Fix the following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x722): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_teles3()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x72c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_s0box()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x736): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_telespci()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x747): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_avm_pcipnp()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x74e): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_elsa()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x755): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_diva()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x75c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sedlbauer()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x763): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_s()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x76a): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcpci()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x771): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcsx()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x778): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_niccy()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x77f): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_bkm_a4t()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x786): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sct_quadro()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x78d): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_gazel()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x794): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_w6692()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x79b): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_u()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x7a2): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_enternow_pci()
checkcard() are the only user of hisax_cs_setup_card().
And checkcard is only used during init or when hot plugging
ISDN devices. So annotate hisax_cs_setup_card() with __devinit.
checkcard() is used by exported functions so it cannot be
annotated __devinit. Annotate it with __ref so modpost
ignore references to _devinit section.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
---
drivers/isdn/hisax/config.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index 97097ef..a0ee43c 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -847,7 +847,7 @@ static int init_card(struct IsdnCardState *cs)
return 3;
}
-static int hisax_cs_setup_card(struct IsdnCard *card)
+static int __devinit hisax_cs_setup_card(struct IsdnCard *card)
{
int ret;
@@ -1166,7 +1166,10 @@ outf_cs:
return 0;
}
-static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner)
+/* Used from an exported function but calls __devinit functions.
+ * Tell modpost not to warn (__ref)
+ */
+static int __ref checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner)
{
int ret;
struct IsdnCard *card = cards + cardnr;
--
1.5.4.rc3.14.g44397
^ permalink raw reply related
* [PATCH] isdn: fix section mismatch warning for ISACVer
From: Sam Ravnborg @ 2008-02-08 20:00 UTC (permalink / raw)
To: netdev, David Miller, Jeff Garzik; +Cc: Sam Ravnborg, Jeff Garzik, David Miller
In-Reply-To: <1202500804-32020-1-git-send-email-sam@ravnborg.org>
Fix following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x19723): Section mismatch in reference from the function ISACVersion() to the variable .devinit.data:ISACVer
WARNING: drivers/isdn/hisax/built-in.o(.text+0x2005b): Section mismatch in reference from the function setup_avm_a1_pcmcia() to the function .devinit.text:setup_isac()
ISACVer were only used from function annotated __devinit
so add same annotation to ISACVer.
One af the fererencing functions missed __devinit so add it
and kill an additional warning.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: David Miller <davem@davemloft.net>
---
drivers/isdn/hisax/avm_a1p.c | 3 +--
drivers/isdn/hisax/isac.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c
index c87fa3f..3039c6d 100644
--- a/drivers/isdn/hisax/avm_a1p.c
+++ b/drivers/isdn/hisax/avm_a1p.c
@@ -213,8 +213,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return 0;
}
-int
-setup_avm_a1_pcmcia(struct IsdnCard *card)
+int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card)
{
u_char model, vers;
struct IsdnCardState *cs = card->cs;
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index 4e9f238..6ae9dde 100644
--- a/drivers/isdn/hisax/isac.c
+++ b/drivers/isdn/hisax/isac.c
@@ -27,8 +27,7 @@ static char *ISACVer[] __devinitdata =
{"2086/2186 V1.1", "2085 B1", "2085 B2",
"2085 V2.3"};
-void
-ISACVersion(struct IsdnCardState *cs, char *s)
+void __devinit ISACVersion(struct IsdnCardState *cs, char *s)
{
int val;
--
1.5.4.rc3.14.g44397
^ permalink raw reply related
* [GIT-PULL Request]: SCTP fixes
From: Vlad Yasevich @ 2008-02-08 20:27 UTC (permalink / raw)
To: netdev; +Cc: lksctp-developers, davem
Hi David
The following changes since commit 3113e88c3cb3c0a22920b621f8e4d1f2ccc07f1e:
Stephen Hemminger (1):
[PKT_SCHED]: vlan tag match
are available in the git repository at:
vxy@master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev.git pending
Vlad Yasevich (6):
[SCTP]: Stop claiming that this is a "reference implementation"
[SCTP]: Do not increase rwnd when reading partial notification.
[SCTP]: Kill silly inlines in ulpqueue.c
[SCTP]: Correctly reap SSNs when processing FORWARD_TSN chunk
[SCTP]: Set ports in every address returned by sctp_getladdrs()
[SCTP]: Make sure the chunk is off the transmitted list prior to freeing.
Wei Yongjun (1):
[SCTP]: Fix kernel panic while received ASCONF chunk with bad serial number
include/linux/sctp.h | 4 +-
include/net/sctp/auth.h | 8 +++---
include/net/sctp/command.h | 8 +++---
include/net/sctp/constants.h | 8 +++---
include/net/sctp/sctp.h | 8 +++---
include/net/sctp/sm.h | 8 +++---
include/net/sctp/structs.h | 8 +++---
include/net/sctp/tsnmap.h | 8 +++---
include/net/sctp/ulpevent.h | 8 +++---
include/net/sctp/ulpqueue.h | 6 ++--
include/net/sctp/user.h | 8 +++---
net/sctp/associola.c | 14 ++++++------
net/sctp/auth.c | 8 +++---
net/sctp/bind_addr.c | 8 +++---
net/sctp/chunk.c | 8 +++---
net/sctp/command.c | 8 +++---
net/sctp/debug.c | 12 +++-------
net/sctp/endpointola.c | 12 +++-------
net/sctp/input.c | 8 +++---
net/sctp/inqueue.c | 8 +++---
net/sctp/ipv6.c | 8 +++---
net/sctp/objcnt.c | 8 +++---
net/sctp/output.c | 8 +++---
net/sctp/outqueue.c | 12 ++++++----
net/sctp/primitive.c | 8 +++---
net/sctp/proc.c | 8 +++---
net/sctp/protocol.c | 8 +++---
net/sctp/sm_make_chunk.c | 9 ++++---
net/sctp/sm_sideeffect.c | 8 +++---
net/sctp/sm_statefuns.c | 10 +++-----
net/sctp/sm_statetable.c | 8 +++---
net/sctp/socket.c | 17 +++++++++++----
net/sctp/ssnmap.c | 8 +++---
net/sctp/sysctl.c | 8 +++---
net/sctp/transport.c | 8 +++---
net/sctp/tsnmap.c | 8 +++---
net/sctp/ulpevent.c | 7 +++--
net/sctp/ulpqueue.c | 43 +++++++++++++++++++++++++++++------------
38 files changed, 190 insertions(+), 172 deletions(-)
^ permalink raw reply
* [PATCH] libertas: Don't mark exported symbols as static
From: Roland Dreier @ 2008-02-09 0:07 UTC (permalink / raw)
To: John W. Linville; +Cc: netdev, Dan Williams
Marking exported symbols as static causes the following build error on
ia64 with gcc 4.2.3:
drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict
drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict
Therefore, remove the static marking on lbs_remove_mesh and lbs_add_mesh.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
---
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 84fb49c..a688ce8 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -253,8 +253,8 @@ static ssize_t lbs_anycast_set(struct device *dev,
static int lbs_add_rtap(struct lbs_private *priv);
static void lbs_remove_rtap(struct lbs_private *priv);
-static int lbs_add_mesh(struct lbs_private *priv);
-static void lbs_remove_mesh(struct lbs_private *priv);
+int lbs_add_mesh(struct lbs_private *priv);
+void lbs_remove_mesh(struct lbs_private *priv);
/**
@@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(lbs_stop_card);
* @param priv A pointer to the struct lbs_private structure
* @return 0 if successful, -X otherwise
*/
-static int lbs_add_mesh(struct lbs_private *priv)
+int lbs_add_mesh(struct lbs_private *priv)
{
struct net_device *mesh_dev = NULL;
int ret = 0;
@@ -1354,7 +1354,7 @@ done:
EXPORT_SYMBOL_GPL(lbs_add_mesh);
-static void lbs_remove_mesh(struct lbs_private *priv)
+void lbs_remove_mesh(struct lbs_private *priv)
{
struct net_device *mesh_dev;
^ permalink raw reply related
* Re: [PATCH] libertas: Don't mark exported symbols as static
From: Stephen Hemminger @ 2008-02-09 0:28 UTC (permalink / raw)
To: netdev
In-Reply-To: <adatzkj0z7l.fsf@cisco.com>
On Fri, 08 Feb 2008 16:07:26 -0800
Roland Dreier <rdreier@cisco.com> wrote:
> Marking exported symbols as static causes the following build error on
> ia64 with gcc 4.2.3:
>
> drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict
> drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict
>
> Therefore, remove the static marking on lbs_remove_mesh and lbs_add_mesh.
>
> Signed-off-by: Roland Dreier <rolandd@cisco.com>
> ---
> diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
> index 84fb49c..a688ce8 100644
> --- a/drivers/net/wireless/libertas/main.c
> +++ b/drivers/net/wireless/libertas/main.c
> @@ -253,8 +253,8 @@ static ssize_t lbs_anycast_set(struct device *dev,
>
> static int lbs_add_rtap(struct lbs_private *priv);
> static void lbs_remove_rtap(struct lbs_private *priv);
> -static int lbs_add_mesh(struct lbs_private *priv);
> -static void lbs_remove_mesh(struct lbs_private *priv);
> +int lbs_add_mesh(struct lbs_private *priv);
> +void lbs_remove_mesh(struct lbs_private *priv);
>
>
> /**
> @@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(lbs_stop_card);
> * @param priv A pointer to the struct lbs_private structure
> * @return 0 if successful, -X otherwise
> */
> -static int lbs_add_mesh(struct lbs_private *priv)
> +int lbs_add_mesh(struct lbs_private *priv)
> {
> struct net_device *mesh_dev = NULL;
> int ret = 0;
> @@ -1354,7 +1354,7 @@ done:
> EXPORT_SYMBOL_GPL(lbs_add_mesh);
>
>
> -static void lbs_remove_mesh(struct lbs_private *priv)
> +void lbs_remove_mesh(struct lbs_private *priv)
> {
> struct net_device *mesh_dev;
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Why not pull the exports? they aren't used anywhere in the existing kernel.
--
Stephen Hemminger <stephen.hemminger@vyatta.com>
^ permalink raw reply
* [PATCH] ematch: oops from uninitialized variable (resend)
From: Stephen Hemminger @ 2008-02-09 1:54 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Setting up a meta match causes a kernel OOPS because of uninitialized
elements in tree.
[ 37.322381] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[ 37.322381] IP: [<ffffffff883fc717>] :em_meta:em_meta_destroy+0x17/0x80
[ 37.322381] Call Trace:
[ 37.322381] [<ffffffff803ec83d>] tcf_em_tree_destroy+0x2d/0xa0
[ 37.322381] [<ffffffff803ecc8c>] tcf_em_tree_validate+0x2dc/0x4a0
[ 37.322381] [<ffffffff803f06d2>] nla_parse+0x92/0xe0
[ 37.322381] [<ffffffff883f9672>] :cls_basic:basic_change+0x202/0x3c0
[ 37.322381] [<ffffffff802a3917>] kmem_cache_alloc+0x67/0xa0
[ 37.322381] [<ffffffff803ea221>] tc_ctl_tfilter+0x3b1/0x580
[ 37.322381] [<ffffffff803dffd0>] rtnetlink_rcv_msg+0x0/0x260
[ 37.322381] [<ffffffff803ee944>] netlink_rcv_skb+0x74/0xa0
[ 37.322381] [<ffffffff803dffc8>] rtnetlink_rcv+0x18/0x20
[ 37.322381] [<ffffffff803ee6c3>] netlink_unicast+0x263/0x290
[ 37.322381] [<ffffffff803cf276>] __alloc_skb+0x96/0x160
[ 37.322381] [<ffffffff803ef014>] netlink_sendmsg+0x274/0x340
[ 37.322381] [<ffffffff803c7c3b>] sock_sendmsg+0x12b/0x140
[ 37.322381] [<ffffffff8024de90>] autoremove_wake_function+0x0/0x30
[ 37.322381] [<ffffffff8024de90>] autoremove_wake_function+0x0/0x30
[ 37.322381] [<ffffffff803c7c3b>] sock_sendmsg+0x12b/0x140
[ 37.322381] [<ffffffff80288611>] zone_statistics+0xb1/0xc0
[ 37.322381] [<ffffffff803c7e5e>] sys_sendmsg+0x20e/0x360
[ 37.322381] [<ffffffff803c7411>] sockfd_lookup_light+0x41/0x80
[ 37.322381] [<ffffffff8028d04b>] handle_mm_fault+0x3eb/0x7f0
[ 37.322381] [<ffffffff8020c2fb>] system_call_after_swapgs+0x7b/0x80
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/sched/ematch.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 74ff918..d421ec7 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -312,10 +312,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla,
struct tcf_ematch_tree_hdr *tree_hdr;
struct tcf_ematch *em;
- if (!nla) {
- memset(tree, 0, sizeof(*tree));
+ memset(tree, 0, sizeof(*tree));
+ if (!nla)
return 0;
- }
err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy);
if (err < 0
--
Stephen Hemminger <stephen.hemminger@vyatta.com>
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox