Netdev List
 help / color / mirror / Atom feed
* [PATCH 3/4] [IPV6]: Just increment OutDatagrams once per a datagram.
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-09-13  0:30 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 4210951..c347f3e 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -555,6 +555,8 @@ static int udp_v6_push_pending_frames(struct sock *sk)
 out:
 	up->len = 0;
 	up->pending = 0;
+	if (!err)
+		UDP6_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, up->pcflag);
 	return err;
 }
 
@@ -823,10 +825,8 @@ do_append_data:
 	release_sock(sk);
 out:
 	fl6_sock_release(flowlabel);
-	if (!err) {
-		UDP6_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, is_udplite);
+	if (!err)
 		return len;
-	}
 	/*
 	 * ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space.  Reporting
 	 * ENOBUFS might not be good (it's not tunable per se), but otherwise

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply related

* [PATCH 4/4] [IPV4]: Just increment OutDatagrams once per a datagram.
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-09-13  0:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

---
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index facb7e2..ccb67f3 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -504,6 +504,8 @@ send:
 out:
 	up->len = 0;
 	up->pending = 0;
+	if (!err)
+		UDP_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, up->pcflag);
 	return err;
 }
 
@@ -692,10 +694,8 @@ out:
 	ip_rt_put(rt);
 	if (free)
 		kfree(ipc.opt);
-	if (!err) {
-		UDP_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, is_udplite);
+	if (!err)
 		return len;
-	}
 	/*
 	 * ENOBUFS = no kernel mem, SOCK_NOSPACE = no sndbuf space.  Reporting
 	 * ENOBUFS might not be good (it's not tunable per se), but otherwise

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply related

* Re: [PATCH 1/4] [IPV6]: Fix unbalanced socket reference with MSG_CONFIRM.
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-09-13  0:35 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji
In-Reply-To: <20070913.093039.76110425.yoshfuji@linux-ipv6.org>

| [PATCH 1/4] [IPV6]: Fix unbalanced socket reference with MSG_CONFIRM.

Ah, I should say, socket locking, probably...
Anyway, lock_sock() and release_sock() are not paired approriately.

--yoshfuji

^ permalink raw reply

* Re: [PATCH][MIPS][7/7] AR7: ethernet
From: Thiemo Seufer @ 2007-09-13  1:42 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Matteo Croce, linux-mips, Eugene Konev, netdev, davem, kuznet,
	pekkas, jmorris, yoshfuji, kaber, openwrt-devel, Andrew Morton,
	Jeff Garzik
In-Reply-To: <20070912165029.GG4571@linux-mips.org>

Ralf Baechle wrote:
> On Sat, Sep 08, 2007 at 02:23:00AM +0200, Matteo Croce wrote:
[snip]
> > +/* Register definitions */
> > +struct cpmac_control_regs {
> > +	u32 revision;
> > +	u32 control;
> > +	u32 teardown;
> > +	u32 unused;
> > +} __attribute__ ((packed));
> > +
> > +struct cpmac_int_regs {
> > +	u32 stat_raw;
> > +	u32 stat_masked;
> > +	u32 enable;
> > +	u32 clear;
> > +} __attribute__ ((packed));
> > +
> > +struct cpmac_stats {
> > +	u32 good;
> > +	u32 bcast;
> > +	u32 mcast;
> > +	u32 pause;
> > +	u32 crc_error;
> > +	u32 align_error;
> > +	u32 oversized;
> > +	u32 jabber;
> > +	u32 undersized;
> > +	u32 fragment;
> > +	u32 filtered;
> > +	u32 qos_filtered;
> > +	u32 octets;
> > +} __attribute__ ((packed));
> 
> All struct members here are sized such that there is no padding needed, so
> the packed attribute doesn't buy you anything - unless of course the
> entire structure is missaligned but I don't see how that would be possible
> in this driver so the __attribute__ ((packed)) should go - it result in
> somwhat larger and slower code.

FWIW, a modern gcc will warn about such superfluous packed attributes,
that's another reason to remove those.


Thiemo

^ permalink raw reply

* Re: [PATCH] e100: timer power saving
From: Jeff Garzik @ 2007-09-13  3:45 UTC (permalink / raw)
  To: Auke Kok; +Cc: netdev, shemminger, arjan
In-Reply-To: <20070906185137.30733.99594.stgit@localhost.localdomain>

Auke Kok wrote:
> From: Stephen Hemminger <shemminger@linux-foundation.org>
> 
> Since E100 timer is 2HZ, use rounding to make timer occur on the
> correct boundary.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>

applied



^ permalink raw reply

