]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
14 years agotg3: Fix message 80 char violations
Matt Carlson [Mon, 5 Apr 2010 10:19:23 +0000 (10:19 +0000)]
tg3: Fix message 80 char violations

Commit 05dbe005386e7521153dce6c5ad95c98b73b80c7, "Use (pr|netdev)_<level>
macro helpers" extended some of the message lines longer than 80 chars.
This patch reels the line lengths back in.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: netdev_err() => dev_err()
Matt Carlson [Mon, 5 Apr 2010 10:19:22 +0000 (10:19 +0000)]
tg3: netdev_err() => dev_err()

Some uses of netdev_err() happen before the device has been registered.
This will cause the messages to be prepended with "(unregistered
net_device)" strings.  We can clean up the message by using dev_err()
instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Replace pr_err with sensible alternatives
Matt Carlson [Mon, 5 Apr 2010 10:19:21 +0000 (10:19 +0000)]
tg3: Replace pr_err with sensible alternatives

All the instances of pr_err() in the tg3 driver have better
alternatives.  This patch replaces all pr_err() calls.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Restore likely() check in tg3_poll_msix()
Matt Carlson [Mon, 5 Apr 2010 10:19:20 +0000 (10:19 +0000)]
tg3: Restore likely() check in tg3_poll_msix()

When creating the new tg3_poll_msix() function, the likely() compiler
hint was dropped.  This patch reintroduces it.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Fix MII_TG3_DSP_EXP8 offset
Matt Carlson [Mon, 5 Apr 2010 10:19:19 +0000 (10:19 +0000)]
tg3: Fix MII_TG3_DSP_EXP8 offset

The offset to the MII_TG3_DSP_EXP8 register is incorrect.  Fix it.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: Ensure initializing private mc_list in prepare_multicast().
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 4 Apr 2010 17:59:30 +0000 (17:59 +0000)]
mac80211: Ensure initializing private mc_list in prepare_multicast().

Fix kernel panic by NULL pointer dereference in the context of
ieee80211_ops->prepare_multicast().

