platform/kernel/linux-rpi.git
10 years agoqlcnic: Add driver logs in error path.
Sucheta Chakraborty [Fri, 25 Apr 2014 21:43:59 +0000 (17:43 -0400)]
qlcnic: Add driver logs in error path.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlcnic: Allow setting TX interrupt coalescing parameters from VF.
Sucheta Chakraborty [Fri, 25 Apr 2014 21:43:58 +0000 (17:43 -0400)]
qlcnic: Allow setting TX interrupt coalescing parameters from VF.

o Tx interrupt coalescing parameters can now be set from VF.
o Added validation code in PF to validate the parameters.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlcnic: Add hwmon interface to export board temperature.
Harish Patil [Fri, 25 Apr 2014 21:43:57 +0000 (17:43 -0400)]
qlcnic: Add hwmon interface to export board temperature.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlcnic: Optimize MAC learning code
Shahed Shaikh [Fri, 25 Apr 2014 21:43:56 +0000 (17:43 -0400)]
qlcnic: Optimize MAC learning code

* Use rx_mac_learn instead of mac_learn and eSwitch flag check in Rx path of
  82xx adapter.
* Check for MAC filter overrun only after driver scans through cached MAC address list.
  This will help to update the time stamp of cached MAC addresses even if
  adapter runs out of MAC address filter limit.
* Remove expensive log thrown by driver when MAC address filters are exhausted

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
Alexander Gordeev [Fri, 25 Apr 2014 09:43:50 +0000 (11:43 +0200)]
qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()

As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.

Cc: Shahed Shaikh <shahed.shaikh@qlogic.com>
Cc: Dept-HSGLinuxNICDev@qlogic.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoFDDI: Reformat <linux/if_fddi.h> for 8-character tabs
Maciej W. Rozycki [Fri, 25 Apr 2014 09:35:07 +0000 (10:35 +0100)]
FDDI: Reformat <linux/if_fddi.h> for 8-character tabs

Some of our FDDI support code has been apparently written with an
assumption that tabs are 4-character wide.  In preparation to the next
change this update reformats <linux/if_fddi.h> so that it stays within 79
columns and otherwise renders correctly with 8-character tabs.  No
functional change.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotipc: fix a possible memory leak
Ying Xue [Fri, 25 Apr 2014 02:44:15 +0000 (10:44 +0800)]
tipc: fix a possible memory leak

