1. 18 Feb, 2014 2 commits
    • Claudiu Manoil's avatar
      gianfar: Remove sysfs stubs for FIFOCFG and stashing · 34018fd4
      Claudiu Manoil authored
      Removing the sysfs stubs for the Tx FIFOCFG and ATTRELI
      (stashing) config registers, as these registers may only
      be configured after a MAC reset, with the controller stopped
      (i.e. during hw init, at probe() time).  The current sysfs
      stubs allow on-the-fly updates of these registers (the locking
      measures are useless and only add unecessary code).
      
      Changing these registers is discouraged. Only the default values
      will be used instead.
      
      Moreover, the stashing (ATTRELI) configuration options were
      effectively disabled (didn't get to the hw anyway if changed)
      because the stashing device_flags (HAS_BD_STASHING|HAS_BUF_STASHING)
      were "accidentally" cleared during probe().
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34018fd4
    • Claudiu Manoil's avatar
      gianfar: Cleanup/Fix gfar_probe and the hw init code · 20862788
      Claudiu Manoil authored
      Factor out gfar_hw_init() to contain all the controller hw
      initialization steps for a better control of register writes,
      and to significantly simplify the tangled code from gfar_probe().
      This results in code size and stack usage reduction (besides
      code readability).
      
      Fix memory leak on device removal, by freeing the rx_/tx_queue
      structures.
      
      Replace custom bit swapping function with a library one (bitrev8).
      
      Move allocation of rx_/tx_queue struct arrays before the group
      structure init, because in order to assign Rx/Tx queues
      to groups we need to have the queues first.  This also allows
      earlier bail out of gfar_probe(), in case the memory allocation
      fails.
      
      The flow control checks for maccfg1 were removed from gfar_probe(),
      since flow control is disabled at probe time (priv->rx_/tx_pause_en
      are 0). Redundant initializations (by 0) also removed.
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20862788
  2. 17 Feb, 2014 34 commits
  3. 15 Feb, 2014 1 commit
  4. 14 Feb, 2014 3 commits