This bug was introduced by commit 22bedad3c.. ("net: convert
multicast list to list_head").

Call __hw_addr_init() in ieee80211_alloc_hw() to initialize
list_head of private device multicast list, like we do in
bond_init().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Add a missing local_irq_enable()
Eric Dumazet [Mon, 5 Apr 2010 22:42:39 +0000 (15:42 -0700)]
net: Add a missing local_irq_enable()

As noticed by Changli Gao, we must call local_irq_enable() after
rps_unlock()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agorps: fixed missed rps_unlock
Tom Herbert [Mon, 5 Apr 2010 21:37:19 +0000 (14:37 -0700)]
rps: fixed missed rps_unlock

Fix spin_unlock_irq which needs to be rps_unlock.

Signed-off-by: Tom Herbert <therbert@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: unmanaged L2TPv3 tunnels fixes
Eric Dumazet [Sun, 4 Apr 2010 08:02:46 +0000 (01:02 -0700)]
l2tp: unmanaged L2TPv3 tunnels fixes

Followup to commit 789a4a2c
(l2tp: Add support for static unmanaged L2TPv3 tunnels)

One missing init in l2tp_tunnel_sock_create() could access random kernel
memory, and a bit field should be unsigned.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoSCTP: Change to use ipv6_addr_copy()
Brian Haley [Sat, 3 Apr 2010 22:10:21 +0000 (15:10 -0700)]
SCTP: Change to use ipv6_addr_copy()

Change SCTP IPv6 code to use ipv6_addr_copy()

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoicmp: Account for ICMP out errors
Eric Dumazet [Sat, 3 Apr 2010 22:09:04 +0000 (15:09 -0700)]
icmp: Account for ICMP out errors

When ip_append() fails because of socket limit or memory shortage,
increment ICMP_MIB_OUTERRORS counter, so that "netstat -s" can report
these errors.

LANG=C netstat -s | grep "ICMP messages failed"
    0 ICMP messages failed

For IPV6, implement ICMP6_MIB_OUTERRORS counter as well.

# grep Icmp6OutErrors /proc/net/dev_snmp6/*
/proc/net/dev_snmp6/eth0:Icmp6OutErrors                    0
/proc/net/dev_snmp6/lo:Icmp6OutErrors                    0

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Fix L2TP_DEBUGFS ifdef tests.
David S. Miller [Sat, 3 Apr 2010 22:01:37 +0000 (15:01 -0700)]
l2tp: Fix L2TP_DEBUGFS ifdef tests.

We have to check CONFIG_L2TP_DEBUGFS_MODULE as well as
CONFIG_L2TP_DEBUGFS.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add missing semicolon to MODULE_ALIAS() in l2tp_netlink.c
David S. Miller [Sat, 3 Apr 2010 21:58:07 +0000 (14:58 -0700)]
l2tp: Add missing semicolon to MODULE_ALIAS() in l2tp_netlink.c

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Update documentation
James Chapman [Fri, 2 Apr 2010 06:19:46 +0000 (06:19 +0000)]
l2tp: Update documentation

This patch adds documentation about the L2TPv3 functionality.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add support for static unmanaged L2TPv3 tunnels
James Chapman [Fri, 2 Apr 2010 06:19:40 +0000 (06:19 +0000)]
l2tp: Add support for static unmanaged L2TPv3 tunnels

This patch adds support for static (unmanaged) L2TPv3 tunnels, where
the tunnel socket is created by the kernel rather than being created
by userspace. This means L2TP tunnels and sessions can be created
manually, without needing an L2TP control protocol implemented in
userspace. This might be useful where the user wants a simple ethernet
over IP tunnel.

A patch to iproute2 adds a new command set under "ip l2tp" to make use
of this feature. This will be submitted separately.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add debugfs files for dumping l2tp debug info
James Chapman [Fri, 2 Apr 2010 06:19:33 +0000 (06:19 +0000)]
l2tp: Add debugfs files for dumping l2tp debug info

The existing pppol2tp driver exports debug info to
/proc/net/pppol2tp. Rather than adding info to that file for the new
functionality added in this patch series, we add new files in debugfs,
leaving the old /proc file for backwards compatibility (L2TPv2 only).

Currently only one file is provided: l2tp/tunnels, which lists
internal debug info for all l2tp tunnels and sessions. More files may
be added later. The info is for debug and problem analysis only -
userspace apps should use netlink to obtain status about l2tp tunnels
and sessions.

Although debugfs does not support net namespaces, the tunnels and
sessions dumped in l2tp/tunnels are only those in the net namespace of
the process reading the file.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add L2TP ethernet pseudowire support
James Chapman [Fri, 2 Apr 2010 06:19:26 +0000 (06:19 +0000)]
l2tp: Add L2TP ethernet pseudowire support

This driver presents a regular net_device for each L2TP ethernet
pseudowire instance. These interfaces are named l2tpethN by default,
though userspace can specify an alternative name when the L2TP
session is created, if preferred. When the pseudowire is established,
regular Linux networking utilities may be used to configure the
interface, i.e. give it IP address info or add it to a bridge. Any
data passed over the interface is carried over an L2TP tunnel.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Convert rwlock to RCU
James Chapman [Fri, 2 Apr 2010 06:19:16 +0000 (06:19 +0000)]
l2tp: Convert rwlock to RCU

Reader/write locks are discouraged because they are slower than spin
locks. So this patch converts the rwlocks used in the per_net structs
to rcu.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add netlink control API for L2TP
James Chapman [Fri, 2 Apr 2010 06:19:10 +0000 (06:19 +0000)]
l2tp: Add netlink control API for L2TP

In L2TPv3, we need to create/delete/modify/query L2TP tunnel and
session contexts. The number of parameters is significant. So let's
use netlink. Userspace uses this API to control L2TP tunnel/session
contexts in the kernel.

The previous pppol2tp driver was managed using [gs]etsockopt(). This
API is retained for backwards compatibility. Unlike L2TPv2 which
carries only PPP frames, L2TPv3 can carry raw ethernet frames or other
frame types and these do not always have an associated socket
family. Therefore, we need a way to use L2TP sessions that doesn't
require a socket type for each supported frame type. Hence netlink is
used.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetlink: Export genl_lock() API for use by modules
James Chapman [Fri, 2 Apr 2010 06:19:05 +0000 (06:19 +0000)]
netlink: Export genl_lock() API for use by modules

This lets kernel modules which use genl netlink APIs serialize netlink
processing.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add L2TPv3 IP encapsulation (no UDP) support
James Chapman [Fri, 2 Apr 2010 06:19:00 +0000 (06:19 +0000)]
l2tp: Add L2TPv3 IP encapsulation (no UDP) support

This patch adds a new L2TPIP socket family and modifies the core to
handle the case where there is no UDP header in the L2TP
packet. L2TP/IP uses IP protocol 115. Since L2TP/UDP and L2TP/IP
packets differ in layout, the datapath packet handling code needs
changes too. Userspace uses an L2TPIP socket instead of a UDP socket
when IP encapsulation is required.

We can't use raw sockets for this because the semantics of raw sockets
don't lend themselves to the socket-per-tunnel model - we need to

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Update PPP-over-L2TP driver to work over L2TPv3
James Chapman [Fri, 2 Apr 2010 06:18:54 +0000 (06:18 +0000)]
l2tp: Update PPP-over-L2TP driver to work over L2TPv3

This patch makes changes to the L2TP PPP code for L2TPv3.

The existing code has some assumptions about the L2TP header which are
broken by L2TPv3. Also the sockaddr_pppol2tp structure of the original
code is too small to support the increased size of the L2TPv3 tunnel
and session id, so a new sockaddr_pppol2tpv3 structure is needed. In
the socket calls, the size of this structure is used to tell if the
operation is for L2TPv2 or L2TPv3.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add L2TPv3 protocol support
James Chapman [Fri, 2 Apr 2010 06:18:49 +0000 (06:18 +0000)]
l2tp: Add L2TPv3 protocol support

The L2TPv3 protocol changes the layout of the L2TP packet
header. Tunnel and session ids change from 16-bit to 32-bit values,
data sequence numbers change from 16-bit to 24-bit values and PPP-specific
fields are moved into protocol-specific subheaders.

Although this patch introduces L2TPv3 protocol support, there are no
userspace interfaces to create L2TPv3 sessions yet.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Add ppp device name to L2TP ppp session data
James Chapman [Fri, 2 Apr 2010 06:18:44 +0000 (06:18 +0000)]
l2tp: Add ppp device name to L2TP ppp session data

When dumping L2TP PPP sessions using /proc/net/pppol2tp, get the
assigned PPP device name from PPP using ppp_dev_name().

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoppp: Add ppp_dev_name() exported function
James Chapman [Fri, 2 Apr 2010 06:18:39 +0000 (06:18 +0000)]
ppp: Add ppp_dev_name() exported function

ppp_dev_name() gives PPP users visibility of a ppp channel's device
name. This can be used by L2TP drivers to dump the assigned PPP
interface name.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Split pppol2tp patch into separate l2tp and ppp parts
James Chapman [Fri, 2 Apr 2010 06:18:33 +0000 (06:18 +0000)]
l2tp: Split pppol2tp patch into separate l2tp and ppp parts

This patch splits the pppol2tp driver into separate L2TP and PPP parts
to prepare for L2TPv3 support. In L2TPv3, protocols other than PPP can
be carried, so this split creates a common L2TP core that will handle
the common L2TP bits which protocol support modules such as PPP will
use.

Note that the existing pppol2tp module is split into l2tp_core and
l2tp_ppp by this change.

There are no feature changes here. Internally, however, there are
significant changes, mostly to handle the separation of PPP-specific
data from the L2TP session and to provide hooks in the core for
modules like PPP to access.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Relocate pppol2tp driver to new net/l2tp directory
James Chapman [Fri, 2 Apr 2010 06:18:28 +0000 (06:18 +0000)]
l2tp: Relocate pppol2tp driver to new net/l2tp directory

This patch moves the existing pppol2tp driver from drivers/net into a
new net/l2tp directory, which is where the upcoming L2TPv3 code will
live. The existing CONFIG_PPPOL2TP config option is left in its
current place to avoid "make oldconfig" issues when an existing
pppol2tp user takes this change. (This is the same approach used for
the pppoatm driver, which moved to net/atm.)

There are no code changes. The existing drivers/net/pppol2tp.c is
simply moved to net/l2tp.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: convert multicast list to list_head
Jiri Pirko [Thu, 1 Apr 2010 21:22:57 +0000 (21:22 +0000)]
net: convert multicast list to list_head

Converts the list and the core manipulating with it to be the same as uc_list.

+uses two functions for adding/removing mc address (normal and "global"
 variant) instead of a function parameter.
+removes dev_mcast.c completely.
+exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
 manipulation with lists on a sandbox (used in bonding and 80211 drivers)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: move address list functions to a separate file
Jiri Pirko [Thu, 1 Apr 2010 21:22:09 +0000 (21:22 +0000)]
net: move address list functions to a separate file

+little renaming of unicast functions to be smooth with multicast ones

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: update version to 5.0.1
Amit Kumar Salecha [Thu, 1 Apr 2010 19:01:36 +0000 (19:01 +0000)]
qlcnic: update version to 5.0.1

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix endianness in fw validation
Amit Kumar Salecha [Thu, 1 Apr 2010 19:01:35 +0000 (19:01 +0000)]
qlcnic: fix endianness in fw validation

cpu_to_le32 was missing and used improperly.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix interface attach sequence
Amit Kumar Salecha [Thu, 1 Apr 2010 19:01:34 +0000 (19:01 +0000)]
qlcnic: fix interface attach sequence

Interface should be visible even if resource allocation fails.
netif_device_attach should be called for every netif_device_detach.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: add driver debug support
Amit Kumar Salecha [Thu, 1 Apr 2010 19:01:33 +0000 (19:01 +0000)]
qlcnic: add driver debug support

Add debug print in driver, can be tuned by ethtool msg level
callback.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: use IDC defined timeout value
Sucheta Chakraborty [Thu, 1 Apr 2010 19:01:32 +0000 (19:01 +0000)]
qlcnic: use IDC defined timeout value

o USE/Read IDC defined timeout value from ROM.
o While resetting chip, don't wait for other pci-func to respond,
  more than reset_ack_timeo seconds,

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix onchip memory access
Dhananjay Phadke [Thu, 1 Apr 2010 19:01:31 +0000 (19:01 +0000)]
qlcnic: fix onchip memory access

Fix incorrect offset calculation and remove unnecessary remap
of the region in bar 0 to access onchip memory.

This was leading to read incorrect values by debug tools.

Signed-off-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: update oncard memory size check
Dhananjay Phadke [Thu, 1 Apr 2010 19:01:30 +0000 (19:01 +0000)]
qlcnic: update oncard memory size check

All QLogic converged NICs have 128-bit 128MB on card memory.
Fix the limit check from 64MB to 128MB and remove unnecessary
64-bit read/write checks.

Signed-off-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: handle queue manager access
Dhananjay Phadke [Thu, 1 Apr 2010 19:01:29 +0000 (19:01 +0000)]
qlcnic: handle queue manager access

Check the access by tools for hardware queue engine and handle it
separately than other block registers, otherwise incorrect data
is returned.

Signed-off-by: Dhananjay Phadke <dhananjay.phadke@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix fw load from file
Amit Kumar Salecha [Thu, 1 Apr 2010 19:01:28 +0000 (19:01 +0000)]
qlcnic: fix fw load from file

Rarely: Fw file size can be unaligned to 8.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agophylib: Add module table to all existing phy drivers
David Woodhouse [Fri, 2 Apr 2010 01:05:56 +0000 (01:05 +0000)]
phylib: Add module table to all existing phy drivers

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agophylib: Support phy module autoloading
David Woodhouse [Fri, 2 Apr 2010 01:05:27 +0000 (01:05 +0000)]
phylib: Support phy module autoloading

We don't use the normal hotplug mechanism because it doesn't work. It will
load the module some time after the device appears, but that's not good
enough for us -- we need the driver loaded _immediately_ because otherwise
the NIC driver may just abort and then the phy 'device' goes away.

[bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id]

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: illegal_highdma() fix
Eric Dumazet [Fri, 2 Apr 2010 20:34:49 +0000 (13:34 -0700)]
net: illegal_highdma() fix

Followup to commit 5acbbd428db47b12f137a8a2aa96b3c0a96b744e
(net: change illegal_highdma to use dma_mask)

If dev->dev.parent is NULL, we should not try to dereference it.

Dont force inline illegal_highdma() as its pretty big now.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Adding PCI SRIOV support
Sarveshwar Bandi [Wed, 31 Mar 2010 02:56:12 +0000 (02:56 +0000)]
be2net: Adding PCI SRIOV support

- Patch adds support to enable PCI SRIOV in the driver and changes to handle initialization of PCI virtual functions.
- Function handler to change mac addresses for VF from its corresponding PF.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/pcmcia/3c589_cs: using netdev_info and friends where appropriate
Alexander Kurz [Wed, 31 Mar 2010 02:42:10 +0000 (02:42 +0000)]
net/pcmcia/3c589_cs: using netdev_info and friends where appropriate

Signed-off-by: Alexander Kurz <linux@kbdbabel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev/fec.c: add phylib supporting to enable carrier detection (v2)
Bryan Wu [Wed, 31 Mar 2010 02:10:44 +0000 (02:10 +0000)]
netdev/fec.c: add phylib supporting to enable carrier detection (v2)

BugLink: http://bugs.launchpad.net/bugs/457878
v2:
 - remove duplicated phy_speed caculation
 - fix the phy_speed caculation according to the DataSheet

v1:
 - removed old MII phy control code
 - add phylib supporting
 - add ethtool interface to make user space NetworkManager works

Tested on Freescale i.MX51 Babbage board.

This patch is based on a patch from Frederic Rodo <fred.rodo@gmail.com>

Cc: Frederic Rodo <fred.rodo@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Amit Kucheria <amit.kucheria@canonical.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: change illegal_highdma to use dma_mask
FUJITA Tomonori [Tue, 30 Mar 2010 22:35:50 +0000 (22:35 +0000)]
net: change illegal_highdma to use dma_mask

Robert Hancock pointed out two problems about NETIF_F_HIGHDMA:

-Many drivers only set the flag when they detect they can use 64-bit DMA,
since otherwise they could receive DMA addresses that they can't handle
(which on platforms without IOMMU/SWIOTLB support is fatal). This means that if
64-bit support isn't available, even buffers located below 4GB will get copied
unnecessarily.

-Some drivers set the flag even though they can't actually handle 64-bit DMA,
which would mean that on platforms without IOMMU/SWIOTLB they would get a DMA
mapping error if the memory they received happened to be located above 4GB.

http://lkml.org/lkml/2010/3/3/530

We can use the dma_mask if we need bouncing or not here. Then we can
safely fix drivers that misuse NETIF_F_HIGHDMA.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Added GRO support
Dmitry Kravkov [Fri, 2 Apr 2010 02:45:34 +0000 (19:45 -0700)]
bnx2x: Added GRO support

Adding GRO support on top of the HW LRO (TPA) support –
there is no measurable performance drawback of adding GRO
on top of it, and it allows better performance when LRO (TPA)
is turned off for virtualization or bridging.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoflow: structurize flow cache
Timo Teräs [Wed, 31 Mar 2010 00:17:06 +0000 (00:17 +0000)]
flow: structurize flow cache

Group all per-cpu data to one structure instead of having many
globals. Also prepare the internals so that we can have multiple
instances of the flow cache if needed.

Only the kmem_cache is left as a global as all flow caches share
the same element size, and benefit from using a common cache.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: remove policy lock when accessing policy->walk.dead
Timo Teräs [Wed, 31 Mar 2010 00:17:05 +0000 (00:17 +0000)]
xfrm: remove policy lock when accessing policy->walk.dead

All of the code considers ->dead as a hint that the cached policy
needs to get refreshed. The read side can just drop the read lock
without any side effects.

The write side needs to make sure that it's written only exactly
once. Only possible race is at xfrm_policy_kill(). This is fixed
by checking result of __xfrm_policy_unlink() when needed. It will
always succeed if the policy object is looked up from the hash
list (so some checks are removed), but it needs to be checked if
we are trying to unlink policy via a reference (appropriate
checks added).

Since policy->walk.dead is written exactly once, it no longer
needs to be protected with a write lock.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm_user: verify policy direction at XFRM_MSG_POLEXPIRE handler
Timo Teräs [Wed, 31 Mar 2010 00:17:04 +0000 (00:17 +0000)]
xfrm_user: verify policy direction at XFRM_MSG_POLEXPIRE handler

Add missing check for policy direction verification. This is
especially important since without this xfrm_user may end up
deleting per-socket policy which is not allowed.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Remove xfrm_state_genid
Herbert Xu [Wed, 31 Mar 2010 01:19:49 +0000 (01:19 +0000)]
xfrm: Remove xfrm_state_genid

The xfrm state genid only needs to be matched against the copy
saved in xfrm_dst.  So we don't need a global genid at all.  In
fact, we don't even need to initialise it.

Based on observation by Timo Teräs.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6 fib: Make rt6_info{} more cache-line aware.
YOSHIFUJI Hideaki / 吉藤英明 [Wed, 31 Mar 2010 22:24:22 +0000 (22:24 +0000)]
ipv6 fib: Make rt6_info{} more cache-line aware.

The head element of rt6_info{} is dst_entry{}, and
IPv6 specific elements follow.

Because elements at the end of dst_entry{} are frequently
updated, it is not good to put frequently-used static
elements, such as rt6i_idev, rt6i_dst or rt6i_flags in the
same cache line.

On the other hand, fib6_table, rt6i_node or rt6i_gateway are
rarely used, so it is okay to stay in the same cache line.

Let's rearrange rt6_info{}.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agorps: keep the old behavior on SMP without rps
Changli Gao [Tue, 30 Mar 2010 20:16:22 +0000 (20:16 +0000)]
rps: keep the old behavior on SMP without rps

keep the old behavior on SMP without rps

RPS introduces a lock operation to per cpu variable input_pkt_queue on
SMP whenever rps is enabled or not. On SMP without RPS, this lock isn't
needed at all.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
net/core/dev.c | 42 ++++++++++++++++++++++++++++--------------
1 file changed, 28 insertions(+), 14 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: Fix rtl8169_rx_interrupt()
Eric Dumazet [Wed, 31 Mar 2010 02:08:31 +0000 (02:08 +0000)]
r8169: Fix rtl8169_rx_interrupt()

In case a reset is performed, rtl8169_rx_interrupt() is called from
process context instead of softirq context. Special care must be taken
to call appropriate network core services (netif_rx() instead of
netif_receive_skb()). VLAN handling also corrected.

Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Diagnosed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogen_estimator: deadlock fix
Eric Dumazet [Wed, 31 Mar 2010 07:06:04 +0000 (07:06 +0000)]
gen_estimator: deadlock fix

One of my test machine got a deadlock during "tc" sessions,
adding/deleting classes & filters, using traffic estimators.

After some analysis, I believe we have a potential use after free case
in est_timer() :

spin_lock(e->stats_lock); << HERE >>
read_lock(&est_lock);
if (e->bstats == NULL)   << TEST >>
goto skip;

Test is done a bit late, because after estimator is killed, and before
rcu grace period elapsed, we might already have freed/reuse memory where
e->stats_locks points to (some qdisc->q.lock)

A possible fix is to respect a rcu grace period at Qdisc dismantle time.

On 64bit, sizeof(struct Qdisc) is exactly 192 bytes. Adding 16 bytes to
it (for struct rcu_head) is a problem because it might change
performance, given QDISC_ALIGNTO is 32 bytes.

This is why I also change QDISC_ALIGNTO to 64 bytes, to satisfy most
current alignment requirements.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: remove redundant verification code
Hagen Paul Pfeifer [Wed, 31 Mar 2010 14:54:46 +0000 (14:54 +0000)]
ipv4: remove redundant verification code

The check if error signaling is wanted (inet->recverr != 0) is done by
the caller: raw.c:raw_err() and udp.c:__udp4_lib_err(), so there is no
need to check this condition again.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoacenic: use the dma state API instead of the pci equivalents
FUJITA Tomonori [Wed, 31 Mar 2010 22:13:06 +0000 (22:13 +0000)]
acenic: use the dma state API instead of the pci equivalents

The DMA API is preferred.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoacenic: fix the misusage of zero dma address
FUJITA Tomonori [Wed, 31 Mar 2010 22:13:05 +0000 (22:13 +0000)]
acenic: fix the misusage of zero dma address

acenic wrongly assumes that zero is an invalid dma address (calls
dma_unmap_page for only non zero dma addresses). Zero is a valid dma
address on some architectures. The dma length can be used here.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: using kmalloc/kfree requires the include of slab.h
Stephen Rothwell [Thu, 1 Apr 2010 07:28:49 +0000 (00:28 -0700)]
net-caif: using kmalloc/kfree requires the include of slab.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: eliminate useless code
Hagen Paul Pfeifer [Tue, 30 Mar 2010 14:24:57 +0000 (14:24 +0000)]
sctp: eliminate useless code

Remove duplicate declaration of symbol: struct hlist_node *node was
already declared, the seconds declaration shadows the first one.

CC: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotipc: define needless global scoped variable static
Hagen Paul Pfeifer [Tue, 30 Mar 2010 14:24:12 +0000 (14:24 +0000)]
tipc: define needless global scoped variable static

struct _zone *tipc_zones has local scope level and
should defined with the correct scoping.

CC: Per Liden <per.liden@nospam.ericsson.com>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: remove redundant code
Eric Dumazet [Tue, 30 Mar 2010 05:02:15 +0000 (05:02 +0000)]
net: remove redundant code

eth_type_trans(skb, netdev) does the "skb->dev = netdev;"
initialization, we can remove it from various network drivers.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAdd hotplug support to mcp251x driver
Marc Zyngier [Mon, 29 Mar 2010 08:57:56 +0000 (08:57 +0000)]
Add hotplug support to mcp251x driver

Chip model can now be selected directly by matching the modalias name
(instead of filling the .model field in platform_data), and allows the
module to be auto-loaded. Previous behaviour is of course still supported.

Convert the two in-tree users to this feature (icontrol & zeus).
Tested on an Zeus platform (mcp2515).

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Christian Pellegrin <chripell@fsfe.org>
Cc: Edwin Peer <epeer@tmtservices.co.za>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofix net/core/dst.c coding style error and warnings
laurent chavey [Mon, 29 Mar 2010 10:41:36 +0000 (10:41 +0000)]
fix net/core/dst.c coding style error and warnings

Fix coding style errors and warnings output while running checkpatch.pl
on the file net/core/dst.c.

Signed-off-by: chavey <chavey@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev: ethtool RXHASH flag
stephen hemminger [Mon, 29 Mar 2010 14:47:27 +0000 (14:47 +0000)]
netdev: ethtool RXHASH flag

This adds ethtool and device feature flag to allow control
of receive hashing offload.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: add per-packet timestamping
Nick Nunley [Fri, 26 Mar 2010 11:36:47 +0000 (11:36 +0000)]
igb: add per-packet timestamping

This patch adds support for per-packet timestamping for the
82580 adapter. The rx timestamp code is also pulled out of the
inlined rx hotpath and instead moved to a seperate function.

This version adds a comment explaining the per-packet timestamping
code added to igb_hwtstamp_ioctl().

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMAINTAINERS: ipg: Jesse Huang's email address bounces
Joe Perches [Sun, 28 Mar 2010 08:42:16 +0000 (08:42 +0000)]
MAINTAINERS: ipg: Jesse Huang's email address bounces

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/ipg: Remove invalid IPG_DDEBUG_MSG uses, neaten
Joe Perches [Sun, 28 Mar 2010 08:35:45 +0000 (08:35 +0000)]
drivers/net/ipg: Remove invalid IPG_DDEBUG_MSG uses, neaten

Some no longer valid IPG_DDEBUG_MSG uses are removed
Validate IPG_DDEBUG_MSG arguments when not #defined
Neaten #defines
marco/macro typo correction

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6 fib: Use "Sweezle" to optimize addr_bit_test().
YOSHIFUJI Hideaki / 吉藤英明 [Sat, 27 Mar 2010 01:24:16 +0000 (01:24 +0000)]
ipv6 fib: Use "Sweezle" to optimize addr_bit_test().

addr_bit_test() is used in various places in IPv6 routing table
subsystem.  It checks if the given fn_bit is set,
where fn_bit counts bits from MSB in words in network-order.

 fn_bit        :   0 .... 31 32 .... 64 65 .... 95 96 ....127

fn_bit >> 5 gives offset of word, and (~fn_bit & 0x1f) gives
count from LSB in the network-endian word in question.

 fn_bit >> 5   :       0          1          2          3
 ~fn_bit & 0x1f:  31 ....  0 31 ....  0 31 ....  0 31 ....  0

Thus, the mask was generated as htonl(1 << (~fn_bit & 0x1f)).
This can be optimized by "sweezle" (See include/asm-generic/bitops/le.h).

In little-endian,
  htonl(1 << bit) = 1 << (bit ^ BITOP_BE32_SWIZZLE)
where
  BITOP_BE32_SWIZZLE is (0x1f & ~7)
So,
  htonl(1 << (~fn_bit & 0x1f)) = 1 << ((~fn_bit & 0x1f) ^ (0x1f & ~7))
                               = 1 << ((~fn_bit ^ ~7) & 0x1f)
                               = 1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)

