openwrt/staging/blogic.git
14 years agoethoc: Use resource_size
Tobias Klauser [Fri, 15 Jan 2010 09:48:22 +0000 (01:48 -0800)]
ethoc: Use resource_size

Use the resource_size function instead of manually calculating the
resource size.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: mscan-mpc5xxx: fix broken support for the MPC5200
Wolfgang Grandegger [Thu, 14 Jan 2010 01:05:48 +0000 (01:05 +0000)]
can: mscan-mpc5xxx: fix broken support for the MPC5200

Due to an invalid "#ifdef CONFIG_PPC_MPC5200", the real clock setup
function was not called for the MPC5200.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovhost_net: a kernel-level virtio server
Michael S. Tsirkin [Thu, 14 Jan 2010 06:17:27 +0000 (06:17 +0000)]
vhost_net: a kernel-level virtio server

What it is: vhost net is a character device that can be used to reduce
the number of system calls involved in virtio networking.
Existing virtio net code is used in the guest without modification.

There's similarity with vringfd, with some differences and reduced scope
- uses eventfd for signalling
- structures can be moved around in memory at any time (good for
  migration, bug work-arounds in userspace)
- write logging is supported (good for migration)
- support memory table and not just an offset (needed for kvm)

common virtio related code has been put in a separate file vhost.c and
can be made into a separate module if/when more backends appear.  I used
Rusty's lguest.c as the source for developing this part : this supplied
me with witty comments I wouldn't be able to write myself.

What it is not: vhost net is not a bus, and not a generic new system
call. No assumptions are made on how guest performs hypercalls.
Userspace hypervisors are supported as well as kvm.

How it works: Basically, we connect virtio frontend (configured by
userspace) to a backend. The backend could be a network device, or a tap
device.  Backend is also configured by userspace, including vlan/mac
etc.

Status: This works for me, and I haven't see any crashes.
Compared to userspace, people reported improved latency (as I save up to
4 system calls per packet), as well as better bandwidth and CPU
utilization.

Features that I plan to look at in the future:
- mergeable buffers
- zero copy
- scalability tuning: figure out the best threading model to use

Note on RCU usage (this is also documented in vhost.h, near
private_pointer which is the value protected by this variant of RCU):
what is happening is that the rcu_dereference() is being used in a
workqueue item.  The role of rcu_read_lock() is taken on by the start of
execution of the workqueue item, of rcu_read_unlock() by the end of
execution of the workqueue item, and of synchronize_rcu() by
flush_workqueue()/flush_work(). In the future we might need to apply
some gcc attribute or sparse annotation to the function passed to
INIT_WORK(). Paul's ack below is for this RCU usage.

(Includes fixes by Alan Cox <alan@linux.intel.com>,
David L Stevens <dlstevens@us.ibm.com>,
Chris Wright <chrisw@redhat.com>)

Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomm: export use_mm/unuse_mm to modules
Michael S. Tsirkin [Thu, 14 Jan 2010 06:17:18 +0000 (06:17 +0000)]
mm: export use_mm/unuse_mm to modules

vhost net module wants to do copy to/from user from a kernel thread,
which needs use_mm. Export it to modules.

Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotun: export underlying socket
Michael S. Tsirkin [Thu, 14 Jan 2010 06:17:09 +0000 (06:17 +0000)]
tun: export underlying socket

Tun device looks similar to a packet socket
in that both pass complete frames from/to userspace.

This patch fills in enough fields in the socket underlying tun driver
to support sendmsg/recvmsg operations, and message flags
MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket
to modules.  Regular read/write behaviour is unchanged.

This way, code using raw sockets to inject packets
into a physical device, can support injecting
packets into host network stack almost without modification.

First user of this interface will be vhost virtualization
accelerator.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: Proper ctrlmode handling for CAN devices
Christian Pellegrin [Thu, 14 Jan 2010 07:08:34 +0000 (07:08 +0000)]
can: Proper ctrlmode handling for CAN devices

This patch adds error checking of ctrlmode values for CAN devices. As
an example all availabe bits are implemented in the mcp251x driver.

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix sparse warning
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:24 +0000 (01:53 +0000)]
netxen: fix sparse warning

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix license header
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:23 +0000 (01:53 +0000)]
netxen: fix license header

GNU General Public License is in file "COPYING".

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix endianness intr coalesce
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:22 +0000 (01:53 +0000)]
netxen: fix endianness intr coalesce

Before sending Interrupt coalesce parameters to device,
convert them in little endian.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix endianness read mac address
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:21 +0000 (01:53 +0000)]
netxen: fix endianness read mac address