* Re: [PATCH 1/7 RESEND] cxgb3 - Firmware update
From: Jeff Garzik @ 2007-09-13  3:54 UTC (permalink / raw)
  To: Divy Le Ray; +Cc: netdev, linux-kernel, swise
In-Reply-To: <20070905225809.17217.20773.stgit@speedy5>

Divy Le Ray wrote:
> From: Divy Le Ray <divy@chelsio.com>
> 
> Update firmware version.
> Allow the driver to be up and running with older FW image
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>

applied 1-7



^ permalink raw reply

* Re: [NET] sgiseeq: replace use of dma_cache_wback_inv
From: Jeff Garzik @ 2007-09-13  3:54 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Andrew Morton, netdev
In-Reply-To: <20070904134101.GA20191@linux-mips.org>

Ralf Baechle wrote:
> The sgiseeq driver is one of the few remaining users of the ancient
> cache banging DMA API.  Replaced with the modern days DMA API.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

applied



^ permalink raw reply

* Re: [PATCH, 2nd try] remove setup of platform device from jazzsonic.c
From: Jeff Garzik @ 2007-09-13  3:57 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: akpm, netdev
In-Reply-To: <20070908194649.GB7427@alpha.franken.de>

Thomas Bogendoerfer wrote:
> remove setup platform device from jazzsonic, which is done in arch code now
> 
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

applied



^ permalink raw reply

* Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...
From: Jeff Garzik @ 2007-09-13  3:58 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Andrew Morton, netdev, linux-mips, linux-kernel
In-Reply-To: <Pine.LNX.4.64N.0709101310030.25038@blysk.ds.pg.gda.pl>

Maciej W. Rozycki wrote:
>  Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
> kcalloc().  Also reformat the surrounding clutter.
> 
> Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
> ---
>  Per your request, Andrew, a while ago.  It builds, runs, passes 
> checkpatch.pl and sparse.  No semantic changes.
> 
>  Please apply,
> 
>   Maciej

ACK, but patch does not apply cleanly to netdev-2.6.git#upstream (nor -mm)



^ permalink raw reply

* Re: [PATCH 2.6.18-rc6 1/2] dllink driver: porting v1.19 to linux 2.6.18-rc6
From: Jeff Garzik @ 2007-09-13  4:00 UTC (permalink / raw)
  To: Hayim Shaul; +Cc: Jeff Garzik, netdev, edward_peng, linux-kernel
In-Reply-To: <1157620189.2904.16.camel@localhost.localdomain>

Hayim Shaul wrote:
> Description:
> For DLink Fiber NIC, Linux 2.4.22 ships with driver version 1.19,
> whereas, Linux 2.6.x ship with driver version 1.17.
> 
> The following patch upgrades the 2.6.x driver to include changes (and
> bug fixes done until 1.19b).
> 
> These fixes are (copied from the driver):
>     1.18    2002/11/07  New tx scheme, adaptive tx_coalesce.
>                     Remove tx_coalesce option.
>     1.19    2003/12/16  Fix problem parsing the eeprom on big endian
>                     systems. (philt@4bridgeworks.com)
> 
> Disclaimer:
> Since I returned my DLink NIC to the store I couldn't test it
> thoroughly. It seemed to work just as well as v1.17. However, both
> version made the NIC hang after a few minutes.

Please update to the latest upstream kernel (2.6.22 or 2.6.23-rc).

Also, please make sure you do not back out changes included in the 
upstream kernel since 2.6.17.



^ permalink raw reply

* Re: [PATCH] sky2: restore multicast list on resume and other ops
From: Jeff Garzik @ 2007-09-13  4:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Timo Weingärtner, netdev, akpm
In-Reply-To: <20070905165619.093513af@oldman>

Stephen Hemminger wrote:
> Need to restore multicast settings on resume and after 'ethtool -r'.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

applied to #upstream-fixes



^ permalink raw reply

* Re: ne driver crashes when unloaded in 2.6.22.6
From: Dan Williams @ 2007-09-13  4:02 UTC (permalink / raw)
  To: Chris Rankin; +Cc: netdev
In-Reply-To: <313644.18131.qm@web52907.mail.re2.yahoo.com>

On Wed, 2007-09-12 at 19:23 +0100, Chris Rankin wrote:
> --- Dan Williams <dcbw@redhat.com> wrote:
> > > > Offhand question, does your ne2000 card support carrier detection?
> > > 
> > > Err... there is a /sys/class/net/eth0/carrier entry 
> > 
> > Does it read '0' when you unplug the cable?
> 
> Hmm, apparently not. The light on the card goes out though, so could this just be a lack of driver
> support?

Likely, yes.

dan


> Cheers,
> Chris
> 
> 
> 
>       ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
> now.
> http://uk.answers.yahoo.com/ 


^ permalink raw reply

* Re: [PATCH 2.6.24 1/5]S2io: Enable all the error and alarm indications
From: Jeff Garzik @ 2007-09-13  4:04 UTC (permalink / raw)
  To: Sivakumar Subramani; +Cc: netdev, support
In-Reply-To: <Pine.GSO.4.10.10709060618001.19944-100000@guinness>

Sivakumar Subramani wrote:
> - Added support to unmask entire set of device errors and alarams.
>         Alarm interrupts are generated for a myriad of purposes, ranging from
>   illegal operations or requests to internal state machine errors and
>   uncorrectable data corruption errors. In several cases the adapter can
>   recover gracefully from unexpected events; however, in some cases, a device
>   reset may be necessary. This patch handles alarms generated by all the
>   blocks within the device.
> 
>   The adapter generates the following types of alarms:
>         1. Link state transitions (local/remote fault) or other link-related
>            problems.
>         2. Problems with any device peripherals, including the EEPROM, FLASH,
>            etc.
>         3. Correctable ECC errors (single-bit errors) on internal data
>            structures or frame data.
>         4. Uncorrectable ECC errors (multi-bit errors) on internal data
>            structures or frame data.
>         5. State machine errors, which indicate that internal control
>            structures have become corrupted.
>         6. PCI related errors, including parity errors or illegal transactions.
>         7. Other unexpected events.
> 
> - Implemented Jeff's review comments to use do_s2io_write_bits function to avoid
>   duplicate codes.
> 
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>

applied 1-5 to #upstream (2.6.24)



^ permalink raw reply

* Re: [NET] Nuke SET_MODULE_OWNER macro
From: Jeff Garzik @ 2007-09-13  4:07 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: netdev, David S. Miller, Andrew Morton
In-Reply-To: <20070912164036.GB9615@linux-mips.org>

Ralf Baechle wrote:
> It's been a useless no-op for long enough in 2.6 so I figured it's time to
> remove it.  The number of people that could object because they're
> maintaining unified 2.4 and 2.6 drivers is probably rather small.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

applied



^ permalink raw reply

* Re: [PATCH 2/2] drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
From: Jeff Garzik @ 2007-09-13  4:10 UTC (permalink / raw)
  To: Denis Cheng
  Cc: Robert P. J. Day, David S. Miller, netdev, linux-kernel, cr_quan
In-Reply-To: <11887290302449-git-send-email-crquan@gmail.com>

Denis Cheng wrote:
> Signed-off-by: Denis Cheng <crquan@gmail.com>
> ---
>  drivers/net/apne.c                         |    2 +-
>  drivers/net/arm/am79c961a.c                |    2 +-
>  drivers/net/atarilance.c                   |    2 +-
>  drivers/net/atl1/atl1_hw.c                 |    2 +-
>  drivers/net/bnx2.c                         |    2 +-
>  drivers/net/cs89x0.c                       |    6 +++---
>  drivers/net/e1000/e1000_ethtool.c          |    3 +--
>  drivers/net/fec_8xx/fec_mii.c              |    5 ++---
>  drivers/net/ibm_emac/ibm_emac_debug.c      |    8 ++++----
>  drivers/net/irda/actisys-sir.c             |    2 +-
>  drivers/net/ixgb/ixgb_ethtool.c            |    3 +--
>  drivers/net/lp486e.c                       |    4 +---
>  drivers/net/mv643xx_eth.c                  |    3 +--
>  drivers/net/ne-h8300.c                     |    2 +-
>  drivers/net/ne.c                           |    2 +-
>  drivers/net/ne2.c                          |    2 +-
>  drivers/net/ne2k-pci.c                     |    2 +-
>  drivers/net/netxen/netxen_nic.h            |    2 +-
>  drivers/net/netxen/netxen_nic_hw.c         |    2 +-
>  drivers/net/pcmcia/axnet_cs.c              |    2 +-
>  drivers/net/pcmcia/pcnet_cs.c              |    4 ++--
>  drivers/net/phy/phy.c                      |    2 +-
>  drivers/net/skfp/smt.c                     |    2 +-
>  drivers/net/skfp/srf.c                     |    4 ++--
>  drivers/net/tulip/de4x5.c                  |    6 +++---
>  drivers/net/wireless/airo.c                |    6 +++---
>  drivers/net/wireless/hostap/hostap_ioctl.c |    6 +++---
>  drivers/net/wireless/ipw2100.c             |    7 +++----
>  drivers/net/wireless/libertas/fw.c         |    3 +--
>  drivers/net/wireless/libertas/main.c       |   14 +++++++-------
>  drivers/net/wireless/libertas/wext.c       |    4 ++--
>  drivers/net/wireless/netwave_cs.c          |    6 +++---
>  drivers/net/wireless/prism54/isl_ioctl.c   |    7 +++----
>  drivers/net/wireless/ray_cs.c              |    6 +++---
>  drivers/net/wireless/wavelan.c             |    6 +++---
>  drivers/net/wireless/wavelan_cs.c          |    6 +++---
>  drivers/net/wireless/wl3501_cs.c           |    2 +-
>  drivers/net/zorro8390.c                    |    2 +-
>  38 files changed, 71 insertions(+), 80 deletions(-)

