Commit Graph

4863 Commits (5d5cb173d85ebf6dfb16f456a8148ecb4b1cecbc)

Author SHA1 Message Date
Patrick McHardy 5d5cb173d8 [DUMMY]: Use rtnl_link API
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-10 22:14:29 -07:00
Patrick McHardy 206c9fb26f [DUMMY]: Keep dummy devices on list
Use a list instead of an array to allow creating new devices.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-10 22:14:25 -07:00
Patrick McHardy 58651b24ac [DUMMY]: Use dev->stats
Use dev->stats instead of netdev_priv().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-10 22:14:23 -07:00
David S. Miller 8c7b7faaa6 [NET]: Kill eth_copy_and_sum().
It hasn't "summed" anything in over 7 years, and it's
just a straight mempcy ala skb_copy_to_linear_data()
so just get rid of it.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-10 22:08:12 -07:00
Linus Torvalds 6ed911fb04 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (40 commits)
  bonding/bond_main.c: make 2 functions static
  ps3: gigabit ethernet driver for PS3, take3
  [netdrvr] Fix dependencies for ax88796 ne2k clone driver
  eHEA: Capability flag for DLPAR support
  Remove sk98lin ethernet driver.
  sunhme.c:quattro_pci_find() must be __devinit
  bonding / ipv6: no addrconf for slaves separately from master
  atl1: remove write-only var in tx handler
  macmace: use "unsigned long flags;"
  Cleanup usbnet_probe() return value handling
  netxen: deinline and sparse fix
  eeprom_93cx6: shorten pulse timing to match spec (bis)
  phylib: Add Marvell 88E1112 phy id
  phylib: cleanup marvell.c a bit
  AX88796 network driver
  IOC3: Switch to pci refcounting safe APIs
  e100: Fix Tyan motherboard e100 not receiving IPMI commands
  QE Ethernet driver writes to wrong register to mask interrupts
  rrunner.c:rr_init() must be __devinit
  tokenring/3c359.c:xl_init() must be __devinit
  ...
2007-07-10 14:56:22 -07:00
Adrian Bunk 4ad072c984 bonding/bond_main.c: make 2 functions static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Chad Tindel <ctindel@users.sourceforge.net>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 14:31:45 -04:00
Masakazu Mokuno 02c1889166 ps3: gigabit ethernet driver for PS3, take3
Hi,

This is the third submission of the network driver for PS3.
The differences from the previous one are:

  - renamed source file names so that their prefix can match
    with the module name
  - added cbe-oss-dev@ozlabs.org line for MAINTAINER file
  - changed some in copyright comments

If there are no more comments, please apply for 2.6.23.

Thank you

--
Subject: PS3: Ethernet driver

From: Masakazu Mokuno <mokuno@sm.sony.co.jp>

Add Gigabit Ethernet support for the PS3 game console.  The module will
be called ps3_gelic.

CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 14:13:46 -04:00
Jeff Garzik def47c5095 [netdrvr] Fix dependencies for ax88796 ne2k clone driver
It needs writesb(), not available on all platforms.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 14:06:48 -04:00
Jan-Bernd Themann 4c3ca4da80 eHEA: Capability flag for DLPAR support
This patch introduces a capability flag that is used by the DLPAR userspace
tool to check which DLPAR features are supported by the eHEA driver.

Missing goto has been included.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:59:41 -04:00
Jeff Garzik e1abecc489 Remove sk98lin ethernet driver.
Unmaintained, superceded by skge.

Prodded to deletion by Adrian Bunk.  Acked by Stephen Hemminger.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:58:33 -04:00
Adrian Bunk cd6f5b8051 sunhme.c:quattro_pci_find() must be __devinit
This patch fixes the following section mismatch:

