platform/kernel/linux-rpi.git
9 years agonet/ethoc: support big-endian register layout
Max Filippov [Tue, 22 Sep 2015 11:27:16 +0000 (14:27 +0300)]
net/ethoc: support big-endian register layout

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: davinci_emac: Add support for fixed-link PHY
Neil Armstrong [Tue, 22 Sep 2015 08:57:04 +0000 (10:57 +0200)]
net: davinci_emac: Add support for fixed-link PHY

In case the DaVinci Emac is directly connected to a
non-mdio PHY/device, it should be possible to provide
a fixed link configuration in the DT.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoDriver: Vmxnet3: Extend register dump support
Shrikrishna Khare [Tue, 22 Sep 2015 03:01:29 +0000 (20:01 -0700)]
Driver: Vmxnet3: Extend register dump support

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Acked-by: Srividya Murali <smurali@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next...
David S. Miller [Wed, 23 Sep 2015 21:52:02 +0000 (14:52 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/next-queue

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-09-22

This series contains updates to e1000, e1000e, igbvf, ixgbe, ixgbevf and
fm10k.

Jacob provides several updates for fm10k, which cleans up comments and
most notably a fix for a corner case issue with the PF/VF mailbox code.
The issue being fm10k_mbx_reset_work clears various states about the
mailbox, but does not clear the Tx FIFO head/tail pointers.  We also
are not able to simply clear these pointers, as we would drop
untransmitted messages without error.  Also adds support for extra debug
statistics, which provides the ability to see what the PF thinks the
VF mailboxes look like.

Don adds support for SFP+ in X550 and support for SCTP flow director
filters SCTP mask.

Francois Romieu dusts off the e1000 driver and removes some dead calls
to e1000_init_eeprom_params().

Toshiaki Makita provides three patches to enable TSO for stacked VLAN's
on e1000e, igbvf and ixgbevf.

Mark provides the first of several ixgbe updates.  First updates the
driver to accept SFP not present error for all devices, since an SFP
can still be inserted.  Adds support for SFP insertion interrupt on
X550EM devices with SPFs.  Adds I2C combined operations on X550EM
(not X550) devices.  Moved the setting of lan_id to before any I2C
eeprom access.  Lastly, set the bit bang mode in the hardware when
performing bit banding I2C operations on X550.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'bridge_external_fdb_aging'
David S. Miller [Wed, 23 Sep 2015 21:35:59 +0000 (14:35 -0700)]
Merge branch 'bridge_external_fdb_aging'

Scott Feldman says:

====================
bridge: don't age out externally added FDB entries

v3: Per davem review: add del_timer_sync on rocker port remove.

v2: Per Jiri review comment: add BR_DEFAULT_AGEING_TIME to defines

Siva originally proposed skipping externally added FDB entries in the bridge's
FDB garbage collection func, and moving the ageing of externally added entries
to the port driver/device.  This broke rocker, since rocker didn't have a
hardware (or software) mechanism for ageing out its learned FDB entries.

This patchset reintroduces Siva's bridge driver patch to skip externally added
entries and adds support in rocker so rocker can age out its own entries.
Rocker does this using a software timer similar to the bridge's FDB garbage
collection timer.  Other switchdev devices/drivers can use this software timer
method or program the device to nofity aged-out entries to the driver.

Updated switchdev.txt documentation to reflect current state-of-the-art.  This
removes one more XXX todo comment in switchdev.txt.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoswitchdev: update documentation on FDB ageing_time
Scott Feldman [Wed, 23 Sep 2015 15:39:20 +0000 (08:39 -0700)]
switchdev: update documentation on FDB ageing_time

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobridge: don't age externally added FDB entries
Siva Mannem [Wed, 23 Sep 2015 15:39:19 +0000 (08:39 -0700)]
bridge: don't age externally added FDB entries

Signed-off-by: Siva Mannem <siva.mannem.lnx@gmail.com>
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Premkumar Jonnala <pjonnala@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorocker: add FDB cleanup timer
Scott Feldman [Wed, 23 Sep 2015 15:39:18 +0000 (08:39 -0700)]
rocker: add FDB cleanup timer

Add a timer to each rocker switch to do FDB entry cleanup by ageing out
expired entries.  The timer scheduling algo is copied from the bridge
driver, for the most part, to keep the firing of the timer to a minimum.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorocker: adding port ageing_time for ageing out FDB entries
Scott Feldman [Wed, 23 Sep 2015 15:39:17 +0000 (08:39 -0700)]
rocker: adding port ageing_time for ageing out FDB entries

Follow-up patcheset will allow user to change ageing_time, but for now
just hard-code it to a fixed value (the same value used as the default
for the bridge driver).

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobridge: define some min/max/default ageing time constants
Scott Feldman [Wed, 23 Sep 2015 15:39:16 +0000 (08:39 -0700)]
bridge: define some min/max/default ageing time constants

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorocker: store rocker_port in fdb key rather than pport
Scott Feldman [Wed, 23 Sep 2015 15:39:15 +0000 (08:39 -0700)]
rocker: store rocker_port in fdb key rather than pport

We'll need more info from rocker_port than just pport when we age out fdb
entries, so store rocker_port rather than pport in each fdb entry.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorocker: track when FDB entry is touched.
Scott Feldman [Wed, 23 Sep 2015 15:39:14 +0000 (08:39 -0700)]
rocker: track when FDB entry is touched.

The entry is touched once when created, and touched again for each update.
The touched time is used to calculate FDB entry age.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'cls_bpf-next'
David S. Miller [Wed, 23 Sep 2015 21:29:02 +0000 (14:29 -0700)]
Merge branch 'cls_bpf-next'

Daniel Borkmann says:

====================
Minor cls_bpf updates

Some minor updates resp. follow-ups on cls_bpf, please see
individual patches for details. Will follow with the iproute2
patch after this series.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocls_bpf: further limit exec opcodes subset
Daniel Borkmann [Wed, 23 Sep 2015 19:56:48 +0000 (21:56 +0200)]
cls_bpf: further limit exec opcodes subset

Jamal suggested to further limit the currently allowed subset of opcodes
that may be used by a direct action return code as the intention is not
to replace the full action engine, but rather to have a minimal set that
can be used in the fast-path on things like ingress for some features
that cls_bpf supports.

Classifiers can, of course, still be chained together that have direct
action mode with those that have a full exec pass. For more complex
scenarios that go beyond this minimal set here, the full tcf_exts_exec()
path must be used.

Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocls_bpf: make binding to classid optional
Daniel Borkmann [Wed, 23 Sep 2015 19:56:47 +0000 (21:56 +0200)]
cls_bpf: make binding to classid optional

The binding to a particular classid was so far always mandatory for
cls_bpf, but it doesn't need to be. Therefore, lift this restriction
as similarly done in other classifiers.

Only a couple of qdiscs make use of class from the tcf_result, others
don't strictly care, so let the user choose his needs (those that read
out class can handle situations where it could be NULL).

An explicit check for tcf_unbind_filter() is also not needed here, as
the previous r->class was 0, so the xchg() will return that and
therefore a callback to the qdisc's unbind_tcf() is skipped.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocls_bpf: also dump TCA_BPF_FLAGS
Daniel Borkmann [Wed, 23 Sep 2015 19:56:46 +0000 (21:56 +0200)]
cls_bpf: also dump TCA_BPF_FLAGS

In commit 43388da42a49 ("cls_bpf: introduce integrated actions") we
have added TCA_BPF_FLAGS. We can also retrieve this information from
the prog, dump it back to user space as well. It's useful in tc when
displaying/dumping filter info.

Also, remove tp from cls_bpf_prog_from_efd(), came in as a conflict
from a rebase and it's unused here (later work may add it along with
a real user).

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge tag 'arcnet-cleanup-v4.3-rc2' of git://git.pengutronix.de/git/mgr/linux
David S. Miller [Wed, 23 Sep 2015 21:27:24 +0000 (14:27 -0700)]
Merge tag 'arcnet-cleanup-v4.3-rc2' of git://git.pengutronix.de/git/mgr/linux

