]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
13 years agonet: netxen: convert to hw_features
Michał Mirosław [Tue, 5 Apr 2011 01:36:58 +0000 (01:36 +0000)]
net: netxen: convert to hw_features

Rather simple conversion to hw_features.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocapi: Perform scheduled capifs removal
Jan Kiszka [Wed, 6 Apr 2011 10:58:37 +0000 (10:58 +0000)]
capi: Perform scheduled capifs removal

udev fully replaces this special file system that only contains CAPI
NCCI TTY device nodes. User space (pppdcapiplugin) works without
noticing the difference.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSigned bit field; int have_hotplug_status_watch:1
Ian Campbell [Sun, 3 Apr 2011 22:26:24 +0000 (22:26 +0000)]
Signed bit field; int have_hotplug_status_watch:1

Fixes error from sparse:
  CHECK   drivers/net/xen-netback/xenbus.c
drivers/net/xen-netback/xenbus.c:29:40: error: dubious one-bit signed bitfield

        int have_hotplug_status_watch:1;

Reported-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: convert to set_phys_id (v2)
stephen hemminger [Mon, 4 Apr 2011 15:09:25 +0000 (15:09 +0000)]
s2io: convert to set_phys_id (v2)

Convert to new ethtool set physical id model. Remove no longer used
timer, and fix docbook comment.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoniu: convert to new ethtool set_phys_id
stephen hemminger [Mon, 4 Apr 2011 12:31:19 +0000 (12:31 +0000)]
niu: convert to new ethtool set_phys_id

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopcnet32: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:41 +0000 (11:06 +0000)]
pcnet32: convert to set_phys_id

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobenet: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:40 +0000 (11:06 +0000)]
benet: convert to set_phys_id

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:37 +0000 (11:06 +0000)]
bnx2x: convert to set_phys_id

Also cleanup error codes to no lie about things that driver doesn't
support. If device is down report -EAGAIN (same as Broadcom), and
if port doesn't blink then error as well.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:36 +0000 (11:06 +0000)]
bnx2: convert to set_phys_id

In this case, need to add element to device private to hold
original led state.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: convert to set_phys_id
stephen hemminger [Mon, 4 Apr 2011 11:06:35 +0000 (11:06 +0000)]
vxge: convert to set_phys_id

Also fix up incorrect docbook comment

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb3: implement set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:51 +0000 (08:43 +0000)]
cxgb3: implement set_phys_id

Implement new ethtool set_phys_id on Chelsio cxgb3 board.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: implement ethtool set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:50 +0000 (08:43 +0000)]
tg3: implement ethtool set_phys_id

Implement control of LED via set_phys_id.
Note: since PHY is powered off if device is down, this board
only allows blinking if device is up.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoskge: implement set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:42 +0000 (08:43 +0000)]
skge: implement set_phys_id

Implement set_phys_id led control on SysKonnect board.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosky2: support ethtool set_phys_id
stephen hemminger [Mon, 4 Apr 2011 08:43:41 +0000 (08:43 +0000)]
sky2: support ethtool set_phys_id

Use ethtool set_phys_id to control LED. Fixes issues with RTNL being
held for extended periods.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Update version number to 5.0.16
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:36 +0000 (14:28 +0000)]
qlcnic: Update version number to 5.0.16

Bumped up version number to 5.0.16

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Fix LRO disable
Rajesh Borundia [Fri, 1 Apr 2011 14:28:31 +0000 (14:28 +0000)]
qlcnic: Fix LRO disable

o In dev->open LRO was enabled by default, enable it depending
  upon netdev->features , kernel may have disabled it.
o Configure LRO when interface is up.

Signed-off-by: Rajesh Borundia <Rajesh.Borundia@qlogic.com>
Signed-off-by: Anirban Chakraborty <Anirban.Chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Use flt method to determine flash fw region
Sritej Velaga [Fri, 1 Apr 2011 14:28:26 +0000 (14:28 +0000)]
qlcnic: Use flt method to determine flash fw region

Use flash layout table to get flash fw starting address and its size.
If that fails, use legacy method.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Remove unused code
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:21 +0000 (14:28 +0000)]
qlcnic: Remove unused code

Cleaned up unused codes for interrupt coalescence settings

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Changes to VLAN code
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:15 +0000 (14:28 +0000)]
qlcnic: Changes to VLAN code

Made changes to VLAN code comply with new VLAN infrastructure in kernel

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Code optimization patch
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:11 +0000 (14:28 +0000)]
qlcnic: Code optimization patch

Optimized code resulted in achieving lower CPU utilization on transmit path
and higher throughput for small packet sizes (64 bytes).

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Cleanup patch
Anirban Chakraborty [Fri, 1 Apr 2011 14:28:05 +0000 (14:28 +0000)]
qlcnic: Cleanup patch

 1. Changed adapter structure to move away from embedding hardware and
    receive context structs and use pointers to those objects
 2. Packed all the structs that interface with FW
 3. Removed unused code and structs

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Memory leak fix
Sony Chacko [Fri, 1 Apr 2011 14:27:59 +0000 (14:27 +0000)]
qlcnic: Memory leak fix