In big-endian, BITOP_BE32_SWIZZLE is equal to 0.
  1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)
                               = 1 << ((~fn_bit) & 0x1f)
                               = htonl(1 << (~fn_bit & 0x1f))

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: Use ipv6_addr_diff() in sctp_v6_addr_match_len().
YOSHIFUJI Hideaki / 吉藤英明 [Fri, 26 Mar 2010 08:34:30 +0000 (08:34 +0000)]
sctp: Use ipv6_addr_diff() in sctp_v6_addr_match_len().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Use __fls() instead of fls() in __ipv6_addr_diff().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 29 Mar 2010 06:00:05 +0000 (06:00 +0000)]
ipv6: Use __fls() instead of fls() in __ipv6_addr_diff().

Because we have ensured that the argument is non-zero,
it is better to use __fls() and generate better code.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: typo corrections
Joe Perches [Fri, 26 Mar 2010 20:16:59 +0000 (20:16 +0000)]
e1000e: typo corrections

Here are the other miscellaneous corrections
done by an earlier larger suggested patch now
made unnecessary by a less invasive change.

Correct a few missing newlines from logging
messages and a typo fix.  Fix speed/duplex
logging message.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: update hw_debug macro to make use of netdev_dbg call
Alexander Duyck [Thu, 25 Mar 2010 13:10:08 +0000 (13:10 +0000)]
igb: update hw_debug macro to make use of netdev_dbg call

This change updates the igb driver to make use of the netdev_dbg function
macros now provided in netdevice.h

This is meant to be provided as an alternative to the patch provided by
Joe Perches.

It also removes igb_get_time_str since I found that it is unused code that
is no longer used even in debug.

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>
14 years agonet_sched: minor netns related cleanup
Tom Goff [Wed, 31 Mar 2010 02:44:56 +0000 (19:44 -0700)]
net_sched: minor netns related cleanup

These changes were suggested by Alexey Dobriyan <adobriyan@gmail.com>:

  - psched_show() does not use any private data so just pass NULL to
    psched_open()

  - remove unnecessary return statement

Signed-off-by: Tom Goff <thomas.goff@boeing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: avoid duplicate link up on Optima chip
stephen hemminger [Mon, 29 Mar 2010 07:36:20 +0000 (07:36 +0000)]
sky2: avoid duplicate link up on Optima chip

The Optima version has feature to detect link quickly without PHY interrupt,
but it causes duplicate link up events.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: add XL revisions
stephen hemminger [Mon, 29 Mar 2010 07:36:19 +0000 (07:36 +0000)]
sky2: add XL revisions

Add definitions for Yukon XL revisions.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: support Yukon EC_U rev B1 and later
stephen hemminger [Mon, 29 Mar 2010 07:36:18 +0000 (07:36 +0000)]
sky2: support Yukon EC_U rev B1 and later

