]> err.no Git - linux-2.6/log
linux-2.6
16 years agoqeth: layer 2 allow ethtool to set TSO
Frank Blaschka [Thu, 24 Apr 2008 08:15:27 +0000 (10:15 +0200)]
qeth: layer 2 allow ethtool to set TSO

Allow ethtool to turn on/off EDDP via ethtool TSO interface.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: read number of ports from card
Ursula Braun [Thu, 24 Apr 2008 08:15:26 +0000 (10:15 +0200)]
qeth: read number of ports from card

Read out number of ports from the hardware.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: layer 3 add missing dev_open/close to ccwgroup handler
Frank Blaschka [Thu, 24 Apr 2008 08:15:25 +0000 (10:15 +0200)]
qeth: layer 3 add missing dev_open/close to ccwgroup handler

In case the ccwgroup device is set online/offline we have to run
the corresponding dev_open/close for the netdevice.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: rework fast path
Frank Blaschka [Thu, 24 Apr 2008 08:15:24 +0000 (10:15 +0200)]
qeth: rework fast path

Remove unnecessary traces. Remove unnecessary wrappers for skb
functions.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: provide get ethtool settings
Frank Blaschka [Thu, 24 Apr 2008 08:15:23 +0000 (10:15 +0200)]
qeth: provide get ethtool settings

Load balancing bonding queries the speed of the slave interfaces.
To support a bond consisting of different slave speeds we have to
report the speed by ethtool settings.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: layer 3 support vlan IPv6 on hiper socket
Frank Blaschka [Thu, 24 Apr 2008 08:15:22 +0000 (10:15 +0200)]
qeth: layer 3 support vlan IPv6 on hiper socket

hiper socket require the QETH_HDR_EXT_VLAN_FRAME flag in the
qdio header to handle vlan tagged frames.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth module size reduction.
Peter Tiedemann [Thu, 24 Apr 2008 08:15:21 +0000 (10:15 +0200)]
qeth module size reduction.

Replace complex macro for s390dbf calls by equivalent function. This reduces
module size about 10% without visible performance impact.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoccwgroup: Unify parsing for group attribute.
Ursula Braun [Thu, 24 Apr 2008 08:15:20 +0000 (10:15 +0200)]
ccwgroup: Unify parsing for group attribute.

Instead of having each driver for ccwgroup slave device parsing the
input itself and calling ccwgroup_create(), introduce a new function
ccwgroup_create_from_string() and handle parsing inside the ccwgroup
core.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonetiucv: get rid of in_atomic() use
Ursula Braun [Thu, 24 Apr 2008 08:15:19 +0000 (10:15 +0200)]
netiucv: get rid of in_atomic() use

There is no urgent need to restart a netiucv connection automatically,
if packets are sent while the netiucv device is not up and running.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolcs: CCL-sequ. numbers required for protocol 802.2 only.
Klaus D. Wacker [Thu, 24 Apr 2008 08:15:18 +0000 (10:15 +0200)]
lcs: CCL-sequ. numbers required for protocol 802.2 only.

Sequence numbers in skbs (Receive path) are assigned only to
802.2 packets.

Signed-off-by: Klaus D. Wacker <kdwacker@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoBlackfin EMAC Driver: Initial version of ethtool support
Bryan Wu [Fri, 25 Apr 2008 03:53:11 +0000 (11:53 +0800)]
Blackfin EMAC Driver: Initial version of ethtool support

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoBlackfin EMAC Driver: code cleanup
Bryan Wu [Fri, 25 Apr 2008 03:53:10 +0000 (11:53 +0800)]
Blackfin EMAC Driver: code cleanup

 - replace specific "bf537" function or data structure name to "bfin_mac"
 - cleanup bfin_mac_probe with error checking
 - punt set_pin_mux function, call peripheral request/free list functions directly

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonet: eepro autoport typo
Harvey Harrison [Sun, 27 Apr 2008 06:44:03 +0000 (23:44 -0700)]
net: eepro autoport typo

Found by sparse dubious !x & y warning...hidden in the GetBit macro
why !Word doesn't make any sense.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoAdd support for SMSC LAN8187 and LAN8700 PHYs
Steve Glendinning [Mon, 28 Apr 2008 17:37:29 +0000 (18:37 +0100)]
Add support for SMSC LAN8187 and LAN8700 PHYs

Add support for two additional SMSC PHY models with identical interrupt
source and mask registers to the LAN83C185

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoRename SMSC phy functions to be more generic
Steve Glendinning [Mon, 28 Apr 2008 17:36:46 +0000 (18:36 +0100)]
Rename SMSC phy functions to be more generic

Several models of SMSC PHY have the same interrupt status and mask
registers as the LAN83C185, so these functions can service multiple
different PHY drivers.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agodrivers/net/phy: fix kernel-doc notation
Randy Dunlap [Mon, 28 Apr 2008 17:58:22 +0000 (10:58 -0700)]
drivers/net/phy: fix kernel-doc notation

