]> Git Repo - linux.git/log
linux.git
10 years agobridge: Fix inabillity to retrieve vlan tags when tx offload is disabled
Toshiaki Makita [Thu, 27 Mar 2014 12:46:55 +0000 (21:46 +0900)]
bridge: Fix inabillity to retrieve vlan tags when tx offload is disabled

Bridge vlan code (br_vlan_get_tag()) assumes that all frames have vlan_tci
if they are tagged, but if vlan tx offload is manually disabled on bridge
device and frames are sent from vlan device on the bridge device, the tags
are embedded in skb->data and they break this assumption.
Extract embedded vlan tags and move them to vlan_tci at ingress.

Signed-off-by: Toshiaki Makita <[email protected]>
Acked-by: Vlad Yasevich <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'mlx4_vxlan'
David S. Miller [Fri, 28 Mar 2014 20:30:05 +0000 (16:30 -0400)]
Merge branch 'mlx4_vxlan'

Or Gerlitz says:

====================
Implement vxlan ndo calls

This short series adds support for the vxlan ndo calls, the udp
port is programmed to the firmware using a new command we introduce
here which is called "config device".
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agonet/mlx4: Implement vxlan ndo calls
Or Gerlitz [Thu, 27 Mar 2014 12:02:04 +0000 (14:02 +0200)]
net/mlx4: Implement vxlan ndo calls

Add implementation for the add/del vxlan port ndo calls, using the
CONFIG_DEV firmware command.

Signed-off-by: Or Gerlitz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agomlx4: Add support for CONFIG_DEV command
Or Gerlitz [Thu, 27 Mar 2014 12:02:03 +0000 (14:02 +0200)]
mlx4: Add support for CONFIG_DEV command

Introduce the CONFIG_DEV firmware command which we will use to
configure the UDP port assumed by the firmware for the VXLAN offloads.

Signed-off-by: Or Gerlitz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet/mlx4: USe one wrapper that returns -EPERM
Or Gerlitz [Thu, 27 Mar 2014 12:02:02 +0000 (14:02 +0200)]
net/mlx4: USe one wrapper that returns -EPERM

When a VF issues a firmware command which is disallowed for them, the PF
rerturns -EPERM from that command wrapper. Move to use one such wrapper
instance, instead of repeating the same code on such commands.

Signed-off-by: Or Gerlitz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agobnx2x: Fix possible memory leak on iov error flow
Yuval Mintz [Thu, 27 Mar 2014 11:46:37 +0000 (13:46 +0200)]
bnx2x: Fix possible memory leak on iov error flow

Commit 2dc33bbc4 "bnx2x: Remove the sriov VFOP mechanism" introduced a possible
memory leak on the error flow during multicast filters configuration.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: Ariel Elior <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agovhost: validate vhost_get_vq_desc return value
Michael S. Tsirkin [Thu, 27 Mar 2014 10:53:37 +0000 (12:53 +0200)]
vhost: validate vhost_get_vq_desc return value

vhost fails to validate negative error code
from vhost_get_vq_desc causing
a crash: we are using -EFAULT which is 0xfffffff2
as vector size, which exceeds the allocated size.

The code in question was introduced in commit
8dd014adfea6f173c1ef6378f7e5e7924866c923
    vhost-net: mergeable buffers support

CVE-2014-0055

Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agovhost: fix total length when packets are too short
Michael S. Tsirkin [Thu, 27 Mar 2014 10:00:26 +0000 (12:00 +0200)]
vhost: fix total length when packets are too short

When mergeable buffers are disabled, and the
incoming packet is too large for the rx buffer,
get_rx_bufs returns success.

This was intentional in order for make recvmsg
truncate the packet and then handle_rx would
detect err != sock_len and drop it.

Unfortunately we pass the original sock_len to
recvmsg - which means we use parts of iov not fully
validated.

Fix this up by detecting this overrun and doing packet drop
immediately.

CVE-2014-0077

Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agorandom32: avoid attempt to late reseed if in the middle of seeding
Sasha Levin [Fri, 28 Mar 2014 16:38:42 +0000 (17:38 +0100)]
random32: avoid attempt to late reseed if in the middle of seeding