The commit a8b9b96e959f3c035af20b1bd2ba67b0b7269b19 ("tipc: fix race
in disc create/delete") leads to the following static checker warning:

net/tipc/discover.c:352 tipc_disc_create()
warn: possible memory leak of 'req'

The risk of memory leak really exists in practice. Especially when
it's failed to allocate memory for "req->buf", tipc_disc_create()
doesn't free its allocated memory, instead just directly returns
with ENOMEM error code. In this situation, memory leak, of course,
happens.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlge: Convert /n to \n
Joe Perches [Fri, 25 Apr 2014 01:50:59 +0000 (18:50 -0700)]
qlge: Convert /n to \n

Use a newline character appropriately.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'systemport'
David S. Miller [Sat, 26 Apr 2014 16:57:51 +0000 (12:57 -0400)]
Merge branch 'systemport'

Florian Fainelli says:

====================
net: Broadcom SYSTEMPORT driver

This patchset adds support for the Broadcom SYSTEMPORT Ethernet MAC
controller which is used in the latest Broadcom BCM7xxx Set Top Box
System-on-a-Chip. This Ethernet MAC is interfaced to an internal
switch which will get a separate driver submitted later on.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMAINTAINERS: add Broadcom SYSTEMPORT driver entry
Florian Fainelli [Fri, 25 Apr 2014 01:09:00 +0000 (18:09 -0700)]
MAINTAINERS: add Broadcom SYSTEMPORT driver entry

Add an entry in the MAINTAINERS file listing myself as the maintainer
for the Broadcom SYSTEMPORT Ethernet MAC controller driver.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: systemport: hook SYSTEMPORT driver in the build
Florian Fainelli [Fri, 25 Apr 2014 01:08:59 +0000 (18:08 -0700)]
net: systemport: hook SYSTEMPORT driver in the build

Hook the Broadcom SYSTEMPORT driver into the build system under the
SYSTEMPORT Kconfig symbol.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoDocumentation: add Broadcom SYSTEMPORT Device Tree bindings
Florian Fainelli [Fri, 25 Apr 2014 01:08:58 +0000 (18:08 -0700)]
Documentation: add Broadcom SYSTEMPORT Device Tree bindings

Add the Device Tree bindings documentation for the Broadcom SYSTEMPORT
Ethernet MAC controller hardware.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver
Florian Fainelli [Fri, 25 Apr 2014 01:08:57 +0000 (18:08 -0700)]
net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver

SYSTEMPORT is the latest Ethernet MAC hardware block used on newer
BCM7xxx Set Top Box SoCs in conjunction with an internal Ethernet
switch. This patch adds support for this hardware block along with the
following hardware features:

- support for hardware checksum offload (transmit and receive)
- support for the 32 transmit queues
- MIB counters reading

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sat, 26 Apr 2014 16:54:53 +0000 (12:54 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to igb only.

Carolyn provides a number of cleanups to fix checkpatch warnings/errors
and two minor issues found by coccicheck.

v2: update patch indentation for patch 07 of the series based on feedback
    from David Miller.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoinetpeer_gc_worker: trivial cleanup
xiao jin [Fri, 25 Apr 2014 00:53:29 +0000 (08:53 +0800)]
inetpeer_gc_worker: trivial cleanup

Do not initialize list twice.
list_replace_init() already takes care of initializing list.
We don't need to initialize it with LIST_HEAD() beforehand.

Signed-off-by: xiao jin <jin.xiao@intel.com>
Reviewed-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet_namespace: trivial cleanup
xiao jin [Fri, 25 Apr 2014 00:50:54 +0000 (08:50 +0800)]
net_namespace: trivial cleanup

Do not initialize net_kill_list twice.
list_replace_init() already takes care of initializing net_kill_list.
We don't need to initialize it with LIST_HEAD() beforehand.

Signed-off-by: xiao jin <jin.xiao@intel.com>
Reviewed-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge tag 'linux-can-next-for-3.16-20140425' of git://gitorious.org/linux-can/linux...
David S. Miller [Sat, 26 Apr 2014 16:32:27 +0000 (12:32 -0400)]
Merge tag 'linux-can-next-for-3.16-20140425' of git://gitorious.org/linux-can/linux-can-next

Marc Kleine-Budde says:

====================
this is a pull request of 10 patches for net-next/master.

It consists of three patches by Alexander Shiyan, which improve the
mcp251x driver. Stefano Babic's patch move the SPI driver into a sub
folder. The three patches by Olivier Sobrie add support for the Kvaser
Leaf v2 and usb mini PCIe hardware to the existing driver. Alexander
Stein contributes eg20t support to the c_can pci driver. Together with
the patches on the net-tree, we'll be able to remove the pch_can driver
soon. Kurt Van Dijck's two patches clean up the sysfs attributes of the
softing driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'at86rf230-next'
David S. Miller [Sat, 26 Apr 2014 16:21:20 +0000 (12:21 -0400)]
Merge branch 'at86rf230-next'

Alexander Aring says:

====================
at86rf230 cleanup

this is the first patch series to cleanup the at86rf230 driver. Later I want
to implement regmap and a asynchron spi handling for transmit and receiving
frames.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: remove function for setting irq polarity
Alexander Aring [Thu, 24 Apr 2014 17:09:18 +0000 (19:09 +0200)]
at86rf230: remove function for setting irq polarity

The function is small enough, we don't need a extra function for this.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: remove unnecessary state read
Alexander Aring [Thu, 24 Apr 2014 17:09:17 +0000 (19:09 +0200)]
at86rf230: remove unnecessary state read

This patch removes a unnecessary state read. The status value is never
evaluate after reading the state.

Also rename the status variable to dvdd, because this variable will be
used later.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: remove unnecessary spi_set_drvdata
Alexander Aring [Thu, 24 Apr 2014 17:09:16 +0000 (19:09 +0200)]
at86rf230: remove unnecessary spi_set_drvdata

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: reset irq line before irq request
Alexander Aring [Thu, 24 Apr 2014 17:09:15 +0000 (19:09 +0200)]
at86rf230: reset irq line before irq request

This patch resets the irq line before we are requesting the irq. This
avoids pending interrupts before requesting.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: remove unnecessary assign
Alexander Aring [Thu, 24 Apr 2014 17:09:14 +0000 (19:09 +0200)]
at86rf230: remove unnecessary assign

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: remove #ifdef CONFIG_OF
Alexander Aring [Thu, 24 Apr 2014 17:09:13 +0000 (19:09 +0200)]
at86rf230: remove #ifdef CONFIG_OF

This is already handled by the of_match_ptr macro.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: add at86rf230_device_id table
Alexander Aring [Thu, 24 Apr 2014 17:09:12 +0000 (19:09 +0200)]
at86rf230: add at86rf230_device_id table

This patch adds a at86rf230_device_id table to offers various module
aliases.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: make of_device_id const
Alexander Aring [Thu, 24 Apr 2014 17:09:11 +0000 (19:09 +0200)]
at86rf230: make of_device_id const

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: add missing MODULE_DEVICE_TABLE
Alexander Aring [Thu, 24 Apr 2014 17:09:10 +0000 (19:09 +0200)]
at86rf230: add missing MODULE_DEVICE_TABLE

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: use devm_gpio_request_one
Alexander Aring [Thu, 24 Apr 2014 17:09:09 +0000 (19:09 +0200)]
at86rf230: use devm_gpio_request_one

This patch replace the gpio_request functions with devm_gpio_request_one
functions. Then we don't need to take care about freeing gpios.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: use devm_request_irq
Alexander Aring [Thu, 24 Apr 2014 17:09:08 +0000 (19:09 +0200)]
at86rf230: use devm_request_irq

This patch replace request_irq with devm_request_irq. With
devm_request_irq we don't need to care about freeing the irq.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: remove irq_type in request_irq
Alexander Aring [Thu, 24 Apr 2014 17:09:07 +0000 (19:09 +0200)]
at86rf230: remove irq_type in request_irq

We don't need to set these values at request_irq. The interrupt line is
already configured to same value like irq_get_trigger_type returned.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodevicetree: add at86rf230 bindings
Alexander Aring [Thu, 24 Apr 2014 17:09:06 +0000 (19:09 +0200)]
devicetree: add at86rf230 bindings

This patch adds devicetree bindings for the at86rf230 IEEE 802.15.4 SPI
device driver.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: use irq_get_trigger_type
Alexander Aring [Thu, 24 Apr 2014 17:09:05 +0000 (19:09 +0200)]
at86rf230: use irq_get_trigger_type

This patch removes the platform data for the irq_type. We use instead
the irq_get_trigger_type function to get these flags which should
already configured by the interrupt controller.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'tipc-next'
David S. Miller [Sat, 26 Apr 2014 16:13:30 +0000 (12:13 -0400)]
Merge branch 'tipc-next'

Erik Hugne says:

====================
tipc: add support for link state subscriptions

Low level topology information like TIPC link up/down is useful for
applications like teamd to make smarter failover decisions in a
HA cluster environment. Fetching logical link names through an ioctl
may hurt the eyes of some. Suggestions for a more elegant way of doing
this would be appreciated in that case. :)

v2:
   -Properly based on net-next
   -Off-list comments from Billie Alsup:
    -Add a string length parameter to tipc_node_get_linkname
    -Use TIPC_MAX_LINK_NAME definition instead of hardcoded
     value in tipc_sioc_ln_req linkname
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotipc: add ioctl to fetch link names
Erik Hugne [Thu, 24 Apr 2014 14:26:47 +0000 (16:26 +0200)]
tipc: add ioctl to fetch link names

We add a new ioctl for AF_TIPC that can be used to fetch the
logical name for a link to a remote node on a given bearer. This
should be used in combination with link state subscriptions.
The logical name size limit definitions are moved to tipc.h, as
they are now also needed by the new ioctl.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotipc: add support for link state subscriptions
Erik Hugne [Thu, 24 Apr 2014 14:26:46 +0000 (16:26 +0200)]
tipc: add support for link state subscriptions

When links are established over a bearer plane, we create a node
local publication containing information about the peer node and
bearer plane. This allows TIPC applications to use the standard
TIPC topology server subscription mechanism to get notifications
when a link goes up or down.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoigb: Change memcpy to struct assignment
Carolyn Wyborny [Fri, 11 Apr 2014 02:20:44 +0000 (02:20 +0000)]
igb: Change memcpy to struct assignment

This patch fixes issue found by updated coccicheck.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Replace 1/0 return values with true/false
Carolyn Wyborny [Fri, 11 Apr 2014 02:20:14 +0000 (02:20 +0000)]
igb: Replace 1/0 return values with true/false

This patch fixes issues found by updated coccicheck.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to remove unneeded extern declaration
Carolyn Wyborny [Fri, 11 Apr 2014 01:47:19 +0000 (01:47 +0000)]
igb: Cleanups to remove unneeded extern declaration

This patch fixes WARNING:AVOID_EXTERNS found by checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to replace deprecated DEFINE_PCI_DEVICE_TABLE
Carolyn Wyborny [Fri, 11 Apr 2014 01:47:08 +0000 (01:47 +0000)]
igb: Cleanups to replace deprecated DEFINE_PCI_DEVICE_TABLE

This patch changes implementation to remove use of DEFINE_PCI_DEVICE_TABLE.
This patch fixes WARNING:DEFINE_PCI_DEVICE_TABLE

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix static initialization
Carolyn Wyborny [Fri, 11 Apr 2014 01:46:48 +0000 (01:46 +0000)]
igb: Cleanups to fix static initialization

This patch fixes ERROR:INITIALISED_STATIC from checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix msleep warnings
Carolyn Wyborny [Fri, 11 Apr 2014 01:46:40 +0000 (01:46 +0000)]
igb: Cleanups to fix msleep warnings

This patch fixes WARNING:MSLEEP found by checkpatch check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix line length warnings
Carolyn Wyborny [Fri, 11 Apr 2014 01:46:33 +0000 (01:46 +0000)]
igb: Cleanups to fix line length warnings

This patch fixes WARNING:LONG_LINE found with checkpatch check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to remove return parentheses
Carolyn Wyborny [Fri, 11 Apr 2014 02:11:17 +0000 (02:11 +0000)]
igb: Cleanups to remove return parentheses

This patch fixes ERROR:RETURN_PARENTHESES from checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix missing break in switch statements
Carolyn Wyborny [Thu, 17 Apr 2014 04:10:13 +0000 (04:10 +0000)]
igb: Cleanups to fix missing break in switch statements

This patch fixes WARNING:MISSING_BREAK found with checkpatch check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix assignment in if error
Carolyn Wyborny [Fri, 11 Apr 2014 01:46:13 +0000 (01:46 +0000)]
igb: Cleanups to fix assignment in if error

This patch fixes ERROR:ASSIGN_IN_IF found with checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to change comment style on license headers
Carolyn Wyborny [Fri, 11 Apr 2014 01:46:06 +0000 (01:46 +0000)]
igb: Cleanups to change comment style on license headers

This patch fixes WARNING:NETWORKING_BLOCK_COMMENT_STYLE from checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix for trailing statement
Carolyn Wyborny [Fri, 11 Apr 2014 01:45:55 +0000 (01:45 +0000)]
igb: Cleanups to fix for trailing statement

This patch fixes WARNING:TRAILING_STATEMENT from checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix pointer location error
Carolyn Wyborny [Fri, 11 Apr 2014 01:45:48 +0000 (01:45 +0000)]
igb: Cleanups to fix pointer location error

This patch fixes ERROR:POINTER_LOCATION from checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agocan: softing: remove unused sysfs attributes
Kurt Van Dijck [Wed, 2 Apr 2014 19:17:48 +0000 (21:17 +0200)]
can: softing: remove unused sysfs attributes

'frequency' indicates the embedded cpu's frequency, but that
should not be necessary for any purpose.
'txpending' is an attribute for debugging.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: softing: drop 'channel' sysfs attribute
Kurt Van Dijck [Wed, 2 Apr 2014 19:17:47 +0000 (21:17 +0200)]
can: softing: drop 'channel' sysfs attribute

netdev->dev_id obsoletes this property.
None of the remaining properties contribute to udev detection methods.
The regular calls for the sysfs group can thus safely be restored.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: c_can: Add support for eg20t (pch_can)
Alexander Stein [Mon, 7 Apr 2014 06:52:03 +0000 (08:52 +0200)]
can: c_can: Add support for eg20t (pch_can)

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: usb: Kconfig: Improve help for CAN_KVASER_USB
Olivier Sobrie [Thu, 10 Apr 2014 19:44:23 +0000 (21:44 +0200)]
can: usb: Kconfig: Improve help for CAN_KVASER_USB

Add two new USB devices supported by the driver and fix bad
english.

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: kvaser_usb: add support for Kvaser Leaf v2 and usb mini PCIe
Olivier Sobrie [Thu, 10 Apr 2014 19:44:22 +0000 (21:44 +0200)]
can: kvaser_usb: add support for Kvaser Leaf v2 and usb mini PCIe

This patch adds support for the Kvaser Leaf v2 and Leaf usb mini
PCIe card.

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: kvaser_usb: add retries/timeout to kvaser_usb_wait_msg()
Olivier Sobrie [Thu, 10 Apr 2014 19:44:21 +0000 (21:44 +0200)]
can: kvaser_usb: add retries/timeout to kvaser_usb_wait_msg()

On some Kvaser hardware, the firmware returns extra messages after the
request for card info. For instance on a Leaf Light v2:
  --> CMD_GET_CARD_INFO
  <-- CMD_USB_THROTTLE
  <-- CMD_GET_CARD_INFO2
  <-- CMD_GET_CARD_INFO_REQ
When it happens, the probing function fails because we only read
the first usb message.

To overcome this issue, we add a mechanism of retries to the
kvaser_usb_wait_msg() function.

I tested this patch with the following hardware:
 - Kvaser Leaf Light
 - Kvaser Leaf Light v2
 - Kvaser USBCan R

This patch is necessary for the Leaf Light v2 hardware.

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: move SPI drivers into a separate directory
Stefano Babic [Tue, 25 Mar 2014 14:30:21 +0000 (15:30 +0100)]
can: move SPI drivers into a separate directory

Create a directory for all CAN drivers using SPI and move mcp251x driver there.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: mcp251x: Improve mcp251x_hw_probe()
Alexander Shiyan [Fri, 28 Mar 2014 10:14:46 +0000 (14:14 +0400)]
can: mcp251x: Improve mcp251x_hw_probe()

This patch adds check for mcp251x_hw_reset() result on startup and
removes unnecessary checking for CANSTAT register since this value
is being checked in mcp251x_hw_reset().

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Tested-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: mcp251x: Improve mcp251x_hw_reset()
Alexander Shiyan [Fri, 28 Mar 2014 10:14:45 +0000 (14:14 +0400)]
can: mcp251x: Improve mcp251x_hw_reset()

The MCP251x utilizes an oscillator startup timer (OST), which holds the
chip in reset, to insure that the oscillator has stabilized before the
internal state machine begins to operate. The OST maintains reset for
the first 128 OSC clock cycles after power up or reset.
So, this patch removes unnecessary loops and reduce delay for power on
and reset to the safe value.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Tested-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agocan: mcp251x: Check return value of spi_setup()
Alexander Shiyan [Fri, 28 Mar 2014 10:14:44 +0000 (14:14 +0400)]
can: mcp251x: Check return value of spi_setup()

This patch moves setup of SPI bus a bit earlier and adds check for spi_setup()
result to be sure SPI bus is communicating with the device properly.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Tested-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
10 years agoAltera TSE: Remove unnecessary cast of void pointers
Tobias Klauser [Thu, 24 Apr 2014 11:50:09 +0000 (13:50 +0200)]
Altera TSE: Remove unnecessary cast of void pointers

No need to cast void pointers.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovxlan: add x-netns support
Nicolas Dichtel [Thu, 24 Apr 2014 08:02:49 +0000 (10:02 +0200)]
vxlan: add x-netns support

This patch allows to switch the netns when packet is encapsulated or
decapsulated.
The vxlan socket is openned into the i/o netns, ie into the netns where
encapsulated packets are received. The socket lookup is done into this netns to
find the corresponding vxlan tunnel. After decapsulation, the packet is
injecting into the corresponding interface which may stand to another netns.

When one of the two netns is removed, the tunnel is destroyed.

Configuration example:
ip netns add netns1
ip netns exec netns1 ip link set lo up
ip link add vxlan10 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0
ip link set vxlan10 netns netns1
ip netns exec netns1 ip addr add 192.168.0.249/24 broadcast 192.168.0.255 dev vxlan10
ip netns exec netns1 ip link set vxlan10 up

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobcm63xx_enet: Use ARRAY_SIZE instead of open coding it
Tobias Klauser [Wed, 23 Apr 2014 17:42:50 +0000 (19:42 +0200)]
bcm63xx_enet: Use ARRAY_SIZE instead of open coding it

Use the ARRAY_SIZE macro to determine the number of entries in
bcm_enet_gstrings_stats.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Thu, 24 Apr 2014 17:19:00 +0000 (13:19 -0400)]
Merge git://git./linux/kernel/git/davem/net

Conflicts:
drivers/net/ethernet/intel/igb/e1000_mac.c
net/core/filter.c

Both conflicts were simple overlapping changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosmc91x: improve definition of debug macros
Zi Shen Lim [Wed, 23 Apr 2014 03:04:42 +0000 (20:04 -0700)]
smc91x: improve definition of debug macros

Redefine some macros that were conditioned upon SMC_DEBUG level.

By allowing compiler to verify parameters used by these macros
unconditionally, we can flag compilation failures.

Compiler will still optimize out the unused code path depending on
SMC_DEBUG, so this is a net gain.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: Add tlb_dynamic_lb parameter for tlb mode
Mahesh Bandewar [Tue, 22 Apr 2014 23:30:22 +0000 (16:30 -0700)]
bonding: Add tlb_dynamic_lb parameter for tlb mode

The aggresive load balancing causes packet re-ordering as active
flows are moved from a slave to another within the group. Sometime
this aggresive lb is not necessary if the preference is for less
re-ordering. This parameter if used with value "0" disables
this dynamic flow shuffling minimizing packet re-ordering. Of course
the side effect is that it has to live with the static load balancing
that the hashing distribution provides. This impact is less severe if
the correct xmit-hashing-policy is used for the tlb setup.

The default value of the parameter is set to "1" mimicing the earlier
behavior.

