Skip to content
Snippets Groups Projects
  1. Aug 17, 2022
  2. Jun 07, 2022
    • Ioana Ciornei's avatar
      dpaa2-eth: increase busy retries when interracting with QBMAN · fa6c3168
      Ioana Ciornei authored
      
      It seems that there are circumstances when access to QBMAN through the
      software portals will be delayed. Accessing some lower speeds interfaces
      while also QBMAN commands are issued from the kernel will lead to
      software timeouts happening in the dpaa2-eth driver.
      
      What we have observed is that management commands like re-arming the
      interrupts on a specific channel, waiting for a dequeue response to be
      available etc, will take a longer time to complete.
      All these commands have to wait for a valid bit to be set for the
      command to be interpreted as successfully completed.
      
      Increase the maximum number of times the Linux kernel drivers will busy
      poll for a successful result of one of these commands.
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      fa6c3168
  3. Jun 06, 2022
    • Ioana Ciornei's avatar
      arm64: lsdk.config: enable CONFIG_SFP and LYNX 28G SerDes PHY · ccd72abc
      Ioana Ciornei authored
      
      Enable CONFIG_SFP for the Linux SFP infrastructure. Also, enable the
      Lynx 28G SerDes PHY driver which supports runtime reconfiguration of
      SerDes lanes.
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      ccd72abc
    • Ioana Ciornei's avatar
      net: phylink: treat PHY_INTERFACE_MODE_2500SGMII in phylink_get_linkmodes · e4c8a0d1
      Ioana Ciornei authored
      
      There is a downstream patch which adds a new interface type -
      PHY_INTERFACE_MODE_2500SGMII (which is really the same one as
      PHY_INTERFACE_MODE_2500BASEX).
      
      We backported from upstream the following phylink patch which, of
      course, does not treat the PHY_INTERFACE_MODE_2500SGMII interface mode
      in a switch case statement.
      	34ae2c09 ("net: phylink: add generic validate implementation")
      
      Because of this, we get the following build warning.
      
      drivers/net/phy/phylink.c: In function ‘phylink_get_linkmodes’:
      drivers/net/phy/phylink.c:322:2: warning: enumeration value ‘PHY_INTERFACE_MODE_2500SGMII’ not handled in switch [-Wswitch]
        322 |  switch (interface) {
            |  ^~~~~~
      
      Fix it by treating the new interface mode in the switch-case statement.
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      e4c8a0d1
  4. Jun 02, 2022
  5. May 31, 2022
  6. May 30, 2022
  7. May 26, 2022
    • Ioana Ciornei's avatar
      dpaa2-eth: unmap the SGT buffer before accessing its contents · 0f79a180
      Ioana Ciornei authored
      
      DMA unmap the Scatter/Gather table before going through the array to
      unmap and free each of the header and data chunks. This is so we do not
      touch the data between the dma_map and dma_unmap calls.
      
      Fixes: 3dc709e0cd47 ("dpaa2-eth: add support for software TSO")
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      (cherry picked from commit 0a09c5b8cb8f75344da7d90c771b84f7cdeaea04)
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      0f79a180
    • Ioana Ciornei's avatar
      dpaa2-eth: use the correct software annotation field · f25c6abb
      Ioana Ciornei authored
      
      The incorrect software annotation field was being used, swa->sg.sgt_size
      instead of swa->tso.sgt_size, which meant that the SGT buffer was
      unmapped with a wrong size.
      This is also confirmed by the DMA API debug prints which showed the
      following:
      
      [   38.962434] DMA-API: fsl_dpaa2_eth dpni.2: device driver frees DMA memory with different size [device address=0x0000fffffafba740] [map size=224 bytes] [unmap size=0 bytes]
      [   38.980496] WARNING: CPU: 11 PID: 1131 at kernel/dma/debug.c:973 check_unmap+0x58c/0x9b0
      [   38.988586] Modules linked in:
      [   38.991631] CPU: 11 PID: 1131 Comm: iperf3 Not tainted 5.18.0-rc7-00117-g59130eeb2b8f #1972
      [   38.999970] Hardware name: NXP Layerscape LX2160ARDB (DT)
      
      Fixes: 3dc709e0cd47 ("dpaa2-eth: add support for software TSO")
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      (cherry picked from commit d5f4e19a85670b4e5697654f4a4e086e064f8a47)
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      f25c6abb
    • Ioana Ciornei's avatar
      dpaa2-eth: retrieve the virtual address before dma_unmap · 9a450998
      Ioana Ciornei authored
      The TSO header was DMA unmapped before the virtual address was retrieved
      and then used to free the buffer. This meant that we were actually
      removing the DMA map and then trying to search for it to help in
      retrieving the virtual address. This lead to a invalid virtual address
      being used in the kfree call.
      
      Fix this by calling dpaa2_iova_to_virt() prior to the dma_unmap call.
      
      [  487.231819] Unable to handle kernel paging request at virtual address fffffd9807000008
      
      (...)
      
      [  487.354061] Hardware name: SolidRun LX2160A Honeycomb (DT)
      [  487.359535] pstate: a0400005 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [  487.366485] pc : kfree+0xac/0x304
      [  487.369799] lr : kfree+0x204/0x304
      [  487.373191] sp : ffff80000c4eb120
      [  487.376493] x29: ffff80000c4eb120 x28: ffff662240c46400 x27: 0000000000000001
      [  487.383621] x26: 0000000000000001 x25: ffff662246da0cc0 x24: ffff66224af78000
      [  487.390748] x23: ffffad184f4ce008 x22: ffffad1850185000 x21: ffffad1838d13cec
      [  487.397874] x20: ffff6601c0000000 x19: fffffd9807000000 x18: 0000000000000000
      [  487.405000] x17: ffffb910cdc49000 x16: ffffad184d7d9080 x15: 0000000000004000
      [  487.412126] x14: 0000000000000008 x13: 000000000000ffff x12: 0000000000000000
      [  487.419252] x11: 0000000000000004 x10: 0000000000000001 x9 : ffffad184d7d927c
      [  487.426379] x8 : 0000000000000000 x7 : 0000000ffffffd1d x6 : ffff662240a94900
      [  487.433505] x5 : 0000000000000003 x4 : 0000000000000009 x3 : ffffad184f4ce008
      [  487.440632] x2 : ffff662243eec000 x1 : 0000000100000100 x0 : fffffc0000000000
      [  487.447758] Call trace:
      [  487.450194]  kfree+0xac/0x304
      [  487.453151]  dpaa2_eth_free_tx_fd.isra.0+0x33c/0x3e0 [fsl_dpaa2_eth]
      [  487.459507]  dpaa2_eth_tx_conf+0x100/0x2e0 [fsl_dpaa2_eth]
      [  487.464989]  dpaa2_eth_poll+0xdc/0x380 [fsl_dpaa2_eth]
      
      Fixes: 3dc709e0cd47 ("dpaa2-eth: add support for software TSO")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215886
      
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      (cherry picked from commit 06d129946a71f3159b3b40ee95549183edf2c79d)
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      9a450998
  8. May 25, 2022
  9. May 23, 2022
  10. May 20, 2022
  11. May 19, 2022
  12. May 18, 2022
Loading