Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4e4a72e7 authored by Jack Pham's avatar Jack Pham Committed by Pratham Pratap
Browse files

usb: f_gsi: Add error checking for PREPARE_TRBS and STARTXFER ops



The GSI operations for GSI_EP_OP_PREPARE_TRBS and GSI_EP_OP_STARTXFER
should not proceed if the endpoint is disabled and should return an
error code (-ESHUTDOWN). Add error checking in f_gsi when calling
these ops. This is to catch cases where the endpoint is not enabled
(i.e. GSI_EP_OP_CONFIG was not called or GSI_EP_OP_DISABLE was
called) prior to ipa_connect_channels(), and helps to avoid the
situation in which STARTXFER is called on a disabled endpoint and
later GSI_EP_OP_FREE_TRBS is called which causes the HW to
incorrectly access stale DMA addresses the next time STARTXFER is
called.

Change-Id: I45f70524b87ec6303e135e385accd8e68e2b5a01
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 83bf913b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment