platform/kernel/linux-amlogic.git
13 years agopch_can: Optimize "if" condition in rx/tx processing
Tomoya [Sun, 12 Dec 2010 20:24:24 +0000 (20:24 +0000)]
pch_can: Optimize "if" condition in rx/tx processing

For reduce "if" condition, easy to read/understand the code,
optimize "if" condition in rx/tx processing.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Fix incorrect return processing
Tomoya [Sun, 12 Dec 2010 20:24:23 +0000 (20:24 +0000)]
pch_can: Fix incorrect return processing

Fix incorrect return processing.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Move MSI processing to probe/remove processing
Tomoya [Sun, 12 Dec 2010 20:24:22 +0000 (20:24 +0000)]
pch_can: Move MSI processing to probe/remove processing

Currently, in case this driver is integrated as module, and when this
module is re-installed, no interrupts is to be occurred.
For the above issue, move MSI processing to open/release processing.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Comment optimization
Tomoya [Sun, 12 Dec 2010 20:24:21 +0000 (20:24 +0000)]
pch_can: Comment optimization

Comment optimization

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Fix miss-setting status issue
Tomoya [Sun, 12 Dec 2010 20:24:20 +0000 (20:24 +0000)]
pch_can: Fix miss-setting status issue

Modify miss-setting status issue at suspend.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Fix bit timing calculation issue
Tomoya [Sun, 12 Dec 2010 20:24:19 +0000 (20:24 +0000)]
pch_can: Fix bit timing calculation issue

Modify like use calculated value directly passed by CAN core module.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Delete unnecessary/redundant code
Tomoya [Sun, 12 Dec 2010 20:24:18 +0000 (20:24 +0000)]
pch_can: Delete unnecessary/redundant code

Delete unnecessary/redundant code

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Fix coding rule violation
Tomoya [Sun, 12 Dec 2010 20:24:17 +0000 (20:24 +0000)]
pch_can: Fix coding rule violation

Fix coding rule violation.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Replace netdev_dbg instead of dev_dbg partly
Tomoya [Sun, 12 Dec 2010 20:24:16 +0000 (20:24 +0000)]
pch_can: Replace netdev_dbg instead of dev_dbg partly

For easy to readable, use netdev_dbg instead of dev_dbg partly

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Change Copyright and module description
Tomoya [Sun, 12 Dec 2010 20:24:15 +0000 (20:24 +0000)]
pch_can: Change Copyright and module description

Currently, Copyright and module description are not formal.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Reduce register access
Tomoya [Sun, 12 Dec 2010 20:24:14 +0000 (20:24 +0000)]
pch_can: Reduce register access

For improve tx/rx speed, reduce register access.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Change functions type
Tomoya [Sun, 12 Dec 2010 20:24:13 +0000 (20:24 +0000)]
pch_can: Change functions type

Currently, these two functions spec(returned value) is unnatural.
Thus, change the return value's spec

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Rename function/macro name
Tomoya [Sun, 12 Dec 2010 20:24:12 +0000 (20:24 +0000)]
pch_can: Rename function/macro name

For easy to read/understand, Rename function/macro name.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Fix warnings
Tomoya [Sun, 12 Dec 2010 20:24:11 +0000 (20:24 +0000)]
pch_can: Fix warnings

Currently, in case CONFIG_PM is disabled, compiler outputs warnings.
Move six functions which are used only CONFIG_PM is enabled,
into "#ifdef CONFIG_PM" area.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Improve rx processing
Tomoya [Sun, 12 Dec 2010 20:24:10 +0000 (20:24 +0000)]
pch_can: Improve rx processing

Replace complex "goto" to "do~while".
For easy to read/understand, it divides a rx function into some functions.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Fix endianness issue
Tomoya [Sun, 12 Dec 2010 20:24:09 +0000 (20:24 +0000)]
pch_can: Fix endianness issue

there is endianness issue both Tx and Rx.
Currently, data is set like below.
Register:
MSB--LSB
x x D0 D1
x x D2 D3
x x D4 D5
x x D6 D7

But Data to be sent must be set like below.
Register:
MSB--LSB
x x D1 D0
x x D3 D2
x x D5 D4
x x D7 D6  (x means reserved area.)

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Divide poll function
Tomoya [Sun, 12 Dec 2010 20:24:08 +0000 (20:24 +0000)]
pch_can: Divide poll function