Michael Grzeschik says:

====================
ARCNET: refactoring and cleanup

This series cleans up the code in drivers/net/arcnet
and include/uapi/linux/if_arcnet.h . It doesn't change
the runtime behaviour of the code. Its only purpose
is to improve the code maintenance and readability.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agosched, bpf: let stack handle !IFF_UP devs on bpf_clone_redirect
Daniel Borkmann [Wed, 23 Sep 2015 20:20:15 +0000 (22:20 +0200)]
sched, bpf: let stack handle !IFF_UP devs on bpf_clone_redirect

Similarly as already the case in bpf_redirect()/skb_do_redirect()
pair, let the stack deal with devs that are !IFF_UP.

dev_forward_skb() as well as dev_queue_xmit() will free the skb
and increment drop counter internally in such cases, so we can
spare the condition in bpf_clone_redirect().

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoipv6 Use get_hash_from_flowi6 for rt6 hash
Tom Herbert [Wed, 23 Sep 2015 21:13:35 +0000 (14:13 -0700)]
ipv6 Use get_hash_from_flowi6 for rt6 hash

In rt6_info_hash_nhsfn replace the custom hashing over flowi6 that is
using xor with a call to common function get_hash_from_flowi6.

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoarcnet: capmode: remove extra function
Michael Grzeschik [Wed, 22 Apr 2015 09:47:43 +0000 (11:47 +0200)]
arcnet: capmode: remove extra function

This patch cleans the capmode protocol module. It removes the obsolete
function arcnet_cap_init and replaces printk with pr_info.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: arc-rawmode: reorder module functions
Michael Grzeschik [Wed, 22 Apr 2015 09:11:58 +0000 (11:11 +0200)]
arcnet: arc-rawmode: reorder module functions

This patch moves the module_init and module_exit patches to
the end of the file. It also replaces the printk with pr_info.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: com20020: replace magic numbers with readable macros
Michael Grzeschik [Wed, 15 Apr 2015 09:43:57 +0000 (11:43 +0200)]
arcnet: com20020: replace magic numbers with readable macros

This patch replaces all magic numbers in the driver with
proper named macros. For the case of XTOcfg and STARTIOcmd
it introduces the new macros.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: reformat structs to C99 format
Michael Grzeschik [Fri, 20 Mar 2015 14:22:02 +0000 (15:22 +0100)]
arcnet: reformat structs to C99 format

This patch changes the macro definitions to match the C99
formating. This improves the readability.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Remove unused arcnet_<I/O>w macros
Joe Perches [Tue, 5 May 2015 17:06:14 +0000 (10:06 -0700)]
arcnet: Remove unused arcnet_<I/O>w macros

The word length macros are unused.  Remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Add com9026.h to standardize COM9026_REG_<foo>
Joe Perches [Tue, 5 May 2015 17:06:13 +0000 (10:06 -0700)]
arcnet: Add com9026.h to standardize COM9026_REG_<foo>

