1. 25 Feb, 2015 1 commit
    • Guenter Roeck's avatar
      net: dsa: Ensure that port array elements are initialized before being used · d87d6f44
      Guenter Roeck authored
      A network device notifier can be called for one or more of the created
      slave devices before all slave devices have been registered. This can
      result in a mismatch between ds->phys_port_mask and the registered devices
      by the time the call is made, and it can result in a slave device being
      added to a bridge before its entry in ds->ports[] has been initialized.
      
      Rework the initialization code to initialize entries in ds->ports[] in
      dsa_slave_create. With this change, dsa_slave_create no longer needs
      to return slave_dev but can return an error code instead.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d87d6f44
  2. 24 Feb, 2015 38 commits
  3. 23 Feb, 2015 1 commit
    • David S. Miller's avatar
      Merge branch 'be2net-next' · 5e3d3189
      David S. Miller authored
      Sathya Perla says:
      
      ====================
      be2net: patch set
      
      Hi Dave, the following patch set reduces code duplication
      in probe/pci-resume/eeh-resume and remove/pci-suspend/eeh-error and UE-error
      detect/recovery paths. New helper routines have been introduced for this
      purpose. Pls apply this set to the net-next tree. Thanks!
      
      Patch 1 refactors the alloc/free code of adapter struct's fields into
      a new set of helper routines -- be_drv_init/cleanup().
      
      Patch 2 gets rid of the be_get_initial_config() routine as be_get_config()
      is the place holder for related code.
      
      Patch 3 introduces a new helper routine be_func_init() to execute the
      initialization code used in probe/pci-resume/eeh-resume to remove
      code duplication.
      
      Patch 4 introduces a wrapper for scheduling/canceling error detection
      task on similar lines to the be_worker task.
      
      Patch 5 refactors UE error detection and recovery code on similar lines
      to EEH code. Cleaning up resources is done in the error detection routine
      followed by error recovery.
      
      Patch 6 gets rid of the lancer_test_and_set_rdy_state() routine as the
      same code now available in be_func_init().
      
      Patch 7 creates a new helper routine be_resume() for all the common code
      in be_probe(), be_pci_resume() and be_eeh_resume(), to reduce code duplication.
      
      Patch 8 creates a new helper routine be_cleanup() for all the common
      cleanup code duplicated in the suspend/EEH err detection paths.
      
      Patch 9 moves be_func_init() inside be_setup() as everytime be_setup()
      is called, the driver will have to wait for the function/FW to be be
      initialized.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e3d3189