In netxen_read_mac_addr, mac_addr should be declared
u64 instead of __le64, used by host only.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: Use less conflicting local var name in change_nexthops() loop macro.
David S. Miller [Fri, 15 Jan 2010 09:16:40 +0000 (01:16 -0800)]
ipv4: Use less conflicting local var name in change_nexthops() loop macro.

As noticed by H Hartley Sweeten, since change_nexthops() uses 'nh'
as it's iterator variable, it can conflict with other existing
local vars.

Use "nexthop_nh" to avoid the conflict and make it easier to figure
out where this magic variable comes from.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/core/sock.c: quiet sparse noise
H Hartley Sweeten [Fri, 15 Jan 2010 09:08:58 +0000 (01:08 -0800)]
net/core/sock.c: quiet sparse noise

In sock_getsockopt the symbol 'lv' is declared as an
unsigned int type, probably due to sizeof returning a
size_t which is really an unsigned int.

This produces a sparse warning for SO_PEERNAME due to
the sock->ops->getname() call:

warning: incorrect type in argument 3 (different signedness)
   expected int *sockaddr_len
   got unsigned int *<noident>

Quiet the warning by changing the type of 'lv' to an int.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoproc_fops: convert drivers/isdn/ to seq_file
Alexey Dobriyan [Thu, 14 Jan 2010 11:10:54 +0000 (03:10 -0800)]
proc_fops: convert drivers/isdn/ to seq_file

Convert code away from ->read_proc/->write_proc interfaces.  Switch to
proc_create()/proc_create_data() which make addition of proc entries
reliable wrt NULL ->proc_fops, NULL ->data and so on.

Problem with ->read_proc et al is described here commit
786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
/proc entries"

[akpm@linux-foundation.org: CONFIG_PROC_FS=n build fix]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetpoll: allow execution of multiple rx_hooks per interface
Daniel Borkmann [Tue, 12 Jan 2010 14:27:30 +0000 (14:27 +0000)]
netpoll: allow execution of multiple rx_hooks per interface

Signed-off-by: Daniel Borkmann <danborkmann@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogenetlink: optimize ctrl_dumpfamily()
Samir Bellabes [Thu, 7 Jan 2010 22:10:56 +0000 (22:10 +0000)]
genetlink: optimize ctrl_dumpfamily()

there is a unnecessary test which can be replaced by a good initialization in
the 'for' statement

Noticed by Serge E. Hallyn <serue@us.ibm.com>

Signed-off-by: Samir Bellabes <sam@synack.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tlan: Remove TRUE/FALSE defines, use bool
Joe Perches [Tue, 12 Jan 2010 20:59:13 +0000 (20:59 +0000)]
drivers/net/tlan: Remove TRUE/FALSE defines, use bool

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: default BLKT values for new OSA/3 hardware
Einar Lueck [Mon, 11 Jan 2010 02:50:52 +0000 (02:50 +0000)]
qeth: default BLKT values for new OSA/3 hardware

Set default BLKT values for new OSA/3 hardware.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: avoid recovery during device online setting
Ursula Braun [Mon, 11 Jan 2010 02:50:51 +0000 (02:50 +0000)]
qeth: avoid recovery during device online setting

If a qeth device is set online, several initialisation steps are
performed. If a failure in one of these steps occurs, the qeth
device is reset into DOWN state. If due to the failure a qeth recovery
is scheduled and started in another thread, this might cause all kinds
of conflicts, even a kernel panic. The patch forbids scheduling of a
qeth recovery while online processing is performed till the card is in
state SOFTSETUP.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: HiperSockets Network Traffic Analyzer
Ursula Braun [Mon, 11 Jan 2010 02:50:50 +0000 (02:50 +0000)]
qeth: HiperSockets Network Traffic Analyzer

New feature to trace HiperSockets network traffic for debugging
purposes.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: genericize the update multicast address list
Bruce Allan [Wed, 13 Jan 2010 02:05:38 +0000 (02:05 +0000)]
e1000e: genericize the update multicast address list

Make updating the multicast address list generic for all families and
enforce the requirement to update the entire multicast table array all at
once instead of piecemeal which causes problems on some parts.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: provide MAC-family-specific function to set LAN ID
Bruce Allan [Wed, 13 Jan 2010 02:05:18 +0000 (02:05 +0000)]
e1000e: provide MAC-family-specific function to set LAN ID

