Commit Graph

508410 Commits

Author SHA1 Message Date
Nicolas Dichtel ecf2c06a88 ip6tnl,gre6,vti6: implement ndo_get_iflink
Don't use dev->iflink anymore.

CC: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02 14:04:59 -04:00
Nicolas Dichtel a54acb3a6f dev: introduce dev_get_iflink()
The goal of this patch is to prepare the removal of the iflink field. It
introduces a new ndo function, which will be implemented by virtual interfaces.

There is no functional change into this patch. All readers of iflink field
now call dev_get_iflink().

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-02 14:04:59 -04:00
tadeusz.struk@intel.com 033f46b3c1 crypto: algif - explicitly mark end of data
After the TX sgl is expanded we need to explicitly mark end of data
at the last buffer that contains data.

Changes in v2
 - use type 'bool' and true/false for 'mark'.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:59:28 -04:00
David S. Miller 99949a74aa Merge branch 'dsa-next'
Andrew Lunn says:

====================
DSA Mavell drivers refactoring and cleanup

v1->v2:
 * Add missing signed-of-by: For patches authored by Guenter Roeck.
 * Add Reviewed by from Guenter Roack to patch #5.

This is a collection of patches again net-next from today containing
refactoring and consolidate of code, cleanups and using #define's to
replace register numbers.

Patch #1 Swaps the 6131 driver to use the consolidated setup code.

Patch #2 Moves the Switch IDs used during probe into a central
         location.  We need these later so that we can differentiate
         the different features the devices have.

Patch #3 Makes the 6131 driver set the number of ports in the private
         state structure. It then uses this, rather than hard coded
         maximum number of ports.

Patch #4 Similar to Patch #3, but for the 6123_61_65 driver.

Patch #5 Similar to Patch #3, and #4, but for all the remaining
         drivers.  This greatly increases the similarity of the code
         between drivers, allow further patches to consolidate the
         duplicated code.

Patch #6 Consolidate the switch reset code, which has two minor
         variants. Removes around 35 lines per driver.

Patch #7 Moves phy page access functions out of the 6352 driver into
         the shared code. Currently only the 6352 driver uses this,
         but it is likely other devices will come along wanting this
         functionality.

Patch #8 Consolidates the code used to access phy registers. Removes
         around 40 lines of code per driver.

Patch #9 Fixes missing mutex locking in the EEE code, and refactors
         the code a bit to make it more understandable with respect to
         locks.

Patch #10 Consolidates reading statistics. This is very similar code
          for all devices, but the number of available statistics
          differ, which can be determined from the product ID. Removes
	  around 65 lines per driver.

Patch #11 Add #defines for registers, and bits within the
          registers. For the moment, this is limited to the shared
          code. The individual drivers will be converted once the
          remaining duplicated code is consolidated

Patch #12 Fix broken statistic counters on the 6172. The 6352 family
          requires the port number is poked into a different set of
          bits in the register compared to other devices.

