]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
16 years agoiwlwifi: do not register bands with no supported channels
John W. Linville [Tue, 25 Mar 2008 19:58:40 +0000 (15:58 -0400)]
iwlwifi: do not register bands with no supported channels

Otherwise, b/g-only devices fail in wiphy_register.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: silently accept deletion of non-existant key
John W. Linville [Tue, 25 Mar 2008 15:43:15 +0000 (11:43 -0400)]
mac80211: silently accept deletion of non-existant key

Otherwise, 'iwconfig wlan0 key off' with no key set results in:

Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; No such file or directory.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[NETNS][IPV6] flowlabels - make proc per namespace
Benjamin Thery [Wed, 26 Mar 2008 23:53:30 +0000 (16:53 -0700)]
[NETNS][IPV6] flowlabels - make proc per namespace

Make /proc/net/ip6_flowlabel show only flow labels belonging to the
current network namespace.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] flowlabels - make flowlabels per namespace
Benjamin Thery [Wed, 26 Mar 2008 23:53:08 +0000 (16:53 -0700)]
[NETNS][IPV6] flowlabels - make flowlabels per namespace

This patch introduces a new member, fl_net, in struct ip6_flowlabel.
This allows to create labels with the same value in different namespaces.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] anycast - handle several network namespace
Daniel Lezcano [Wed, 26 Mar 2008 23:52:32 +0000 (16:52 -0700)]
[NETNS][IPV6] anycast - handle several network namespace

Make use of the network namespace information to have this protocol to
handle several network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Fix BEET output
Herbert Xu [Wed, 26 Mar 2008 23:51:09 +0000 (16:51 -0700)]
[IPSEC]: Fix BEET output

The IPv6 BEET output function is incorrectly including the inner
header in the payload to be protected.  This causes a crash as
the packet doesn't actually have that many bytes for a second
header.

The IPv4 BEET output on the other hand is broken when it comes
to handling an inner IPv6 header since it always assumes an
inner IPv4 header.

This patch fixes both by making sure that neither BEET output
function touches the inner header at all.  All access is now
done through the protocol-independent cb structure.  Two new
attributes are added to make this work, the IP header length
and the IPv4 option length.  They're filled in by the inner
mode's output function.

Thanks to Joakim Koskela for finding this problem.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Fix potential net leak and oops in ipv6 routing code.
Pavel Emelyanov [Wed, 26 Mar 2008 23:49:40 +0000 (16:49 -0700)]
[IPV6]: Fix potential net leak and oops in ipv6 routing code.

The commits f3db4851 ([NETNS][IPV6] ip6_fib - fib6_clean_all handle several
network namespaces) and 69ddb805 ([NETNS][IPV6] route6 - Make proc entry
/proc/net/rt6_stats per namespace) made some proc files per net.

Both of them introduced potential OOPS - get_proc_net can return NULL, but
this check is lost - and a struct net leak - in case single_open() fails the
previously got net is not put.

Kill all these bugs with one patch.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Cosmetic cleanup of TIPC polling logic
Allan Stephens [Wed, 26 Mar 2008 23:48:21 +0000 (16:48 -0700)]
[TIPC]: Cosmetic cleanup of TIPC polling logic

This patch eliminates an unnecessary poll-related routine
by merging it into TIPC's main polling routine, and updates
the comments associated with this code.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Reduce memory consumed by vlan_groups
Pavel Emelyanov [Wed, 26 Mar 2008 23:27:22 +0000 (16:27 -0700)]
[VLAN]: Reduce memory consumed by vlan_groups

Currently each vlan_groupd contains 8 pointers on arrays with 512
pointers on struct net_device each  :)  Such a construction "in many
cases ... wastes memory".

My proposal is to allow for some of these arrays pointers be NULL,
meaning that there are no devices in it. When a new device is added
to the vlan_group, the appropriate array is allocated.

The check in vlan_group_get_device's is safe, since the pointer
vg->vlan_devices_arrays[x] can only switch from NULL to not-NULL.
The vlan_group_prealloc_vid() is guarded with rtnl lock and is
also safe.

I've checked (I hope that) all the places, that use these arrays
and found, that the register_vlan_dev is the only place, that can
put a vlan device on an empty vlan_group.

Rough calculations shows, that after the patch a setup with a
single vlan dev (or up to 512 vlans with sequential vids) will
occupy approximately 8 times less memory.

The question I have is - does this patch makes sense, or a totally
new structures are required to store the vlan_devs?

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 26 Mar 2008 23:09:43 +0000 (16:09 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

16 years ago[ICMP]: Dst entry leak in icmp_send host re-lookup code (v2).
Pavel Emelyanov [Wed, 26 Mar 2008 09:27:09 +0000 (02:27 -0700)]
[ICMP]: Dst entry leak in icmp_send host re-lookup code (v2).

Commit 8b7817f3a959ed99d7443afc12f78a7e1fcc2063 ([IPSEC]: Add ICMP host
relookup support) introduced some dst leaks on error paths: the rt
pointer can be forgotten to be put. Fix it bu going to a proper label.

Found after net namespace's lo refused to unregister :) Many thanks to
Den for valuable help during debugging.

Herbert pointed out, that xfrm_lookup() will put the rtable in case
of error itself, so the first goto fix is redundant.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][ICMP]: Build fix for NET_NS=n case (dev->nd_net is omitted).
Pavel Emelyanov [Wed, 26 Mar 2008 09:19:25 +0000 (02:19 -0700)]
[NETNS][ICMP]: Build fix for NET_NS=n case (dev->nd_net is omitted).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25]: Remove obsolete references to BKL from TODO file.
Robert P. J. Day [Wed, 26 Mar 2008 09:14:38 +0000 (02:14 -0700)]
[AX25]: Remove obsolete references to BKL from TODO file.

Given that there are no apparent calls to lock_kernel() or
unlock_kernel() under net/ax25, delete the TODO reference related to
that.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix multicast device ioctl checks
Patrick McHardy [Wed, 26 Mar 2008 09:12:11 +0000 (02:12 -0700)]
[NET]: Fix multicast device ioctl checks

SIOCADDMULTI/SIOCDELMULTI check whether the driver has a set_multicast_list
method to determine whether it supports multicast. Drivers implementing
secondary unicast support use set_rx_mode however.

Check for both dev->set_multicast_mode and dev->set_rx_mode to determine
multicast capabilities.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][ICMP]: Use per-net sysctls in ipv4/icmp.c.
Pavel Emelyanov [Wed, 26 Mar 2008 09:00:21 +0000 (02:00 -0700)]
[NETNS][ICMP]: Use per-net sysctls in ipv4/icmp.c.

This mostly re-uses the net, used in icmp netnsization patches from Denis.

After this ICMP sysctls are completely virtualized.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][ICMP]: Make ctl tables for ICMP sysctls per-net.
Pavel Emelyanov [Wed, 26 Mar 2008 08:56:24 +0000 (01:56 -0700)]
[NETNS][ICMP]: Make ctl tables for ICMP sysctls per-net.

Add some flesh to ipv4_sysctl_init_net and ipv4_sysctl_exit_net,
i.e. copy the table, alter .data pointers and register it per-net.

Other ipv4_table's sysctls are now global, but this is going to
change once sysctl permissions patches migrate from -mm tree to
mainline in 2.6.26 merge window :)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][ICMP]: Move ICMP sysctls on struct net.
Pavel Emelyanov [Wed, 26 Mar 2008 08:55:37 +0000 (01:55 -0700)]
[NETNS][ICMP]: Move ICMP sysctls on struct net.

Initialization is moved to icmp_sk_init, all the places, that
refer to them use init_net for now.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][ICMP]: Register pernet subsys to make ICMP sysctls per-net.
Pavel Emelyanov [Wed, 26 Mar 2008 08:54:18 +0000 (01:54 -0700)]
[NETNS][ICMP]: Register pernet subsys to make ICMP sysctls per-net.

This includes adding pernet_operations, empty init and exit
hooks and a bit of changes in sysctl_ipv4_init just not to
have this part in next patches.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IRDA]: Store irnet_socket termios properly.
David S. Miller [Wed, 26 Mar 2008 07:55:50 +0000 (00:55 -0700)]
[IRDA]: Store irnet_socket termios properly.

It should be a "struct ktermios" not a "struct termios".

Based upon a build warning reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Compilation warnings under CONFIG_NET_NS.
Denis V. Lunev [Wed, 26 Mar 2008 07:48:17 +0000 (00:48 -0700)]
[NETNS]: Compilation warnings under CONFIG_NET_NS.

Recent commits from YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
have been introduced a several compilation warnings
'assignment discards qualifiers from pointer target type'
due to extra const modifier in the inline call parameters of
{dev|sock|twsk}_net_set.

Drop it.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Compilation fix for include/linux/netdevice.h.
Denis V. Lunev [Wed, 26 Mar 2008 07:47:14 +0000 (00:47 -0700)]
[NETNS]: Compilation fix for include/linux/netdevice.h.

