1. 11 10月, 2020 1 次提交
  2. 03 10月, 2020 2 次提交
  3. 30 9月, 2020 1 次提交
  4. 26 9月, 2020 6 次提交
    • G
      dpaa2-mac: Fix potential null pointer dereference · b4f43483
      Gustavo A. R. Silva 提交于
      There is a null-check for _pcs_, but it is being dereferenced
      prior to this null-check. So, if _pcs_ can actually be null,
      then there is a potential null pointer dereference that should
      be fixed by null-checking _pcs_ before being dereferenced.
      
      Addresses-Coverity-ID: 1497159 ("Dereference before null check")
      Fixes: 94ae899b ("dpaa2-mac: add PCS support through the Lynx module")
      Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4f43483
    • I
      dpaa2-eth: install a single steering rule when SHARED_FS is enabled · 5e29c16f
      Ionut-robert Aron 提交于
      When SHARED_FS is enabled on a DPNI object the flow steering tables are
      shared between all the traffic classes. Modify the driver so that we
      only add a new flow steering entry on the TC#0 when this new option is
      enabled.
      Signed-off-by: NIonut-robert Aron <ionut-robert.aron@nxp.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e29c16f
    • I
      dpaa2-eth: no need to check link state right after ndo_open · 4c33a5bd
      Ioana Ciornei 提交于
      The call to dpaa2_eth_link_state_update() is a leftover from the time
      when on DPAA2 platforms the PHYs were started at boot time so when an
      ifconfig was issued on the associated interface, the link status needed
      to be checked directly from the ndo_open() callback.
      This is not needed anymore since we are now properly integrated with the
      PHY layer thus a link interrupt will come directly from the PHY
      eventually without the need to call the sync function.
      Fix this up by removing the call to dpaa2_eth_link_state_update().
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4c33a5bd
    • I
      dpaa2-mac: do not check for both child and parent DTS nodes · 98179709
      Ioana Ciornei 提交于
      There is no need to check if both the MDIO controller node and its
      child node, the PCS device, are available since there is no chance that
      the child node would be enabled when the parent it's not.
      Suggested-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98179709
    • I
      dpaa2-eth: fix command version for Tx shaping · 72e27c38
      Ioana Ciornei 提交于
      When adding the support for TBF offload, the improper command version
      was added even though the command format is for the V2 of
      dpni_set_tx_shaping(). This does not affect the functionality of TBF
      since the only change between these two versions is the addition of the
      exceeded parameters which are not used in TBF. Still, fix the bug so
      that we keep things in sync.
      
      Fixes: 39344a89 ("dpaa2-eth: add API for Tx shaping")
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72e27c38
    • J
      drivers/net/ethernet: clean up mis-targeted comments · d0ea5cbd
      Jesse Brandeburg 提交于
      As part of the W=1 cleanups for ethernet, a million [*] driver
      comments had to be cleaned up to get the W=1 compilation to
      succeed. This change finally makes the drivers/net/ethernet tree
      compile with W=1 set on the command line. NOTE: The kernel uses
      kdoc style (see Documentation/process/kernel-doc.rst) when
      documenting code, not doxygen or other styles.
      
      After this patch the x86_64 build has no warnings from W=1, however
      scripts/kernel-doc says there are 1545 more warnings in source files, that
      I need to develop a script to fix in a followup patch.
      
      The errors fixed here are all kdoc of a few classes, with a few outliers:
      In file included from drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:10:
      drivers/net/ethernet/qlogic/netxen/netxen_nic.h:1193:18: warning: ‘FW_DUMP_LEVELS’ defined but not used [-Wunused-const-variable=]
       1193 | static const u32 FW_DUMP_LEVELS[] = { 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff };
            |                  ^~~~~~~~~~~~~~
      ... repeats 4 times...
      drivers/net/ethernet/sun/cassini.c:2084:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
       2084 |    RX_USED_ADD(page, i);
      drivers/net/ethernet/natsemi/ns83820.c: In function ‘phy_intr’:
      drivers/net/ethernet/natsemi/ns83820.c:603:6: warning: variable ‘tbisr’ set but not used [-Wunused-but-set-variable]
        603 |  u32 tbisr, tanar, tanlpar;
            |      ^~~~~
      drivers/net/ethernet/natsemi/ns83820.c: In function ‘ns83820_get_link_ksettings’:
      drivers/net/ethernet/natsemi/ns83820.c:1207:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable]
       1207 |  u32 cfg, tanar, tbicr;
            |           ^~~~~
      drivers/net/ethernet/packetengines/yellowfin.c:1063:18: warning: variable ‘yf_size’ set but not used [-Wunused-but-set-variable]
       1063 |   int data_size, yf_size;
            |                  ^~~~~~~
      
      Normal kdoc fixes:
      warning: Function parameter or member 'x' not described in 'y'
      warning: Excess function parameter 'x' description in 'y'
      warning: Cannot understand <string> on line <NNN> - I thought it was a doc line
      
      [*] - ok it wasn't quite a million, but it felt like it.
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0ea5cbd
  5. 25 9月, 2020 2 次提交
  6. 22 9月, 2020 1 次提交
  7. 21 9月, 2020 1 次提交
  8. 19 9月, 2020 6 次提交
    • Y
      dpaa2-eth: fix a build warning in dpmac.c · a1285927
      Yangbo Lu 提交于
      Fix below sparse warning in dpmac.c.
      warning: cast to restricted __le64
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1285927
    • Y
      dpaa2-eth: support PTP Sync packet one-step timestamping · c5521189
      Yangbo Lu 提交于
      This patch is to add PTP sync packet one-step timestamping support.
      Before egress, one-step timestamping enablement needs,
      
      - Enabling timestamp and FAS (Frame Annotation Status) in
        dpni buffer layout.
      
      - Write timestamp to frame annotation and set PTP bit in
        FAS to mark as one-step timestamping event.
      
      - Enabling one-step timestamping by dpni_set_single_step_cfg()
        API, with offset provided to insert correction time on frame.
        The offset must respect all MAC headers, VLAN tags and other
        protocol headers accordingly. The correction field update can
        consider delays up to one second. So PTP frame needs to be
        filtered and parsed, and written timestamp into Sync frame
        originTimestamp field.
      
      The operation of API dpni_set_single_step_cfg() has to be done
      when no one-step timestamping frames are in flight. So we have
      to make sure the last one-step timestamping frame has already
      been transmitted on hardware before starting to send the current
      one. The resolution is,
      
      - Utilize skb->cb[0] to mark timestamping request per packet.
        If it is one-step timestamping PTP sync packet, queue to skb queue.
        If not, transmit immediately.
      
      - Schedule a work to transmit skbs in skb queue.
      
      - mutex lock is used to ensure the last one-step timestamping packet
        has already been transmitted on hardware through TX confirmation queue
        before transmitting current packet.
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5521189
    • Y
      dpaa2-eth: utilize skb->cb[0] for hardware timestamping · 1cf773bd
      Yangbo Lu 提交于
      This patch is a preparation for next hardware one-step timestamping
      support. For DPAA2, the one step timestamping configuration on
      hardware registers has to be done when there is no one-step timestamping
      packet in flight. So we will have to use workqueue and skb queue
      for such packets transmitting, to make sure waiting the last packet has
      already been sent on hardware, and starting to transmit the current one.
      
      So the tx timestamping flag in private data may not reflect the actual
      request for the one-step timestamping packets of skb queue. This also
      affects skb headroom allocation. Let's use skb->cb[0] to mark the
      timestamping request for each skb.
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1cf773bd
    • Y
      dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code · 64a965de
      Yangbo Lu 提交于
      Invoke dpaa2_eth_enable_tx_tstamp() once in code after building FD,
      rather than calling it in dpaa2_eth_build_single_fd(),
      dpaa2_eth_build_sg_fd_single_buf(), and dpaa2_eth_build_sg_fd().
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64a965de
    • Y
      dpaa2-eth: define a global ptp_qoriq structure pointer · d21c784c
      Yangbo Lu 提交于
      Define a global ptp_qoriq structure pointer, and export to use.
      The ptp clock operations will be used in dpaa2-eth driver.
      For example, supporting one step timestamping needs to write
      current time to hardware frame annotation before sending and
      then hardware inserts the delay time on frame during sending.
      So in driver, at least clock gettime operation will be needed
      to make sure right time is written to hardware frame annotation
      for one step timestamping.
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d21c784c
    • Y
      dpaa2-eth: add APIs of 1588 single step timestamping · 23cd4f27
      Yangbo Lu 提交于
      This patch is to add APIs of 1588 single step timestamping.
      
      - dpni_set_single_step_cfg
      - dpni_get_single_step_cfg
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23cd4f27
  9. 18 9月, 2020 1 次提交
  10. 15 9月, 2020 1 次提交
  11. 12 9月, 2020 1 次提交
  12. 08 9月, 2020 1 次提交
  13. 02 9月, 2020 3 次提交
  14. 25 8月, 2020 1 次提交
  15. 24 8月, 2020 1 次提交
  16. 19 8月, 2020 1 次提交
  17. 15 8月, 2020 1 次提交
  18. 05 8月, 2020 1 次提交
  19. 04 8月, 2020 8 次提交