1. 05 4月, 2017 1 次提交
    • S
      net: ethernet: ti: cpsw: fix race condition during open() · 30c57f07
      Sekhar Nori 提交于
      TI's cpsw driver handles both OF and non-OF case for phy
      connect. Unfortunately of_phy_connect() returns NULL on
      error while phy_connect() returns ERR_PTR().
      
      To handle this, cpsw_slave_open() overrides the return value
      from phy_connect() to make it NULL or error.
      
      This leaves a small window, where cpsw_adjust_link() may be
      invoked for a slave while slave->phy pointer is temporarily
      set to -ENODEV (or some other error) before it is finally set
      to NULL.
      
      _cpsw_adjust_link() only handles the NULL case, and an oops
      results when ERR_PTR() is seen by it.
      
      Note that cpsw_adjust_link() checks PHY status for each
      slave whenever it is invoked. It can so happen that even
      though phy_connect() for a given slave returns error,
      _cpsw_adjust_link() is still called for that slave because
      the link status of another slave changed.
      
      Fix this by using a temporary pointer to store return value
      of {of_}phy_connect() and do a one-time write to slave->phy.
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Reported-by: NYan Liu <yan-liu@ti.com>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30c57f07
  2. 03 4月, 2017 1 次提交
  3. 18 2月, 2017 1 次提交
  4. 15 2月, 2017 2 次提交
  5. 12 2月, 2017 1 次提交
  6. 08 2月, 2017 1 次提交
  7. 02 2月, 2017 1 次提交
  8. 31 1月, 2017 1 次提交
  9. 21 1月, 2017 5 次提交
  10. 10 1月, 2017 1 次提交
  11. 08 1月, 2017 2 次提交
    • G
      net: ethernet: ti: cpsw: add support for ringparam configuration · be034fc1
      Grygorii Strashko 提交于
      The CPDMA uses one pool of descriptors for both RX and TX which by default
      split between all channels proportionally depending on total number of
      CPDMA channels and number of TX and RX channels. As result, more
      descriptors will be consumed by TX path if there are more TX channels and
      there is no way now to dedicate more descriptors for RX path.
      
      So, add the ability to re-split CPDMA pool of descriptors between RX and TX
      path via ethtool '-G' command wich will allow to configure and fix number
      of descriptors used by RX and TX path, which, then, will be split between
      RX/TX channels proportionally depending on RX/TX channels number and
      weight. ethtool '-G' command will accept only number of RX entries and rest
      of descriptors will be arranged for TX automatically.
      
      Command:
        ethtool -G <devname> rx <number of descriptors>
      
      defaults and limitations:
      - minimum number of rx descriptors is 10% of total number of descriptors in
        CPDMA pool
      - maximum number of rx descriptors is 90% of total number of descriptors in
        CPDMA pool
      - by default, descriptors will be split equally between RX/TX path
      - any values passed in "tx" parameter will be ignored
      
      Usage:
      
       # ethtool -g eth0
      	Pre-set maximums:
      	RX:             7372
      	RX Mini:        0
      	RX Jumbo:       0
      	TX:             0
      	Current hardware settings:
      	RX:             4096
      	RX Mini:        0
      	RX Jumbo:       0
      	TX:             4096
      
       # ethtool -G eth0 rx 7372
       # ethtool -g eth0
      	Ring parameters for eth0:
      	Pre-set maximums:
      	RX:             7372
      	RX Mini:        0
      	RX Jumbo:       0
      	TX:             0
      	Current hardware settings:
      	RX:             7372
      	RX Mini:        0
      	RX Jumbo:       0
      	TX:             820
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be034fc1
    • G
      net: ethernet: ti: cpsw: add support for descs pool size configuration · 90225bf0
      Grygorii Strashko 提交于
      The CPSW CPDMA can process buffer descriptors placed as in internal
      CPPI RAM as in DDR. This patch adds support in CPSW and CPDMA for
      descs_pool_size mudule parameter, which defines total number of CPDMA CPPI
      descriptors to be used for both ingress/egress packets processing:
       - memory size, required for CPDMA descriptor pool, is calculated basing
      on number of descriptors specified by user in descs_pool_size and
      CPDMA descriptor size and allocated from coherent memory (CMA area);
       - CPDMA descriptor pool will be allocated in DDR if pool memory size >
      internal CPPI RAM or use internal CPPI RAM otherwise;
       - if descs_pool_size not specified in DT - the default value 256 will
      be used which will allow to place CPDMA descriptors pool into the
      internal CPPI RAM (current default behaviour);
       - CPDMA will ignore descs_pool_size if descs_pool_size = 0 for
      backward comaptiobility with davinci_emac.
      
      descs_pool_size is boot time setting and can't be changed once
      CPSW/CPDMA is initialized.
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90225bf0
  12. 11 12月, 2016 5 次提交
  13. 08 12月, 2016 4 次提交
  14. 07 12月, 2016 1 次提交
  15. 01 12月, 2016 4 次提交
  16. 30 11月, 2016 3 次提交
  17. 19 11月, 2016 6 次提交