Skip to content

Commit 2c4bb80

Browse files
Alex Elderdavem330
authored andcommitted
net: ipa: use tag process on modem crash
One part of recovering from a modem crash is performing a "tag sequence" of several IPA immediate commands, to clear the hardware pipeline. The sequence ends with a data transfer request on the command endpoint (which is not otherwise done). Unfortunately, attempting to do the data transfer led to a hang, so that request plus two other commands were commented out. The previous commit fixes the bug that was causing that hang. And with that bug fixed we can properly issue the tag sequence when the modem crashes, to return the hardware to a known state. Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c781e1d commit 2c4bb80

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

drivers/net/ipa/ipa_cmd.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -628,23 +628,15 @@ static void ipa_cmd_transfer_add(struct gsi_trans *trans, u16 size)
628628

629629
void ipa_cmd_tag_process_add(struct gsi_trans *trans)
630630
{
631-
ipa_cmd_register_write_add(trans, 0, 0, 0, true);
632-
#if 1
633-
/* Reference these functions to avoid a compile error */
634-
(void)ipa_cmd_ip_packet_init_add;
635-
(void)ipa_cmd_ip_tag_status_add;
636-
(void) ipa_cmd_transfer_add;
637-
#else
638631
struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi);
639-
struct gsi_endpoint *endpoint;
632+
struct ipa_endpoint *endpoint;
640633

641634
endpoint = ipa->name_map[IPA_ENDPOINT_AP_LAN_RX];
642-
ipa_cmd_ip_packet_init_add(trans, endpoint->endpoint_id);
643635

636+
ipa_cmd_register_write_add(trans, 0, 0, 0, true);
637+
ipa_cmd_ip_packet_init_add(trans, endpoint->endpoint_id);
644638
ipa_cmd_ip_tag_status_add(trans, 0xcba987654321);
645-
646639
ipa_cmd_transfer_add(trans, 4);
647-
#endif
648640
}
649641

650642
/* Returns the number of commands required for the tag process */

0 commit comments

Comments
 (0)