Many thanks to Guenter Roeck for repeatedly reviewing the patches and
testing them on his hardware.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:41 -04:00
Andrew Lunn f3a8b6b6a1 net: dsa: mv88e6xxx: Fix stats counters for 6352 family
The statistic counters for the mv88e6172 never worked. This device is
a member of the 6352 family of chips, which has a slightly different
layout of the register used for capturing statistics. Add support for
detecting this family and poking the port in the right place in the
register.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:41 -04:00
Andrew Lunn cca8b13375 net: dsa: Use mnemonics rather than register numbers
Rather than refer to registers by number, define mnemonics. Also
define mnemonics for the commonly used bits within the registers.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:41 -04:00
Andrew Lunn e413e7e1f7 net: dsa: Consolidate getting the statistics
Reading the statistics from the hardware is the same for all
chips. What differs is the number of available statistics. Have just
one copy of the code in the shared mv88e6xxx.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:41 -04:00
Andrew Lunn 2f40c6981a net: dsa: mv88e6xxx: Add missing mutex's in EEE operations.
The phy_mutex should be held while reading and writing to the phy.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:41 -04:00
Andrew Lunn fd3a0ee406 net: dsa: Consolidate phy read and write functions
Move the common code for reading and writing phy registers into the
shared mv88e6xxx.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Andrew Lunn 4914358567 net: dsa: Move phy page access functions into shared code
These functions could in future be used by other drivers. Move them
into the shared area.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Andrew Lunn 143a83073a net: dsa: Centralize Marvell switch reset
Marvell switches are all reset in nearly the same way. The only
difference is if the PPU should be enabled or not. Move this
code into the shared mv88x6xxx.c.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Andrew Lunn 44e50ddbc7 net: dsa: Consistently set and use ps->num_ports
As a step towards consolidating code, consistently set the
number of ports in the private state structure, and make use of it in
loops.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Guenter Roeck 14ef6ad22a net: dsa: mv88e6123_61_65: Determine and use number of switch ports
Determine and use number of switch ports from chip ID instead of always
using the maximum, and return error when an attempt is made to access a
non-existing port.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Guenter Roeck d198893e73 net: dsa: mv88e6131: Determine and use number of switch ports
Determine and use number of switch ports from chip ID instead of always
using the maximum, and return error when an attempt is made to access a
non-existing port.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Guenter Roeck b2eb066277 net: dsa: mv88e6xxx: Move switch product IDs into common include file
This will let us use the switch product IDs in the common source code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Guenter Roeck 0d65da4a23 net: dsa: mv88e6131: Use common initialization functions
Common initialization functions will be needed to enable
HW bridging support.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:55:40 -04:00
Simon Horman 05e8bb860b pkt_sched: fq: correct spelling of locally
Correct spelling of locally.

Also remove extra space before tab character in struct fq_flow.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:52:29 -04:00
Simon Horman c4b495128c vxlan: correct spelling in comments
Fix some spelling / typos:
* droppped -> dropped
* asddress -> address
* compatbility -> compatibility

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:52:29 -04:00
stephen hemminger 7887456e9d vmxnet3: spelling fixes
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 22:52:29 -04:00
Joe Perches f1a8ff21d0 vxge: Add const to ethtool_driver_stats_keys
Move about half a KB of data to text.

Miscellanea:

o Move strings out of the .h file into the .c file
  in case the .h file is ever #included twice

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 15:35:14 -04:00
Tadeusz Struk 82d929207a crypto: algif - use kmalloc instead of kzalloc
No need to use kzalloc to allocate sgls as the structure is initialized anyway.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 15:32:35 -04:00
Tadeusz Struk bd50752034 crypto: af_alg - make exports consistant
Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 15:32:20 -04:00
Joe Perches 9ca683c6d1 chelsio cxgb/cxgb3: Make stats_strings arrays const
Move ~2KB of strings in each driver from data to text.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 14:41:20 -04:00
David S. Miller 45eb516887 Major changes:
ath9k:
 
 * add Active Interference Cancellation, a method implemented in the HW
   to counter WLAN RX > sensitivity degradation when BT is transmitting
   at the same time. This feature is supported by cards like WB222
   based on AR9462.
 
 iwlwifi:
 
 * Location Aware Regulatory was added by Arik
 * 8000 device family work
 * update to the BT Coex firmware API
 
 brmcfmac:
 
 * add new BCM43455 and BCM43457 SDIO device support
 * add new BCM43430 SDIO device support
 
 wil6210:
 
 * take care of AP bridging
 * fix NAPI behavior
 * found approach to achieve 4*n+2 alignment of Rx frames
 
 rt2x00:
 
 * add new rt2800usb device DWA 130
 
 rtlwifi:
 
 * add USB ID for D-Link DWA-131
 * add USB ID ASUS N10 WiFi dongle
 
 mwifiex:
 
 * throughput enhancements
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJVHATOAAoJEG4XJFUm622b4EsIAIMGOLb2GuqtxpN/Ei1TmUFV
 8B3KTLmeau/glqxquySQ2mIthDqijesbl0jyKWJP/+ZsXhjhpagXAIMw6E5KH3HN
 1XKCvyqbkGScTcheaS4HYFmKKoM0OlPnDKhybYtPiScW2kyQf8S9msbeEzLdYYen
 qYKMRq/J/QuobWvtapyGOBtyuVtuTrKuP8LzKQX9JAyKtM2si/iOvG7EiFmcAcis
 DGJBrwhy/i6oBoi6e6KGgxIpXJE9WHsMs2QBYpFkxV2SbzXTOyq1EMFJvMHCq927
 QfEsgOgAyVLfsXqN1uNK49eJtTuWRuJehEV88xjUbMXcYQNiaKdnYY6KvIBQ7XU=
 =POsk
 -----END PGP SIGNATURE-----

