Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] Optimize cxgb3 xmit path (a bit)
From: Krishna Kumar2 @ 2008-01-30  7:05 UTC (permalink / raw)
  To: jeff; +Cc: davem, netdev
In-Reply-To: <20080130070016.29078.94125.sendpatchset@N20wks267652wss.in.ibm.com>

I forgot to mention but the patch is only compile tested as I don't have
hardware to test it.

Krishna Kumar2/India/IBM@IBMIN wrote on 01/30/2008 12:30:16 PM:

> Changes:
>    1. Add common code for stopping queue.
>    2. No need to call netif_stop_queue followed by netif_wake_queue (and
>       infact a netif_start_queue could have been used instead), instead
>       call stop_queue if required, and remove code under USE_GTS macro.
>    3. There is no need to check for netif_queue_stopped, as the network
>       core guarantees that for us (I am sure every driver could remove
>       that check, eg e1000 - I have tested that path a few billion times
>       with about a few hundred thousand qstops but the condition never
>       hit even once).
>
> Thanks,
>
> - KK
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
> ---
>  sge.c |   35 +++++++++++++++--------------------
>  1 files changed, 15 insertions(+), 20 deletions(-)
>
> diff -ruNp a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
> --- a/drivers/net/cxgb3/sge.c   2008-01-30 11:42:39.000000000 +0530
> +++ b/drivers/net/cxgb3/sge.c   2008-01-30 12:15:28.000000000 +0530
> @@ -1059,6 +1059,14 @@ static void write_tx_pkt_wr(struct adapt
>            htonl(V_WR_TID(q->token)));
>  }
>
> +static inline void t3_stop_queue(struct net_device *dev, struct sge_qset
*qs,
> +             struct sge_txq *q)
> +{
> +   netif_stop_queue(dev);
> +   set_bit(TXQ_ETH, &qs->txq_stopped);
> +   q->stops++;
> +}
> +
>  /**
>   *   eth_xmit - add a packet to the Ethernet Tx queue
>   *   @skb: the packet
> @@ -1090,31 +1098,18 @@ int t3_eth_xmit(struct sk_buff *skb, str
>     ndesc = calc_tx_descs(skb);
>
>     if (unlikely(credits < ndesc)) {
> -      if (!netif_queue_stopped(dev)) {
> -         netif_stop_queue(dev);
> -         set_bit(TXQ_ETH, &qs->txq_stopped);
> -         q->stops++;
> -         dev_err(&adap->pdev->dev,
> -            "%s: Tx ring %u full while queue awake!\n",
> -            dev->name, q->cntxt_id & 7);
> -      }
> +      t3_stop_queue(dev, qs, q);
> +      dev_err(&adap->pdev->dev,
> +         "%s: Tx ring %u full while queue awake!\n",
> +         dev->name, q->cntxt_id & 7);
>        spin_unlock(&q->lock);
>        return NETDEV_TX_BUSY;
>     }
>
>     q->in_use += ndesc;
> -   if (unlikely(credits - ndesc < q->stop_thres)) {
> -      q->stops++;
> -      netif_stop_queue(dev);
> -      set_bit(TXQ_ETH, &qs->txq_stopped);
> -#if !USE_GTS
> -      if (should_restart_tx(q) &&
> -          test_and_clear_bit(TXQ_ETH, &qs->txq_stopped)) {
> -         q->restarts++;
> -         netif_wake_queue(dev);
> -      }
> -#endif
> -   }
> +   if (unlikely(credits - ndesc < q->stop_thres))
> +      if (USE_GTS || !should_restart_tx(q))
> +         t3_stop_queue(dev, qs, q);
>
>     gen = q->gen;
>     q->unacked += ndesc;


^ permalink raw reply

* [PATCH] Optimize cxgb3 xmit path (a bit)
From: Krishna Kumar @ 2008-01-30  7:00 UTC (permalink / raw)
  To: jeff; +Cc: netdev, davem, Krishna Kumar

Changes:
	1. Add common code for stopping queue.
	2. No need to call netif_stop_queue followed by netif_wake_queue (and
	   infact a netif_start_queue could have been used instead), instead
	   call stop_queue if required, and remove code under USE_GTS macro.
	3. There is no need to check for netif_queue_stopped, as the network
	   core guarantees that for us (I am sure every driver could remove
	   that check, eg e1000 - I have tested that path a few billion times
	   with about a few hundred thousand qstops but the condition never
	   hit even once).

Thanks,

- KK

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
 sge.c |   35 +++++++++++++++--------------------
 1 files changed, 15 insertions(+), 20 deletions(-)

diff -ruNp a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
--- a/drivers/net/cxgb3/sge.c	2008-01-30 11:42:39.000000000 +0530
+++ b/drivers/net/cxgb3/sge.c	2008-01-30 12:15:28.000000000 +0530
@@ -1059,6 +1059,14 @@ static void write_tx_pkt_wr(struct adapt
 			 htonl(V_WR_TID(q->token)));
 }
 
+static inline void t3_stop_queue(struct net_device *dev, struct sge_qset *qs,
+				 struct sge_txq *q)
+{
+	netif_stop_queue(dev);
+	set_bit(TXQ_ETH, &qs->txq_stopped);
+	q->stops++;
+}
+
 /**
  *	eth_xmit - add a packet to the Ethernet Tx queue
  *	@skb: the packet
@@ -1090,31 +1098,18 @@ int t3_eth_xmit(struct sk_buff *skb, str
 	ndesc = calc_tx_descs(skb);
 
 	if (unlikely(credits < ndesc)) {
-		if (!netif_queue_stopped(dev)) {
-			netif_stop_queue(dev);
-			set_bit(TXQ_ETH, &qs->txq_stopped);
-			q->stops++;
-			dev_err(&adap->pdev->dev,
-				"%s: Tx ring %u full while queue awake!\n",
-				dev->name, q->cntxt_id & 7);
-		}
+		t3_stop_queue(dev, qs, q);
+		dev_err(&adap->pdev->dev,
+			"%s: Tx ring %u full while queue awake!\n",
+			dev->name, q->cntxt_id & 7);
 		spin_unlock(&q->lock);
 		return NETDEV_TX_BUSY;
 	}
 
 	q->in_use += ndesc;
-	if (unlikely(credits - ndesc < q->stop_thres)) {
-		q->stops++;
-		netif_stop_queue(dev);
-		set_bit(TXQ_ETH, &qs->txq_stopped);
-#if !USE_GTS
-		if (should_restart_tx(q) &&
-		    test_and_clear_bit(TXQ_ETH, &qs->txq_stopped)) {
-			q->restarts++;
-			netif_wake_queue(dev);
-		}
-#endif
-	}
+	if (unlikely(credits - ndesc < q->stop_thres))
+		if (USE_GTS || !should_restart_tx(q))
+			t3_stop_queue(dev, qs, q);
 
 	gen = q->gen;
 	q->unacked += ndesc;

^ permalink raw reply

* Re: [RFC/PATCH] e100 driver didn't support any MII-less PHYs...
From: Andreas Mohr @ 2008-01-30  6:49 UTC (permalink / raw)
  To: Kok, Auke; +Cc: andi, e1000-devel, netdev, linux-kernel, bunk
In-Reply-To: <479FB225.7090604@intel.com>

Hi,

On Tue, Jan 29, 2008 at 03:09:25PM -0800, Kok, Auke wrote:
> Andreas Mohr wrote:
> > Perhaps it's useful to file a bug/patch
> > on http://sourceforge.net/projects/e1000/ ? Perhaps -mm testing?
> 
> I wanted to push this though our testing labs first which has not happened due to
> time constraints - that should quickly at least confirm that the most common nics
> work OK after the change with your patch. I'll try and see if we can get this
> testing done soon.

Oh, full-scale regression testing even? Nice idea...
Would optionally be even better if during hardware tests one could also
dig out some i82503-based card (or additional MII-less cards?)
since I didn't really make any effort yet to try to make them all
recognized/supported by my patch already (would have been out of scope anyway
since I have this single card only).

Thanks a lot,

Andreas Mohr

^ permalink raw reply

* [PATCH] Debugfs compile fix.
From: Denis V. Lunev @ 2008-01-30  6:40 UTC (permalink / raw)
  To: greg, davem; +Cc: randy.dunlap, netdev, linux-kernel, Denis V. Lunev

Debugfs is not compiled without CONFIG_SYSFS in net-2.6 tree. Move
kobject_create_and_add under appropriate ifdef. The fix looks correct
from a first glance, but may be the dependency should be added into
the Kconfig.

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/debugfs/inode.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index d26e282..61cc937 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -432,9 +432,11 @@ static int __init debugfs_init(void)
 {
 	int retval;
 
+#ifdef CONFIG_SYSFS
 	debug_kobj = kobject_create_and_add("debug", kernel_kobj);
 	if (!debug_kobj)
 		return -EINVAL;
+#endif
 
 	retval = register_filesystem(&debug_fs_type);
 	if (retval)
-- 
1.5.3.rc5


^ permalink raw reply related

* Re: [PATCH] net: NEWEMAC: Remove "rgmii-interface" from rgmii  matching table
From: Stefan Roese @ 2008-01-30  6:16 UTC (permalink / raw)
  To: linuxppc-dev, benh; +Cc: Josh Boyer, netdev
In-Reply-To: <20080116090110.1b7b2f00@zod.rchland.ibm.com>

On Wednesday 16 January 2008, Josh Boyer wrote:
> On Wed, 16 Jan 2008 20:53:59 +1100
>
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > On Wed, 2008-01-16 at 10:37 +0100, Stefan Roese wrote:
> > > With the removal the the "rgmii-interface" device_type property from
> > > the dts files, the newemac driver needs an update to only rely on
> > > compatible property.
> > >
> > > Signed-off-by: Stefan Roese <sr@denx.de>
> >
> > I need to test if it works on CAB, can't change the DT on those. I'll
> > let you know tomorrow.
>
> This should be fine on CAB.  The rgmii node has:
>
> compatible = "ibm,rgmii-axon", "ibm,rgmii"
>
> so the match should still catch on the latter.

How about this patch? Ben, if you think this is ok then we should make sure 
that it goes in in this merge-window, since the other dts patch relies on it.

Thanks.

Best regards,
Stefan

^ permalink raw reply

* Re: [PATCH 7/7][BNX2]: Update version to 1.7.3.
From: David Miller @ 2008-01-30  5:39 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1201652437.19087.16.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:20:37 -0800

> [BNX2]: Update version to 1.7.3.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Also applied, thanks Michael.

^ permalink raw reply

* Re: [PATCH 6/7][BNX2]: Update firmware.
From: David Miller @ 2008-01-30  5:38 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1201652420.19087.15.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:20:20 -0800

> [BNX2]: Update firmware.
> 
> Update firmware to support programmable flow control.
>  
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH 5/7][BNX2]: Fine-tune flow control on 5709.
From: David Miller @ 2008-01-30  5:37 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1201652400.19087.14.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:20:00 -0800

> [BNX2]: Fine-tune flow control on 5709.
> 
> Make use of the programmable high/low water marks in 5709 for
> 802.3 flow control.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH 4/7][BNX2]: Remove CTX_WR macro.
From: David Miller @ 2008-01-30  5:35 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1201652387.19087.13.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:19:47 -0800

> [BNX2]: Remove CTX_WR macro.
> 
> The CTX_WR macro is unnecessary and obfuscates the code. 
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH 3/7][BNX2]: Remove REG_WR_IND/REG_RD_IND macros.
From: David Miller @ 2008-01-30  5:35 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1201652373.19087.12.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:19:33 -0800

> [BNX2]: Remove REG_WR_IND/REG_RD_IND macros.
> 
> The REG_WR_IND/REG_RD_IND macros are unnecessary and obfuscate the
> code.  Many callers to these macros read and write shared memory from
> the bp->shmem_base, so we add 2 similar functions that automatically
> add the shared memory base.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Nice cleanup, applied.

^ permalink raw reply

* Re: [BUILD FAILURE]2.6.24-git6 build failure on sis190 ethernet driver
From: Sam Ravnborg @ 2008-01-30  5:34 UTC (permalink / raw)
  To: Kamalesh Babulal; +Cc: LKML, netdev, romieu, Andy Whitcroft
In-Reply-To: <479FF1F0.10907@linux.vnet.ibm.com>

On Wed, Jan 30, 2008 at 09:11:36AM +0530, Kamalesh Babulal wrote:
> Hi,
> 
> The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure
> 
> drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict
> make[2]: *** [drivers/net/sis190.o] Error 1
> 
> # gcc --version (machine1)
> gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
> 
> # gcc --version (machine2)
> gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)

Hi Kamalesh

I know another patch is circulating, but please try the following.
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index b570402..0a5e024 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1556,7 +1556,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
 static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
 						   struct net_device *dev)
 {
-	static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
+	static const u16 __devinitconst ids[] = { 0x0965, 0x0966, 0x0968 };
 	struct sis190_private *tp = netdev_priv(dev);
 	struct pci_dev *isa_bridge;
 	u8 reg, tmp8;

It is the better fix if you can confirm it working.
The section conflict issued by gcc happens because we try to
mix const and non-const data in the same section.

	Sam

^ permalink raw reply related

* Re: [PATCH 2/7][BNX2]: Refine tx coalescing setup.
From: David Miller @ 2008-01-30  5:34 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1201652349.19087.11.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:19:09 -0800

> [BNX2]: Refine tx coalescing setup. 
> 
> Make the tx coalescing setup code independent of the MSIX vector.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/7][BNX2]: Fix 5706 serdes link down bug.
From: David Miller @ 2008-01-30  5:33 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1201652325.19087.10.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:18:45 -0800

> [BNX2]: Fix 5706 serdes link down bug.
> 
> 1. Correct the MII expansion serdes control register definition.
> 2. Check an additional RUDI_INVALID bit when determining 5706S link.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply

* Re: pull request: wireless-2.6 'rndis' 2008-01-29
From: David Miller @ 2008-01-30  5:26 UTC (permalink / raw)
  To: linville; +Cc: jeff, netdev, linux-wireless
In-Reply-To: <20080129212813.GB3180@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Tue, 29 Jan 2008 16:28:13 -0500

> Dave,
> 
> RNDIS is a de facto standard from Microsoft for USB networking devices.
> We already have support for ethernet devices, but wireless devices exist
> as well.  This series applies some fixes to the current ethernet RNDIS
> stuff to co-exist with wireless and adds a wireless RNDIS driver.  I
> would like to see it in 2.6.25.

Pulled and pushed out to net-2.6, thanks John.

I'm going to review these bits a little bit (as well as the
other merge you just made) before pushing it all out to
Linus.

Thanks!

^ permalink raw reply

* net-2.6.25 is no more...
From: David Miller @ 2008-01-30  5:22 UTC (permalink / raw)
  To: netdev


Now that the bulk has been merged over and we are
actively working alongside Linus's tree I have moved
all current patch applying to net-2.6 instead of net-2.6.25,
so the current tree to use is:

	kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git

Thanks.

^ permalink raw reply

* Re: [PATCH 0/6] PS3: gelic: gelic updates for 2.6.25
From: Masakazu Mokuno @ 2008-01-30  5:21 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: netdev, Linux/PPC Development, geoffrey.levand,
	Geert Uytterhoeven
In-Reply-To: <20071213181146.BF69.MOKUNO@sm.sony.co.jp>

Hi Jeff,

The patch set I posted on Dec 13 2007 (except v2 of #6) have been
reviewed on the ML and seems to have no more outstanding
comments/requests.
http://marc.info/?l=linux-netdev&m=119754603814092


Is it OK to apply for 2.6.25?  If OK, I'll ask Paul to merge this set
into the powerpc tree with my wireless patch because the dependent patch
set will go into the tree.

best regards

-- 
Masakazu MOKUNO


^ permalink raw reply

* Re: pull request: wireless-2.6 'upstream' 2008-01-29
From: David Miller @ 2008-01-30  5:21 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20080129212703.GA3180-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>

From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Date: Tue, 29 Jan 2008 16:27:03 -0500

> Here are some stragglers for 2.6.25.  Most of them are fixes for the
> new stuff anyway -- I don't think there is anything convroversial.
> 
> Please let me know if there are problems!

Pulled and pushed back out to net-2.6, thanks John.

^ permalink raw reply

* Re: [PATCH 6/7][BNX2]: Update firmware.
From: David Miller @ 2008-01-30  5:16 UTC (permalink / raw)
  To: mchan; +Cc: max, netdev
In-Reply-To: <1201660196.19087.29.camel@dell>

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 18:29:56 -0800

> Didn't we beat this topic to death last time?

Yes we did.

> Once again, the driver is tightly coupled with the firmware.  We don't
> want things to break when users upgrade or downgrade the kernel.  Coding
> the driver to deal with different firmware versions will add a lot of
> complexity.

I absolutely agree with Michael here.

^ permalink raw reply

* Re: [PATCH retry] bluetooth : add conn add/del workqueues to avoid connection fail
From: David Miller @ 2008-01-30  5:14 UTC (permalink / raw)
  To: hidave.darkstar; +Cc: netdev, marcel, linux-kernel, bluez-devel
In-Reply-To: <20080130022354.GA3132@darkstar.te-china.tietoenator.com>

From: Dave Young <hidave.darkstar@gmail.com>
Date: Wed, 30 Jan 2008 10:23:54 +0800

> 
> The bluetooth hci_conn sysfs add/del executed in the default workqueue.
> If the del_conn is executed after the new add_conn with same target,
> add_conn will failed with warning of "same kobject name".
> 
> Here add btaddconn & btdelconn workqueues,
> flush the btdelconn workqueue in the add_conn function to avoid the issue.
> 
> Signed-off-by: Dave Young <hidave.darkstar@gmail.com> 

This looks good, applied, thanks Dave.

I've queued this up for 2.6.25 merging, if you want me to
schedule it for -stable, just let me know.

Thanks again.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply

* Re: ipcomp regression in 2.6.24
From: David Miller @ 2008-01-30  5:12 UTC (permalink / raw)
  To: herbert; +Cc: pupilla, Daniel.Beschorner, netdev
In-Reply-To: <E1JK3QD-0006hM-00@gondolin.me.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 30 Jan 2008 14:15:33 +1100

> Marco Berizzi <pupilla@hotmail.com> wrote:
> >
> >> > With 2.6.24 IPSEC/ESP tunnels to older kernels establish fine, data
> >> > flows in both directions, but no data comes out of the tunnel.
> >> > Needed to disable ipcomp.
> > 
> > Same problem here: linux 2.6.24 driven by openswan 2.4.11
> > on Slackware 11.0
> 
> My bad.  This patch should fix it.
> 
> [IPCOMP]: Fetch nexthdr before ipch is destroyed
> 
> When I moved the nexthdr setting out of IPComp I accidently moved
> the reading of ipch->nexthdr after the decompression.  Unfortunately
> this means that we'd be reading from a stale ipch pointer which
> doesn't work very well.
> 
> This patch moves the reading up so that we get the correct nexthdr
> value.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied, and queued for -stable, thanks!

^ permalink raw reply

* Re: [BUILD FAILURE]2.6.24-git6 build failure on sis190 ethernet driver
From: Gabriel C @ 2008-01-30  4:43 UTC (permalink / raw)
  To: Kamalesh Babulal; +Cc: LKML, netdev, romieu, Andy Whitcroft
In-Reply-To: <479FF1F0.10907@linux.vnet.ibm.com>

Kamalesh Babulal wrote:
> Hi,
> 
> The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure
> 
> drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict
> make[2]: *** [drivers/net/sis190.o] Error 1
> 
> # gcc --version (machine1)
> gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
> 
> # gcc --version (machine2)
> gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
> 

Heh :) vger.kernel.org does not like emails directly from gmail , it seems =)

( sorry for sending this 3 time now )

The following patch should fix the build failure.

diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index b570402..e48e4ad 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -326,7 +326,7 @@ static const struct {
 	{ "SiS 191 PCI Gigabit Ethernet adapter" },
 };
 
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static const struct pci_device_id sis190_pci_tbl[] __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },


Gabriel

^ permalink raw reply related

* [BUILD FAILURE]2.6.24-git6 build failure on sis190 ethernet driver
From: Kamalesh Babulal @ 2008-01-30  3:41 UTC (permalink / raw)
  To: LKML, netdev, romieu, Andy Whitcroft

Hi,

The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure

drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict
make[2]: *** [drivers/net/sis190.o] Error 1

# gcc --version (machine1)
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)

# gcc --version (machine2)
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)

-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

^ permalink raw reply

* Re: sis190 build breakage
From: Sam Ravnborg @ 2008-01-30  3:28 UTC (permalink / raw)
  To: Francois Romieu; +Cc: maximilian attems, netdev
In-Reply-To: <20080129220310.GC15445@electric-eye.fr.zoreil.com>

On Tue, Jan 29, 2008 at 11:03:10PM +0100, Francois Romieu wrote:
> maximilian attems <max@stro.at> :
> >   CC [M]  drivers/net/sis190.o
> >   drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict
> >   make[5]: *** [drivers/net/sis190.o] Error 1
> > 
> > gcc --version
> > gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Looks like a bug where __initdata has been used
for const data.
Searching:
static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
                                                  struct net_device *dev)
{
        static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
        struct sis190_private *tp = netdev_priv(dev);
        struct pci_dev *isa_bridge;
        u8 reg, tmp8;

Try to change this is __initconst and it should be fixed.

	Sam

^ permalink raw reply

* Re: ipcomp regression in 2.6.24
From: Herbert Xu @ 2008-01-30  3:15 UTC (permalink / raw)
  To: davem, Marco Berizzi; +Cc: Daniel.Beschorner, netdev
In-Reply-To: <BAY103-DAV76D55A34FB3E0924FF49AB2350@phx.gbl>

Marco Berizzi <pupilla@hotmail.com> wrote:
>
>> > With 2.6.24 IPSEC/ESP tunnels to older kernels establish fine, data
>> > flows in both directions, but no data comes out of the tunnel.
>> > Needed to disable ipcomp.
> 
> Same problem here: linux 2.6.24 driven by openswan 2.4.11
> on Slackware 11.0

My bad.  This patch should fix it.

[IPCOMP]: Fetch nexthdr before ipch is destroyed

When I moved the nexthdr setting out of IPComp I accidently moved
the reading of ipch->nexthdr after the decompression.  Unfortunately
this means that we'd be reading from a stale ipch pointer which
doesn't work very well.

This patch moves the reading up so that we get the correct nexthdr
value.

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

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index f4af99a..b79cdbe 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -74,6 +74,7 @@ out:
 
 static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb)
 {
+	int nexthdr;
 	int err = -ENOMEM;
 	struct ip_comp_hdr *ipch;
 
@@ -84,13 +85,15 @@ static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb)
 
 	/* Remove ipcomp header and decompress original payload */
 	ipch = (void *)skb->data;
