Mike McCormack [Fri, 12 Feb 2010 06:58:02 +0000 (06:58 +0000)]
sky2: Factor out code to calculate packet sizes
Move code to calculate receive threshold and packet size out of
sky2_rx_start() so that is can be called from elsewhere easily.
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Fri, 12 Feb 2010 06:58:01 +0000 (06:58 +0000)]
sky2: jumbo packet changes
Change how FIFO is programmed in jumbo mode (to match vendor driver).
Mostly cosmetic, the only register change is that the bits 22,23
are not programemd used.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Fri, 12 Feb 2010 06:58:00 +0000 (06:58 +0000)]
sky2: dont enable PME legacy mode
This bit is not changed by vendor driver, and should be left alone.
The documentation implies this a debug bit.
0 = WAKE# only asserted when VMAIN not available
1 = WAKE# is depend on wake events and independent of VMAIN.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Fri, 12 Feb 2010 06:57:59 +0000 (06:57 +0000)]
sky2: WoL changes
Change Wake On Lan code to be similar to vendor driver. The definition
of Y2_HW_WOL_ON is confusing; what it means is transition to firmware SPI
setting when doing power change.
Since same code is done for both shutdown and suspend, use common
code path.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Fri, 12 Feb 2010 06:57:58 +0000 (06:57 +0000)]
sky2: fix sparse warning
Warning about hidden variable
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
jamal [Tue, 9 Feb 2010 13:21:17 +0000 (13:21 +0000)]
xfrm: use proper kernel types
kernel side should use uxx instead of __uxx types
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
jamal [Tue, 9 Feb 2010 03:59:38 +0000 (03:59 +0000)]
xfrm: validate attributes
Some XFRM attributes were not going through basic validation.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 11:49:53 +0000 (11:49 +0000)]
drivers/net/skge.c: Use netif_printk macros
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 11:49:52 +0000 (11:49 +0000)]
drivers/net/qlge: Use netif_printk helpers
Convert QPRINTK macros to netif_<level> equivalents.
Expands and standardizes the logging message output.
Removes __func__ from most logging messages.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 11:49:51 +0000 (11:49 +0000)]
drivers/net/jme: Use netif_printk helpers
Convert uses of msg_<type> to netif_<level>(
Remove msg_<type> macros
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 11:49:50 +0000 (11:49 +0000)]
drivers/net/r8196.c: Use netif_printk macros
Simplify the logic a bit, make the message logs a bit more consistent.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 11:49:49 +0000 (11:49 +0000)]
include/linux/netdevice.h: Add netif_printk helpers
Add macros to test a private structure for msg_enable bits
and the netif_msg_##bit to test and call netdev_printk if set
Simplifies logic in callers and adds message logging consistency
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 11:49:48 +0000 (11:49 +0000)]
drivers/net/atl1e: Use netdev_printk helpers
Logging messages sometimes had duplicated "ATL1E" output.
For instance:
ATL1E 0000:03:00.0: ATL1E: eth0 NIC Link is Up<100 Mbps Full Duplex>
is now:
ATL1E 0000:03:00.0: eth0: NIC Link is Up <100 Mbps Full Duplex>
Add some consistency to logging messages
Add some missing \n's to logging messages
Miscellaneous typo spelling corrections
Change atl1e_validate_option argument from pdev to adapter
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 11:49:47 +0000 (11:49 +0000)]
netdevice.h: Add netdev_printk helpers like dev_printk
These netdev_printk routines take a struct net_device * and emit
dev_printk logging messages adding "%s: " ... netdev->dev.parent
to the dev_printk format and arguments.
This can create some uniformity in the output message log.
These helpers should not be used until a successful alloc_netdev.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Mon, 8 Feb 2010 19:48:52 +0000 (19:48 +0000)]
IPv6: remove trivial nested _bh suffix
Don't need to disable bottom half it is already down in the
previous lock. Move some blank lines to group locking in same
context.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Mon, 8 Feb 2010 19:48:05 +0000 (19:48 +0000)]
IPv6: keep permanent addresses on admin down
Permanent IPV6 addresses should not be removed when the link is
set to admin down, only when device is removed.
When link is lost permanent addresses should be marked as tentative
so that when link comes back they are subject to duplicate address
detection (if DAD was enabled for that address).
Other routing systems keep manually configured IPv6 addresses
when link is set down.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Mon, 8 Feb 2010 17:51:26 +0000 (17:51 +0000)]
be2net: bug fix in be_read_eeprom
The offset to read the eeprom data was missing and
wrong eeprom data was being dumped. This patch fixes this.
>From Suresh R <sureshr@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 9 Feb 2010 01:39:05 +0000 (01:39 +0000)]
be2net: remove ASIC generation number from Kconfig
Since the driver is supporting multiple generations of the ASIC
don't mention any ASIC generation number.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 9 Feb 2010 01:38:06 +0000 (01:38 +0000)]
be2net: change the driver description
Since the driver is supporting multiple generations of the ASIC
remove ASIC generation information from the driver description.
This information is displayed by modinfo.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 9 Feb 2010 01:34:57 +0000 (01:34 +0000)]
be2net: fix to limit max vlans supported in certain skews
In certain skews the ASIC can support only 16 vlans per interface.
Once the limit is crossed, the ASIC is programmed in vlan promiscuous mode.
Switch off the vlan promiscuous mode once the number of vlans
falls back to the max vlans supported.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 9 Feb 2010 01:34:21 +0000 (01:34 +0000)]
be2net: minor code optimizations
Couple of code optimizations in the Rx path (to avoid a memset).
From: Sathya P <sathyap@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 9 Feb 2010 01:32:43 +0000 (01:32 +0000)]
be2net: bug fix in be_change_mtu
Current code allows the new mtu to cross the supported value.
This patch fixes the boundary checks.
From: Suresh R <sureshr@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 9 Feb 2010 01:30:35 +0000 (01:30 +0000)]
be2net: bug fix for flashing the BladeEngine3 ASIC
Now flashing both BE2 and BE3 devices is supported.
From: Naresh G <nareshg@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 9 Feb 2010 01:28:35 +0000 (01:28 +0000)]
be2net: remove unused pci device id
We are not going to use this device id.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Shirley Ma [Mon, 8 Feb 2010 14:14:42 +0000 (14:14 +0000)]
virtio_net: remove send queue
Now we have a virtio detach API (in commit
f9bfbebf34eab707b065116cdc9699d25ba4252a), we don't need to track xmit
skbs in the virio_net driver, which improves transmission performance.
Signed-off-by: Shirley Ma <xma@us.ibm.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tristram Ha [Mon, 8 Feb 2010 11:40:04 +0000 (11:40 +0000)]
net: Makefile change for KSZ884X driver
Add Micrel KSZ884X network driver for KSZ8841/KSZ8842 PCI Ethernet chips.
Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tristram Ha [Mon, 8 Feb 2010 11:38:28 +0000 (11:38 +0000)]
net: Kconfig change for KSZ884X driver
Add Micrel KSZ8841/KSZ8842 PCI Ethernet chip support.
Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tristram Ha [Mon, 8 Feb 2010 11:36:53 +0000 (11:36 +0000)]
net: Micrel KSZ8841/2 PCI Ethernet driver
This is a new network driver for Micrel KSZ8841/KSZ8842 PCI Ethernet chips. The same driver can run both chips at the same time. It supports IPv4 TCP hardware checksumming and so can use scatter/gather transmission.
The KSZ8842 switch has 2 ports. Some users like to take direct control of those ports. So KSZ8842 has a multiple devices mode in which the driver creates another network device so that users can specify which port to send packets. This mode is enabled by passing the "multi_dev=1" parameter to the driver during loading.
The KSZ884X can receive huge frames with size up to 1916 bytes. To use this feature change the network device MTU from 1500 to 1898.
The KSZ884X driver has 3 packet receive processing functions for the normal mode, multiple devices mode, and huge frame mode. Those functions are identical except for more checking for the new features. In normal programming point of view the huge frame version is the one to use because it covers all the cases, but this is done for performance consideration because the target clients for the KSZ884X chips are embedded systems, which unlike desktop PC may not have powerful CPU.
Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Fri, 12 Feb 2010 20:10:47 +0000 (12:10 -0800)]
net: move am79c961's probe function to .devinit.text
A pointer to am79c961_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Mon, 8 Feb 2010 05:19:03 +0000 (05:19 +0000)]
ipv6: fib: fix crash when changing large fib while dumping it
When the fib size exceeds what can be dumped in a single skb, the
dump is suspended and resumed once the last skb has been received
by userspace. When the fib is changed while the dump is suspended,
the walker might contain stale pointers, causing a crash when the
dump is resumed.
BUG: unable to handle kernel NULL pointer dereference at
0000000000000018
IP: [<
ffffffffa01bce04>] fib6_walk_continue+0xbb/0x124 [ipv6]
PGD
5347a067 PUD 65c7067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
...
RIP: 0010:[<
ffffffffa01bce04>]
[<
ffffffffa01bce04>] fib6_walk_continue+0xbb/0x124 [ipv6]
...
Call Trace:
[<
ffffffff8104aca3>] ? mutex_spin_on_owner+0x59/0x71
[<
ffffffffa01bd105>] inet6_dump_fib+0x11b/0x1b9 [ipv6]
[<
ffffffff81371af4>] netlink_dump+0x5b/0x19e
[<
ffffffff8134f288>] ? consume_skb+0x28/0x2a
[<
ffffffff81373b69>] netlink_recvmsg+0x1ab/0x2c6
[<
ffffffff81372781>] ? netlink_unicast+0xfa/0x151
[<
ffffffff813483e0>] __sock_recvmsg+0x6d/0x79
[<
ffffffff81348a53>] sock_recvmsg+0xca/0xe3
[<
ffffffff81066d4b>] ? autoremove_wake_function+0x0/0x38
[<
ffffffff811ed1f8>] ? radix_tree_lookup_slot+0xe/0x10
[<
ffffffff810b3ed7>] ? find_get_page+0x90/0xa5
[<
ffffffff810b5dc5>] ? filemap_fault+0x201/0x34f
[<
ffffffff810ef152>] ? fget_light+0x2f/0xac
[<
ffffffff813519e7>] ? verify_iovec+0x4f/0x94
[<
ffffffff81349a65>] sys_recvmsg+0x14d/0x223
Store the serial number when beginning to walk the fib and reload
pointers when continuing to walk after a change occured. Similar
to other dumping functions, this might cause unrelated entries to
be missed when entries are deleted.
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gerrit Renker [Sun, 7 Feb 2010 20:20:28 +0000 (20:20 +0000)]
dccp: allow probing of CCID-array length
This fixes a problem in the DCCP getsockopt() API: currently there is no way
for a user to a priori know the number of built-in CCIDs, other than trying
DCCP_SOCKOPT_AVAILABLE_CCIDS in a loop, incrementing the option length until
EINVAL is no longer returned.
This patch truncates the array to the user-provided length. No copy is made
when the length is <= 0.
Due to the length restriction in do_dccp_getsockopt() to sizeof(int), the
minimum array length remains 4, which is a reasonable default (only 3
CCIDs, CCID-2..4, are currently defined).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Mon, 8 Feb 2010 05:12:08 +0000 (05:12 +0000)]
macb: straighten out macb_mii_probe function
Use "phy_find_first" instead of manual lookup. Also use "phy_connect_direct"
instead of "phy_connect" since we already have phy_device pointer here.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Mon, 8 Feb 2010 04:30:35 +0000 (04:30 +0000)]
net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.
Jirka
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Roland Dreier [Thu, 11 Feb 2010 20:14:23 +0000 (12:14 -0800)]
ethtool: Use explicit designated initializers for .cmd
Initialize the .cmd member of various ethtool using a designated struct
initializer rather. This makes things a teeny bit more robust, although
the chance of a struct layout changing is extremely remote, and also
makes the code a little easier to read.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter Waskiewicz [Wed, 10 Feb 2010 16:08:13 +0000 (16:08 +0000)]
ixgbe: Bump driver version up
Driver has gone under significant changes, the version should
reflect that.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter Waskiewicz [Wed, 10 Feb 2010 16:07:54 +0000 (16:07 +0000)]
ixgbe: Add support for the new ethtool n-tuple programming interface
This patch adds n-tuple filter programming to 82599.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter P Waskiewicz Jr [Thu, 11 Feb 2010 04:03:05 +0000 (20:03 -0800)]
ethtool: Introduce n-tuple filter programming support
This patchset enables the ethtool layer to program n-tuple
filters to an underlying device. The idea is to allow capable
hardware to have static rules applied that can assist steering
flows into appropriate queues.
Hardware that is known to support these types of filters today
are ixgbe and niu.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Sun, 7 Feb 2010 06:28:36 +0000 (06:28 +0000)]
sky2: receive checksum refactoring
Break the largish case for handling receive checksum into a separate
function, and if there is a problem use dev_XXX routines to
show which hardware is the problem.
Turn one corner case into a BUG(). This only happens if the driver
is expecting one behavior but the chip does the old behavior;
only ever saw this when bringing up a new chip type and driver
was buggy.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Sun, 7 Feb 2010 06:24:50 +0000 (06:24 +0000)]
sky2: disable ASF on Yukon Supreme
Clone of vendor code to disable ASF on Extreme and Supreme chips.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Sun, 7 Feb 2010 06:23:53 +0000 (06:23 +0000)]
sky2: resume clocks
Change the resume path to use pci write config for a couple of reasons:
1. pci_write_config_dword() allows for more error
checking of PCI health after resume.
2. better to toggle this register on all chip types, since that
is what vendor driver does.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Amit Kucheria [Fri, 5 Feb 2010 08:56:22 +0000 (08:56 +0000)]
fec: Add ARCH_MX5 as a dependency
i.MX51 babbage board has a FEC ethernet controller
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Amit Kucheria [Fri, 5 Feb 2010 08:56:21 +0000 (08:56 +0000)]
fec: Add LAN8700 phy support
The i.MX51 babbage board has a FEC ethernet controller with this phy.
In the long term we should resurrect the phylib patches for fec.
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rob Herring [Fri, 5 Feb 2010 08:56:20 +0000 (08:56 +0000)]
fec: fix uninitialized rx buffer usage
The fec driver was enabling receive buffer descriptor without allocating
the buffers. Make sure the buffer descriptors are initialized to not
start receiving packets.
Open also calls fec_restart after the rx buffers are allocated. With the code
in fec_restart, it zeroes out the buffer descriptors that have just been
setup.
Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:21:51 +0000 (23:21 +0000)]
net: atm: use seq_list_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:21:22 +0000 (23:21 +0000)]
net: ipx: use seq_list_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:21:05 +0000 (23:21 +0000)]
net: irda: use seq_list_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:20:42 +0000 (23:20 +0000)]
net: x25: use seq_list_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:20:29 +0000 (23:20 +0000)]
net: af_key: use seq_hlist_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:20:15 +0000 (23:20 +0000)]
net: appletalk: use seq_hlist_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:19:59 +0000 (23:19 +0000)]
net: ax25: use seq_hlist_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:19:42 +0000 (23:19 +0000)]
net: netrom: use seq_hlist_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:19:29 +0000 (23:19 +0000)]
net: packet: use seq_hlist_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:19:17 +0000 (23:19 +0000)]
net: rose: use seq_hlist_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:19:04 +0000 (23:19 +0000)]
net: x25: use seq_hlist_foo() helpers
Simplify seq_file code.
Signed-off-by: Li Zefan <lizf@cn.fujtisu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:18:45 +0000 (23:18 +0000)]
net: add a wrapper sk_entry()
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Mon, 8 Feb 2010 23:18:22 +0000 (23:18 +0000)]
seq_file: Add helpers for iteration over a hlist
Some places in kernel need to iterate over a hlist in seq_file,
so provide some common helpers.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 9 Feb 2010 19:44:44 +0000 (11:44 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 9 Feb 2010 06:45:56 +0000 (22:45 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6
Julia Lawall [Tue, 9 Feb 2010 06:44:18 +0000 (22:44 -0800)]
drivers/net: Correct NULL test
Test the value that was just allocated rather than the previously tested one.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
expression *x;
expression e;
identifier l;
@@
if (x == NULL || ...) {
... when forall
return ...; }
... when != goto l;
when != x = e
when != &x
*x == NULL
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 9 Feb 2010 06:42:40 +0000 (22:42 -0800)]
MAINTAINERS: networking drivers - Add git net-next tree
During the rc period, patches that are not bugfixes
should be done using the net-next tree.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jan Luebbe [Tue, 9 Feb 2010 06:41:44 +0000 (22:41 -0800)]
net/sched: Fix module name in Kconfig
The action modules have been prefixed with 'act_', but the Kconfig
description was not changed.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Tue, 9 Feb 2010 06:37:24 +0000 (22:37 -0800)]
cxgb3: fix GRO checksum check
Verify the HW checksum state for frames handed to GRO processing.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 8 Feb 2010 23:00:39 +0000 (15:00 -0800)]
dst: call cond_resched() in dst_gc_task()
Kernel bugzilla #15239
On some workloads, it is quite possible to get a huge dst list to
process in dst_gc_task(), and trigger soft lockup detection.
Fix is to call cond_resched(), as we run in process context.
Reported-by: Pawel Staszewski <pstaszewski@itcare.pl>
Tested-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Mon, 8 Feb 2010 19:18:07 +0000 (11:18 -0800)]
netfilter: nf_conntrack: fix hash resizing with namespaces
As noticed by Jon Masters <jonathan@jonmasters.org>, the conntrack hash
size is global and not per namespace, but modifiable at runtime through
/sys/module/nf_conntrack/hashsize. Changing the hash size will only
resize the hash in the current namespace however, so other namespaces
will use an invalid hash size. This can cause crashes when enlarging
the hashsize, or false negative lookups when shrinking it.
Move the hash size into the per-namespace data and only use the global
hash size to initialize the per-namespace value when instanciating a
new namespace. Additionally restrict hash resizing to init_net for
now as other namespaces are not handled currently.
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Mon, 8 Feb 2010 19:17:43 +0000 (11:17 -0800)]
netfilter: xtables: compat out of scope fix
As per C99 6.2.4(2) when temporary table data goes out of scope,
the behaviour is undefined:
if (compat) {
struct foo tmp;
...
private = &tmp;
}
[dereference private]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
Alexey Dobriyan [Mon, 8 Feb 2010 19:17:22 +0000 (11:17 -0800)]
netfilter: nf_conntrack: restrict runtime expect hashsize modifications
Expectation hashtable size was simply glued to a variable with no code
to rehash expectations, so it was a bug to allow writing to it.
Make "expect_hashsize" readonly.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
Eric Dumazet [Mon, 8 Feb 2010 19:16:56 +0000 (11:16 -0800)]
netfilter: nf_conntrack: per netns nf_conntrack_cachep
nf_conntrack_cachep is currently shared by all netns instances, but
because of SLAB_DESTROY_BY_RCU special semantics, this is wrong.
If we use a shared slab cache, one object can instantly flight between
one hash table (netns ONE) to another one (netns TWO), and concurrent
reader (doing a lookup in netns ONE, 'finding' an object of netns TWO)
can be fooled without notice, because no RCU grace period has to be
observed between object freeing and its reuse.
We dont have this problem with UDP/TCP slab caches because TCP/UDP
hashtables are global to the machine (and each object has a pointer to
its netns).
If we use per netns conntrack hash tables, we also *must* use per netns
conntrack slab caches, to guarantee an object can not escape from one
namespace to another one.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
[Patrick: added unique slab name allocation]
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
Patrick McHardy [Mon, 8 Feb 2010 19:16:26 +0000 (11:16 -0800)]
netfilter: nf_conntrack: fix memory corruption with multiple namespaces
As discovered by Jon Masters <jonathan@jonmasters.org>, the "untracked"
conntrack, which is located in the data section, might be accidentally
freed when a new namespace is instantiated while the untracked conntrack
is attached to a skb because the reference count it re-initialized.
The best fix would be to use a seperate untracked conntrack per
namespace since it includes a namespace pointer. Unfortunately this is
not possible without larger changes since the namespace is not easily
available everywhere we need it. For now move the untracked conntrack
initialization to the init_net setup function to make sure the reference
count is not re-initialized and handle cleanup in the init_net cleanup
function to make sure namespaces can exit properly while the untracked
conntrack is in use in other namespaces.
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 6 Feb 2010 00:29:48 +0000 (16:29 -0800)]
packet: Kill CONFIG_PACKET_MMAP.
Early on this was an experimental facility that few
people other than Alexey Kuznetsov played with.
Now it's a pretty fundamental thing and as people add
more features to AF_PACKET sockets this config options
creates ifdef spaghetti.
So kill it off.
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Poole [Fri, 5 Feb 2010 17:23:43 +0000 (12:23 -0500)]
Bluetooth: Keep a copy of each HID device's report descriptor
The report descriptor is read by user space (via the Service
Discovery Protocol), so it is only available during the ioctl
to connect. However, the HID probe function that needs the
descriptor might not be called until a specific module is
loaded. Keep a copy of the descriptor so it is available for
later use.
Signed-off-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Jiri Pirko [Fri, 5 Feb 2010 02:52:39 +0000 (02:52 +0000)]
net: e1000e: convert to use mc helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Fri, 5 Feb 2010 02:51:24 +0000 (02:51 +0000)]
net: dm9601: convert to use mc helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Fri, 5 Feb 2010 02:48:11 +0000 (02:48 +0000)]
net: 8139too: convert to use mc helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Fri, 5 Feb 2010 02:47:28 +0000 (02:47 +0000)]
net: 8139cp: convert to use mc helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 5 Feb 2010 06:31:41 +0000 (22:31 -0800)]
e1000e: Fix namespace conflicts wrt. e1000_has_link
Reported by Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Fri, 5 Feb 2010 04:28:48 +0000 (20:28 -0800)]
bridge: Remove unused age_list
This patch removes the unused age_list member from the net_bridge
structure.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sridhar Samudrala [Fri, 5 Feb 2010 04:24:10 +0000 (20:24 -0800)]
packet: Add GSO/csum offload support.
This patch adds GSO/checksum offload to af_packet sockets using
virtio_net_hdr. Based on Rusty's patch to add this support to tun.
It allows GSO/checksum offload to be enabled when using raw socket
backend with virtio_net.
Adds PACKET_VNET_HDR socket option to prepend virtio_net_hdr in the
receive path and process/skip virtio_net_hdr in the send path. This
option is only allowed with SOCK_RAW sockets attached to ethernet
type devices.
v2 updates
----------
Michael's Comments
- Perform length check in packet_snd() when GSO is off even when
vnet_hdr is present.
- Check for SKB_GSO_FCOE type and return -EINVAL
- don't allow tx/rx ring when vnet_hdr is enabled.
Herbert's Comments
- Removed ethernet specific code.
- protocol value is assumed to be passed in by the caller.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Breno Leitao [Thu, 4 Feb 2010 10:11:19 +0000 (10:11 +0000)]
qlge: Code clean up
Just reordering this assignment that doesn't depend on any
condition.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Breno Leitao [Thu, 4 Feb 2010 10:11:18 +0000 (10:11 +0000)]
qlge: removing unreachable block of code
Currently the qlge_change_mtu() is never called if the new_mtu is
equal current MTU, due this condition on dev_set_mtu():
if (new_mtu == dev->mtu)
return 0;
So, this block of code is never reached and is being removed.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Christoph Egger [Wed, 3 Feb 2010 06:05:54 +0000 (06:05 +0000)]
ipv4: obsolete config in kernel source (IP_ROUTE_PERVASIVE)
CONFIG_IP_ROUTE_PERVASIVE is missing a corresponding config
IP_ROUTE_PERVASIVE somewhere in KConfig (and missing it for ages
already) so it looks like some aging artefact no longer needed.
Therefor this patch kills of the only remaining reference to that
config Item removing the already unrechable code snipet.
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rafael J. Wysocki [Thu, 4 Feb 2010 22:00:41 +0000 (14:00 -0800)]
pktgen: Fix freezing problem
Add missing try_to_freeze() to one of the pktgen_thread_worker() code
paths so that it doesn't block suspend/hibernation.
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=15006
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Ciprian Dorin Craciun <ciprian.craciun@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Brian Haley [Thu, 4 Feb 2010 21:36:50 +0000 (13:36 -0800)]
doc: document IPv6 parameters
Update documentation to describe IPv6 parameters.
Reported by <greg@enjellic.com>.
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 4 Feb 2010 21:32:46 +0000 (13:32 -0800)]
qlge: Add watchdog timer.
Add periodic heartbeat register read to trigger the eeh
recovery process.
We see cases where an eeh error was injected and the slot was
suspended. An asic access attempt is required to flush the recovery process,
but without interrupts the process can stall.
Adding this periodic register read causes the recovery process to begin.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Thu, 4 Feb 2010 18:23:02 +0000 (10:23 -0800)]
libphy: add phy_find_first function
Many drivers do this in them manually. Now they can use this function.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Thu, 4 Feb 2010 18:22:25 +0000 (10:22 -0800)]
net: use helpers to access mc list V2
This patch introduces the similar helpers as those already done for uc list.
However multicast lists are no list_head lists but "mademanually". The three
macros added by this patch will make the transition of mc_list to list_head
smooth in two steps:
1) convert all drivers to use these macros (with the original iterator of type
"struct dev_mc_list")
2) once all drivers are converted, convert list type and iterators to "struct
netdev_hw_addr" in one patch.
>From now on, drivers can (and should) use "netdev_for_each_mc_addr" to iterate
over the addresses with iterator of type "struct netdev_hw_addr". Also macros
"netdev_mc_count" and "netdev_mc_empty" to read list's length. This is the state
which should be reached in all drivers.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Wed, 3 Feb 2010 21:59:51 +0000 (21:59 +0000)]
igb: make certain to reassign legacy interrupt vectors after reset
This change corrects an issue that will cause false hangs when using either
82575 or 82580 in legacy interrupt mode. The issue is caused when there is
a slow traffic flow and an "ethtool -r" is executed while using legacy or
MSI interrupts. MSI-X is not affected by this issue due to the fact that
we were already reconfiguring the vectors after reset.
If possible it would be best to push this for net-2.6 since it is resolving
a bug but if that is not possible then net-next-2.6 will be fine.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Giuseppe Cavallaro [Thu, 4 Feb 2010 17:33:21 +0000 (09:33 -0800)]
stmmac: fix 'lenght' typo in comments and code
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thadeu Lima de Souza Cascardo [Thu, 4 Feb 2010 17:21:28 +0000 (09:21 -0800)]
can: ems_usb: removed duplicated code setting local echo support
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 4 Feb 2010 16:58:14 +0000 (08:58 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6
Stephen Hemminger [Wed, 3 Feb 2010 08:31:12 +0000 (08:31 +0000)]
sky2: Flow control frames recorded as dropped packets
Thanks for your patch. A more general solution would be to move the
rx_dropped up into sky2_receive.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Mon, 1 Feb 2010 13:45:41 +0000 (13:45 +0000)]
sky2: hand receive DMA mapping failures
If receive buffer mapping failed, then it was possible to get
stuck with unmapped receive buffer in DMA ring.
This would be an extremely rare condition because the driver had just
released the map for the last receive so it should be able to get
another map again (in soft-irq).
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Mon, 1 Feb 2010 09:44:19 +0000 (09:44 +0000)]
net: CONFIG_COMPAT redux
Ifdef out
struct proto_ops::compat_ioctl
struct proto_ops::compat_setsockopt
struct proto_ops::compat_getsockopt
to make structures smaller on COMPAT=n kernels.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Christian Pellegrin [Wed, 3 Feb 2010 07:39:54 +0000 (07:39 +0000)]
can: mcp251x: Move to threaded interrupts instead of workqueues.
This patch addresses concerns about efficiency of handling incoming
packets. Handling of interrupts is done in a threaded interrupt handler
which has a smaller latency than workqueues. This change needed a rework
of the locking scheme that was much simplified. Some other (more or less
longstanding) bugs are fixed: utilization of just half of the RX
buffers, useless wait for interrupt on open, more reliable reset
sequence. The MERR interrupt is not used anymore: it overloads the CPU
in error-passive state without any additional information. One shot mode
is disabled because it's not clear if it can be handled efficiently on
this CAN controller.
Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Mon, 1 Feb 2010 14:06:52 +0000 (14:06 +0000)]
bonding: Remove net_device_stats from bonding struct
There is no need to maintain stats in the bonding structure.
Use the instance of net_device_stats in netdevice.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Mon, 1 Feb 2010 21:22:11 +0000 (21:22 +0000)]
drivers/net/davinci_emac.c: Fix continuation line formats
String constants that are continued on subsequent lines with \
are not good.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thadeu Lima de Souza Cascardo [Mon, 1 Feb 2010 07:58:59 +0000 (07:58 +0000)]
trivial: remove duplicated "from" in CAN USB EMS Kconfig help
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Arnd Bergmann [Sat, 30 Jan 2010 12:24:26 +0000 (12:24 +0000)]
net: macvtap driver
In order to use macvlan with qemu and other tools that require
a tap file descriptor, the macvtap driver adds a small backend
with a character device with the same interface as the tun
driver, with a minimum set of features.
Macvtap interfaces are created in the same way as macvlan
interfaces using ip link, but the netif is just used as a
handle for configuration and accounting, while the data
goes through the chardev. Each macvtap interface has its
own character device, simplifying permission management
significantly over the generic tun/tap driver.
Cc: Patrick McHardy <kaber@trash.net>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: David S. Miller" <davem@davemloft.net>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Or Gerlitz <ogerlitz@voltaire.com>
Cc: netdev@vger.kernel.org
Cc: bridge@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Arnd Bergmann [Sat, 30 Jan 2010 12:23:40 +0000 (12:23 +0000)]
macvlan: allow multiple driver backends
This makes it possible to hook into the macvlan driver
from another kernel module. In particular, the goal is
to extend it with the macvtap backend that provides
a tun/tap compatible interface directly on the macvlan
device.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Arnd Bergmann [Sat, 30 Jan 2010 12:23:03 +0000 (12:23 +0000)]
net: maintain namespace isolation between vlan and real device
In the vlan and macvlan drivers, the start_xmit function forwards
data to the dev_queue_xmit function for another device, which may
potentially belong to a different namespace.
To make sure that classification stays within a single namespace,
this resets the potentially critical fields.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 2 Feb 2010 12:43:59 +0000 (12:43 +0000)]
net/rds: remove uses of NIPQUAD, use %pI4
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Grover <andy.grover@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>