1. 10 Feb, 2017 40 commits
    • Jakub Kicinski's avatar
      nfp: rename the driver and add new main file · 2633beb9
      Jakub Kicinski authored
      Support for the PF driver is about to be added and will share
      much of the code.  When the VF driver was added we planned to
      maintain the PF driver as a separate module but have decided
      that for our simple use case just maintaining a single module
      is more reasonable.  Rename the driver to just "nfp" and update
      the Kconfig.
      
      While at it remove latent references to NFP3200.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2633beb9
    • Jakub Kicinski's avatar
      bitfield.h: add FIELD_FIT() helper · 1697599e
      Jakub Kicinski authored
      Add a helper for checking at runtime that a value will fit inside
      a specified field/mask.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1697599e
    • David S. Miller's avatar
      Merge branch 'devlink-small-cleanups' · 4f2bd6b3
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      devlink: small cleanup around eswitch [sg]et
      
      Contains small devlink cleanup around eswitch get/set commands.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f2bd6b3
    • Jiri Pirko's avatar
      devlink: allow to fillup eswitch attrs even if mode_get op does not exist · 4456f61c
      Jiri Pirko authored
      Even when mode_get op is not present, other eswitch attrs need to be
      filled-up.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4456f61c
    • Jiri Pirko's avatar
      devlink: use nla_put_failure goto label instead of out · 1a6aa36b
      Jiri Pirko authored
      Be aligned with the rest of the code and use label named nla_put_failure.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1a6aa36b
    • Jiri Pirko's avatar
      devlink: rename devlink_eswitch_fill to devlink_nl_eswitch_fill · 21e3d2dd
      Jiri Pirko authored
      Be aligned with the rest of the file and name the helper function
      accordingly.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21e3d2dd
    • Jiri Pirko's avatar
      devlink: fix the name of eswitch commands · adf200f3
      Jiri Pirko authored
      The eswitch_[gs]et command is supposed to be similar to port_[gs]et
      command - for multiple eswitch attributes. However, when it was introduced
      by 08f4b591 ("net/devlink: Add E-Switch mode control") it was wrongly
      named with the word "mode" in it. So fix this now, make the oririnal
      enum value existing but obsolete.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adf200f3
    • David S. Miller's avatar
      Merge tag 'mac80211-next-for-davem-2017-02-09' of... · 0d2164af
      David S. Miller authored
      Merge tag 'mac80211-next-for-davem-2017-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      Some more updates:
       * use shash in mac80211 crypto code where applicable
       * some documentation fixes
       * pass RSSI levels up in change notifications
       * remove unused rfkill-regulator
       * various other cleanups
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d2164af
    • Ivan Khoronzhuk's avatar
      net: ethernet: ti: netcp_core: remove netif_trans_update · 1deeaa0b
      Ivan Khoronzhuk authored
      No need to update jiffies in txq->trans_start twice and only for tx 0,
      it's supposed to be done in netdev_start_xmit() and per tx queue.
      Signed-off-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1deeaa0b
    • David S. Miller's avatar
      Merge branch 'dsa-phy-include' · 1254856c
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: dsa: remove unnecessary phy.h include
      
      Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an
      unnecessary dependency for quite a large amount of the kernel.  There's
      very little which actually requires definitions from phy.h in net/dsa.h
      - the include itself only wants the declaration of a couple of
      structures and IFNAMSIZ.
      
      Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to
      mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h
      and phy_fixed.h from net/dsa.h.
      
      This patch reduces from around 800 files rebuilt to around 40 - even
      with ccache, the time difference is noticable.
      
      In order to make this change, several drivers need to be updated to
      include necessary headers that they were picking up through this
      include.  This has resulted in a much larger patch series.
      
      I'm assuming the 0-day builder has had 24 hours with this series, and
      hasn't reported any further issues with it - the last issue was two
      weeks ago (before I became ill) which I fixed over the last weekend.
      
      I'm hoping this doesn't conflict with what's already in net-next...
      
      David, this should probably go via your tree considering the diffstat.
      
      Changes in v2:
      
      - took Russell's patch series
      - removed Qualcomm EMAC patch
      - rebased against net-next/master
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1254856c
    • Russell King's avatar
      net: dsa: remove unnecessary phy*.h includes · 4d56a29f
      Russell King authored
      Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an
      unnecessary dependency for quite a large amount of the kernel.  There's
      very little which actually requires definitions from phy.h in net/dsa.h
      - the include itself only wants the declaration of a couple of
      structures and IFNAMSIZ.
      
      Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to
      mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h
      and phy_fixed.h from net/dsa.h.
      
      This patch reduces from around 800 files rebuilt to around 40 - even
      with ccache, the time difference is noticable.
      Tested-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d56a29f
    • Russell King's avatar
      net: ath5k: fix build errors when linux/phy*.h is removed from net/dsa.h · 7ecb6227
      Russell King authored
      Fix these errors reported by the 0-day builder by replacing the
      linux/export.h include with linux/module.h.
      
      In file included from include/linux/platform_device.h:14:0,
                       from drivers/net/wireless/ath/ath5k/ahb.c:20:
      include/linux/device.h:1463:1: warning: data definition has no type or storage class
       module_init(__driver##_init); \
       ^
      include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
        module_driver(__platform_driver, platform_driver_register, \
        ^~~~~~~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
       module_platform_driver(ath_ahb_driver);
       ^~~~~~~~~~~~~~~~~~~~~~
      include/linux/device.h:1463:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
       module_init(__driver##_init); \
       ^
      include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
        module_driver(__platform_driver, platform_driver_register, \
        ^~~~~~~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
       module_platform_driver(ath_ahb_driver);
       ^~~~~~~~~~~~~~~~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration
      In file included from include/linux/platform_device.h:14:0,
                       from drivers/net/wireless/ath/ath5k/ahb.c:20:
      include/linux/device.h:1468:1: warning: data definition has no type or storage class
       module_exit(__driver##_exit);
       ^
      include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
        module_driver(__platform_driver, platform_driver_register, \
        ^~~~~~~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
       module_platform_driver(ath_ahb_driver);
       ^~~~~~~~~~~~~~~~~~~~~~
      include/linux/device.h:1468:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
       module_exit(__driver##_exit);
       ^
      include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
        module_driver(__platform_driver, platform_driver_register, \
        ^~~~~~~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
       module_platform_driver(ath_ahb_driver);
       ^~~~~~~~~~~~~~~~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: warning: parameter names (without types) in function declaration
      In file included from include/linux/platform_device.h:14:0,
                       from drivers/net/wireless/ath/ath5k/ahb.c:20:
      drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_exit' defined but not used [-Wunused-function]
       module_platform_driver(ath_ahb_driver);
                              ^
      include/linux/device.h:1464:20: note: in definition of macro 'module_driver'
       static void __exit __driver##_exit(void) \
                          ^~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
       module_platform_driver(ath_ahb_driver);
       ^~~~~~~~~~~~~~~~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:24: warning: 'ath_ahb_driver_init' defined but not used [-Wunused-function]
       module_platform_driver(ath_ahb_driver);
                              ^
      include/linux/device.h:1459:19: note: in definition of macro 'module_driver'
       static int __init __driver##_init(void) \
                         ^~~~~~~~
      drivers/net/wireless/ath/ath5k/ahb.c:233:1: note: in expansion of macro 'module_platform_driver'
       module_platform_driver(ath_ahb_driver);
       ^~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ecb6227
    • Russell King's avatar
      net: liquidio: fix build errors when linux/phy*.h is removed from net/dsa.h · e3bfc6e7
      Russell King authored
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:31: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: type defaults to 'int' in declaration of 'MODULE_LICENSE'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:32: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: type defaults to 'int' in declaration of 'MODULE_VERSION'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:33: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:36: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:37: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:325: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: error: type defaults to 'int' in declaration of 'module_init'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3250: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: error: type defaults to 'int' in declaration of 'module_exit'
      drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:3251: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:36: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:37: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: type defaults to 'int' in declaration of 'MODULE_LICENSE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:38: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: type defaults to 'int' in declaration of 'MODULE_VERSION'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:39: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:40: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:41: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:42: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: expected declaration specifiers or '...' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: type defaults to 'int' in declaration of 'MODULE_FIRMWARE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:43: error: function declaration isn't a prototype
      drivers/net/ethernet/cavium/liquidio/lio_main.c:46: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:48: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:53: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:54: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:57: error: expected ')' before 'sizeof'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:58: error: expected ')' before string constant
      drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: data definitionhas no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:498: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:498: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_recv_vf_drv_notice':
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4393: error: implicit declaration of function 'try_module_get'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4400: error: implicit declaration of function 'module_put'
      drivers/net/ethernet/cavium/liquidio/lio_main.c: At top level:
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: error: type defaults to 'int' in declaration of 'module_init'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4670: warning: parameter names (without types) in function declaration
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: data definition has no type or storage class
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: error: type defaults to 'int' in declaration of 'module_exit'
      drivers/net/ethernet/cavium/liquidio/lio_main.c:4671: warning: parameter names (without types) in function declaration
      
      Add linux/module.h to both these files.
      
      drivers/net/ethernet/cavium/liquidio/octeon_console.c:40:31: error: expected ')' before 'int'
      drivers/net/ethernet/cavium/liquidio/octeon_console.c:42:4: error: expected ')' before string constant
      
      Add linux/moduleparam.h to this file.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3bfc6e7
    • Russell King's avatar
      MIPS: Octeon: Remove unnecessary MODULE_*() · 7ca2ea82
      Russell King authored
      octeon-platform.c can not be built as a module for two reasons:
      
      (a) the Makefile doesn't allow it:
          obj-y := cpu.o setup.o octeon-platform.o octeon-irq.o csrc-octeon.o
      
      (b) the multiple *_initcall() statements, each of which are translated
          to a module_init() call when attempting a module build, become
          aliases to init_module().  Having more than one alias will cause a
          build error.
      
      Hence, rather than adding a linux/module.h include, remove the redundant
      MODULE_*() from this file.
      Acked-by: default avatarDavid Daney <david.daney@cavium.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ca2ea82
    • Russell King's avatar
      iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h · da5df620
      Russell King authored
      drivers/target/iscsi/iscsi_target_login.c:1135:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration]
      
      Add linux/module.h to iscsi_target_login.c.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da5df620
    • Russell King's avatar
      net: mvneta: fix build errors when linux/phy*.h is removed from net/dsa.h · 9303ab2b
      Russell King authored
      drivers/net/ethernet/marvell/mvneta.c:2694:26: error: storage size of 'status' isn't known
      drivers/net/ethernet/marvell/mvneta.c:2695:26: error: storage size of 'changed' isn't known
      drivers/net/ethernet/marvell/mvneta.c:2695:9: error: variable 'changed' has initializer but incomplete type
      drivers/net/ethernet/marvell/mvneta.c:2709:2: error: implicit declaration of function 'fixed_phy_update_state' [-Werror=implicit-function-declaration]
      
      Add linux/phy_fixed.h to mvneta.c
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9303ab2b
    • Russell King's avatar
      net: fman: fix build errors when linux/phy*.h is removed from net/dsa.h · f225e4e6
      Russell King authored
      drivers/net/ethernet/freescale/fman/fman_memac.c:519:21: error: dereferencing pointer to incomplete type 'struct fixed_phy_status'
      
      Add linux/phy_fixed.h to fman_memac.c
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f225e4e6
    • Russell King's avatar
      net: bgmac: fix build errors when linux/phy*.h is removed from net/dsa.h · 13bf7760
      Russell King authored
      drivers/net/ethernet/broadcom/bgmac.c:1015:17: error: dereferencing pointer to incomplete type 'struct mii_bus'
      drivers/net/ethernet/broadcom/bgmac.c:1185:2: error: implicit declaration of function 'phy_start' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/broadcom/bgmac.c:1198:2: error: implicit declaration of function 'phy_stop' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/broadcom/bgmac.c:1239:9: error: implicit declaration of function 'phy_mii_ioctl' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/broadcom/bgmac.c:1389:28: error: 'phy_ethtool_get_link_ksettings' undeclared here (not in a function)
      drivers/net/ethernet/broadcom/bgmac.c:1390:28: error: 'phy_ethtool_set_link_ksettings' undeclared here (not in a function)
      drivers/net/ethernet/broadcom/bgmac.c:1403:13: error: dereferencing pointer to incomplete type 'struct phy_device'
      drivers/net/ethernet/broadcom/bgmac.c:1417:3: error: implicit declaration of function 'phy_print_status' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/broadcom/bgmac.c:1424:26: error: storage size of 'fphy_status' isn't known
      drivers/net/ethernet/broadcom/bgmac.c:1424:9: error: variable 'fphy_status' has initializer but incomplete type
      drivers/net/ethernet/broadcom/bgmac.c:1425:11: warning: excess elements in struct initializer
      drivers/net/ethernet/broadcom/bgmac.c:1425:3: error: unknown field 'link' specified in initializer
      drivers/net/ethernet/broadcom/bgmac.c:1426:12: note: in expansion of macro 'SPEED_1000'
      drivers/net/ethernet/broadcom/bgmac.c:1426:3: error: unknown field 'speed' specified in initializer
      drivers/net/ethernet/broadcom/bgmac.c:1427:13: note: in expansion of macro 'DUPLEX_FULL'
      drivers/net/ethernet/broadcom/bgmac.c:1427:3: error: unknown field 'duplex' specified in initializer
      drivers/net/ethernet/broadcom/bgmac.c:1432:12: error: implicit declaration of function 'fixed_phy_register' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/broadcom/bgmac.c:1432:31: error: 'PHY_POLL' undeclared (first use in this function)
      drivers/net/ethernet/broadcom/bgmac.c:1438:8: error: implicit declaration of function 'phy_connect_direct' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/broadcom/bgmac.c:1439:6: error: 'PHY_INTERFACE_MODE_MII' undeclared (first use in this function)
      drivers/net/ethernet/broadcom/bgmac.c:1521:2: error: implicit declaration of function 'phy_disconnect' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/broadcom/bgmac.c:1541:15: error: expected declaration specifiers or '...' before string constant
      
      Add linux/phy.h to bgmac.c
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13bf7760
    • Russell King's avatar
      net: lan78xx: fix build errors when linux/phy*.h is removed from net/dsa.h · 8c56ea41
      Russell King authored
      drivers/net/usb/lan78xx.c:394:33: sparse: expected ; at end of declaration
      drivers/net/usb/lan78xx.c:394:33: sparse: Expected } at end of struct-union-enum-specifier
      drivers/net/usb/lan78xx.c:394:33: sparse: got interface
      drivers/net/usb/lan78xx.c:403:1: sparse: Expected ; at the end of type declaration
      drivers/net/usb/lan78xx.c:403:1: sparse: got }
      
      Add linux/phy.h to lan78xx.c
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c56ea41
    • Russell King's avatar
      net: macb: fix build errors when linux/phy*.h is removed from net/dsa.h · fc182b85
      Russell King authored
      drivers/net/ethernet/cadence/macb.h:862:33: sparse: expected ; at end of declaration
      drivers/net/ethernet/cadence/macb.h:862:33: sparse: Expected } at end of struct-union-enum-specifier
      drivers/net/ethernet/cadence/macb.h:862:33: sparse: got phy_interface
      drivers/net/ethernet/cadence/macb.h:877:1: sparse: Expected ; at the end of type declaration
      drivers/net/ethernet/cadence/macb.h:877:1: sparse: got }
      In file included from drivers/net/ethernet/cadence/macb_pci.c:29:0:
      drivers/net/ethernet/cadence/macb.h:862:2: error: unknown type name 'phy_interface_t'
           phy_interface_t  phy_interface;
           ^~~~~~~~~~~~~~~
      
      Add linux/phy.h to macb.h
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc182b85
    • Russell King's avatar
      net: cgroups: fix build errors when linux/phy*.h is removed from net/dsa.h · 43cc277a
      Russell King authored
      net/core/netprio_cgroup.c:303:16: error: expected declaration specifiers or '...' before string constant
          MODULE_LICENSE("GPL v2");
                         ^~~~~~~~
      
      Add linux/module.h to fix this.
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43cc277a
    • Russell King's avatar
      net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.h · f39b2dde
      Russell King authored
      Removing linux/phy.h from net/dsa.h reveals a build error in the sunrpc
      code:
      
      net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_rdma_bc_put':
      net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit declaration of function 'module_put' [-Werror=implicit-function-declaration]
      net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_setup_rdma_bc':
      net/sunrpc/xprtrdma/svc_rdma_backchannel.c:348:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration]
      
      Fix this by adding linux/module.h to svc_rdma_backchannel.c
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f39b2dde
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-for-davem-2017-02-09' of... · e3f29c48
      David S. Miller authored
      Merge tag 'wireless-drivers-next-for-davem-2017-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for 4.11
      
      Mostly smaller changeds and fixes all over, nothing really major
      standing out.
      
      Major changes:
      
      iwlwifi
      
      * work on support for new A000 devices continues
      * fix 802.11w, which was failing to due an IGTK bug
      
      ath10k
      
      * add debugfs file peer_debug_trigger for debugging firmware
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3f29c48
    • Jiri Pirko's avatar
      spectrum: flower: Treat ETH_P_ALL as a special case and translate for HW · dc371700
      Jiri Pirko authored
      HW does not understand ETH_P_ALL. So treat this special case differently
      and translate to 0/0 key/mask. That will allow HW to match all ethertypes.
      
      Fixes: 7aa0f5aa ("mlxsw: spectrum: Implement TC flower offload")
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc371700
    • David S. Miller's avatar
      Merge branch 'net-checkpatch' · 201dacbb
      David S. Miller authored
      Tobin C. Harding says:
      
      ====================
      Whitespace checkpatch fixes
      
      This patch set fixes various whitespace checkpatch errors and warnings.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      201dacbb
    • tcharding's avatar
      net: Fix checkpatch, Missing a blank line after declarations · f4563a75
      tcharding authored
      This patch fixes multiple occurrences of checkpatch WARNING: Missing
      a blank line after declarations.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f4563a75
    • tcharding's avatar
      net: Fix checkpatch block comments warnings · eb13da1a
      tcharding authored
      Fix multiple occurrences of checkpatch warning. WARNING: Block
      comments use * on subsequent lines. Also make comment blocks
      more uniform.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb13da1a
    • tcharding's avatar
      net: Fix checkpatch whitespace errors · 643aa9cb
      tcharding authored
      This patch fixes two trivial whitespace errors. Brace should be
      on the previous line and trailing statements should be on next line.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      643aa9cb
    • tcharding's avatar
      net: Fix checkpatch WARNING: please, no space before tabs · 722c9a0c
      tcharding authored
      This patch fixes multiple occurrences of space before tabs warnings.
      More lines of code were moved than required to keep kernel-doc
      comments uniform.
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      722c9a0c
    • David S. Miller's avatar
      Merge branch 'act_pedit-relative-offset' · b668b903
      David S. Miller authored
      Amir Vadai says:
      
      ====================
      net/sched: act_pedit: Use offset relative to conventional network headers
      
      Some FW/HW parser APIs are such that they need to get the specific header type (e.g
      IPV4 or IPV6, TCP or UDP) and not only the networking level (e.g network or transport).
      
      Enhancing the UAPI to allow for specifying that, would allow the same flows to be
      set into both SW and HW.
      
      This patchset also makes pedit more robust. Currently fields offset is specified
      by offset relative to the ip header, while using negative offsets for
      MAC layer fields.
      
      This series enables the user to set offset relative to the relevant header.
      
      Usage example:
      $ tc filter add dev enp0s9 protocol ip parent ffff: \
         flower \
           ip_proto tcp \
          dst_port 80 \
         action \
             pedit munge ip ttl add 0xff \
             pedit munge tcp dport set 8080 \
           pipe action mirred egress redirect dev veth0
      
      Will forward traffic destined to tcp dport 80, while modifying the
      destination port to 8080, and decreasing the ttl by one.
      
      I've uploaded a draft for the userspace [2] to make it easier to review and
      test the patchset.
      
      [1] - http://patchwork.ozlabs.org/patch/700909/
      [2] - git: https://bitbucket.org/av42/iproute2.git
            branch: pedit
      
      Patchset was tested and applied on top of upstream commit bd092ad1 ("Merge
      branch 'remove-__napi_complete_done'")
      
      Thanks,
      Amir
      
      Changes since V2:
      - Instead of reusing unused bits in existing uapi fields, using new netlink
      	attributes for the new information. This way new/old user space and new/old
      	kernel can live together without having misunderstandings.
      
      Changes since V1:
      - No changes - V1 was sent and didn't make it for 4.10.
      - You asked me [1] why did I use specific header names instead of layers (L2,
      	L3...), and I explained that it is on purpose, this extra information is
      	planned to be used by hardware drivers to offload the action.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b668b903
    • Amir Vadai's avatar
      net/act_pedit: Introduce 'add' operation · 853a14ba
      Amir Vadai authored
      This command could be useful to inc/dec fields.
      
      For example, to forward any TCP packet and decrease its TTL:
      $ tc filter add dev enp0s9 protocol ip parent ffff: \
          flower ip_proto tcp \
          action pedit munge ip ttl add 0xff pipe \
          action mirred egress redirect dev veth0
      
      In the example above, adding 0xff to this u8 field is actually
      decreasing it by one, since the operation is masked.
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      853a14ba
    • Amir Vadai's avatar
      net/act_pedit: Support using offset relative to the conventional network headers · 71d0ed70
      Amir Vadai authored
      Extend pedit to enable the user setting offset relative to network
      headers. This change would enable to work with more complex header
      schemes (vs the simple IPv4 case) where setting a fixed offset relative
      to the network header is not enough.
      
      After this patch, the action has information about the exact header type
      and field inside this header. This information could be used later on
      for hardware offloading of pedit.
      
      Backward compatibility was being kept:
      1. Old kernel <-> new userspace
      2. New kernel <-> old userspace
      3. add rule using new userspace <-> dump using old userspace
      4. add rule using old userspace <-> dump using new userspace
      
      When using the extended api, new netlink attributes are being used. This
      way, operation will fail in (1) and (3) - and no malformed rule be added
      or dumped. Of course, new user space that doesn't need the new
      functionality can use the old netlink attributes and operation will
      succeed.
      Since action can support both api's, (2) should work, and it is easy to
      write the new user space to have (4) work.
      
      The action is having a strict check that only header types and commands
      it can handle are accepted. This way future additions will be much
      easier.
      
      Usage example:
      $ tc filter add dev enp0s9 protocol ip parent ffff: \
        flower \
          ip_proto tcp \
          dst_port 80 \
        action pedit munge tcp dport set 8080 pipe \
        action mirred egress redirect dev veth0
      
      Will forward tcp port whose original dest port is 80, while modifying
      the destination port to 8080.
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71d0ed70
    • Amir Vadai's avatar
      net/skbuff: Introduce skb_mac_offset() · ea6da4fd
      Amir Vadai authored
      Introduce skb_mac_offset() that could be used to get mac header offset.
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ea6da4fd
    • David S. Miller's avatar
      Merge branch 'mlxsw-offload-mc-flood' · 58be2427
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      mlxsw: Offload MC flood for unregister MC
      
      Nogah says:
      
      When multicast is enabled, the Linux bridge floods unregistered multicast
      packets only to ports connected to a multicast router. Devices capable of
      offloading the Linux bridge need to be made aware of such ports, for
      proper flooding behavior.
      On the other hand, when multicast is disabled, such packets should be
      flooded to all ports. This patchset aims to fix that, by offloading
      the multicast state and the list of multicast router ports.
      
      The first 3 patches adds switchdev attributes to offload this data.
      The rest of the patchset add implementation for handling this data in the
      mlxsw driver.
      
      The effects this data has on the MDB (namely, when the multicast is
      disabled the MDB should be considered as invalid, and when it is enabled, a
      packet that is flooded by it should also be flooded to the multicast
      routers ports) is subject of future work.
      
      Testing of this patchset included:
      Sending 3 mc packets streams, LL, register and unregistered, and checking
      that they reached only to the ports that should have received them.
      The configs were:
      mc disabled, mc without mc router ports and mc with fixed router port.
      It was checked for vlan aware bridge, vlan unaware bridge and vlan unaware
      bridge with another vlan unaware bridge on the same machine
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      58be2427
    • Nogah Frankel's avatar
      mlxsw: spectrum: Update mc_disabled flag by switchdev attr · 90e0f0c1
      Nogah Frankel authored
      Add a function to update mc_disabled from switchdev attr
      SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90e0f0c1
    • Nogah Frankel's avatar
      mlxsw: spectrum: Extend port_orig_get for bridge devices · 1e5d9432
      Nogah Frankel authored
      The function mlxsw_sp_port_orig_get returns the vport from the physical
      port if needed, based on the original device.
      This patch addresses the case where the original device is a bridge.
      If it is vlan unaware bridge, it returns the matching vport. If it is vlan
      aware bridge, there is no matching vport, and it returns the original port.
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e5d9432
    • Nogah Frankel's avatar
      mlxsw: spectrum: Add an option to flood mc by mc_router_port · 8ecd4591
      Nogah Frankel authored
      The decision whether to flood a multicast packet to a port dependent
      on three flags: mc_disabled, mc_router_port, mc_flood.
      
      If mc_disabled is on, the port will be flooded according to mc_flood,
      otherwise, according to mc_router_port. To accomplish that, add those
      flags into the mlxsw_sp_port struct and update the mc flood table
      accordingly.
      
      Update mc_router_port by switchdev attribute
      SWITCHDEV_ATTR_ID_PORT_MC_ROUTER_PORT.
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ecd4591
    • Nogah Frankel's avatar
      mlxsw: spectrum: Separate bc and mc floods · 71c365bd
      Nogah Frankel authored
      Break the bm (broadcast-multicast) into two tables, one for broadcast
      (and link local multicast that behaves like bc) and one for unknown
      multicasts.
      Add a bool into mlxsw_sp_port named mc_flood that reflect the value this
      port should have in the mc flood table (currently, always 1);
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71c365bd
    • Nogah Frankel's avatar
      mlxsw: spectrum: Change max vfid · 63fe813c
      Nogah Frankel authored
      A user that wants many bridges will use 1.Q bridge which are scalable.
      One can have as many 1.Q bridges as vfids.
      This patch sets their number to 1k, which is a reasonably large number.
      This change is done here because the next patches will add a new flood
      table, and without it, it will increase the overall size of the flood
      tables dramatically.
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      63fe813c
    • Nogah Frankel's avatar
      mlxsw: spectrum: Make port flood update more generic · 69be01f3
      Nogah Frankel authored
      Currently, there is a per port flood update function only for the UC
      table. Make the function  more generic by changing the table type to be
      an input.
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarYotam Gigi <yotamg@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69be01f3