Fix a memory leak in error path of pci info.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: Make PCI info available in all modes
Sony Chacko [Fri, 1 Apr 2011 14:27:47 +0000 (14:27 +0000)]
qlcnic: Make PCI info available in all modes

Before this fix, PCI info was available only when multiple NIC functions
are present on the same port.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocan: convert protocol handling to RCU
Oliver Hartkopp [Tue, 5 Apr 2011 08:01:16 +0000 (08:01 +0000)]
can: convert protocol handling to RCU

This patch removes spin_locks at CAN socket creation time by using RCU.

Inspired by the discussion with Kurt van Dijck and Eric Dumazet the RCU code
was partly derived from af_phonet.c

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Wed, 6 Apr 2011 19:27:34 +0000 (12:27 -0700)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6

13 years agotg3: Support 4mb flash sizes for 5717 and 5719
Matt Carlson [Tue, 5 Apr 2011 14:22:51 +0000 (14:22 +0000)]
tg3: Support 4mb flash sizes for 5717 and 5719

If a 5717 or 5719 NVRAM part is manually strapped and is 2mb in size,
the driver needs to look at the NVRAM size field rather than infer it
from the strapping itself.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Enable 5720 support
Matt Carlson [Tue, 5 Apr 2011 14:22:50 +0000 (14:22 +0000)]
tg3: Enable 5720 support

This patch adds the 5720 device ID to the PCI table, thus enabling 5720
support.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 PHY ID
Matt Carlson [Tue, 5 Apr 2011 14:22:49 +0000 (14:22 +0000)]
tg3: Add 5720 PHY ID

This patch adds the 5720 PHY ID.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 H2BMC support
Matt Carlson [Tue, 5 Apr 2011 14:22:48 +0000 (14:22 +0000)]
tg3: Add 5720 H2BMC support

This patch adds support for the new Host to BMC feature.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 NVRAM decoding
Matt Carlson [Tue, 5 Apr 2011 14:22:47 +0000 (14:22 +0000)]
tg3: Add 5720 NVRAM decoding

The 5720 implements its own NVRAM pin strapping scheme.  This patch adds
the required support.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add 5720 ASIC rev
Matt Carlson [Tue, 5 Apr 2011 14:22:46 +0000 (14:22 +0000)]
tg3: Add 5720 ASIC rev

This patch adds support for the 5720 ASIC rev.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Reintroduce 5717_PLUS
Matt Carlson [Tue, 5 Apr 2011 14:22:45 +0000 (14:22 +0000)]
tg3: Reintroduce 5717_PLUS

This patch reintroduces the TG3_FLG3_5717_PLUS to identify 5717 and
later devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: 5717_PLUS => 57765_PLUS
Matt Carlson [Tue, 5 Apr 2011 14:22:44 +0000 (14:22 +0000)]
tg3: 5717_PLUS => 57765_PLUS

The 57765 arrived before the 5717 and has a subset of the features
supported by the 5717.  This patch renames the 5717_PLUS flag so that it
can be reintroduced to designate only 5717 and later devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Cleanup extended rx ring size code
Matt Carlson [Tue, 5 Apr 2011 14:22:43 +0000 (14:22 +0000)]
tg3: Cleanup extended rx ring size code

Hardcoded values are used in multiple places to describe the maximum rx
ring sizes.  This patch replaces those values with preprocessor
constants.  This patch also introduces a new TG3_FLG3_LRG_PROD_RING_CAP
to determine if the device is capable of supporting larger ring sizes.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: Implement ethtool_ops::set_phys_id instead of ethtool_ops::phys_id
Ben Hutchings [Fri, 1 Apr 2011 23:43:46 +0000 (00:43 +0100)]
sfc: Implement ethtool_ops::set_phys_id instead of ethtool_ops::phys_id

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoethtool: Change ETHTOOL_PHYS_ID implementation to allow dropping RTNL
Ben Hutchings [Fri, 1 Apr 2011 23:35:15 +0000 (00:35 +0100)]
ethtool: Change ETHTOOL_PHYS_ID implementation to allow dropping RTNL

The ethtool ETHTOOL_PHYS_ID command runs for an arbitrarily long
period of time, holding the RTNL lock.  This blocks routing updates,
device enumeration, and various important operations that one might
want to keep running while hunting for the flashing LED.

We need to drop the RTNL lock during this operation, but currently the
core implementation is a thin wrapper around a driver operation and
drivers may well depend upon holding the lock.

Define a new driver operation 'set_phys_id' with an argument that sets
the ID indicator on/off/inactive/active (the last optional, for any
driver or firmware that prefers to handle blinking asynchronously).
When this is defined, the ethtool core drops the lock while waiting
and only acquires it around calls to this operation.

Deprecate the 'phys_id' operation in favour of this.  It can be
removed once all in-tree drivers are converted.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoethtool: Fill out and update comment for struct ethtool_ops
Ben Hutchings [Fri, 1 Apr 2011 22:57:41 +0000 (23:57 +0100)]
ethtool: Fill out and update comment for struct ethtool_ops

Briefly document all operations (except get_rx_ntuple), including
whether they may return an error code and whether they are deprecated.
Also mention some things that should be handled by the ethtool core
rather than by drivers.

Briefly document general requirements for callers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoethtool: Convert struct ethtool_ops comment to kernel-doc format
Ben Hutchings [Fri, 1 Apr 2011 21:52:34 +0000 (22:52 +0100)]
ethtool: Convert struct ethtool_ops comment to kernel-doc format

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Implement generic features interface
Ben Hutchings [Tue, 5 Apr 2011 14:00:02 +0000 (15:00 +0100)]
sfc: Implement generic features interface

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Enable all TSO features on VLANs
Ben Hutchings [Tue, 5 Apr 2011 12:36:09 +0000 (13:36 +0100)]
sfc: Enable all TSO features on VLANs

The TSO code already supports IPv6 on VLAN, so enable it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agonet: Allow no-cache copy from user on transmit
Tom Herbert [Tue, 5 Apr 2011 05:30:30 +0000 (22:30 -0700)]
net: Allow no-cache copy from user on transmit

This patch uses __copy_from_user_nocache on transmit to bypass data
cache for a performance improvement.  skb_add_data_nocache and
skb_copy_to_page_nocache can be called by sendmsg functions to use
this feature, initial support is in tcp_sendmsg.  This functionality is
configurable per device using ethtool.

Presumably, this feature would only be useful when the driver does
not touch the data.  The feature is turned on by default if a device
indicates that it does some form of checksum offload; it is off by
default for devices that do no checksum offload or indicate no checksum
is necessary.  For the former case copy-checksum is probably done
anyway, in the latter case the device is likely loopback in which case
the no cache copy is probably not beneficial.

This patch was tested using 200 instances of netperf TCP_RR with
1400 byte request and one byte reply.  Platform is 16 core AMD x86.

No-cache copy disabled:
   672703 tps, 97.13% utilization
   50/90/99% latency:244.31 484.205 1028.41

No-cache copy enabled:
   702113 tps, 96.16% utilization,
   50/90/99% latency 238.56 467.56 956.955

Using 14000 byte request and response sizes demonstrate the
effects more dramatically:

No-cache copy disabled:
   79571 tps, 34.34 %utlization
   50/90/95% latency 1584.46 2319.59 5001.76

No-cache copy enabled:
   83856 tps, 34.81% utilization
   50/90/95% latency 2508.42 2622.62 2735.88

Note especially the effect on latency tail (95th percentile).

This seems to provide a nice performance improvement and is
consistent in the tests I ran.  Presumably, this would provide
the greatest benfits in the presence of an application workload
stressing the cache and a lot of transmit data happening.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: range check STP parameters
stephen hemminger [Mon, 4 Apr 2011 14:03:33 +0000 (14:03 +0000)]
bridge: range check STP parameters

Apply restrictions on STP parameters based 802.1D 1998 standard.
   * Fixes missing locking in set path cost ioctl
   * Uses common code for both ioctl and sysfs

This is based on an earlier patch Sasikanth V but with overhaul.

Note:
1. It does NOT enforce the restriction on the relationship max_age and
   forward delay or hello time because in existing implementation these are
   set as independant operations.

2. If STP is disabled, there is no restriction on forward delay

3. No restriction on holding time because users use Linux code to act
   as hub or be sticky.

4. Although standard allow 0-255, Linux only allows 0-63 for port priority
   because more bits are reserved for port number.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: allow creating bridge devices with netlink
stephen hemminger [Mon, 4 Apr 2011 14:03:32 +0000 (14:03 +0000)]
bridge: allow creating bridge devices with netlink

Add netlink device ops to allow creating bridge device via netlink.
This works in a manner similar to vlan, macvlan and bonding.

Example:
  # ip link add link dev br0 type bridge
  # ip link del dev br0

The change required rearranging initializtion code to deal with
being called by create link. Most of the initialization happens
in br_dev_setup, but allocation of stats is done in ndo_init callback
to deal with allocation failure. Sysfs setup has to wait until
after the network device kobject is registered.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: allow creating/deleting fdb entries via netlink
stephen hemminger [Mon, 4 Apr 2011 14:03:31 +0000 (14:03 +0000)]
bridge: allow creating/deleting fdb entries via netlink

Use RTM_NEWNEIGH and RTM_DELNEIGH to allow updating of entries
in bridge forwarding table. This allows manipulating static entries
which is not possible with existing tools.

Example (using bridge extensions to iproute2)
   # br fdb add 00:02:03:04:05:06 dev eth0

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: add netlink notification on forward entry changes
stephen hemminger [Mon, 4 Apr 2011 14:03:30 +0000 (14:03 +0000)]
bridge: add netlink notification on forward entry changes

