firefly-linux-kernel-4.4.55.git
12 years agobnx2x: add missing parenthesis to prevent u32 overflow
Dmitry Kravkov [Wed, 4 Apr 2012 02:27:42 +0000 (02:27 +0000)]
bnx2x: add missing parenthesis to prevent u32 overflow

Commit b475d78 lacked two pairs of parenthesis, causing an overflow in the
congestion management.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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 agousbnet: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:41 +0000 (22:59 +0000)]
usbnet: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoucc_geth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:40 +0000 (22:59 +0000)]
ucc_geth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:39 +0000 (22:59 +0000)]
tg3: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:38 +0000 (22:59 +0000)]
stmmac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosmsc9420: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:37 +0000 (22:59 +0000)]
smsc9420: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosmsc911x: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:36 +0000 (22:59 +0000)]
smsc911x: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor8169: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:35 +0000 (22:59 +0000)]
r8169: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:34 +0000 (22:59 +0000)]
r6040: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopxa168_eth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:33 +0000 (22:59 +0000)]
pxa168_eth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomv643xx_eth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:32 +0000 (22:59 +0000)]
mv643xx_eth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomacb: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:31 +0000 (22:59 +0000)]
macb: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoll_temac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:30 +0000 (22:59 +0000)]
ll_temac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofs_enet: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:29 +0000 (22:59 +0000)]
fs_enet: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofec: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:28 +0000 (22:59 +0000)]
fec: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofec_mpc52xx: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:27 +0000 (22:59 +0000)]
fec_mpc52xx: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoetherh: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:26 +0000 (22:59 +0000)]
etherh: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodnet: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:25 +0000 (22:59 +0000)]
dnet: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodavinci_emac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:24 +0000 (22:59 +0000)]
davinci_emac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoax88796: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:23 +0000 (22:59 +0000)]
ax88796: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoethtool: Add a common function for drivers with transmit time stamping.
Richard Cochran [Tue, 3 Apr 2012 22:59:22 +0000 (22:59 +0000)]
ethtool: Add a common function for drivers with transmit time stamping.

Currently, most drivers do not support transmit SO_TIMESTAMPING. For those
that do support it, there is one appropriate response to the get_ts_info
query. This patch adds a common function providing this response.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoixp4xx_eth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:21 +0000 (22:59 +0000)]
ixp4xx_eth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobfin_mac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:20 +0000 (22:59 +0000)]
bfin_mac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogianfar: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:19 +0000 (22:59 +0000)]
gianfar: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodp83640: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:18 +0000 (22:59 +0000)]
dp83640: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoethtool: Introduce a method for getting time stamping capabilities.
Richard Cochran [Tue, 3 Apr 2012 22:59:17 +0000 (22:59 +0000)]
ethtool: Introduce a method for getting time stamping capabilities.

This commit adds a new ethtool ioctl that exposes the SO_TIMESTAMPING
capabilities of a network interface. In addition, user space programs
can use this ioctl to discover the PTP Hardware Clock (PHC) device
associated with the interface.

Since software receive time stamps are handled by the stack, the generic
ethtool code can answer the query correctly in case the MAC or PHY
drivers lack special time stamping features.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoptp: Add a method for obtaining the device index.
Richard Cochran [Tue, 3 Apr 2012 22:59:16 +0000 (22:59 +0000)]
ptp: Add a method for obtaining the device index.

This commit adds a method that MAC drivers may call in order to find out
the device number of their associated PTP Hardware Clock.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Fix 'inet6_rtm_getroute' to release 'rt->dst' in case of 'alloc_skb' failure
Shmulik Ladkani [Tue, 3 Apr 2012 23:13:00 +0000 (23:13 +0000)]
ipv6: Fix 'inet6_rtm_getroute' to release 'rt->dst' in case of 'alloc_skb' failure

In 72331bc [ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be
consistent with ipv4] the code of 'inet6_rtm_getroute()' was re-ordered
such that the reference to 'rt->dst' is incremented prior skb
allocation.

Hence, if 'alloc_skb()' fails, must drop a reference from 'rt->dst'.
Add the missing 'dst_release()' call.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoigb: offer a PTP Hardware Clock instead of the timecompare method
Richard Cochran [Fri, 16 Mar 2012 10:55:37 +0000 (10:55 +0000)]
igb: offer a PTP Hardware Clock instead of the timecompare method

This commit removes the legacy timecompare code from the igb driver and
offers a tunable PHC instead.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: add PTP Hardware Clock code
Richard Cochran [Fri, 16 Mar 2012 10:55:32 +0000 (10:55 +0000)]
igb: add PTP Hardware Clock code