Provide MAC-specific function pointer to determine the LAN ID (PCI func).
The LAN ID is used internally by the driver to determine which h/w lock
to use to protect accessing the PHY on ESB2 as well as help to determine
the alternate MAC address on some parts.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: use alternate MAC address on ESB2 if available
Bruce Allan [Wed, 13 Jan 2010 02:04:58 +0000 (02:04 +0000)]
e1000e: use alternate MAC address on ESB2 if available

Similar to 82571/2/3 parts that already do this, if ESB2/80003es2lan parts
have an alternate MAC address provided in the EEPROM use it instead of the
default MAC address.  This patch makes the the actual code that does this
generic so that it can be better used by both MAC families.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agolib/vsprintf.c: Add IPV4 options %pI4[hnbl] for host, network, big and little endian
Joe Perches [Thu, 14 Jan 2010 04:23:30 +0000 (20:23 -0800)]
lib/vsprintf.c: Add IPV4 options %pI4[hnbl] for host, network, big and little endian

This should allow the removal of the #defines and uses
of NIPQUAD and NIPQUAD_FMT

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: Unify droping of invalid tx skbs and netdev stats
Oliver Hartkopp [Tue, 12 Jan 2010 10:00:46 +0000 (02:00 -0800)]
can: Unify droping of invalid tx skbs and netdev stats

To prevent the CAN drivers to operate on invalid socketbuffers the skbs are
now checked and silently dropped at the xmit-function consistently.

Also the netdev stats are consistently using the CAN data length code (dlc)
for [rx|tx]_bytes now.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Generalized TTL Security Mechanism
Stephen Hemminger [Tue, 12 Jan 2010 00:28:01 +0000 (16:28 -0800)]
tcp: Generalized TTL Security Mechanism

This patch adds the kernel portions needed to implement
RFC 5082 Generalized TTL Security Mechanism (GTSM).
It is a lightweight security measure against forged
packets causing DoS attacks (for BGP).

This is already implemented the same way in BSD kernels.
For the necessary Quagga patch
  http://www.gossamer-threads.com/lists/quagga/dev/17389

Description from Cisco
  http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gt_btsh.html

It does add one byte to each socket structure, but I did
a little rearrangement to reuse a hole (on 64 bit), but it
does grow the structure on 32 bit