<--  snip  -->

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x272f8b): Section mismatch: reference to .init.text:quattro_pci_find (between 'happy_meal_pci_probe' and 'happy_meal_pci_remove')
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:45:29 -04:00
Jay Vosburgh c2edacf80e bonding / ipv6: no addrconf for slaves separately from master
At present, when a device is enslaved to bonding, if ipv6 is
active then addrconf will be initated on the slave (because it is closed
then opened during the enslavement processing).  This causes DAD and RS
packets to be sent from the slave.  These packets in turn can confuse
switches that perform ipv6 snooping, causing them to incorrectly update
their forwarding tables (if, e.g., the slave being added is an inactve
backup that won't be used right away) and direct traffic away from the
active slave to a backup slave (where the incoming packets will be
dropped).

	This patch alters the behavior so that addrconf will only run on
the master device itself.  I believe this is logically correct, as it
prevents slaves from having an IPv6 identity independent from the
master.  This is consistent with the IPv4 behavior for bonding.

	This is accomplished by (a) having bonding set IFF_SLAVE sooner
in the enslavement processing than currently occurs (before open, not
after), and (b) having ipv6 addrconf ignore UP and CHANGE events on
slave devices.

	The eql driver also uses the IFF_SLAVE flag.  I inspected eql,
and I believe this change is reasonable for its usage of IFF_SLAVE, but
I did not test it.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:19 -04:00
Alexey Dobriyan 89c0d26be7 atl1: remove write-only var in tx handler
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:19 -04:00
Alexey Dobriyan 099575b6cb macmace: use "unsigned long flags;"
Code will do local_irq_save() on it.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:18 -04:00
Peter Korsgaard 9514bfe5d9 Cleanup usbnet_probe() return value handling
usbnet_probe() handles a positive return value from the driver bind()
function as success, but will later only setup the status handler if the
return value was zero, leading to confusion. Patch adjusts this to accept
positive values as success in both checks.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:18 -04:00
Stephen Hemminger 4638aef1e2 netxen: deinline and sparse fix
Get rid of dubious casts to (void *) which causes a sparse warning.
And move largeish function from inline to the one file that uses the code,
the compiler can then decide to inline it.

Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:09 -04:00
Olof Johansson 85cfb53428 phylib: Add Marvell 88E1112 phy id
Add 88E1112 PHY ID to the marvell driver. Seems to do fine with the
88E1111 inits.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:09 -04:00
Olof Johansson e54792396f phylib: cleanup marvell.c a bit
Simplify the marvell driver init a bit: Make the supported devices an
array instead of explicitly registering each structure. This makes it
considerably easier to add new devices down the road.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:09 -04:00
Ben Dooks 825a2ff189 AX88796 network driver
Support for the Asix AX88796 network controller, an
NE2000 compatible 10/100 ethernet device with internal
PHY.

The driver supports PHY settings via either ioctl() or
the ethtool driver ops.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:41:08 -04:00
Ralf Baechle 688b3d7208 [MIPS] Delete Ocelot 3 support.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-07-10 17:33:05 +01:00
Atsushi Nemoto bd43da8ff1 [MIPS] tc35815: Load MAC address via platform_device
TX49XX SoCs include PCI NIC (TC35815 compatible) connected via its
internal PCI bus, but the NIC's PROM interface is not connected to
SEEPROM.  So we must provide its ethernet address by another way.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-07-10 17:33:04 +01:00
Adrian Bunk a4b156d47d [MIPS] Removes the few leftovers of the MOMENCO_JAGUAR_ATX removal.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-07-10 17:33:02 +01:00
Franck Bui-Huu 192cca6ef2 [MIPS] Remove Momenco Ocelot C support
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 delete mode 100644 arch/mips/configs/ocelot_c_defconfig
 delete mode 100644 arch/mips/momentum/ocelot_c/Makefile
 delete mode 100644 arch/mips/momentum/ocelot_c/cpci-irq.c
 delete mode 100644 arch/mips/momentum/ocelot_c/dbg_io.c
 delete mode 100644 arch/mips/momentum/ocelot_c/irq.c
 delete mode 100644 arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
 delete mode 100644 arch/mips/momentum/ocelot_c/platform.c
 delete mode 100644 arch/mips/momentum/ocelot_c/prom.c
 delete mode 100644 arch/mips/momentum/ocelot_c/reset.c
 delete mode 100644 arch/mips/momentum/ocelot_c/setup.c
 delete mode 100644 arch/mips/momentum/ocelot_c/uart-irq.c
 delete mode 100644 arch/mips/pci/fixup-ocelot-c.c
 delete mode 100644 arch/mips/pci/pci-ocelot-c.c
2007-07-10 17:33:01 +01:00
Alan Cox f49343a548 IOC3: Switch to pci refcounting safe APIs
Convert the IOC3 driver to use ref counting pci interfaces so that we can
obsolete the (usually unsafe) pci_find_{slot/device} interfaces and avoid
future authors writing hotplug-unsafe device drivers.

Signed-off-by: Alan Cox <alan@redhat.com>

Build fixes:
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:29:24 -04:00
David Graham 44e4925e46 e100: Fix Tyan motherboard e100 not receiving IPMI commands
The 82550 & 51 parts have an extended configuration block that
includes a bit "GMRC", required to enable the expected TCO behavior,
in config byte offset 22d.  The config block sent by the failing driver
does include the extension area, but this bit is not initialised,
and the downlaod only specifies 0x16 bytes to be sent to the NIC
(thaht's bytes 00..21d). By initializing the GMRC bit, and extending
the download size for D102+ MACs, the problem is resolved.

Signed-off-by: David Graham <david.graham@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:24:43 -04:00
Timur Tabi c6f5047b63 QE Ethernet driver writes to wrong register to mask interrupts
The QE Ethernet driver was writing to the wrong register to mask interrupts.
In ucc_geth_stop(), it was clearing UCCE instead of UCCM.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:24:42 -04:00
Adrian Bunk 4f092432bd rrunner.c:rr_init() must be __devinit
This patch fixes the following section mismatch:

<--  snip  -->

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x26e3f2): Section mismatch: reference to .init.text:rr_init (between 'rr_init_one' and 'rr_remove_one')
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:24:42 -04:00
Adrian Bunk 9b5587cdd9 tokenring/3c359.c:xl_init() must be __devinit
This patch fixes the following section mismatch:

<--  snip  -->

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x361ef1): Section mismatch: reference to .init.text:xl_init (between 'xl_probe' and 'xl_hw_reset')
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:24:42 -04:00
Adrian Bunk 4e50a8e3c5 sis900_mii_probe() must be __devinit
This patch fixes the following section mismatch:

<--  snip  -->

...
  MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x298170): Section mismatch: reference to .init.text:sis900_mii_probe (between 'sis900_probe' and 'sis900_default_phy')
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:24:42 -04:00
Rolf Eike Beer 8453d43f0e Fix typo in drivers/net/s2io.c
Introduced in d796fdb708.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:24:42 -04:00
Marcin Juszkiewicz 654e022005 PCMCIA: add Socket Ethernet card into pcnet_cs
One card submitted by Ångström user.

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:24:03 -04:00
Ishizaki Kou 7a62755821 spidernet: improve interrupt handling
We intend this patch to improve spidernet interrupt handling to be
more strict.  We had following problem and this patch solves it.

 -when CONFIG_DEBUG_SHIRQ=y, request_irq() calls handler().
 -when spider_net_open() is called, it calls request_irq() which calls
  spider_net_interrupt().
 -if some specific interrupt bit is set at this timing, it calls
  netif_rx_schedule() and spider_net_poll() is scheduled.
 -spider_net_open() calls netif_poll_enable() which clears the bit
  __LINK_STATE_RX_SCHED.
 -when spider_net_poll() is called, it calls netif_rx_complete() which
  causes BUG_ON() because __LINK_STATE_RX_SCHED is not set.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:30 -04:00
Steffen Klassert b8a1fcee26 3cSOHO100-TX needs EXTRA_PREAMBLE
The 3cSOHO100-TX needs a mdio_sync() before mdio_read() to read the MII
transceiver registers properly.  Adding EXTRA_PREAMBLE to drv_flags of the
3cSOHO100-TX will force this.

This problem exists already for years (I checked back to 2.6.8).
Setting duplex for the 3cSOHO100-TX was more or less a random process.
Till 2.6.15 it was more likely that the diver ends up in half
duplex mode, after the code change in 2.6.16 it was more likely
to end up in full duplex mode. I wonder why nobody noticed this earier.

Hopefully addresses

Bug 7454 3c59x (3cSOHO100-TX Hurricane) slow network bug
http://bugzilla.kernel.org/show_bug.cgi?id=7454

and

Bug 3654 3cSOHO100-TX: No MII transceiver present
http://bugzilla.kernel.org/show_bug.cgi?id=3654

Cc: Jonas Sandberg <jonassa@gmail.com>
Cc: Jon Sanchez <bugs@niluje.net>
Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:30 -04:00
vignesh babu 199126a23a Use is_power_of_2() in myri10ge/myri10ge.c
Replace (n & (n-1)) with is_power_of_2()

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Cc: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:30 -04:00
vignesh babu d9da466a3c use is_power_of_2() in cxgb3/cxgb3_main.c
Replace (n & (n-1)) with is_power_of_2()

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:30 -04:00
Yoann Padioleau de0d3dc0e8 atari_pamsnet.c: old declaration ritchie style fix
Use consistent function declaration style.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:30 -04:00
Stephen Hemminger 0640b8dc74 sky2: 1.16 version
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:30 -04:00
Stephen Hemminger e923d7b124 sky2: remove some leftover debug messages
Eliminate extra debug messages

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger 36eb0c71f3 sky2: use upper_32_bits() macro
Use upper_32_bits() inline

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger f957da2aa0 sky2: use roundup() macro
Use roundup() macro to size receive buffer.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger 71749531f2 sky2: check drop truncated packets
If packet larger than MTU is received, the driver uses hardware to
truncate the packet. Use the status registers to catch/drop them.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger f4331a6d24 sky2: add support for read/write of EEPROM
Add get/set eeprom support for sky2.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger 8a3e3bfdf4 sky2: unmark as EXPERIMENTAL
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger 55c9dd35d3 sky2: receive fill
Simplify receive buffer refill logic. Rather than trying to update
incrementally; do receive ring refill at end of receive processing.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger 5c11ce700f sky2: check for more work before leaving NAPI
This patch avoids generating another IRQ if more packets
arrive while in the NAPI poll routine. Before marking device as
finished, it rechecks that the status ring is empty.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:29 -04:00
Stephen Hemminger 3cf267539f sky2: debug interface
Add an optional debug interface for displaying state of transmit/receive
rings. Creates a file debugfs/sky2/ethX for each device that is up.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:28 -04:00
Stephen Hemminger 55d7b4e6ed sky2: carrier management
Make sky2 handle carrier similar to other drivers,
eliminate some possible races in carrier state transistions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:28 -04:00
Stephen Hemminger c59697e060 sky2: restore workarounds for lost interrupts
This patch restores a couple of workarounds from 2.6.16:
 * restart transmit moderation timer in case it expires during IRQ routine
 * default to having 10 HZ watchdog timer.
At this point it more important not to hang than to worry about the
power cost.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 12:22:28 -04:00
Thomas Bogendoerfer f2ec803008 Ethernet driver for EISA only SNI RM200/RM400 machines
Changes to last version:
- spelling fix
- cleaned up probe code

Thomas.

Ethernet driver for EISA only SNI RM200/RM400 machines

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:46 -04:00
Thomas Bogendoerfer 2187f287e2 Extract chip specific code out of lasi_82596.c
Changes to last version:
- use netdev_alloc_skb
- make init_rx_bufs just fail and not panic, if skb alloc fails
- don/t free_irq, if request_irq failed

Thomas.

Extracted chip specific code out of lasi_82596.c and placed into a lib82596.c
to make it usable for other 82596 drivers

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08 22:16:45 -04:00