+	nexthdr = ipch->nexthdr;
+
 	skb->transport_header = skb->network_header + sizeof(*ipch);
 	__skb_pull(skb, sizeof(*ipch));
 	err = ipcomp_decompress(x, skb);
 	if (err)
 		goto out;
 
-	err = ipch->nexthdr;
+	err = nexthdr;
 
 out:
 	return err;
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index b276d04..710325e 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -64,6 +64,7 @@ static LIST_HEAD(ipcomp6_tfms_list);
 
 static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
 {
+	int nexthdr;
 	int err = -ENOMEM;
 	struct ip_comp_hdr *ipch;
 	int plen, dlen;
@@ -79,6 +80,8 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
 
 	/* Remove ipcomp header and decompress original payload */
 	ipch = (void *)skb->data;
+	nexthdr = ipch->nexthdr;
+
 	skb->transport_header = skb->network_header + sizeof(*ipch);
 	__skb_pull(skb, sizeof(*ipch));
 
@@ -108,7 +111,7 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
 	skb->truesize += dlen - plen;
 	__skb_put(skb, dlen - plen);
 	skb_copy_to_linear_data(skb, scratch, dlen);
-	err = ipch->nexthdr;
+	err = nexthdr;
 
 out_put_cpu:
 	put_cpu();

^ permalink raw reply related

* Re: [Bugme-new] [Bug 9825] New: GPF in kernel when /sbin/ss used for display DCCP sockets.
From: Herbert Xu @ 2008-01-30  2:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: netdev, bugme-daemon, spike
In-Reply-To: <20080126223330.204e1bd1.akpm@linux-foundation.org>

Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> Jan 26 23:38:03 host general protection fault: 0000 [#1] PREEMPT
>> Jan 26 23:38:03 host Modules linked in: iptable_mangle iptable_nat nf_nat
>> ipt_REJECT xt_tcpudp nf_conntrack_ipv4 xt_state ipt_ULOG iptable_filter
>> ip_tables x_
>> Jan 26 23:38:03 host
>> Jan 26 23:38:03 host Pid: 5573, comm: ss Not tainted (2.6.24 #1)
>> Jan 26 23:38:03 host EIP: 0060:[<c031a14f>] EFLAGS: 00010282 CPU: 0
>> Jan 26 23:38:03 host EIP is at inet_diag_dump+0x2a/0x88b

This should be fixed by

	[PATCH][INET_DIAG]: Fix inet_diag_lock_handler error path
	20080128022050.GQ27661@ghostprotocols.net

that Arnaldo posted recently.

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


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