Netdev List
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] libertas: Don't mark exported symbols as static
From: Roland Dreier @ 2008-02-09  2:01 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20080208162824.461451e1@extreme>

 > Why not pull the exports? they aren't used anywhere in the existing kernel.

I'm guessing there's some not-(yet-)merged mesh networking stuff that
uses the symbols, but it doesn't matter much to me...

 - R.

^ permalink raw reply

* Re: [Bugme-new] [Bug 9920] New: kernel panic when using ebtables redirect target
From: Andrew Morton @ 2008-02-09  1:59 UTC (permalink / raw)
  To: netdev; +Cc: bugme-daemon, mingching.tiew
In-Reply-To: <bug-9920-10286@http.bugzilla.kernel.org/>

On Fri,  8 Feb 2008 17:40:20 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=9920
> 
>            Summary: kernel panic when using ebtables redirect target
>            Product: Networking
>            Version: 2.5
>      KernelVersion: 2.6.24 and 2.6.24-git
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: acme@ghostprotocols.net
>         ReportedBy: mingching.tiew@redtone.com
> 
> 
> Latest working kernel version: 2.6.22 ( did not test 2.6.23 )
> Earliest failing kernel version: 2.6.24 
> Distribution:
> Hardware Environment: 
> Software Environment: bridge working as a router
> Problem Description: when using ebtables to set up target-redirect, there will
> be kernel panic
> 
> Steps to reproduce:
> 1. set up a basic bridge br0 with slaves eth0, eth1
> 2. on the bridge setup a default router to route traffic
> 3. use ebtables to setup target redirect, 
> 
> ebtables -t broute -A BROUTING --logical-in br0 \
> -p ipv4  --ip-protocol tcp --ip-destination-port 80 \
> -j redirect --redirect-target ACCEPT
> 
> 4. from a client which is connect to the bridge, 
> send some traffic to allow the BROUTE chain to be 
> traversed :-
> 
>     lynx http://www.google.com
> 
> 5. Kernel panic :-
> 
> Pid: 0, comm: swapper Not tainted (2.6.24-tmc #1)
> EIP: 0060:[<c69f61aa>] EFLAGS: 00000217 CPU: 0
> EIP is at ebt_do_table+0x4ea/0x5d0 [ebtables]
> EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000001
> ESI: c69f1178 EDI: c69f1108 EBP: c69f1000 ESP: c0315e20
> DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
> Process swapper (pid: 0, ti=c0314000 task=c02f1300 task.ti=c0314000)
> Stack: 00000000 c69f11dc 00000004 00000000 c28c7800 c2b79c20 00000005 c69de350
>       00000001 00000002 c69ed040 c69ed040 00000000 00000000 c69f1000 000000b0
>       000000b0 c29b0812 00000000 c69f1122 00000000 00000000 0000a0c3 c29b0812
> Call Trace:
> [<c69de032>] ebt_broute+0x22/0x30 [ebtable_broute]
> [<c69fef48>] br_handle_frame+0xb8/0x220 [bridge]
> [<c02274ac>] netif_receive_skb+0x19c/0x440
> [<c0229ffb>] process_backlog+0x6b/0xd0
> [<c0229a45>] net_rx_action+0x105/0x1b0
> [<c011f835>] __do_softirq+0x75/0xf0
> [<c011f8e7>] do_softirq+0x37/0x40
> [<c011fb25>] irq_exit+0x75/0x80
> [<c010d877>] smp_apic_timer_interrupt+0x57/0x90
> [<c0105b34>] apic_timer_interrupt+0x28/0x30
> [<c0103cd0>] default_idle+0x0/0x40
> [<c0103cff>] default_idle+0x2f/0x40
> [<c0103443>] cpu_idle+0x73/0xa0
> [<c0319cd5>] start_kernel+0x2c5/0x340
> [<c0319420>] unknown_bootoption+0x0/0x1e0
> =======================
> Code: 00 00 83 f9 fe 74 64 83 f9 fc 0f 84 d7 fb ff ff 83 f9 fd 0f 84 bb fc ff
> ff 8b 5c 24 30 8b 54 24 34 8d 04 5b 8d 04 82 8b 54 24 20 <89> 28 42 89 50 08 8b
> 5f 6c 01 df 89 78 04 8b 6c 24 38 8b 54 24
> EIP: [<c69f61aa>] ebt_do_table+0x4ea/0x5d0 [ebtables] SS:ESP 0068:c0315e20
> 
> 

^ permalink raw reply

* Re: [PATCH] libertas: Don't mark exported symbols as static
From: Christoph Hellwig @ 2008-02-09  4:48 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Stephen Hemminger, netdev
In-Reply-To: <adaejbm28ip.fsf@cisco.com>

On Fri, Feb 08, 2008 at 06:01:02PM -0800, Roland Dreier wrote:
>  > Why not pull the exports? they aren't used anywhere in the existing kernel.
> 
> I'm guessing there's some not-(yet-)merged mesh networking stuff that
> uses the symbols, but it doesn't matter much to me...

The general rule is to not keep symbols for out of tree stuff, so
removing the exports makes more sense.


^ permalink raw reply

* Re: [GIT-PULL Request]: SCTP fixes
From: David Miller @ 2008-02-09 11:45 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: netdev, lksctp-developers
In-Reply-To: <1202502441-16789-1-git-send-email-vladislav.yasevich@hp.com>

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Fri,  8 Feb 2008 15:27:21 -0500

> 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

Pulled and pushed out to net-2.6, thanks Vlad!

^ permalink raw reply

* Re: [PATCH] ematch: oops from uninitialized variable (resend)
From: David Miller @ 2008-02-09 11:48 UTC (permalink / raw)
  To: shemminger; +Cc: netdev
In-Reply-To: <20080208175416.50ccdfaa@extreme>

From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Fri, 8 Feb 2008 17:54:16 -0800

> Setting up a meta match causes a kernel OOPS because of uninitialized
> elements in tree.
...
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied and I'll queue this up for -stable too, thanks!

^ permalink raw reply

* Re: [PATCH] libertas: Don't mark exported symbols as static
From: Dan Williams @ 2008-02-09 13:52 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Roland Dreier, Stephen Hemminger, netdev
In-Reply-To: <20080209044858.GA1428@infradead.org>

On Fri, 2008-02-08 at 23:48 -0500, Christoph Hellwig wrote:
> On Fri, Feb 08, 2008 at 06:01:02PM -0800, Roland Dreier wrote:
> >  > Why not pull the exports? they aren't used anywhere in the existing kernel.
> > 
> > I'm guessing there's some not-(yet-)merged mesh networking stuff that
> > uses the symbols, but it doesn't matter much to me...
> 
> The general rule is to not keep symbols for out of tree stuff, so
> removing the exports makes more sense.

If they aren't used in the in-kernel driver, just kill the export
statements.

Dan


^ permalink raw reply

* [patch] Documentation: fix tcp.txt
From: Matti Linnanvuori @ 2008-02-09 14:25 UTC (permalink / raw)
  To: netdev

From: Matti Linnanvuori <mattilinnanvuori@yahoo.com>

Replace BIC with CUBIC as default congestion control. Fix grammar.

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>

---

--- a/Documentation/networking/tcp.txt 2008-02-09 16:07:39.547357400 +0200
+++ b/Documentation/networking/tcp.txt 2008-02-09 16:12:49.497245900 +0200
@@ -1,7 +1,7 @@
 TCP protocol
 ============
 
-Last updated: 21 June 2005
+Last updated: 9 February 2008
 
 Contents
 ========
@@ -52,9 +52,9 @@
 The method that is used to determine which congestion control mechanism is
 determined by the setting of the sysctl net.ipv4.tcp_congestion_control.
 The default congestion control will be the last one registered (LIFO);
-so if you built everything as modules. the default will be reno. If you
-build with the default's from Kconfig, then BIC will be builtin (not a module)
-and it will end up the default.
+so if you built everything as modules, the default will be reno. If you
+build with the defaults from Kconfig, then CUBIC will be builtin (not a
+module) and it will end up the default.
 
 If you really want a particular default value then you will need
 to set it with the sysctl.  If you use a sysctl, the module will be autoloaded


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


^ permalink raw reply

* Re: [Bugme-new] [Bug 9923] New: Unable conect to internet over ISDN AVM USB BlueFritz
From: Andrew Morton @ 2008-02-09 18:13 UTC (permalink / raw)
  To: netdev; +Cc: bugme-daemon, vasko
In-Reply-To: <bug-9923-10286@http.bugzilla.kernel.org/>

On Sat,  9 Feb 2008 03:36:26 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=9923
> 
>            Summary: Unable conect to internet over ISDN AVM USB BlueFritz
>            Product: Networking
>            Version: 2.5
>      KernelVersion: 2.6.24
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: acme@ghostprotocols.net
>         ReportedBy: vasko@arcor.de
> 
> 
> Latest working kernel version:2.6.22
> Earliest failing kernel version:2.24

A regression.

> Distribution:opensuse 10.3
> Hardware Environment:AVM BlueFritz USB ISDN
> Software Environment:
> Problem Description:
> ifup ippp0
>     ippp0
> SIOCSIFFLAGS: Invalid argument
> Cannot enable interface ippp0
> 
> Steps to reproduce:
> Feb  9 11:20:54 linux-zhr0 klogd: ippp0: dialing 1 019193383... 
> Feb  9 11:20:56 linux-zhr0 klogd: isdn_net: ippp0 connected
> Feb  9 11:20:56 linux-zhr0 klogd: capidrv-1: chan 0 up with ncci 0x10101
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: Local number: 906138, Remote number:
> 019193383, Type: outgoing
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: PHASE_WAIT -> PHASE_ESTABLISHED,
> ifunit: 0, linkunit: 0, fd: 7
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: ioctl(SIOCSIFMTU): Invalid argument, 6
> ippp0 1524.
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: MPPP negotiation, He: Yes We: Yes
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: CCP enabled! Trying CCP.
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: CCP: got ccp-unit 0 for link 0
> (Compression Control Protocol)
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: ccp_resetci!
> Feb  9 11:20:56 linux-zhr0 ipppd[5624]: ccp_resetci!
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from peer slot(0)
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-rcv[0]: 01 01 00 09 11 05 00 01 04 
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from daemon:
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-xmit[0]: ff 03 80 fd 01 01 00 04 
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from daemon:
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-xmit[0]: ff 03 80 fd 04 01 00 09 11
> 05 00 01 04 
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from peer slot(0)
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-rcv[0]: 04 01 00 04 
> Feb  9 11:20:58 linux-zhr0 ipppd[5624]: ccp_resetci!
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from peer slot(0)
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-rcv[0]: 01 02 00 0a 11 06 00 01 01
> 03 
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from daemon:
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-xmit[0]: ff 03 80 fd 01 02 00 04 
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from daemon:
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-xmit[0]: ff 03 80 fd 04 02 00 0a 11
> 06 00 01 01 03 
> Feb  9 11:20:58 linux-zhr0 klogd: Received CCP frame from peer slot(0)
> Feb  9 11:20:58 linux-zhr0 klogd: [0/0].ccp-rcv[0]: 04 02 00 04 
> Feb  9 11:20:59 linux-zhr0 ipppd[5624]: local  IP address 149.225.68.4
> Feb  9 11:20:59 linux-zhr0 ipppd[5624]: remote IP address 139.4.250.4
> Feb  9 11:20:59 linux-zhr0 ipppd[5624]: Ifup: ioctl(SIOCSIFFLAGS): Invalid
> argument
> Feb  9 11:20:59 linux-zhr0 ip-down: SIOCSIFFLAGS: Invalid argument
> 


^ permalink raw reply

* [PATCH][AX25] ax25_ds_timer: use mod_timer instead of add_timer
From: Bernard Pidoux F6BVP @ 2008-02-09 18:44 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: Ralf Baechle DL5RB, Linux Netdev List
In-Reply-To: <20071218135202.GA2023@ff.dom.local>

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

Hi,

With AX25 patches applied I still get this possible circular locking 
message.

Regards,

Bernard P.





[-- Attachment #2: possible_circular_locking --]
[-- Type: text/plain, Size: 2911 bytes --]


=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.24 #3
-------------------------------------------------------
swapper/0 is trying to acquire lock:
 (ax25_list_lock){-+..}, at: [<f91dd3b1>] ax25_destroy_socket+0x171/0x1f0 [ax25]

but task is already holding lock:
 (slock-AF_AX25){-+..}, at: [<f91dbabc>] ax25_std_heartbeat_expiry+0x1c/0xe0 [ax25]

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (slock-AF_AX25){-+..}:
       [<c014c8ca>] __lock_acquire+0xc4a/0x10d0
       [<c014cdd1>] lock_acquire+0x81/0xa0
       [<c03280e2>] _spin_lock+0x32/0x60
       [<f91dce3a>] ax25_info_show+0x24a/0x2c0 [ax25]
       [<c01a4aa1>] seq_read+0xa1/0x2a0
       [<c01c20fd>] proc_reg_read+0x5d/0x90
       [<c018a41a>] vfs_read+0xaa/0x130
       [<c018a8ed>] sys_read+0x3d/0x70
       [<c01042ae>] sysenter_past_esp+0x5f/0xa5
       [<ffffffff>] 0xffffffff

-> #0 (ax25_list_lock){-+..}:
       [<c014c6f1>] __lock_acquire+0xa71/0x10d0
       [<c014cdd1>] lock_acquire+0x81/0xa0
       [<c0328143>] _spin_lock_bh+0x33/0x60
       [<f91dd3b1>] ax25_destroy_socket+0x171/0x1f0 [ax25]
       [<f91dbaf3>] ax25_std_heartbeat_expiry+0x53/0xe0 [ax25]
       [<f91dc5ab>] ax25_heartbeat_expiry+0x1b/0x40 [ax25]
       [<c01325dd>] run_timer_softirq+0x15d/0x1c0
       [<c012e343>] __do_softirq+0x93/0x120
       [<c012e427>] do_softirq+0x57/0x60
       [<c012e868>] irq_exit+0x48/0x60
       [<c0119b3b>] smp_apic_timer_interrupt+0x5b/0x90
       [<c0104e27>] apic_timer_interrupt+0x33/0x38
       [<c0102512>] mwait_idle+0x12/0x20
       [<c0102631>] cpu_idle+0x71/0xc0
       [<c0325549>] rest_init+0x49/0x50
       [<c0427a9a>] start_kernel+0x2ea/0x370
       [<00000000>] 0x0
       [<ffffffff>] 0xffffffff

other info that might help us debug this:

1 lock held by swapper/0:
 #0:  (slock-AF_AX25){-+..}, at: [<f91dbabc>] ax25_std_heartbeat_expiry+0x1c/0xe0 [ax25]

stack backtrace:
Pid: 0, comm: swapper Not tainted 2.6.24 #3
 [<c01053da>] show_trace_log_lvl+0x1a/0x30
 [<c0105e12>] show_trace+0x12/0x20
 [<c01067cc>] dump_stack+0x6c/0x80
 [<c014a32f>] print_circular_bug_tail+0x6f/0x80
 [<c014c6f1>] __lock_acquire+0xa71/0x10d0
 [<c014cdd1>] lock_acquire+0x81/0xa0
 [<c0328143>] _spin_lock_bh+0x33/0x60
 [<f91dd3b1>] ax25_destroy_socket+0x171/0x1f0 [ax25]
 [<f91dbaf3>] ax25_std_heartbeat_expiry+0x53/0xe0 [ax25]
 [<f91dc5ab>] ax25_heartbeat_expiry+0x1b/0x40 [ax25]
 [<c01325dd>] run_timer_softirq+0x15d/0x1c0
 [<c012e343>] __do_softirq+0x93/0x120
 [<c012e427>] do_softirq+0x57/0x60
 [<c012e868>] irq_exit+0x48/0x60
 [<c0119b3b>] smp_apic_timer_interrupt+0x5b/0x90
 [<c0104e27>] apic_timer_interrupt+0x33/0x38
 [<c0102512>] mwait_idle+0x12/0x20
 [<c0102631>] cpu_idle+0x71/0xc0
 [<c0325549>] rest_init+0x49/0x50
 [<c0427a9a>] start_kernel+0x2ea/0x370
 [<00000000>] 0x0
 =======================

^ permalink raw reply

* Re: [PATCH][AX25] ax25_ds_timer: use mod_timer instead of add_timer
From: Jarek Poplawski @ 2008-02-09 19:39 UTC (permalink / raw)
  To: Bernard Pidoux F6BVP
  Cc: Ralf Baechle DL5RB, Jann Traschewski, Linux Netdev List
In-Reply-To: <47ADF4A2.6070705@free.fr>

On Sat, Feb 09, 2008 at 07:44:50PM +0100, Bernard Pidoux F6BVP wrote:
> Hi,
>
> With AX25 patches applied I still get this possible circular locking  
> message.

Hi Bernard,

Could you confirm which exactly patches did you try? Is this vanilla
2.6.24 plus these two: ax25_timer and ax25_ds_timer or something more?
And I'm not sure what do you mean by "still": the warning came back
just after these last patches? At least these timer patches don't seem
to change anything around locking?

Thanks for testing this,
Jarek P.

^ 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