]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: ipa: use tag process on modem crash
authorAlex Elder <elder@linaro.org>
Thu, 7 May 2020 19:14:04 +0000 (14:14 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 May 2020 21:00:29 +0000 (14:00 -0700)
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 <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_cmd.c

index d226b858742d007b2ff069d96b00be42e152eb4b..cee417181f981d5ab46ed2f9f86d3719b7620d86 100644 (file)
@@ -628,23 +628,15 @@ static void ipa_cmd_transfer_add(struct gsi_trans *trans, u16 size)
 
 void ipa_cmd_tag_process_add(struct gsi_trans *trans)
 {
-       ipa_cmd_register_write_add(trans, 0, 0, 0, true);
-#if 1
-       /* Reference these functions to avoid a compile error */
-       (void)ipa_cmd_ip_packet_init_add;
-       (void)ipa_cmd_ip_tag_status_add;
-       (void) ipa_cmd_transfer_add;
-#else
        struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi);
-       struct gsi_endpoint *endpoint;
+       struct ipa_endpoint *endpoint;
 
        endpoint = ipa->name_map[IPA_ENDPOINT_AP_LAN_RX];
-       ipa_cmd_ip_packet_init_add(trans, endpoint->endpoint_id);
 
+       ipa_cmd_register_write_add(trans, 0, 0, 0, true);
+       ipa_cmd_ip_packet_init_add(trans, endpoint->endpoint_id);
        ipa_cmd_ip_tag_status_add(trans, 0xcba987654321);
-
        ipa_cmd_transfer_add(trans, 4);
-#endif
 }
 
 /* Returns the number of commands required for the tag process */