GitHub/exynos8895/android_kernel_samsung_universal8895.git
12 years agonet: use eth_hw_addr_random() and reset addr_assign_type
Danny Kukawka [Wed, 15 Feb 2012 06:45:40 +0000 (06:45 +0000)]
net: use eth_hw_addr_random() and reset addr_assign_type

Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.

Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.

v2: adapt to renamed eth_hw_addr_random()

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: replace random_ether_addr() with eth_hw_addr_random()
Danny Kukawka [Wed, 15 Feb 2012 06:45:39 +0000 (06:45 +0000)]
net: replace random_ether_addr() with eth_hw_addr_random()

Replace usage of random_ether_addr() with eth_hw_addr_random()
to set addr_assign_type correctly to NET_ADDR_RANDOM.

Change the trivial cases.

v2: adapt to renamed eth_hw_addr_random()

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: allow all functions to display the phy FW version
Mintz Yuval [Wed, 15 Feb 2012 02:10:32 +0000 (02:10 +0000)]
bnx2x: allow all functions to display the phy FW version

The phy FW version is stored in regular memory, no MDC-MDIO access or
any special locks are required to read it in the current implementation.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: removed code re-checking memory base after device open
Mintz Yuval [Wed, 15 Feb 2012 02:10:31 +0000 (02:10 +0000)]
bnx2x: removed code re-checking memory base after device open

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: allow BCM84833 phy to advertise 100Base-T speeds
Mintz Yuval [Wed, 15 Feb 2012 02:10:30 +0000 (02:10 +0000)]
bnx2x: allow BCM84833 phy to advertise 100Base-T speeds

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: notify cnic of address of info-to-the-mcp
Mintz Yuval [Wed, 15 Feb 2012 02:10:29 +0000 (02:10 +0000)]
bnx2x: notify cnic of address of info-to-the-mcp

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: allocate smaller Rx rings for 1G functions
Mintz Yuval [Wed, 15 Feb 2012 02:10:28 +0000 (02:10 +0000)]
bnx2x: allocate smaller Rx rings for 1G functions

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: allocate memory dynamically in ethtool self-test.
Mintz Yuval [Wed, 15 Feb 2012 02:10:27 +0000 (02:10 +0000)]
bnx2x: allocate memory dynamically in ethtool self-test.

From: Merav Sicron <meravs@broadcom.com>

Current ethtool self tests usesa large buffer on stack. This patch replaces
that array by dynamically allocated memory

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: force 10G on 84833 phy should be autoneg with only 10G advertised
Mintz Yuval [Wed, 15 Feb 2012 02:10:26 +0000 (02:10 +0000)]
bnx2x: force 10G on 84833 phy should be autoneg with only 10G advertised

From: Yaniv Rosner <yaniv.rosner@broadcom.com>

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: added autoneg-restart after link advertisement changes
Mintz Yuval [Wed, 15 Feb 2012 02:10:25 +0000 (02:10 +0000)]
bnx2x: added autoneg-restart after link advertisement changes

From: Yaniv Rosner <yaniv.rosner@broadcom.com>

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: ethtool publishes link partners speed and FC
Mintz Yuval [Wed, 15 Feb 2012 02:10:24 +0000 (02:10 +0000)]
bnx2x: ethtool publishes link partners speed and FC

Following the changes in the ethtool source code, this patch enables
the bnx2x driver to publish the Link partner's capabilities s, when ethtool
is used on an interface which completed autoneg.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: half duplex support added for several boards
Mintz Yuval [Wed, 15 Feb 2012 02:10:23 +0000 (02:10 +0000)]
bnx2x: half duplex support added for several boards

From: Yaniv Rosner <yaniv.rosner@broadcom.com>

Several boards require an additional HW bit written in-order to enable
half duplex.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: consistent statistics after internal driver reload
Mintz Yuval [Wed, 15 Feb 2012 02:10:22 +0000 (02:10 +0000)]
bnx2x: consistent statistics after internal driver reload

Currently bnx2x statistics are reset by inner driver reload, e.g. by MTU
change. This patch fixes this issue - from now on statistics should only
be reset upon device closure.
Thanks to Michal Schmidt <mschmidt@redhat.com> for his initial patch
regarding this issue.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: add unicast steering entries to resource_tracker
Eugenia Emantayev [Tue, 14 Feb 2012 06:38:38 +0000 (06:38 +0000)]
mlx4: add unicast steering entries to resource_tracker

Add unicast steering entries to resource tracker.
Do qp_detach also for these entries when VF doesn't shut down gracefully.
Otherwise there is leakage of these resources, since they are not tracked.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: attach multicast with correct flag
Eugenia Emantayev [Tue, 14 Feb 2012 06:38:33 +0000 (06:38 +0000)]
mlx4: attach multicast with correct flag

mlx4_multicast_attach/detach() should use always MLX4_MC_STEER flag

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: remove redundant adding of steering type to gid
Eugenia Emantayev [Tue, 14 Feb 2012 06:38:12 +0000 (06:38 +0000)]
mlx4: remove redundant adding of steering type to gid

mlx4_uc_steer_add/release() should not add MLX4_UC_STEER flag to gid.
It is added in mlx4_unicast_attach/detach().

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: remove unnecessary variables and arguments
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:46 +0000 (06:37 +0000)]
mlx4: remove unnecessary variables and arguments

mlx4_qp_attach/detach_common() don't use hash variable, move it to find_entry()
static find_entry() in mcg.c doesn't use steer argument

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: remove unused field high_prios
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:41 +0000 (06:37 +0000)]
mlx4: remove unused field high_prios

Remove unnecessary field high_prios from mlx4_steer struct and initialization

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4: fix QP tree trashing
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:22 +0000 (06:37 +0000)]
mlx4: fix QP tree trashing

When adding new unicast steer entry, before moving qp to state ready,
actually before calling mlx4_RST2INIT_QP_wrapper(), there were added
a lot of entries with local_qpn=0 into radix tree.
This fact impacted the get_res() function and proper functioning
of resource tracker in addition to adding trash entries into radix tree.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@melllanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_core: fix buffer overrun
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:16 +0000 (06:37 +0000)]
mlx4_core: fix buffer overrun

When passing MLX4_UC_STEER=1 it was translated to value 2
after mlx4_QP_ATTACH_wrapper. Therefore in new_steering_entry()
unicast steer entries were added to index 2 of array of size 2.
Fixing this bug by shift right to one position.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Update copyright
Matt Carlson [Mon, 13 Feb 2012 15:20:17 +0000 (15:20 +0000)]
tg3: Update copyright

This patch updates the copyright dates in the tg3 driver.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Use *_UNKNOWN ethtool definitions
Matt Carlson [Mon, 13 Feb 2012 15:20:16 +0000 (15:20 +0000)]
tg3: Use *_UNKNOWN ethtool definitions

This patch replaces tg3's private SPEED_INVALID and DUPLEX_INVALID
definitions with SPEED_UNKNOWN and DUPLEX_UNKNOWN respectively.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Remove unneeded link_config.orig_... members
Matt Carlson [Mon, 13 Feb 2012 15:20:15 +0000 (15:20 +0000)]
tg3: Remove unneeded link_config.orig_... members

This patch removes the unneeded link_config.orig_* members.  When the
phy is in a low power state, the TG3_PHYFLG_IS_LOW_POWER flag solely
determines how the link is configured.  When the phy is powered back up,
it can resume using the original settings.

For the phylib case, the link configuration still needs to be saved, but
since the phylib maintains its own configuration, we can repurpose the
(unused in this case) tg3 link configuration members.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Remove unused link config code
Matt Carlson [Mon, 13 Feb 2012 15:20:14 +0000 (15:20 +0000)]
tg3: Remove unused link config code

When tg3 devices are shutdown, the driver uses the
TG3_PHYFLG_IS_LOW_POWER flag to enable a static phy configuration.
Any attempt to use the link configuration variables is dead code.  This
patch removes such code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Consolidate ASIC rev detection code
Matt Carlson [Mon, 13 Feb 2012 15:20:13 +0000 (15:20 +0000)]
tg3: Consolidate ASIC rev detection code

Detecting the ASIC revision of a device is getting to be an increasingly
complex process.  This patch consolidates all the ASIC rev detection
code to a single routine for better maintainability.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Reduce UMP event collision window
Matt Carlson [Mon, 13 Feb 2012 15:20:12 +0000 (15:20 +0000)]
tg3: Reduce UMP event collision window

The tg3 driver needs to submit a few phy register values to the UMP
firmware each time the link state changes.  Up until now, the driver
would wait for the previous event to complete, then proceed to gather
data through a series of phy accesses.  Since phy accesses are
relatively slow, it is possible for another thread to attempt to submit
its own event while the UMP code is still construction its message.

This patch seeks to minimize the collision window as much as possible by
preloading the phy data.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix NVRAM page writes on newer devices
Matt Carlson [Mon, 13 Feb 2012 15:20:11 +0000 (15:20 +0000)]
tg3: Fix NVRAM page writes on newer devices

On newer devices, the hardware expects the NVRAM address register
to be written only once per NVRAM page.  To do otherwise causes NVRAM
corruption.  This patch fixes the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix copper autoneg adv checks
Matt Carlson [Mon, 13 Feb 2012 15:20:10 +0000 (15:20 +0000)]
tg3: Fix copper autoneg adv checks

When checking the autoneg advertisements, the driver failed to include
the master and master enable bits for the bcm5701.  This patch fixes the
problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix stats while interface is down
Matt Carlson [Mon, 13 Feb 2012 15:20:09 +0000 (15:20 +0000)]
tg3: Fix stats while interface is down

If the tg3 interface is down, the driver will return ethtool stats
uninitialized.  This patch zeroes out the destination stat buffer in
such a case.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Disable new DMA engine for 57766
Matt Carlson [Mon, 13 Feb 2012 15:20:08 +0000 (15:20 +0000)]
tg3: Disable new DMA engine for 57766

A bug was found in the new DMA engine for the 57766.  This patch
disables it, which causes the device to fallback to the old DMA engine.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Mon, 13 Feb 2012 23:47:20 +0000 (18:47 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

12 years agoe1000e: cleanup goto statements to exit points without common work
Bruce Allan [Wed, 8 Feb 2012 02:55:56 +0000 (02:55 +0000)]
e1000e: cleanup goto statements to exit points without common work

Per ./Documentation/CodingStyle, goto statements are acceptable for the
centralized exiting of functions when there are multiple exit points which
share common work such as cleanup.  When no common work is required for
multiple exit points, the function should just return at these exit points
instead of doing an unnecessary jump to a centralized return.  This patch
cleans up the inappropriate use of goto statements, and removes unnecessary
variables (or move to a smaller scope) where possible as a result of the
cleanups.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: potentially incorrect return for e1000e_setup_fiber_serdes_link
Bruce Allan [Wed, 8 Feb 2012 02:55:51 +0000 (02:55 +0000)]
e1000e: potentially incorrect return for e1000e_setup_fiber_serdes_link

In the unlikely event that e1000_poll_fiber_serdes_link_generic() is called
and it returns an error, the returned error code value is not propagated to
the caller of e1000e_setup_fiber_serdes_link().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: potentially incorrect return for e1000_init_hw_ich8lan
Bruce Allan [Wed, 8 Feb 2012 02:55:46 +0000 (02:55 +0000)]
e1000e: potentially incorrect return for e1000_init_hw_ich8lan

In the unlikely event that e1000_setup_link_ich8lan() returns an error,
the returned error code value is not propagated to the caller of
e1000_init_hw_ich8lan().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: minor whitespace addition (insert blank line separator)
Bruce Allan [Wed, 8 Feb 2012 02:55:40 +0000 (02:55 +0000)]
e1000e: cleanup: minor whitespace addition (insert blank line separator)

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: remove unnecessary variable initializations
Bruce Allan [Wed, 8 Feb 2012 02:55:35 +0000 (02:55 +0000)]
e1000e: cleanup: remove unnecessary variable initializations

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: remove unnecessary test and return
Bruce Allan [Wed, 8 Feb 2012 02:55:30 +0000 (02:55 +0000)]
e1000e: cleanup: remove unnecessary test and return

Fall-through to a return statement that effectively does the same.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: remove unnecessary variable ret_val
Bruce Allan [Wed, 8 Feb 2012 02:55:25 +0000 (02:55 +0000)]
e1000e: cleanup: remove unnecessary variable ret_val

ret_val gets initialized to -E1000_ERR_NVM and never set differently, so
get rid of it and just return -E1000_ERR_NVM.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: remove unreachable statement
Bruce Allan [Wed, 8 Feb 2012 02:55:19 +0000 (02:55 +0000)]
e1000e: cleanup: remove unreachable statement

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: potentially incorrect return for e1000_set_d3_lplu_state_ich8lan
Bruce Allan [Wed, 8 Feb 2012 02:55:14 +0000 (02:55 +0000)]
e1000e: potentially incorrect return for e1000_set_d3_lplu_state_ich8lan

In the unlikely event that e1e_wphy() returns an error, the returned error
code is not propogated to the caller of e1000_set_d3_lplu_state_ich8lan().
With this change, there is a rare possibility that ret_val might not get
set so it must be initialized.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agonet_sched: sch_plug: plug_qdisc_ops is static
Eric Dumazet [Mon, 13 Feb 2012 05:40:45 +0000 (05:40 +0000)]
net_sched: sch_plug: plug_qdisc_ops is static

net/sched/sch_plug.c:211:18: warning: symbol 'plug_qdisc_ops' was not
declared. Should it be static?

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoppp: fix truesize underestimation
Eric Dumazet [Mon, 13 Feb 2012 04:23:24 +0000 (04:23 +0000)]
ppp: fix truesize underestimation

When building frag_list, head truesize should be sum of all frag
truesize.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogro: fix truesize underestimation
Eric Dumazet [Mon, 13 Feb 2012 04:09:20 +0000 (04:09 +0000)]
gro: fix truesize underestimation

skb_gro_receive() doesnt update truesize properly when adding one skb to
frag_list.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Move transmit comment to a better location
Matt Carlson [Mon, 13 Feb 2012 10:20:12 +0000 (10:20 +0000)]
tg3: Move transmit comment to a better location

This patch moves a comment in the transmit path to a better location.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Eliminate unneeded prototype
Matt Carlson [Mon, 13 Feb 2012 10:20:11 +0000 (10:20 +0000)]
tg3: Eliminate unneeded prototype

This patch eliminates the unneeded tg3_halt_cpu() prototype and moves
the tg3_setup_phy() prototype closer to where it is needed.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Relocate tg3_find_peer
Matt Carlson [Mon, 13 Feb 2012 10:20:10 +0000 (10:20 +0000)]
tg3: Relocate tg3_find_peer

This patch relocates tg3_find_peer to eliminate a prototype.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Move tg3_nvram_write_block functions
Matt Carlson [Mon, 13 Feb 2012 10:20:09 +0000 (10:20 +0000)]
tg3: Move tg3_nvram_write_block functions

This patch moves the tg3_nvram_write_block functions higher in the file
to eliminate a prototype.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Move tg3_set_rx_mode
Matt Carlson [Mon, 13 Feb 2012 10:20:08 +0000 (10:20 +0000)]
tg3: Move tg3_set_rx_mode

This patch moves __tg3_set_rx_mode above its first use and moves
tg3_set_rx_mode down closer to where the netdev_ops functions should be.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Move tg3_change_mtu to a better location
Matt Carlson [Mon, 13 Feb 2012 10:20:07 +0000 (10:20 +0000)]
tg3: Move tg3_change_mtu to a better location

This patch moves tg3_change_mtu to a better location.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Relocate tg3_reset_task
Matt Carlson [Mon, 13 Feb 2012 10:20:06 +0000 (10:20 +0000)]
tg3: Relocate tg3_reset_task

This patch moves tg3_reset_task further down in the file where it makes
more sense to be.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Move tg3_restart_hw to a better location
Matt Carlson [Mon, 13 Feb 2012 10:20:05 +0000 (10:20 +0000)]
tg3: Move tg3_restart_hw to a better location

This patch relocates tg3_restart_hw() to a better location.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovirtio: net: remove sparse errors
Eric Dumazet [Mon, 13 Feb 2012 06:53:41 +0000 (06:53 +0000)]
virtio: net: remove sparse errors

commit 3fa2a1df909 (virtio-net: per cpu 64 bit stats (v2)) added extra
__percpu qualifiers and sparse errors.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000e: cleanup: always return 0
Bruce Allan [Wed, 8 Feb 2012 02:55:09 +0000 (02:55 +0000)]
e1000e: cleanup: always return 0

These are a few instances of returning a value that can only be 0 so just
use a 'return 0' to make it more obvious.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: remove unnecessary assignments just before returning
Bruce Allan [Wed, 8 Feb 2012 02:55:03 +0000 (02:55 +0000)]
e1000e: cleanup: remove unnecessary assignments just before returning

Just return the appropriate value.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: potential incorrect return for e1000_setup_copper_link_80003es2lan
Bruce Allan [Wed, 8 Feb 2012 02:54:58 +0000 (02:54 +0000)]
e1000e: potential incorrect return for e1000_setup_copper_link_80003es2lan

In the unlikely event that e1000e_setup_copper_link() returns an error,
the returned error code value is not propogated to the caller of
e1000_setup_copper_link_80003es2lan().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: potentially incorrect return for e1000_cfg_kmrn_10_100_80003es2lan
Bruce Allan [Wed, 8 Feb 2012 02:54:53 +0000 (02:54 +0000)]
e1000e: potentially incorrect return for e1000_cfg_kmrn_10_100_80003es2lan

In the unlikely event that e1e_wphy() returns an error, the returned error
code value is not propogated to the caller of
e1000_cfg_kmrn_10_100_80003es2lan().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: rename goto labels to be more meaningful
Bruce Allan [Wed, 8 Feb 2012 02:54:48 +0000 (02:54 +0000)]
e1000e: cleanup: rename goto labels to be more meaningful

In the following functions, rename the generic 'out' goto label to the more
descriptive 'release' to indicate the type of common work that is done
before exiting the functions.  No functional change, cosmetic only.

e1000_sw_lcd_config_ich8lan()
e1000_oem_bits_config_ich8lan()
e1000_init_phy_wakeup()
e1000e_write_phy_reg_bm()
e1000e_read_phy_reg_bm()
e1000e_read_phy_reg_bm2()

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: cleanup: use goto for common work needed by multiple exit points
Bruce Allan [Wed, 8 Feb 2012 02:54:42 +0000 (02:54 +0000)]
e1000e: cleanup: use goto for common work needed by multiple exit points

There are two exit points of e1000e_write_nvm_spi() which require the
nvm->ops.release() function pointer called just before exiting.
Consolidate the two duplicate pieces of common work with a goto.  With
this change, the value ret_val will need to be returned instead of 0.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agotrivial: typo hnalder -> handler
Uwe Kleine-König [Sun, 12 Feb 2012 11:29:06 +0000 (11:29 +0000)]
trivial: typo hnalder -> handler

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmicro: Fix typo in stmmac_pci.c and stmmac_platform.c
Masanari Iida [Sun, 12 Feb 2012 03:45:41 +0000 (03:45 +0000)]
stmicro: Fix typo in stmmac_pci.c and stmmac_platform.c

Correct spelling "drivr" to "driver" in
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Fix typo in dsp_core.c
Masanari Iida [Sun, 12 Feb 2012 03:37:06 +0000 (03:37 +0000)]
mISDN: Fix typo in dsp_core.c

Correct spelling "modul" to "module" in
drivers/isdn/mISDN/dsp_core.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoenic: remove assignment of random mac on enic vf
Roopa Prabhu [Sat, 11 Feb 2012 22:12:44 +0000 (22:12 +0000)]
enic: remove assignment of random mac on enic vf

This patch removes random mac assignment on vf's. The vf's will start with
a zero mac and with upcoming support in fw/driver, a vf mac can be set
via the pf. vf's also support ndo_set_mac_address. This decision was made
based on the fact that a random mac on a vf is not really needed. And this
will reduce some of the problems with the vf's getting a new mac on
every driver load/unload (one of them being udev renaming the device on ever
load/unload and reboot).

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: sujith sankar <ssujith@cisco.com>
Signed-off-by: ChingWei Chang <cwchang@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoenic: Fix address deregistration for sriov vf during port profile disassociate
Roopa Prabhu [Sat, 11 Feb 2012 21:37:37 +0000 (21:37 +0000)]
enic: Fix address deregistration for sriov vf during port profile disassociate

This patch fixes erroneous PF address deregistration in cases where
a port profile disassociate is called on an already disassociated interface.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: sujith sankar <ssujith@cisco.com>
Signed-off-by: ChingWei Chang <cwchang@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoisdn: Fix typo in isdn_ppp.c
Masanari Iida [Sat, 11 Feb 2012 01:49:28 +0000 (01:49 +0000)]
isdn: Fix typo in isdn_ppp.c

Correct spelling "reseting" to "resetting" in
drivers/isdn/i4l/isdn_ppp.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN/hfcsusb: remove unused variable hfcsusb_rev
Danny Kukawka [Fri, 10 Feb 2012 05:01:08 +0000 (05:01 +0000)]
mISDN/hfcsusb: remove unused variable hfcsusb_rev

Removed unused variable hfcsusb_rev (-Wunused-variable) and
copied Revision info to file comment block above to keep the info.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoisdn: Fix typo in callc.c and tei.c
Masanari Iida [Fri, 10 Feb 2012 04:48:00 +0000 (04:48 +0000)]
isdn: Fix typo in callc.c and tei.c

Correct spelling "ioclt" to "ioctl" in
drivers/isdn/hisax/callc.c

Correct spelling "asigned" to "assigned" in
drivers/isdn/hisax/tei.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: event queue re-design
Sathya Perla [Thu, 9 Feb 2012 18:05:27 +0000 (18:05 +0000)]
be2net: event queue re-design

v2: Fixed up the bad typecasting pointed out by David...

In the current design 8 TXQs are serviced by 1 EQ, while each RSS queue
is serviced by a separate EQ. This is being changed as follows:

- Upto 8 EQs will be used (based on the availabilty of msix vectors).
Each EQ will handle 1 RSS and 1 TX ring. The default non-RSS RX queue and
MCC queue are handled by the last EQ.

- On cards which provide support, upto 8 RSS rings will be used, instead
of the current limit of 4.

The new design allows spreading the TX multi-queue completion processing
across multiple CPUs unlike the previous design.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers/net: Remove boolean comparisons to true/false
Joe Perches [Thu, 9 Feb 2012 11:17:23 +0000 (11:17 +0000)]
drivers/net: Remove boolean comparisons to true/false

Booleans should not be compared to true or false
but be directly tested or tested with !.

Done via cocci script:

@@
bool t;
@@
- t == true
+ t
@@
bool t;
@@
- t != true
+ !t
@@
bool t;
@@
- t == false
+ !t
@@
bool t;
@@
- t != false
+ t

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agorename dev_hw_addr_random and remove redundant second
Danny Kukawka [Thu, 9 Feb 2012 09:48:54 +0000 (09:48 +0000)]
rename dev_hw_addr_random and remove redundant second

Renamed dev_hw_addr_random to eth_hw_addr_random() to reflect that
this function only assign a random ethernet address (MAC). Removed
the second parameter (u8 *hwaddr), it's redundant since the also
given net_device already contains net_device->dev_addr.
Set it directly.

Adapt igbvf and ixgbevf to the changed function.

Small fix for ixgbevf_probe(): if ixgbevf_sw_init() fails
(which means the device got no dev_addr) handle the error and
jump to err_sw_init as already done by igbvf in similar case.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoeth: reset addr_assign_type if eth_mac_addr() called
Danny Kukawka [Thu, 9 Feb 2012 09:48:53 +0000 (09:48 +0000)]
eth: reset addr_assign_type if eth_mac_addr() called

If eth_mac_addr() get called, usually if SIOCSIFHWADDR was
used to change the MAC of a ethernet device, reset the
addr_assign_type to NET_ADDR_PERM if the state was
NET_ADDR_RANDOM before. Reset the state since the MAC is
no longer random at least not from the kernel side.

v2: changed to bitops, removed if()

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: implement IP_RECVTOS for IP_PKTOPTIONS
Jiri Benc [Thu, 9 Feb 2012 09:35:49 +0000 (09:35 +0000)]
net: implement IP_RECVTOS for IP_PKTOPTIONS

Currently, it is not easily possible to get TOS/DSCP value of packets from
an incoming TCP stream. The mechanism is there, IP_PKTOPTIONS getsockopt
with IP_RECVTOS set, the same way as incoming TTL can be queried. This is
not actually implemented for TOS, though.

This patch adds this functionality, both for IPv4 (IP_PKTOPTIONS) and IPv6
(IPV6_2292PKTOPTIONS). For IPv4, like in the IP_RECVTTL case, the value of
the TOS field is stored from the other party's ACK.

This is needed for proxies which require DSCP transparency. One such example
is at http://zph.bratcheda.org/.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: helper function to get tclass
Jiri Benc [Thu, 9 Feb 2012 09:34:41 +0000 (09:34 +0000)]
ipv6: helper function to get tclass

Implement helper inline function to get traffic class from IPv6 header.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoaeroflex: Fix typo in greth.c
Masanari Iida [Thu, 9 Feb 2012 04:23:33 +0000 (04:23 +0000)]
aeroflex: Fix typo in greth.c

Correct spelling "reseting" to "resetting" in
drivers/net/ethernet/aeroflex/greth.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sun, 12 Feb 2012 22:05:16 +0000 (17:05 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Sat, 11 Feb 2012 04:32:28 +0000 (23:32 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/davem/net

Conflicts:
drivers/infiniband/hw/nes/nes_cm.c

Simple whitespace conflict.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoskbuff: Move rxhash and vlan_tci to consolidate holes in sk_buff
Alexander Duyck [Fri, 27 Jan 2012 06:22:53 +0000 (06:22 +0000)]
skbuff: Move rxhash and vlan_tci to consolidate holes in sk_buff

This change helps to reduce the overall size of the sk_buff by moving
rxhash and vlan_tci so that the u16 values and u8 bitfields can be better
combined to create only one hole instead of multiple.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Combine post-DMA processing of sk_buff fields into single function
Alexander Duyck [Tue, 31 Jan 2012 02:59:49 +0000 (02:59 +0000)]
ixgbe: Combine post-DMA processing of sk_buff fields into single function

This change combines a number of post-DMA Rx packet processing functions
into a single function.  The advantage of this is that it combines most of
the Rx descriptor processing into one spot so it should all be warm in the
cache.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Drop the _ADV of descriptor macros since all ixgbe descriptors are ADV
Alexander Duyck [Tue, 31 Jan 2012 02:59:44 +0000 (02:59 +0000)]
ixgbe: Drop the _ADV of descriptor macros since all ixgbe descriptors are ADV

It doesn't make much sense to differentiate between advanced and legacy
descriptors when the only descriptors that ixgbe uses are advanced
descriptors.  As such we can drop the _ADV suffix since all ixgbe
descriptors are automatically advanced.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add function for testing status bits in Rx descriptor
Alexander Duyck [Tue, 31 Jan 2012 02:59:39 +0000 (02:59 +0000)]
ixgbe: Add function for testing status bits in Rx descriptor

This change adds a small function for testing Rx status bits in the
descriptor.  The advantage to this is that we can avoid unnecessary
byte swaps on big endian systems.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Let the Rx buffer allocation clear status bits instead of cleanup
Alexander Duyck [Tue, 31 Jan 2012 02:59:34 +0000 (02:59 +0000)]
ixgbe: Let the Rx buffer allocation clear status bits instead of cleanup

This change makes it so that we always clear the status/error bits in the
Rx descriptor in the allocation path instead of the cleanup path.  The
advantage to this is that we spend less time modifying data.  As such we
can modify the data once and then let it go cold in the cache instead of
writing it, reading it, and then writing it again.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Address fact that RSC was not setting GSO size for incoming frames
Alexander Duyck [Tue, 31 Jan 2012 02:59:29 +0000 (02:59 +0000)]
ixgbe: Address fact that RSC was not setting GSO size for incoming frames

This patch is meant to address the fact that RSC has not been setting the
gso_size value on the skb.  As a result performance on lossy TCP
connections was negatively impacted.  This change resolves the issue by
setting gso_size to the average size for incoming packets.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Minor refactor of RSC
Alexander Duyck [Tue, 31 Jan 2012 02:59:23 +0000 (02:59 +0000)]
ixgbe: Minor refactor of RSC

This change addresses several issue.

First I had left the use of the next and prev skb pointers floating around
in the code and they were overdue to be pulled since I had rewritten the
RSC code in the out-of-tree driver some time ago to address issues brought
up by David Miller in regards to this.

I am also now defaulting to always leaving the first buffer unmapped on any
packet and then unmapping it after we read the EOP descriptor.  This allows
a simplification of the path with less branching.

Instead of counting packets received the code was changed some time ago to
track the number of buffers received.  This leads to inaccurate counting
when you compare numbers of packets received by the hardware versus what is
tracked by the software.  To correct this I am revising things so that the
append_cnt value for RSC accurately tracks the number of frames received.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 10 Feb 2012 22:18:46 +0000 (14:18 -0800)]
Merge git://git./linux/kernel/git/davem/net

Quoth David:

1) GRO MAC header comparisons were ethernet specific, breaking other
   link types.  This required a multi-faceted fix to cure the originally
   noted case (Infiniband), because IPoIB was lying about it's actual
   hard header length.  Thanks to Eric Dumazet, Roland Dreier, and
   others.

2) Fix build failure when INET_UDP_DIAG is built in and ipv6 is modular.
   From Anisse Astier.

3) Off by ones and other bug fixes in netprio_cgroup from Neil Horman.

4) ipv4 TCP reset generation needs to respect any network interface
   binding from the socket, otherwise route lookups might give a
   different result than all the other segments received.  From Shawn
   Lu.

5) Fix unintended regression in ipv4 proxy ARP responses, from Thomas
   Graf.

6) Fix SKB under-allocation bug in sh_eth, from Yoshihiro Shimoda.

7) Revert skge PCI mapping changes that are causing crashes for some
   folks, from Stephen Hemminger.

8) IPV4 route lookups fill in the wildcarded fields of the given flow
   lookup key passed in, which is fine most of the time as this is
   exactly what the caller's want.  However there are a few cases that
   want to retain the original flow key values afterwards, so handle
   those cases properly.  Fix from Julian Anastasov.

9) IGB/IXGBE VF lookup bug fixes from Greg Rose.

10) Properly null terminate filename passed to ethtool flash device
    method, from Ben Hutchings.

11) S3 resume fix in via-velocity from David Lv.

12) Fix double SKB free during xmit failure in CAIF, from Dmitry
    Tarnyagin.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (72 commits)
  net: Don't proxy arp respond if iif == rt->dst.dev if private VLAN is disabled
  ipv4: Fix wrong order of ip_rt_get_source() and update iph->daddr.
  netprio_cgroup: fix wrong memory access when NETPRIO_CGROUP=m
  netprio_cgroup: don't allocate prio table when a device is registered
  netprio_cgroup: fix an off-by-one bug
  bna: fix error handling of bnad_get_flash_partition_by_offset()
  isdn: type bug in isdn_net_header()
  net: Make qdisc_skb_cb upper size bound explicit.
  ixgbe: ethtool: stats user buffer overrun
  ixgbe: dcb: up2tc mapping lost on disable/enable CEE DCB state
  ixgbe: do not update real num queues when netdev is going away
  ixgbe: Fix broken dependency on MAX_SKB_FRAGS being related to page size
  ixgbe: Fix case of Tx Hang in PF with 32 VFs
  ixgbe: fix vf lookup
  igb: fix vf lookup
  e1000: add dropped DMA receive enable back in for WoL
  gro: more generic L2 header check
  IPoIB: Stop lying about hard_header_len and use skb->cb to stash LL addresses
  zd1211rw: firmware needs duration_id set to zero for non-pspoll frames
  net: enable TC35815 for MIPS again
  ...

12 years agonet: Don't proxy arp respond if iif == rt->dst.dev if private VLAN is disabled
Thomas Graf [Fri, 10 Feb 2012 04:07:11 +0000 (04:07 +0000)]
net: Don't proxy arp respond if iif == rt->dst.dev if private VLAN is disabled

Commit 653241 (net: RFC3069, private VLAN proxy arp support) changed
the behavior of arp proxy to send arp replies back out on the interface
the request came in even if the private VLAN feature is disabled.

Previously we checked rt->dst.dev != skb->dev for in scenarios, when
proxy arp is enabled on for the netdevice and also when individual proxy
neighbour entries have been added.

This patch adds the check back for the pneigh_lookup() scenario.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Fix wrong order of ip_rt_get_source() and update iph->daddr.
Li Wei [Thu, 9 Feb 2012 21:15:25 +0000 (21:15 +0000)]
ipv4: Fix wrong order of ip_rt_get_source() and update iph->daddr.

This patch fix a bug which introduced by commit ac8a4810 (ipv4: Save
nexthop address of LSRR/SSRR option to IPCB.).In that patch, we saved
the nexthop of SRR in ip_option->nexthop and update iph->daddr until
we get to ip_forward_options(), but we need to update it before
ip_rt_get_source(), otherwise we may get a wrong src.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetprio_cgroup: fix wrong memory access when NETPRIO_CGROUP=m
Neil Horman [Fri, 10 Feb 2012 05:43:38 +0000 (05:43 +0000)]
netprio_cgroup: fix wrong memory access when NETPRIO_CGROUP=m

