Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cb63ea

Browse files
Alex Elderdavem330
authored andcommitted
net: ipa: introduce ipa_cmd_tag_process()
Create a new function ipa_cmd_tag_process() that simply allocates a transaction, adds a tag process command to it to clear the hardware pipeline, and commits the transaction. Call it in from ipa_endpoint_suspend(), after suspending the modem endpoints but before suspending the AP command TX and AP LAN RX endpoints (which are used by the tag sequence). Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 41af543 commit 6cb63ea

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

drivers/net/ipa/ipa_cmd.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,21 @@ u32 ipa_cmd_tag_process_count(void)
586586
return 4;
587587
}
588588

589+
void ipa_cmd_tag_process(struct ipa *ipa)
590+
{
591+
u32 count = ipa_cmd_tag_process_count();
592+
struct gsi_trans *trans;
593+
594+
trans = ipa_cmd_trans_alloc(ipa, count);
595+
if (trans) {
596+
ipa_cmd_tag_process_add(trans);
597+
gsi_trans_commit_wait(trans);
598+
} else {
599+
dev_err(&ipa->pdev->dev,
600+
"error allocating %u entry tag transaction\n", count);
601+
}
602+
}
603+
589604
static struct ipa_cmd_info *
590605
ipa_cmd_info_alloc(struct ipa_endpoint *endpoint, u32 tre_count)
591606
{

drivers/net/ipa/ipa_cmd.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ void ipa_cmd_tag_process_add(struct gsi_trans *trans);
171171
*/
172172
u32 ipa_cmd_tag_process_count(void);
173173

174+
/**
175+
* ipa_cmd_tag_process() - Perform a tag process
176+
*
177+
* @Return: The number of elements to allocate in a transaction
178+
* to hold tag process commands
179+
*/
180+
void ipa_cmd_tag_process(struct ipa *ipa);
181+
174182
/**
175183
* ipa_cmd_trans_alloc() - Allocate a transaction for the command TX endpoint
176184
* @ipa: IPA pointer

drivers/net/ipa/ipa_endpoint.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,8 @@ void ipa_endpoint_suspend(struct ipa *ipa)
14501450
if (ipa->modem_netdev)
14511451
ipa_modem_suspend(ipa->modem_netdev);
14521452

1453+
ipa_cmd_tag_process(ipa);
1454+
14531455
ipa_endpoint_suspend_one(ipa->name_map[IPA_ENDPOINT_AP_LAN_RX]);
14541456
ipa_endpoint_suspend_one(ipa->name_map[IPA_ENDPOINT_AP_COMMAND_TX]);
14551457
}

0 commit comments

Comments
 (0)