This should be documented on ip(4) man page and the Glibc in.h
file also needs update.  IPV6_MINHOPLIMIT should also be added
(although BSD doesn't support that).

Only TCP is supported, but could also be added to UDP, DCCP, SCTP
if desired.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agolib: Kill bit-reversed FDDI MAC output case, it's bogus.
Joe Perches [Mon, 11 Jan 2010 08:44:14 +0000 (00:44 -0800)]
lib: Kill bit-reversed FDDI MAC output case, it's bogus.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Mon, 11 Jan 2010 06:55:03 +0000 (22:55 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/benet/be_cmds.h
include/linux/sysctl.h

14 years agovxge: use pci_dma_mapping_error to test return value
Denis Kirjanov [Sun, 10 Jan 2010 21:40:10 +0000 (13:40 -0800)]
vxge: use pci_dma_mapping_error to test return value

pci_dma_mapping_error should be used to test return value of
pci_map_single or pci_map_page.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix ethtool diag test for VT mode operation
Greg Rose [Sat, 9 Jan 2010 02:27:05 +0000 (02:27 +0000)]
ixgbe: Fix ethtool diag test for VT mode operation

Skip MAC loopback test when the adapter is set to a VT mode such as SR-IOV
or VMDq

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Add SR-IOV features to main module
Greg Rose [Sat, 9 Jan 2010 02:26:46 +0000 (02:26 +0000)]
ixgbe: Add SR-IOV features to main module

Adds SR-IOV features supported by the 82599 controller to the main driver
module.  If the CONFIG_PCI_IOV kernel option is selected then the SR-IOV
features are enabled.  Use the max_vfs module option to allocate up to 63
virtual functions per physical port.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Add SR-IOV feature enablement code
Greg Rose [Sat, 9 Jan 2010 02:26:26 +0000 (02:26 +0000)]
ixgbe: Add SR-IOV feature enablement code

Adds code to the core 82599 module to support SR-IOV features of the 82599
network controller

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Add SR-IOV specific modules to driver Makefile
Greg Rose [Sat, 9 Jan 2010 02:26:07 +0000 (02:26 +0000)]
ixgbe: Add SR-IOV specific modules to driver Makefile

Add the mailbox and SR-IOV feature modules to the ixgbe driver Makefile.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Add SR-IOV specific features
Greg Rose [Sat, 9 Jan 2010 02:25:48 +0000 (02:25 +0000)]
ixgbe: Add SR-IOV specific features

This module and header file add functions to support SR-IOV features of the
82599 10Gbe controller.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Add SR-IOV register, structure and bit defines
Greg Rose [Sat, 9 Jan 2010 02:25:29 +0000 (02:25 +0000)]
ixgbe: Add SR-IOV register, structure and bit defines

This patch adds register definitions, bit definitions and structures used by
the driver to support SR-IOV features of the 82599 controller.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Mailbox header and code module
Greg Rose [Sat, 9 Jan 2010 02:25:10 +0000 (02:25 +0000)]
ixgbe: Mailbox header and code module

The 82599 virtual function device and the master 82599 physical function
device implement a mailbox utility for communication between the devices
using some SRAM scratch memory and a doorbell/answering mechanism enabled
via interrupt and/or polling.  This C module and accompanying header
file implement the base functions for use of this feature.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Kconfig, Makefile and Documentation
Greg Rose [Sat, 9 Jan 2010 02:24:50 +0000 (02:24 +0000)]
ixgbevf: Kconfig, Makefile and Documentation

Modifications for the Kconfig and network device Makefile to add the ixgbevf
driver module to the kernel plus basic driver documentation.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Driver Makefile
Greg Rose [Sat, 9 Jan 2010 02:24:31 +0000 (02:24 +0000)]
ixgbevf: Driver Makefile

82599 Virtual Function Device Driver Makefile

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Driver main and ethool interface module and main header
Greg Rose [Sat, 9 Jan 2010 02:24:10 +0000 (02:24 +0000)]
ixgbevf: Driver main and ethool interface module and main header

These modules and header contain the Linux OS network interface code and core
interrupt and network send/receive handlers.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Mailbox communication
Greg Rose [Sat, 9 Jan 2010 02:23:50 +0000 (02:23 +0000)]
ixgbevf: Mailbox communication

The 82599 virtual function device and the master 82599 physical function
device implement a mailbox utility for communication between the devices
using some SRAM scratch memory and a doorbell/answering mechanism enabled
via interrupt and/or polling.  This C module and accompanying header
file implement the base functions for use of this feature.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: 82599 Virtual Function core functions and header
Greg Rose [Sat, 9 Jan 2010 02:23:31 +0000 (02:23 +0000)]
ixgbevf: 82599 Virtual Function core functions and header

This module and header file contain the core functions for the 82599
virtual function device.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Macros, data structures, useful defines and registers
Greg Rose [Sat, 9 Jan 2010 02:23:11 +0000 (02:23 +0000)]
ixgbevf: Macros, data structures, useful defines and registers

These two headers define the commonly used macros, data structures,
register bits and register offsets used by the ixgbevf driver on the
82599 virtual function device

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET: irda, remove unnecessary checks
Jiri Slaby [Sun, 10 Jan 2010 01:17:34 +0000 (01:17 +0000)]
NET: irda, remove unnecessary checks

Stanse found a potential null dereference in ircomm_tty_close
and ircomm_tty_hangup. There is a check for tty being NULL,
but it is dereferenced earlier. But it is bogus, the tty cannot
be NULL, so remove the !tty checks.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET: ipv6, remove unnecessary check
Jiri Slaby [Sun, 10 Jan 2010 00:43:03 +0000 (00:43 +0000)]
NET: ipv6, remove unnecessary check

Stanse found a potential null dereference in snmp6_unregister_dev.
There is a check for idev being NULL, but it is dereferenced
earlier. But idev cannot be NULL when passed to
snmp6_unregister_dev, so remove the test.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac8390: Fix build breakage
Geert Uytterhoeven [Sun, 10 Jan 2010 07:00:32 +0000 (23:00 -0800)]
mac8390: Fix build breakage

commit 18c0019102228875cb0f6f252dad5148491e96b2 ("drivers/net/mac8390.c:
Convert printk(KERN_<level> to pr_<level>(") broke the build:

| drivers/net/mac8390.c:306: error: expected ')' before 'version'

as "version" is not a string literal, but a variable.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Fri, 8 Jan 2010 21:15:47 +0000 (13:15 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

14 years agonetfilter: ebtables: enforce CAP_NET_ADMIN
Florian Westphal [Fri, 8 Jan 2010 16:31:24 +0000 (17:31 +0100)]
netfilter: ebtables: enforce CAP_NET_ADMIN

normal users are currently allowed to set/modify ebtables rules.
Restrict it to processes with CAP_NET_ADMIN.

Note that this cannot be reproduced with unmodified ebtables binary
because it uses SOCK_RAW.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoigb: add support for device reset interrupt
Alexander Duyck [Thu, 7 Jan 2010 17:41:00 +0000 (17:41 +0000)]
igb: add support for device reset interrupt

This patch adds support for the global device reset interrupt.  Without
this change the drivers will report tx hangs on all ports when a global
device reset occurs.

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 agopowerpc/mpc5xxx: add OF platform binding doc for FSL MSCAN devices
Wolfgang Grandegger [Thu, 7 Jan 2010 09:43:08 +0000 (09:43 +0000)]
powerpc/mpc5xxx: add OF platform binding doc for FSL MSCAN devices

This patch adds documentation for the MSCAN OF device bindings for
the MPC512x and moves the one for the MPC5200 to the new common file
"Documentation/powerpc/dts-bindings/fsl/can.txt".

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: mscan-mpc5xxx: add support for the MPC512x processor
Wolfgang Grandegger [Thu, 7 Jan 2010 09:43:07 +0000 (09:43 +0000)]
can: mscan-mpc5xxx: add support for the MPC512x processor

The main differences compared to the MSCAN on the MPC5200 are:

- More flexibility in choosing the CAN source clock and frequency:

  Three different clock sources can be selected: "ip", "ref" or "sys".
  For the latter two, a clock divider can be defined as well. If the
  clock source is not specified by the device tree, we first try to
  find an optimal CAN source clock based on the system clock. If that
  is not possible, the reference clock will be used.

- The behavior of bus-off recovery is configurable:

  To comply with the usual handling of Socket-CAN bus-off recovery,
  "recovery on request" is selected (instead of automatic recovery).

Note that only MPC5121 Rev. 2 and later is supported.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: mscan: fix improper return if dlc < 8 in start_xmit function
Wolfgang Grandegger [Thu, 7 Jan 2010 09:43:06 +0000 (09:43 +0000)]
can: mscan: fix improper return if dlc < 8 in start_xmit function

The start_xmit function of the MSCAN Driver did return improperly if
the CAN dlc check failed (skb not freed and invalid return code). This
patch adds a proper check of the frame lenght and data size and returns
now correctly. The invalid skb packets are dropped silently as suggested
by David Miller in the thread "[RFC] ndo_validate_skb: Let the netdev
check a valid skb content" on the netdev mailing list.

Furthermore, a typo has been fixed.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/ipv6/tcp_ipv6.c: Use compressed IPv6 address
Joe Perches [Fri, 8 Jan 2010 08:59:52 +0000 (00:59 -0800)]
net/ipv6/tcp_ipv6.c: Use compressed IPv6 address

Use "[compressed ipv6]:port" form suggested by:
http://tools.ietf.org/id/draft-ietf-6man-text-addr-representation-03.txt

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoep93xx_eth.c general cleanup
H Hartley Sweeten [Fri, 8 Jan 2010 08:53:03 +0000 (00:53 -0800)]
ep93xx_eth.c general cleanup

General cleanup of the ep93xx_eth driver.

1) Use pr_fmt() to prefix the module name and __func__ to the error
   messages.
2) <linux/io.h> instead of <asm/io.h>
3) <mach/hardware.h> instead of <mach/ep93xx-regs.h> and <mach/platform.h>
4) Move the ep93xx_mdio_read (and ep93xx_mdio_write) function to eliminate
   the function prototype.
5) Change all the printk(<level> messages to pr_<level> and remove the
   __func__ argument.
6) Use platform_get_{resource/irq} to get the platform resources and add
   an error check.