To easy to read/understand, divide poll function into two sub-functions.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: Add flow control processing
Tomoya [Sun, 12 Dec 2010 20:24:07 +0000 (20:24 +0000)]
pch_can: Add flow control processing

Currently, there is no flow control processing.
Thus, Add flow control processing as
when there is no empty of tx buffer,
netif_stop_queue is called.
When there is empty buffer, netif_wake_queue is called.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: add limits to ip_default_ttl
Eric Dumazet [Mon, 13 Dec 2010 20:16:14 +0000 (12:16 -0800)]
net: add limits to ip_default_ttl

ip_default_ttl should be between 1 and 255

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoehea: Use the standard logging functions
Joe Perches [Mon, 13 Dec 2010 18:05:14 +0000 (10:05 -0800)]
ehea: Use the standard logging functions

Remove ehea_error, ehea_info and ehea_debug macros.
Use pr_fmt, pr_<level>, netdev_<level> and netif_<level> as appropriate.
Fix messages to use trailing "\n", some messages had an extra one
as the old ehea_<level> macros added a trailing "\n".
Coalesced long format strings.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Don't pre-seed hoplimit metric.
David S. Miller [Mon, 13 Dec 2010 05:55:08 +0000 (21:55 -0800)]
ipv4: Don't pre-seed hoplimit metric.

Always go through a new ip4_dst_hoplimit() helper, just like ipv6.

This allowed several simplifications:

1) The interim dst_metric_hoplimit() can go as it's no longer
   userd.

2) The sysctl_ip_default_ttl entry no longer needs to use
   ipv4_doint_and_flush, since the sysctl is not cached in
   routing cache metrics any longer.

3) ipv4_doint_and_flush no longer needs to be exported and
   therefore can be marked static.

When ipv4_doint_and_flush_strategy was removed some time ago,
the external declaration in ip.h was mistakenly left around
so kill that off too.

We have to move the sysctl_ip_default_ttl declaration into
ipv4's route cache definition header net/route.h, because
currently net/ip.h (where the declaration lives now) has
a back dependency on net/route.h

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Demark default hoplimit as zero.
David S. Miller [Mon, 13 Dec 2010 05:39:02 +0000 (21:39 -0800)]
ipv6: Demark default hoplimit as zero.

This is for consistency with ipv4.  Using "-1" makes
no sense.

It was made this way a long time ago merely to be consistent
with how the ipv6 socket hoplimit "default" is stored.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Abstract RTAX_HOPLIMIT metric accesses behind helper.
David S. Miller [Mon, 13 Dec 2010 05:35:57 +0000 (21:35 -0800)]
net: Abstract RTAX_HOPLIMIT metric accesses behind helper.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Use ip6_dst_hoplimit() instead of direct dst_metric() calls.
David S. Miller [Mon, 13 Dec 2010 05:14:46 +0000 (21:14 -0800)]
ipv6: Use ip6_dst_hoplimit() instead of direct dst_metric() calls.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agohostap: don't use flush_scheduled_work()
Tejun Heo [Sun, 12 Dec 2010 15:45:15 +0000 (16:45 +0100)]
hostap: don't use flush_scheduled_work()

flush_scheduled_work() is on its way out.  Drop flush_scheduled_work()
from prism2_free_local_data() and replace it with explicit flushing of
work items on the respective free functions.  Work items in ap_data
are flushed from hostap_free_data() and the ones in local_info from
prism2_free_local_data().

Flush is used instead of cancel as some process and free items from
queue.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: netdev@vger.kernel.org
13 years agoi2400m: drop i2400m_schedule_work()
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
i2400m: drop i2400m_schedule_work()

i2400m implements dynamic work allocation and queueing mechanism in
i2400_schedule_work(); however, this is only used for reset and
recovery which can be served equally well with preallocated per device
works.

Replace i2400m_schedule_work() with two work structs in struct i2400m.
These works are explicitly canceled when the device is released making
calls to flush_scheduled_work(), which is being deprecated,
unnecessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Cc: linux-wimax@intel.com
Cc: netdev@vger.kernel.org
13 years agosungem: update gp->reset_task flushing
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
sungem: update gp->reset_task flushing

gp->reset_task_pending is always set right before reset_task is
scheduled and as there is no synchronization between the setting and
scheduling, busy looping on reset_task_pending before flushing
reset_task doesn't really buy anything.