Deduplicate the COM9026 registers.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Remove function pointer macro indirections
Joe Perches [Tue, 5 May 2015 17:06:12 +0000 (10:06 -0700)]
arcnet: Remove function pointer macro indirections

It's clearer to use function pointer calls directly instead of the
macro indirections of ARCRESET, ACOMMAND, ASTATUS, and AINTMASK.

Remove the now unused macros too.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: com90xx: Use arcnet_readb/writeb routines
Joe Perches [Tue, 5 May 2015 17:06:11 +0000 (10:06 -0700)]
arcnet: com90xx: Use arcnet_readb/writeb routines

Simplify and make consistent the current uses of readb/writeb
by using the newly introduced arcnet_<I/O> equivalents.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: arc-rimi: Use arcnet_<I/O> routines
Joe Perches [Tue, 5 May 2015 17:06:10 +0000 (10:06 -0700)]
arcnet: arc-rimi: Use arcnet_<I/O> routines

Simplify and make consistent the current uses of readb/writeb
by using the newly introduced arcnet_<I/O> equivalents.

o Add new #defines for register offsets
o Remove old #defines that included the ioaddr
o Remove obfuscating macros by expanding them in-place where appropriate

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: arcdevice.h: Add arcnet_readb and arcnet_writeb
Joe Perches [Tue, 5 May 2015 17:06:09 +0000 (10:06 -0700)]
arcnet: arcdevice.h: Add arcnet_readb and arcnet_writeb

Use the same indirection as the other arcnet_<I/O> macros.
Neither of these new macros add the BUS_ALIGN use for 8 bit devices
on 16 bit busses.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: com90xx: Use arcnet_<I/O> routines
Joe Perches [Tue, 5 May 2015 17:06:08 +0000 (10:06 -0700)]
arcnet: com90xx: Use arcnet_<I/O> routines

Simplify and make consistent the current uses of inb/outb
by using the newly introduced arcnet_<I/O> equivalents.

o Add new #defines for register offsets
o Remove old #defines that included the ioaddr
o Remove obfuscating macros by expanding them in-place where appropriate

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: com90io: Use arcnet_<I/O> routines
Joe Perches [Tue, 5 May 2015 17:06:07 +0000 (10:06 -0700)]
arcnet: com90io: Use arcnet_<I/O> routines

Simplify and make consistent the current uses of inb/outb
by using the newly introduced arcnet_<I/O> equivalents.

o Add new #defines for register offsets
o Remove old #defines that included the ioaddr
o Remove obfuscating macros by expanding them in-place where appropriate

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: com20020: Use arcnet_<I/O> routines
Joe Perches [Tue, 5 May 2015 17:06:06 +0000 (10:06 -0700)]
arcnet: com20020: Use arcnet_<I/O> routines

Simplify and make consistent the current uses of inb/outb
by using the newly introduced arcnet_<I/O> equivalents.

o Add new #defines for register offsets
  There is an register offset, 8, that is unnamed and used as-is.
o Remove old #defines that included the ioaddr
o Remove obfuscating macros by expanding them in-place where appropriate
o Create static inline com20020_set_subaddress for the SET_SUBADR macro

There is an unused arcnet config entry CONFIGSA100_CT6001 which added a
special #define BUS_ALIGN which was introduced but never used in fullhist git
tree commit 22cfce4b82b0 ("[ARCNET]: Fixes.") in Nov 2004 for Linux v2.6.10.

This BUS_ALIGN #define tries to allow 8 bit devices to work on a 16 bit
bus by aligning addresses to 16 bit boundaries.

Move this currently unused CONFIG_SA1100_CT6001 BUS_ALIGN macro from
com20020.h to arcdevice.h.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Add arcnet_<I/O> macros
Joe Perches [Tue, 5 May 2015 17:06:05 +0000 (10:06 -0700)]
arcnet: Add arcnet_<I/O> macros

arcnet uses an I/O scheme which can align I/O addresses to word boundaries
on different architectures.

Add arcnet specific macros which can hide this alignment calculation.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Make a char * array const char * const
Joe Perches [Tue, 5 May 2015 17:06:04 +0000 (10:06 -0700)]
arcnet: Make a char * array const char * const

Might as well be specific about the use of this array.

Add a commment questioning the indexing too.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Move files out of include/linux
Joe Perches [Tue, 5 May 2015 17:06:03 +0000 (10:06 -0700)]
arcnet: Move files out of include/linux

These #include files don't need to be in the include/linux directory
as they can be local to drivers/net/arcnet/

Move them and update the #include statements.

Update the MAINTAINERS file pattern by deleting arcdevice from the
NETWORKING block as arcnet is currently unmaintained.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Wrap some long lines
Joe Perches [Tue, 5 May 2015 17:06:02 +0000 (10:06 -0700)]
arcnet: Wrap some long lines

Just neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Convert arcnet_dump_skb macro to static inline
Joe Perches [Tue, 5 May 2015 17:06:01 +0000 (10:06 -0700)]
arcnet: Convert arcnet_dump_skb macro to static inline

Make sure the arguments are tested appropriately when not using
this function.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Remove pointer comparisons to NULL
Joe Perches [Tue, 5 May 2015 17:06:00 +0000 (10:06 -0700)]
arcnet: Remove pointer comparisons to NULL

Use direct tests of pointer instead.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Remove assignments from ifs
Joe Perches [Tue, 5 May 2015 17:05:59 +0000 (10:05 -0700)]
arcnet: Remove assignments from ifs

Move the assignment above the if like general kernel style.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Remove unnecessary OOM messages
Joe Perches [Tue, 5 May 2015 17:05:58 +0000 (10:05 -0700)]
arcnet: Remove unnecessary OOM messages