7) Use resource_size() for request_mem_region() and ioremap().
8) Use %pM to print the MAC address at the end of the probe.
9) Use dev->dev_addr not data->dev_addr for the MAC argument because a
   random address could be used if the platform does not supply one.

The message at the end of the probe is left as a printk since it displays
cleaner without the function name that would be displayed with pr_info().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Flush the register writes which setup the MSI-X table
Benjamin Li [Fri, 8 Jan 2010 08:51:21 +0000 (00:51 -0800)]
bnx2: Flush the register writes which setup the MSI-X table

The MSI-X table size needs to be properly set before pci_enable_msix()
is called.  But on certain machines, the writes are delayed and the
MSI-X table size is incorrectly read.  By reading the
BNX2_PCI_MSIX_CONTROL register, the writes are flushed and now
ensure that the MSI-X table is set correctly before MSI-X
is enable on the device.

This patch was originally diagnosed and authored by
Kalyan Ram Chintalapati <kalyanc@vmware.com>.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Kalyan Ram Chintalapati <kalyanc@vmware.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: fix and commonize code for setting the receive address registers
Bruce Allan [Thu, 7 Jan 2010 16:32:13 +0000 (16:32 +0000)]
e1000e: fix and commonize code for setting the receive address registers

Fix e1000e_rar_set() to flush consecutive register writes to avoid write
combining which some parts cannot handle.  Update e1000e_init_rx_addrs()
to call the fixed e1000e_rar_set() instead of duplicating code.