Need to change logic to support later versions of Yukon 2 EC_U chip.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif-driver: add CAIF serial driver (ldisc)
Sjur Braendeland [Tue, 30 Mar 2010 13:56:30 +0000 (13:56 +0000)]
net-caif-driver: add CAIF serial driver (ldisc)

Add CAIF Serial driver. This driver is implemented as a line discipline.

caif_serial uses the following module parameters:
ser_use_stx - specifies if STart of frame eXtension is in use.
ser_loop    - sets the interface in loopback mode.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF documentation
Sjur Braendeland [Tue, 30 Mar 2010 13:56:29 +0000 (13:56 +0000)]
net-caif: add CAIF documentation

Documentation of the CAIF Protocol.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF Kconfig and Makefiles
Sjur Braendeland [Tue, 30 Mar 2010 13:56:28 +0000 (13:56 +0000)]
net-caif: add CAIF Kconfig and Makefiles

Kconfig and Makefiles with options for:
CAIF:        Including caif
CAIF_DEBUG:  CAIF Debug
CAIF_NETDEV: CAIF Network Device for GPRS Contexts

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF netdevice
Sjur Braendeland [Tue, 30 Mar 2010 13:56:27 +0000 (13:56 +0000)]
net-caif: add CAIF netdevice

Adding GPRS Net Device for PDP Contexts.
The device can be managed by RTNL as defined in if_caif.h.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF socket implementation
Sjur Braendeland [Tue, 30 Mar 2010 13:56:26 +0000 (13:56 +0000)]
net-caif: add CAIF socket implementation