applied



^ permalink raw reply

* Re: [PATCH] Fix a lock problem in generic phy code
From: Jeff Garzik @ 2007-09-13  4:12 UTC (permalink / raw)
  To: Hans-Jürgen Koch; +Cc: linux-kernel, netdev, afleming
In-Reply-To: <200708311430.09590.hjk@linutronix.de>

Hans-Jürgen Koch wrote:
> Lock debugging finds a problem in phy.c and phy_device.c,
> this patch fixes it. Tested on an AT91SAM9263-EK board, 
> kernel 2.6.23-rc4.
> 
> Signed-off-by: Hans J. Koch <hjk@linutronix.de>

applied



^ permalink raw reply

* Re: [PATCH 1/2][RESEND] ehea: propagate physical port state
From: Jeff Garzik @ 2007-09-13  4:14 UTC (permalink / raw)
  To: Jan-Bernd Themann
  Cc: netdev, Christoph Raisch, Jan-Bernd Themann, linux-kernel,
	linux-ppc, Marcus Eder, Thomas Klein, Stefan Roscher
In-Reply-To: <200709071230.18395.ossthema@de.ibm.com>

Jan-Bernd Themann wrote:
> Introduces a module parameter to decide whether the physical
> port link state is propagated to the network stack or not.
> It makes sense not to take the physical port state into account
> on machines with more logical partitions that communicate
> with each other. This is always possible no matter what the physical
> port state is. Thus eHEA can be considered as a switch there.
> 
> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>

applied 1-2



^ permalink raw reply

* Re: [PATCH 1/2] ethtool: add register dump support for intel 82575 chipsets (igb driver)
From: Jeff Garzik @ 2007-09-13  4:15 UTC (permalink / raw)
  To: Auke Kok; +Cc: davem, netdev, nicholas.d.nunley
In-Reply-To: <20070815174401.15938.53561.stgit@localhost.localdomain>

Auke Kok wrote:
> From: Nicholas Nunley <nicholas.d.nunley@intel.com>
> 
> Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> ---
> 
>  Makefile.am    |    2 
>  ethtool-util.h |    2 
>  ethtool.c      |    1 
>  igb.c          |  864 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 868 insertions(+), 1 deletions(-)

applied 1-2



^ permalink raw reply

* Re: [PATCH] spidernet: fix interrupt reason recognition
From: Jeff Garzik @ 2007-09-13  4:19 UTC (permalink / raw)
  To: Ishizaki Kou; +Cc: linas, netdev, cbe-oss-dev
In-Reply-To: <20070820.221327.-1300518791.kouish@swc.toshiba.co.jp>

Ishizaki Kou wrote:
> This patch solves a problem that the spidernet driver sometimes fails
> to handle IRQ.
> 
> The problem happens because,
> - In Cell architecture, interrupts may arrive at an interrupt
>   controller, even if they are masked by the setting on registers of
>   devices. It happens when interrupt packets are sent just before 
>   the interrupts are masked.
> - spidernet interrupt handler compares interrupt reasons with
>   interrupt masks, so when such interrupts occurs, spidernet interrupt
>   handler returns IRQ_NONE.
> - When all of interrupt handler return IRQ_NONE, linux kernel disables
>   the IRQ and it no longer delivers interrupts to the interrupt handlers.
> 
> spidernet doesn't work after above sequence, because it can't receive
> interrupts.
>  
> This patch changes spidernet interrupt handler that it compares
> interrupt reason with SPIDER_NET_INTX_MASK_VALUE.
> 
> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>

applied



^ permalink raw reply

* RE: [PATCH v3] Make the pr_*() family of macros in kernel.h complete
From: Joe Perches @ 2007-09-13  5:11 UTC (permalink / raw)
  To: Medve Emilian-EMMEDVE1; +Cc: linux-kernel, netdev, i2c, linux-omap-open-source
In-Reply-To: <598D5675D34BE349929AF5EDE9B03E27014F9FDA@az33exm24.fsl.freescale.net>