Also change e1000e_rar_set() to _not_ set the Address Valid bit if the MAC
address is all zeros.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: e1000e_enable_tx_pkt_filtering() returns wrong value
Bruce Allan [Thu, 7 Jan 2010 16:31:54 +0000 (16:31 +0000)]
e1000e: e1000e_enable_tx_pkt_filtering() returns wrong value

e1000e_enable_tx_pkt_filtering() will return a non-zero value if the
driver fails to enable the manageability interface on the host for
any reason; instead it should retun zero to indicate filtering has been
disabled.  Also provide a single exit point for the function.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: perform 10/100 adaptive IFS only on parts that support it
Bruce Allan [Thu, 7 Jan 2010 16:31:35 +0000 (16:31 +0000)]
e1000e: perform 10/100 adaptive IFS only on parts that support it

Adaptive IFS which involves writing to the Adaptive IFS Throttle register
was being done for all devices supported by the driver even though it is
not supported (i.e. the register doesn't even exist) on some devices.  The
feature is supported on 8257x/82583 and ICH/PCH based devices, but not
on ESB2.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: don't accumulate PHY statistics on PHY read failure
Bruce Allan [Thu, 7 Jan 2010 16:31:16 +0000 (16:31 +0000)]
e1000e: don't accumulate PHY statistics on PHY read failure

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: call pci_save_state() after pci_restore_state()
Bruce Allan [Thu, 7 Jan 2010 16:30:56 +0000 (16:30 +0000)]
e1000e: call pci_save_state() after pci_restore_state()

Due to a change in pci_restore_state()[1] which clears the saved_state
flag, the driver should call pci_save_state() to set the flag once again
to avoid issues with EEH (same fix that recently was submitted for ixgbe).

[1] commmit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: update version to 4.0.72
Amit Kumar Salecha [Thu, 7 Jan 2010 22:10:17 +0000 (22:10 +0000)]
netxen: update version to 4.0.72

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix set mac addr
Amit Kumar Salecha [Thu, 7 Jan 2010 22:10:16 +0000 (22:10 +0000)]
netxen: fix set mac addr

o If tx and rx resources are not available, during set mac request.
  Then this request wont be passed to firmware and it will be added to
  driver mac list and will never make it to firmware.
  So if resources are not available, don't add it to driver mac list.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix smatch warning
Amit Kumar Salecha [Thu, 7 Jan 2010 22:10:15 +0000 (22:10 +0000)]
netxen: fix smatch warning

o Fix pointless assignments

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix tx ring memory leak
Amit Kumar Salecha [Thu, 7 Jan 2010 22:10:14 +0000 (22:10 +0000)]
netxen: fix tx ring memory leak

o While unloading driver or resetting the context, tx ring was not
  getting free.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: implements ethtool function to read eeprom data.
Sarveshwar Bandi [Fri, 8 Jan 2010 08:07:27 +0000 (00:07 -0800)]
be2net: implements ethtool function to read eeprom data.

The patch implements a firmware command to fetch the eeprom data.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: update the netstamp_needed counter when cloning sockets
Octavian Purdila [Fri, 8 Jan 2010 08:00:09 +0000 (00:00 -0800)]
tcp: update the netstamp_needed counter when cloning sockets

This fixes a netstamp_needed accounting issue when the listen socket
has SO_TIMESTAMP set:

    s = socket(AF_INET, SOCK_STREAM, 0);
    setsockopt(s, SOL_SOCKET, SO_TIMESTAMP, 1); -> netstamp_needed = 1
    bind(s, ...);
    listen(s, ...);
    s2 = accept(s, ...); -> netstamp_needed = 1
    close(s2); -> netstamp_needed = 0
    close(s); -> netstamp_needed = -1

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/: use DEFINE_PCI_DEVICE_TABLE()
Alexey Dobriyan [Thu, 7 Jan 2010 11:58:11 +0000 (11:58 +0000)]
drivers/net/: use DEFINE_PCI_DEVICE_TABLE()

Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section
in every case.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoTI DaVinci EMAC: Handle emac module clock correctly.
Sriram [Thu, 7 Jan 2010 00:22:37 +0000 (00:22 +0000)]
TI DaVinci EMAC: Handle emac module clock correctly.

In the driver probe function the emac module clock needs to
be enabled before calling register_netdev(). As soon as the
device is registered the driver get_stats function can be invoked
by the core - the module clock must be switched on to be able to
read from stats registers. Also explicitly call matching clk_disable
for failure conditions in probe function.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips
Ben Hutchings [Thu, 7 Jan 2010 02:41:51 +0000 (02:41 +0000)]
dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips

The Davicom DM9100 and DM9102 chips are used on the motherboards of
some SPARC systems (supported by the tulip driver) and also in PCI
expansion cards (supported by the dmfe driver).  There is no
difference in the PCI device ids for the two different configurations,
so these drivers both claim the device ids.  However, it is possible
to distinguish the two configurations by the presence of Open Firmware
properties for them, so we do that.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix compiler warning about variable being used uninitialized
PJ Waskiewicz [Wed, 6 Jan 2010 17:50:29 +0000 (17:50 +0000)]
ixgbe: Fix compiler warning about variable being used uninitialized

tc is still throwing a warning that is could be used
uninitialized.  This fixes it, and properly formats the device ID
checks for the use of this variable.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: update the driver's module version
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:23 +0000 (23:07 +0000)]
stmmac: update the driver's module version

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: improve Kconfig help
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:22 +0000 (23:07 +0000)]
stmmac: improve Kconfig help

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: include netdevice.h into the common.h header
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:21 +0000 (23:07 +0000)]
stmmac: include netdevice.h into the common.h header

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: rename the gmac as dwmac1000 and split core and dma parts
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:20 +0000 (23:07 +0000)]
stmmac: rename the gmac as dwmac1000 and split core and dma parts