Ran the netperf test with 200 stream for 1 min between two hosts with
4x1G trunk (xmit-lb mode with xmit-policy L3+4) before and after these
changes. Following was the command used for those 200 instances -

    netperf -t TCP_RR -l 60 -s 5 -H <host> -- -r81920,81920

Transactions per second:
    Before change: 1,367.11
    After  change: 1,470.65

Change-Id: Ie3f75c77282cf602e83a6e833c6eb164e72a0990
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: Added bond_tlb_xmit() for tlb mode.
Mahesh Bandewar [Tue, 22 Apr 2014 23:30:20 +0000 (16:30 -0700)]
bonding: Added bond_tlb_xmit() for tlb mode.

Re-organized the xmit function for the lb mode separating tlb xmit
from the alb mode. This will enable use of the hashing policies
like 802.3ad mode. Also extended use of xmit-hash-policy to tlb mode.

Now the tlb-mode defaults to BOND_XMIT_POLICY_LAYER2 if the xmit policy
module parameter is not set (just like 802.3ad, or Xor mode).

Change-Id: I140257403d272df75f477b380207338d0f04963e
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: Reorg bond_alb_xmit code
Mahesh Bandewar [Tue, 22 Apr 2014 23:30:18 +0000 (16:30 -0700)]
bonding: Reorg bond_alb_xmit code