When the netprio_cgroup module is not loaded, net_prio_subsys_id
is -1, and so sock_update_prioidx() accesses cgroup_subsys array
with negative index subsys[-1].

Make the code resembles cls_cgroup code, which is bug free.

Origionally-authored-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetprio_cgroup: don't allocate prio table when a device is registered
Neil Horman [Fri, 10 Feb 2012 05:43:37 +0000 (05:43 +0000)]
netprio_cgroup: don't allocate prio table when a device is registered

So we delay the allocation till the priority is set through cgroup,
and this makes skb_update_priority() faster when it's not set.

This also eliminates an off-by-one bug similar with the one fixed
in the previous patch.

Origionally-authored-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetprio_cgroup: fix an off-by-one bug
Neil Horman [Fri, 10 Feb 2012 05:43:36 +0000 (05:43 +0000)]
netprio_cgroup: fix an off-by-one bug

# mount -t cgroup xxx /mnt
  # mkdir /mnt/tmp
  # cat /mnt/tmp/net_prio.ifpriomap
  lo 0
  eth0 0
  virbr0 0
  # echo 'lo 999' > /mnt/tmp/net_prio.ifpriomap
  # cat /mnt/tmp/net_prio.ifpriomap
  lo 999
  eth0 0
  virbr0 4101267344