Commit commit c346dca10840a874240c78efe3f39acf4312a1f2
([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS)
breaks compilation with CONFIG_NET_NS set.

Fix the typo.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
Patrick McHardy [Wed, 26 Mar 2008 07:16:29 +0000 (00:16 -0700)]
[UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list

IFF_ALLMULTI is an indication from the network stack to the driver
to disable multicast filters, drivers should never set it directly.

Since the UML networking device doesn't have any filtering capabilites,
it doesn't the set_multicast_list function at all, it is kept so userspace
can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
Patrick McHardy [Wed, 26 Mar 2008 07:15:17 +0000 (00:15 -0700)]
[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device

Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity
or dev_change_flags. Setting it directly causes two unwanted effects:

- the next dev_change_flags call will notice a difference between
  dev->gflags and the actual flags, enable promisc/allmulti
  mode and incorrectly update dev->gflags

- this keeps the underlying device in promisc/allmulti mode until
  the VLAN device is deleted

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'upstream-net26' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Wed, 26 Mar 2008 06:11:25 +0000 (23:11 -0700)]
Merge branch 'upstream-net26' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

16 years agogianfar: Fix Rx/Tx HW interrupt coalescing counter reset procedure.
Andy Fleming [Mon, 24 Mar 2008 15:53:28 +0000 (10:53 -0500)]
gianfar: Fix Rx/Tx HW interrupt coalescing counter reset procedure.

- Fix Rx/Tx HW interrupt coalescing counter reset logic. Disabling
is required before resetting the counter.

- Update the Default both Rx and Tx coalescing timer
threshold. Formerly 4 is set which is equal to 1.5 frame at the line
rate of 1GbE interface, and it doesn't match to the coalescing frame
count which is set to 16. Threashold 21 is matched to frame count 16.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agogianfar: Only process completed frames
Andy Fleming [Mon, 24 Mar 2008 15:53:27 +0000 (10:53 -0500)]
gianfar: Only process completed frames

If the LAST bit is not set in the RxBD, it's possible we're processing
an incomplete frame, which is bad.  While we're at it, add a constant
for the error bitmask, so the whole if-clause fits on one line,
and is more legible.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agogianfar: Fix frame size calculation when hardware VLAN acceleration is on
Dai Haruki [Mon, 24 Mar 2008 15:53:26 +0000 (10:53 -0500)]
gianfar: Fix frame size calculation when hardware VLAN acceleration is on

In gfar_change_mtu(), the frame size needs to be increased to account
for the extra 4 bytes VLAN adds to the ethernet header.  However,
it was being increased by the length of the whole header (18 bytes),
which is wrong.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agogianfar: Fix the data buffer stashing amount
Dai Haruki [Mon, 24 Mar 2008 15:53:29 +0000 (10:53 -0500)]
gianfar: Fix the data buffer stashing amount

- Buffer stashing parameter change to 96 from 64 in order to cover
the Layer 4 header.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoUse single_open instead of manual manipulations.
Pavel Emelyanov [Mon, 18 Feb 2008 10:55:10 +0000 (13:55 +0300)]
Use single_open instead of manual manipulations.

The code opening proc entry for each device makes the
same thing, as the single_open does, so remove the
unneeded code.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agophy/broadcom: add support for BCM5481 PHY
Anton Vorontsov [Tue, 4 Mar 2008 16:41:32 +0000 (19:41 +0300)]
phy/broadcom: add support for BCM5481 PHY

This patch adds support for BCM5481 PHY. Unfortunately it's hard to
get specifications for this PHY, so its special register 0x18 isn't
annotated properly (but we know it's used to set up the delays).

I've kept the magic numbers, so we'll not forget to fix it at the
first opportunity, and will name that register and its bits correctly.

p.s. also fixed the line with broken indention, introduced by
commit 03157ac31eb4a8883382a212b161d2e6c5059fbf
    PHYLIB: Add BCM5482 PHY support

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoqla3xxx: convert byte order of constant instead of variable
Marcin Slusarz [Tue, 4 Mar 2008 23:19:20 +0000 (15:19 -0800)]
qla3xxx: convert byte order of constant instead of variable

Convert byte order of constant instead of variable which can be done at
compile time (vs run time)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/net/mv643xx_eth.c: Use FIELD_SIZEOF
Julia Lawall [Tue, 4 Mar 2008 23:19:19 +0000 (15:19 -0800)]
drivers/net/mv643xx_eth.c: Use FIELD_SIZEOF

Robert P.J. Day proposed to use the macro FIELD_SIZEOF in replace of code
that matches its definition.

The modification was made using the following semantic patch
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
type t;
identifier f;
@@

- (sizeof(((t*)0)->f))
+ FIELD_SIZEOF(t, f)

@depends on haskernel@
type t;
identifier f;
@@

- sizeof(((t*)0)->f)
+ FIELD_SIZEOF(t, f)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoAdd support the Korina (IDT RC32434) Ethernet MAC
Florian Fainelli [Wed, 19 Mar 2008 16:14:51 +0000 (17:14 +0100)]
Add support the Korina (IDT RC32434) Ethernet MAC

This patch adds support for the IDT rc32434 Ethernet MAC
we can find in the IDT boards and the Mikrotik RB500.
Driver references some code from the linux-mips RB500
support.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Philip Rischel <rischelp@idt.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoforcedeth: Use round_jiffies for stats timer
Daniel Drake [Tue, 18 Mar 2008 11:07:18 +0000 (11:07 +0000)]
forcedeth: Use round_jiffies for stats timer

This timer doesn't need to run at precise times, so round it to a whole
second to decrease wakeups.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agos2io annotations
Al Viro [Sun, 16 Mar 2008 22:23:14 +0000 (22:23 +0000)]
s2io annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoendianness annotations: rndis
Al Viro [Sun, 16 Mar 2008 22:43:06 +0000 (22:43 +0000)]
endianness annotations: rndis

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoannotate cxgb3 (ab)uses of skb->priority/skb->csum
Al Viro [Sun, 16 Mar 2008 22:22:54 +0000 (22:22 +0000)]
annotate cxgb3 (ab)uses of skb->priority/skb->csum

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskfp annotations
Al Viro [Sun, 16 Mar 2008 22:22:24 +0000 (22:22 +0000)]
skfp annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agomisc drivers/net annotations
Al Viro [Sun, 16 Mar 2008 22:21:54 +0000 (22:21 +0000)]
misc drivers/net annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52: more unbreaking
Al Viro [Wed, 19 Mar 2008 09:44:39 +0000 (09:44 +0000)]
ni52: more unbreaking

missed read*/write* plus a bunch of wrong-sized ones...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52: switch to ioremap()
Al Viro [Wed, 19 Mar 2008 09:44:29 +0000 (09:44 +0000)]
ni52: switch to ioremap()

isa_bus_to_virt() is the wrong thing to do here; it happens
to work on i386, but only by accident.  What we want is
normal ioremap/readb/etc. set - it's all in iomem.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52: clean up check586()
Al Viro [Wed, 19 Mar 2008 09:44:19 +0000 (09:44 +0000)]
ni52: clean up check586()

take iscp-based testing into helper, kill the loop, stop
wanking with reassignments of priv->iscp

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52: clean up initialization of priv
Al Viro [Wed, 19 Mar 2008 09:44:09 +0000 (09:44 +0000)]
ni52: clean up initialization of priv

* initialize spinlock once
* check586() used to be done before we'd allocated ->priv; these days
  it's there from the very beginning, so we don't have to play with
  private copy.  Consequently, we don't need to mess with reinitializing
  ->base, etc. afterwards.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52: make ->base char __iomem *
Al Viro [Wed, 19 Mar 2008 09:43:59 +0000 (09:43 +0000)]
ni52: make ->base char __iomem *

... and store the virt address where we map the ->mem_addr, while we
are at it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52: kill the second argument of check586(), get rid of bogus pointer
Al Viro [Wed, 19 Mar 2008 09:43:49 +0000 (09:43 +0000)]
ni52: kill the second argument of check586(), get rid of bogus pointer

Passing ISA bus address explicitly cast to char * only to cast it back to
unsigned long is dumb; so's passing it at all when it's always dev->mem_start...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52: unbreak scp_struct
Al Viro [Wed, 19 Mar 2008 09:43:39 +0000 (09:43 +0000)]
ni52: unbreak scp_struct

unsigned short != u8, it's u16...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoni52 trivial iomem annotations
Al Viro [Wed, 19 Mar 2008 09:43:29 +0000 (09:43 +0000)]
ni52 trivial iomem annotations

Driver is still broken, though; partially from Alan's checkpatch-induced
fun, partially from layers of ancient mess ;-)

By the end of the series... hell, might be even worth trying to stick
such card into old alpha or ppc with an ISA slot and see if it work -
would be for the first time ever in case of alpha and for the first
time since at least 2.5.3 in case of ppc...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb: remove irq_sem
Jesse Brandeburg [Fri, 21 Mar 2008 18:07:03 +0000 (11:07 -0700)]
ixgb: remove irq_sem

ixgb can remove irq_sem by auditing all the call sites to make sure
that each of them makes sure the adapter is in the correct state
before re-enabling interrupts.  after doing this to all of our other
drivers it is becoming easier.

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 <jeff@garzik.org>
16 years agoe1000: remove irq_sem
Jesse Brandeburg [Fri, 21 Mar 2008 18:06:58 +0000 (11:06 -0700)]
e1000: remove irq_sem

irq_sem was just a hack to prevent interrupts from being enabled
unexpectedly in deep call paths.  Simply finding those call paths and
fixing them by hand results in a driver that behaves as we expect and
doesn't need the atomic at all.

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 <jeff@garzik.org>
16 years agoe1000e: remove irq_sem
Jesse Brandeburg [Fri, 21 Mar 2008 18:06:52 +0000 (11:06 -0700)]
e1000e: remove irq_sem

irq_sem can safely be removed by auditing all irq.*able sites to
make sure that interrupts don't get enabled unexpectedly when the
interface is down.

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 <jeff@garzik.org>
16 years agoe1000e: remove no longer used e1000e_read_nvm_spi
Auke Kok [Fri, 21 Mar 2008 18:06:47 +0000 (11:06 -0700)]
e1000e: remove no longer used e1000e_read_nvm_spi

This function is no longer used now that 82573 uses the eerd
read method as well. Thanks to Adrian Bunk for pointing this out.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb: move externs out of .c files
Auke Kok [Fri, 21 Mar 2008 18:06:42 +0000 (11:06 -0700)]
ixgb: move externs out of .c files

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb: convert boolean_t to bool
Joe Perches [Fri, 21 Mar 2008 18:06:37 +0000 (11:06 -0700)]
ixgb: convert boolean_t to bool

> send me a patch for e1000 and for ixgb and I'll happily apply those :)

boolean_t to bool
TRUE to true
FALSE to false

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb: add explicit state checking
Jesse Brandeburg [Fri, 21 Mar 2008 18:06:32 +0000 (11:06 -0700)]
ixgb: add explicit state checking

In order to remove the irq_sem code we need to implement strict
adapter state checking to prevent accidental double up or downs
or resets. This code is largely copied from e1000/e1000e.

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 <jeff@garzik.org>
16 years agoe1000: Convert boolean_t to bool
Joe Perches [Fri, 21 Mar 2008 18:06:25 +0000 (11:06 -0700)]
e1000: Convert boolean_t to bool

On Thu, 2008-03-06 at 10:07 -0800, Kok, Auke wrote:
> send me a patch for e1000 and for ixgb and I'll happily apply those :)

boolean_t to bool
TRUE to true
FALSE to false
comment typo ahread to ahead

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen, phy/marvell, skge: minor checkpatch fixes
Jeff Garzik [Wed, 26 Mar 2008 03:53:24 +0000 (23:53 -0400)]
netxen, phy/marvell, skge: minor checkpatch fixes

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Handle TX completions on the same CPU as the sender for MIS-X interrupts
Sreenivasa Honnur [Tue, 25 Mar 2008 19:11:56 +0000 (15:11 -0400)]
S2io: Handle TX completions on the same CPU as the sender for MIS-X interrupts

- Handling TX completions on the same cpu as the sender.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agob44: Truncate PHY address
Michael Buesch [Tue, 25 Mar 2008 17:04:46 +0000 (18:04 +0100)]
b44: Truncate PHY address

Some ROMs on embedded devices store incorrect values for
the PHY address of the ethernet device.
It looks like the number is sign-extended.
Truncate the value by applying the PHY-address mask to it.
The patch was tested on a bcm47xx embedded system (where the bug
triggers) and a bcm4400 PCI card.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge napi->poll() locking bug
Marin Mitov [Sun, 23 Mar 2008 08:20:09 +0000 (10:20 +0200)]
skge napi->poll() locking bug

According to: Documentation/networking/netdevices.txt:

<cite>
napi->poll:
..........
Context: softirq
         will be called with interrupts disabled by netconsole.
</cite>

napi->poll() could be called either with interrupts enabled
(in softirq context) or disabled (by netconsole), so the irq flag
should be preserved.

Inspired by Ingo's resent forcedeth patch :-)

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agorndis_host: fix oops when query for OID_GEN_PHYSICAL_MEDIUM fails
Jussi Kivilinna [Sun, 23 Mar 2008 10:45:44 +0000 (12:45 +0200)]
rndis_host: fix oops when query for OID_GEN_PHYSICAL_MEDIUM fails

When query for OID_GEN_PHYSICAL_MEDIUM fails, uninitialized pointer
'phym' is being accessed in generic_rndis_bind(), resulting OOPS.
Patch fixes phym to be initialized and setup correctly when
rndis_query() for physical medium fails.

Bug was introduced by following commit:
commit 039ee17d1baabaa21783a0d5ab3e8c6d8c794bdf
Author: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Date:   Sun Jan 27 23:34:33 2008 +0200

Reported-by: Dmitri Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb3: Fix lockdep problems with sge.reg_lock
Roland Dreier [Thu, 20 Mar 2008 20:30:48 +0000 (13:30 -0700)]
cxgb3: Fix lockdep problems with sge.reg_lock

Using iWARP with a Chelsio T3 NIC generates the following lockdep warning:

    =================================
    [ INFO: inconsistent lock state ]
    2.6.25-rc6 #50
    ---------------------------------
    inconsistent {softirq-on-W} -> {in-softirq-W} usage.
    swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
     (&adap->sge.reg_lock){-+..}, at: [<ffffffff880e5ee2>] cxgb_offload_ctl+0x3af/0x507 [cxgb3]

The problem is that reg_lock is used with plain spin_lock() in
drivers/net/cxgb3/sge.c but is used with spin_lock_irqsave() in
drivers/net/cxgb3/cxgb3_offload.c.  This is technically a false
positive, since the uses in sge.c are only in the initialization and
cleanup paths and cannot overlap with any use in interrupt context.

The best fix is probably just to use spin_lock_irq() with reg_lock in
sge.c.  Even though it's not strictly required for correctness, it
avoids triggering lockdep and the extra overhead of disabling
interrupts is not important at all in the initialization and cleanup
slow paths.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoehea: Fix IPv6 support
Thomas Klein [Wed, 19 Mar 2008 12:55:43 +0000 (13:55 +0100)]
ehea: Fix IPv6 support

Indicate that HEA calculates IPv4 checksums only

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodm9000: Support promisc and all-multi modes
Peter Korsgaard [Tue, 18 Mar 2008 22:17:16 +0000 (23:17 +0100)]
dm9000: Support promisc and all-multi modes

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodm9601: configure MAC to drop invalid (crc/length) packets
Peter Korsgaard [Tue, 18 Mar 2008 22:16:54 +0000 (23:16 +0100)]
dm9601: configure MAC to drop invalid (crc/length) packets

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodm9601: add Hirose USB-100 device ID
Peter Korsgaard [Tue, 18 Mar 2008 22:16:53 +0000 (23:16 +0100)]
dm9601: add Hirose USB-100 device ID

The Hirose USB-100 adapter uses a dm9601 chip.
Reported by Robert Brockway.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[NETFILTER]: nf_conntrack_sip: update copyright
Patrick McHardy [Wed, 26 Mar 2008 03:27:05 +0000 (20:27 -0700)]
[NETFILTER]: nf_conntrack_sip: update copyright

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: RTP routing optimization
Patrick McHardy [Wed, 26 Mar 2008 03:26:43 +0000 (20:26 -0700)]
[NETFILTER]: nf_conntrack_sip: RTP routing optimization

Optimize call routing between NATed endpoints: when an external
registrar sends a media description that contains an existing RTP
expectation from a different SNATed connection, the gatekeeper
is trying to route the call directly between the two endpoints.

We assume both endpoints can reach each other directly and
"un-NAT" the addresses, which makes the media stream go between
the two endpoints directly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: support multiple media channels
Patrick McHardy [Wed, 26 Mar 2008 03:26:24 +0000 (20:26 -0700)]
[NETFILTER]: nf_conntrack_sip: support multiple media channels

Add support for multiple media channels and use it to create
expectations for video streams when present.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_nat_sip: split up SDP mangling
Patrick McHardy [Wed, 26 Mar 2008 03:26:08 +0000 (20:26 -0700)]
[NETFILTER]: nf_nat_sip: split up SDP mangling

The SDP connection addresses may be contained in the payload multiple
times (in the session description and/or once per media description),
currently only the session description is properly updated. Split up
SDP mangling so the function setting up expectations only updates the
media port, update connection addresses from media descriptions while
parsing them and at the end update the session description when the
final addresses are known.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: create RTCP expectations
Patrick McHardy [Wed, 26 Mar 2008 03:25:49 +0000 (20:25 -0700)]
[NETFILTER]: nf_conntrack_sip: create RTCP expectations

Create expectations for the RTCP connections in addition to RTP connections.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: allow media expectations with wildcard source address
Patrick McHardy [Wed, 26 Mar 2008 03:25:32 +0000 (20:25 -0700)]
[NETFILTER]: nf_conntrack_sip: allow media expectations with wildcard source address

Media streams can come from anywhere, add a module parameter which
controls whether wildcard expectations or expectations between the
two signalling endpoints are created.

Since the same media description sent on multiple connections may
results in multiple identical expections when using a wildcard source,
we need to check whether a similar expectation already exists for a
different connection before attempting to register it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: create signalling expectations
Patrick McHardy [Wed, 26 Mar 2008 03:25:13 +0000 (20:25 -0700)]
[NETFILTER]: nf_conntrack_sip: create signalling expectations

Create expectations for incoming signalling connections when seeing
a REGISTER request. This is needed when the registrar uses a
different source port number for signalling messages and for receiving
incoming calls from other endpoints than the registrar.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_nat_sip: translate all Contact headers
Patrick McHardy [Wed, 26 Mar 2008 03:24:57 +0000 (20:24 -0700)]
[NETFILTER]: nf_nat_sip: translate all Contact headers

The SIP message may contain multiple Contact: addresses referring to
the NATed endpoint, translate all of them.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_nat_sip: translate all Via headers
Patrick McHardy [Wed, 26 Mar 2008 03:24:41 +0000 (20:24 -0700)]
[NETFILTER]: nf_nat_sip: translate all Via headers

Update maddr=, received= and rport= Via-header parameters refering to
the signalling connection.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: introduce URI and header parameter parsing helpers
Patrick McHardy [Wed, 26 Mar 2008 03:24:24 +0000 (20:24 -0700)]
[NETFILTER]: nf_conntrack_sip: introduce URI and header parameter parsing helpers

Introduce URI and header parameter parsing helpers. These are needed
by the conntrack helper to parse expiration values in Contact: header
parameters and by the NAT helper to properly update the Via-header
rport=, received= and maddr= parameters.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: flush expectations on call termination
Patrick McHardy [Wed, 26 Mar 2008 03:24:04 +0000 (20:24 -0700)]
[NETFILTER]: nf_conntrack_sip: flush expectations on call termination

Flush the RTP expectations we've created when a call is hung up or
terminated otherwise.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: process ACK and PRACK methods
Patrick McHardy [Wed, 26 Mar 2008 03:22:53 +0000 (20:22 -0700)]
[NETFILTER]: nf_conntrack_sip: process ACK and PRACK methods

Both may contains SDP offers/answers.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: perform NAT after parsing
Patrick McHardy [Wed, 26 Mar 2008 03:22:37 +0000 (20:22 -0700)]
[NETFILTER]: nf_conntrack_sip: perform NAT after parsing

Perform NAT last after parsing the packet. This makes no difference
currently, but is needed when dealing with registrations to make
sure we seen the unNATed addresses.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: support method specific request/response handling
Patrick McHardy [Wed, 26 Mar 2008 03:22:20 +0000 (20:22 -0700)]
[NETFILTER]: nf_conntrack_sip: support method specific request/response handling

Add support for per-method request/response handlers and perform SDP
parsing for INVITE/UPDATE requests and for all informational and
successful responses.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: move SDP parsing to seperate function
Patrick McHardy [Wed, 26 Mar 2008 03:19:46 +0000 (20:19 -0700)]
[NETFILTER]: nf_conntrack_sip: move SDP parsing to seperate function

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_nat_sip: get rid of text based header translation
Patrick McHardy [Wed, 26 Mar 2008 03:19:30 +0000 (20:19 -0700)]
[NETFILTER]: nf_nat_sip: get rid of text based header translation

Use the URI parsing helper to get the numerical addresses and get rid of the
text based header translation.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: introduce SIP-URI parsing helper
Patrick McHardy [Wed, 26 Mar 2008 03:19:13 +0000 (20:19 -0700)]
[NETFILTER]: nf_conntrack_sip: introduce SIP-URI parsing helper

Introduce a helper function to parse a SIP-URI in a header value, optionally
iterating through all headers of this kind.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: parse SIP headers properly
Patrick McHardy [Wed, 26 Mar 2008 03:18:57 +0000 (20:18 -0700)]
[NETFILTER]: nf_conntrack_sip: parse SIP headers properly

Introduce new function for SIP header parsing that properly deals with
continuation lines and whitespace in headers and use it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: kill request URI "header" definitions
Patrick McHardy [Wed, 26 Mar 2008 03:18:40 +0000 (20:18 -0700)]
[NETFILTER]: nf_conntrack_sip: kill request URI "header" definitions

The request URI is not a header and needs to be treated differently than
real SIP headers. Add a seperate function for parsing it and get rid of
the POS_REQ_URI/POS_REG_REQ_URI definitions.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: add seperate SDP header parsing function
Patrick McHardy [Wed, 26 Mar 2008 03:17:55 +0000 (20:17 -0700)]
[NETFILTER]: nf_conntrack_sip: add seperate SDP header parsing function

SDP and SIP headers are quite different, SIP can have continuation lines,
leading and trailing whitespace after the colon and is mostly case-insensitive
while SDP headers always begin on a new line and are followed by an equal
sign and the value, without any whitespace.

Introduce new SDP header parsing function and convert all users that used
the SIP header parsing function. This will allow to properly deal with the
special SIP cases in the SIP header parsing function later.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: use strlen/strcmp
Patrick McHardy [Wed, 26 Mar 2008 03:17:36 +0000 (20:17 -0700)]
[NETFILTER]: nf_conntrack_sip: use strlen/strcmp

Replace sizeof/memcmp by strlen/strcmp. Use case-insensitive comparison
for SIP methods and the SIP/2.0 string, as specified in RFC 3261.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: remove redundant function arguments
Patrick McHardy [Wed, 26 Mar 2008 03:17:13 +0000 (20:17 -0700)]
[NETFILTER]: nf_conntrack_sip: remove redundant function arguments

The conntrack reference and ctinfo can be derived from the packet.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_conntrack_sip: adjust dptr and datalen after packet mangling
Patrick McHardy [Wed, 26 Mar 2008 03:16:54 +0000 (20:16 -0700)]
[NETFILTER]: nf_conntrack_sip: adjust dptr and datalen after packet mangling

After mangling the packet, the pointer to the data and the length of the data
portion may change and need to be adjusted.

Use double data pointers and a pointer to the length everywhere and add a
helper function to the NAT helper for performing the adjustments.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMarvell PHY m88e1111 driver fix
Alexandr Smirnov [Tue, 18 Mar 2008 21:37:24 +0000 (00:37 +0300)]
Marvell PHY m88e1111 driver fix

Marvell PHY m88e1111 (not sure about other models, but think they too)
works in two modes: fiber and copper. In Marvell PHY driver (that we
have in current community kernels) code supported only copper mode,
and this is not configurable, bits for copper mode are simply written
in registers during PHY initialization.

This patch adds support for both modes.

Signed-off-by: Alexandr Smirnov <asmirnov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: fix rx dropped stats
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:51 +0000 (19:59 -0700)]
netxen: fix rx dropped stats

Don't count rx dropped packets based on return value of netif_receive_skb(),
which is misleading.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: remove low level tx lock
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:50 +0000 (19:59 -0700)]
netxen: remove low level tx lock

