[PATCH 0/2] nvme: Add kernel API for admin command

2019-09-13 Thread Robert Baldyga
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

[PATCH 1/2] nvme: add API for sending admin commands by bdev

2019-09-13 Thread Robert Baldyga
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

[PATCH 2/2] nvme: add API for getting nsid by bdev

2019-09-13 Thread Robert Baldyga
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

[PATCH] spi: imx: set spi_bus_clk for mx21 and mx27

2016-11-01 Thread Robert Baldyga
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

[PATCH] spi: imx: set spi_bus_clk for mx21 and mx27

2016-11-01 Thread Robert Baldyga
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

[PATCH] drivers: nfc: update Robert Baldyga's email address

2016-03-19 Thread Robert Baldyga
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

[PATCH] drivers: nfc: update Robert Baldyga's email address

2016-03-19 Thread Robert Baldyga
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

Re: [PATCH] drivers: nfc: update Robert Baldyga's email address

2016-03-19 Thread Robert Baldyga
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

Re: [PATCH] drivers: nfc: update Robert Baldyga's email address

2016-03-19 Thread Robert Baldyga
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

[PATCH] drivers: nfc: update Robert Baldyga's email address

2016-03-19 Thread Robert Baldyga
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

[PATCH] drivers: nfc: update Robert Baldyga's email address

2016-03-19 Thread Robert Baldyga
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

[PATCH] MAINTAINERS: nfc: s3fwrn5: Add second maintainer

2016-03-10 Thread Robert Baldyga
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,

[PATCH] MAINTAINERS: nfc: s3fwrn5: Add second maintainer

2016-03-10 Thread Robert Baldyga
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

[PATCH v4 01/43] usb: gadget: f_sourcesink: make ISO altset user-selectable

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 05/43] usb: gadget: composite: fix recursive spinlock locking

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 07/43] usb: gadget: composite: add functions for descriptors handling

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 03/43] usb: gadget: f_loopback: free requests in loopback_disable()

2016-02-03 Thread Robert Baldyga
-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

[PATCH v4 14/43] usb: gadget: composite: introduce clear_alt() operation

2016-02-03 Thread Robert Baldyga
(). 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

[PATCH v4 09/43] usb: gadget: composite: handle function bind

2016-02-03 Thread Robert Baldyga
. 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

[PATCH v4 12/43] usb: gadget: composite: disable eps before calling disable() callback

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 11/43] usb: gadget: composite: generate old descs for compatibility

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 15/43] usb: gadget: composite: handle get_alt() automatically

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 17/43] usb: gadget: composite: add usb_get_interface_id() function

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 19/43] usb: gadget: composite: enable adding USB functions using new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 20/43] usb: gadget: configfs: add new composite API support

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 21/43] usb: gadget: f_loopback: convert to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 23/43] usb: gadget: f_ecm: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 22/43] usb: gadget: f_sourcesink: convert to new API

2016-02-03 Thread Robert Baldyga
. 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

[PATCH v4 26/43] usb: gadget: f_hid: conversion to new API

2016-02-03 Thread Robert Baldyga
-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

[PATCH v4 27/43] usb: gadget: f_acm: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 28/43] usb: gadget: f_eem: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 31/43] usb: gadget: f_serial: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 33/43] usb: gadget: f_phonet: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 35/43] usb: gadget: f_uac1: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 34/43] usb: gadget: f_subset: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 40/43] usb: gadget: uvc: fix typo in UVCG_OPTS_ATTR() macro

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 42/43] Documentation: update uvc configfs interface description

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 37/43] usb: gadget: f_mass_storage: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 39/43] usb: gadget: u_ether: remove usb_ep_enable()/usb_ep_disable()

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 41/43] usb: gadget: uvc: simplify descriptors generation

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 43/43] usb: gadget: f_uvc: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 38/43] usb: gadget: u_serial: remove usb_ep_enable()/usb_ep_disable()

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 16/43] usb: gadget: composite: add usb_function_get_ep() function

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 29/43] usb: gadget: f_ncm: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 24/43] usb: gadget: f_rndis: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 25/43] usb: gadget: f_hid: handle requests lifetime properly

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 36/43] usb: gadget: f_uac2: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 30/43] usb: gadget: f_printer: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 32/43] usb: gadget: f_obex: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 18/43] usb: gadget: composite: usb_get_endpoint_address() function

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 10/43] usb: gadget: composite: handle vendor descs

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 02/43] usb: gadget: f_sourcesink: free requests in sourcesink_disable()

2016-02-03 Thread Robert Baldyga
-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