Fix kernel-doc warning:
Warning(linux-2.6.25-git11//drivers/net/phy/phy_device.c:275): No
description found for parameter 'bus_id'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Version update for multi ring patches
Sreenivasa Honnur [Tue, 29 Apr 2008 01:09:40 +0000 (21:09 -0400)]
S2io: Version update for multi ring patches

- Updated version number.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Enable multi ring support
Sreenivasa Honnur [Tue, 29 Apr 2008 01:08:45 +0000 (21:08 -0400)]
S2io: Enable multi ring support

- Seperate ring specific data
- Initialize all configured rings with equal priority.
- Updated boundary check for number of Rings.
- Updated per ring statistics of rx_bytes and rx_packets.
- Moved lro struct from struct s2io_nic to struct ring_info.
- Access respective rx ring directly in fill_rx_buffers.
- Moved rx_bufs_left struct s2io_nic to struct ring_info.
- Added per ring variables -  rxd_mode, rxd_count, dev, pdev.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago3c515: use netstats in net_device structure
Paulius Zaleckas [Tue, 29 Apr 2008 00:07:31 +0000 (03:07 +0300)]
3c515: use netstats in net_device structure

Use net_device_stats from net_device structure instead of local.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago3c509: use netstats in net_device structure
Paulius Zaleckas [Mon, 28 Apr 2008 23:45:43 +0000 (02:45 +0300)]
3c509: use netstats in net_device structure

Use net_device_stats from net_device structure instead of local.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago3c505: use netstats in net_device structure
Paulius Zaleckas [Mon, 28 Apr 2008 23:27:37 +0000 (02:27 +0300)]
3c505: use netstats in net_device structure

Use net_device_stats from net_device structure instead of local.
No need to memset it to 0, because it is allocated by kzalloc.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu...
Jeff Garzik [Tue, 29 Apr 2008 05:54:31 +0000 (01:54 -0400)]
Merge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream

16 years agoMerge branch 'sis190' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev...
Jeff Garzik [Tue, 29 Apr 2008 05:45:04 +0000 (01:45 -0400)]
Merge branch 'sis190' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream

16 years agoNew driver "sfc" for Solarstorm SFC4000 controller.
Ben Hutchings [Sun, 27 Apr 2008 11:55:59 +0000 (12:55 +0100)]
New driver "sfc" for Solarstorm SFC4000 controller.

The driver supports the 10Xpress PHY and XFP modules on our reference
designs SFE4001 and SFE4002 and the SMC models SMC10GPCIe-XFP and
SMC10GPCIe-10BT.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoiwlwifi: Allow building iwl3945 without iwl4965.
Jason Riedy [Sun, 27 Apr 2008 22:38:30 +0000 (15:38 -0700)]
iwlwifi: Allow building iwl3945 without iwl4965.

If IWL3945 ever depends on IWLCORE, the silent, user-invisible
IWLWIFI option can go away.

Signed-off-by: Jason Riedy <jason@acm.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agowireless: Fix compile error with wifi & leds
Luca Tettamanti [Sun, 27 Apr 2008 22:34:55 +0000 (15:34 -0700)]
wireless: Fix compile error with wifi & leds

Fix build error caused by commit
e82404ad612ebabc65d15c3d59b971cb35c3ff36 ("iwlwifi: Select
LEDS_CLASS.") from David Miller:

Since MAC80211_LEDS is selected by wireless drivers it must select its
own dependencies otherwise a build error may occur (kbuild will select
the symbol regardless of "depends" constraints).

Signed-off-By: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Fix slab corruption with ipv6 and tcp6fuzz
Evgeniy Polyakov [Sun, 27 Apr 2008 22:27:30 +0000 (15:27 -0700)]
tcp: Fix slab corruption with ipv6 and tcp6fuzz

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

This fixes a regression added by ec3c0982a2dd1e671bad8e9d26c28dcba0039d87
("[TCP]: TCP_DEFER_ACCEPT updates - process as established")

tcp_v6_do_rcv()->tcp_rcv_established(), the latter goes to step5, where
eventually skb can be freed via tcp_data_queue() (drop: label), then if
check for tcp_defer_accept_check() returns true and thus
tcp_rcv_established() returns -1, which forces tcp_v6_do_rcv() to jump
to reset: label, which in turn will pass through discard: label and free
the same skb again.

Tested by Eric Sesterhenn.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-By: Patrick McManus <mcmanus@ducksong.com>
16 years agoipv4/ipv6 compat: Fix SSM applications on 64bit kernels.
David L Stevens [Sun, 27 Apr 2008 08:06:07 +0000 (01:06 -0700)]
ipv4/ipv6 compat: Fix SSM applications on 64bit kernels.

Add support on 64-bit kernels for seting 32-bit compatible MCAST*
socket options.

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Use digest_null directly for auth
Herbert Xu [Sun, 27 Apr 2008 07:59:59 +0000 (00:59 -0700)]
[IPSEC]: Use digest_null directly for auth

Previously digest_null had no setkey function which meant that
we used hmac(digest_null) for IPsec since IPsec always calls
setkey.  Now that digest_null has a setkey we no longer need to
do that.

In fact when only confidentiality is specified for ESP we already
use digest_null directly.  However, when the null algorithm is
explicitly specified by the user we still opt for hmac(digest_null).

This patch removes this discrepancy.  I have not added a new compat
name for it because by chance it wasn't actualy possible for the user
to specify the name hmac(digest_null) due to a key length check in
xfrm_user (which I found out when testing that compat name :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosunrpc: fix missing kernel-doc
Randy Dunlap [Sun, 27 Apr 2008 05:59:02 +0000 (22:59 -0700)]
sunrpc: fix missing kernel-doc

Fix missing sunrpc kernel-doc:

Warning(linux-2.6.25-git7//net/sunrpc/xprt.c:451): No description found for parameter 'action'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocan: Fix copy_from_user() results interpretation
Sam Ravnborg [Sun, 27 Apr 2008 05:57:25 +0000 (22:57 -0700)]
can: Fix copy_from_user() results interpretation

Both copy_to_ and _from_user return the number of bytes, that failed to
reach their destination, not the 0/-EXXX values.

Based on patch from Pavel Emelyanov <xemul@openvz.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRevert "ipv6: Fix typo in net/ipv6/Kconfig"
David S. Miller [Sun, 27 Apr 2008 05:50:57 +0000 (22:50 -0700)]
Revert "ipv6: Fix typo in net/ipv6/Kconfig"

This reverts commit 5b3f129c5592ca35b3fe8916767c58b98710478c.

As requested by Maciej W. Rozycki.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotipc: endianness annotations
Al Viro [Sun, 27 Apr 2008 05:42:14 +0000 (22:42 -0700)]
tipc: endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv6: result of csum_fold() is already 16bit, no need to cast
Al Viro [Sun, 27 Apr 2008 05:28:58 +0000 (22:28 -0700)]
ipv6: result of csum_fold() is already 16bit, no need to cast

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM] AUDIT: Fix flowlabel text format ambibuity.
YOSHIFUJI Hideaki [Sun, 27 Apr 2008 05:24:10 +0000 (22:24 -0700)]
[XFRM] AUDIT: Fix flowlabel text format ambibuity.

Flowlabel text format was not correct and thus ambiguous.
For example, 0x00123 or 0x01203 are formatted as 0x123.
This is not what audit tools want.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosis190: account for Tx errors
Francois Romieu [Wed, 21 Nov 2007 21:30:37 +0000 (22:30 +0100)]
sis190: account for Tx errors

Update the collision counter as well.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
16 years agosis190: remove needless MII reset
Francois Romieu [Sun, 18 Nov 2007 21:04:05 +0000 (22:04 +0100)]
sis190: remove needless MII reset

It does not help the auto-negotiation process to settle.

Added a debug message to give some hindsight when things
do not work as expected.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
16 years agosis190: Rx path update
Francois Romieu [Sun, 27 Apr 2008 15:59:52 +0000 (17:59 +0200)]
sis190: Rx path update

- remove the function pointer to help gcc optimizing the
  inline pci_dma functions
- pci_dma_sync_single_for_cpu is not needed for a single
  large packet
- convert rtl8169_try_rx_copy to bool

b449655ff52ff8a29c66c5fc3fc03617e61182ee did the same
for the r8169 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
16 years agosis190: use netdev_alloc_skb
Stephen Hemminger [Sun, 27 Apr 2008 12:54:32 +0000 (14:54 +0200)]
sis190: use netdev_alloc_skb

This sets skb->dev and allows arch specific allocation.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
16 years agosis190: hard-code the alignment of tiny packets
Stephen Hemminger [Sun, 27 Apr 2008 12:42:27 +0000 (14:42 +0200)]
sis190: hard-code the alignment of tiny packets

There is no DMA involved here. Align the IP header without condition.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
16 years agosis190: use the allocated buffer as a status code in sis190_alloc_rx_skb
Stephen Hemminger [Sun, 27 Apr 2008 12:36:59 +0000 (14:36 +0200)]
sis190: use the allocated buffer as a status code in sis190_alloc_rx_skb

The local status code does not carry mory information.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
16 years agonet: Fix wrong interpretation of some copy_to_user() results.
Pavel Emelyanov [Fri, 25 Apr 2008 08:49:48 +0000 (01:49 -0700)]
net: Fix wrong interpretation of some copy_to_user() results.

I found some places, that erroneously return the value obtained from
the copy_to_user() call: if some amount of bytes were not able to get
to the user (this is what this one returns) the proper behavior is to
return the -EFAULT error, not that number itself.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Fri, 25 Apr 2008 07:31:07 +0000 (00:31 -0700)]
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

16 years agoxfrm: alg_key_len & alg_icv_len should be unsigned
Eric Dumazet [Fri, 25 Apr 2008 07:29:00 +0000 (00:29 -0700)]
xfrm: alg_key_len & alg_icv_len should be unsigned

In commit ba749ae98d5aa9d2ce9a7facde0deed454f92230 ([XFRM]: alg_key_len
should be unsigned to avoid integer divides
<http://git2.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=ba749ae98d5aa9d2ce9a7facde0deed454f92230>)
alg_key_len field of struct xfrm_algo was converted to unsigned int to
avoid integer divides.

Then Herbert in commit 1a6509d991225ad210de54c63314fd9542922095
([IPSEC]: Add support for combined mode algorithms) added a new
structure xfrm_algo_aead, that resurrected a signed int for alg_key_len
and re-introduce integer divides.

This patch avoids these divides and saves 64 bytes of text on i386.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[netdrvr] tehuti: move ioctl perm check closer to function start
Jeff Garzik [Fri, 25 Apr 2008 07:11:31 +0000 (03:11 -0400)]
[netdrvr] tehuti: move ioctl perm check closer to function start

Noticed by davem.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipv6: Fix typo in net/ipv6/Kconfig
Michael Beasley [Fri, 25 Apr 2008 06:50:30 +0000 (23:50 -0700)]
ipv6: Fix typo in net/ipv6/Kconfig

Two is used in the wrong context here, as you are connecting to an
IPv6 network over IPv4; not connecting two IPv6 networks to an IPv4
one.

Signed-off-by: Michael Beasley <youvegotmoxie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovia-velocity: fix vlan receipt
Francois Romieu [Thu, 24 Apr 2008 21:32:33 +0000 (23:32 +0200)]
via-velocity: fix vlan receipt

- vlans were using a single CAM register (see mac_set_vlan_cam)
- setting the address filtering registers for vlans is not
  needed when there is no vlan

The non-tagged interface is filtered out as soon as a tagged
(!= 0) interface is created. Its traffic appears again when an
zero-tagged interface is created.

Tested on Via Epia SN (VT6130 chipset) with several vlans whose
tag was above or beyond 255.

Signed-off-by: Séguier Régis <rseguier@e-teleport.net>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotg3: sparse cleanup
Eric Dumazet [Fri, 25 Apr 2008 06:33:06 +0000 (23:33 -0700)]
tg3: sparse cleanup

Fix the following sparse warning :

drivers/net/tg3.c:4025:3: warning: context imbalance in 'tg3_restart_hw'
- unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoforcedeth: realtek phy crossover detection
Ayaz Abdulla [Wed, 23 Apr 2008 18:37:30 +0000 (14:37 -0400)]
forcedeth: realtek phy crossover detection

This patch fixes an issue seen with the realtek 8201 phy. This phy has a
problem with crossover detection and it needs to be disabled. The
problem only arises on certain switches. Therefore, a module parameter
has been added to allow enabling crossover detection if needed. The
default will be set to disabled.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Increase MDIO timeouts
Benjamin Herrenschmidt [Wed, 23 Apr 2008 05:17:14 +0000 (15:17 +1000)]
ibm_newemac: Increase MDIO timeouts

This patch doubles the MDIO timeouts in EMAC as there are field
cases where they are two short to communicate with some PHYs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agogianfar: Fix skb allocation strategy
Andy Fleming [Tue, 22 Apr 2008 22:18:29 +0000 (17:18 -0500)]
gianfar: Fix skb allocation strategy

gianfar was unable to handle failed skb allocation for rx buffers, so
we were spinning until it succeeded.  Actually, it was worse--we were
spinning for a long time, and then silently failing.  Instead, we take
Stephen Hemminger's suggestion to try the allocation earlier, and drop the
packet if it failed.

We also make a couple of tweaks to how buffer descriptors are set up.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonetxen: reduce stack usage of netxen_nic_flash_print
Harvey Harrison [Tue, 22 Apr 2008 18:48:35 +0000 (11:48 -0700)]
netxen: reduce stack usage of netxen_nic_flash_print

Don't need to keep a struct netxen_new_user_info on the stack
when we only are interested in printing the serial_num.  Change
to only reading the serial_num.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosmc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
Roel Kluin [Fri, 18 Apr 2008 20:50:48 +0000 (13:50 -0700)]
smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}

When timeout reaches 0 the postfix decrement still subtracts, so the test
fails.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonet drivers: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 18 Apr 2008 20:50:44 +0000 (13:50 -0700)]
net drivers: fix platform driver hotplug/coldplug

Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable network
platform drivers, to re-enable auto loading.

NOTE: didn't change drivers/net/fs_enet/fs_enet-main.c "old binding" support.
That looks problematic in the first place (it even uses the ancient "struct
device_driver" binding scheme for platform_bus!) and I suspect it will vanish
soonish when arch/powerpc rules the world.  Also, drivers/net/ne.c would have
needed more thought to sort out.

[akpm@linux-foundation.org: fix sgiseeq.c]
[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: Dale Farnsworth <dale@farnsworth.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Victor <andrew@sanpeople.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoforcedeth: new backoff implementation
Ayaz Abdulla [Fri, 18 Apr 2008 20:50:43 +0000 (13:50 -0700)]
forcedeth: new backoff implementation

This patch adds support for a new backoff algorithm for half duplex supported
in newer hardware.  The old method is will be designated as legacy mode.

Re-seeding random values for the backoff algorithms are performed when a
transmit has failed due to a maximum retry count (1 to 15, where max is
considered the wraparound case of 0).

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoehea: make things static
Andrew Morton [Fri, 18 Apr 2008 20:50:39 +0000 (13:50 -0700)]
ehea: make things static

ehea_flush_sq() and ehea_purge_sq() should be static.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Thomas Klein <osstklei@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agophylib: Add support for board-level PHY fixups
Andy Fleming [Fri, 18 Apr 2008 22:29:54 +0000 (17:29 -0500)]
phylib: Add support for board-level PHY fixups

Sometimes the specific interaction between the platform and the PHY
requires special handling.  For instance, to change where the PHY's
clock input is, or to add a delay to account for latency issues in the
data path.  We add a mechanism for registering a callback with the PHY
Lib to be called on matching PHYs when they are brought up, or reset.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] atlx: code movement: move atl1 parameter parsing
Chris Snook [Sat, 19 Apr 2008 01:51:53 +0000 (21:51 -0400)]
[netdrvr] atlx: code movement: move atl1 parameter parsing

Move some code from atlx.c to atl1.c to prevent build conflict with
the upcoming atl2 code.  No changes, just movement.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoatlx: remove flash vendor parameter
Chris Snook [Sat, 19 Apr 2008 01:47:41 +0000 (21:47 -0400)]
atlx: remove flash vendor parameter

There's no good reason to manually set the flash vendor in a module
parameter, outside of an Atheros hardware lab.  Remove it, so nobody
accidentally bricks their board using it incorrectly.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agokorina: misc cleanup
Francois Romieu [Sun, 20 Apr 2008 16:06:13 +0000 (18:06 +0200)]
korina: misc cleanup

- useless initialization (korina_ope / korina_restart)
- use a single variable for the status code in korina_probe
  and propagate the error status code from below
- useless checks in korina_remove : the variables are
  necessarily set when korina_probe succeeds

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agokorina: fix misplaced return statement
Francois Romieu [Sun, 20 Apr 2008 16:05:31 +0000 (18:05 +0200)]
korina: fix misplaced return statement

The driver takes the error unwind path without condition.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoWAN: Fix confusing insmod error code for C101 too.
Krzysztof Halasa [Sun, 20 Apr 2008 17:10:56 +0000 (19:10 +0200)]
WAN: Fix confusing insmod error code for C101 too.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoRemoving dead code in drivers/net/wan/hdlc_fr.c
Cédric Augonnet [Sun, 20 Apr 2008 17:15:51 +0000 (19:15 +0200)]
Removing dead code in drivers/net/wan/hdlc_fr.c

The local variable "prefix" is never used anymore, and the content of
this string appears a bit later, directly in a call to "alloc_netdev"
after doing exactly the same if/else test. So there seems to be no
point keeping those 4 lines anymore.

Signed-off-by: Cédric Augonnet <cedric.augonnet@ens-lyon.org>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotehuti: check register size
Francois Romieu [Sun, 20 Apr 2008 17:32:34 +0000 (19:32 +0200)]
tehuti: check register size

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] typhoon: typhoon_resume - remove call to start_queue
Grant Grundler [Mon, 21 Apr 2008 04:44:15 +0000 (22:44 -0600)]
[netdrvr] typhoon: typhoon_resume - remove call to start_queue

While trying to fix http://bugzilla.kernel.org/show_bug.cgi?id=8952
I looked at a few other drivers to figure out what drivers _should_
be doing for suspend/resume. I noticed typhoon driver is likely doing
more than it needs to.  Patch below is untested since I don't have the HW.

Suspend/resume code across NIC drivers is fairly inconsistent.
And I couldn't find any documentation on what the canonical sequence
NICs need to do for suspend or resume.  Is there any?

Barring contrary advice, I'm going model the tulip suspend/resume
fixes after tg3.c since a number of "modern" (< 5 years old) laptops
have that and I'm silly enough to assume it works.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround
Valentine Barshak [Tue, 22 Apr 2008 00:46:48 +0000 (10:46 +1000)]
ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

This patch adds ibm_newemac PHY clock workaround for 440EP/440GR EMAC
attached to a PHY which doesn't generate RX clock if there is no link.
The code is based on the previous ibm_emac driver stuff. The 440EP/440GR
allows controlling each EMAC clock separately as opposed to global clock
selection for 440GX.

BenH: Made that #ifdef CONFIG_PPC_DCR_NATIVE for now as dcri_* stuff doesn't
exist for MMIO type DCRs like Cell. Some future rework & improvements of the
DCR infrastructure will make that cleaner but for now, this makes it work.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: PowerPC 440GX EMAC PHY clock workaround
Valentine Barshak [Tue, 22 Apr 2008 00:46:46 +0000 (10:46 +1000)]
ibm_newemac: PowerPC 440GX EMAC PHY clock workaround

The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout
error) if there's no link. Because of that it fails to find PHY
chip. The older ibm_emac driver had a workaround for that: the
EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, which toggle the Ethernet
Clock Select bit in the SDR0_MFR register. This patch does the same for
"ibm,emac-440gx" compatible chips. The workaround forces clock on -all-
EMACs, so we select clock under global emac_phy_map_lock.

