|
@@ -148,6 +148,9 @@ struct usb_ep_ops {
|
|
|
* @maxpacket:The maximum packet size used on this endpoint. The initial
|
|
|
* value can sometimes be reduced (hardware allowing), according to
|
|
|
* the endpoint descriptor used to configure the endpoint.
|
|
|
+ * @maxpacket_limit:The maximum packet size value which can be handled by this
|
|
|
+ * endpoint. It's set once by UDC driver when endpoint is initialized, and
|
|
|
+ * should not be changed. Should not be confused with maxpacket.
|
|
|
* @max_streams: The maximum number of streams supported
|
|
|
* by this EP (0 - 16, actual number is 2^n)
|
|
|
* @mult: multiplier, 'mult' value for SS Isoc EPs
|
|
@@ -171,6 +174,7 @@ struct usb_ep {
|
|
|
const struct usb_ep_ops *ops;
|
|
|
struct list_head ep_list;
|
|
|
unsigned maxpacket:16;
|
|
|
+ unsigned maxpacket_limit:16;
|
|
|
unsigned max_streams:16;
|
|
|
unsigned mult:2;
|
|
|
unsigned maxburst:5;
|
|
@@ -181,6 +185,21 @@ struct usb_ep {
|
|
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
|
|
+/**
|
|
|
+ * usb_ep_set_maxpacket_limit - set maximum packet size limit for endpoint
|
|
|
+ * @ep:the endpoint being configured
|
|
|
+ * @maxpacket_limit:value of maximum packet size limit
|
|
|
+ *
|
|
|
+ * This function shoud be used only in UDC drivers to initialize endpoint
|
|
|
+ * (usually in probe function).
|
|
|
+ */
|
|
|
+static inline void usb_ep_set_maxpacket_limit(struct usb_ep *ep,
|
|
|
+ unsigned maxpacket_limit)
|
|
|
+{
|
|
|
+ ep->maxpacket_limit = maxpacket_limit;
|
|
|
+ ep->maxpacket = maxpacket_limit;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* usb_ep_enable - configure endpoint, making it usable
|
|
|
* @ep:the endpoint being configured. may not be the endpoint named "ep0".
|