On Wed, 2007-09-12 at 11:44 -0700, Medve Emilian-EMMEDVE1 wrote:
> First, this patch doesn't have the trailing "\n" problem that one had.

I expect all the kernel logging functions to be
overhauled eventually.

I'd prefer a mechanism that somehow supports
identifying complete messages.  I think the new
pr_<level> functions are not particularly useful
without a mechanism to avoid or identify multiple
processors or threads interleaving partial in-progress
multiple statement messages.

I've got a very large patch series that converts _all_
the current single line messages that use KERN_<level>
to pr_<level> and identifies, prefixes and postfixes
the rest of the multiple source line messages.

At some point, sooner or later, the logging functions
will be improved.  Apparently, more likely later.

cheers, Joe


^ permalink raw reply

* [git patches] net driver fixes
From: Jeff Garzik @ 2007-09-13  5:30 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: netdev, LKML


Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus

to receive the following updates:

 drivers/net/atl1/atl1_main.c |   19 +++++++------------
 drivers/net/ehea/ehea.h      |    5 ++++-
 drivers/net/ehea/ehea_main.c |   16 ++++++++++++++--
 drivers/net/phy/phy.c        |    4 ++--
 drivers/net/phy/phy_device.c |    4 ++--
 drivers/net/sky2.c           |    9 ++++++++-
 drivers/net/spider_net.c     |   12 ++++--------
 7 files changed, 41 insertions(+), 28 deletions(-)

Hans-Jürgen Koch (1):
      Fix a lock problem in generic phy code

Ishizaki Kou (1):
      spidernet: fix interrupt reason recognition

Jan-Bernd Themann (2):
      ehea: propagate physical port state
      ehea: fix last_rx update

Luca Tettamanti (1):
      atl1: disable broken 64-bit DMA

Stephen Hemminger (1):
      sky2: restore multicast list on resume and other ops

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 3c1984e..f23e13c 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -2203,21 +2203,20 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
 	struct net_device *netdev;
 	struct atl1_adapter *adapter;
 	static int cards_found = 0;
-	bool pci_using_64 = true;
 	int err;
 
 	err = pci_enable_device(pdev);
 	if (err)
 		return err;
 
-	err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+	/*
+	 * 64-bit DMA currently has data corruption problems, so let's just
+	 * use 32-bit DMA for now.  This is a big hack that is probably wrong.
+	 */
+	err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 	if (err) {
-		err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
-		if (err) {
-			dev_err(&pdev->dev, "no usable DMA configuration\n");
-			goto err_dma;
-		}
-		pci_using_64 = false;
+		dev_err(&pdev->dev, "no usable DMA configuration\n");
+		goto err_dma;
 	}
 	/* Mark all PCI regions associated with PCI device
 	 * pdev as being reserved by owner atl1_driver_name
@@ -2282,7 +2281,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
 
 	netdev->ethtool_ops = &atl1_ethtool_ops;
 	adapter->bd_number = cards_found;
-	adapter->pci_using_64 = pci_using_64;
 
 	/* setup the private structure */
 	err = atl1_sw_init(adapter);
@@ -2299,9 +2297,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
 	 */
 	/* netdev->features |= NETIF_F_TSO; */
 
-	if (pci_using_64)
-		netdev->features |= NETIF_F_HIGHDMA;
-
 	netdev->features |= NETIF_F_LLTX;
 
 	/*
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index d67f97b..8d58be5 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -39,7 +39,7 @@
 #include <asm/io.h>
 
 #define DRV_NAME	"ehea"
-#define DRV_VERSION	"EHEA_0073"
+#define DRV_VERSION	"EHEA_0074"
 
 /* eHEA capability flags */
 #define DLPAR_PORT_ADD_REM 1