Merge tag 'wireless-drivers-next-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
Major changes:

ath9k:

* add Active Interference Cancellation, a method implemented in the HW
  to counter WLAN RX > sensitivity degradation when BT is transmitting
  at the same time. This feature is supported by cards like WB222
  based on AR9462.

iwlwifi:

* Location Aware Regulatory was added by Arik
* 8000 device family work
* update to the BT Coex firmware API

brmcfmac:

* add new BCM43455 and BCM43457 SDIO device support
* add new BCM43430 SDIO device support

wil6210:

* take care of AP bridging
* fix NAPI behavior
* found approach to achieve 4*n+2 alignment of Rx frames

rt2x00:

* add new rt2800usb device DWA 130

rtlwifi:

* add USB ID for D-Link DWA-131
* add USB ID ASUS N10 WiFi dongle

mwifiex:

* throughput enhancements
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 14:27:28 -04:00
David S. Miller b9600d2d09 linux-can-next-for-4.1-20150401
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJVG8DxAAoJECte4hHFiupUkFkP+QEDROmDdcYQPRqNgVXvbNxo
 +uFBI+Y9ttnm+WCR9tu2v2NDuFsbPaD5ckK/idDypSS9tcQWcZqS8odPq9lFYTqu
 OvfH3lMT82myZf7MT6evn3l6Zwm3UM0fXRxvflpUyFsM8h8quOkhx+ckHK9rjhU7
 vEDRDbg1r2xAvQcAm0ACwTCKIxqtf+xnRKwarR+q/1hiHUOmd455cR6uUc+ydAbt
 94J4ltnUmpZOgBiNmhZBrD29cheKmwqVEsiv5RcFaRbilJmWM8HFOjsocMAbaz8O
 hoV8TQbQY1m2fc+sqBlJUr2YYBGnU1jHzhVP9fgAAvhjZGmRXT5zcEorN4m8sGn2
 6/slVnkeUyy3wgrmqphk81qd86nTd51gMaI5ixs19eG4epjcQ04ORAZs4zkxVQDo
 wUNDS1CLdoGztJUjf4+fEjfU9FXXIrBbyXbpXGiNwogXpFCzSj+NNtEyuzaRlSok
 72mn7ATxSKsrK0t0WJLv/m0mJfOPikQ1YN60g4SxLLlpK+dFarzojQLVyLrJGWxR
 cnseiB0IV2PvuV1RRrBntbXWK+rO4Y2PCMt46Hx63NrxwOzffa0s6MjXg3xLMc3p
 kl0RmoA/lDsIem0iBKF5PysOe7UsjklUO1jgqE53359FQDJDtg5N/BtnpB4wFQh5
 NlfJ6q+TG58jYhiiONFN
 =+qN4
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-next-for-4.1-20150401' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2015-04-01

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

There are two patches for the ems_usb driver by Gerhard Uttenthaler and
me, which fix sparse endianess warnings. Oliver Hartkopp adds two
patches to improve and extend the CAN-ID filter handling on RAW CAN
sockets. The last patch is by me, it silences an uninitialized variable
warning in the peak_usb driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 13:58:06 -04:00
Petri Gynther 8d88c6ebb3 net: bcmgenet: enable MoCA link state change detection
Currently, MoCA fixed PHYs are always in link-up state, regardless of
whether the link is actually up or not.