Alloc failures have generic stack dumps so these are redundant.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Move EXPORT_SYMBOL after declarations
Joe Perches [Tue, 5 May 2015 17:05:57 +0000 (10:05 -0700)]
arcnet: Move EXPORT_SYMBOL after declarations

Use the normal kernel style for EXPORT_SYMBOL.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Convert printk to pr_<level>
Joe Perches [Tue, 5 May 2015 17:05:56 +0000 (10:05 -0700)]
arcnet: Convert printk to pr_<level>

Use the more current logging style.

Remove #define VERSION, use pr_info normally.
Add pr_fmt with "arcnet:" prefixes and KBUILD_MODNAME.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Convert BUGMSG and BUGMSG2 to arc_prink and arc_cont
Joe Perches [Tue, 5 May 2015 17:05:55 +0000 (10:05 -0700)]
arcnet: Convert BUGMSG and BUGMSG2 to arc_prink and arc_cont

These macros don't actually represent BUG uses but are more commonly
used as logging macros, so use a more kernel style macro.

Convert the BUGMSG from a netdev_ like use to actually use netdev_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Expand odd BUGLVL macro with if and uses
Joe Perches [Tue, 5 May 2015 17:05:54 +0000 (10:05 -0700)]
arcnet: Expand odd BUGLVL macro with if and uses

Don't hide what should be obvious.

Make the macro a simple test instead of using if and test.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Neaten BUGMSG macro defines
Joe Perches [Tue, 5 May 2015 17:05:53 +0000 (10:05 -0700)]
arcnet: Neaten BUGMSG macro defines

These macros are actually printk and pr_cont uses with a flag.

Add a new BUGLVL_TEST macro which is just the "should use" test
and not an odd "if (<foo>)" macro to simplify uses in a new patch.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Use network block comment style
Joe Perches [Tue, 5 May 2015 17:05:52 +0000 (10:05 -0700)]
arcnet: Use network block comment style

Conformity can be useful.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Use include/linux path for asm
Joe Perches [Tue, 5 May 2015 17:05:51 +0000 (10:05 -0700)]
arcnet: Use include/linux path for asm

Use the preferred kernel include path for asm paths.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Coalesce string fragments
Joe Perches [Tue, 5 May 2015 17:05:50 +0000 (10:05 -0700)]
arcnet: Coalesce string fragments

Using coalesced strings helps grep for specific messages.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Use normal kernel brace style
Joe Perches [Tue, 5 May 2015 17:05:49 +0000 (10:05 -0700)]
arcnet: Use normal kernel brace style

Move braces normal kernel locations.
Add missing braces.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Add and remove blank lines
Joe Perches [Tue, 5 May 2015 17:05:48 +0000 (10:05 -0700)]
arcnet: Add and remove blank lines

Use a more current kernel line style.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: Use normal kernel spacing style
Joe Perches [Tue, 5 May 2015 17:05:47 +0000 (10:05 -0700)]
arcnet: Use normal kernel spacing style

Standardized spacing is easier to read.

git diff -w shows no differences.
objdiff shows no differences.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agoarcnet: fix indentation of if_arcnet.h
Joe Perches [Thu, 30 Jul 2015 20:22:43 +0000 (13:22 -0700)]
arcnet: fix indentation of if_arcnet.h

Standardized spacing is easier to read.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
9 years agousbnet: remove invalid check
Andrzej Hajda [Mon, 21 Sep 2015 13:33:59 +0000 (15:33 +0200)]
usbnet: remove invalid check

skb->len is always non-negative.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorndis_wlan: fix checking for default value
Andrzej Hajda [Mon, 21 Sep 2015 13:33:55 +0000 (15:33 +0200)]
rndis_wlan: fix checking for default value

Thresholds uses -1 to indicate that default value should be used.
Since thresholds are unsigned sign checking makes no sense.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoorinoco: fix checking for default value
Andrzej Hajda [Mon, 21 Sep 2015 13:33:54 +0000 (15:33 +0200)]
orinoco: fix checking for default value

Thresholds uses -1 to indicate that default value should be used.
Since thresholds are unsigned sign checking makes no sense.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agomwifiex: fix comparison expression
Andrzej Hajda [Mon, 21 Sep 2015 13:33:53 +0000 (15:33 +0200)]
mwifiex: fix comparison expression

To avoid underflows signed variables should be used in expression.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: brcm80211: fix range check
Andrzej Hajda [Mon, 21 Sep 2015 13:33:52 +0000 (15:33 +0200)]
net: brcm80211: fix range check

Unsigned minus constant is still unsigned so checking its sign makes no
sense.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: stmmac: fix type of entry variable
Andrzej Hajda [Mon, 21 Sep 2015 13:33:51 +0000 (15:33 +0200)]
net: stmmac: fix type of entry variable

Variable can store negative values.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet/ibm/emac: fix type of phy_mode
Andrzej Hajda [Mon, 21 Sep 2015 13:33:50 +0000 (15:33 +0200)]
net/ibm/emac: fix type of phy_mode

phy_mode can be negative.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoisdn: hisax: fix frame calculation
Andrzej Hajda [Mon, 21 Sep 2015 13:33:49 +0000 (15:33 +0200)]
isdn: hisax: fix frame calculation

Difference of unsigned values is also unsigned so it does not make
sense to check its sign.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoixgbe: Enable bit-banging mode on X550
Mark Rustad [Sat, 8 Aug 2015 23:18:12 +0000 (16:18 -0700)]
ixgbe: Enable bit-banging mode on X550