BenH: Made that #ifdef CONFIG_PPC_DCR_NATIVE for now as dcri_* stuff
doesn't exist for MMIO type DCRs like Cell. Some future rework &
improvements of the DCR infrastructure will make that cleaner but
for now, this makes it work.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac Use status property for unused/unwired EMACs
Josh Boyer [Tue, 22 Apr 2008 00:46:44 +0000 (10:46 +1000)]
ibm_newemac Use status property for unused/unwired EMACs

Convert ibm_newemac to use the of_device_is_available function when checking
for unused/unwired EMACs.  We leave the current check for an "unused" property
to maintain backwards compatibility for older device trees.  Newer device
trees should simply use the standard "status" property in the EMAC node.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Fix section mismatch warnings
Josh Boyer [Tue, 22 Apr 2008 00:46:43 +0000 (10:46 +1000)]
ibm_newemac: Fix section mismatch warnings

This patch fixes several section mismatch warnings in the
ibm_newemac driver similar to:

WARNING: vmlinux.o(.devinit.text+0x3a04): Section mismatch in reference from the function emac_probe() to the function .devexit.text:tah_detach()
The function __devinit emac_probe() references
a function __devexit tah_detach().

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Add support for 460EX/GT-type MAL rx-channel handling
Stefan Roese [Tue, 22 Apr 2008 00:46:42 +0000 (10:46 +1000)]
ibm_newemac: Add support for 460EX/GT-type MAL rx-channel handling