Add code to properly detect MoCA link state changes and to reflect the
new state in MoCA fixed PHY. Only GENET V3 and V4 MACs are capable of
detecting MoCA link state changes.

The code works as follows:
1. GENET MAC detects MoCA link state change and issues UMAC_IRQ_LINK_UP
   or UMAC_IRQ_LINK_DOWN interrupt.
2. Link up/down interrupt is processed in bcmgenet_irq_task(), which
   calls phy_mac_interrupt().
3. phy_mac_interrupt() updates the fixed PHY phydev->link and kicks
   the PHY state machine.
4. PHY state machine proceeds to read the fixed PHY link status
   register.
5. When the fixed PHY link status register is being read, the new
   function bcmgenet_fixed_phy_link_update() gets called. It copies
   the fixed PHY phydev->link value to the fixed PHY status->link.
6. PHY state machine receives the new link state of the fixed PHY.
7. MoCA fixed PHY link state now correctly reflects the real MoCA
   hardware link state.

Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 13:40:18 -04:00
Uwe Kleine-König 687908c2b6 net: phy: at803x: simplify using devm_gpiod_get_optional and its 4th argument
Since 39b2bbe3d7 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.
Moreover use devm_gpiod_get_optional instead of ignoring all errors
returned by devm_gpiod_get and simplify accordingly.

The result is more strict error handling which is good.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 12:44:04 -04:00
Rasmus Villemoes 906a7985f7 caif: remove unused struct member
The tty_name member of struct ser_device is never set or used, so it
can be removed. (The definition of struct ser_device is private to
this .c file, and the identifier tty_name only occurs in this one
place.)

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-01 12:43:09 -04:00
Marc Kleine-Budde 79d5eeddd7 can: pcan_usb: pcan_usb_fd_send_cmd(): silence compiler warning about uninitialized var
This patch silences the compiler warning:

drivers/net/can/usb/peak_usb/pcan_usb_fd.c: In function 'pcan_usb_fd_send_cmd':
drivers/net/can/usb/peak_usb/pcan_usb_fd.c:185:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized]

by initialising the variable as 0.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01 11:49:59 +02:00
Oliver Hartkopp a5581ef4c2 can: introduce new raw socket option to join the given CAN filters
The CAN_RAW socket can set multiple CAN identifier specific filters that lead
to multiple filters in the af_can.c filter processing. These filters are
indenpendent from each other which leads to logical OR'ed filters when applied.

This socket option joines the given CAN filters in the way that only CAN frames
are passed to user space that matched *all* given CAN filters. The semantic for
the applied filters is therefore changed to a logical AND.

This is useful especially when the filterset is a combination of filters where
the CAN_INV_FILTER flag is set in order to notch single CAN IDs or CAN ID
ranges from the incoming traffic.

As the raw_rcv() function is executed from NET_RX softirq the introduced
variables are implemented as per-CPU variables to avoid extensive locking at
CAN frame reception time.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01 11:28:22 +02:00
Oliver Hartkopp 514ac99c64 can: fix multiple delivery of a single CAN frame for overlapping CAN filters
The CAN_RAW socket can set multiple CAN identifier specific filters that lead
to multiple filters in the af_can.c filter processing. These filters are
indenpendent from each other which leads to logical OR'ed filters when applied.

This patch makes sure that every CAN frame which is filtered for a specific
socket is only delivered once to the user space. This is independent from the
number of matching CAN filters of this socket.

As the raw_rcv() function is executed from NET_RX softirq the introduced
variables are implemented as per-CPU variables to avoid extensive locking at
CAN frame reception time.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01 11:27:41 +02:00
Marc Kleine-Budde a0bc163a7c can: ems_usb: mark timestamp as little endian
The struct ems_cpc_msg describes the a message received from the USB device,
which uses little endian byte order. This patch marks the timestamp in struct
ems_cpc_msg accordingly.

Acked-by: Gerhard Uttenthaler <uttenthaler@ems-wuensche.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01 11:08:56 +02:00
Gerhard Uttenthaler 8a4b5b0fb7 can: ems_usb: fix endianess of CAN ID
The device expects the CAN ID in little endian format.

