commands like nvme_admin_identify.
[1] https://github.com/Open-CAS/open-cas-linux
Best regards,
Robert Baldyga
Michal Rakowski (1):
nvme: add API for sending admin commands by bdev
Robert Baldyga (1):
nvme: add API for getting nsid by bdev
drivers/nvme/host/core.c | 37
From: Michal Rakowski
Add kernel API function for sending nvme admin commands.
Signed-off-by: Michal Rakowski
Signed-off-by: Robert Baldyga
---
drivers/nvme/host/core.c | 23 +++
include/linux/nvme.h | 3 +++
2 files changed, 26 insertions(+)
diff --git a/drivers
Add kernel API function for getting nvme namespace id.
Signed-off-by: Robert Baldyga
---
drivers/nvme/host/core.c | 14 ++
include/linux/nvme.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 06f917f391c4
Introduce additional output parameter in spi_imx_clkdiv_1()
function to return result frequency and set it to spi_bus_clk.
This fixes division by zero bug, which occurred in
spi_imx_calculate_timeout() function.
Signed-off-by: Robert Baldyga <r.bald...@hackerion.com>
---
drivers/spi/spi
Introduce additional output parameter in spi_imx_clkdiv_1()
function to return result frequency and set it to spi_bus_clk.
This fixes division by zero bug, which occurred in
spi_imx_calculate_timeout() function.
Signed-off-by: Robert Baldyga
---
drivers/spi/spi-imx.c | 14 +-
1
The r.bald...@samsung.com email address is no longer valid, so
this commit replaces it with r.bald...@hackerion.com which is
employer-agnostic and thus should be valid for foreseeable future.
Signed-off-by: Robert Baldyga <r.bald...@hackerion.com>
---
MAINTAINERS
The r.bald...@samsung.com email address is no longer valid, so
this commit replaces it with r.bald...@hackerion.com which is
employer-agnostic and thus should be valid for foreseeable future.
Signed-off-by: Robert Baldyga
---
MAINTAINERS| 2 +-
drivers/nfc/s3fwrn5/core.c
Oops, sorry for the duplicate email.
Best regards,
Robert
On 03/17/2016 12:12 PM, Robert Baldyga wrote:
> The r.bald...@samsung.com email address is no longer valid, so
> this commit replaces it with r.bald...@hackerion.com which is
> employer-agnostic and thus should be valid for fo
Oops, sorry for the duplicate email.
Best regards,
Robert
On 03/17/2016 12:12 PM, Robert Baldyga wrote:
> The r.bald...@samsung.com email address is no longer valid, so
> this commit replaces it with r.bald...@hackerion.com which is
> employer-agnostic and thus should be valid for fo
The r.bald...@samsung.com email address is no longer valid, so
this commit replaces it with r.bald...@hackerion.com which is
employer-agnostic and thus should be valid for foreseeable future.
Signed-off-by: Robert Baldyga <r.bald...@hackerion.com>
---
MAINTAINERS
The r.bald...@samsung.com email address is no longer valid, so
this commit replaces it with r.bald...@hackerion.com which is
employer-agnostic and thus should be valid for foreseeable future.
Signed-off-by: Robert Baldyga
---
MAINTAINERS| 2 +-
drivers/nfc/s3fwrn5/core.c
Add Krzysztof Opasiak as maintainer of S3FWRN5 driver.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 19144b8..a40d4a1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9249,6 +9249,
Add Krzysztof Opasiak as maintainer of S3FWRN5 driver.
Signed-off-by: Robert Baldyga
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 19144b8..a40d4a1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9249,6 +9249,7 @@ F:drivers/media/i2c
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 --git
nal 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.c
in
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
-by: 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
(). 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
.
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
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
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
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 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/drivers
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
of 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
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/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
-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
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
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
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-by: Robert Baldyga
---
d
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_ether.c | 28 ++--
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/usb/gadget/function/u_ether.c
b/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| 60
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
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_serial.c
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 | 33
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
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/function
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
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
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
-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
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
, 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 changed, 8
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 | 126 ++
1 file
. 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 attached to endpoint
- Added 6 new patches convert
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 --git a/drivers/usb/dwc2
PTH_n), 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-
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
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
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
PTH_n), 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-
In context of FIFO registers we use ep->fifo_index instead of ep->index.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
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/ga
. 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 attached to endpoint
- Added 6 new patches convert
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-by: Robert Baldy
As we have automatic endpoint state handling it's no longer needed.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/u_ether.c | 28 ++--
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/usb/gadget/fu
Update documentation to reflect changes in UVC configfs interface.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
Documentation/ABI/testing/configfs-usb-gadget-uvc | 39 ---
Documentation/usb/gadget-testing.txt | 18 +++
2 files chang
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 <r.b
-off-by: Robert Baldyga <r.bald...@samsung.com>
---
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
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 <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_serial.c
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 <r.b
.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
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 3
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 <r.bald...@samsung.com>
---
drive
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 <r.b
(). 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 <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 12
include/linux/usb/composite.h | 4
2 files chang
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 <r.b
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
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 <r.bald...@samsung.com>
---
drivers/usb/gadget/fu
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 <r.b
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 <r.b
, 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 <r.bald...@samsung.com>
---
include/linux/usb/composite.h | 8 +
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 <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 31 +++
include/linux/usb/compo
-off-by: Robert Baldyga <r.bald...@samsung.com>
---
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 e
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 <r.bald...@samsung.
, 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 <r.bald...@samsung.com>
---
include/linux/usb/composite.h
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 <r.bald...@samsung.com>
---
drive
function bound.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
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(
nal spinlock protecting deactivation
counter.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
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/dr
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 <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
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 <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
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 <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 13 +
1 file changed, 1 inserti
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 <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.
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 <r.b
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 <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_uvc.c
automatically by composite framwework. Remove boilerplate
code.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_uvc.c | 478
drivers/usb/gadget/function/uvc.h | 3 -
2 files changed, 160 insertions(+), 321 del
As we have automatic endpoint state handling it's no longer needed.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
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/
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 <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_mass_storage.
1 - 100 of 1893 matches
Mail list logo