Set the bit banging mode in the hardware when performing bit banging
I2C operations on X550. Also control the output enable on both the
clock and data lines.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Set lan_id before first I2C eeprom access
Mark Rustad [Sat, 8 Aug 2015 23:18:07 +0000 (16:18 -0700)]
ixgbe: Set lan_id before first I2C eeprom access

The lan_id is being set after a previous I2C eeprom access which
makes no sense because it needs to be set before any access. Move
the setting to before the access.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Provide unlocked I2C methods
Mark Rustad [Sat, 8 Aug 2015 23:18:02 +0000 (16:18 -0700)]
ixgbe: Provide unlocked I2C methods

Most I2C accesses take and release semaphores for each access. Now
there is a reason to perform multiple I2C operations under the same
holding of the semaphore, so provide unlocked I2C methods for that
purpose.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Provide I2C combined on X550EM
Mark Rustad [Sat, 8 Aug 2015 23:17:57 +0000 (16:17 -0700)]
ixgbe: Provide I2C combined on X550EM

Provide I2C combined operations on X550EM, not X550 devices.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Add X550EM support for SFP insertion interrupt
Mark Rustad [Sat, 8 Aug 2015 23:17:51 +0000 (16:17 -0700)]
ixgbe: Add X550EM support for SFP insertion interrupt

Add support for the SFP insertion interrupt on X550EM devices with
SFPs.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Accept SFP not present errors on all devices
Mark Rustad [Sat, 8 Aug 2015 23:17:46 +0000 (16:17 -0700)]
ixgbe: Accept SFP not present errors on all devices

When an SFP not present error is returned by the reset_hw method,
accept it and go on, since an SFP can still be inserted. Previously
it was only accepted for 82598 devices.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbevf: Enables TSO for stacked VLAN
Toshiaki Makita [Thu, 6 Aug 2015 08:57:31 +0000 (17:57 +0900)]
ixgbevf: Enables TSO for stacked VLAN

Setting ndo_features_check to passthru_features_check allows the driver
to skip the check for multiple tagged TSO packets and enables stacked
VLAN TSO.
Tested with 82599ES.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoe1000e: Enable TSO for stacked VLAN
Toshiaki Makita [Thu, 6 Aug 2015 08:57:29 +0000 (17:57 +0900)]
e1000e: Enable TSO for stacked VLAN

Setting ndo_features_check to passthru_features_check allows the driver
to skip the check for multiple tagged TSO packets and enables stacked
VLAN TSO.
Tested with I217-LM.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoigbvf: Enable TSO for stacked VLAN
Toshiaki Makita [Thu, 6 Aug 2015 08:57:28 +0000 (17:57 +0900)]
igbvf: Enable TSO for stacked VLAN

Setting ndo_features_check to passthru_features_check allows the driver
to skip the check for multiple tagged TSO packets and enables stacked
VLAN TSO.
Tested with I350.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoe1000: remove dead e1000_init_eeprom_params calls
Francois Romieu [Wed, 5 Aug 2015 22:52:37 +0000 (00:52 +0200)]
e1000: remove dead e1000_init_eeprom_params calls

The device probe method e1000_probe calls e1000_init_eeprom_params
itself so there's no reason to call it again from e1000_do_write_eeprom
or e1000_do_read_eeprom.

The sentence above assumes that e1000_init_eeprom_params is effective.
e1000_init_eeprom_params depends mostly on hw->mac_type and e1000_probe
bails out early if it can't set mac_type (see e1000_init_hw_struct, then
e1000_set_mac_type), qed.

Btw, if effective, the removed paths would had been deadlock prone when
e1000_eeprom_spi was set:
-> e1000_write_eeprom (takes e1000_eeprom_lock)
   -> e1000_do_write_eeprom
      -> e1000_init_eeprom_params
         -> e1000_read_eeprom (takes e1000_eeprom_lock)

(same narrative with e1000_read_eeprom -> e1000_do_read_eeprom etc.)

As a final note, the candidate deadlock above can't happen in e1000_probe
due to the way eeprom->word_size is set / tested.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agofm10k: add support for extra debug statistics
Jacob Keller [Thu, 2 Jul 2015 00:38:36 +0000 (17:38 -0700)]
fm10k: add support for extra debug statistics

Add a private ethtool flag to enable display of these statistics, which
are generally less useful. However, sometimes it can be useful for
debugging purposes. The most useful portion is the ability to see what
the PF thinks the VF mailboxes look like.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agofm10k: TRIVIAL remove unnecessary comma
Jacob Keller [Fri, 26 Jun 2015 15:54:07 +0000 (08:54 -0700)]
fm10k: TRIVIAL remove unnecessary comma

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agofm10k: create "correct" header for the remote end on connect
Jacob Keller [Fri, 26 Jun 2015 15:54:06 +0000 (08:54 -0700)]
fm10k: create "correct" header for the remote end on connect

When we connect to the mailbox, we insert a fake disconnect header so
that the code does not see an invalid header and thus instantly error
every time we bring up the mailbox. However, we incorrectly record the
tail and head from the local perspective. Since the remote end shouldn't
have anything for us, add a "create_fake_disconnect_hdr" function which
inverts the TAIL and HEAD fields. This enables us to connect without any
errors of either TAIL or HEAD incorrectness, and prevents creating
extraneous error messages. This is necessary now since mbx_reset_work
does not actually reset the Tx FIFO head and tail pointers, thus head
and tail might not be equivalent on a reconnect.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agofm10k: drop transmitted messages in Tx FIFO as part of reset_work
Jacob Keller [Thu, 25 Jun 2015 21:43:43 +0000 (14:43 -0700)]
fm10k: drop transmitted messages in Tx FIFO as part of reset_work