Signed-off-by: Gerhard Uttenthaler <uttenthaler@ems-wuensche.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-04-01 11:08:55 +02:00
David S. Miller 9911674fcf Merge branch 'ptp-ns_to_timespec64'
Richard Cochran says:

====================
ptp: remove open coded ns_to_timespec64 and reverse

This patch series is a follow up to the recent timespec64 work for the
PTP Hardware Clock drivers.  Arnd noticed that drivers are using open
coded implementations of ns_to_timespec64 and timespec64_to_ns.  This
series replaces the open coded logic with the helper functions.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran 0704fae33c ptp: ixgbe: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() and
timespec64_to_ns() instead of open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran 6630514fce ptp: fec: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() and
timespec64_to_ns() instead of open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran 7a20efb074 ptp: tg3: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() instead of
open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran 96ff1c37a8 ptp: blackfin: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() and
timespec64_to_ns() instead of open coding the same logic.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran 84d923ce4a ptp: cpts: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() and
timespec64_to_ns() instead of open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran e7ea55be29 ptp: stmmac: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() instead of
open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran f75419c81e ptp: mlx4: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() instead of
open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran 350f66d58a ptp: igb: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() and
timespec64_to_ns() instead of open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:19 -04:00
Richard Cochran bdf36d9471 ptp: e1000e: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() instead of
open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:18 -04:00
Richard Cochran 3359e7c2e9 ptp: gianfar: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() and
timespec64_to_ns() instead of open coding the same logic.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:18 -04:00
Richard Cochran f7dcdefe36 ptp: bnx2x: use helpers for converting ns to timespec.
This patch changes the driver to use ns_to_timespec64() and
timespec64_to_ns() instead of open coding the same logic.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:19:18 -04:00
Mahesh Bandewar f6a69a8fd6 bonding: Fix another case of LACPDU not sent on slave
When mii-mon discovers that the link is up, it will call
bond_3ad_handle_link_change() but we forget to add the LACP_ENABLED
flag when we discover the speed and duplex for the slave link are
normal.

Change-Id: Ie8b268ecfeea0f99bf9fdcd72706c0653f9d9e49
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:14:26 -04:00
Mahesh Bandewar ef015d72e5 bonding: deprecate BOND_MONITOR_CHURNED in favor of existing definitions
AD_PORT_ACTOR_CHURN and AD_PORT_PARTNER_CHURN are already present and
essentially BOND_MONITOR_CHURNED is a combination of these two definitions.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 17:14:26 -04:00
David S. Miller ec9a82fbb1 Merge branch 'macb-next'
Nicolas Ferre says:

====================
net/macb: fixes after big driver update

The recent modifications to the macb driver lead to issues with the probe
function code flow. Here are some attempt to fix them.
This time, some more issues are fixed related to the clock as reported by Boris
Brezillon.

The series is written on top of net-next.

Changes in v2:
- address Cyrille comment about exit condition of queue configuration loop
- add fixes for probe sequence related to clocks
- add ethtool register dump
- fix peripheral version test
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 16:51:18 -04:00
Nicolas Ferre fa6935981a net/macb: unify peripheral version testing
As we need to check peripheral version from the hardware during probe, I
introduce a little helper to unify these tests. It would prevent to
de-synchronize the test like previously observed.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 16:51:17 -04:00
Nicolas Ferre 361918970b net/macb: fix the peripheral version test
We currently need two checks of the peripheral version in MACB_MID register.
One of them got out of sync after modification by 8a013a9c71 (net: macb:
Include multi queue support for xilinx ZynqMP ethernet version).
Fix this in macb_configure_caps() so that xilinx ZynqMP will be considered
as a GEM flavor.

Fixes: 8a013a9c71 ("net: macb: Include multi queue support for xilinx ZynqMP
ethernet version")

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Cc: <stable@vger.kernel.org> #4.0 (if it doesn't make it for -final)
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-31 16:51:17 -04:00