Implementation of CAIF sockets for protocol and address family
PF_CAIF and AF_CAIF.
CAIF socket is connection oriented implementing SOCK_SEQPACKET
and SOCK_STREAM interface with supporting blocking and non-blocking mode.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF device registration functionality
Sjur Braendeland [Tue, 30 Mar 2010 13:56:25 +0000 (13:56 +0000)]
net-caif: add CAIF device registration functionality

Registration and deregistration of CAIF Link Layer.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF generic caif support functions
Sjur Braendeland [Tue, 30 Mar 2010 13:56:24 +0000 (13:56 +0000)]
net-caif: add CAIF generic caif support functions

Support functions for the caif protocol stack:
cfcnfg.c        - CAIF Configuration Module used for
                  adding and removing drivers and connection
cfpkt_skbuff.c  - CAIF Packet layer (SKB helper functions)

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF core protocol stack
Sjur Braendeland [Tue, 30 Mar 2010 13:56:23 +0000 (13:56 +0000)]
net-caif: add CAIF core protocol stack

CAIF generic protocol implementation. This layer is
somewhat generic in order to be able to use and test it outside
the Linux Kernel.

cfctrl.c     - CAIF control protocol layer
cfdbgl.c     - CAIF debug protocol layer
cfdgml.c     - CAIF datagram protocol layer
cffrml.c     - CAIF framing protocol layer
cfmuxl.c     - CAIF mux protocol layer
cfrfml.c     - CAIF remote file manager protocol layer
cfserl.c     - CAIF serial (fragmentation) protocol layer
cfsrvl.c     - CAIF generic service layer functions
cfutill.c    - CAIF utility protocol layer
cfveil.c     - CAIF AT protocol layer
cfvidl.c     - CAIF video protocol layer

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF Link layer device header files
Sjur Braendeland [Tue, 30 Mar 2010 13:56:22 +0000 (13:56 +0000)]
net-caif: add CAIF Link layer device header files