Commit 4af712e8df ("random32: add prandom_reseed_late() and call when
nonblocking pool becomes initialized") has added a late reseed stage
that happens as soon as the nonblocking pool is marked as initialized.

This fails in the case that the nonblocking pool gets initialized
during __prandom_reseed()'s call to get_random_bytes(). In that case
we'd double back into __prandom_reseed() in an attempt to do a late
reseed - deadlocking on 'lock' early on in the boot process.

Instead, just avoid even waiting to do a reseed if a reseed is already
occuring.

Fixes: 4af712e8df99 ("random32: add prandom_reseed_late() and call when nonblocking pool becomes initialized")
Signed-off-by: Sasha Levin <[email protected]>
Acked-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 28 Mar 2014 20:03:00 +0000 (13:03 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input subsystem fixes from Dmitry Torokhov:
 "Updates to Synaptics touchpad to better cope with devices in Lenovo
  laptops, and a couple more fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: synaptics - add manual min/max quirk for ThinkPad X240
  Input: synaptics - add manual min/max quirk
  Input: cypress_ps2 - don't report as a button pads
  Input: da9052_onkey - use correct register bit for key status
  Input: adp5588-keys - get value from data out when dir is out

10 years agorandom32: assign to network folks in MAINTAINERS
Sasha Levin [Thu, 27 Mar 2014 06:01:34 +0000 (02:01 -0400)]
random32: assign to network folks in MAINTAINERS

lib/random32.c was split out of the network code and is de-facto
still maintained by the almighty net/ gods.

Make it a bit more official so that people who aren't aware of
that know where to send their patches.

Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agosh_eth: ensure pm_runtime cannot suspend the device during init
Ben Dooks [Fri, 21 Mar 2014 11:09:14 +0000 (12:09 +0100)]
sh_eth: ensure pm_runtime cannot suspend the device during init

The pm_rumtime work queue is causing the device to be suspended during
initialisation, thus the initialisation may not be able to access registers
properly. As the code is called from a work queue, it is possible that this
is not seen from certain configurations/builds due to the asynchronos
nature of the code.

Another issue has also been found where the network device registration
calls back into the driver thus causing further pm_runtime calls that
also caused issues with the MDIO bus code. This has now been checked
and is the only place the MDIO can be called without the device open.

Use pm_runtime_get_sync() and pm_runtime_put() to ensure that the
pm system does not suspend it during the probe() call and remove the
now unnecessary pm_runtime_resume() call. Also add a call in the error
path to call pm_runtime_disable().

This fixes the external abort that can cause /sbin/init or other such
init processed to die.

Signed-off-by: Ben Dooks <[email protected]>
Tested-by: Geert Uytterhoeven <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: stmmac: Add SOCFPGA glue driver
Dinh Nguyen [Thu, 27 Mar 2014 03:45:10 +0000 (22:45 -0500)]
net: stmmac: Add SOCFPGA glue driver

Like the STi and sunxi series SOCs, Altera's SOCFPGA also needs a glue layer
on top of the Synopsys gmac IP.

This patch adds the platform driver for the glue layer which configures the IP
before the generic STMMAC driver takes over.

Signed-off-by: Dinh Nguyen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoRDMA/cxgb4: set error code on kmalloc() failure
Yann Droneaud [Fri, 28 Mar 2014 18:55:21 +0000 (14:55 -0400)]
RDMA/cxgb4: set error code on kmalloc() failure

If kmalloc() fails in c4iw_alloc_ucontext(), the function
leaves but does not set an error code in ret variable:
it will return 0 to the caller.

This patch set ret to -ENOMEM in such case.

Cc: Steve Wise <[email protected]>
Cc: Steve Wise <[email protected]>
Signed-off-by: Yann Droneaud <[email protected]>
Acked-by: Steve Wise <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'tipc-next'
David S. Miller [Fri, 28 Mar 2014 18:46:34 +0000 (14:46 -0400)]
Merge branch 'tipc-next'

Erik Hugne says:

====================
tipc: fix handling of NETDEV_CHANGEADDR event

Aside from manual reconfiguration of the netdevice hwaddr, this can also
be changed automatically for an interface bond in active-backup mode
if fail_over_mac is enabled. This patchset fixes the handling of this
event in TIPC by properly updating the l2 media address for the bearer,
followed by a reinitialization of the node discovery mechanism.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agotipc: make discovery domain a bearer attribute
Erik Hugne [Fri, 28 Mar 2014 09:32:09 +0000 (10:32 +0100)]
tipc: make discovery domain a bearer attribute

The node discovery domain is assigned when a bearer is enabled.
In the previous commit we reflect this attribute directly in the
bearer structure since it's needed to reinitialize the node
discovery mechanism after a hardware address change.

There's no need to replicate this attribute anywhere else, so we
remove it from the tipc_link_req structure.

Signed-off-by: Erik Hugne <[email protected]>
Reviewed-by: Ying Xue <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agotipc: fix neighbor detection problem after hw address change
Erik Hugne [Fri, 28 Mar 2014 09:32:08 +0000 (10:32 +0100)]
tipc: fix neighbor detection problem after hw address change

If the hardware address of a underlying netdevice is changed, it is
not enough to simply reset the bearer/links over this device. We
also need to reflect this change in the TIPC bearer and node
discovery structures aswell.

This patch adds the necessary reinitialization of the node disovery
mechanism following a hardware address change so that the correct
originating media address is advertised in the discovery messages.

Signed-off-by: Erik Hugne <[email protected]>
Reported-by: Dong Liu <[email protected]>
Reviewed-by: Ying Xue <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Fri, 28 Mar 2014 18:44:06 +0000 (14:44 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

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

This series contains updates to e1000e, igb, i40e and i40evf

Anjali provides i40e fix to remove the ATR filter on RST as well as FIN
packets.  Cleans up add_del_fdir() because it was used and implemented
only for the add, so change the name and drop a parameter.  Adds the
ability to drop a flow if we wanted to and adds a flow director
message level to be used for flow director specific messages.

Mitch fixes an issue on i40evf where the Tx watchdog handler was causing
an oops when sending an admin queue message to request a reset because
the admin queue functions use spinlocks.

Greg provides a change to i40e to make the alloc and free queue vector
calls orthogonal.

Shannon fixes i40e to verify the eeprom checksum and firmware CRC status
bits, and shutdown the driver if they fail.  This change stops the
processing of traffic, but does not kill the PF netdev so that the
NVMUpdate process still has a chance at fixing the image.  Also provides
a fix to make sure the VSI has a netdev before trying to use it in
the debugfs netdev_ops commands.

Jakub Kicinski provides patches for e1000e and igb to fix a number issues
found in the PTP code.

v2:
- drop patch 11 "i40e: Add a fallback debug flow for the driver" from the
  series based on feedback from David Miller
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agonet: sxgbe: fix potential null dereference
Byungho An [Fri, 28 Mar 2014 17:57:44 +0000 (10:57 -0700)]
net: sxgbe: fix potential null dereference

This fixes following:

drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:1828 sxgbe_hw_init()
error: potential null dereference 'priv->hw'.  (kmalloc returns null)

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Byungho An <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: sxgbe: fix sparse warnings about static declaration
Byungho An [Fri, 28 Mar 2014 17:57:36 +0000 (10:57 -0700)]
net: sxgbe: fix sparse warnings about static declaration

This fixes followings:

sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:197:5:
sparse: symbol 'sxgbe_platform_freeze' was not declared. Should it be static?
>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:204:5:
sparse: symbol 'sxgbe_platform_restore' was not declared. Should it be static?
>> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:228:24:
sparse: symbol 'sxgbe_platform_driver' was not declared. Should it be static?

>> drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:1795:6:
sparse: symbol 'sxgbe_get_ops' was not declared. Should it be static?

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Byungho An <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'be2net-next'
David S. Miller [Fri, 28 Mar 2014 18:25:02 +0000 (14:25 -0400)]
Merge branch 'be2net-next'

Sathya Perla says:

====================
be2net: add vxlan offload support

The first patch adds the FW cmds needed to configure the Skyhawk-R
chip for supporting VxLAN offloads. The second patch implements the
ndo_add/del_vxlan_port() methods and the plumbing for supporting
RX/TX csum, TSO and RSS steering offloads for VxLAN traffic.

v2 changes:
NETIF_F_SG need not be set for hw_enc_features by the driver as it is
done by the stack.

v3 changes:
* Defer FW cmds needed for VxLAN offloads to a workqueue
* Reset FW to VxLAN offloads disabled state in the unload path

v4 changes:
* Revert the usage of workqueue (introduced in v3) to implement
ndo_add/del_vxlan_port() as it is currently not needed (none of the
FW cmd calls sleep.) Suggested by David M.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agobe2net: csum, tso and rss steering offload support for VxLAN
Sathya Perla [Thu, 27 Mar 2014 05:16:19 +0000 (10:46 +0530)]
be2net: csum, tso and rss steering offload support for VxLAN

This patch mainly implements the add/del_vxlan_port() methods by invoking
the needed FW cmds for supporting VxLAN offloads for Skyhawk-R.

Signed-off-by: Sathya Perla <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agobe2net: add FW cmds needed for VxLAN offloads
Sathya Perla [Thu, 27 Mar 2014 05:16:18 +0000 (10:46 +0530)]
be2net: add FW cmds needed for VxLAN offloads

This patch adds support for the FW cmds needed for VxLAN offloads
on Skyhawk-R:
1) The VxLAN UDP port needs to be configured via the port-desc of
   SET_PROFILE_CONFIG_v1 cmd.
   This patch re-factors the be_set_profile_config() code (used so far
   only for setting VF QoS) to be used to set any type of descriptor.
2) The MANAGE_IFACE_FILTERS cmds is needed to convert a normal interface
   into a tunnel interface. This allows for RSS to work even on the inner
   TCP/UDP headers of VxLAN traffic.

Signed-off-by: Sathya Perla <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 28 Mar 2014 17:58:10 +0000 (10:58 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "I didn't want these to wait for stable cycle.

  The nouveau and radeon ones are the same problem, where the runtime pm
  stuff broke non-runtime pm managed secondary GPUs.

  The udl fix is for an oops on unplug, and the i915 fix is for a
  regression on Sandybridge even though it may break haswell (regression
  wins)"

Daniel Vetter comments:
 "My apologies for the i915 regression fumble, that thing somehow fell
  through the cracks here for almost half a year :( Imo that's more than
  enough flailing to just go ahead with the revert, and the re-broken
  hsw should get peoples attention ..."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: Undo gtt scratch pte unmapping again
  drm/radeon: fix runtime suspend breaking secondary GPUs
  drm/nouveau: fail runtime pm properly.
  drm/udl: take reference to device struct for dma-bufs

10 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 28 Mar 2014 17:55:44 +0000 (10:55 -0700)]
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c build fix from Wolfram Sang:
 "The build fix from my last request unveiled another build problem
  which is fixed with this patch"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: cpm: Fix build by adding of_address.h and of_irq.h

10 years agoMerge tag 'stable/for-linus-3.14-rc8-tag' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Fri, 28 Mar 2014 17:52:05 +0000 (10:52 -0700)]
Merge tag 'stable/for-linus-3.14-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull Xen bugfixes from David Vrabel:
 "Fix two bugs that cause x86 PV guest crashes.

  1. Ballooning a 32-bit guest would eventually crash it.

  2. Revert a broken fix for a regression with NUMA_BALACING.  The bad
     fix caused PV guests to crash after migration.  This is not ideal
     but unpicking the madness that is _PAGE_NUMA == _PAGE_PROTNONE will
     take a while longer"

* tag 'stable/for-linus-3.14-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  Revert "xen: properly account for _PAGE_NUMA during xen pte translations"
  xen/balloon: flush persistent kmaps in correct position

10 years agoInput: synaptics - add manual min/max quirk for ThinkPad X240
Hans de Goede [Fri, 28 Mar 2014 08:01:38 +0000 (01:01 -0700)]
Input: synaptics - add manual min/max quirk for ThinkPad X240

This extends Benjamin Tissoires manual min/max quirk table with support for
the ThinkPad X240.

Cc: [email protected]
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
10 years agoInput: synaptics - add manual min/max quirk
Benjamin Tissoires [Fri, 28 Mar 2014 07:43:00 +0000 (00:43 -0700)]
Input: synaptics - add manual min/max quirk

The new Lenovo Haswell series (-40's) contains a new Synaptics touchpad.
However, these new Synaptics devices report bad axis ranges.
Under Windows, it is not a problem because the Windows driver uses RMI4
over SMBus to talk to the device. Under Linux, we are using the PS/2
fallback interface and it occurs the reported ranges are wrong.

Of course, it would be too easy to have only one range for the whole
series, each touchpad seems to be calibrated in a different way.

We can not use SMBus to get the actual range because I suspect the firmware
will switch into the SMBus mode and stop talking through PS/2 (this is the
case for hybrid HID over I2C / PS/2 Synaptics touchpads).

So as a temporary solution (until RMI4 land into upstream), start a new
list of quirks with the min/max manually set.

Signed-off-by: Benjamin Tissoires <[email protected]>
CC: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
10 years agoigb: fix race conditions on queuing skb for HW time stamp
Jakub Kicinski [Sat, 15 Mar 2014 14:55:32 +0000 (14:55 +0000)]
igb: fix race conditions on queuing skb for HW time stamp

igb has a single set of TX time stamping resources per NIC.
Use a simple bit lock to avoid race conditions and leaking skbs
when multiple TX rings try to claim time stamping.

Signed-off-by: Jakub Kicinski <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoigb: never generate both software and hardware timestamps
Jakub Kicinski [Sat, 15 Mar 2014 14:55:26 +0000 (14:55 +0000)]
igb: never generate both software and hardware timestamps

skb_tx_timestamp() does not report software time stamp
if SKBTX_IN_PROGRESS is set. According to timestamping.txt
software time stamps are a fallback and should not be
generated if hardware time stamp is provided.

Move call to skb_tx_timestamp() after setting
SKBTX_IN_PROGRESS.

Signed-off-by: Jakub Kicinski <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoe1000e: remove redundant if clause from PTP work
Jakub Kicinski [Sat, 15 Mar 2014 14:55:05 +0000 (14:55 +0000)]
e1000e: remove redundant if clause from PTP work

tx_hwtstamp_skb is always set before work is scheduled,
work is cancelled before tx_hwtstamp_skb is set to NULL.
PTP work cannot ever see tx_hwtstamp_skb set to NULL.

Signed-off-by: Jakub Kicinski <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoe1000e: add timeout for TX HW time stamping work
Jakub Kicinski [Sat, 15 Mar 2014 14:55:00 +0000 (14:55 +0000)]
e1000e: add timeout for TX HW time stamping work

Hardware may fail to report time stamp e.g.:
 - when hardware time stamping is not enabled
 - when time stamp is requested shortly after ifup

Timeout time stamp reading work to prevent it from
scheduling itself indefinitely. Report timeout events
via system log and device stats.

Signed-off-by: Jakub Kicinski <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e: Use DEBUG_FD message level for an FD message
Anjali Singhai Jain [Thu, 6 Mar 2014 09:00:04 +0000 (09:00 +0000)]
i40e: Use DEBUG_FD message level for an FD message

We don't need to print this info unless at FD message level.

Change-ID: I329efdd8e754a0ea0669ec04d12e03db02e6b76e
Signed-off-by: Anjali Singhai Jain <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e/i40evf: Add an FD message level
Anjali Singhai Jain [Thu, 6 Mar 2014 09:00:03 +0000 (09:00 +0000)]
i40e/i40evf: Add an FD message level

To use for Flow Director specific messages.

Change-ID: I69e39a410aa2661f8fd1ed6af0126fa4c335cb77
Signed-off-by: Anjali Singhai Jain <[email protected]>
Acked-by: Shannon Nelson <[email protected]>
Acked-by: Kevin Scott <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e: check for netdev before debugfs use
Shannon Nelson [Thu, 6 Mar 2014 09:00:02 +0000 (09:00 +0000)]
i40e: check for netdev before debugfs use

Make sure the VSI has a netdev before trying to use it
in the debugfs netdev_ops commands.

Change-ID: I2d744fc0c32b3226534ce2cde171d9675c5440a6
Signed-off-by: Shannon Nelson <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40evf: remove double space after return
Jesse Brandeburg [Thu, 6 Mar 2014 09:00:01 +0000 (09:00 +0000)]
i40evf: remove double space after return

There were two spaces between return and the value, we only need one.

Change-ID: Iaa42c33f50d8d149cdf1a4c9c1902295bfd991c4
Signed-off-by: Jesse Brandeburg <[email protected]>
Acked-by: Shannon Nelson <[email protected]>
Signed-off-by: Kevin Scott <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e: Add functionality for FD SB to drop packets
Anjali Singhai Jain [Thu, 6 Mar 2014 09:00:00 +0000 (09:00 +0000)]
i40e: Add functionality for FD SB to drop packets

With this change we can drop a flow if we wanted to.

Change-ID: I222b1ae960e61a31965bafe3159a95099e70c7d2
Signed-off-by: Anjali Singhai Jain <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e: Cleanup in FDIR SB ethtool code
Anjali Singhai Jain [Thu, 6 Mar 2014 08:59:59 +0000 (08:59 +0000)]
i40e: Cleanup in FDIR SB ethtool code

Function add_del_fdir was used and implemented only for add. So change the name
and drop a parameter.

Change-ID: Icf2c6c3bbd4fd00cf8d9613a3f6d8c08e0f8e288
Signed-off-by: Anjali Singhai Jain <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e: eeprom integrity check on load and empr
Shannon Nelson [Thu, 6 Mar 2014 08:59:58 +0000 (08:59 +0000)]
i40e: eeprom integrity check on load and empr

The driver needs to verify the eeprom checksum and firmware crc status bits,
and shutdown the driver if they fail. This code stops the processing of traffic,
but doesn't kill the PF netdev so that the NVMUpdate process should still have a
chance at fixing the image. The eeprom is checked on driver load and after an
EMP reset, the latter of which should be generated after an NVMUpdate.

Change-ID: I34deef21d2e16bf5a43c603cf8af27e6a29dc9d2
Signed-off-by: Shannon Nelson <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e: Make the alloc and free queue vector calls orthogonal
Greg Rose [Thu, 6 Mar 2014 08:59:57 +0000 (08:59 +0000)]
i40e: Make the alloc and free queue vector calls orthogonal

It's annoying to search for a matching alloc and free set of function calls
when they don't use the same framework for the name of the functions.  Fix
that up in the case of alloc and free of vsi queue vectors.

i40e_vsi_free_q*
i40e_vsi_alloc_q*

Change-ID: I510eb863a0fbe405312bebea55c2846c76285e6d
Signed-off-by: Greg Rose <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40evf: fix oops in watchdog handler
Mitch Williams [Thu, 6 Mar 2014 08:59:56 +0000 (08:59 +0000)]
i40evf: fix oops in watchdog handler

The Tx watchdog handler runs in interrupt context, so it would cause an
oops when sending an admin queue message to request a reset, because the
admin queue functions use spinlocks.

Instead, set a flag and let the reset task handle sending the request.

Change-ID: I65879470b72963d9c308edfb8f45ac4fbba2c14f
Signed-off-by: Mitch Williams <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Sibai Li <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoi40e: Delete ATR filter on RST
Anjali Singhai Jain [Thu, 6 Mar 2014 08:59:54 +0000 (08:59 +0000)]
i40e: Delete ATR filter on RST

We currently delete ATR filter on FIN alone, delete on RST as well.

Change-ID: Ie7cae5d1046b9d1d4a0d6ef5bdbf41224c3dade6
Signed-off-by: Anjali Singhai Jain <[email protected]>
Signed-off-by: Catherine Sullivan <[email protected]>
Tested-by: Kavindya Deegala <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
10 years agoMerge branch 'mdio_reset-next'
David S. Miller [Fri, 28 Mar 2014 05:38:10 +0000 (01:38 -0400)]
Merge branch 'mdio_reset-next'

Florian Fainelli says:

====================
net: remove empty MDIO bus reset functions

This patchset removes all empty MDIO bus reset functions that we have in the
tree (hopefully all of them). This function is optional for the MDIO bus code in
drivers/net/phy/mdio_bus.c::mdiobus_register, the documentation is updated to
reflect that.

Having less call sites to update will allow us to implement a generic BMCR_RESET
based PHY reset for MDIO buses that require to reset their PHYs before their
PHY detection succeeds (e.g: HiSilicon hip04 current submission) and provide it
as a helper.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agoDocumentation: networking: phy.txt: MDIO bus reset is optional
Florian Fainelli [Thu, 27 Mar 2014 01:07:26 +0000 (18:07 -0700)]
Documentation: networking: phy.txt: MDIO bus reset is optional

Update the MDIO bus documentation to mention that the MDIO bus reset
function is completely optional. It became optional with commit
e13934563db0 ("[PATCH] PHY Layer fixup")

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agobfin_mac: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:25 +0000 (18:07 -0700)]
bfin_mac: remove empty MDIO bus reset function

bfin_mdiobus_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agor6040: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:24 +0000 (18:07 -0700)]
r6040: remove empty MDIO bus reset function

