From: Thinh Nguyen Date: Wed, 11 Dec 2024 00:32:55 +0000 (+0000) Subject: usb: gadget: f_tcm: Use extra number of commands X-Git-Tag: v6.14-rc1~69^2~57 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=9e0f5819bafcfba0dbfb910a72c3a2f23f501cb6;p=linux-block.git usb: gadget: f_tcm: Use extra number of commands To properly respond to host sending more commands than the number of streams the device advertises, the device needs to be able to reject the command with a response. Allocate an extra request to handle 1 more command than the number of streams. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/256f2ec8f5e042ab692d9593144fa75f3d3ce94b.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/function/tcm.h b/drivers/usb/gadget/function/tcm.h index cd8d06419d5f..9d614a7f2ac0 100644 --- a/drivers/usb/gadget/function/tcm.h +++ b/drivers/usb/gadget/function/tcm.h @@ -16,7 +16,7 @@ #define UASP_SS_EP_COMP_LOG_STREAMS 5 #define UASP_SS_EP_COMP_NUM_STREAMS (1 << UASP_SS_EP_COMP_LOG_STREAMS) -#define USBG_NUM_CMDS UASP_SS_EP_COMP_NUM_STREAMS +#define USBG_NUM_CMDS (UASP_SS_EP_COMP_NUM_STREAMS + 1) enum { USB_G_STR_INT_UAS = 0,