diff options
| author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2024-12-11 00:32:25 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-24 08:56:06 +0100 |
| commit | 8840047985bbe3b49855f4e164ad92253d6f8136 (patch) | |
| tree | 0c65537957f966d3e87a5917a9fa02a0eb46721a /drivers/usb | |
| parent | usb: gadget: f_tcm: Increase bMaxBurst (diff) | |
| download | linux-8840047985bbe3b49855f4e164ad92253d6f8136.tar.gz linux-8840047985bbe3b49855f4e164ad92253d6f8136.zip | |
usb: gadget: f_tcm: Limit number of sessions
Only allocate up to UASP_SS_EP_COMP_NUM_STREAMS number of session tags.
We should not be using more than UASP_SS_EP_COMP_NUM_STREAMS of tags due
to the number of commands limit we imposed. Each command uses a unique
tag. Any more than that is unnecessary. By limiting it, we can detect an
issue in our driver immediately should we run out of session tags.
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/017016ffcab2f3c284d863fc42483b83dbd21b35.1733876548.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/gadget/function/tcm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/tcm.h b/drivers/usb/gadget/function/tcm.h index 6cb05dcd19ff..385bc2cdefb6 100644 --- a/drivers/usb/gadget/function/tcm.h +++ b/drivers/usb/gadget/function/tcm.h @@ -24,7 +24,7 @@ enum { #define USB_G_ALT_INT_BBB 0 #define USB_G_ALT_INT_UAS 1 -#define USB_G_DEFAULT_SESSION_TAGS 128 +#define USB_G_DEFAULT_SESSION_TAGS UASP_SS_EP_COMP_NUM_STREAMS struct tcm_usbg_nexus { struct se_session *tvn_se_sess; |