Directly flush gp->reset_task on suspend and cancel on detach.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
13 years agoigb[v],ixgbe: don't use flush_scheduled_work()
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
igb[v],ixgbe: don't use flush_scheduled_work()

All three drivers use flush_scheduled_work() similarly during driver
detach.  Replace it with explicit cancels.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: e1000-devel@lists.sourceforge.net
Cc: netdev@vger.kernel.org
13 years agoiseries_veth: don't use flush_scheduled_work()
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
iseries_veth: don't use flush_scheduled_work()

flush_scheduled_work() is on its way out.  Remove its usage from
iseries_veth.

* Cancelling a delayed work, queueing it for immediate execution if
  cancelled and then waiting for completion can be done by simply
  calling flush_delayed_work_sync().

* Explicitly cancel cnx->statemachine_wq on module unload.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Santiago Leon <santil@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
13 years agoehea: don't use flush_scheduled_work()
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
ehea: don't use flush_scheduled_work()

Directly cancel port->reset_task from ehea_shutdown_single_port()
instead.  As this cancels the work for each port on driver detach,
flushing system_wq from ehea_remove() or ehea_module_exit() is no
longer necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
13 years agoehea: kill unused ehea_rereg_mr_task
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
ehea: kill unused ehea_rereg_mr_task

ehea_rereg_mr_task is not used.  Remove it and drop @work parameter
from ehea_rereg_mrs().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
13 years agodrivers/net: don't use flush_scheduled_work()
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
drivers/net: don't use flush_scheduled_work()

flush_scheduled_work() is on its way out.  This patch contains simple
conversions to replace flush_scheduled_work() usage with direct
cancels and flushes.

Directly cancel the used works on driver detach and flush them in
other cases.

The conversions are mostly straight forward and the only dangers are,

* Forgetting to cancel/flush one or more used works.

* Cancelling when a work should be flushed (ie. the work must be
  executed once scheduled whether the driver is detaching or not).

I've gone over the changes multiple times but it would be much
appreciated if you can review with the above points in mind.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Divy Le Ray <divy@chelsio.com>
Cc: e1000-devel@lists.sourceforge.net
Cc: Vasanthy Kolluri <vkolluri@cisco.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Andrew Gallatin <gallatin@myri.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Cc: Matt Carlson <mcarlson@broadcom.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
Cc: netdev@vger.kernel.org
13 years agodrivers/net: remove unnecessary flush_scheduled_work() calls
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
drivers/net: remove unnecessary flush_scheduled_work() calls

janz-ican3, sh_eth, skge and vxge don't use workqueue at all and there
is no reason to flush the system_wq.  Drop flush_scheduled_work()
calls and references to workqueue.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Cc: Sivakumar Subramani <sivakumar.subramani@exar.com>
Cc: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Cc: Jon Mason <jon.mason@exar.com>
Cc: netdev@vger.kernel.org
13 years agonet: au1000_eth: remove unused global variable.
Manuel Lauss [Sat, 11 Dec 2010 09:53:42 +0000 (09:53 +0000)]
net: au1000_eth: remove unused global variable.

The driver global au_macs[] is unused in the entire kernel tree,
so remove it.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: Using static const generally increases object text and decreases data size...
Jon Mason [Fri, 10 Dec 2010 15:40:04 +0000 (15:40 +0000)]
s2io: Using static const generally increases object text and decreases data size. It also generally decreases overall object size.

text    data     bss     dec     hex filename
 109387     389   24432  134208   20c40 drivers/net/s2io.o.old
 109358     389   24432  134179   20c23 drivers/net/s2io.o.new

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: Update Driver Version
Jon Mason [Fri, 10 Dec 2010 15:40:03 +0000 (15:40 +0000)]
s2io: Update Driver Version

Update Driver Version

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: make strings at tables const
Jon Mason [Fri, 10 Dec 2010 15:40:02 +0000 (15:40 +0000)]
s2io: make strings at tables const

Put immutable data in read/only section.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: rx_ring_sz bounds checking
Jon Mason [Fri, 10 Dec 2010 15:40:01 +0000 (15:40 +0000)]
s2io: rx_ring_sz bounds checking

modparm rx_ring_sz can be set to be greater than the maximum allowable
number of blocks.  This results in an array overrun when probing the
driver, and causes memory corruption.

Also, the MAX_RX_DESC_1 multiply the max number of rings by max number
of blocker per ring by 127, but the driver does the same calculation
with 127+1.  This results in the possibility of the value being set
being larger than the maximum allowable value.

