Commit 070740d3 authored by Alex Elder's avatar Alex Elder Committed by Jakub Kicinski

net: ipa: don't pass size to ipa_cmd_transfer_add()

The only time we transfer data (rather than issuing a command) out
of the AP->command TX endpoint is when we're clearing the hardware
pipeline.  All that's needed is a "small" data buffer, and its
contents aren't even important.

For convenience, we just transfer a command structure in this case
(it's already mapped for DMA).  The TRE is added to a transaction
using ipa_cmd_ip_tag_status_add(), but we ignore the size value
provided to that function.  So just get rid of the size argument.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 792b75b1
...@@ -550,7 +550,7 @@ static void ipa_cmd_ip_tag_status_add(struct gsi_trans *trans) ...@@ -550,7 +550,7 @@ static void ipa_cmd_ip_tag_status_add(struct gsi_trans *trans)
} }
/* Issue a small command TX data transfer */ /* Issue a small command TX data transfer */
static void ipa_cmd_transfer_add(struct gsi_trans *trans, u16 size) static void ipa_cmd_transfer_add(struct gsi_trans *trans)
{ {
struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi); struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi);
enum dma_data_direction direction = DMA_TO_DEVICE; enum dma_data_direction direction = DMA_TO_DEVICE;
...@@ -558,8 +558,6 @@ static void ipa_cmd_transfer_add(struct gsi_trans *trans, u16 size) ...@@ -558,8 +558,6 @@ static void ipa_cmd_transfer_add(struct gsi_trans *trans, u16 size)
union ipa_cmd_payload *payload; union ipa_cmd_payload *payload;
dma_addr_t payload_addr; dma_addr_t payload_addr;
/* assert(size <= sizeof(*payload)); */
/* Just transfer a zero-filled payload structure */ /* Just transfer a zero-filled payload structure */
payload = ipa_cmd_payload_alloc(ipa, &payload_addr); payload = ipa_cmd_payload_alloc(ipa, &payload_addr);
...@@ -590,7 +588,7 @@ void ipa_cmd_pipeline_clear_add(struct gsi_trans *trans) ...@@ -590,7 +588,7 @@ void ipa_cmd_pipeline_clear_add(struct gsi_trans *trans)
endpoint = ipa->name_map[IPA_ENDPOINT_AP_LAN_RX]; endpoint = ipa->name_map[IPA_ENDPOINT_AP_LAN_RX];
ipa_cmd_ip_packet_init_add(trans, endpoint->endpoint_id); ipa_cmd_ip_packet_init_add(trans, endpoint->endpoint_id);
ipa_cmd_ip_tag_status_add(trans); ipa_cmd_ip_tag_status_add(trans);
ipa_cmd_transfer_add(trans, 4); ipa_cmd_transfer_add(trans);
} }
/* Returns the number of commands required to clear the pipeline */ /* Returns the number of commands required to clear the pipeline */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment