Loading drivers/usb/gadget/Kconfig +8 −0 Original line number Diff line number Diff line Loading @@ -595,6 +595,14 @@ config USB_CONFIGFS_F_GSI related functionalities using GSI hardware accelerated data path and control path. config USB_LOW_MEM_VARIANT bool "USB Memory optimization" help Memory requirement for buffers can vary from target to target. Enable this option if memory optimization is required for any low memory variant target. In such case memory needed to be allocated to buffers of various function drivers can be reduced. config USB_FUNC_WAKEUP_SUPPORTED bool "USB Function Remote Wakeup support" depends on QGKI Loading drivers/usb/gadget/function/f_gsi.c +13 −1 Original line number Diff line number Diff line Loading @@ -2877,9 +2877,15 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f) info.ss_desc_hdr = gsi_eth_ss_function; info.in_epname = "gsi-epin"; info.out_epname = "gsi-epout"; #ifdef CONFIG_USB_LOW_MEM_VARIANT info.in_req_buf_len = GSI_IN_BUFF_SIZE; gsi->d_port.in_aggr_size = GSI_IN_LOW_MEM_RNDIS_AGGR_SIZE; info.in_req_num_buf = GSI_NUM_IN_BUFFERS; #else info.in_req_buf_len = GSI_IN_RNDIS_BUFF_SIZE; gsi->d_port.in_aggr_size = GSI_IN_RNDIS_AGGR_SIZE; info.in_req_num_buf = GSI_NUM_IN_RNDIS_BUFFERS; #endif gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE; info.out_req_buf_len = GSI_OUT_AGGR_SIZE; info.out_req_num_buf = GSI_NUM_OUT_BUFFERS; Loading Loading @@ -3053,10 +3059,16 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f) info.in_epname = "gsi-epin"; info.out_epname = "gsi-epout"; gsi->d_port.in_aggr_size = GSI_IN_RMNET_AGGR_SIZE; #ifdef CONFIG_USB_LOW_MEM_VARIANT info.in_req_buf_len = GSI_IN_BUFF_SIZE; info.in_req_num_buf = GSI_NUM_IN_BUFFERS; info.out_req_buf_len = GSI_OUT_LOW_MEM_RMNET_BUF_LEN; #else info.in_req_buf_len = GSI_IN_RMNET_BUFF_SIZE; info.in_req_num_buf = GSI_NUM_IN_RMNET_BUFFERS; gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE; info.out_req_buf_len = GSI_OUT_RMNET_BUF_LEN; #endif gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE; info.out_req_num_buf = GSI_NUM_OUT_BUFFERS; info.notify_buf_len = sizeof(struct usb_cdc_notification); break; Loading drivers/usb/gadget/function/f_gsi.h +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ #define GSI_IN_RMNET_AGGR_SIZE 16384 #define GSI_ECM_AGGR_SIZE 2048 #define GSI_IN_LOW_MEM_RNDIS_AGGR_SIZE 9216 #define GSI_OUT_LOW_MEM_RMNET_BUF_LEN 16384 #define GSI_OUT_MBIM_BUF_LEN 16384 #define GSI_OUT_RMNET_BUF_LEN 31744 #define GSI_OUT_ECM_BUF_LEN 2048 Loading Loading
drivers/usb/gadget/Kconfig +8 −0 Original line number Diff line number Diff line Loading @@ -595,6 +595,14 @@ config USB_CONFIGFS_F_GSI related functionalities using GSI hardware accelerated data path and control path. config USB_LOW_MEM_VARIANT bool "USB Memory optimization" help Memory requirement for buffers can vary from target to target. Enable this option if memory optimization is required for any low memory variant target. In such case memory needed to be allocated to buffers of various function drivers can be reduced. config USB_FUNC_WAKEUP_SUPPORTED bool "USB Function Remote Wakeup support" depends on QGKI Loading
drivers/usb/gadget/function/f_gsi.c +13 −1 Original line number Diff line number Diff line Loading @@ -2877,9 +2877,15 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f) info.ss_desc_hdr = gsi_eth_ss_function; info.in_epname = "gsi-epin"; info.out_epname = "gsi-epout"; #ifdef CONFIG_USB_LOW_MEM_VARIANT info.in_req_buf_len = GSI_IN_BUFF_SIZE; gsi->d_port.in_aggr_size = GSI_IN_LOW_MEM_RNDIS_AGGR_SIZE; info.in_req_num_buf = GSI_NUM_IN_BUFFERS; #else info.in_req_buf_len = GSI_IN_RNDIS_BUFF_SIZE; gsi->d_port.in_aggr_size = GSI_IN_RNDIS_AGGR_SIZE; info.in_req_num_buf = GSI_NUM_IN_RNDIS_BUFFERS; #endif gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE; info.out_req_buf_len = GSI_OUT_AGGR_SIZE; info.out_req_num_buf = GSI_NUM_OUT_BUFFERS; Loading Loading @@ -3053,10 +3059,16 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f) info.in_epname = "gsi-epin"; info.out_epname = "gsi-epout"; gsi->d_port.in_aggr_size = GSI_IN_RMNET_AGGR_SIZE; #ifdef CONFIG_USB_LOW_MEM_VARIANT info.in_req_buf_len = GSI_IN_BUFF_SIZE; info.in_req_num_buf = GSI_NUM_IN_BUFFERS; info.out_req_buf_len = GSI_OUT_LOW_MEM_RMNET_BUF_LEN; #else info.in_req_buf_len = GSI_IN_RMNET_BUFF_SIZE; info.in_req_num_buf = GSI_NUM_IN_RMNET_BUFFERS; gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE; info.out_req_buf_len = GSI_OUT_RMNET_BUF_LEN; #endif gsi->d_port.out_aggr_size = GSI_OUT_AGGR_SIZE; info.out_req_num_buf = GSI_NUM_OUT_BUFFERS; info.notify_buf_len = sizeof(struct usb_cdc_notification); break; Loading
drivers/usb/gadget/function/f_gsi.h +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ #define GSI_IN_RMNET_AGGR_SIZE 16384 #define GSI_ECM_AGGR_SIZE 2048 #define GSI_IN_LOW_MEM_RNDIS_AGGR_SIZE 9216 #define GSI_OUT_LOW_MEM_RMNET_BUF_LEN 16384 #define GSI_OUT_MBIM_BUF_LEN 16384 #define GSI_OUT_RMNET_BUF_LEN 31744 #define GSI_OUT_ECM_BUF_LEN 2048 Loading