Finally, clean-up the s2io_ethtool_gringparam code to be more
intuitive.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: Add new function to read part number from EEPROM in string format
Carolyn Wyborny [Mon, 22 Nov 2010 17:17:21 +0000 (17:17 +0000)]
igb: Add new function to read part number from EEPROM in string format

New adapters will have part numbers stored in string format rather than
simple hex format. This function will read part number formats in either
hex or string.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: increment the driver version
Bruce Allan [Wed, 1 Dec 2010 08:45:24 +0000 (08:45 +0000)]
e1000e: increment the driver version

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: static analysis tools complain of a possible null ptr p dereference
Bruce Allan [Thu, 9 Dec 2010 23:04:25 +0000 (23:04 +0000)]
e1000e: static analysis tools complain of a possible null ptr p dereference

Adding this default case resolves the issue.

v2- Removed "break" in default case based on feedback

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: minor error message corrections
Bruce Allan [Wed, 24 Nov 2010 06:02:06 +0000 (06:02 +0000)]
e1000e: minor error message corrections

Correct error messages when setting up Rx resources and when checking
module parameters.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: prevent null ptr dereference in e1000_tx_queue()
Bruce Allan [Wed, 24 Nov 2010 07:42:43 +0000 (07:42 +0000)]
e1000e: prevent null ptr dereference in e1000_tx_queue()

tx_desc can be dereferenced as a null pointer when count is passed in
as 0.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: support new PBA format from EEPROM
Bruce Allan [Wed, 24 Nov 2010 06:01:51 +0000 (06:01 +0000)]
e1000e: support new PBA format from EEPROM

Provide support to e1000e for displaying the new format of the PBA found
in the EEPROM.  The unique PBA identifier is no longer restricted to
hexadecimal numbers and must now be read and displayed as a string.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82579 PHY incorrectly identified during init
Bruce Allan [Wed, 24 Nov 2010 06:01:46 +0000 (06:01 +0000)]
e1000e: 82579 PHY incorrectly identified during init