o eliminate tx lock in netxen adapter struct, instead pound on netdev
  tx lock appropriately.
o remove old "concurrent transmit" code that unnecessarily drops and
  reacquires tx lock in hard_xmit_frame(), this is already serialized
  the netdev xmit lock.
o reduce scope of tx lock in tx cleanup. tx cleanup operates on
  different section of the ring than transmitting cpus and is
  guarded by producer and consumer indices. This fixes a race
  caused by rx softirq preemption on realtime kernels.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: napi and irq cleanup
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:49 +0000 (19:59 -0700)]
netxen: napi and irq cleanup

o separate and simpler irq handler for msi interrupts, avoids few checks
  than legacy mode.
o avoid redudant tx_has_work() and rx_has_work() checks in interrupt
  and napi, which can uncork irq based on racy (lockless) access to tx
  and rx ring indices. If we get interrupt, there's sufficient reason to
  schedule napi.
o replenish rx ring more often, remove self-imposed threshold rcv_free
  that prevents posting rx desc to card. This improves performance in
  low memory.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetxen: improve msi support
Dhananjay Phadke [Tue, 18 Mar 2008 02:59:48 +0000 (19:59 -0700)]
netxen: improve msi support

Recent netxen firmware has new scheme of generating MSI interrupts, it
raises interrupt and blocks itself, waiting for driver to unmask. This
reduces chance of spurious interrupts.