Header files for CAIF Link layer net-device,
and link-layer registration.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF core protocol stack header files
Sjur Braendeland [Tue, 30 Mar 2010 13:56:21 +0000 (13:56 +0000)]
net-caif: add CAIF core protocol stack header files

Add include files for the CAIF Core protocol stack.

caif_layer.h - Defines the structure of the CAIF protocol layers
cfcnfg.h     - CAIF Configuration Module for services and link layers
cfctrl.h     - CAIF Control Protocol Layer
cffrml.h     - CAIF Framing Layer
cfmuxl.h     - CAIF Muxing Layer
cfpkt.h      - CAIF Packet layer (skb helper functions)
cfserl.h     - CAIF Serial Layer
cfsrvl.h     - CAIF Service Layer

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF socket and configuration headers
Sjur Braendeland [Tue, 30 Mar 2010 13:56:20 +0000 (13:56 +0000)]
net-caif: add CAIF socket and configuration headers

Add CAIF types for Socket Address, Socket Options,
and configuration parameters for the GPRS IP network interface.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-caif: add CAIF protocol definitions
Sjur Braendeland [Tue, 30 Mar 2010 13:56:19 +0000 (13:56 +0000)]
net-caif: add CAIF protocol definitions

Add CAIF definitions to existing header files.
Files: if_arp.h, if_ether.h, socket.h.
Types: ARPHRD_CAIF, ETH_P_CAIF, AF_CAIF, PF_CAIF, SOL_CAIF, N_CAIF

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovirtio_net: missing sg_init_table
Shirley Ma [Mon, 29 Mar 2010 15:19:15 +0000 (15:19 +0000)]
virtio_net: missing sg_init_table