[PATCH v4 13/43] usb: gadget: composite: enable eps before calling set_alt() callback

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 08/43] usb: gadget: composite: introduce new USB function ops

2016-02-03 Thread Robert Baldyga
, 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

[PATCH v4 04/43] usb: gadget: configfs: fix error path

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 06/43] usb: gadget: composite: introduce new descriptors format

2016-02-03 Thread Robert Baldyga
, 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

[PATCH v4 00/43] usb: gadget: composite: introduce new function API

2016-02-03 Thread Robert Baldyga
. 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

[PATCH v2 5/5] usb: dwc2: gadget: free TX FIFO after killing requests

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 4/5] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable()

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 3/5] usb: dwc2: gadget: change variable name to more meaningful

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 2/5] usb: dwc2: gadget: fix TX FIFO size and address initialization

2016-02-03 Thread Robert Baldyga
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-

[PATCH v2 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 0/5] usb: dwc2: gadget: Fix TX FIFO handling

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 0/5] usb: dwc2: gadget: Fix TX FIFO handling

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 2/5] usb: dwc2: gadget: fix TX FIFO size and address initialization

2016-02-03 Thread Robert Baldyga
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-

[PATCH v2 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 00/43] usb: gadget: composite: introduce new function API

2016-02-03 Thread Robert Baldyga
. 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

[PATCH v4 40/43] usb: gadget: uvc: fix typo in UVCG_OPTS_ATTR() macro

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 39/43] usb: gadget: u_ether: remove usb_ep_enable()/usb_ep_disable()

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 42/43] Documentation: update uvc configfs interface description

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 27/43] usb: gadget: f_acm: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 26/43] usb: gadget: f_hid: conversion to new API

2016-02-03 Thread Robert Baldyga
-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

[PATCH v4 31/43] usb: gadget: f_serial: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 28/43] usb: gadget: f_eem: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 09/43] usb: gadget: composite: handle function bind

2016-02-03 Thread Robert Baldyga
. 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

[PATCH v4 11/43] usb: gadget: composite: generate old descs for compatibility

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 12/43] usb: gadget: composite: disable eps before calling disable() callback

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 14/43] usb: gadget: composite: introduce clear_alt() operation

2016-02-03 Thread Robert Baldyga
(). 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

[PATCH v4 32/43] usb: gadget: f_obex: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 18/43] usb: gadget: composite: usb_get_endpoint_address() function

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 25/43] usb: gadget: f_hid: handle requests lifetime properly

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 36/43] usb: gadget: f_uac2: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 30/43] usb: gadget: f_printer: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 08/43] usb: gadget: composite: introduce new USB function ops

2016-02-03 Thread Robert Baldyga
, 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 +

[PATCH v4 10/43] usb: gadget: composite: handle vendor descs

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 02/43] usb: gadget: f_sourcesink: free requests in sourcesink_disable()

2016-02-03 Thread Robert Baldyga
-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

[PATCH v4 04/43] usb: gadget: configfs: fix error path

2016-02-03 Thread Robert Baldyga
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.

[PATCH v4 06/43] usb: gadget: composite: introduce new descriptors format

2016-02-03 Thread Robert Baldyga
, 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

[PATCH v4 13/43] usb: gadget: composite: enable eps before calling set_alt() callback

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 01/43] usb: gadget: f_sourcesink: make ISO altset user-selectable

2016-02-03 Thread Robert Baldyga
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(

[PATCH v4 05/43] usb: gadget: composite: fix recursive spinlock locking

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 3/5] usb: dwc2: gadget: change variable name to more meaningful

2016-02-03 Thread Robert Baldyga
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

[PATCH v2 5/5] usb: dwc2: gadget: free TX FIFO after killing requests

2016-02-03 Thread Robert Baldyga
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(-)

[PATCH v2 4/5] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable()

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 16/43] usb: gadget: composite: add usb_function_get_ep() function

2016-02-03 Thread Robert Baldyga
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.

[PATCH v4 29/43] usb: gadget: f_ncm: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 41/43] usb: gadget: uvc: simplify descriptors generation

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 43/43] usb: gadget: f_uvc: conversion to new API

2016-02-03 Thread Robert Baldyga
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

[PATCH v4 38/43] usb: gadget: u_serial: remove usb_ep_enable()/usb_ep_disable()

2016-02-03 Thread Robert Baldyga
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/

[PATCH v4 37/43] usb: gadget: f_mass_storage: conversion to new API

2016-02-03 Thread Robert Baldyga
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   2   3   4   5   6   7   8   9   10   >