@@ -402,6 +402,8 @@ struct ehea_mc_list {
 
 #define EHEA_PORT_UP 1
 #define EHEA_PORT_DOWN 0
+#define EHEA_PHY_LINK_UP 1
+#define EHEA_PHY_LINK_DOWN 0
 #define EHEA_MAX_PORT_RES 16
 struct ehea_port {
 	struct ehea_adapter *adapter;	 /* adapter that owns this port */
@@ -427,6 +429,7 @@ struct ehea_port {
 	u32 msg_enable;
 	u32 sig_comp_iv;
 	u32 state;
+	u8 phy_link;
 	u8 full_duplex;
 	u8 autoneg;
 	u8 num_def_qps;
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index db57474..717b129 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -53,17 +53,21 @@ static int rq3_entries = EHEA_DEF_ENTRIES_RQ3;
 static int sq_entries = EHEA_DEF_ENTRIES_SQ;
 static int use_mcs = 0;
 static int num_tx_qps = EHEA_NUM_TX_QP;
+static int prop_carrier_state = 0;
 
 module_param(msg_level, int, 0);
 module_param(rq1_entries, int, 0);
 module_param(rq2_entries, int, 0);
 module_param(rq3_entries, int, 0);
 module_param(sq_entries, int, 0);
+module_param(prop_carrier_state, int, 0);
 module_param(use_mcs, int, 0);
 module_param(num_tx_qps, int, 0);
 
 MODULE_PARM_DESC(num_tx_qps, "Number of TX-QPS");
 MODULE_PARM_DESC(msg_level, "msg_level");
+MODULE_PARM_DESC(prop_carrier_state, "Propagate carrier state of physical "
+		 "port to stack. 1:yes, 0:no.  Default = 0 ");
 MODULE_PARM_DESC(rq3_entries, "Number of entries for Receive Queue 3 "
 		 "[2^x - 1], x = [6..14]. Default = "
 		 __MODULE_STRING(EHEA_DEF_ENTRIES_RQ3) ")");
@@ -467,7 +471,7 @@ static struct ehea_cqe *ehea_proc_rwqes(struct net_device *dev,
 			else
 				netif_receive_skb(skb);
 
-			dev->last_rx = jiffies;
+			port->netdev->last_rx = jiffies;
 		} else {
 			pr->p_stats.poll_receive_errors++;
 			port_reset = ehea_treat_poll_error(pr, rq, cqe,
@@ -814,7 +818,9 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
 			ehea_error("Failed setting port speed");
 		}
 	}
-	netif_carrier_on(port->netdev);
+	if (!prop_carrier_state || (port->phy_link == EHEA_PHY_LINK_UP))
+		netif_carrier_on(port->netdev);
+
 	kfree(cb4);
 out:
 	return ret;
@@ -869,13 +875,19 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe)
 			}
 
 		if (EHEA_BMASK_GET(NEQE_EXTSWITCH_PORT_UP, eqe)) {
+			port->phy_link = EHEA_PHY_LINK_UP;
 			if (netif_msg_link(port))
 				ehea_info("%s: Physical port up",
 					  port->netdev->name);
+			if (prop_carrier_state)
+				netif_carrier_on(port->netdev);
 		} else {
+			port->phy_link = EHEA_PHY_LINK_DOWN;
 			if (netif_msg_link(port))
 				ehea_info("%s: Physical port down",
 					  port->netdev->name);
+			if (prop_carrier_state)
+				netif_carrier_off(port->netdev);
 		}
 
 		if (EHEA_BMASK_GET(NEQE_EXTSWITCH_PRIMARY, eqe))
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index e323efd..0cc4369 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -755,7 +755,7 @@ out_unlock:
  */
 void phy_start(struct phy_device *phydev)
 {
-	spin_lock(&phydev->lock);
+	spin_lock_bh(&phydev->lock);
 
 	switch (phydev->state) {
 		case PHY_STARTING:
@@ -769,7 +769,7 @@ void phy_start(struct phy_device *phydev)
 		default:
 			break;
 	}
-	spin_unlock(&phydev->lock);
+	spin_unlock_bh(&phydev->lock);
 }
 EXPORT_SYMBOL(phy_stop);
 EXPORT_SYMBOL(phy_start);
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e275df8..49328e0 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -644,7 +644,7 @@ static int phy_probe(struct device *dev)
 	if (!(phydrv->flags & PHY_HAS_INTERRUPT))
 		phydev->irq = PHY_POLL;
 
-	spin_lock(&phydev->lock);
+	spin_lock_bh(&phydev->lock);
 
 	/* Start out supporting everything. Eventually,
 	 * a controller will attach, and may modify one
@@ -658,7 +658,7 @@ static int phy_probe(struct device *dev)
 	if (phydev->drv->probe)
 		err = phydev->drv->probe(phydev);
 
-	spin_unlock(&phydev->lock);
+	spin_unlock_bh(&phydev->lock);
 
 	return err;
 
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index e6d937e..5d812de 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -149,6 +149,8 @@ static const char *yukon2_name[] = {
 	"FE",		/* 0xb7 */
 };
 
+static void sky2_set_multicast(struct net_device *dev);
+
 /* Access to external PHY */
 static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val)
 {
@@ -2900,8 +2902,10 @@ static int sky2_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
 	sky2->autoneg = ecmd->autoneg;
 	sky2->advertising = ecmd->advertising;
 
-	if (netif_running(dev))
+	if (netif_running(dev)) {
 		sky2_phy_reinit(sky2);
+		sky2_set_multicast(dev);
+	}
 
 	return 0;
 }