Add missing sg_init_table for sg_set_buf in virtio_net which
induced in defer skb patch.

Reported-by: Thomas Müller <thomas@mathtm.de>
Tested-by: Thomas Müller <thomas@mathtm.de>
Signed-off-by: Shirley Ma <xma@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Updating Maintainer list of S2IO 10GbE drivers (xframe / vxge).
Sreenivasa Honnur [Sun, 28 Mar 2010 22:13:50 +0000 (22:13 +0000)]
vxge: Updating Maintainer list of S2IO 10GbE drivers (xframe / vxge).

- updating Maintainer list of S2IO 10GbE drivers (xframe / vxge).

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Version update.
Sreenivasa Honnur [Sun, 28 Mar 2010 22:13:13 +0000 (22:13 +0000)]
vxge: Version update.

- Version update

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Set function-0 as the privilaged function for normal function.
Sreenivasa Honnur [Sun, 28 Mar 2010 22:12:33 +0000 (22:12 +0000)]
vxge: Set function-0 as the privilaged function for normal function.

-  For Normal function (MR-IOV disabled, SR-IOV disabled) Function-0 is the
   privilaged function.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Fixed MSIX interrupt configuration.
Sreenivasa Honnur [Sun, 28 Mar 2010 22:11:41 +0000 (22:11 +0000)]
vxge: Fixed MSIX interrupt configuration.

- Fixed MSIX interrupt configuration to support non contiguous vpaths in
  functions. Four msi-x vectors are reserved per vpath internal to the chip.
  In all, there are 68 msi-x vectors for the 17 vpaths in the chip. In the
  multi function configurations, non-contiguous vpaths are configured to
  represent a function. For instance vpaths 0 and 8 can be configured to
  represent function zero.

- If pci_enable_msix fails for the requested vectors, try with a lesser number
  vectors by reducing the vpath count.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Fixed "ethtool -d" prints.
Sreenivasa Honnur [Sun, 28 Mar 2010 22:10:33 +0000 (22:10 +0000)]
vxge: Fixed "ethtool -d" prints.

- Fixed "ethtool -d" prints
- reg_space pointer was getting over written, updating it correctly.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Align the memory only if it is misaligned.
Sreenivasa Honnur [Sun, 28 Mar 2010 22:09:47 +0000 (22:09 +0000)]
vxge: Align the memory only if it is misaligned.

- Align the memory only if it is misaligned.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Fix starvation of receive ring controller when blasted by short packets.
Sreenivasa Honnur [Sun, 28 Mar 2010 22:08:30 +0000 (22:08 +0000)]
vxge: Fix starvation of receive ring controller when blasted by short packets.

- Fix starvation of receive ring controller when blasted by short packets. This was because the driver was posting 64 rxds initially while the ring controller
was expecting to read 256 replenished rxds. While the driver was coming up,
the internal rxd memory filled up the 64 buffers provided and the ring
controller was left waiting for the remaining 192 rxds to complete the write
back of completed rxds to the host and generation of an interrupt.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovxge: Fix a receive stall due to driver being out of synch with chip.
Sreenivasa Honnur [Sun, 28 Mar 2010 22:07:34 +0000 (22:07 +0000)]
vxge: Fix a receive stall due to driver being out of synch with chip.

- Fix a receive stall due to driver being out of synch with chip. In a corner
case scenario the adapter's ring controller may return a RxD with transfer code
of 0xC, while the host ownership bit is still set to the adapter. The driver
needs to assume that this case where (host_ownership == 1 or adapter) and
(transfer_code == 0xC) is valid, that is, this RxD has been returned by the
receive ring controller but no frame data is associated with the rxd.

- Restore the transfer code field of each newly replenished RxD to 0x0.

- Code cleanup. Removed usage of magic numbers.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 29 Mar 2010 20:50:10 +0000 (13:50 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

14 years agonetxen: fix interrupt for NX2031
Amit Kumar Salecha [Mon, 29 Mar 2010 02:43:45 +0000 (02:43 +0000)]
netxen: fix interrupt for NX2031

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
For NX2031, msix is supported from fw version > 3.4.336.
This fw version check should take flash fw in consider instead of
running fw or fw from file.
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix fw load from file
Amit Kumar Salecha [Mon, 29 Mar 2010 02:43:44 +0000 (02:43 +0000)]
netxen: fix fw load from file

Rarely: Fw file size can be unaligned to 8.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>