This allows applications to query and monitor bridge forwarding
table in the same method used for neighbor table. The forward table
entries are returned in same structure format as used by the ioctl.
If more information is desired in future, the netlink method is
extensible.

Example (using bridge extensions to iproute2)
  # br monitor

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: split rcu and no-rcu cases of fdb lookup
stephen hemminger [Mon, 4 Apr 2011 14:03:29 +0000 (14:03 +0000)]
bridge: split rcu and no-rcu cases of fdb lookup

In some cases, look up of forward database entry is done with RCU;
and for others no RCU is needed because of locking. Split the two
cases into two differnt loops (and take off inline).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: track last used time in forwarding table
stephen hemminger [Mon, 4 Apr 2011 14:03:28 +0000 (14:03 +0000)]
bridge: track last used time in forwarding table

Adds tracking the last used time in forwarding table.
Rename ageing_timer to updated to better describe it.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: change arguments to fdb_create
stephen hemminger [Mon, 4 Apr 2011 14:03:27 +0000 (14:03 +0000)]
bridge: change arguments to fdb_create

Later patch provides ability to create non-local static entry.
To make this easier move the updating of the flag values to
after the code that creates entry.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopkt_sched: QFQ - quick fair queue scheduler
stephen hemminger [Mon, 4 Apr 2011 05:30:58 +0000 (05:30 +0000)]
pkt_sched: QFQ - quick fair queue scheduler

This is an implementation of the Quick Fair Queue scheduler developed
by Fabio Checconi. The same algorithm is already implemented in ipfw
in FreeBSD. Fabio had an earlier version developed on Linux, I just
cleaned it up.  Thanks to Eric Dumazet for testing this under load.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen: netfront: assume all hw features are available until backend connection setup
Ian Campbell [Mon, 4 Apr 2011 18:07:57 +0000 (11:07 -0700)]
xen: netfront: assume all hw features are available until backend connection setup

