linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@nxp.com>
To: Wesley Cheng <wcheng@codeaurora.org>, Peter Chen <hzpeterchen@gmail.com>
Cc: "agross@kernel.org" <agross@kernel.org>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"balbi@kernel.org" <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>,
	"jackp@codeaurora.org" <jackp@codeaurora.org>
Subject: RE: [RFC v4 1/3] usb: dwc3: Resize TX FIFOs to meet EP bursting requirements
Date: Wed, 12 Aug 2020 11:01:50 +0000	[thread overview]
Message-ID: <AM7PR04MB7157E57CA693586D6C6F96BE8B420@AM7PR04MB7157.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <47f1568e-ba8f-b7f2-9f67-a891c0e06541@codeaurora.org>

 
 
> 
> Thank you for your input.  I've actually considered doing some matching/resizing in
> the .match_ep route as well, but it doesn't work well for situations where multiple
> configurations are in play. The reason being that if you look at the epautoconf APIs,
> the configfs driver will use the usb_ep_autoconfig_reset() to reset the endpoints
> claimed between initialization of each configuration.  This means that the
> epautoconf driver expects to re-use the usb_endpoints:
> 
> static int configfs_composite_bind(struct usb_gadget *gadget,
> 	struct usb_gadget_driver *gdriver)
> {
> ...
> 
> /* Go through all configs, attach all functions */ list_for_each_entry(c, &gi-
> >cdev.configs, list) { ...
> list_for_each_entry_safe(f, tmp, &cfg->func_list, list) {
> 	list_del(&f->list);
> 	ret = usb_add_function(c, f);
> 	if (ret) {
> 		list_add(&f->list, &cfg->func_list);
> 		goto err_purge_funcs;
> 	}
> }
> usb_ep_autoconfig_reset(cdev->gadget);
> }
> 
> So in this situation, I wouldn't want the dwc3 gadget driver to assign a different
> dwc3 ep for endpoints in each configuration, when we know that only one set of
> EPs will be active when the host chooses.  I hope I understood your feedback
> correctly, and definitely appreciate the input!
> 
 
Thanks for mention that, we didn't consider multiple configurations use case, it needs
the UDC driver to record the configuration information, it is too complex at current framework.

I think your solution is OK, reserving one packet for each IN endpoint to avoid running out of
FIFO for later endpoints and fit the first endpoints with larger FIFO room to get the best
performance, it could use as many as FIFOs the device owns.

Peter


  reply	other threads:[~2020-08-12 11:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24  2:28 [RFC v4 0/3] Re-introduce TX FIFO resize for larger EP bursting Wesley Cheng
2020-06-24  2:28 ` [RFC v4 1/3] usb: dwc3: Resize TX FIFOs to meet EP bursting requirements Wesley Cheng
2020-08-10 12:27   ` Felipe Balbi
2020-08-11  5:10     ` Wesley Cheng
2020-08-11  7:12       ` Felipe Balbi
2020-08-11 13:44         ` Alan Stern
2020-08-12 18:34         ` Wesley Cheng
2020-08-18 19:58           ` Wesley Cheng
2020-08-12  2:22   ` Peter Chen
2020-08-12  7:00     ` Wesley Cheng
2020-08-12 11:01       ` Peter Chen [this message]
2020-06-24  2:28 ` [RFC v4 2/3] arm64: boot: dts: qcom: sm8150: Enable dynamic TX FIFO resize logic Wesley Cheng
2020-06-24  2:28 ` [RFC v4 3/3] dt-bindings: usb: dwc3: Add entry for tx-fifo-resize Wesley Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM7PR04MB7157E57CA693586D6C6F96BE8B420@AM7PR04MB7157.eurprd04.prod.outlook.com \
    --to=peter.chen@nxp.com \
    --cc=agross@kernel.org \
    --cc=balbi@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hzpeterchen@gmail.com \
    --cc=jackp@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wcheng@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).