This patch fixes a corner case issue with the PF/VF mailbox code.
Currently, fm10k_mbx_reset_work clears various state about the mailbox.
However, it does not clear the Tx FIFO head/tail pointers. We can't
simply clear these pointers as we unintentionally drop untransmitted
messages without error.

Doing nothing results in a possible phantom re-transmission of messages,
since we leave tx.head and tx.tail intact, but clear the tx_pulled and
tail_len values. This means that the PF could continuously re-send a
message which triggers a reset in the VF. Upon reset, the VF will
re-receive the same message after a reconnect.

If we reset the tx.head and tx.tail pointers completely, we end up
dropping some messages that were pending before connect. This results in
missing LPORT_MSG_READY bits, and VFs will end up reporting no link.

However, we can resolve both issues by simply incrementing head to
account for the already transmitted messages, before we reset tx_pulled.
We do this via the same logic as fm10k_mbx_head_pull.

We account for the tail_len which includes all data not yet transmitted,
once we account for the acked data which means re-reading the HEAD
variable from the message header. Then, we drop messages until we've
dropped more than the new tx_pulled value. At this point, resetting
tail_len and tx_pulled, but not tx.head and tx.tail will result in
prevention of the phantom message. It also prevents us from dropping
untransmitted messages upon attempting to Tx into a connect or
disconnect header.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Add fdir support for SCTP on X550
Don Skidmore [Wed, 24 Jun 2015 21:03:30 +0000 (17:03 -0400)]
ixgbe: Add fdir support for SCTP on X550

X550 has HW support for SCTP flow director filters SCTP mask. This
patch adds it like we do for UDP and TCP.

Signed-off-by: Donald C Skidmore <donald.c.skidmore@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Add SFP+ detection for X550 hardware
Don Skidmore [Wed, 24 Jun 2015 20:38:53 +0000 (16:38 -0400)]
ixgbe: Add SFP+ detection for X550 hardware

This patch is part of the future enablement of X550 SFP+ support.  This
HW uses different SDP so the interrupts need to be set up accordingly.

Signed-off-by: Donald C Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agofm10k: remove comment about rtnl_lock around mbx operations
Jacob Keller [Mon, 15 Jun 2015 22:00:52 +0000 (15:00 -0700)]
fm10k: remove comment about rtnl_lock around mbx operations

This comment is no longer true due to a couple of mailbox locking
refactors, and we now don't actually do any rtnl protected operations
directly in the mailbox path. Remove this comment as it is factually
incorrect and confusing.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
David S. Miller [Tue, 22 Sep 2015 20:11:43 +0000 (13:11 -0700)]
Merge git://git./linux/kernel/git/pablo/nf-next

Pablo Neira Ayuso says:

====================
Netfilter/IPVS updates for net-next

The following patchset contains Netfilter/IPVS updates for your net-next tree
in this 4.4 development cycle, they are:

1) Schedule ICMP traffic to IPVS instances, this introduces a new schedule_icmp
   proc knob to enable/disable it. By default is off to retain the old
   behaviour. Patchset from Alex Gartrell.

I'm also including what Alex originally said for the record:

"The configuration of ipvs at Facebook is relatively straightforward.  All
ipvs instances bgp advertise a set of VIPs and the network prefers the
nearest one or uses ECMP in the event of a tie.  For the uninitiated, ECMP
deterministically and statelessly load balances by hashing the packet
(usually a 5-tuple of protocol, saddr, daddr, sport, and dport) and using
that number as an index (basic hash table type logic).

The problem is that ICMP packets (which contain really important
information like whether or not an MTU has been exceeded) will get a
different hash value and may end up at a different ipvs instance.  With no
information about where to route these packets, they are dropped, creating
ICMP black holes and breaking Path MTU discovery.  Suddenly, my mom's
pictures can't load and I'm fielding midday calls that I want nothing to do
with.

To address this, this patch set introduces the ability to schedule icmp
packets which is gated by a sysctl net.ipv4.vs.schedule_icmp.  If set to 0,
the old behavior is maintained -- otherwise ICMP packets are scheduled."

2) Add another proc entry to ignore tunneled packets to avoid routing loops
   from IPVS, also from Alex.

3) Fifteen patches from Eric Biederman to:

* Stop passing nf_hook_ops as parameter to the hook and use the state hook
  object instead all around the netfilter code, so only the private data
  pointer is passed to the registered hook function.

* Now that we've got state->net, propagate the netns pointer to netfilter hook
  clients to avoid its computation over and over again. A good example of how
  this has been simplified is the former TEE target (now nf_dup infrastructure)
  since it has killed the ugly pick_net() function.

There's another round of netns updates from Eric Biederman making the line. To
avoid the patchbomb again to almost all the networking mailing list (that is 84
patches) I'd suggest we send you a pull request with no patches or let me know
if you prefer a better way.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodrivers/net/ieee802154/at86rf230.c: seq_printf() now returns NULL
Stephen Rothwell [Tue, 22 Sep 2015 03:41:44 +0000 (20:41 -0700)]
drivers/net/ieee802154/at86rf230.c: seq_printf() now returns NULL

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alexander Aring <alex.aring@gmail.com>
Cc: Stefan Schmidt <stefan@osg.samsung.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'cpsw-macid-no-of'
David S. Miller [Tue, 22 Sep 2015 00:21:47 +0000 (17:21 -0700)]
Merge branch 'cpsw-macid-no-of'

