Commit fef1869f authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'ipa-next'



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>
parents 9d036544 4ea29143
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -12,8 +12,7 @@ config QCOM_IPA
	  that is capable of generic hardware handling of IP packets,
	  including routing, filtering, and NAT.  Currently the IPA
	  driver supports only basic transport of network traffic
	  between the AP and modem, on the Qualcomm SDM845 and SC7180
	  SoCs.
	  between the AP and modem.

	  Note that if selected, the selection type must match that
	  of QCOM_Q6V5_COMMON (Y or M).
+1 −1
Original line number Diff line number Diff line
@@ -9,4 +9,4 @@ ipa-y := ipa_main.o ipa_clock.o ipa_reg.o ipa_mem.o \
				ipa_endpoint.o ipa_cmd.o ipa_modem.o \
				ipa_resource.o ipa_qmi.o ipa_qmi_msg.o

ipa-y			+=	ipa_data-sdm845.o ipa_data-sc7180.o
ipa-y			+=	ipa_data-v3.5.1.o ipa_data-v4.2.o
+4 −9
Original line number Diff line number Diff line
@@ -1444,18 +1444,13 @@ static int gsi_ring_alloc(struct gsi *gsi, struct gsi_ring *ring, u32 count)
	dma_addr_t addr;

	/* Hardware requires a 2^n ring size, with alignment equal to size.
	 * The size is a power of 2, so we can check alignment using just
	 * the bottom 32 bits for a DMA address of any size.
	 * The DMA address returned by dma_alloc_coherent() is guaranteed to
	 * be a power-of-2 number of pages, which satisfies the requirement.
	 */
	ring->virt = dma_alloc_coherent(dev, size, &addr, GFP_KERNEL);
	if (ring->virt && lower_32_bits(addr) % size) {
		dma_free_coherent(dev, size, ring->virt, addr);
		dev_err(dev, "unable to alloc 0x%x-aligned ring buffer\n",
			size);
		return -EINVAL;	/* Not a good error value, but distinct */
	} else if (!ring->virt) {
	if (!ring->virt)
		return -ENOMEM;
	}

	ring->addr = addr;
	ring->count = count;

+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ struct gsi_trans;
struct gsi_ring;
struct gsi_channel;

#define GSI_RING_ELEMENT_SIZE	16	/* bytes */
#define GSI_RING_ELEMENT_SIZE	16	/* bytes; must be a power of 2 */

/* Return the entry that follows one provided in a transaction pool */
void *gsi_trans_pool_next(struct gsi_trans_pool *pool, void *element);
@@ -100,7 +100,7 @@ void gsi_channel_doorbell(struct gsi_channel *channel);
/**
 * gsi_ring_virt() - Return virtual address for a ring entry
 * @ring:	Ring whose address is to be translated
 * @addr:	Index (slot number) of entry
 * @index:	Index (slot number) of entry
 */
void *gsi_ring_virt(struct gsi_ring *ring, u32 index);

+4 −5
Original line number Diff line number Diff line
@@ -153,11 +153,10 @@ int gsi_trans_pool_init_dma(struct device *dev, struct gsi_trans_pool *pool,
	size = __roundup_pow_of_two(size);
	total_size = (count + max_alloc - 1) * size;

	/* The allocator will give us a power-of-2 number of pages.  But we
	 * can't guarantee that, so request it.  That way we won't waste any
	 * memory that would be available beyond the required space.
	 *
	 * Note that gsi_trans_pool_exit_dma() assumes the total allocated
	/* The allocator will give us a power-of-2 number of pages
	 * sufficient to satisfy our request.  Round up our requested
	 * size to avoid any unused space in the allocation.  This way
	 * gsi_trans_pool_exit_dma() can assume the total allocated
	 * size is exactly (count * size).
	 */
	total_size = get_order(total_size) << PAGE_SHIFT;
Loading