During init, reading the 2 PHY ID registers back-to-back in the default
fast mode could return invalid data (all F's) and in slow mode could
return data to the second read the data from the first read.  To resolve
the issue in fast mode, set to slow mode before any PHY accesses; to
resolve the issue in slow mode, put in a delay for every 82579 PHY access.
Since this PHY is currently only paired with the pch2lan MAC and the PHY
type is not known before the first PHY access which can fail this way,
check for this based on MAC-type.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82577/8/9 mis-configured OEM bits during S0->Sx
Bruce Allan [Wed, 24 Nov 2010 06:01:41 +0000 (06:01 +0000)]
e1000e: 82577/8/9 mis-configured OEM bits during S0->Sx

The LPLU (Low Power Link Up) and Gigabit Disable bits (a.k.a. OEM bits)
were being configured incorrectly when device goes to D3 state.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82571 Serdes can fail to get link
Bruce Allan [Wed, 24 Nov 2010 06:01:35 +0000 (06:01 +0000)]
e1000e: 82571 Serdes can fail to get link

When link partner is sending continuous Config symbols, the 82571 Serdes
FIFO can overflow resulting in Invalid bit getting set.  To resolve this,
if Sync and Config bits are both 1 ignore the Invalid bit and restart
auto-negotiation.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82577/8 must acquire h/w semaphore before workaround
Bruce Allan [Wed, 24 Nov 2010 06:01:30 +0000 (06:01 +0000)]
e1000e: 82577/8 must acquire h/w semaphore before workaround

The workaround function e1000_configure_k1_pchlan() assumes the h/w
semaphore is already acquired.  This was originally missed when setting up
the part for the ethtool loopback test.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82574/82583 performance improvement
Bruce Allan [Wed, 24 Nov 2010 06:01:25 +0000 (06:01 +0000)]
e1000e: 82574/82583 performance improvement

Increasing the transmit fifo by 4K (by decreasing the receive fifo size
specified in .pba by the same amount) increases Tx performance.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82571-based mezzanine card can fail ethtool link test
Bruce Allan [Wed, 24 Nov 2010 06:01:20 +0000 (06:01 +0000)]
e1000e: 82571-based mezzanine card can fail ethtool link test

On certain 82571-based mezzanine NICs in some blade servers, the ethtool
link test can fail due to the serdes_has_link flag not set correctly.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: fix double initialization in blink path
Holger Eitzenberger [Wed, 17 Nov 2010 15:43:52 +0000 (15:43 +0000)]
e1000e: fix double initialization in blink path

The kernel goes BUG() at the time 'ethtool -p eth0 3' comes
back, which is due to adapter->led_blink_task initialized
several times.  At the time it is still running this results
in a corrupted task_list of the associated workqueue.

The fix is to move the workqueue initialization to the
probe function instead.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup string function calls to use bound checking versions.
Don Skidmore [Fri, 3 Dec 2010 09:33:54 +0000 (09:33 +0000)]
ixgbe: cleanup string function calls to use bound checking versions.

Some minor cleanup to use string calls that use bound checks just to
be extra safe.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix ntuple support
Emil Tantilov [Wed, 1 Dec 2010 05:47:05 +0000 (05:47 +0000)]
ixgbe: fix ntuple support

commit f62bbb5e62c6e4a91fb222d22bc46e8d4d7e59ef
ixgbe: Update ixgbe to use new vlan accleration.

removed ETH_FLAG_NTUPLE from the supported flags.

This patch puts it back on to allow for setting ntuple via ethtool.

CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix X540 to use it's own info struct
Don Skidmore [Thu, 9 Dec 2010 06:55:19 +0000 (06:55 +0000)]
ixgbe: fix X540 to use it's own info struct

This patch enables X540 hardware to use it's own set of support
functions.  This is useful as it has no need of SFP+ support.  A
couple minor bugs with the eeprom semaphore were also cleaned up.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix X540 phy id to correct value
Don Skidmore [Thu, 9 Dec 2010 06:55:14 +0000 (06:55 +0000)]
ixgbe: fix X540 phy id to correct value

The existing PHY ID for X540 was from early production hardware and
is no longer correct.  This patch corrects that.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgb: Don't check for vlan group on transmit
Emil Tantilov [Sat, 4 Dec 2010 05:35:17 +0000 (05:35 +0000)]
ixgb: Don't check for vlan group on transmit

Based on a patch from Jesse Gross.

Enable vlan tag insertion even when vlan group is not configured.

For ixgb HW both CTRL0.VME and VLE bit in the Tx descriptor need to be set
in order to enable HW acceleration.

Introduced separate functions for enabling/disabling of vlan tag stripping
similar to ixgbe.

CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoIntel Wired LAN drivers: Use static const
Jeff Kirsher [Wed, 1 Dec 2010 19:59:50 +0000 (19:59 +0000)]
Intel Wired LAN drivers: Use static const

Based on work by Joe Perches <joe@perches.com>

Using static const to decrease data and overall object size.

CC: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
13 years agoe1000: fix return value not set on error
Dean Nelson [Thu, 11 Nov 2010 05:50:25 +0000 (05:50 +0000)]
e1000: fix return value not set on error

Dean noticed that 'err' wasn't being set when the "goto err_dma"
statement is executed in the following hunk from the commit. It's value
will be zero as a result of a successful call to e1000_init_hw_struct().

This patch changes the error condition to be correctly propagated.

CC: stable@kernel.org
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoMAINTAINERS: Update Intel Wired LAN info
Jeff Kirsher [Fri, 10 Dec 2010 08:09:08 +0000 (00:09 -0800)]
MAINTAINERS: Update Intel Wired LAN info

Update with Intel Wired Ethernet public git trees.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/ixgbevf.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 08:01:44 +0000 (00:01 -0800)]
Documentation/networking/ixgbevf.txt: Update documentation

Update Intel Wired LAN ixgbevf documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/ixgbe.txt: Update ixgbe documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:55:47 +0000 (23:55 -0800)]
Documentation/networking/ixgbe.txt: Update ixgbe documentation

Update Intel Wired LAN ixgbe documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/igbvf.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:49:34 +0000 (23:49 -0800)]
Documentation/networking/igbvf.txt: Update documentation

Update Intel Wired LAN igbvf documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/igb.txt: update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:47:39 +0000 (23:47 -0800)]
Documentation/networking/igb.txt: update documentation

Update Intel Wired LAN igb documentation.

v2- Updated the ethtool support link, removed the LRO section and
    anti-spoofing sections.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/e1000e.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:44:42 +0000 (23:44 -0800)]
Documentation/networking/e1000e.txt: Update documentation