We need to assume that all features will be available when registering the
netdev otherwise they are ommitted from the initial set of
dev->wanted_features. When we connect to the backed we reduce the set as
necessary due to the call to netdev_update_features() in xennet_connect().

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Mon, 4 Apr 2011 17:39:12 +0000 (10:39 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

13 years agomISDN: fix "persistant" typo
Jan Engelhardt [Sun, 3 Apr 2011 13:31:06 +0000 (13:31 +0000)]
mISDN: fix "persistant" typo

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomlx4: fix kfree on error path in new_steering_entry()
Mariusz Kozlowski [Mon, 4 Apr 2011 05:04:01 +0000 (22:04 -0700)]
mlx4: fix kfree on error path in new_steering_entry()

On error path kfree() should get pointer to memory allocated by
kmalloc() not the address of variable holding it (which is on stack).

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen: netfront: fix declaration order
Eric Dumazet [Mon, 4 Apr 2011 00:21:00 +0000 (17:21 -0700)]
xen: netfront: fix declaration order

Must declare xennet_fix_features() and xennet_set_features() before
using them.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: convert VLAN devices to use ndo_fix_features()
Michał Mirosław [Sun, 3 Apr 2011 05:49:12 +0000 (22:49 -0700)]
vlan: convert VLAN devices to use ndo_fix_features()

Note: get_flags was actually broken, because it should return the
flags capped with vlan_features. This is now done implicitly by
limiting netdev->hw_features.

RX checksumming offload control is (and was) broken, as there was no way
before to say whether it's done for tagged packets.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Call netdev_features_change() from netdev_update_features()
Michał Mirosław [Sun, 3 Apr 2011 05:48:47 +0000 (22:48 -0700)]
net: Call netdev_features_change() from netdev_update_features()

Issue FEAT_CHANGE notification when features are changed by
netdev_update_features().  This will allow changes made by extra constraints
on e.g. MTU change to be properly propagated like changes via ethtool.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: len check is unnecessarily devastating, change to WARN_ON
Ilpo Järvinen [Sat, 2 Apr 2011 04:47:41 +0000 (21:47 -0700)]
tcp: len check is unnecessarily devastating, change to WARN_ON

All callers are prepared for alloc failures anyway, so this error
can safely be boomeranged to the callers domain without super
bad consequences. ...At worst the connection might go into a state
where each RTO tries to (unsuccessfully) re-fragment with such
a mis-sized value and eventually dies.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: malloc enough room for asconf-ack chunk
Wei Yongjun [Thu, 31 Mar 2011 23:42:55 +0000 (23:42 +0000)]
sctp: malloc enough room for asconf-ack chunk

Sometime the ASCONF_ACK parameters can equal to the fourfold of
ASCONF parameters, this only happend in some special case:

  ASCONF parameter is :
    Unrecognized Parameter (4 bytes)
  ASCONF_ACK parameter should be:
    Error Cause Indication parameter (8 bytes header)
     + Error Cause (4 bytes header)
       + Unrecognized Parameter (4bytes)

Four 4bytes Unrecognized Parameters in ASCONF chunk will cause panic.

Pid: 0, comm: swapper Not tainted 2.6.38-next+ #22 Bochs Bochs
EIP: 0060:[<c0717eae>] EFLAGS: 00010246 CPU: 0
EIP is at skb_put+0x60/0x70
EAX: 00000077 EBX: c09060e2 ECX: dec1dc30 EDX: c09469c0
ESI: 00000000 EDI: de3c8d40 EBP: dec1dc58 ESP: dec1dc2c
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process swapper (pid: 0, ti=dec1c000 task=c09aef20 task.ti=c0980000)
Stack:
 c09469c0 e1894fa4 00000044 00000004 de3c8d00 de3c8d00 de3c8d44 de3c8d40
 c09060e2 de25dd80 de3c8d40 dec1dc7c e1894fa4 dec1dcb0 00000040 00000004
 00000000 00000800 00000004 00000004 dec1dce0 e1895a2b dec1dcb4 de25d960
Call Trace:
 [<e1894fa4>] ? sctp_addto_chunk+0x4e/0x89 [sctp]
 [<e1894fa4>] sctp_addto_chunk+0x4e/0x89 [sctp]
 [<e1895a2b>] sctp_process_asconf+0x32f/0x3d1 [sctp]
 [<e188d554>] sctp_sf_do_asconf+0xf8/0x173 [sctp]
 [<e1890b02>] sctp_do_sm+0xb8/0x159 [sctp]
 [<e18a2248>] ? sctp_cname+0x0/0x52 [sctp]
 [<e189392d>] sctp_assoc_bh_rcv+0xac/0xe3 [sctp]
 [<e1897d76>] sctp_inq_push+0x2d/0x30 [sctp]
 [<e18a21b2>] sctp_rcv+0x7a7/0x83d [sctp]
 [<c077a95c>] ? ipv4_confirm+0x118/0x125
 [<c073a970>] ? nf_iterate+0x34/0x62
 [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
 [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
 [<c0747992>] ip_local_deliver_finish+0xf5/0x194
 [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
 [<c0747a6e>] NF_HOOK.clone.1+0x3d/0x44
 [<c0747ab3>] ip_local_deliver+0x3e/0x44
 [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
 [<c074775c>] ip_rcv_finish+0x29f/0x2c7
 [<c07474bd>] ? ip_rcv_finish+0x0/0x2c7
 [<c0747a6e>] NF_HOOK.clone.1+0x3d/0x44
 [<c0747cae>] ip_rcv+0x1f5/0x233
 [<c07474bd>] ? ip_rcv_finish+0x0/0x2c7
 [<c071dce3>] __netif_receive_skb+0x310/0x336
 [<c07221f3>] netif_receive_skb+0x4b/0x51
 [<e0a4ed3d>] cp_rx_poll+0x1e7/0x29c [8139cp]
 [<c072275e>] net_rx_action+0x65/0x13a
 [<c0445a54>] __do_softirq+0xa1/0x149
 [<c04459b3>] ? __do_softirq+0x0/0x149
 <IRQ>
 [<c0445891>] ? irq_exit+0x37/0x72
 [<c040a7e9>] ? do_IRQ+0x81/0x95
 [<c07b3670>] ? common_interrupt+0x30/0x38
 [<c0428058>] ? native_safe_halt+0xa/0xc
 [<c040f5d7>] ? default_idle+0x58/0x92
 [<c0408fb0>] ? cpu_idle+0x96/0xb2
 [<c0797989>] ? rest_init+0x5d/0x5f
 [<c09fd90c>] ? start_kernel+0x34b/0x350
 [<c09fd0cb>] ? i386_start_kernel+0xba/0xc1

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: fix auth_hmacs field's length of struct sctp_cookie
Wei Yongjun [Thu, 31 Mar 2011 23:38:54 +0000 (23:38 +0000)]
sctp: fix auth_hmacs field's length of struct sctp_cookie

auth_hmacs field of struct sctp_cookie is used for store
Requested HMAC Algorithm Parameter, and each HMAC Identifier
is 2 bytes, so the length should be:
  SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: convert sunhme/sungem network drivers to hw_features
Michał Mirosław [Sat, 2 Apr 2011 03:58:37 +0000 (20:58 -0700)]
net: convert sunhme/sungem network drivers to hw_features

Side effects:
 - TX offloads (HW csum, scatter-gather) can be toggled now
 - RX checksum is reported correctly now (it's always active)

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoveth: convert to hw_features
Michał Mirosław [Thu, 31 Mar 2011 01:01:35 +0000 (01:01 +0000)]
veth: convert to hw_features

This should probably get TSO available as it's basically a loopback device.
Offloads are left disabled by default - as before.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: convert offload constraints to ndo_fix_features
Michał Mirosław [Thu, 31 Mar 2011 01:01:35 +0000 (01:01 +0000)]
jme: convert offload constraints to ndo_fix_features

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: convert xen-netfront to hw_features
Michał Mirosław [Thu, 31 Mar 2011 01:01:35 +0000 (01:01 +0000)]
net: convert xen-netfront to hw_features

Not tested in any way. The original code for offload setting seems broken
as it resets the features on every netback reconnect.

This will set GSO_ROBUST at device creation time (earlier than connect time).

RX checksum offload is forced on - so advertise as it is.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: convert SMSC USB net drivers to hw_features
Michał Mirosław [Sat, 2 Apr 2011 03:56:23 +0000 (20:56 -0700)]
net: convert SMSC USB net drivers to hw_features

There's a race (not fixed here) in smsc75xx in setting RFE_CTL that's not
properly handled via rfe_ctl_lock. Spinlock is not a good tool here, as
this has to wait for URB completion (or maybe just submission) after issuing
register write request. Otherwise, the rfe_ctl might be changed just after
spin_unlock() and device left programmed with other value.

smsc95xx has increased hard_header_len for the case of TX checksumming.

smsc75xx is fixed to advertise IP+IPV6_CSUM instead of HW_CSUM as it does
not use csum_start/csum_offset.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovirtio_net: convert to hw_features
Michał Mirosław [Thu, 31 Mar 2011 01:01:35 +0000 (01:01 +0000)]
virtio_net: convert to hw_features

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
Michał Mirosław [Wed, 30 Mar 2011 23:58:08 +0000 (23:58 +0000)]
net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM

dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
changeable and driver is converted to hw_features and friends. Fix this.

(dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agousbnet: use eth%d name for known ethernet devices
Arnd Bergmann [Sat, 2 Apr 2011 03:12:02 +0000 (20:12 -0700)]
usbnet: use eth%d name for known ethernet devices

The documentation for the USB ethernet devices suggests that
only some devices are supposed to use usb0 as the network interface
name instead of eth0. The logic used there, and documented in
Kconfig for CDC is that eth0 will be used when the mac address
is a globally assigned one, but usb0 is used for the locally
managed range that is typically used on point-to-point links.

Unfortunately, this has caused a lot of pain on the smsc95xx
device that is used on the popular pandaboard without an
EEPROM to store the MAC address, which causes the driver to
call random_ether_address().

Obviously, there should be a proper MAC addressed assigned to
the device, and discussions are ongoing about how to solve
this, but this patch at least makes sure that the default
interface naming gets a little saner and matches what the
user can expect based on the documentation, including for
new devices.

The approach taken here is to flag whether a device might be a
point-to-point link with the new FLAG_POINTTOPOINT setting in
the usbnet driver_info. A driver can set both FLAG_POINTTOPOINT
and FLAG_ETHER if it is not sure (e.g. cdc_ether), or just one
of the two.  The usbnet framework only looks at the MAC address
for device naming if both flags are set, otherwise it trusts the
flag.

Signed-off-by: Arnd Bergmann <arnd.bergmann@linaro.org>
Tested-by: Andy Green <andy.green@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostarfire: clean up dma_addr_t size test
FUJITA Tomonori [Fri, 1 Apr 2011 05:27:51 +0000 (05:27 +0000)]
starfire: clean up dma_addr_t size test

Now we have CONFIG_ARCH_DMA_ADDR_T_64BIT. We can fix the hacky
dma_addr_t size test cleanly.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sat, 2 Apr 2011 00:15:25 +0000 (17:15 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

13 years agosfc: Move test of rx_checksum_enabled from nic.c to rx.c
Ben Hutchings [Fri, 1 Apr 2011 21:20:06 +0000 (22:20 +0100)]
sfc: Move test of rx_checksum_enabled from nic.c to rx.c

This is preparation for using the generic netdev features interface,
and should have no effect in itself.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoappletalk: Fix OOPS in atalk_release().
David S. Miller [Fri, 1 Apr 2011 01:59:10 +0000 (18:59 -0700)]
appletalk: Fix OOPS in atalk_release().

Commit 60d9f461a20ba59219fdcdc30cbf8e3a4ad3f625 ("appletalk: remove
the BKL") added a dereference of "sk" before checking for NULL in
atalk_release().

Guard the code block completely, rather than partially, with the
NULL check.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Order ports in same order as addresses in flow objects.
David S. Miller [Fri, 1 Apr 2011 01:03:35 +0000 (18:03 -0700)]
net: Order ports in same order as addresses in flow objects.

For consistency.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x, cnic: Disable iSCSI if DCBX negotiation is successful
Dmitry Kravkov [Fri, 1 Apr 2011 00:04:22 +0000 (17:04 -0700)]
bnx2x, cnic: Disable iSCSI if DCBX negotiation is successful

With current bnx2x firmware 6.2.9, iSCSI is not supported in DCB
network, so we need to disable it.  Add cnic command to disconnect
iSCSI connections and prevent future connections when DCBX negotiation
succeeds.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: don't write dcb/llfc fields in STORM memory
Dmitry Kravkov [Fri, 1 Apr 2011 00:04:01 +0000 (17:04 -0700)]
bnx2x: don't write dcb/llfc fields in STORM memory

We could get hardware attention during DCB/FCoE traffic without this
fix.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Update firmware to 6.2.9
Dmitry Kravkov [Fri, 1 Apr 2011 00:03:36 +0000 (17:03 -0700)]
bnx2x: Update firmware to 6.2.9

To fix bugs when running offloaded FCoE/iSCSI traffic in multiple
Class of Service environments.  In some scenarios, traffic could stop
on certain rings and eventually all traffic would stop.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4_init_output() in udp_sendmsg()
David S. Miller [Thu, 31 Mar 2011 11:54:27 +0000 (04:54 -0700)]
ipv4: Use flowi4_init_output() in udp_sendmsg()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4_init_output() in cookie_v4_check()
David S. Miller [Thu, 31 Mar 2011 11:54:08 +0000 (04:54 -0700)]
ipv4: Use flowi4_init_output() in cookie_v4_check()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4_init_output() in raw_sendmsg()
David S. Miller [Thu, 31 Mar 2011 11:53:51 +0000 (04:53 -0700)]
ipv4: Use flowi4_init_output() in raw_sendmsg()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4_init_output() in ip_send_reply()
David S. Miller [Thu, 31 Mar 2011 11:53:37 +0000 (04:53 -0700)]
ipv4: Use flowi4_init_output() in ip_send_reply()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4_init_output() in inet_connection_sock.c
David S. Miller [Thu, 31 Mar 2011 11:53:20 +0000 (04:53 -0700)]
ipv4: Use flowi4_init_output() in inet_connection_sock.c

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4_init_output() in net/route.h
David S. Miller [Thu, 31 Mar 2011 11:52:59 +0000 (04:52 -0700)]
ipv4: Use flowi4_init_output() in net/route.h

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add helper flowi4_init_output().
David S. Miller [Thu, 31 Mar 2011 11:52:14 +0000 (04:52 -0700)]
net: Add helper flowi4_init_output().

On-stack initialization via assignment of flow structures are
expensive because GCC emits a memset() to clear the entire
structure out no matter what.

Add a helper for ipv4 output flow key setup which we can use to avoid
the memset.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomlx4: Fixing bad size of event queue buffer
Yevgeny Petrilin [Wed, 30 Mar 2011 23:30:17 +0000 (23:30 +0000)]
mlx4: Fixing bad size of event queue buffer

We should reduce the number of reserved completion queues from the total
number of entries. Since the queue size is power of two, not reducing the
reserved entries, caused a double queue size, which may lead to allocation
failures in some cases.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomlx4: Fixing use after free
Yevgeny Petrilin [Wed, 30 Mar 2011 23:28:52 +0000 (23:28 +0000)]
mlx4: Fixing use after free

In case of allocation failure, tried to use the promiscuous QP
entry that was previously freed.
Now freeing this entry only in case we will not put it back to the list
of promiscuous entries.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding:typo in comment
Peter Pan(潘卫平) [Wed, 30 Mar 2011 20:46:19 +0000 (20:46 +0000)]
bonding:typo in comment

use accumulates instead of acumulates.

Signed-off-by: Pan Weiping <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofib: add __rcu annotations
Eric Dumazet [Thu, 31 Mar 2011 08:51:35 +0000 (01:51 -0700)]
fib: add __rcu annotations

Add __rcu annotations and lockdep checks.

Add const qualifiers

node_parent() and node_parent_rcu() can use
rcu_dereference_index_check()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: Remove IRQF_SAMPLE_RANDOM flag from network drivers
Javier Martinez Canillas [Mon, 28 Mar 2011 16:27:31 +0000 (16:27 +0000)]
drivers/net: Remove IRQF_SAMPLE_RANDOM flag from network drivers

The IRQF_SAMPLE_RANDOM flag is marked as deprecated and will be removed.

Every input point to the kernel's entropy pool have to better document the
type of entropy source it is.

drivers/char/random.c now implements a set of interfaces that can be used for
devices to collect enviromental noise. IRQF_SAMPLE_RANDOM will be replaced
with these add_*_randomness exported functions.

Network drivers are not a good source of entropy. They use as a source of
entropy essentially a remote host. Which means that the source of entropy can
be potentially controlled by an attacker. Also, with heavy workloads the
entropy decreases due to less hardware interrupts happening thanks to irq
mitigation and NAPI.

If a system relies in its network interface as a entropy source it has a false
sense of security. Systems that don't have devices whose drivers are good
sources of entropy, should either use a hardware random number generator or
feed the kernel's entropy pool from userspace using other sources of entropy
such as EGD, video_entropyd, timer_entropyd and audio-entropyd.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Add support for PORT_REQUEST_PREASSOCIATE_RR
Roopa Prabhu [Tue, 29 Mar 2011 20:36:07 +0000 (20:36 +0000)]
enic: Add support for PORT_REQUEST_PREASSOCIATE_RR

Current enic code only supports ASSOCIATE and DISASSOCIATE port profile
operations. This patch adds enic support for port profile
PORT_REQUEST_PREASSOCIATE_RR operation. The VIC adapter (8021qbh) is capable
of handling port profile requests done in two steps namely PREASSOCIATE_RR
and ASSOCIATE today. The motivation to support PREASSOCIATE_RR comes mainly
from its use as an optimization during VM migration ie, to do resource
reservation on destination host before resources on source host are released.

PREASSOCIATE_RR is a VDP operation and according to the latest at IEEE,
8021qbh will also need to support VDP commands.

In addition to handling the new PORT_REQUEST_PREASSOCIATE_RR operation
this patch also does the below:
- Introduces handlers for PORT_REQUEST operations
- Moves most of the port profile handling code to new files enic_pp.[ch]
- Uses new fw devcmds for port profile operations

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Cleanups in port profile helper code
Roopa Prabhu [Tue, 29 Mar 2011 20:36:02 +0000 (20:36 +0000)]
enic: Cleanups in port profile helper code

This patch does the following:
- Introduces a new macro VIC_PROVINFO_ADD_TLV
- Adds a new OS type in vic_generic_prov_os_type
- Changes some vic_provinfo* helper routine args to constants

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Add wrapper routines for new fw devcmds for port profile handling
Roopa Prabhu [Tue, 29 Mar 2011 20:35:56 +0000 (20:35 +0000)]
enic: Add wrapper routines for new fw devcmds for port profile handling

This patch adds wrapper routines to new port profile related fw devcmds and
removes the old ones

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Add support for new fw devcmds for port profile handling
Roopa Prabhu [Tue, 29 Mar 2011 20:35:51 +0000 (20:35 +0000)]
enic: Add support for new fw devcmds for port profile handling

This patch introduces new fw devcmds for port profile handling.
These new commands are similar to the current fw commands for
port profile handling. The only difference being that the new
commands split the existing port profile handling devcmds into multiple
fw commands, giving the driver finer control over port profile operations.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovia-rhine: trivial sparse annotation in vlan_tci helper
Harvey Harrison [Mon, 28 Mar 2011 17:08:59 +0000 (17:08 +0000)]
via-rhine: trivial sparse annotation in vlan_tci helper

Noticed by sparse:
drivers/net/via-rhine.c:1706:16: warning: cast to restricted __be16

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agokstrtox: convert drivers/isdn/
Alexey Dobriyan [Sun, 27 Mar 2011 02:58:35 +0000 (02:58 +0000)]
kstrtox: convert drivers/isdn/

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosmsc911x: Use pr_fmt, netdev_<level>, and netif_<level>
Joe Perches [Fri, 25 Mar 2011 14:21:22 +0000 (14:21 +0000)]
smsc911x: Use pr_fmt, netdev_<level>, and netif_<level>

Use the more common/verbose logging styles.

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove smsc911x prefixes from format strings.
Rename SMSC_WARNING to SMSC_WARN.
Remove DPRINTK macro.
Use netif_<level> in SMSC_<level> macros.
Convert NETIF_MSG_<foo> uses to lower case.
Add no_printk verification in non-debug uses.
Add pdata to SMSC_<level> uses to avoid hidden variable uses.
Convert printks to netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: remove one useless line
Sathya Perla [Mon, 21 Mar 2011 20:49:29 +0000 (20:49 +0000)]
be2net: remove one useless line

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: cancel be_worker in be_shutdown() even when i/f is down
Sathya Perla [Mon, 21 Mar 2011 20:49:28 +0000 (20:49 +0000)]
be2net: cancel be_worker in be_shutdown() even when i/f is down

As the be_worker() workqueue is scheduled in be_probe() it must
be canceled unconditionally in be_shutdown().

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: remove redundant code in be_worker()
Sathya Perla [Mon, 21 Mar 2011 20:49:27 +0000 (20:49 +0000)]
be2net: remove redundant code in be_worker()

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: parse vid and vtm fields of rx-compl only if vlanf bit is set
Sathya Perla [Mon, 21 Mar 2011 20:49:26 +0000 (20:49 +0000)]
be2net: parse vid and vtm fields of rx-compl only if vlanf bit is set

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: refactor code that decides adapter->num_rx_queues
Sathya Perla [Mon, 21 Mar 2011 20:49:25 +0000 (20:49 +0000)]
be2net: refactor code that decides adapter->num_rx_queues

The code has been refactored to not set num_rx_qs inside be_enable_msix().
num_rx_qs is now set at the time of queue creation based on the number of
available msix vectors.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Support for FAT dump retrieval using ethtool --register-dump option
Somnath Kotur [Wed, 16 Mar 2011 21:22:43 +0000 (21:22 +0000)]
be2net: Support for FAT dump retrieval using ethtool --register-dump option

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>