On some 4xx PPC's (e.g. 460EX/GT), the rx channel number is a multiple
of 8 (e.g. 8 for EMAC1, 16 for EMAC2), but enabling in MAL_RXCASR needs
the divided by 8 value for the bitmask.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch
Stefan Roese [Tue, 22 Apr 2008 00:46:42 +0000 (10:46 +1000)]
ibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch

This fixes the jumbo frame support on EMAC V4 systems. Now the correct
bit is set depending on the EMAC version configured.

Tested on Kilauea (405EX) and Canyonlands (460EX).

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: Increment version to 0.2.1
Jesse Brandeburg [Wed, 23 Apr 2008 18:09:39 +0000 (11:09 -0700)]
e1000e: Increment version to 0.2.1

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: save and restore pcie/msi state to support EEH recovery
Auke Kok [Wed, 23 Apr 2008 18:09:34 +0000 (11:09 -0700)]
igb: save and restore pcie/msi state to support EEH recovery

To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

[after similar patches for ixgbe and e1000e from Wendy Xiong]

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: save and restore pcie/msi state to support EEH recovery
Wendy Xiong [Wed, 23 Apr 2008 18:09:29 +0000 (11:09 -0700)]
e1000e: save and restore pcie/msi state to support EEH recovery

To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

Tested this EEH patch with 2ports and 4ports pci-express e1000e
adapters.