Mugunthan V N says:

====================
Add support for reading macid when DT macid not found

Did a boot test on dra7-evm [1] and am437x-gp-evm [2].
Pushed a branch [3] for others to test the patch.

[1]: http://pastebin.ubuntu.com/12513420/
[2]: http://pastebin.ubuntu.com/12513428/
[3]: git://git.ti.com/~mugunthanvnm/ti-linux-kernel/linux.git cpsw-macid-read-support
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoarm: dts: am4372: add syscon phandle to cpsw node
Mugunthan V N [Mon, 21 Sep 2015 10:26:53 +0000 (15:56 +0530)]
arm: dts: am4372: add syscon phandle to cpsw node

There are 2 MACIDs stored in the control module of the am4372.
These are read by the cpsw driver if no valid MACID was found
in the devicetree.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoarm: dts: dra7: add syscon phandle to cpsw node
Mugunthan V N [Mon, 21 Sep 2015 10:26:52 +0000 (15:56 +0530)]
arm: dts: dra7: add syscon phandle to cpsw node

There are 2 MACIDs stored in the control module of the dra7.
These are read by the cpsw driver if no valid MACID was found
in the devicetree.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodrivers: net: cpsw-common: add support for reading mac address for dra7 and am437x...
Mugunthan V N [Mon, 21 Sep 2015 10:26:51 +0000 (15:56 +0530)]
drivers: net: cpsw-common: add support for reading mac address for dra7 and am437x platforms

Adding support for reading mac address using syscon driver for
dra7 and am437x platforms

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodrivers: net: cpsw: davinci_emac: move reading mac id to common file
Mugunthan V N [Mon, 21 Sep 2015 10:26:50 +0000 (15:56 +0530)]
drivers: net: cpsw: davinci_emac: move reading mac id to common file

Moving mac address reading from ethernet driver to common
file for better maintenance and for code reusable.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge tag 'linux-can-next-for-4.4-20150921' of git://git.kernel.org/pub/scm/linux...
David S. Miller [Tue, 22 Sep 2015 00:15:03 +0000 (17:15 -0700)]
Merge tag 'linux-can-next-for-4.4-20150921' of git://git./linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2015-09-17

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

All 8 patches are by me and cleanup the flexcan driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: bcmgenet: Remove duplicate test for tx_coalesce_usecs_high
Florian Fainelli [Fri, 18 Sep 2015 21:16:53 +0000 (14:16 -0700)]
net: bcmgenet: Remove duplicate test for tx_coalesce_usecs_high