@@ -2994,6 +2998,7 @@ static int sky2_nway_reset(struct net_device *dev)
 		return -EINVAL;
 
 	sky2_phy_reinit(sky2);
+	sky2_set_multicast(dev);
 
 	return 0;
 }
@@ -4171,6 +4176,8 @@ static int sky2_resume(struct pci_dev *pdev)
 				dev_close(dev);
 				goto out;
 			}
+
+			sky2_set_multicast(dev);
 		}
 	}
 
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 590b12c..82d837a 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1441,17 +1441,14 @@ static void
 spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
 {
 	u32 error_reg1, error_reg2;
-	u32 mask_reg1, mask_reg2;
 	u32 i;
 	int show_error = 1;
 
 	error_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1STS);
 	error_reg2 = spider_net_read_reg(card, SPIDER_NET_GHIINT2STS);
-	mask_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1MSK);
-	mask_reg2 = spider_net_read_reg(card,SPIDER_NET_GHIINT2MSK);
 
-	error_reg1 &= mask_reg1;
-	error_reg2 &= mask_reg2;
+	error_reg1 &= SPIDER_NET_INT1_MASK_VALUE;
+	error_reg2 &= SPIDER_NET_INT2_MASK_VALUE;
 
 	/* check GHIINT0STS ************************************/
 	if (status_reg)
@@ -1679,11 +1676,10 @@ spider_net_interrupt(int irq, void *ptr)
 {
 	struct net_device *netdev = ptr;
 	struct spider_net_card *card = netdev_priv(netdev);
-	u32 status_reg, mask_reg;
+	u32 status_reg;
 
 	status_reg = spider_net_read_reg(card, SPIDER_NET_GHIINT0STS);
-	mask_reg = spider_net_read_reg(card, SPIDER_NET_GHIINT0MSK);
-	status_reg &= mask_reg;
+	status_reg &= SPIDER_NET_INT0_MASK_VALUE;
 
 	if (!status_reg)
 		return IRQ_NONE;

^ permalink raw reply related

* [net-2.6.24][NETNS][patch 0/1] fix allnoconfig compilation erro
From: dlezcano @ 2007-09-13  6:01 UTC (permalink / raw)
  To: davem; +Cc: ebiederm, containers, netdev

fixes a compilation issue when allnoconfig is used.
 - init_net is unresolved.

-- 

^ permalink raw reply

* [net-2.6.24][NETNS][patch 1/1] fix allnoconfig compilation error
From: dlezcano @ 2007-09-13  6:01 UTC (permalink / raw)
  To: davem; +Cc: ebiederm, containers, netdev
In-Reply-To: <20070913060151.898030855@mai.toulouse-stg.fr.ibm.com>

[-- Attachment #1: net-ns-fix-allnoconfig.patch --]
[-- Type: text/plain, Size: 1787 bytes --]

From: Daniel Lezcano <dlezcano@fr.ibm.com>

When CONFIG_NET=no, init_net is unresolved because net_namespace.c
is not compiled and the include pull init_net definition.

This problem was very similar with the ipc namespace where the kernel
can be compiled with SYSV ipc out.

This patch fix that defining a macro which simply remove init_net
initialization from nsproxy namespace aggregator.

Compiled and booted on qemu-i386 with CONFIG_NET=no and CONFIG_NET=yes.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
 include/linux/init_task.h   |    2 +-
 include/net/net_namespace.h |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

Index: net-2.6.24/include/linux/init_task.h
===================================================================
--- net-2.6.24.orig/include/linux/init_task.h
+++ net-2.6.24/include/linux/init_task.h
@@ -79,7 +79,7 @@ extern struct nsproxy init_nsproxy;
 	.nslock		= __SPIN_LOCK_UNLOCKED(nsproxy.nslock),		\
 	.uts_ns		= &init_uts_ns,					\
 	.mnt_ns		= NULL,						\
-	.net_ns		= &init_net,					\
+	INIT_NET_NS(net_ns)                                             \
 	INIT_IPC_NS(ipc_ns)						\
 	.user_ns	= &init_user_ns,				\
 }
Index: net-2.6.24/include/net/net_namespace.h
===================================================================
--- net-2.6.24.orig/include/net/net_namespace.h
+++ net-2.6.24/include/net/net_namespace.h
@@ -28,7 +28,14 @@ struct net {
 	struct hlist_head	*dev_index_head;
 };
 
+#ifdef CONFIG_NET
+/* Init's network namespace */
 extern struct net init_net;
+#define INIT_NET_NS(net_ns) .net_ns = &init_net,
+#else
+#define INIT_NET_NS(net_ns)
+#endif
+
 extern struct list_head net_namespace_list;
 
 extern void __put_net(struct net *net);

-- 

^ permalink raw reply

* Re: [PATCH] veth: Cleanly handle a missing peer_tb argument on creation.
From: Pavel Emelyanov @ 2007-09-13  6:06 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: David Miller, Patrick McHardy, netdev, Stephen Hemminger
In-Reply-To: <m1ejh3aosm.fsf@ebiederm.dsl.xmission.com>

Eric W. Biederman wrote:
> Pavel Emelyanov <xemul@openvz.org> writes:
> 
>> Eric W. Biederman wrote:
>>> Pavel Emelyanov <xemul@openvz.org> writes:
>>>
>>>>> +	}
>>>>>  
>>>>> -		tbp = peer_tb;
>>>>> -	} else
>>>>> -		tbp = tb;
>>>> The intention of this part was to get the same parameters for
>>>> peer as for the first device if no "peer" argument was specified
>>>> for ip utility. Does it still work?
>>> I know it is problematic because we try to assign the same name
>>> to both network devices, if we assign a name to the primary
>>> network device.  That can't work.
>> This can - as you can see I reallocate the name lower.
> 
> Hmm. I just see:
> 	if (tbp[IFLA_IFNAME])
> 		nla_strlcpy(ifname, tbp[IFLA_IFNAME], IFNAMSIZ);
> 
> Then lower I see:
> 	if (tb[IFLA_IFNAME])
> 		nla_strlcpy(dev->name, tb[IFLA_IFNAME], IFNAMSIZ);
> 
> If (tb == tbp) then dev->name == ifname
> Unless I'm completely misreading that code.