Signed-off-by: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoixgbe: save and restore pcie/msi state to support EEH recovery
Wendy Xiong [Wed, 23 Apr 2008 18:09:24 +0000 (11:09 -0700)]
ixgbe: save and restore pcie/msi state to support EEH recovery

To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

Tested this EEH patch with Intel 10G pci-express ixgbe adapter.

Signed-off-by: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: lower ring minimum size to 64
Auke Kok [Wed, 23 Apr 2008 18:09:19 +0000 (11:09 -0700)]
e1000e: lower ring minimum size to 64

The lower limit of 80 descriptors in the ring is only valid for
one older 8254x chipset. All e1000e devices can use as low as
64 descriptors.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: Fix HW Error on es2lan, ARP capture issue by BMC
David Graham [Wed, 23 Apr 2008 18:09:14 +0000 (11:09 -0700)]
e1000e: Fix HW Error on es2lan, ARP capture issue by BMC

Several components to this complex fix. The es2lan cards occasionally
gave a "HW Error" especially when forcing speed. Some users also
reported that the BMC stole ARP packets.

The fixes include setting the proper SW_FW bits to tell the BMC
that we're active and not do any un-initialization at all, so the
setup routine is largely changed.

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 <jgarzik@redhat.com>
16 years agoe1000e: Add interrupt moderation run-time ethtool interface
Auke Kok [Wed, 23 Apr 2008 18:09:08 +0000 (11:09 -0700)]
e1000e: Add interrupt moderation run-time ethtool interface