Update Intel Wired LAN e1000e documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/e1000.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:42:00 +0000 (23:42 -0800)]
Documentation/networking/e1000.txt: Update documentation

Update Intel Wired LAN e1000 documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoisdn: Fix printed out copy_from_user() return value after previous change.
David S. Miller [Sat, 11 Dec 2010 00:49:24 +0000 (16:49 -0800)]
isdn: Fix printed out copy_from_user() return value after previous change.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: add the debugfs facility to the bonding driver
Taku Izumi [Thu, 9 Dec 2010 15:17:13 +0000 (15:17 +0000)]
bonding: add the debugfs facility to the bonding driver

This patch provides the debugfs facility to the bonding driver.
The "bonding" directory is created in the debugfs root and directories of
each bonding interface (like bond0, bond1...) are created in that.

 # mount -t debugfs none /sys/kernel/debug

 # ls /sys/kernel/debug/bonding
 bond0  bond1

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Move enic port profile handling code to a new 802.1Qbh provisioning info type
Roopa Prabhu [Fri, 10 Dec 2010 12:02:33 +0000 (12:02 +0000)]
enic: Move enic port profile handling code to a new 802.1Qbh provisioning info type

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn: return -EFAULT if copy_from_user() fails
Dan Carpenter [Fri, 10 Dec 2010 02:40:09 +0000 (02:40 +0000)]
isdn: return -EFAULT if copy_from_user() fails

We should be returning -EFAULT here.

Mostly this patch is to silence a smatch warning.  The upper levels
of this driver turn all non-zero return values from isar_load_firmware()
into 1.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: update driver version
Jon Mason [Fri, 10 Dec 2010 14:03:02 +0000 (14:03 +0000)]
vxge: update driver version

Update vxge driver version to 2.5.1

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: independent interrupt moderation
Jon Mason [Fri, 10 Dec 2010 14:03:01 +0000 (14:03 +0000)]
vxge: independent interrupt moderation

Configure the workload clock register and TIM register for independent
interrupt moderation based on the individual vpath utilization instead
of common link utilization.  This greatly improves latency.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: hotplug stall
Jon Mason [Fri, 10 Dec 2010 14:03:00 +0000 (14:03 +0000)]
vxge: hotplug stall

When hot-unplugging a vxge adapter while running, the driver's remove
routine prints warning and then stalls the calling thread.  This is due
to vxge_remove calling vxge_device_unregister to unregister the netdev
before calling flush_scheduled_work clear any pending work.  Swapping
the order of these two functions resolves the issue.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: transmit timeout deadlock
Jon Mason [Fri, 10 Dec 2010 14:02:59 +0000 (14:02 +0000)]
vxge: transmit timeout deadlock

Use a workqueue to handle the device reset during a transmit timeout, as
there can be a deadlock during bringup.  Also, set the netif carrier off
before the watchdog reset is started to prevent the timeout from
reoccurring while still processing the first.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: use pci_request_region()
Jon Mason [Fri, 10 Dec 2010 14:02:58 +0000 (14:02 +0000)]
vxge: use pci_request_region()

Only BAR0 is ever accessed, thus making the calls to pci_request_regions
overkill.  Change calls of pci_request_regions to pci_request_region to
reduce the size of the mapped area.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: fix crash of VF when unloading PF
Jon Mason [Fri, 10 Dec 2010 14:02:57 +0000 (14:02 +0000)]
vxge: fix crash of VF when unloading PF

Calling pci_disable_sriov when unloading a SR-IOV physical function
driver from a host when a guest is using a virtual function from that
device can cause a host crash or VM crash.  The crash is caused by the
virtual config space no longer being present when PF is removed (due to
the pci_disable_sriov).  This can be avoided by not calling
pci_disable_sriov to disable the PCI space when shutting down the PF.
Each function in the X3100 operates independently and in this case will
operate properly in the absence of the PF.

Also, added improved logic in the detection of SR-IOV initialization.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: code cleanup and reorganization
Jon Mason [Fri, 10 Dec 2010 14:02:56 +0000 (14:02 +0000)]
vxge: code cleanup and reorganization

Move function locations to remove the need for internal declarations and
other misc clean-ups.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Arpit Patel <arpit.patel@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Use consistent NF_DROP returns in nf_pre_routing
Herbert Xu [Thu, 9 Dec 2010 17:38:11 +0000 (17:38 +0000)]
bridge: Use consistent NF_DROP returns in nf_pre_routing