There must be a
        if (strchr(dev->name, '%')) {
                err = dev_alloc_name(dev, dev->name);
                if (err < 0)
                        goto err_alloc_name;
        }
code just before registering the first device.

>>> Beyond that I had some really weird crashes while testing this
>>> piece of code, especially when I did not specify a peer parameter.
>> Can you please give me the exact command that caused an oops.
>> I try simple ip link add type veth and everything is just fine.
> 
> It might have been 64bit specific. 

Maybe. I will try on x86_64.

> What I have in my history is:
> ./ip/ip link add veth23 type veth
> 
> I forget exactly how it failed but as I recall it wasn't as
> nice as an oops.  My memory may be a bit foggy though.
> 
> If I haven't provided a bit enough clue I guess I can go back
> and remove the patch and try to reproduce the failure again.

That would be nice. Thanks.

>>> So it was just easier to avoid the problem with this patch then
>>> to completely root cause it.
>> Let me handle this problem. AFAIR this was one of wishes from 
>> Patrick that we make two equal devices in case peer is not given, 
>> not just the default peer.
> 
> Ok.  I have if we can track down the weird cases I have no problem
> if we handle this.  I think it still might be simpler if just
> copy tb onto peer_tb instead of using tbp.

Well, maybe, but what to copy some region aside if we can use it
as is.

> Eric
> 


^ permalink raw reply

* Re: [PATCH] 3c59x: sparse warning fix
From: Steffen Klassert @ 2007-09-13  6:38 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jeff Garzik, netdev
In-Reply-To: <20070905152359.26215f89@oldman>

On Wed, Sep 05, 2007 at 03:23:59PM +0100, Stephen Hemminger wrote:
> --- a/drivers/net/3c59x.c	2007-09-05 15:15:16.000000000 +0100
> +++ b/drivers/net/3c59x.c	2007-09-05 15:16:29.000000000 +0100
> @@ -1122,7 +1122,7 @@ static int __devinit vortex_probe1(struc
>  					   + sizeof(struct boom_tx_desc) * TX_RING_SIZE,
>  					   &vp->rx_ring_dma);
>  	retval = -ENOMEM;
> -	if (vp->rx_ring == 0)
> +	if (!vp->rx_ring)
>  		goto free_region;
>  
>  	vp->tx_ring = (struct boom_tx_desc *)(vp->rx_ring + RX_RING_SIZE);
> @@ -2476,7 +2476,8 @@ boomerang_rx(struct net_device *dev)
>  
>  			/* Check if the packet is long enough to just accept without
>  			   copying to a properly sized skbuff. */
> -			if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != 0) {
> +			if (pkt_len < rx_copybreak &&
> +			    (skb = dev_alloc_skb(pkt_len + 2)) ) {
>  				skb_reserve(skb, 2);	/* Align IP on 16 byte boundaries */
>  				pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
>  				/* 'skb_put()' points to the start of sk_buff data area. */
> -

Thanks,

Acked-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>

^ 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