Use dwmac1000 naming instead of gmac.
The patch also splits the gmac.c file in two new ones:
dwmac1000_core.c and dwmac1000_dma.c.
This could actually help on some architectures where different
DMA engines are used.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: rename mac100 as dwmac100 and fix spare coding style
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:19 +0000 (23:07 +0000)]
stmmac: rename mac100 as dwmac100 and fix spare coding style

This patch renames the mac100.[ch] as dwmac100.[ch]; this
looks more specific and appropriate for these chip series.
The patch also fixes some spare coding style issues.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: move the dma out from the main
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:18 +0000 (23:07 +0000)]
stmmac: move the dma out from the main

This patch moves the dma related functions (interrupt, start, stop etc.)
out from the main driver code. This will help to support new DMA
engines.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: reorganise class operations.
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:17 +0000 (23:07 +0000)]
stmmac: reorganise class operations.

This patch reorganises the internal stmmac ops structure.
The stmmac_ops has been splitted into other three structures named:
 stmmac_ops
 stmmac_dma_ops
 stmmac_desc_ops

This makes the code more clear and also helps the next work to
make the driver more generic.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: do not call fix_mac_speed if NULL
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:16 +0000 (23:07 +0000)]
stmmac: do not call fix_mac_speed if NULL

On some platforms, fix_mac_speed is used for
configuring some sysconf registers according
to the working speed.
This patch fixes the fix_mac_speed invocation
that cannot be done if it is a NULL pointer.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: perform hw bus configuration
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:15 +0000 (23:07 +0000)]
stmmac: perform hw bus configuration

On some platforms it can be required a different
configuration of the bus. This can be done
by invoking the bus_setup. It is defined
for all the platforms that needs this kind of
configuration.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: rewiew platform data
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:14 +0000 (23:07 +0000)]
stmmac: rewiew platform data

This patch rewiews and reorganises all the data
come from the platform removing any dependency
from the stm code.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: add the new Header file for stmmac platform data
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:13 +0000 (23:07 +0000)]
stmmac: add the new Header file for stmmac platform data

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: convert unicast addr list to list_head
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:12 +0000 (23:07 +0000)]
stmmac: convert unicast addr list to list_head

This patch converts unicast address list to standard list_head using
previously introduced struct netdev_hw_addr.

Note: this patch also removes a debug printk used for displaying the
mac addresses. Indeed, it's is possible to dump the registers with
ethtool.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: use MII_BUS_ID_SIZE instead of BUS_ID_SIZE
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:11 +0000 (23:07 +0000)]
stmmac: use MII_BUS_ID_SIZE instead of BUS_ID_SIZE

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/skfp/skfddi.c: use %pMF to show MAC address
hartleys [Thu, 7 Jan 2010 13:27:46 +0000 (13:27 +0000)]
drivers/net/skfp/skfddi.c: use %pMF to show MAC address

Use the %pMF kernel extension to display the MAC address.