The nf_pre_routing functions in bridging have collected two
distinct ways of returning NF_DROP over the years, inline and
via goto.  There is no reason for preferring either one.

So this patch arbitrarily picks the inline variant and converts
the all the gotos.

Also removes a redundant comment.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_packet: use swap() instead of the open coded macro XC()
Changli Gao [Sat, 11 Dec 2010 00:02:20 +0000 (16:02 -0800)]
af_packet: use swap() instead of the open coded macro XC()

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: Use default implementation of ethtool_ops::get_link where possible
Ben Hutchings [Thu, 9 Dec 2010 12:10:25 +0000 (12:10 +0000)]
netdev: Use default implementation of ethtool_ops::get_link where possible

Various drivers are using implementations of ethtool_ops::get_link
that are equivalent to the default ethtool_op_get_link().  Change
them to use that instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Report link-down while interface is down
Ben Hutchings [Thu, 9 Dec 2010 12:08:35 +0000 (12:08 +0000)]
ethtool: Report link-down while interface is down

While an interface is down, many implementations of
ethtool_ops::get_link, including the default, ethtool_op_get_link(),
will report the last link state seen while the interface was up.  In
general the current physical link state is not available if the
interface is down.

Define ETHTOOL_GLINK to reflect whether the interface *and* any
physical port have a working link, and consistently return 0 when the
interface is down.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Use VF mac set by IFLA_VF_MAC in port profile provisioning data
Roopa Prabhu [Wed, 8 Dec 2010 13:54:03 +0000 (13:54 +0000)]
enic: Use VF mac set by IFLA_VF_MAC in port profile provisioning data

This patch adds support in enic 802.1Qbh port profile provisioning code
to use the mac address set by IFLA_VF_MAC. For now we handle this mac as a
special case for a VM mac address sent to us by libvirt. The VM mac address
is sent to the switch along with the rest of the port profile provisioning
data. This patch also adds calls to register and deregister the mac address
during port profile association/deassociation.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Add ndo_set_vf_mac support for enic dynamic devices
Roopa Prabhu [Wed, 8 Dec 2010 13:53:58 +0000 (13:53 +0000)]
enic: Add ndo_set_vf_mac support for enic dynamic devices

This patch implements the ndo_set_vf_mac netdev operation for enic
dynamic devices. It treats the mac address set by IFLA_VF_MAC as a
special case to use it in the port profile provisioning data.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Add ndo_set_rx_mode support for enic vnics
Roopa Prabhu [Wed, 8 Dec 2010 13:19:58 +0000 (13:19 +0000)]
enic: Add ndo_set_rx_mode support for enic vnics

Add ndo_set_rx_mode support to register unicast and multicast
address filters for enic devices

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopktgen: adding prefetchw() call
Junchang Wang [Wed, 8 Dec 2010 16:55:16 +0000 (16:55 +0000)]
pktgen: adding prefetchw() call

We know for sure pktgen is going to write skb->data right after
*_alloc_skb, causing unnecessary cache misses.

Idea is to add a prefetchw() call to prefetch the first cache line
indicated by skb->data. On systems with Adjacent Cache Line Prefetch,
it's probably two cache lines are prefetched.

With this patch, pktgen on Intel SR1625 server with two E5530
quad-core processors and a single ixgbe-based NIC went from 8.63Mpps
to 9.03Mpps, with 4.6% improvement.

Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: convert references to LRO to GRO
stephen hemminger [Mon, 6 Dec 2010 12:33:01 +0000 (12:33 +0000)]
sfc: convert references to LRO to GRO

This driver now uses Generic Receive Offload, not the older LRO.
Change references to LRO in names and comments.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinet6: Remove redundant unlikely()
Tobias Klauser [Thu, 9 Dec 2010 04:37:48 +0000 (04:37 +0000)]
inet6: Remove redundant unlikely()

IS_ERR() already implies unlikely(), so it can be omitted here.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostmmac: Remove redundant unlikely()
Tobias Klauser [Thu, 9 Dec 2010 04:50:22 +0000 (04:50 +0000)]
stmmac: Remove redundant unlikely()

IS_ERR() already implies unlikely(), so it can be omitted here.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Traffic Flow Confidentiality for IPv6 ESP
Martin Willi [Wed, 8 Dec 2010 04:37:51 +0000 (04:37 +0000)]
xfrm: Traffic Flow Confidentiality for IPv6 ESP

