1. 25 Feb, 2014 9 commits
    • Claudiu Manoil's avatar
      gianfar: Fix on-the-fly vlan and mtu updates · 88302648
      Claudiu Manoil authored
      The RCTRL and TCTRL registers should not be changed
      on-the-fly, while the controller is running, otherwise
      unexpected behaviour occurs.  But that's exactly what
      gfar_vlan_mode() does, updating the VLAN acceleration
      bits inside RCTRL/TCTRL.  The attempt to lock these
      operations doesn't help, but only adds to the confusion.
      There's also a dependency for Rx FCB insertion (activating
      /de-activating the TOE offload block on Rx) which might
      change the required rx buffer size.  This makes matters
      worse as gfar_vlan_mode() ends up calling gfar_change_mtu(),
      though the MTU size remains the same.  Note that there are
      other situations that may affect the required rx buffer size,
      like changing RXCSUM or rx hw timestamping, but errorneously
      the rx buffer size is not recomputed/ updated in the process.
      
      To fix this, do the vlan updates properly inside the MAC
      reset and reconfiguration procedure, which takes care of
      the rx buffer size dependecy and the rx TOE block (PRSDEP)
      activation/deactivation as well (in the correct order).
      As a consequence, MTU/ rx buff size updates are done now
      by the same MAC reset and reconfig procedure, so that out
      of context updates to MAXFRM, MRBLR, and MACCFG inside
      change_mtu() are no longer needed.  The rx buffer size
      dependecy to Rx FCB is now handled for the other cases too
      (RXCSUM and rx hw timestamping).
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88302648
    • Claudiu Manoil's avatar
      gianfar: Implement MAC reset and reconfig procedure · a328ac92
      Claudiu Manoil authored
      The main MAC config registers like: RCTRL/TCTRL, MRBLR,
      MAXFRM, RXIC/TXIC, most fields of MACCFG1/2, should not
      be changed on-the-fly, but at least after stopping the
      DMA and disabling the Rx/Tx blocks and, for increased
      reliability, after a MAC soft reset.
      
      Impelement a complete MAC soft reset and reconfig procedure
      following the latest HW advisories - gfar_mac_reset() - to
      replace gfar_mac_init() and (the confusing) init_registers()
      functions.
      
      Factor out separate config functions for RCTRL and TCTRL,
      insure programming order of the relevant config regs after
      MAC soft reset.
      
      Split gfar_hw_init() into gfar_mac_reset() and the remaining
      global regs that don't need to be reconfigured after MAC soft
      reset (FIFOCFG, ATTRELI, HW counters a.s.o).
      
      As gfar_hw_init() now makes all the register writes @probe()
      time, based on all the device flags and config options, it
      must be moved further down, just before register_netdev(),
      as the last config step when the config values are comitted
      to HW.  Also, move netif_carrier_off() after register_netdev(),
      because it has no effect if called before.
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a328ac92
    • David S. Miller's avatar
    • Fabio Estevam's avatar
      net: bcmgenet: Use devm_ioremap_resource() · 5343a10d
      Fabio Estevam authored
      According to Documentation/driver-model/devres.txt, devm_request_and_ioremap()
      is deprecated, so use devm_ioremap_resource() instead.
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5343a10d
    • Joe Perches's avatar
      bridge: netfilter: Use ether_addr_copy · 04091142
      Joe Perches authored
      Convert the uses of memcpy to ether_addr_copy because
      for some architectures it is smaller and faster.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      04091142
    • Joe Perches's avatar
      bridge: Use ether_addr_copy and ETH_ALEN · e5a727f6
      Joe Perches authored
      Convert the more obvious uses of memcpy to ether_addr_copy.
      
      There are still uses of memcpy that could be converted but
      these addresses are __aligned(2).
      
      Convert a couple uses of 6 in gr_private.h to ETH_ALEN.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5a727f6
    • Ben Hutchings's avatar
      cgxb4: Stop using ethtool SPEED_* constants · e8b39015
      Ben Hutchings authored
      ethtool speed values are just numbers of megabits and there is no need
      to add SPEED_40000.  To be consistent, use integer constants directly
      for all speeds.
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8b39015
    • Daniel Borkmann's avatar
      tools: bpf_dbg: various misc code cleanups · 7debf780
      Daniel Borkmann authored
      Lets clean up bpf_dbg a bit and improve its code slightly
      in various areas: i) Get rid of some macros as there's no
      good reason for keeping them, ii) remove one unused variable
      and reduce scope of various variables found by cppcheck,
      iii) Close non-default file descriptors when exiting the shell.
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7debf780
    • Daniel Borkmann's avatar
      loopback: sctp: add NETIF_F_SCTP_CSUM to device features · b17c7069
      Daniel Borkmann authored
      Drivers are allowed to set NETIF_F_SCTP_CSUM if they have
      hardware crc32c checksumming support for the SCTP protocol.
      Currently, NETIF_F_SCTP_CSUM flag is available in igb,
      ixgbe, i40e/i40evf drivers and for vlan devices.
      
      If we don't have NETIF_F_SCTP_CSUM then crc32c is done
      through CPU instructions, invoked from crypto layer, or
      if not available as slow-path fallback in software.
      
      Currently, loopback device propagates checksum offloading
      feature flags in dev->features, but is missing SCTP checksum
      offloading. Therefore, account for NETIF_F_SCTP_CSUM as
      well.
      
      Before patch:
      
      ./netperf_sctp -H 192.168.0.100 -t SCTP_STREAM_MANY
      SCTP 1-TO-MANY STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.0.100 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
      4194304 4194304   4096    10.00    4683.50
      
      After patch:
      
      ./netperf_sctp -H 192.168.0.100 -t SCTP_STREAM_MANY
      SCTP 1-TO-MANY STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.0.100 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
      4194304 4194304   4096    10.00    15348.26
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b17c7069
  2. 24 Feb, 2014 18 commits
  3. 21 Feb, 2014 13 commits