The ethtool -c / -C interface can now be used to modify the
irq moderation algorithm. This change does not require an
adapter reset and can thus be used at all times. The adapter
only supports changing/reading rx-usecs which has special
values for 0, 1 and 3:

0 - no irq moderation whatsoever
1 - normal moderation favoring regular mixed traffic (default)
3 - best attempt at low latency possible at cost of CPU

For values between 10 and 10000 the rx-usecs defines "the minimum
time between successive irqs" in usec, unlike the module parameter.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: cleanup several stats issues
Bruce Allan [Wed, 23 Apr 2008 18:09:00 +0000 (11:09 -0700)]
e1000e: cleanup several stats issues

Several stats registers are completely unused and we just waste pci
bus time reading them. We also omit using the high 32 bits of the GORC/
GOTC counters. We can just read clear them and only read the low registers.

Mii-tool can also break es2lan if it executes a MII PHY register
ioctl while the device is in autonegotiation. Unfortunately it seems
that several applications and installations still perform this ioctl
call periodically and especially in this crucial startup time. We
can fool the ioctl by providing fail safe information that mimics
the "down" link state and only perform the dangerous PHY reads once
after link comes up to fill in the real values. As long as link
stays up the information will not change.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Removed rx_lock and put_lock
Sreenivasa Honnur [Wed, 23 Apr 2008 17:31:33 +0000 (13:31 -0400)]
S2io: Removed rx_lock and put_lock

