diff options
| author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2024-12-11 00:33:07 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-24 08:56:07 +0100 |
| commit | 70fda9e6da8635719ecbecc5987d4cb3180d0702 (patch) | |
| tree | e05e9c2df0360d8983ae84ec9ef42224da3e7f47 /drivers/usb/gadget/function/tcm.h | |
| parent | 5cf091d59e575bcb6ed054bf1ad3caa7f0efca82 (diff) | |
usb: gadget: f_tcm: Execute command on write completion
Don't just wait for the data write completion and execute the target
command. We need to verify if the request completed successfully and not
just sending invalid data. The verification is done in the write request
completion routine. Queue the same work of the command to execute the
target_execute_cmd() on data write.
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/9f6b1c6946cf49eeba0173e405678b9b7786636b.1733876548.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/function/tcm.h')
| -rw-r--r-- | drivers/usb/gadget/function/tcm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/tcm.h b/drivers/usb/gadget/function/tcm.h index 9d614a7f2ac0..adf4c415140f 100644 --- a/drivers/usb/gadget/function/tcm.h +++ b/drivers/usb/gadget/function/tcm.h @@ -74,11 +74,13 @@ struct usbg_cmd { struct se_cmd se_cmd; void *data_buf; /* used if no sg support available */ struct f_uas *fu; - struct completion write_complete; struct kref ref; struct usb_request *req; + u32 flags; +#define USBG_CMD_PENDING_DATA_WRITE BIT(0) + /* UAS only */ u16 tag; u16 prio_attr; |