r6040_mdiobus_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: ftgmac100: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:23 +0000 (18:07 -0700)]
net: ftgmac100: remove empty MDIO bus reset function

ftgmac100_mdiobus_reset() does nothing useful and is optional for the
MDIO bus code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: sun4i: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:22 +0000 (18:07 -0700)]
net: sun4i: remove empty MDIO bus reset function

sun4i_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: emaclite: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:21 +0000 (18:07 -0700)]
net: emaclite: remove empty MDIO bus reset function

xemaclite_mdio_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: mvmdio: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:20 +0000 (18:07 -0700)]
net: mvmdio: remove empty MDIO bus reset function

orion_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agofs_enet: remove empty MDIO bus function
Florian Fainelli [Thu, 27 Mar 2014 01:07:19 +0000 (18:07 -0700)]
fs_enet: remove empty MDIO bus function

fs_enet_fec_mii_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agofec: remove empty MDIO bus function
Florian Fainelli [Thu, 27 Mar 2014 01:07:18 +0000 (18:07 -0700)]
fec: remove empty MDIO bus function

fec_enet_mdio_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: ethoc: remove empty MDIO bus function
Florian Fainelli [Thu, 27 Mar 2014 01:07:17 +0000 (18:07 -0700)]
net: ethoc: remove empty MDIO bus function