Add TFC padding to all packets smaller than the boundary configured
on the xfrm state. If the boundary is larger than the PMTU, limit
padding to the PMTU.

Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Traffic Flow Confidentiality for IPv4 ESP
Martin Willi [Wed, 8 Dec 2010 04:37:50 +0000 (04:37 +0000)]
xfrm: Traffic Flow Confidentiality for IPv4 ESP

Add TFC padding to all packets smaller than the boundary configured
on the xfrm state. If the boundary is larger than the PMTU, limit
padding to the PMTU.

Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add Traffic Flow Confidentiality padding XFRM attribute
Martin Willi [Wed, 8 Dec 2010 04:37:49 +0000 (04:37 +0000)]
xfrm: Add Traffic Flow Confidentiality padding XFRM attribute

The XFRMA_TFCPAD attribute for XFRM state installation configures
Traffic Flow Confidentiality by padding ESP packets to a specified
length.

Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: use the lockless variants of skb_queue
Changli Gao [Sat, 4 Dec 2010 15:01:52 +0000 (15:01 +0000)]
ifb: use the lockless variants of skb_queue

rq and tq are both protected by tx queue lock, so we can simply use
the lockless variants of skb_queue.

skb_queue_splice_tail_init() is used instead of the open coded and slow
one.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: remove unused macro TX_TIMEOUT
Changli Gao [Fri, 3 Dec 2010 19:55:20 +0000 (19:55 +0000)]
ifb: remove unused macro TX_TIMEOUT

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: remove the useless debug stats
Changli Gao [Fri, 3 Dec 2010 19:55:19 +0000 (19:55 +0000)]
ifb: remove the useless debug stats

These debug stats are not exported, and become useless.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: buffer count imbalance
Jan Glauber [Wed, 8 Dec 2010 02:58:01 +0000 (02:58 +0000)]
qeth: buffer count imbalance

The used buffers counter is not incremented in case of an error so
the counter can become negative. Increment the used buffers counter
before checking for errors.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: l3 add vlan hdr in passthru frames
Frank Blaschka [Wed, 8 Dec 2010 02:58:00 +0000 (02:58 +0000)]
qeth: l3 add vlan hdr in passthru frames

OSA l3 mode is hw accelerated VLAN only for IPv4. Take care we
add the vlan hdr to a passthru frame in the device driver.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: support VIPA add/del in offline mode
Einar Lueck [Wed, 8 Dec 2010 02:57:59 +0000 (02:57 +0000)]
qeth: support VIPA add/del in offline mode

Only work through the IP adddress to do list if the card is UP or
SOFTSETUP. Enables to configure VIPA add/del in offline mode.

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>
13 years agoqeth: support ipv6 query arp cache for HiperSockets
Einar Lueck [Wed, 8 Dec 2010 02:57:58 +0000 (02:57 +0000)]
qeth: support ipv6 query arp cache for HiperSockets

Function qeth_l3_arp_query now queries for IPv6 addresses, too, if
QETH_QARP_WITH_IPV6 is passed as parameter to the ioctl. HiperSockets
and GuestLAN in HiperSockets mode provide corresponding entries.

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>
13 years agonet/ipv6/udp.c: fix typo in flush_stack()
Jiri Pirko [Thu, 9 Dec 2010 03:40:30 +0000 (03:40 +0000)]
net/ipv6/udp.c: fix typo in flush_stack()

skb1 should be passed as parameter to sk_rcvqueues_full() here.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Fix 'release_it' logic in tcp_v6_get_peer()
David S. Miller [Fri, 10 Dec 2010 21:16:09 +0000 (13:16 -0800)]
ipv6: Fix 'release_it' logic in tcp_v6_get_peer()

We accidently set it to "true" for the case where we
are using a route bound peer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Fix return values of br_multicast_add_group/br_multicast_new_group
Tobias Klauser [Fri, 10 Dec 2010 03:18:04 +0000 (03:18 +0000)]
bridge: Fix return values of br_multicast_add_group/br_multicast_new_group

If br_multicast_new_group returns NULL, we would return 0 (no error) to
the caller of br_multicast_add_group, which is not what we want. Instead
br_multicast_new_group should return ERR_PTR(-ENOMEM) in this case.
Also propagate the error number returned by br_mdb_rehash properly.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>