1. 30 6月, 2017 1 次提交
  2. 05 6月, 2017 1 次提交
  3. 03 5月, 2017 1 次提交
  4. 20 4月, 2017 1 次提交
    • D
      Annotate hardware config module parameters in drivers/net/ethernet/ · df298408
      David Howells 提交于
      When the kernel is running in secure boot mode, we lock down the kernel to
      prevent userspace from modifying the running kernel image.  Whilst this
      includes prohibiting access to things like /dev/mem, it must also prevent
      access by means of configuring driver modules in such a way as to cause a
      device to access or modify the kernel image.
      
      To this end, annotate module_param* statements that refer to hardware
      configuration and indicate for future reference what type of parameter they
      specify.  The parameter parser in the core sees this information and can
      skip such parameters with an error message if the kernel is locked down.
      The module initialisation then runs as normal, but just sees whatever the
      default values for those parameters is.
      
      Note that we do still need to do the module initialisation because some
      drivers have viable defaults set in case parameters aren't specified and
      some drivers support automatic configuration (e.g. PNP or PCI) in addition
      to manually coded parameters.
      
      This patch annotates drivers in drivers/net/ethernet/.
      Suggested-by: NAlan Cox <gnomes@lxorguk.ukuu.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cc: Steffen Klassert <steffen.klassert@secunet.com>
      cc: Jaroslav Kysela <perex@perex.cz>
      cc: netdev@vger.kernel.org
      cc: linux-parisc@vger.kernel.org
      df298408
  5. 09 3月, 2017 5 次提交
  6. 07 3月, 2017 2 次提交
  7. 06 2月, 2017 1 次提交
  8. 31 1月, 2017 1 次提交
  9. 19 1月, 2017 1 次提交
    • T
      net: Remove usage of net_device last_rx member · 4a7c9726
      Tobias Klauser 提交于
      The network stack no longer uses the last_rx member of struct net_device
      since the bonding driver switched to use its own private last_rx in
      commit 9f242738 ("bonding: use last_arp_rx in slave_last_rx()").
      
      However, some drivers still (ab)use the field for their own purposes and
      some driver just update it without actually using it.
      
      Previously, there was an accompanying comment for the last_rx member
      added in commit 4dc89133 ("net: add a comment on netdev->last_rx")
      which asked drivers not to update is, unless really needed. However,
      this commend was removed in commit f8ff080d ("bonding: remove
      useless updating of slave->dev->last_rx"), so some drivers added later
      on still did update last_rx.
      
      Remove all usage of last_rx and switch three drivers (sky2, atp and
      smc91c92_cs) which actually read and write it to use their own private
      copy in netdev_priv.
      
      Compile-tested with allyesconfig and allmodconfig on x86 and arm.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Reviewed-by: NJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a7c9726
  10. 25 12月, 2016 1 次提交
  11. 10 12月, 2016 1 次提交
    • L
      net: smsc911x: back out silently on probe deferrals · ab4e4c07
      Linus Walleij 提交于
      When trying to get a regulator we may get deferred and we see
      this noise:
      
      smsc911x 1b800000.ethernet-ebi2 (unnamed net_device) (uninitialized):
         couldn't get regulators -517
      
      Then the driver continues anyway. Which means that the regulator
      may not be properly retrieved and reference counted, and may be
      switched off in case noone else is using it.
      
      Fix this by returning silently on deferred probe and let the
      system work it out.
      
      Cc: Jeremy Linton <jeremy.linton@arm.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab4e4c07
  12. 16 11月, 2016 2 次提交
  13. 09 11月, 2016 1 次提交
  14. 20 10月, 2016 1 次提交
    • R
      net: smc91x: fix neponset breakage by pxa u16 writes · 25c07e2c
      Robert Jarzmik 提交于
      The patch isolating the u16 writes for pxa assumed all machine_is_*()
      calls were removed, and therefore removed the mach-types.h include which
      provided them.
      
      Unfortunately 2 machine_is_*() remained in smc91x.c file including
      smc91x.h from which the include was removed, triggering the error:
       drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_drv_probe’:
       drivers/net/ethernet/smsc/smc91x.c:2380:2: error: implicit declaration
       of function ‘machine_is_assabet’
       [-Werror=implicit-function-declaration]
      	if (machine_is_assabet() && machine_has_neponset())
      
      This adds back the wrongly removed include.
      
      Fixes: d09d747a ("net: smc91x: isolate u16 writes alignment workaround")
      Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25c07e2c
  15. 19 10月, 2016 2 次提交
  16. 13 10月, 2016 1 次提交
    • J
      net: deprecate eth_change_mtu, remove usage · a52ad514
      Jarod Wilson 提交于
      With centralized MTU checking, there's nothing productive done by
      eth_change_mtu that isn't already done in dev_set_mtu, so mark it as
      deprecated and remove all usage of it in the kernel. All callers have been
      audited for calls to alloc_etherdev* or ether_setup directly, which means
      they all have a valid dev->min_mtu and dev->max_mtu. Now eth_change_mtu
      prints out a netdev_warn about being deprecated, for the benefit of
      out-of-tree drivers that might be utilizing it.
      
      Of note, dvb_net.c actually had dev->mtu = 4096, while using
      eth_change_mtu, meaning that if you ever tried changing it's mtu, you
      couldn't set it above 1500 anymore. It's now getting dev->max_mtu also set
      to 4096 to remedy that.
      
      v2: fix up lantiq_etop, missed breakage due to drive not compiling on x86
      
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a52ad514
  17. 26 9月, 2016 1 次提交
  18. 08 9月, 2016 1 次提交
    • L
      net: smsc911x: request and deassert optional RESET GPIO · dd0cb7db
      Linus Walleij 提交于
      On some systems (such as the Qualcomm APQ8060 Dragonboard) the
      RESET signal of the SMSC911x is not pulled up by a resistor (or
      the internal pull-up that will pull it up if the pin is not
      even connected) but instead connected to a GPIO line, so that
      the operating system must explicitly deassert RESET before use.
      
      Support this in the SMSC911x driver so this ethernet connector
      can be used on such targets.
      
      Notice that we request the line to go logical low (deassert)
      whilst the line on the actual component is active low. This
      is managed in the respective hardware description when
      specifying the GPIO line with e.g. device tree or ACPI. With
      device tree it looks like this in one case:
      
        reset-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
      
      Which means that logically requesting the RESET line to be
      deasserted will result in the line being driven high, taking
      the device out of reset.
      
      Cc: Jeremy Linton <jeremy.linton@arm.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: NJeremy Linton <jeremy.linton@arm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd0cb7db
  19. 07 9月, 2016 1 次提交
    • S
      net: smsc: remove build warning of duplicate definition · daa7ee8d
      Sudip Mukherjee 提交于
      The build of m32r was giving warning:
      
      In file included from drivers/net/ethernet/smsc/smc91x.c:92:0:
      drivers/net/ethernet/smsc/smc91x.h:448:0: warning: "SMC_inb" redefined
       #define SMC_inb(ioaddr, reg)  ({ BUG(); 0; })
      
      drivers/net/ethernet/smsc/smc91x.h:106:0:
      	note: this is the location of the previous definition
       #define SMC_inb(a, r)  inb(((u32)a) + (r))
      
      drivers/net/ethernet/smsc/smc91x.h:449:0: warning: "SMC_outb" redefined
       #define SMC_outb(x, ioaddr, reg) BUG()
      
      drivers/net/ethernet/smsc/smc91x.h:108:0:
      	note: this is the location of the previous definition
       #define SMC_outb(v, a, r) outb(v, ((u32)a) + (r))
      Signed-off-by: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      daa7ee8d
  20. 03 9月, 2016 4 次提交
  21. 29 8月, 2016 1 次提交
    • R
      net: smc91x: fix SMC accesses · 2fb04fdf
      Russell King 提交于
      Commit b70661c7 ("net: smc91x: use run-time configuration on all ARM
      machines") broke some ARM platforms through several mistakes.  Firstly,
      the access size must correspond to the following rule:
      
      (a) at least one of 16-bit or 8-bit access size must be supported
      (b) 32-bit accesses are optional, and may be enabled in addition to
          the above.
      
      Secondly, it provides no emulation of 16-bit accesses, instead blindly
      making 16-bit accesses even when the platform specifies that only 8-bit
      is supported.
      
      Reorganise smc91x.h so we can make use of the existing 16-bit access
      emulation already provided - if 16-bit accesses are supported, use
      16-bit accesses directly, otherwise if 8-bit accesses are supported,
      use the provided 16-bit access emulation.  If neither, BUG().  This
      exactly reflects the driver behaviour prior to the commit being fixed.
      
      Since the conversion incorrectly cut down the available access sizes on
      several platforms, we also need to go through every platform and fix up
      the overly-restrictive access size: Arnd assumed that if a platform can
      perform 32-bit, 16-bit and 8-bit accesses, then only a 32-bit access
      size needed to be specified - not so, all available access sizes must
      be specified.
      
      This likely fixes some performance regressions in doing this: if a
      platform does not support 8-bit accesses, 8-bit accesses have been
      emulated by performing a 16-bit read-modify-write access.
      
      Tested on the Intel Assabet/Neponset platform, which supports only 8-bit
      accesses, which was broken by the original commit.
      
      Fixes: b70661c7 ("net: smc91x: use run-time configuration on all ARM machines")
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2fb04fdf
  22. 16 7月, 2016 2 次提交
  23. 12 7月, 2016 1 次提交
  24. 05 7月, 2016 2 次提交
  25. 27 6月, 2016 1 次提交
  26. 05 5月, 2016 1 次提交
  27. 21 3月, 2016 1 次提交
    • A
      net: smc911x: avoid unused variable warnings · abc34d75
      Arnd Bergmann 提交于
      The change to use the generic DMA engine API in the smc911x
      driver has led to a harmless warning about unused local variables:
      
      smsc/smc911x.c: In function 'smc911x_probe':
      smsc/smc911x.c:1796:20: error: unused variable 'param'
      smsc/smc911x.c:1795:17: error: unused variable 'mask'
      smsc/smc911x.c:1794:26: error: unused variable 'config'
      
      This puts the variable declarations inside of the same #ifdef
      that protects their use.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 79d3b59a ("net: smc911x: convert pxa dma to dmaengine")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      abc34d75
  28. 19 3月, 2016 1 次提交