ethoc_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agodnet: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:16 +0000 (18:07 -0700)]
dnet: remove empty MDIO bus reset function

dnet_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agomacb: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:15 +0000 (18:07 -0700)]
macb: remove empty MDIO bus reset function

macb_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agotg3: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:14 +0000 (18:07 -0700)]
tg3: remove empty MDIO bus reset function

tg3_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: greth: remove empty MDIO bus reset function
Florian Fainelli [Thu, 27 Mar 2014 01:07:13 +0000 (18:07 -0700)]
net: greth: remove empty MDIO bus reset function

greth_mdio_reset() does nothing useful and this function is optional for
the MDIO bus code, so let's just remove it.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agodrm/i915: Undo gtt scratch pte unmapping again
Daniel Vetter [Wed, 26 Mar 2014 19:10:09 +0000 (20:10 +0100)]
drm/i915: Undo gtt scratch pte unmapping again

It apparently blows up on some machines. This functionally reverts

commit 828c79087cec61eaf4c76bb32c222fbe35ac3930
Author: Ben Widawsky <[email protected]>
Date:   Wed Oct 16 09:21:30 2013 -0700

    drm/i915: Disable GGTT PTEs on GEN6+ suspend

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64841
Reported-and-Tested-by: Brad Jackson <[email protected]>
Cc: [email protected]
Cc: Takashi Iwai <[email protected]>
Cc: Paulo Zanoni <[email protected]>
Cc: Todd Previte <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
10 years agodrm/radeon: fix runtime suspend breaking secondary GPUs
Dave Airlie [Thu, 27 Mar 2014 02:31:08 +0000 (02:31 +0000)]
drm/radeon: fix runtime suspend breaking secondary GPUs