This patch adds a source file implementing a PHC. Only the basic
clock operations have been implemented, although the hardware
would offer some ancillary functions. The code is fairly self
contained and is not yet used in the main igb driver.

Every timestamp and clock read operation must consult the overflow
counter to form a correct time value. Access to the counter is
protected by a spin lock, and the counter is implemented using the
standard cyclecounter/timecounter code.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: consolidate reporting of MSIX vectors into a single function
Emil Tantilov [Thu, 22 Mar 2012 03:00:29 +0000 (03:00 +0000)]
ixgbe: consolidate reporting of MSIX vectors into a single function

This patch modifies ixgbe_get_pcie_msix_count_generic() to support
all current HW and removes the 82598 specific function.

- change the type of ixgbe_get_pcie_msix_count_generic() to u16
- include a check to make sure the maximum allowed number of vectors
is not exceeded.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: update driver version number
Bruce Allan [Tue, 20 Mar 2012 03:48:29 +0000 (03:48 +0000)]
e1000e: update driver version number

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 indexed register arrays
Bruce Allan [Tue, 20 Mar 2012 03:48:13 +0000 (03:48 +0000)]
e1000e: cleanup indexed register arrays

Some Rx and Tx specific registers are arrays indexed by the queue number.
For clarity, specify the intended queue rather than obscuring it behind a
define.

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 NAPI routine
Bruce Allan [Tue, 20 Mar 2012 03:48:19 +0000 (03:48 +0000)]
e1000e: cleanup NAPI routine

Rename NAPI polling routine and a parameter with more appropriate names,
refactor a conditional branch to get rid of an unnecessary goto/label and
fix a line exceeding 80 columns.

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: Minor comment clean-up.
Matthew Vick [Fri, 16 Mar 2012 09:03:01 +0000 (09:03 +0000)]
e1000e: Minor comment clean-up.

Move the first phrase of a multi-line comment to the second line.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000: Support RX-ALL flag.
Ben Greear [Wed, 4 Apr 2012 06:01:29 +0000 (06:01 +0000)]
e1000: Support RX-ALL flag.

This allows the NIC to receive errored frames (bad FCS, etc)
and pass them up the stack.  This can be useful when using
sniffers.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agobnx2x: Change to driver version 1.72.10-0
Yuval Mintz [Tue, 3 Apr 2012 18:41:32 +0000 (18:41 +0000)]
bnx2x: Change to driver version 1.72.10-0

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: Change comments and white spaces
Yaniv Rosner [Tue, 3 Apr 2012 18:41:31 +0000 (18:41 +0000)]
bnx2x: Change comments and white spaces

A semantic patch, fixing style issues in the bnx2x's link code.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: change to the rss engine
Dmitry Kravkov [Tue, 3 Apr 2012 18:41:30 +0000 (18:41 +0000)]
bnx2x: change to the rss engine

This patch revises the way by which rss are configured, removing
an unnecessary module paramater and unrequired modes.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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: congestion management re-organization
Yuval Mintz [Tue, 3 Apr 2012 18:41:29 +0000 (18:41 +0000)]
bnx2x: congestion management re-organization

The congestion management code has migrated into a common location,
allowing all fw writes controlling mf congestion to be made in a
single function in the code. This is a semantic change.

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: Added support for a new device - 57811
Barak Witkowski [Tue, 3 Apr 2012 18:41:28 +0000 (18:41 +0000)]
bnx2x: Added support for a new device - 57811

Notice this patch includes lines with over 80 characters, as to not
break strings.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
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: Add remote-fault link detection
Yaniv Rosner [Tue, 3 Apr 2012 18:41:27 +0000 (18:41 +0000)]
bnx2x: Add remote-fault link detection

Restore remote-faule detection, which periodically checks for
remote-fault on the MAC layer. In case physical link appear to be
up but fault is set, it will provide a link down indication, and
when the fault is cleared, it will indicate link up again.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
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: added support for working with one msix irq.
Dmitry Kravkov [Tue, 3 Apr 2012 18:41:26 +0000 (18:41 +0000)]
bnx2x: added support for working with one msix irq.

Until now, the bnx2x driver needed at least 2 available msix interrupt
vectors in order to use msix. This patch add the possibility of configuring
msix when only one interrupt vector is available.
Notice this patch contains lines with over 80 characters, as it keeps print
strings in a single line.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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: enable inta on the pci bus when used
Yuval Mintz [Tue, 3 Apr 2012 18:41:25 +0000 (18:41 +0000)]
bnx2x: enable inta on the pci bus when used

During boot-from-SAN, if msix interrupts are unavailable and inta
is requested, it is possible that inta would be disabled in the
pci bus. This patch enables inta when requested.

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: remove unnecessary dmae code
Yuval Mintz [Tue, 3 Apr 2012 18:41:24 +0000 (18:41 +0000)]
bnx2x: remove unnecessary dmae code

Removed uninformative debug prints, as well as two functions
which were hardly used in the code.

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: remove unnecessary .h dependencies
Yuval Mintz [Tue, 3 Apr 2012 18:41:23 +0000 (18:41 +0000)]
bnx2x: remove unnecessary .h dependencies

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 agonet:phy:marvell: remove unnecessary code
Srinivas Kandagatla [Mon, 2 Apr 2012 06:25:24 +0000 (06:25 +0000)]
net:phy:marvell: remove unnecessary code

Compile tested.
remove unnecessary code that matches this coccinelle pattern

ret = phy_write(x, y , z)
if (ret < 0)
        return ret;
return 0;

As phy_write returns error code, we dont need to do not need extra check
before returning.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet:phy:davicom: remove unnecessary code
Srinivas Kandagatla [Mon, 2 Apr 2012 06:25:11 +0000 (06:25 +0000)]
net:phy:davicom: remove unnecessary code

Compile tested.
remove unnecessary code that matches this coccinelle pattern

ret = phy_write(x, y , z)
if (ret < 0)
return ret;
return 0;

As phy_write returns error code, we dont need to do not need extra check
before returning.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet:phy:bcm63xx: remove unnecessary code
Srinivas Kandagatla [Mon, 2 Apr 2012 06:24:55 +0000 (06:24 +0000)]
net:phy:bcm63xx: remove unnecessary code

Compile tested.
remove unnecessary code that matches this coccinelle pattern

ret = phy_write(x, y , z)
if (ret < 0)
return ret;
return 0;

As phy_write returns error code, we dont need to do not need extra check
before returning.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoppp: use for_each_set_bit_from
Akinobu Mita [Mon, 2 Apr 2012 22:47:16 +0000 (22:47 +0000)]
ppp: use for_each_set_bit_from

Use for_each_set_bit_from to iterate over all the set bit in a memory
region.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Dmitry Kozlov <xeb@mail.ru>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofilter: add XOR operation
Jiri Pirko [Sat, 31 Mar 2012 11:01:20 +0000 (11:01 +0000)]
filter: add XOR operation

Add XOR instruction fo BPF machine. Needed for computing packet hashes.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofilter: Allow to create sk-unattached filters
Jiri Pirko [Sat, 31 Mar 2012 11:01:19 +0000 (11:01 +0000)]
filter: Allow to create sk-unattached filters

Today, BPF filters are bind to sockets. Since BPF machine becomes handy
for other purposes, this patch allows to create unattached filter.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovxge: Remove unnecessary ; in do {} while (0) macro
Joe Perches [Tue, 3 Apr 2012 11:53:12 +0000 (11:53 +0000)]
vxge: Remove unnecessary ; in do {} while (0) macro

This macro doesn't need a terminating ; so just remove it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: Add flow control based on hi/low watermark
Haiyang Zhang [Tue, 27 Mar 2012 13:20:45 +0000 (13:20 +0000)]
net/hyperv: Add flow control based on hi/low watermark

In the existing code, we only stop queue when the ringbuffer is full,
so the current packet has to be dropped or retried from upper layer.

This patch stops the tx queue when available ringbuffer is below
the low watermark. So the ringbuffer still has small amount of space
available for the current packet. This will reduce the overhead of
retries on sending.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: fix missing register reset on error path in sky2_test_msi()
Lino Sanfilippo [Fri, 30 Mar 2012 07:36:16 +0000 (07:36 +0000)]
sky2: fix missing register reset on error path in sky2_test_msi()

In sky2_test_msi() the temporarily set SW IRQ in B0 register is not reset in case
that request_irq() fails.
With this patch we only set the interrupt mask if request_irq() was successful.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoaf_unix: reduce high order page allocations
Eric Dumazet [Tue, 3 Apr 2012 05:28:28 +0000 (05:28 +0000)]
af_unix: reduce high order page allocations

unix_dgram_sendmsg() currently builds linear skbs, and this can stress
page allocator with high order page allocations. When memory gets
fragmented, this can eventually fail.

We can try to use order-2 allocations for skb head (SKB_MAX_ALLOC) plus
up to 16 page fragments to lower pressure on buddy allocator.

This patch has no effect on messages of less than 16064 bytes.
(on 64bit arches with PAGE_SIZE=4096)

For bigger messages (from 16065 to 81600 bytes), this patch brings
reliability at the expense of performance penalty because of extra pages
allocations.

netperf -t DG_STREAM -T 0,2 -- -m 16064 -s 200000
->4086040 Messages / 10s

netperf -t DG_STREAM -T 0,2 -- -m 16068 -s 200000
->3901747 Messages / 10s

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Report dev->promiscuity in netlink reports.
Ben Greear [Thu, 29 Mar 2012 12:51:30 +0000 (12:51 +0000)]
net: Report dev->promiscuity in netlink reports.

The standard ways of probing a device's promiscuity
(ifi_flags, for instance) does not report the actual
state of the device.  This patch adds dev->promiscuity
to the netlink netdevice report so that users can know
for certain if the device is acting PROMISC or not.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: remove unused icmp_ioctl() definition.
Rami Rosen [Thu, 29 Mar 2012 08:49:01 +0000 (08:49 +0000)]
net: remove unused icmp_ioctl() definition.

The patch removes unused icmp_ioctl() method definition in
include/net/icmp.h.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/addrconf.c: Checkpatch cleanups
Eldad Zack [Sun, 1 Apr 2012 07:49:08 +0000 (07:49 +0000)]
net/ipv6/addrconf.c: Checkpatch cleanups

net/ipv6/addrconf.c:340: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
net/ipv6/addrconf.c:342: ERROR: "foo * bar" should be "foo *bar"
net/ipv6/addrconf.c:444: ERROR: "foo * bar" should be "foo *bar"
net/ipv6/addrconf.c:1337: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
net/ipv6/addrconf.c:1526: ERROR: "(foo*)" should be "(foo *)"
net/ipv6/addrconf.c:1671: ERROR: open brace '{' following function declarations go on the next line
net/ipv6/addrconf.c:1914: ERROR: "foo * bar" should be "foo *bar"
net/ipv6/addrconf.c:2368: ERROR: "foo * bar" should be "foo *bar"
net/ipv6/addrconf.c:2370: ERROR: "foo * bar" should be "foo *bar"
net/ipv6/addrconf.c:2416: ERROR: "foo * bar" should be "foo *bar"
net/ipv6/addrconf.c:2437: ERROR: "foo    * bar" should be "foo    *bar"
net/ipv6/addrconf.c:2573: ERROR: "foo * bar" should be "foo *bar"
net/ipv6/addrconf.c:3797: ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/icmp.c: Checkpatch cleanups
Eldad Zack [Sun, 1 Apr 2012 07:49:07 +0000 (07:49 +0000)]
net/ipv6/icmp.c: Checkpatch cleanups

icmp.c:501: ERROR: "(foo*)" should be "(foo *)"
icmp.c:582: ERROR: "(foo*)" should be "(foo *)"
icmp.c:954: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/fib6_rules.c: Checkpatch cleanup
Eldad Zack [Sun, 1 Apr 2012 07:49:06 +0000 (07:49 +0000)]
net/ipv6/fib6_rules.c: Checkpatch cleanup

fib6_rules.c:26: ERROR: open brace '{' following struct go on the same line

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/exthdrs_core.c: Checkpatch cleanups
Eldad Zack [Sun, 1 Apr 2012 07:49:05 +0000 (07:49 +0000)]
net/ipv6/exthdrs_core.c: Checkpatch cleanups

exthdrs_core.c:113: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
exthdrs_core.c:114: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/exthdrs.c: Checkpatch cleanups
Eldad Zack [Sun, 1 Apr 2012 07:49:04 +0000 (07:49 +0000)]
net/ipv6/exthdrs.c: Checkpatch cleanups

exthdrs.c:726: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
exthdrs.c:741: ERROR: "(foo*)" should be "(foo *)"
exthdrs.c:741: ERROR: "(foo*)" should be "(foo *)"
exthdrs.c:744: ERROR: "(foo**)" should be "(foo **)"
exthdrs.c:746: ERROR: "(foo**)" should be "(foo **)"
exthdrs.c:748: ERROR: "(foo**)" should be "(foo **)"
exthdrs.c:750: ERROR: "(foo**)" should be "(foo **)"
exthdrs.c:755: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
exthdrs.c:896: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/datagram.c: Checkpatch cleanups
Eldad Zack [Sun, 1 Apr 2012 07:49:03 +0000 (07:49 +0000)]
net/ipv6/datagram.c: Checkpatch cleanups

datagram.c:101: ERROR: "(foo*)" should be "(foo *)"
datagram.c:521: ERROR: space required before the open parenthesis '('
datagram.c:830: WARNING: braces {} are not necessary for single statement blocks
datagram.c:849: WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/addrconf_core.c: Checkpatch cleanup
Eldad Zack [Sun, 1 Apr 2012 07:49:02 +0000 (07:49 +0000)]
net/ipv6/addrconf_core.c: Checkpatch cleanup

