Hi Oliver,
On 02/29/2016 08:34 AM, Felipe Balbi wrote:
>
> Hi,
>
> Olivier Schonken writes:
>> Hope I'm not raising an issue which actually is my own stupidity.
>>
>> I recently upstreamed my embedded Linux kernel to version 4.4, after which
>> I started experiencing issues with my serial gadge
27;m doing part of changes
mentioned above. I can send them as RFC to show what is final result
which I want to achieve.
Best regards,
Robert Baldyga
Changelog:
v4:
- Added 7 new patches
- Few minor fixes
v3: https://lkml.org/lkml/2015/12/11/311
- Fixed handling of vendor specific descriptor attac
plete function bound.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_sourcesink.c | 98 --
drivers/usb/gadget/function/g_zero.h | 3 +
drivers/usb/gadget/legacy/zero.c | 6 ++
3 files changed, 76 insertions(+), 31 deletions(-)
diff --
ditional spinlock protecting deactivation
counter.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 9 +
include/linux/usb/composite.h | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite
, because we now store information about
endpoints, allows us to handle endpoint state inside composite framework,
and in result remove lots of boilerplate code from USB functions.
Signed-off-by: Robert Baldyga
---
include/linux/usb/composite.h | 126 ++
1 file
: Robert Baldyga
---
drivers/usb/gadget/function/f_loopback.c | 58 +---
1 file changed, 23 insertions(+), 35 deletions(-)
diff --git a/drivers/usb/gadget/function/f_loopback.c
b/drivers/usb/gadget/function/f_loopback.c
index ddc3aad..f985107 100644
--- a/drivers/usb
As usb_gstrings_attach() failure can happen when some USB functions are
are already added to some configurations (in previous loop iterations),
we should always call purge_configs_funcs() to be sure that failure is
be handled properly.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget
descriptors format.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 343 +
include/linux/usb/composite.h | 52 +++
2 files changed, 395 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index
dware, which means that interface numbers and endpoint addresses
are already assigned so that function can use these values to prepare
class or vendor specific descriptors and attach them to function.
Signed-off-by: Robert Baldyga
---
include/linux/usb/composite.h | 8
1 file chang
(). It also takes over the function of
disable() opetarion, so it can be removed after converting all USB
functions to new API.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 12
include/linux/usb/composite.h | 4
2 files changed, 12 insertions(+), 4 deletions
For now we generate descriptor arrays for each speed as it is done by old
API functions, to allow use mixed new and old API based functions in single
configurations.
This will be removed after complete switch to new API.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 175
Changes meaning of disable() operation for functions using new API.
Before calling disable() callback composite automatically disables
endpoints of active altsettings of given USB function. This reduces
amount of boilerplate code in USB functions.
Signed-off-by: Robert Baldyga
---
drivers/usb
After binding all configurations in gadget, call prep_vendor_descs()
for each function which uses new API and implements this callback.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 31 +++
include/linux/usb/composite.h | 2 ++
2 files changed
oints.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 162 +
include/linux/usb/composite.h | 3 +
2 files changed, 165 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 3f9cad8..f196bb6 100644
Introduce function returning endpoint of given index in active altsetting
of specified interface. It's intended to be used in set_alt() callback
to obtain endpoints of currently selected altsetting.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c
As now we store current altsetting number for each interface, we can
handle USB_REQ_GET_INTERFACE automatically.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers
some class or vendor specific setup requests.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 19 +++
include/linux/usb/composite.h | 2 ++
2 files changed, 21 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index
in function and pass it to set_alt()
callback instead of passing index of interface in configuration which has
to be obtained from interface descriptor. This simplifies altsetting
changes handling in code of USB functions.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 83
usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_loopback.c | 162 ++-
drivers/usb/gadget/legacy/zero.c | 3 +
2 files changed, 33 insertions(+), 132 deletions(-)
diff --git a/drivers/usb/gadget
Introduce function returning address of given endpoint within the function.
This value can be useful during preparation of class or vendor specific
descriptors in prep_vendor_descs() callback. It can be also necessary
to handle some class or vendor specific setup requests.
Signed-off-by: Robert
em
in composite framework.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 49 ++
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 417e2f9..0afb54c 100644
--- a/dr
code. Change USB request lifetime management - now
it's allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_ecm.c | 321 +++-
1 file changed, 92 insertions(+), 229 deletions(-)
diff --git a/driver
.
Call usb_config_do_bind() in legacy gadget zero, because it uses
usb_add_config_only() instead of usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_sourcesink.c | 314 ++---
drivers/usb/gadget/function
Handle functions using new API properly.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/configfs.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index fb3c9ba..60c6898 100644
--- a/drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
x27;s allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_rndis.c | 321 --
1 file changed, 112 insertions(+), 209 deletions(-)
diff --git a/drivers/usb/gadget/function/f_rndis.c
b/drivers/usb/gadget/fun
-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_hid.c | 305 ++--
1 file changed, 119 insertions(+), 186 deletions(-)
diff --git a/drivers/usb/gadget/function/f_hid.c
b/drivers/usb/gadget/function/f_hid.c
index 0456a53..8770289 100644
--- a/drivers/usb
So far USB requests allocated in hidg_set_alt() were not freed. Now we
free them in case of hidg_set_alt() failure (when we are not able to
allocate and enqueue all the requests) or in hidg_disable() function.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_hid.c | 22
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_serial.c | 122 +++--
1
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
As we don't need distinction between interface descriptors for different
speeds, we can remove some amount of unnecessary code. Additionally we
simplify configfs interface of UVC function.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_uvc.c
Update documentation to reflect changes in UVC configfs interface.
Signed-off-by: Robert Baldyga
---
Documentation/ABI/testing/configfs-usb-gadget-uvc | 39 ---
Documentation/usb/gadget-testing.txt | 18 +++
2 files changed, 12 insertions(+), 45
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_mass_storage.c | 91
As we have automatic endpoint state handling it's no longer needed.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/u_serial.c | 16
1 file changed, 16 deletions(-)
diff --git a/drivers/usb/gadget/function/u_serial.c
b/drivers/usb/gadget/function/u_ser
automatically by composite framwework. Remove boilerplate
code.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_uvc.c | 478
drivers/usb/gadget/function/uvc.h | 3 -
2 files changed, 160 insertions(+), 321 deletions(-)
diff --git a/drivers/usb
Fixes: 76e0da34c7cec5a7dc94667326a948de2e9c8c8d
("usb-gadget/uvc: use per-attribute show and store methods")
s/aname/cname - 'cname' was originally used as an attribute name,
because UVCG_OPTS_ATTR() macro doesn't have 'aname' parameter.
Signed-off-b
As we have automatic endpoint state handling it's no longer needed.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/u_ether.c | 28 ++--
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/usb/gadget/function/u_ether.c
b/driver
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_sourcesink.c | 63 --
1 file changed, 51 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/gadget/function/f_sourcesink.c
b/drivers/usb/gadget/function/f_sourcesink.c
index e950031..6193b47 100644
--- a
In context of FIFO registers we use ep->fifo_index instead of ep->index.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 422ab7d..0d0f6fe 100644
Hello,
This patch series fixes TX FIFO handling in UDC part of DWC2 driver.
It gets rid of few bugs, improves compliance with DWC2 documentation
and cleanes up driver code. More detailed description is provided in
commit messages.
Best regards,
Robert Baldyga
Changelog:
v2:
- Addressed
As kill_all_requests() potentially flushes TX FIFO, we should should
free FIFO after calling it. Otherwise FIFO could stay unflushed properly.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc2
Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index
is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is
never executed.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
d
Since we handle FIFOs and endpoint separately, using variable named 'ep'
in context of FIFO is misleading, hence we rename it to 'fifo'.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --gi
), as specified during
coreConsultant configuration."
That means, that we have to setup only FIFO start addresses (DPTxFStAddr),
taking into account reset values of DPTxFSize.
Initialize FIFO start addresses properly and remove unneeded core related
to incorrect FIFO size initialization.
Signed-off-
> Call Trace:
> [<80c0e3b6>] ? usb_ep_autoconfig_ss+0x86/0x170
> [<80c13345>] gs_free_req+0x15/0x30
> [<80c12df1>] acm_bind+0x1c1/0x2d0
> [<80c0e9be>] usb_add_function+0x6e/0x120
> [<80c213cb>] acm_function_bind_config+0x2b/0x90
>
Looks g
Hello,
This patch series fixes TX FIFO handling in UDC part of DWC2 driver.
It gets rid of few bugs, improves compliance with DWC2 documentation
and cleanes up driver code. More detailed description is provided in
commit messages.
Best regards,
Robert Baldyga
Robert Baldyga (5):
usb: dwc2
In context of FIFO registers we use ep->fifo_index instead of ep->index.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 4e9fc92..773d121 100644
), as specified during
coreConsultant configuration."
That means, that we have to setup only FIFO start addresses (DPTxFStAddr),
taking into account reset values of DPTxFSize.
Initialize FIFO start addresses properly and remove unneeded core related
to incorrect FIFO size initialization.
Signed-off-
Since we handle FIFOs and endpoint separately, using variable named 'ep'
in context of FIFO is misleading, hence we rename it to 'fifo'.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --gi
As kill_all_requests() potentially flushes TX FIFO, we should should
free FIFO after calling it. Otherwise FIFO could stay unflushed properly.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc2
Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index
is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is
never executed.
Signed-off-by: Robert Baldyga
---
drivers/usb/dwc2/gadget.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
d
b6>] ? usb_ep_autoconfig_ss+0x86/0x170
> [<80c13345>] gs_free_req+0x15/0x30
> [<80c12df1>] acm_bind+0x1c1/0x2d0
> [<80c0e9be>] usb_add_function+0x6e/0x120
> [<80c213cb>] acm_function_bind_config+0x2b/0x90
>
Reviewed-by: Robert Baldyga
> Signed-off-
Hi Felipe,
I can see that you have applied the documentation fix patch to your
tree. Have also you looked at the remaining patches of this series? What
do you think about this concept? Any comments?
Best regards,
Robert
On 12/11/2015 12:24 PM, Robert Baldyga wrote:
> Hi Felipe,
>
> H
-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_sourcesink.c | 63 --
1 file changed, 51 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/gadget/function/f_sourcesink.c
b/drivers/usb/gadget/function/f_sourcesink.c
index e950031..6193b47 100644
--- a
It seems that gitotious repository is no longer accessible, so we replace
it with address to active repository.
Signed-off-by: Robert Baldyga
---
Documentation/usb/gadget-testing.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/usb/gadget-testing.txt
b
of changes
mentioned above. I can send them as RFC to show what is final result
which I want to achieve.
Best regards,
Robert Baldyga
Changelog:
v3:
- Fixed handling of vendor specific descriptor attached to endpoint
- Added 6 new patches converting Functions to new API
v2: https://lkml.org
plete function bound.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_sourcesink.c | 98 --
drivers/usb/gadget/function/g_zero.h | 3 +
drivers/usb/gadget/legacy/zero.c | 6 ++
3 files changed, 76 insertions(+), 31 deletions(-)
diff --
As usb_gstrings_attach() failure can happen when some USB functions are
are already added to some configurations (in previous loop iterations),
we should always call purge_configs_funcs() to be sure that failure is
be handled properly.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget
, because we now store information about
endpoints, allows us to handle endpoint state inside composite framework,
and in result remove lots of boilerplate code from USB functions.
Signed-off-by: Robert Baldyga
---
include/linux/usb/composite.h | 119 ++
1 file
in function and pass it to set_alt()
callback instead of passing index of interface in configuration which has
to be obtained from interface descriptor. This simplifies altsetting
changes handling in code of USB functions.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 80
After binding all configurations in gadget, call prep_vendor_descs()
for each function which uses new API and implements this callback.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 31 +++
include/linux/usb/composite.h | 2 ++
2 files changed
For now we generate descriptor arrays for each speed as it is done by old
API functions, to allow use mixed new and old API based functions in single
configurations.
This will be removed after complete switch to new API.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 175
descriptors format.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 347 +
include/linux/usb/composite.h | 52 ++
2 files changed, 399 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 8b14c2a
Changes meaning of disable() operation for functions using new API.
Before calling disable() callback composite automatically disables
endpoints of active altsettings of given USB function. This reduces
amount of boilerplate code in USB functions.
Signed-off-by: Robert Baldyga
---
drivers/usb
oints.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 162 +
include/linux/usb/composite.h | 3 +
2 files changed, 165 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 35245fb..324bf81 100644
: Robert Baldyga
---
drivers/usb/gadget/function/f_loopback.c | 58 +---
1 file changed, 23 insertions(+), 35 deletions(-)
diff --git a/drivers/usb/gadget/function/f_loopback.c
b/drivers/usb/gadget/function/f_loopback.c
index ddc3aad..f985107 100644
--- a/drivers/usb
dware, which means that interface numbers and endpoint addresses
are already assigned so that function can use these values to prepare
class or vendor specific descriptors and attach them to function.
Signed-off-by: Robert Baldyga
---
include/linux/usb/composite.h | 8
1 file chang
Introduce function returning endpoint of given index in active altsetting
of specified interface. It's intended to be used in set_alt() callback
to obtain endpoints of currently selected altsetting.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c
Handle functions using new API properly.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/configfs.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 0557f80..153adf7 100644
--- a/drivers/usb
.
Call usb_config_do_bind() in legacy gadget zero, because it uses
usb_add_config_only() instead of usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_sourcesink.c | 314 ++---
drivers/usb/gadget/function
usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_loopback.c | 162 ++-
drivers/usb/gadget/legacy/zero.c | 3 +
2 files changed, 33 insertions(+), 132 deletions(-)
diff --git a/drivers/usb/gadget
some class or vendor specific setup requests.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 19 +++
include/linux/usb/composite.h | 2 ++
2 files changed, 21 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index
em
in composite framework.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 40 +++-
1 file changed, 31 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 261023b..bdd7a2c 100644
--- a/dr
As now we store current altsetting number for each interface, we can
handle USB_REQ_GET_INTERFACE automatically.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers
(). It also takes over the function of
disable() opetarion, so it can be removed after converting all USB
functions to new API.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 12
include/linux/usb/composite.h | 4
2 files changed, 12 insertions(+), 4 deletions
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_serial.c | 122 +++--
1
x27;s allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_rndis.c | 321 --
1 file changed, 112 insertions(+), 209 deletions(-)
diff --git a/drivers/usb/gadget/function/f_rndis.c
b/drivers/usb/gadget/fun
code. Change USB request lifetime management - now
it's allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_ecm.c | 321 +++-
1 file changed, 92 insertions(+), 229 deletions(-)
diff --git a/driver
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_hid.c | 305 ++--
1 file changed, 119 insertions(+), 186 deletions(-)
diff --git a/drivers/usb/gadget/function/f_hid.c
b/drivers/usb/gadget/function/f_hid.c
index 0456a53..8770289 100644
--- a/drivers/usb
So far USB requests allocated in hidg_set_alt() were not freed. Now we
free them in case of hidg_set_alt() failure (when we are not able to
allocate and enqueue all the requests) or in hidg_disable() function.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_hid.c | 22
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/function/f_mass_storage.c | 91
Hi Felipe,
On 12/02/2015 07:55 PM, Felipe Balbi wrote:
> So far, dwc3 has always missed request->zero
> handling for every endpoint. Let's implement
> that so we can handle cases where transfer must
> be finished with a ZLP.
>
> Note that dwc3 is a little special. Even though
> we're dealing with
(). It also takes over the function of
disable() opetarion, so it can be removed after converting all USB
functions to new API.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget/composite.c | 12
include/linux/usb/composite.h | 4
2 files changed, 12 insertions(+), 4 deletions
As usb_gstrings_attach() failure can happen when some USB functions are
are already added to some configurations (in previous loop iterations),
we should always call purge_configs_funcs() to be sure that failure is
be handled properly.
Signed-off-by: Robert Baldyga
---
drivers/usb/gadget
1 - 100 of 921 matches
Mail list logo