Skip to content
  1. Mar 30, 2021
  2. Mar 29, 2021
    • David S. Miller's avatar
      Merge branch 'ipa-next' · fef1869f
      David S. Miller authored
      
      
      Alex Elder says:
      
      ====================
      net: ipa: a few last bits
      
      This series incorporates a few last things that didn't fit neatly
      with patches I've posted recently.
      
      The first patch eliminates all remaining kernel-doc warnings.
      There's still room for kernel-doc improvement, but at least what's
      there will no longer produce warnings.
      
      The next moves the definition of the value to store in the backward
      compatibility register (when present) into platform data files.
      
      The third removes two endpoint definitions that do not need to be
      defined.
      
      The next two switch the naming convention used for configuration
      data files to be based on the IPA version rather than the specific
      platform.  I was skeptical about this at first (i.e., I thought a
      platform might have quirks separate from the IPA version).  But
      I'm now convinced the IPA version is enough to define the details
      of the hardware block.  If any exceptions to this are found, we can
      treat those differently.  Note:  these two patches produce warnings
      from checkpatch.pl about updating MAINTAINERS: these can be ignored.
      
      The sixth removes unnecessary checks for alignment of DMA memory
      allocations, based comments from David Laight.
      
      And the last removes a symbol representing the size of a table
      entry, using sizeof(__le64) in its place.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fef1869f
    • Alex Elder's avatar
      net: ipa: kill IPA_TABLE_ENTRY_SIZE · 4ea29143
      Alex Elder authored
      
      
      Entries in an IPA route or filter table are 64-bit little-endian
      addresses, each of which refers to a routing or filtering rule.
      
      The format of these table slots are fixed, but IPA_TABLE_ENTRY_SIZE
      is used to define their size.  This symbol doesn't really add value,
      and I think it unnecessarily obscures what a table entry *is*.
      
      So get rid of IPA_TABLE_ENTRY_SIZE, and just use sizeof(__le64) in
      its place throughout the code.
      
      Update the comments in "ipa_table.c" to provide a little better
      explanation of these table slots.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ea29143
    • Alex Elder's avatar
      net: ipa: DMA addresses are nicely aligned · 19aaf72c
      Alex Elder authored
      
      
      A recent patch avoided doing 64-bit modulo operations by checking
      the alignment of some DMA allocations using only the lower 32 bits
      of the address.
      
      David Laight pointed out (after the fix was committed) that DMA
      allocations might already satisfy the alignment requirements.  And
      he was right.
      
      Remove the alignment checks that occur after DMA allocation requests,
      and update comments to explain why the constraint is satisfied.  The
      only place IPA_TABLE_ALIGN was used was to check the alignment; it is
      therefore no longer needed, so get rid of it.
      
      Add comments where GSI_RING_ELEMENT_SIZE and the tre_count and
      event_count channel data fields are defined to make explicit they
      are required to be powers of 2.
      
      Revise a comment in gsi_trans_pool_init_dma(), taking into account
      that dma_alloc_coherent() guarantees its result is aligned to a page
      size (or order thereof).
      
      Don't bother printing an error if a DMA allocation fails.
      
      Suggested-by: default avatarDavid Laight <David.Laight@ACULAB.COM>
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      19aaf72c
    • Alex Elder's avatar
      net: ipa: use version based configuration for SC7180 · 782d767a
      Alex Elder authored
      
      
      Rename the SC7180 configuration data file so that its name is
      derived from its IPA version.
      
      Update a few other references to the code that talk about the SC7180
      rather than just IPA v4.2.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      782d767a
    • Alex Elder's avatar
      net: ipa: switch to version based configuration · fc566dab
      Alex Elder authored
      
      
      Rename the SDM845 configuration data file so that its name is
      derived from its IPA version.  I am not aware of any special IPA
      behavior or handling that would be based on a specific SoC (as
      opposed to a specific version of the IPA it contains).
      
      Update a few other references to the code that talk about the SDM845
      rather than just IPA v3.5.1.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc566dab
    • Alex Elder's avatar
      net: ipa: don't define endpoints unnecessarily · d21d1f33
      Alex Elder authored
      
      
      We don't typically need much information about modem endpoints.
      Normally we need to specify information about modem endpoints in
      configuration data in only two cases:
        - When a modem TX endpoint supports filtering
        - When another endpoint's configuration refers to it
      
      For the first case, the AP initializes the filter table, and must
      know how many endpoints (AP and modem) support filtering.  An
      example of the second case is the AP->modem TX endpoint, which
      defines the modem<-AP RX endpoint as its status endpoint.
      
      There is one exception to this, and it's due to a hardware quirk.
      For IPA v4.2 (only) there is a problem related to allocating GSI
      channels.  And to work around this, the AP allocates *all* GSI
      channels at startup time--including those used by the modem.
      
      Get rid of the configuration information for two endpoints not
      required for the SDM845.  SC7180 runs IPA v4.2, so we can't
      eliminate any modem endpoint definitions there.
      
      Two more minor changes:
        - Reorder the members defined for the ipa_endpoint_name enumerated
          type to match the order used in configuration data files when
          defining endpoints.
        - Add a new name, IPA_ENDPOINT_MODEM_DL_NLO_TX, which can be used
          for IPA v4.5+.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d21d1f33
    • Alex Elder's avatar
      net: ipa: store BCR register values in config data · e695bed2
      Alex Elder authored
      
      
      The backward compatibility register value is a platform-specific
      property that is not stored in the platform data.  Create a data
      field where this can be represented, and get rid ipa_reg_bcr_val().
      
      This register is not present starting with IPA v4.5.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e695bed2
    • Alex Elder's avatar
      net: ipa: fix all kernel-doc warnings · 862d3f2c
      Alex Elder authored
      
      
      Fix all warnings produced when running:
        scripts/kernel-doc -none drivers/net/ipa/*.[ch]
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      862d3f2c