- Removed rx_lock and put_lock as the buffer replenishment and
  receive completion is handled serially.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Removed receive buffer replenishment tasklet
Sreenivasa Honnur [Wed, 23 Apr 2008 17:29:42 +0000 (13:29 -0400)]
S2io: Removed receive buffer replenishment tasklet

- Removed receive buffer replenishment tasklet s2io_tasklet and instead
  allocating the receive buffers in either the interrupt handler (no napi)
  or the napi handler (napi enabled).

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Version update for memory leak fix during free_tx_buffers
Sreenivasa Honnur [Wed, 23 Apr 2008 17:28:58 +0000 (13:28 -0400)]
S2io: Version update for memory leak fix during free_tx_buffers

- Updated version number.

Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Fix memory leak during free_tx_buffers
Sreenivasa Honnur [Wed, 23 Apr 2008 17:28:08 +0000 (13:28 -0400)]
S2io: Fix memory leak during free_tx_buffers

- Fix the memory leak during free_tx_buffers.

Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoucc_geth: Fix sneaky merge conflict regarding bus_id
Andy Fleming [Wed, 23 Apr 2008 21:56:17 +0000 (16:56 -0500)]
ucc_geth: Fix sneaky merge conflict regarding bus_id

The patch that changed mdio_bus to a string didn't conflict strongly enough
with the patch that added fixed PHY support to UCC.  Gather it back into
the fold.

Fixes this error:
...
 CC      drivers/net/ucc_geth.o
 'ucc_geth_probe':
 /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ucc_geth.c:3935: error:
 incompatible types in assignment
 make[3]: *** [drivers/net/ucc_geth.o] Error 1

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipv6 RAW: Disallow IPPROTO_IPV6-level IPV6_CHECKSUM socket option on ICMPv6 sockets.
YOSHIFUJI Hideaki [Fri, 25 Apr 2008 04:30:38 +0000 (21:30 -0700)]
ipv6 RAW: Disallow IPPROTO_IPV6-level IPV6_CHECKSUM socket option on ICMPv6 sockets.

RFC3542 tells that IPV6_CHECKSUM socket option in the IPPROTO_IPV6
level is not allowed on ICMPv6 sockets.  IPPROTO_RAW level
IPV6_CHECKSUM socket option (a Linux extension) is still allowed.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: tcp_probe buffer overflow and incorrect return value
Tom Quetchenbach [Fri, 25 Apr 2008 04:11:58 +0000 (21:11 -0700)]
tcp: tcp_probe buffer overflow and incorrect return value

tcp_probe has a bounds-checking bug that causes many programs (less,
python) to crash reading /proc/net/tcp_probe. When it outputs a log
line to the reader, it only checks if that line alone will fit in the
reader's buffer, rather than that line and all the previous lines it
has already written.

tcpprobe_read also returns the wrong value if copy_to_user fails--it
just passes on the return value of copy_to_user (number of bytes not
copied), which makes a failure look like a success.

This patch fixes the buffer overflow and sets the return value to
-EFAULT if copy_to_user fails.

Patch is against latest net-2.6; tested briefly and seems to fix the
crashes in less and python.

Signed-off-by: Tom Quetchenbach <virtualphtn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoniu: Add support for Neptune FEM/NEM cards for C10 server blades
Matheos Worku [Fri, 25 Apr 2008 04:09:20 +0000 (21:09 -0700)]
niu: Add support for Neptune FEM/NEM cards for C10 server blades

[ Minor coding style and whitespace corrections, also bump
  driver version and release date. -DaveM ]

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoniu: Determine the # of ports from the card's VPD data
Matheos Worku [Fri, 25 Apr 2008 04:02:37 +0000 (21:02 -0700)]
niu: Determine the # of ports from the card's VPD data

[ Fix minor whitespace and coding style stuff... -DaveM ]

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoethtool: EEPROM dump no longer works for tg3 and natsemi
Mandeep Singh Baines [Fri, 25 Apr 2008 03:55:56 +0000 (20:55 -0700)]
ethtool: EEPROM dump no longer works for tg3 and natsemi

In the ethtool user-space application, tg3 and natsemi over-ride the
default implementation of dump_eeprom(). In both tg3_dump_eeprom() and
natsemi_dump_eeprom(), there is a magic number check which is not
present in the default implementation.

Commit b131dd5d ("[ETHTOOL]: Add support for large eeproms") snipped
the code which copied the ethtool_eeprom structure back to
user-space. tg3 and natsemi are over-writing the magic number field
and then checking it in user-space. With the ethtool_eeprom copy
removed, the check is failing.

The fix is simple. Add the ethtool_eeprom copy back.

Signed-off-by: Mandeep Singh Baines <msb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoaf_key: Fix af_key.c compiler warning
Brian Haley [Fri, 25 Apr 2008 03:38:31 +0000 (20:38 -0700)]
af_key: Fix af_key.c compiler warning

net/key/af_key.c: In function ‘pfkey_spddelete’:
net/key/af_key.c:2359: warning: ‘pol_ctx’ may be used uninitialized in
this function

When CONFIG_SECURITY_NETWORK_XFRM isn't set,
security_xfrm_policy_alloc() is an inline that doesn't set pol_ctx, so
this seemed like the easiest fix short of using *uninitialized_var(pol_ctx).

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotun: Multicast handling in tun_chr_ioctl() needs proper locking.
David S. Miller [Thu, 24 Apr 2008 10:44:43 +0000 (03:44 -0700)]
tun: Multicast handling in tun_chr_ioctl() needs proper locking.

Since these operations don't go through the normal
device calls, we have to ensure we synchronize with
those paths.

Noticed by Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix heavy stack usage in seq_file output routines.
Pavel Emelyanov [Thu, 24 Apr 2008 08:02:16 +0000 (01:02 -0700)]
[NET]: Fix heavy stack usage in seq_file output routines.

Plan C: we can follow the Al Viro's proposal about %n like in this patch.
The same applies to udp, fib (the /proc/net/route file), rt_cache and
sctp debug. This is minus ~150-200 bytes for each.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AF_UNIX] Initialise UNIX sockets before general device initcalls
David Woodhouse [Thu, 24 Apr 2008 07:59:25 +0000 (00:59 -0700)]
[AF_UNIX] Initialise UNIX sockets before general device initcalls

When drivers call request_module(), it tries to do something with UNIX
sockets and triggers a 'runaway loop modprobe net-pf-1' warning. Avoid
this by initialising AF_UNIX support earlier.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[RTNETLINK]: Fix bogus ASSERT_RTNL warning
Patrick McHardy [Thu, 24 Apr 2008 05:10:48 +0000 (22:10 -0700)]
[RTNETLINK]: Fix bogus ASSERT_RTNL warning

ASSERT_RTNL uses mutex_trylock to test whether the rtnl_mutex is
held. This bogus warnings when running in atomic context, which
f.e. happens when adding secondary unicast addresses through
macvlan or vlan or when synchronizing multicast addresses from
wireless devices.

Mid-term we might want to consider moving all address updates
to process context since the locking seems overly complicated,
for now just fix the bogus warning by changing ASSERT_RTNL to
use mutex_is_locked().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Thu, 24 Apr 2008 02:44:58 +0000 (19:44 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6

16 years agoiwlwifi: Fix built-in compilation of iwlcore (part 2)
Zhu Yi [Thu, 24 Apr 2008 02:44:13 +0000 (19:44 -0700)]
iwlwifi: Fix built-in compilation of iwlcore (part 2)

On Wed, 2008-04-23 at 13:38 +0300, Tomas Winkler wrote:
> This patch fixes problem in Makefile that prevented
> built-in compilation of iwlcore

Here is the second part. Without this,
drivers/net/wireless/iwlwifi/build-in.o will not be linked into vmlinux.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotun: Fix minor race in TUNSETLINK ioctl handling.
David S. Miller [Thu, 24 Apr 2008 02:37:58 +0000 (19:37 -0700)]
tun: Fix minor race in TUNSETLINK ioctl handling.

Noticed by Alan Cox.

The IFF_UP test is a bit racey, because other entities
outside of this driver's ioctl handler can modify that
state, even though this ioctl handler runs under
lock_kernel().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoppp_generic: use stats from net_device structure
Paulius Zaleckas [Thu, 24 Apr 2008 01:54:01 +0000 (18:54 -0700)]
ppp_generic: use stats from net_device structure

Use stats which now is in the net_device instead of one declared in
ppp structure.
Kill ppp_net_stats function, because by default it is used identical
internal_stats function from net/core/dev.c

Signed-of-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoiwlwifi: Don't unlock priv->mutex if it isn't locked
Roland Dreier [Wed, 23 Apr 2008 23:22:13 +0000 (16:22 -0700)]
iwlwifi: Don't unlock priv->mutex if it isn't locked

Commit b716bb91 ("iwlwifi: Cancel scanning upon association") moved the
test of priv->vif in iwl{3945,4964}_mac_config_interface() outside of
where priv->mutex is held, but still tries to do mutex_unlock() on
return.  This is clearly wrong and triggers a nasty lockdep warning when
this codepath is triggered.  Fix this by removing the mutex_unlock().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: rndis_wlan: modparam_workaround_interval is never below 0.
Roel Kluin [Wed, 23 Apr 2008 20:10:29 +0000 (22:10 +0200)]
wireless: rndis_wlan: modparam_workaround_interval is never below 0.

priv->param_workaround_interval is unsigned, modparam_workaround_interval not.
the former is never < 0.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>