Skip to content

Commit 1abfb18

Browse files
committed
Merge branch 'net-ipa-fix-cleanup-after-modem-crash'
Alex Elder says: ==================== net: ipa: fix cleanup after modem crash The first patch in this series fixes a bug where the size of a data transfer request was never set, meaning it was 0. The consequence of this was that such a transfer request would never complete if attempted, and led to a hung task timeout. This data transfer is required for cleaning up IPA hardware state when recovering from a modem crash. The code to implement this cleanup is already present, but its use was commented out because it hit the bug described above. So the second patch in this series enables the use of that "tag process" cleanup code. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents e8a1b0e + 2c4bb80 commit 1abfb18

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

drivers/net/ipa/gsi_trans.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,14 @@ void gsi_trans_cmd_add(struct gsi_trans *trans, void *buf, u32 size,
399399
/* assert(which < trans->tre_count); */
400400

401401
/* Set the page information for the buffer. We also need to fill in
402-
* the DMA address for the buffer (something dma_map_sg() normally
403-
* does).
402+
* the DMA address and length for the buffer (something dma_map_sg()
403+
* normally does).
404404
*/
405405
sg = &trans->sgl[which];
406406

407407
sg_set_buf(sg, buf, size);
408408
sg_dma_address(sg) = addr;
409+
sg_dma_len(sg) = sg->length;
409410

410411
info = &trans->info[which];
411412
info->opcode = opcode;

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)