Same fix as for nouveau, when we fail with EINVAL, subsequent
gets fail hard, causing the device not to open.

Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
10 years agonet: bcmgenet: set RBUF_SKIP_FCS based on UniMAC CRC forwarding
Florian Fainelli [Thu, 27 Mar 2014 04:18:39 +0000 (21:18 -0700)]
net: bcmgenet: set RBUF_SKIP_FCS based on UniMAC CRC forwarding

When the UniMAC block is configured to forward the CRC as part of the
Ethernet frame (priv->crc_fwd_en, set by default), enabling the hardware
RX checksum block unveiled that the dma_rxchk_bit was never set in the
per-packet status bits (dma_flag in bcmgenet_desc_rx). This would make
the chksum_ok variable to be never set to 1, and the networking stack
would have to compute the packet checksums, which takes a substantial
amount of time.

In order for the RXCHK block to properly compute the packet checksum in
hardware, we also need to set the RBUF_SKIP_FCS bit accordingly.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet/mlx4_core: pass pci_device_id.driver_data to __mlx4_init_one during reset
Wei Yang [Thu, 27 Mar 2014 01:28:31 +0000 (09:28 +0800)]
net/mlx4_core: pass pci_device_id.driver_data to __mlx4_init_one during reset

The second parameter of __mlx4_init_one() is used to identify whether the
pci_dev is a PF or VF. Currently, when it is invoked in mlx4_pci_slot_reset()
this information is missed.