Separating the actual xmit part from the function in a separate
function that can be used in the tlb_xmit in the next patch. Also
there is no reason do_tx_balance to be an int so changing it to
bool type.

Change-Id: I9c48ff30487810f68587e621a191db616f49bd3b
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: Changed hashing function to just provide hash
Mahesh Bandewar [Tue, 22 Apr 2014 23:30:15 +0000 (16:30 -0700)]
bonding: Changed hashing function to just provide hash

Modified the hash function to return just hash separating from the
modulo operation that can be performed by the caller. This is to
make way for the tlb mode to use the same hashing policies that
are used in the 802.3ad and Xor mode.

Change-Id: I276609e87e0ca213c4d1b17b79c5e0b0f3d0dd6f
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years ago6lowpan: nuke net_ieee802154_lowpan() accessor when 6lowpan is disabled
Luis R. Rodriguez [Tue, 22 Apr 2014 19:03:58 +0000 (12:03 -0700)]
6lowpan: nuke net_ieee802154_lowpan() accessor when 6lowpan is disabled

Johannes noted this is not needed, all of the fragment
accessors don't need CONFIG_NET_NS. This goes test compiled with
CONFIG_BT_6LOWPAN=y and a disabled CONFIG_NET_NS.

CC: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: linux-zigbee-devel@lists.sourceforge.net
Cc: David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Wed, 23 Apr 2014 21:04:37 +0000 (17:04 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to ixgbe, ixgbevf, e1000e, igb and i40e.

Jacob converts the ixgbe low_water into an array which allows the
algorithm to output different values for different TCs and we can
distinguish between them.  Removes vlan_filter_disable() and
vlan_filter_enable() in ixgbe so that we can do the work directly in
set_rx_mode().  Changes the setting of multicast filters only when
the interface is not in promiscuous mode for multicast packets in
ixgbe.  Improves MAC filter handling by adding mac_table API based
on work done for igb, which includes functions to add/delete MAC
filters.

Mark changes register reads in ixgbe to an out-of-line function since
register reads are slow.

Emil provides a ixgbevf patch to update the driver description since
it supports more than just 82599 parts now.

David provides several cleanup patches for e1000e which resolve some
checkpatch issues as well as changing occurrences of returning 0 or 1 in
bool functions to returning true false or true.

Carolyn provides several cleanup patches for igb which fix checkpatch
warnings.

Mitch provides a fix for i40evf where the driver would correctly allow
the virtual function link state to be controlled by 'ip set link', but
would not report it correctly back.  This is fixed by filling out
the appropriate field in the VF info struct.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: filter: initialize A and X registers
Alexei Starovoitov [Wed, 23 Apr 2014 03:18:57 +0000 (20:18 -0700)]
net: filter: initialize A and X registers

exisiting BPF verifier allows uninitialized access to registers,
'ret A' is considered to be a valid filter.
So initialize A and X to zero to prevent leaking kernel memory
In the future BPF verifier will be rejecting such filters

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/phy: Remove return value for void function
Shruti Kanetkar [Tue, 22 Apr 2014 19:21:47 +0000 (14:21 -0500)]
net/phy: Remove return value for void function

This was caught when using a spatch (aka. coccinelle) script
written by Joe Perches.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Shruti Kanetkar <Shruti@Freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'via-rhine'
David S. Miller [Wed, 23 Apr 2014 19:24:20 +0000 (15:24 -0400)]
Merge branch 'via-rhine'

Alexey Charkov says:

====================
net: via-rhine: add support for on-chip Rhine controllers

This series introduces platform bus (OpenFirmware) binding for
via-rhine, as used in various ARM-based Systems-on-Chip by
VIA/WonderMedia.

This has been tested in OF configuration by myself on a WM8950-based VIA
APC Rock development board and on a WM8850-based netbook, and in PCI
configuration by Roger.

Please note that the initial version of these patches was signed off by
Roger, but some time has passed since then, so I'm not including his
sign-off until explicit notice.

Changes since v1:
 - Fixed indentation of function arguments
 - Switched to 'dev_is_pci' instead of string comparison on bus name
 - Dropped 'rhine,revision' DT attribute, put the revision into OF match
        table instead
 - Included actual device tree nodes where applicable
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: via-rhine: add OF bus binding
Alexey Charkov [Tue, 22 Apr 2014 15:28:09 +0000 (19:28 +0400)]
net: via-rhine: add OF bus binding

This should make the driver usable with VIA/WonderMedia ARM-based
Systems-on-Chip integrated Rhine III adapters. Note that these
are always in MMIO mode, and don't have any known EEPROM.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: via-rhine: reduce usage of the PCI-specific struct
Alexey Charkov [Tue, 22 Apr 2014 15:28:08 +0000 (19:28 +0400)]
net: via-rhine: reduce usage of the PCI-specific struct

Use more generic data structures instead of struct pci_dev wherever
possible in preparation for OF bus binding

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: via-rhine: switch to generic DMA functions
Alexey Charkov [Tue, 22 Apr 2014 15:28:07 +0000 (19:28 +0400)]
net: via-rhine: switch to generic DMA functions

Remove legacy PCI DMA wrappers and instead use generic DMA functions
directly in preparation for OF bus binding

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: Update my email address
Ben Hutchings [Tue, 22 Apr 2014 16:29:42 +0000 (17:29 +0100)]
net: Update my email address

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovxlan: ensure to advertise the right fdb remote
Nicolas Dichtel [Tue, 22 Apr 2014 13:01:30 +0000 (15:01 +0200)]
vxlan: ensure to advertise the right fdb remote

The goal of this patch is to fix rtnelink notification. The main problem was
about notification for fdb entry with more than one remote. Before the patch,
when a remote was added to an existing fdb entry, the kernel advertised the
first remote instead of the added one. Also when a remote was removed from a fdb
entry with several remotes, the deleted remote was not advertised.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/phy: micrel: fix bugged test on device tree loading for ksz9021
Hubert Chaumette [Tue, 22 Apr 2014 13:01:04 +0000 (15:01 +0200)]
net/phy: micrel: fix bugged test on device tree loading for ksz9021

In ksz9021_load_values_from_of() val2 to val4 aren't tested against their
initialization value.
This causes the test to always succeed, and this value to be used as if it
was loaded from the devicetree instead of being ignored, in case of a
missing/invalid property in the ethernet OF device node.
As a result, the value "0" is written to the relevant registers.

Change the conditions to test against the right initialization value.

Signed-off-by: Hubert Chaumette <hchaumette@adeneo-embedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agomacvlan: Fix leak and NULL dereference on error path
Herbert Xu [Tue, 22 Apr 2014 09:15:34 +0000 (17:15 +0800)]
macvlan: Fix leak and NULL dereference on error path

The recent patch that moved broadcasts to process context added
a couple of bugs on the error path where we may dereference NULL
or leak an skb.  This patch fixes them.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'gre_netns'
David S. Miller [Wed, 23 Apr 2014 18:53:53 +0000 (14:53 -0400)]
Merge branch 'gre_netns'

Nicolas Dichtel says:

====================
gre: allow to switch netns during encap/decap

The goal of this serie is to add x-netns support for the module ip_gre and
ip6_gre, ie the encapsulation addresses and the network device are not owned by
the same namespace.

Example to configure an ipv4 gre tunnel:

modprobe ip_gre
ip netns add netns1
ip netns exec netns1 ip link set lo up
ip link add gre1 type gre remote 10.16.0.121 local 10.16.0.249 ikey 10 okey 10 csum
ip link set gre1 netns netns1
ip netns exec netns1 ip link set gre1 up
ip netns exec netns1 ip addr add dev gre1 192.168.0.249 remote 192.168.0.121
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoip6gre: add x-netns support
Nicolas Dichtel [Tue, 22 Apr 2014 08:15:24 +0000 (10:15 +0200)]
ip6gre: add x-netns support

This patch allows to switch the netns when packet is encapsulated or
decapsulated. In other word, the encapsulated packet is received in a netns,
where the lookup is done to find the tunnel. Once the tunnel is found, the
packet is decapsulated and injecting into the corresponding interface which
stands to another netns.

When one of the two netns is removed, the tunnel is destroyed.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agogre: add x-netns support
Nicolas Dichtel [Tue, 22 Apr 2014 08:15:23 +0000 (10:15 +0200)]
gre: add x-netns support

This patch allows to switch the netns when packet is encapsulated or
decapsulated. In other word, the encapsulated packet is received in a netns,
where the lookup is done to find the tunnel. Once the tunnel is found, the
packet is decapsulated and injecting into the corresponding interface which
stands to another netns.

When one of the two netns is removed, the tunnel is destroyed.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agohyperv: Simplify the send_completion variables
Haiyang Zhang [Mon, 21 Apr 2014 21:54:44 +0000 (14:54 -0700)]
hyperv: Simplify the send_completion variables

The union contains only one member now, so we use the variables in it directly.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agohyperv: Remove recv_pkt_list and lock
Haiyang Zhang [Mon, 21 Apr 2014 21:54:43 +0000 (14:54 -0700)]
hyperv: Remove recv_pkt_list and lock

Removed recv_pkt_list and lock, and updated related code, so that
the locking overhead is reduced especially when multiple channels
are in use.

The recv_pkt_list isn't actually necessary because the packets are
processed sequentially in each channel. It has been replaced by a
local variable, and the related lock for this list is also removed.
The is_data_pkt field is not used in receive path, so its assignment
is cleaned up.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoi40e: report VF link state correctly
Mitch Williams [Fri, 14 Mar 2014 07:32:24 +0000 (07:32 +0000)]
i40e: report VF link state correctly

Although the driver would correctly allow the VF link state to be
controlled by 'ip set link', it would not report it correctly back.

Fix this by filling out the appropriate field in the vf info struct.

Change-ID: I58d8e356438190e1ee9660b424301af6f416cdbe
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix incorrect indentation
Carolyn Wyborny [Fri, 11 Apr 2014 01:45:34 +0000 (01:45 +0000)]
igb: Cleanups to fix incorrect indentation

This patch fixes WARNING:LEADING_SPACE, WARNING:SPACING, ERROR:SPACING,
WARNING:SPACE_BEFORE_TAB and ERROR_CODE_INDENT from checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups to fix braces location warnings
Carolyn Wyborny [Fri, 11 Apr 2014 01:45:23 +0000 (01:45 +0000)]
igb: Cleanups to fix braces location warnings

This patch fixes WARNING:BRACES and ERROR:OPEN_BRACE from
checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoigb: Cleanups for messaging
Carolyn Wyborny [Fri, 11 Apr 2014 01:45:17 +0000 (01:45 +0000)]
igb: Cleanups for messaging

This patch fixes WARNING:PREFER_PR_LEVEL and WARNING:SPLIT_STRING
from checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoe1000e: Cleanup use of deprecated DEFINE_PCI_DEVICE_TABLE
David Ertman [Tue, 8 Apr 2014 22:10:31 +0000 (22:10 +0000)]
e1000e: Cleanup use of deprecated DEFINE_PCI_DEVICE_TABLE

Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoe1000e: Cleanup checkpatch extra space
David Ertman [Mon, 7 Apr 2014 23:11:09 +0000 (23:11 +0000)]
e1000e: Cleanup checkpatch extra space

Fixing "WARNING:SPACING: Unnecessary space before function pointer arguments"

Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoe1000e: Cleanup to fix checkpatch missing blank lines
David Ertman [Sat, 5 Apr 2014 06:07:00 +0000 (06:07 +0000)]
e1000e: Cleanup to fix checkpatch missing blank lines

Fixing "WARNING:SPACING: networking uses a blank line after declarations"

Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoe1000e: Cleanup return values in ethtool
David Ertman [Sat, 5 Apr 2014 03:36:15 +0000 (03:36 +0000)]
e1000e: Cleanup return values in ethtool

Changing occurrences of returning 0 and 1 from bool functions to false and
true, respectively

Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoixgbevf: remove 82599 from the module description
Emil Tantilov [Sat, 5 Apr 2014 05:39:42 +0000 (05:39 +0000)]
ixgbevf: remove 82599 from the module description

This patch removes 82599 from the description of the ixgbevf module
since the VF driver is supported on other parts as well.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoixgbe: improve mac filter handling
Jacob Keller [Sat, 29 Mar 2014 06:51:25 +0000 (06:51 +0000)]
ixgbe: improve mac filter handling

Add mac_table API based on work done for igb, which includes functions
to add and delete mac filters. This simplifies code for various entities
that use MAC filters such as VMDQ, SR-IOV, MACVLAN, and such.

Reported-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoixgbe: change handling of multicast filters
Jacob Keller [Tue, 25 Mar 2014 07:45:27 +0000 (07:45 +0000)]
ixgbe: change handling of multicast filters

In line with changes done by Alex Duyck regarding unicast filters, we
now only set multicast filters when the interface is not in promiscuous
mode for multicast packets. This also has an impact on the RAR usage
such that SR-IOV has some RARs reserved for its own usage.

Reported-by: Alex Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoixgbe: remove vlan_filter_disable and enable functions
Jacob Keller [Tue, 25 Mar 2014 07:45:26 +0000 (07:45 +0000)]
ixgbe: remove vlan_filter_disable and enable functions

Previously these functions handled stripping setup as well, but this has
already been removed from these functions. Rather than encapsulating
this into a function, we can just do the work directly in set_rx_mode.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoixgbe: Use out-of-line function for register reads
Mark Rustad [Tue, 18 Mar 2014 07:03:40 +0000 (07:03 +0000)]
ixgbe: Use out-of-line function for register reads

Register reads are slow, so don't inline them.

Size before:
   text    data     bss     dec     hex filename
 226337    8280     552  235169   396a1 ixgbe.ko

Size after:
   text    data     bss     dec     hex filename
 194578    8280     552  203410   31a92 ixgbe.ko

for about a 14% reduction in text size.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoixgbe: convert low_water into an array
Jacob Keller [Sat, 5 Apr 2014 02:35:52 +0000 (02:35 +0000)]
ixgbe: convert low_water into an array

Since fc.high_water is an array, we should treat low_water as an array
also. This allows the algorithm to output different values for different
TCs, and then we can distinguish between them. In addition, this patch
changes one path that didn't honor the return value from ixgbe_setup_fc.

Reported-by: Aaron Salter <aaron.k.salter@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Wed, 23 Apr 2014 01:47:06 +0000 (21:47 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to i40e and i40evf.

Greg provides two patches for i40e, the first adds the netdev ops to support
the addition of static FDB entries in the physical function (PF) MAC/VLAN
filter table so that the virtual functions (VFs) can communicate with
bridged virtual Ethernet ports such as those provided by the virtio
driver.  The second is to fix an issue where the assignment of a port
VLAN after it is already up and running requires the VF driver to be
reloaded, so print a message warning the host administrator about the
need to reload the VF driver.  In addition, knock the VF offline so that
it does not continue to receive traffic not on the port VLAN assigned to
it.

Jesse provides a patch for i40e and i40evf to unhide and enable the
PREFENA field in the receive host memory cache (RX-HMC) for best
performance.

Mitch provides a i40e patch to implement the net device op for Tx
bandwidth setting.

Catherine removes a firmware workaround that is no longer needed with
the latest firmware for i40e.  She also provides some minor cleanups
as well bumps the driver versions.

Anjali provides a fix for i40e displaying IPv4 flow director filters
which needed additional information to be communicated up above in
order for it to be displayed correctly.

Shannon adds tracking of the NVM busy state so that the driver won't
allow a new NVM update command until a completion event is received
from the current update.  Updates the admin queue API to reflect
recent changes in the firmware.  Also rearranges the "if netdev" logic
to prepare for handling non-netdev VSIs.  Lastly rework the fdir
setup and tear down to use the newly created i40e_vsi_open() and
i40e_vsi_close(), which also fixes a memory leak of the FDIR queue
buffer info structs across a reset.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'netlink-bind'
David S. Miller [Wed, 23 Apr 2014 01:42:35 +0000 (21:42 -0400)]
Merge branch 'netlink-bind'

Richard Guy Briggs says:

====================
audit: implement multicast socket for journald

This is a patch set Eric Paris and I have been working on to add a restricted
capability read-only netlink multicast socket to kernel audit to enable
userspace clients such as systemd/journald to receive audit logs, in addition
to the bidirectional auditd userspace client.

Currently, auditd has the CAP_AUDIT_CONTROL and CAP_AUDIT_WRITE capabilities
(but uses CAP_NET_ADMIN).  The CAP_AUDIT_READ capability will be added for use
by read-only AUDIT_NLGRP_READLOG multicast group clients to the kaudit
subsystem.  This will remove the dependence on CAP_NET_ADMIN for the multicast
read-only socket.

Patches 1-3 provide a way for per-protocol bind functions to
signal an error and to be able to clean up after themselves.

The first netfilter cleanup patch has already been accepted by a netfilter
maintainer, though I don't see it upstream yet, so it is included for
completeness.

The second patch adds the per-protocol bind function return code to signal to
the netlink code that no further processing should be done and to undo the work
already done.
V1: This rev fixes a bug introduced by flattening the code in the last posting.
*V2: This rev moves the per-protocol bind call above the socket exposure call
and refactors out the unbind procedure.

The third provides a way per protocol to undo bind actions on DROP.

Patches 4-6 implement the audit multicast socket with capability checking.

The fourth patch adds the bind function capability check to multicast join
requests for audit.

The fifth patch adds the audit log read multicast group.  An assumption has
been made that systemd/journald reside in the initial network namespace.  This
could be changed to check the actual network namespace of systemd/journald
should this assumption no longer be true since audit now supports all network
namespaces.  This version of the patch now directly sends the broadcast when
the packet is ready rather than waiting until it passes the queue.

The sixth checks if any clients actually exist before sending.

Since the net tree is busier than the audit tree, conflicts are more likely and
the audit patches depend on the net patches, it is proposed to have the net
tree carry this entire patchset for 3.16.  Are the net maintainers ok with this?

https://bugzilla.redhat.com/show_bug.cgi?id=887992

First posted:   https://www.redhat.com/archives/linux-audit/2013-January/msg00008.html
                https://lkml.org/lkml/2013/1/27/279

Please find source for a test program at:
http://people.redhat.com/rbriggs/audit-multicast-listen/
====================

Signed-off-by: David S. Miller <davem@davemloft.net>