addrconf_core.c:13: ERROR: space required before the open parenthesis '('

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/ipv6/sit.c: Checkpatch cleanup
Eldad Zack [Sun, 1 Apr 2012 07:49:01 +0000 (07:49 +0000)]
net/ipv6/sit.c: Checkpatch cleanup

sit.c:118: ERROR: "foo * bar" should be "foo *bar"
sit.c:694: ERROR: "(foo*)" should be "(foo *)"
sit.c:724: ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: Delete all NLA_PUT*() macros.
David S. Miller [Mon, 2 Apr 2012 01:09:34 +0000 (21:09 -0400)]
netlink: Delete all NLA_PUT*() macros.

They were error prone due to an embedded goto, and the entire tree has
been converted away from using them.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfrm: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 01:04:21 +0000 (21:04 -0400)]
xfrm: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agowl12xx: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 01:03:44 +0000 (21:03 -0400)]
wl12xx: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac80211_hwsim: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 01:03:30 +0000 (21:03 -0400)]
mac80211_hwsim: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoiwlwifi: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 01:03:10 +0000 (21:03 -0400)]
iwlwifi: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoath6kl: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 01:02:53 +0000 (21:02 -0400)]
ath6kl: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovlan: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:50:45 +0000 (20:50 -0400)]
vlan: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobridge: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:49:54 +0000 (20:49 -0400)]
bridge: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:48:13 +0000 (20:48 -0400)]
caif: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogen_stats: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:47:35 +0000 (20:47 -0400)]
gen_stats: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofib_rules: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:47:01 +0000 (20:47 -0400)]
fib_rules: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoieee802154: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:45:25 +0000 (20:45 -0400)]
ieee802154: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: ipv4: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:40:20 +0000 (20:40 -0400)]
netfilter: ipv4: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:39:02 +0000 (20:39 -0400)]
ipv4: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: ipv6: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:28:52 +0000 (20:28 -0400)]
netfilter: ipv6: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:27:33 +0000 (20:27 -0400)]
ipv6: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:25:18 +0000 (20:25 -0400)]
team: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomacvlan: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:23:06 +0000 (20:23 -0400)]
macvlan: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoenic: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:22:22 +0000 (20:22 -0400)]
enic: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocan: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:21:11 +0000 (20:21 -0400)]
can: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinfiniband: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:19:38 +0000 (20:19 -0400)]
infiniband: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocrypto: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:19:05 +0000 (20:19 -0400)]
crypto: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:15:14 +0000 (20:15 -0400)]
decnet: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: Add nla_put_le{16,32,64}() helpers.
David S. Miller [Mon, 2 Apr 2012 00:14:27 +0000 (20:14 -0400)]
netlink: Add nla_put_le{16,32,64}() helpers.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agortnetlink: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:12:00 +0000 (20:12 -0400)]
rtnetlink: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoneighbour: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:06:28 +0000 (20:06 -0400)]
neighbour: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodcbnl: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:03:01 +0000 (20:03 -0400)]
dcbnl: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agol2tp: Stop using NLA_PUT*().
David S. Miller [Sun, 1 Apr 2012 23:59:31 +0000 (19:59 -0400)]
l2tp: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipset: Stop using NLA_PUT*().
David S. Miller [Sun, 1 Apr 2012 23:54:46 +0000 (19:54 -0400)]
ipset: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: Add nla_put_net{16,32,64}() helpers.
David S. Miller [Sun, 1 Apr 2012 23:11:31 +0000 (19:11 -0400)]
netlink: Add nla_put_net{16,32,64}() helpers.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipvs: Stop using NLA_PUT*().
David S. Miller [Sun, 1 Apr 2012 23:03:15 +0000 (19:03 -0400)]
ipvs: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Simon Horman <horms@verge.net.au>
12 years agonf_conntrack_core: Stop using NLA_PUT*().
David S. Miller [Sun, 1 Apr 2012 22:58:28 +0000 (18:58 -0400)]
nf_conntrack_core: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonf_conntrack_netlink: Stop using NLA_PUT*().
David S. Miller [Sun, 1 Apr 2012 22:57:48 +0000 (18:57 -0400)]
nf_conntrack_netlink: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonf_conntrack_proto_dccp: Stop using NLA_PUT*().
David S. Miller [Sun, 1 Apr 2012 22:53:24 +0000 (18:53 -0400)]
nf_conntrack_proto_dccp: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

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