This patch match the pci_dev with mlx4_pci_table and passes the
pci_device_id.driver_data to __mlx4_init_one() in mlx4_pci_slot_reset().

Signed-off-by: Wei Yang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agocore, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
Zoltan Kiss [Wed, 26 Mar 2014 22:37:45 +0000 (22:37 +0000)]
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the callers so they will signal the failed delivery towards the creator of the
skb.

Signed-off-by: Zoltan Kiss <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoyam: replace del_timer by del_timer_sync
Julia Lawall [Wed, 26 Mar 2014 21:33:45 +0000 (22:33 +0100)]
yam: replace del_timer by del_timer_sync

Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exists.

This change was suggested by Thomas Gleixner

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
declarer name module_exit;
identifier ex;
@@

module_exit(ex);

@@
identifier r.ex;
@@

ex(...) {
  <...
- del_timer
+ del_timer_sync
    (...)
  ...>
}
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agohsr: replace del_timer by del_timer_sync
Julia Lawall [Wed, 26 Mar 2014 21:33:44 +0000 (22:33 +0100)]
hsr: replace del_timer by del_timer_sync

Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exists.

This change was suggested by Thomas Gleixner.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
declarer name module_exit;
identifier ex;
@@

module_exit(ex);

@@
identifier r.ex;
@@

ex(...) {
  <...
- del_timer
+ del_timer_sync
    (...)
  ...>
}
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoatm: replace del_timer by del_timer_sync
Julia Lawall [Wed, 26 Mar 2014 21:33:40 +0000 (22:33 +0100)]
atm: replace del_timer by del_timer_sync

Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exists.

This change was suggested by Thomas Gleixner.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
declarer name module_exit;
identifier ex;
@@

module_exit(ex);

@@
identifier r.ex;
@@

ex(...) {
  <...
- del_timer
+ del_timer_sync
    (...)
  ...>
}
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoisdn: replace del_timer by del_timer_sync
Julia Lawall [Wed, 26 Mar 2014 21:33:39 +0000 (22:33 +0100)]
isdn: replace del_timer by del_timer_sync

Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exists.

This change was suggested by Thomas Gleixner.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
declarer name module_exit;
identifier ex;
@@

module_exit(ex);

@@
identifier r.ex;
@@

ex(...) {
  <...
- del_timer
+ del_timer_sync
    (...)
  ...>
}
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agotcp: tcp_make_synack() minor changes
Eric Dumazet [Wed, 26 Mar 2014 16:57:19 +0000 (09:57 -0700)]
tcp: tcp_make_synack() minor changes

There is no need to allocate 15 bytes in excess for a SYNACK packet,
as it contains no data, only headers.

SYNACK are always generated in softirq context, and contain a single
segment, we can use TCP_INC_STATS_BH()

Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoipv6: do not overwrite inetpeer metrics prematurely
Michal Kubeček [Thu, 27 Mar 2014 12:04:08 +0000 (13:04 +0100)]
ipv6: do not overwrite inetpeer metrics prematurely

If an IPv6 host route with metrics exists, an attempt to add a
new route for the same target with different metrics fails but
rewrites the metrics anyway:

12sp0:~ # ip route add fec0::1 dev eth0 rto_min 1000
12sp0:~ # ip -6 route show
fe80::/64 dev eth0  proto kernel  metric 256
fec0::1 dev eth0  metric 1024  rto_min lock 1s
12sp0:~ # ip route add fec0::1 dev eth0 rto_min 1500
RTNETLINK answers: File exists
12sp0:~ # ip -6 route show
fe80::/64 dev eth0  proto kernel  metric 256
fec0::1 dev eth0  metric 1024  rto_min lock 1.5s

This is caused by all IPv6 host routes using the metrics in
their inetpeer (or the shared default). This also holds for the
new route created in ip6_route_add() which shares the metrics
with the already existing route and thus ip6_route_add()
rewrites the metrics even if the new route ends up not being
used at all.

Another problem is that old metrics in inetpeer can reappear
unexpectedly for a new route, e.g.

12sp0:~ # ip route add fec0::1 dev eth0 rto_min 1000
12sp0:~ # ip route del fec0::1
12sp0:~ # ip route add fec0::1 dev eth0
12sp0:~ # ip route change fec0::1 dev eth0 hoplimit 10
12sp0:~ # ip -6 route show
fe80::/64 dev eth0  proto kernel  metric 256
fec0::1 dev eth0  metric 1024  hoplimit 10 rto_min lock 1s

Resolve the first problem by moving the setting of metrics down
into fib6_add_rt2node() to the point we are sure we are
inserting the new route into the tree. Second problem is
addressed by introducing new flag DST_METRICS_FORCE_OVERWRITE
which is set for a new host route in ip6_route_add() and makes
ipv6_cow_metrics() always overwrite the metrics in inetpeer
(even if they are not "new"); it is reset after that.

v5: use a flag in _metrics member rather than one in flags

v4: fix a typo making a condition always true (thanks to Hannes
Frederic Sowa)

v3: rewritten based on David Miller's idea to move setting the
metrics (and allocation in non-host case) down to the point we
already know the route is to be inserted. Also rebased to
net-next as it is quite late in the cycle.

Signed-off-by: Michal Kubecek <[email protected]>
Acked-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agovlan: Set hard_header_len according to available acceleration
Vlad Yasevich [Wed, 26 Mar 2014 15:47:56 +0000 (11:47 -0400)]
vlan: Set hard_header_len according to available acceleration

Currently, if the card supports CTAG acceleration we do not
account for the vlan header even if we are configuring an
8021AD vlan.  This may not be best since we'll do software
tagging for 8021AD which will cause data copy on skb head expansion
Configure the length based on available hw offload capabilities and
vlan protocol.

