1. 21 Jul, 2016 7 commits
    • Brenden Blanco's avatar
      net/mlx4_en: use READ_ONCE when freeing xdp_prog · cb7386d3
      Brenden Blanco authored
      For consistency, and in order to hint at the synchronous nature of the
      xdp_prog field, use READ_ONCE in the destroy path of the ring. All
      occurrences should now use either READ_ONCE or xchg.
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cb7386d3
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · f67fe5c8
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2016-07-20
      
      This series contains updates to fm10k only.
      
      Ngai-Mint provides a fix to clear PCIE_GMBX bits to ensure the proper
      functioning of the mailbox global interrupt after a data path reset.
      
      Jake provides most of the patches in the series, starting with a early
      return from fm10k_down() if we are already down to prevent conflict with
      other threads.  Fixed an issue where fm10k_update_stats() could cause
      a null pointer dereference, specifically if it is called when we are going
      down and the rings have been removed.  Cleans up and fixes the data path
      reset flow, Tx hang routine and stop_hw().  Re-worked the fm10k_reinit()
      to be more maintainable and fixed several inconsistencies with the work
      flow.  Implemented fm10k_prepare_suspend() and fm10k_handle_resume()
      which abstract around the now existing fm10k_prepare_for_reset and
      fm10k_handle_reset. The new functions also handle stopping the service
      task, which is something that the original re-init flow does not need.
      Fixed an issue where if an FLR occurs, VF devices will be knocked out of
      bus master mode, and the driver will be unable to recover from the reset
      properly, so ensure bus master is enabled after every reset.  Fixed an
      issue where a reset will occur as if for no reason, regularly every few
      minutes until the switch manager software is loaded, which is caused
      by continuously requesting the lport map so only do the request after
      we have verified the switch mailbox is tx_ready.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f67fe5c8
    • David S. Miller's avatar
      Merge branch 'mv88r6xxx-eeprom-rework' · 4c37fb15
      David S. Miller authored
      Vivien Didelot says:
      
      ====================
      net: dsa: mv88e6xxx: rework EEPROM code
      
      Some switches can access an optional external EEPROM via its registers.
      
      The 88E6352 family of switches have 8-bit address / 16-bit data access.
      The new 88E6390 family has 16-bit address / 8-bit data access.
      
      This patchset cleans up the EEPROM code with 16-suffixed Global2 helpers
      and makes it easy to add future support for 8-bit data EEPROM access.
      
      It also removes unnecessary mutexes and a few locked access functions.
      
      Changes in v2:
        - add missing Signed-off-by tag
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c37fb15
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: kill last locked reg_read · 8f6345b2
      Vivien Didelot authored
      Get rid of the last usage of the locked mv88e6xxx_reg_read function with
      a new mv88e6xxx_port_read helper, useful later for chips with different
      port registers base address.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f6345b2
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: rework EEPROM access · 855b1932
      Vivien Didelot authored
      The 6352 family of switches and compatibles provide a 8-bit address and
      16-bit data access to an optional EEPROM.
      
      Newer chip such as the 6390 family slightly changed the access to 16-bit
      address and 8-bit data.
      
      This commit cleans up the EEPROM access code for 16-bit access and makes
      it easy to eventually introduce future support for 8-bit access.
      
      Here's a list of notable changes brought by this patch:
      
        - provide Global2 unlocked helpers for EEPROM commands
        - remove eeprom_mutex, only reg_lock is necessary for driver functions
        - eeprom_len is 0 for chip without EEPROM, so return it directly
        - the Running bit must be 0 before r/w, so wait for Busy *and* Running
        - remove now unused mv88e6xxx_wait and mv88e6xxx_reg_write
        - other than that, the logic (in _{get,set}_eeprom16) didn't change
      
      Chips with an 8-bit EEPROM access will require to implement the
      8-suffixed variant of G2 helpers and the related flag:
      
          #define MV88E6XXX_FLAGS_EEPROM8	\
          	(MV88E6XXX_FLAG_G2_EEPROM_CMD |	\
          	 MV88E6XXX_FLAG_G2_EEPROM_ADDR)
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      855b1932
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: remove unused phy_mutex · d4673339
      Vivien Didelot authored
      Only reg_lock is necessary now and phy_mutex is dead. Remove it.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4673339
    • Gavin Shan's avatar
      net/faraday: Disallow using reversed MAC address from hardware · e6c044f5
      Gavin Shan authored
      The initial MAC address is retrieved from hardware if it's not
      provided by device-tree. The reserved MAC address from hardware
      will be used if non-reserved MAC address is invalid. It will
      cause mismatched MAC address seen by hardware and software.
      
      This disallows using the reserved hardware MAC address to avoid
      the mismatched MAC address seen by hardware and software.
      
      Fixes: 113ce107 ("net/faraday: Read MAC address from chip")
      Suggested-by: default avatarDavid Laight <David.Laight@ACULAB.COM>
      Suggested-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6c044f5
  2. 20 Jul, 2016 33 commits