The address will still be displayed in the FDDI Canonical format.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/defxx.c: use %pMF to show MAC address
hartleys [Thu, 7 Jan 2010 13:24:19 +0000 (13:24 +0000)]
drivers/net/defxx.c: use %pMF to show MAC address

Use the %pMF kernel extension to display the MAC address.

The address will still be displayed in the FDDI Canonical format.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agolib/vsprintf.c: Add %pMF to format FDDI bit reversed MAC addresses
Joe Perches [Thu, 7 Jan 2010 11:43:50 +0000 (11:43 +0000)]
lib/vsprintf.c: Add %pMF to format FDDI bit reversed MAC addresses

On Mon, 2010-01-04 at 23:43 +0000, Maciej W. Rozycki wrote:
> The example below shows an address, and the sequence of bits or symbols
> that would be transmitted when the address is used in the Source Address
> or Destination Address fields on the MAC header.  The transmission line
> shows the address bits in the order transmitted, from left to right.  For
> IEEE 802 LANs these correspond to actual bits on the medium.  The FDDI
> symbols line shows how the FDDI PHY sends the address bits as encoded
> symbols.
>
>         MSB:            35:7B:12:00:00:01
>         Canonical:      AC-DE-48-00-00-80
>         Transmission:   00110101 01111011 00010010 00000000 00000000 00000001
>         FDDI Symbols:   35 7B 12 00 00 01"
>
> Please note that this address has its group bit clear.
>
>  This notation is also defined in the "FDDI MEDIA ACCESS CONTROL-2
> (MAC-2)" (X3T9/92-120) document although that book does not have a need
> to use the MSB form and it's skipped.

Adds 6 bytes to object size for x86

New:
$ size lib/vsprintf.o
   text    data     bss     dec     hex filename
   8664       0       2    8666    21da lib/vsprintf.o
$ size lib/vsprintf.o
   text    data     bss     dec     hex filename
   8658       0       2    8660    21d4 lib/vsprintf.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetfilter: nf_ct_ftp: fix out of bounds read in update_nl_seq()
Patrick McHardy [Thu, 7 Jan 2010 17:33:18 +0000 (18:33 +0100)]
netfilter: nf_ct_ftp: fix out of bounds read in update_nl_seq()

As noticed by Dan Carpenter <error27@gmail.com>, update_nl_seq()
currently contains an out of bounds read of the seq_aft_nl array
when looking for the oldest sequence number position.

Fix it to only compare valid positions.

Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agodrivers/message/i2o/i2o_proc.c: use %pM to show MAC address
H Hartley Sweeten [Thu, 7 Jan 2010 09:18:23 +0000 (01:18 -0800)]
drivers/message/i2o/i2o_proc.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/infiniband/hw/cxgb3/iwch_cm.c: use %pM to show MAC address
H Hartley Sweeten [Thu, 7 Jan 2010 09:17:27 +0000 (01:17 -0800)]
drivers/infiniband/hw/cxgb3/iwch_cm.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wimax/i2400m/driver.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 07:00:57 +0000 (07:00 +0000)]
drivers/net/wimax/i2400m/driver.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/qlge/qlge_main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:58:12 +0000 (06:58 +0000)]
drivers/net/qlge/qlge_main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/atl1e/atl1e_main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:55:40 +0000 (06:55 +0000)]
drivers/net/atl1e/atl1e_main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wimax/i2400m/fw.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 07:01:54 +0000 (07:01 +0000)]
drivers/net/wimax/i2400m/fw.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/atl1c/atl1c_main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:54:01 +0000 (06:54 +0000)]
drivers/net/atl1c/atl1c_main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/vxge/vxge-main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:59:23 +0000 (06:59 +0000)]
drivers/net/vxge/vxge-main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/media/dvb/dvb-core/dvb_net.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:45:21 +0000 (06:45 +0000)]
drivers/media/dvb/dvb-core/dvb_net.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address and mask.

The only difference in the output is that the output is shown in
the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/lanai.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:26:49 +0000 (06:26 +0000)]
drivers/atm/lanai.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/fore200e.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:22:20 +0000 (06:22 +0000)]
drivers/atm/fore200e.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/firmware/iscsi_ibft.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:37:43 +0000 (06:37 +0000)]
drivers/firmware/iscsi_ibft.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Also, remove the 'mac' variable and use nic->mac directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Peter Jones <pjones@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/idt77252.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:24:23 +0000 (06:24 +0000)]
drivers/atm/idt77252.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/ixgbe/ixgbe_common.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:56:52 +0000 (06:56 +0000)]
drivers/net/ixgbe/ixgbe_common.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/nicstar.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:28:08 +0000 (06:28 +0000)]
drivers/atm/nicstar.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>