1. 18 3月, 2020 1 次提交
  2. 21 11月, 2019 5 次提交
  3. 05 11月, 2019 1 次提交
    • A
      net: of_get_phy_mode: Change API to solve int/unit warnings · 0c65b2b9
      Andrew Lunn 提交于
      Before this change of_get_phy_mode() returned an enum,
      phy_interface_t. On error, -ENODEV etc, is returned. If the result of
      the function is stored in a variable of type phy_interface_t, and the
      compiler has decided to represent this as an unsigned int, comparision
      with -ENODEV etc, is a signed vs unsigned comparision.
      
      Fix this problem by changing the API. Make the function return an
      error, or 0 on success, and pass a pointer, of type phy_interface_t,
      where the phy mode should be stored.
      
      v2:
      Return with *interface set to PHY_INTERFACE_MODE_NA on error.
      Add error checks to all users of of_get_phy_mode()
      Fixup a few reverse christmas tree errors
      Fixup a few slightly malformed reverse christmas trees
      
      v3:
      Fix 0-day reported errors.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c65b2b9
  4. 22 8月, 2019 2 次提交
  5. 17 7月, 2019 1 次提交
  6. 09 7月, 2019 1 次提交
    • I
      net: ethernet: ti: cpsw: add XDP support · 9ed4050c
      Ivan Khoronzhuk 提交于
      Add XDP support based on rx page_pool allocator, one frame per page.
      Page pool allocator is used with assumption that only one rx_handler
      is running simultaneously. DMA map/unmap is reused from page pool
      despite there is no need to map whole page.
      
      Due to specific of cpsw, the same TX/RX handler can be used by 2
      network devices, so special fields in buffer are added to identify
      an interface the frame is destined to. Thus XDP works for both
      interfaces, that allows to test xdp redirect between two interfaces
      easily. Also, each rx queue have own page pools, but common for both
      netdevs.
      
      XDP prog is common for all channels till appropriate changes are added
      in XDP infrastructure. Also, once page_pool recycling becomes part of
      skb netstack some simplifications can be added, like removing
      page_pool_release_page() before skb receive.
      
      In order to keep rx_dev while redirect, that can be somehow used in
      future, do flush in rx_handler, that allows to keep rx dev the same
      while redirect. It allows to conform with tracing rx_dev pointed
      by Jesper.
      
      Also, there is probability, that XDP generic code can be extended to
      support multi ndev drivers like this one, using same rx queue for
      several ndevs, based on switchdev for instance or else. In this case,
      driver can be modified like exposed here:
      https://lkml.org/lkml/2019/7/3/243Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ed4050c
  7. 29 6月, 2019 1 次提交
  8. 24 6月, 2019 1 次提交
  9. 17 6月, 2019 1 次提交
    • I
      net: ethernet: ti: davinci_cpdma: use idled submit · 871e8465
      Ivan Khoronzhuk 提交于
      While data pass suspend, reuse of rx descriptors can be disabled using
      channel state & lock from cpdma layer. For this, submit to a channel
      has to be disabled using state != "not active" under lock, what is done
      with this patch. The same submit is used to fill rx channel while
      ndo_open, when channel is idled, so add idled submit routine that
      allows to prepare descs for the channel. All this simplifies code and
      helps to avoid dormant mode usage and send packets only to active
      channels, avoiding potential race in later on changes. Also add missed
      sync barrier analogically like in other places after stopping tx
      queues.
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      871e8465
  10. 15 6月, 2019 1 次提交
  11. 30 5月, 2019 1 次提交
  12. 11 5月, 2019 1 次提交
    • P
      net: ethernet: fix similar warning reported by kbuild test robot · 2d2924af
      Petr Štetiar 提交于
      This patch fixes following (similar) warning reported by kbuild test robot:
      
       In function ‘memcpy’,
        inlined from ‘smsc75xx_init_mac_address’ at drivers/net/usb/smsc75xx.c:778:3,
        inlined from ‘smsc75xx_bind’ at drivers/net/usb/smsc75xx.c:1501:2:
        ./include/linux/string.h:355:9: warning: argument 2 null where non-null expected [-Wnonnull]
        return __builtin_memcpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/net/usb/smsc75xx.c: In function ‘smsc75xx_bind’:
        ./include/linux/string.h:355:9: note: in a call to built-in function ‘__builtin_memcpy’
      
      I've replaced the offending memcpy with ether_addr_copy, because I'm
      100% sure, that of_get_mac_address can't return NULL as it returns valid
      pointer or ERR_PTR encoded value, nothing else.
      
      I'm hesitant to just change IS_ERR into IS_ERR_OR_NULL check, as this
      would make the warning disappear also, but it would be confusing to
      check for impossible return value just to make a compiler happy.
      
      I'm now changing all occurencies of memcpy to ether_addr_copy after the
      of_get_mac_address call, as it's very likely, that we're going to get
      similar reports from kbuild test robot in the future.
      
      Fixes: a51645f7 ("net: ethernet: support of_get_mac_address new ERR_PTR error")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NPetr Štetiar <ynezz@true.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d2924af
  13. 08 5月, 2019 1 次提交
  14. 02 5月, 2019 1 次提交
  15. 28 4月, 2019 13 次提交
  16. 12 12月, 2018 1 次提交
  17. 06 12月, 2018 1 次提交
    • R
      net: Use of_node_name_eq for node name comparisons · bf5849f1
      Rob Herring 提交于
      Convert string compares of DT node names to use of_node_name_eq helper
      instead. This removes direct access to the node name pointer.
      
      For instances using of_node_cmp, this has the side effect of now using
      case sensitive comparisons. This should not matter for any FDT based
      system which all of these are.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Claudiu Manoil <claudiu.manoil@nxp.com>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Wingman Kwok <w-kwok2@ti.com>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-omap@vger.kernel.org
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf5849f1
  18. 14 11月, 2018 2 次提交
  19. 09 11月, 2018 2 次提交
    • I
      net: ethernet: ti: cpsw: fix vlan configuration while down/up · 00fe4712
      Ivan Khoronzhuk 提交于
      The vlan configuration is not restored after interface donw/up sequence
      (if dual-emac - both interfaces). Tested on am572x EVM.
      
      Steps to check:
      ~# ip link add link eth1 name eth1.100 type vlan id 100
      ~# ifconfig eth0 down
      ~# ifconfig eth1 down
      
      Try to remove vid and observe warning:
      ~# ip link del eth1.100
      [  739.526757] net eth1: removing vlanid 100 from vlan filter
      [  739.533322] failed to kill vid 0081/100 for device eth1
      
      This patch fixes it, restoring only vlan ALE entries and all other
      unicast/multicast entries are restored by system calling rx_mode ndo.
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00fe4712
    • I
      net: ethernet: ti: cpsw: fix vlan mcast · 15180eca
      Ivan Khoronzhuk 提交于
      At this moment, mcast addresses are added for real device only
      (reserved vlans for dual-emac mode), even if a mcast address was added
      for some vlan only, thus ALE doesn't have corresponding vlan mcast
      entries after vlan socket joined multicast group. So ALE drops vlan
      frames with mcast addresses intended for vlans and potentially can
      receive mcast frames for base ndev. That's not correct. So, fix it by
      creating only vlan/mcast entries as requested. Patch doesn't use any
      additional lists and is based on device mc address list and cpsw ALE
      table entries.
      Signed-off-by: NIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      15180eca
  20. 23 10月, 2018 1 次提交
  21. 22 10月, 2018 1 次提交