We were checking twice for ec->tx_coalesce_usecs_high, remove the
duplicate test.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Reported-by: kbuild-all@01.org
Fixes: 2f9130709d2c19 ("net: bcmgenet: Implement TX coalescing control knobs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: send loss probe after 1s if no RTT available
Yuchung Cheng [Fri, 18 Sep 2015 18:40:33 +0000 (11:40 -0700)]
tcp: send loss probe after 1s if no RTT available

This patch makes TLP to use 1 sec timer by default when RTT is
not available due to SYN/ACK retransmission or SYN cookies.

Prior to this change, the lack of RTT prevents TLP so the first
data packets sent can only be recovered by fast recovery or RTO.
If the fast recovery fails to trigger the RTO is 3 second when
SYN/ACK is retransmitted. With this patch we can trigger fast
recovery in 1sec instead.

Note that we need to check Fast Open more properly. A Fast Open
connection could be (accepted then) closed before it receives
the final ACK of 3WHS so the state is FIN_WAIT_1. Without the
new check, TLP will retransmit FIN instead of SYN/ACK.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: usec resolution SYN/ACK RTT
Yuchung Cheng [Fri, 18 Sep 2015 18:36:14 +0000 (11:36 -0700)]
tcp: usec resolution SYN/ACK RTT

Currently SYN/ACK RTT is measured in jiffies. For LAN the SYN/ACK
RTT is often measured as 0ms or sometimes 1ms, which would affect
RTT estimation and min RTT samping used by some congestion control.

This patch improves SYN/ACK RTT to be usec resolution if platform
supports it. While the timestamping of SYN/ACK is done in request
sock, the RTT measurement is carefully arranged to avoid storing
another u64 timestamp in tcp_sock.

For regular handshake w/o SYNACK retransmission, the RTT is sampled
right after the child socket is created and right before the request
sock is released (tcp_check_req() in tcp_minisocks.c)

For Fast Open the child socket is already created when SYN/ACK was
sent, the RTT is sampled in tcp_rcv_state_process() after processing
the final ACK an right before the request socket is released.

If the SYN/ACK was retransmistted or SYN-cookie was used, we rely
on TCP timestamps to measure the RTT. The sample is taken at the
same place in tcp_rcv_state_process() after the timestamp values
are validated in tcp_validate_incoming(). Note that we do not store
TS echo value in request_sock for SYN-cookies, because the value
is already stored in tp->rx_opt used by tcp_ack_update_rtt().

One side benefit is that the RTT measurement now happens before
initializing congestion control (of the passive side). Therefore
the congestion control can use the SYN/ACK RTT.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 's390-next'
David S. Miller [Mon, 21 Sep 2015 23:03:05 +0000 (16:03 -0700)]
Merge branch 's390-next'

Ursula Braun says:

====================
s390: qeth and iucv patches

here is version 2 of some s390 related qeth patches for net-next. The patch by
Thomas Richter adds a new feature to the qeth layer2 code; the remaining
patches are minor improvements.
Version 2 of patch 4 uses the desired indentation in function declarations
and definitions spanning multiple lines in almost all cases. Thomas run into a
conflict with the maximum number of columns once. Thus you will still see one
function definition using an earlier column before the opening paranthesis.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agos390/iucv: do not use arrays as argument
Ursula Braun [Fri, 18 Sep 2015 14:06:52 +0000 (16:06 +0200)]
s390/iucv: do not use arrays as argument

The iucv code uses arrays as arguments. Even though this does not
really cause a problem, it could be misleading, since the compiler
turns array arguments into just a pointer argument. To be more
precise this patch changes the array arguments into pointers.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: add layer 2 RX/TX checksum offloading
Thomas Richter [Fri, 18 Sep 2015 14:06:51 +0000 (16:06 +0200)]
qeth: add layer 2 RX/TX checksum offloading

Checksum offloading for send and receive is already
supported for layer 3 (IP layer). This patch
adds support for RX and TX hardware checksum offloading
for layer 2 (MAC layer). The hardware calculates the checksum
for IP UDP and TCP packets.

This patch moves the hardware checksum offloading setup
to the set of common functions in qeth_core_main.c.
Layer 2 and layer 3 now simply call the same common functions.

Also note that TX checksum offloading is always enabled.
The device driver relies on the TCP/IP stack to make use of
this feature.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: move OSA portname into deprecated status
Ursula Braun [Fri, 18 Sep 2015 14:06:50 +0000 (16:06 +0200)]
qeth: move OSA portname into deprecated status

An OSA-Express port name was required to identify a shared OSA port.
All operating system instances that shared the port had to use the
same port name. This requirement no longer applies.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: no write permission for readonly sysattr
Lakhvich Dmitriy [Fri, 18 Sep 2015 14:06:49 +0000 (16:06 +0200)]
qeth: no write permission for readonly sysattr

User is not allowed to write into bridge_state sysfs file.
Fixed attribute not mislead the user

Signed-off-by: Lakhvich Dmitriy <ldmitriy@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reported-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Reviewed-by: Thomas Richter <tmricht@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: remove extraneous length from %pM format
Eugene Crosser [Fri, 18 Sep 2015 14:06:48 +0000 (16:06 +0200)]
qeth: remove extraneous length from %pM format

Length specifier in the %pM format is not supported (at least, not
documented). Remove it, and also an extraneous '&' for the array.

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
David S. Miller [Mon, 21 Sep 2015 23:00:44 +0000 (16:00 -0700)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

Johan Hedberg says:

====================
pull request: bluetooth-next 2015-09-18

Here's the first bluetooth-next pull request for the 4.4 kernel:

 - ieee802154 cleanups & fixes
 - debugfs support for the at86rf230 driver
 - Support for quirky (seemingly counterfeit) CSR Bluetooth controllers
 - Power management and device config improvements for Intel controllers
 - Fix for devices with incorrect advertising data length
 - Fix for closing HCI user channel socket

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocan: flexcan: enable interrupts atomically at the end of flexcan_chip_start()
Marc Kleine-Budde [Thu, 27 Aug 2015 12:24:48 +0000 (14:24 +0200)]
can: flexcan: enable interrupts atomically at the end of flexcan_chip_start()

This patch defers the writing of the interrupts bits of the CTRL register order
to enables all interrupts atomically at the the of the flexcan_chip_start()
function.

Suggested-by: Torsten Lang <torsten.lang@uweschneider.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
9 years agocan: flexcan: give member of flexcan_priv holding mailboxes a sensible name
Marc Kleine-Budde [Tue, 25 Aug 2015 08:39:19 +0000 (10:39 +0200)]
can: flexcan: give member of flexcan_priv holding mailboxes a sensible name

This patch gives the member of flexcan_priv holding mailboxes a sensible name,
by renaming from "cantxfg" to "mb":

    struct flexcan_priv::cantxfg -> struct flexcan_priv::mb

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
9 years agocan: flexcan: use pointer to struct regs instead of void pointer for mmio address...
Marc Kleine-Budde [Fri, 8 May 2015 07:32:58 +0000 (09:32 +0200)]
can: flexcan: use pointer to struct regs instead of void pointer for mmio address space

This patch renames the pointer to the mmio address space from "base" to "regs"
and changes the type from "void __iomem *" to "struct flexcan_regs __iomem *".

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
9 years agocan: flexcan: rename feature into quirks
Marc Kleine-Budde [Fri, 8 May 2015 13:22:36 +0000 (15:22 +0200)]
can: flexcan: rename feature into quirks

This patch renames the "features" member of struct flexcan_devtype_data to
"quirks". The corresponding defines are renamed too, to reflect what they
actually do.

    FLEXCAN_HAS_V10_FEATURES      -> FLEXCAN_QUIRK_DISABLE_RXFG
    FLEXCAN_HAS_BROKEN_ERR_STATE  -> FLEXCAN_QUIRK_BROKEN_ERR_STATE
    FLEXCAN_HAS_MECR_FEATURES     -> FLEXCAN_QUIRK_DISABLE_MECR

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
9 years agocan: flexcan: flexcan_chip_start(): cleanup writing of reg_mcr
Marc Kleine-Budde [Mon, 31 Aug 2015 19:32:34 +0000 (21:32 +0200)]
can: flexcan: flexcan_chip_start(): cleanup writing of reg_mcr

This patch changes the order the individual bits of the mcr register in
flexcan_chip_start() are or'ed together to match the datasheet. The inline
documentation is adjusted accordingly.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>