CC: Patrick McHardy <[email protected]>
Signed-off-by: Vlad Yasevich <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agousbnet: include wait queue head in device structure
Oliver Neukum [Wed, 26 Mar 2014 13:32:51 +0000 (14:32 +0100)]
usbnet: include wait queue head in device structure

This fixes a race which happens by freeing an object on the stack.
Quoting Julius:
> The issue is
> that it calls usbnet_terminate_urbs() before that, which temporarily
> installs a waitqueue in dev->wait in order to be able to wait on the
> tasklet to run and finish up some queues. The waiting itself looks
> okay, but the access to 'dev->wait' is totally unprotected and can
> race arbitrarily. I think in this case usbnet_bh() managed to succeed
> it's dev->wait check just before usbnet_terminate_urbs() sets it back
> to NULL. The latter then finishes and the waitqueue_t structure on its
> stack gets overwritten by other functions halfway through the
> wake_up() call in usbnet_bh().

The fix is to just not allocate the data structure on the stack.
As dev->wait is abused as a flag it also takes a runtime PM change
to fix this bug.

Signed-off-by: Oliver Neukum <[email protected]>
Reported-by: Grant Grundler <[email protected]>
Tested-by: Grant Grundler <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoptp: Fix compiler warnings in the testptp utility
Christian Riesch [Wed, 26 Mar 2014 07:16:03 +0000 (08:16 +0100)]
ptp: Fix compiler warnings in the testptp utility

Signed-off-by: Christian Riesch <[email protected]>
Cc: Dong Zhu <[email protected]>
Acked-by: Richard Cochran <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoRevert "ptp: Fix compiler warnings in the testptp utility"
David S. Miller [Thu, 27 Mar 2014 18:51:26 +0000 (14:51 -0400)]
Revert "ptp: Fix compiler warnings in the testptp utility"

This reverts commit 203191c386e83b8c5d95bbbaef13baa629512726.

A better version of this fix is forthcoming.

Signed-off-by: David S. Miller <[email protected]>
10 years agobnx2x: Fix compilation when CONFIG_BNX2X_SRIOV is not set
Yuval Mintz [Wed, 26 Mar 2014 07:06:29 +0000 (09:06 +0200)]
bnx2x: Fix compilation when CONFIG_BNX2X_SRIOV is not set

