Loading drivers/usb/gadget/function/u_qdss.c +29 −8 Original line number Diff line number Diff line /* * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2017, 2020 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -21,6 +21,7 @@ static int alloc_sps_req(struct usb_ep *data_ep) { struct usb_request *req = NULL; struct f_qdss *qdss = data_ep->driver_data; struct usb_gadget *gadget = qdss->gadget; u32 sps_params = 0; pr_debug("send_sps_req\n"); Loading @@ -31,9 +32,17 @@ static int alloc_sps_req(struct usb_ep *data_ep) return -ENOMEM; } if (!gadget->is_chipidea) { req->length = 32*1024; sps_params = MSM_SPS_MODE | MSM_DISABLE_WB | qdss->bam_info.usb_bam_pipe_idx; } else { /* non DWC3 BAM requires req->length to be 0 */ req->length = 0; sps_params = (MSM_SPS_MODE | qdss->bam_info.usb_bam_pipe_idx | MSM_VENDOR_ID) & ~MSM_IS_FINITE_TRANSFER; } req->udc_priv = sps_params; qdss->endless_req = req; Loading Loading @@ -107,6 +116,7 @@ int set_qdss_data_connection(struct f_qdss *qdss, int enable) NULL, bam_info.data_fifo, NULL); alloc_sps_req(qdss->port.data); if (!gadget->is_chipidea) msm_data_fifo_config(qdss->port.data, bam_info.data_fifo->iova, bam_info.data_fifo->size, Loading @@ -132,8 +142,14 @@ int set_qdss_data_connection(struct f_qdss *qdss, int enable) static int init_data(struct usb_ep *ep) { struct f_qdss *qdss = ep->driver_data; struct usb_gadget *gadget = qdss->gadget; int res = 0; if (gadget->is_chipidea) { pr_debug("QDSS is used with non DWC3 core\n"); return res; } pr_debug("%s\n", __func__); res = msm_ep_config(ep, qdss->endless_req); Loading @@ -145,8 +161,13 @@ static int init_data(struct usb_ep *ep) int uninit_data(struct usb_ep *ep) { struct f_qdss *qdss = ep->driver_data; struct usb_gadget *gadget = qdss->gadget; int res = 0; if (gadget->is_chipidea) return res; pr_debug("%s\n", __func__); res = msm_ep_unconfig(ep); Loading Loading
drivers/usb/gadget/function/u_qdss.c +29 −8 Original line number Diff line number Diff line /* * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2017, 2020 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -21,6 +21,7 @@ static int alloc_sps_req(struct usb_ep *data_ep) { struct usb_request *req = NULL; struct f_qdss *qdss = data_ep->driver_data; struct usb_gadget *gadget = qdss->gadget; u32 sps_params = 0; pr_debug("send_sps_req\n"); Loading @@ -31,9 +32,17 @@ static int alloc_sps_req(struct usb_ep *data_ep) return -ENOMEM; } if (!gadget->is_chipidea) { req->length = 32*1024; sps_params = MSM_SPS_MODE | MSM_DISABLE_WB | qdss->bam_info.usb_bam_pipe_idx; } else { /* non DWC3 BAM requires req->length to be 0 */ req->length = 0; sps_params = (MSM_SPS_MODE | qdss->bam_info.usb_bam_pipe_idx | MSM_VENDOR_ID) & ~MSM_IS_FINITE_TRANSFER; } req->udc_priv = sps_params; qdss->endless_req = req; Loading Loading @@ -107,6 +116,7 @@ int set_qdss_data_connection(struct f_qdss *qdss, int enable) NULL, bam_info.data_fifo, NULL); alloc_sps_req(qdss->port.data); if (!gadget->is_chipidea) msm_data_fifo_config(qdss->port.data, bam_info.data_fifo->iova, bam_info.data_fifo->size, Loading @@ -132,8 +142,14 @@ int set_qdss_data_connection(struct f_qdss *qdss, int enable) static int init_data(struct usb_ep *ep) { struct f_qdss *qdss = ep->driver_data; struct usb_gadget *gadget = qdss->gadget; int res = 0; if (gadget->is_chipidea) { pr_debug("QDSS is used with non DWC3 core\n"); return res; } pr_debug("%s\n", __func__); res = msm_ep_config(ep, qdss->endless_req); Loading @@ -145,8 +161,13 @@ static int init_data(struct usb_ep *ep) int uninit_data(struct usb_ep *ep) { struct f_qdss *qdss = ep->driver_data; struct usb_gadget *gadget = qdss->gadget; int res = 0; if (gadget->is_chipidea) return res; pr_debug("%s\n", __func__); res = msm_ep_unconfig(ep); Loading