The driver will be able to deal with older firmware as well.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosmc91x: fix build breakage from the SMC_GET_MAC_ADDR API upgrade
Bryan Wu [Mon, 17 Mar 2008 21:18:31 +0000 (14:18 -0700)]
smc91x: fix build breakage from the SMC_GET_MAC_ADDR API upgrade

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Deepak Saxena <dsaxena@plexity.net>
Cc: Nicolas Pitre <nico@cam.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb: remove unused variable
Julia Lawall [Mon, 17 Mar 2008 17:12:27 +0000 (10:12 -0700)]
ixgb: remove unused variable

The variable num_group_tail_writes is initialized but never used otherwise.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe100: endianness annotations
Al Viro [Sun, 16 Mar 2008 22:21:44 +0000 (22:21 +0000)]
e100: endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoigb trivial annotations
Al Viro [Sun, 16 Mar 2008 22:23:24 +0000 (22:23 +0000)]
igb trivial annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoigb: endianness fix
Al Viro [Sun, 16 Mar 2008 22:43:06 +0000 (22:43 +0000)]
igb: endianness fix

le16_to_cpu() should be done before mask and shift...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agobonding: update version
Jay Vosburgh [Sat, 22 Mar 2008 05:29:36 +0000 (22:29 -0700)]
bonding: update version

Update version to 3.2.5.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agobonding: Fix sysfs attribute handling
Libor Pechacek [Sat, 22 Mar 2008 05:29:35 +0000 (22:29 -0700)]
bonding: Fix sysfs attribute handling

For bonding interfaces any attempt to read the sysfs directory contents after
module removal results in an oops.  The fix is to release sysfs attributes
for the interfaces upon module unload.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>