We got weired output, because we exceeded the boundary of the array.
We may even crash the kernel..

Origionally-authored-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 10 Feb 2012 17:06:25 +0000 (09:06 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT (v2)
  drm/i915: no lvds quirk for AOpen MP45
  drm/i915: Force explicit bpp selection for intel_dp_link_required
  drm/radeon: do not continue after error from r600_ib_test
  drivers/gpu/drm/drm_ioc32.c: initialize all fields
  drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT
  drm/i915:: Disable FBC on SandyBridge

12 years agoMerge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg...
Linus Torvalds [Fri, 10 Feb 2012 17:05:52 +0000 (09:05 -0800)]
Merge tag 'writeback-fixes' of git://git./linux/kernel/git/wfg/linux

fix 1 mysterious divide error
fix 3 NULL dereference bugs in writeback tracing, on SD card removal w/o umount

* tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue
  lib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel
  writeback: fix NULL bdi->dev in trace writeback_single_inode
  backing-dev: fix wakeup timer races with bdi_unregister()

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 10 Feb 2012 17:05:07 +0000 (09:05 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix double start/stop in x86_pmu_start()
  perf evsel: Fix an issue where perf report fails to show the proper percentage
  perf tools: Fix prefix matching for kernel maps
  perf tools: Fix perf stack to non executable on x86_64
  perf: Remove deprecated WARN_ON_ONCE()

12 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Fri, 10 Feb 2012 17:04:37 +0000 (09:04 -0800)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Couple of regressions, couple of zero-day bugs, a minor enhancement.
Nothing really major.

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (f75375s) Let f75375_update_device treat pwmX as a measured value
  hwmon: (f75375s) Fix bit shifting in f75375_write16
  hwmon: (f75375s) Fix reading of wrong register when initializing the F75387
  hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375
  hwmon: (w83627ehf) Remove duplicate code

12 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keith...
Dave Airlie [Fri, 10 Feb 2012 08:35:19 +0000 (08:35 +0000)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/keithp/linux into drm-fixes

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux:
  drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT (v2)
  drm/i915: no lvds quirk for AOpen MP45
  drm/i915: Force explicit bpp selection for intel_dp_link_required
  drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT
  drm/i915:: Disable FBC on SandyBridge

12 years agoigb: fix warning about unused function
Emil Tantilov [Sat, 28 Jan 2012 08:10:35 +0000 (08:10 +0000)]
igb: fix warning about unused function

This patch fixes a warning about unused function when CONFIG_PM_SLEEP
is not selected in the kernel config:

igb_main.c: warning: `igb_suspend` defined but not used [W-unused-function]

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: replace '1' with 'true' for boolean get_link_status
Bruce Allan [Wed, 1 Feb 2012 11:16:42 +0000 (11:16 +0000)]
e1000e: replace '1' with 'true' for boolean get_link_status

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: pass pointer to hw struct for e1000_init_mac_params_XXX()
Bruce Allan [Wed, 1 Feb 2012 10:53:05 +0000 (10:53 +0000)]
e1000e: pass pointer to hw struct for e1000_init_mac_params_XXX()

The e1000_init_mac_params_XXX() functions (where XXX is one of the three
MAC-family types 80003es2lan, 82571 and ich8lan) was not meant to require a
pointer to the adapter struct but does require a pointer to the hw struct.
Pass that pointer in to the functions instead.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: use true/false for bool autoneg_false
Bruce Allan [Tue, 31 Jan 2012 07:03:02 +0000 (07:03 +0000)]
e1000e: use true/false for bool autoneg_false

v2 - replaced mac->autoneg_failed == false with !mac->autoneg_failed

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: remove unnecessary parentheses
Bruce Allan [Tue, 31 Jan 2012 07:02:56 +0000 (07:02 +0000)]
e1000e: remove unnecessary parentheses

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: remove unnecessary returns from void functions
Bruce Allan [Tue, 31 Jan 2012 06:37:54 +0000 (06:37 +0000)]
e1000e: remove unnecessary returns from void functions

...and convert some goto's which simply return to just return.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: remove test that is always false
Bruce Allan [Tue, 31 Jan 2012 06:37:59 +0000 (06:37 +0000)]
e1000e: remove test that is always false

warning: comparison of unsigned expression < 0 is always false

Remove an unnecessary test that is reported when compiling driver with W=1.
The test is unnecessary because Intel wired GbE hardware older (i.e. less)
than 82571 is not supported by this driver.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>