Commit 370d4a26 "bnx2x: Create workqueue for IOV related tasks" breaks bnx2x
compilation when CONFIG_BNX2X_SRIOV is not set - "multiple definition of
`bnx2x_schedule_iov_task'".

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Yuval Mintz <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agortl818x: Update Kconfig for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:04:37 +0000 (21:04 +0100)]
rtl818x: Update Kconfig for rtl8187se

update description in Kconfig to state rtl8180 driver
now supports also rtl8187se cards

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: enable rtl8187se support
Andrea Merello [Wed, 26 Mar 2014 20:04:23 +0000 (21:04 +0100)]
rtl8180: enable rtl8187se support

Finally make rtl8187se works (hopefylly).
This patch adds PCI ID for rtl8187, updates copyright notes and
updates MODULE_DESCRIPTION.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: detect rtl8187se card
Andrea Merello [Wed, 26 Mar 2014 20:04:05 +0000 (21:04 +0100)]
rtl8180: detect rtl8187se card

Add case to detect the rtl8187se card and its RF frontend.
In this case set also accordingly mac80211 queue number.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add WMM parameters configuration for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:03:40 +0000 (21:03 +0100)]
rtl8180: add WMM parameters configuration for rtl8187se

Introduce a new function to configure AC parameters for TX queues
on rtl8187se cards, and hook it onto mac80211 in order to enable
WMM support.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: make sure RTL818X_MSR_ENEDCA is set for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:03:17 +0000 (21:03 +0100)]
rtl8180: make sure RTL818X_MSR_ENEDCA is set for rtl8187se

MSR register for rtl8187se must always have ENEDCA flag set.
Write it accordingly when updated on BSS change.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add ERP configuration for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:03:03 +0000 (21:03 +0100)]
rtl8180: add ERP configuration for rtl8187se

This patch adds ERP configuration support for rtl8187se to the
existing ERP configuration function.
It needs a different register offset and it must not apply
rtl8185 workaround.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add rtl8187se HW initialization
Andrea Merello [Wed, 26 Mar 2014 20:02:46 +0000 (21:02 +0100)]
rtl8180: add rtl8187se HW initialization

This patch adds few functions that initializes extra stuff that
is present only in rtl8187se HW, and it modify the existing
HW initialization function where necessary

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add RF code for rtl8225 zebra v4
Andrea Merello [Wed, 26 Mar 2014 20:02:28 +0000 (21:02 +0100)]
rtl8180: add RF code for rtl8225 zebra v4

This patch introduce new RF code for rtl8225 zebra v4 radio
frontend.

This code contains a lot of black magic and it can work probably
only with the radio embdedded in the rtl8187se single-chip.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: introduce functions for setting ANAPARAM 2 and 3 params
Andrea Merello [Wed, 26 Mar 2014 20:02:05 +0000 (21:02 +0100)]
rtl8180: introduce functions for setting ANAPARAM 2 and 3 params

rtl8180 has one register for analog converters setting ,rtl8185 has
two and rtl8187se has three.
Setting those registers require more than a simple write, and for
one of them a function is already provided.
This patch introduces functions for the other two.
rtl8187se will use them. rtl8185 doesen't yet, but should

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add rtl8187se params to eeprom reading
Andrea Merello [Wed, 26 Mar 2014 20:01:47 +0000 (21:01 +0100)]
rtl8180: add rtl8187se params to eeprom reading

rtl8187se nees extra parameters to be read from the eeprom.
This patch adds support for it

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: config carbus register for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:01:19 +0000 (21:01 +0100)]
rtl8180: config carbus register for rtl8187se

configuration of carbus-related registers is different for
rtl8187se.
Introduce a dedicated function that does it for all cards in the
proper way

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add TX queue mapping and support for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:00:57 +0000 (21:00 +0100)]
rtl8180: add TX queue mapping and support for rtl8187se

This patch adds tx queue mapping for rtl8187se and a long comment
block about their usages.
It adapts the TX function to use that map and it sets properly
the TX descriptor rtl8187se-only fields

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: don't write MAR registers for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:00:42 +0000 (21:00 +0100)]
rtl8180: don't write MAR registers for rtl8187se

MAR registers are not present in rtl8187se, and attempting to
write to them must be avoided

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: introduce functions to enable/disable ints and add support for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:00:24 +0000 (21:00 +0100)]
rtl8180: introduce functions to enable/disable ints and add support for rtl8187se

This patch introduces two dedicated functions for enabling and
disabling ints.
Support for rtl8187se is also added to them

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add ISR for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 20:00:06 +0000 (21:00 +0100)]
rtl8180: add ISR for rtl8187se

rtl8187se has more queues and different ISR flags.
This patch adds a separated ISR handler for rtl8187se

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: support for rtl8187se RX descriptors
Andrea Merello [Wed, 26 Mar 2014 19:59:52 +0000 (20:59 +0100)]
rtl8180: support for rtl8187se RX descriptors

Currently RX status descriptor and RX command descriptor are
represented using the same struct type.
This patch splits this by introducing different types for
rx status and command descriptor.
Doing this make it possible to handle rtl8187se RX descriptors
easier.
This patch do also this by adding specific cases where needed.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add basic rate configuration support for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 19:59:25 +0000 (20:59 +0100)]
rtl8180: add basic rate configuration support for rtl8187se

Basic rate configuration is a bit different for rtl8187se.
Adding this also fixes the gcc warning introduced in last patch
about unhandled case in switch.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add rtl8187se fields to TX descriptor
Andrea Merello [Wed, 26 Mar 2014 19:58:43 +0000 (20:58 +0100)]
rtl8180: add rtl8187se fields to TX descriptor

This patch modifies the TX descriptor struct so it can work also
for rtl8187se.
Some reserved field is now meaningful, and where needed union is
used.

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl8180: add rtl8187se chip type
Andrea Merello [Wed, 26 Mar 2014 19:58:14 +0000 (20:58 +0100)]
rtl8180: add rtl8187se chip type

Add back rtl8187se chip type to the enum for known chips.
This causes unhandled switch/case warning that will be fixed
in following patch

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortl818x: add registers for rtl8187se
Andrea Merello [Wed, 26 Mar 2014 19:57:46 +0000 (20:57 +0100)]
rtl818x: add registers for rtl8187se

Adds registers for rtl8187se to the rtl818x common struct

Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agomwifiex: cancel pending commands during host sleep
Amitkumar Karwar [Wed, 26 Mar 2014 02:01:20 +0000 (19:01 -0700)]
mwifiex: cancel pending commands during host sleep

Sometimes we may end up downloading other commands when host
sleep is configured. This patch makes sure that pending
commands are cancelled and we stop queueing further commands
during host sleep.

Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agomwifiex: correction in sleep confirm command sequence number
Amitkumar Karwar [Wed, 26 Mar 2014 02:01:19 +0000 (19:01 -0700)]
mwifiex: correction in sleep confirm command sequence number

Incremented sequence number was not being used for SLEEP confirm
command. This patch fixes the issue.

Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agomwifiex: corner case NULL pointer dereference fix
Amitkumar Karwar [Wed, 26 Mar 2014 02:01:18 +0000 (19:01 -0700)]
mwifiex: corner case NULL pointer dereference fix

When next scan command is delayed due to Tx traffic and
meanwhile synchronous command is received followed by a signal,
we cance all pending commands. NULL pointer dereference is seen
in this case while queueing next command in scan delay timer.
This patch adds a check to fix this issue.

Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agobrcmfmac: use mfp if required from user-space
Daniel Kim [Tue, 25 Mar 2014 20:45:09 +0000 (21:45 +0100)]
brcmfmac: use mfp if required from user-space

The struct cfg80211_connect_params indicate whether the connection
should use management frame protection (mfp). If required set the
MFP_CAPABLE flag in the firmware command. This is supported from
user-space by wpa_supplicant since v2.1.

Reviewed-by: Daniel (Deognyoun) Kim <[email protected]>
Reviewed-by: Hante Meuleman <[email protected]>
Reviewed-by: Pieter-Paul Giesberts <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agortlwifi: Remove casts of pointer to same type
Joe Perches [Mon, 24 Mar 2014 20:15:40 +0000 (13:15 -0700)]
rtlwifi: Remove casts of pointer to same type

Casting a pointer to a pointer of the same type is pointless,
so remove these unnecessary casts.

Around these changes:

o Remove unnecessary parentheses
o Use consistent dereference style (change ptr[0] to *ptr)
o Argument alignment

Done via coccinelle script: (and some typing)

$ cat typecast_2.cocci
@@
type T;
T *foo;
@@

- (T *)foo
+ foo

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agomwifiex: Remove casts of pointer to same type
Joe Perches [Mon, 24 Mar 2014 20:15:39 +0000 (13:15 -0700)]
mwifiex: Remove casts of pointer to same type

Casting a pointer to a pointer of the same type is pointless,
so remove these unnecessary casts.

Done via coccinelle script:

$ cat typecast_2.cocci
@@
type T;
T *foo;
@@

- (T *)foo
+ foo

Signed-off-by: Joe Perches <[email protected]>
Acked-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
10 years agocarl9170: Remove casts of pointer to same type
Joe Perches [Mon, 24 Mar 2014 20:15:38 +0000 (13:15 -0700)]
carl9170: Remove casts of pointer to same type

Casting a pointer to a pointer of the same type is pointless,
so remove these unnecessary casts.

Done via coccinelle script:

$ cat typecast_2.cocci
@@
type T;
T *foo;
@@

- (T *)foo
+ foo

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
This page took 0.113317 seconds and 4 git commands to generate.