RE: [PATCH] usb: cdns3: include host-export,h for cdns3_host_init

2019-10-17 Thread Pawel Laszczak
static. For me It doesn't look like driver issue. > >Signed-off-by: Ben Dooks >--- >Cc: Greg Kroah-Hartman >Cc: Pawel Laszczak >Cc: Felipe Balbi >Cc: "Ben Dooks >Cc: linux-usb@vger.kernel.org >--- > drivers/usb/cdns3/host-export.h | 1 - > dri

[PATCH v3 -next] usb: cdns3: Fix sheduling with locks held.

2019-09-26 Thread Pawel Laszczak
: Dan Carpenter Signed-off-by: Pawel Laszczak Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") --- v2: added Reported-by and Fixes tags v3: added version of the patch --- drivers/usb/cdns3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/us

RE: [PATCH -next] usb: cdns3: Fix sheduling with locks held.

2019-09-26 Thread Pawel Laszczak
Hi, > > >On Thu, Sep 26, 2019 at 08:00:30AM +0100, Pawel Laszczak wrote: >> Patch fix issue in cdns3_ep0_feature_handle_device function. >> >> The function usleep_range can't be used there because this function is >> called with locks held and IRQs disabled

[PATCH -next] usb: cdns3: Fix sheduling with locks held.

2019-09-26 Thread Pawel Laszczak
: Dan Carpenter Signed-off-by: Pawel Laszczak Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") --- drivers/usb/cdns3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index 44f652e8b5a2..0445da0a5a

[PATCH -next] usb: cdns3: Fix sheduling with locks held.

2019-09-25 Thread Pawel Laszczak
Patch fix issue in cdns3_ep0_feature_handle_device function. The function usleep_range can't be used there because this function is called with locks held and IRQs disabled in cdns3_device_thread_irq_handler(). To resolve this issue patch replaces usleep_range with mdelay. Signed-off-by:

RE: [bug report] usb: cdns3: Add Cadence USB3 DRD Driver

2019-09-24 Thread Pawel Laszczak
Hi Dan, >Hello Pawel Laszczak, > >The patch 7733f6c32e36: "usb: cdns3: Add Cadence USB3 DRD Driver" >from Aug 26, 2019, leads to the following static checker warning: > > drivers/usb/cdns3/ep0.c:335 cdns3_ep0_feature_handle_device() > error: scheduling w

[PATCH v11 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-26 Thread Pawel Laszczak
ms fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6): dt-bindings: add binding for USBSS-DRD controller. usb:common Separated decoding functions from dwc3 driver. usb:common Patch simplify usb_decode_set_clear_feature func

[PATCH v11 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-08-26 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v11 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-08-26 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 1 + drivers/usb/common/debug.c

[PATCH v11 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-08-26 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/cdns-usb3.txt | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation

[PATCH v11 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-08-26 Thread Pawel Laszczak
ned-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 339 - drivers/usb/cdns3/gadget.h | 13 ++ 2 files changed, 350 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 49ba253d81be..3094ad65ffc9 10

[PATCH v11 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-08-26 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 89 ++ 1 file changed, 43

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-26 Thread Pawel Laszczak
Hi Peter > >On 19-07-21 19:32:18, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripher

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-23 Thread Pawel Laszczak
Hi, >Hi, > >On 22/07/19 12:02 AM, Pawel Laszczak wrote: >> + >> +/** >> + * cdns3_req_ep0_get_status - Handling of GET_STATUS standard USB request >> + * @priv_dev: extended gadget object >> + * @ctrl_req: pointer to received setup packet >> + * >

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-19 Thread Pawel Laszczak
Hi, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripher

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-19 Thread Pawel Laszczak
Hi Roger, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripher

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-14 Thread Pawel Laszczak
Hi Roger, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripher

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
> >On 11/08/2019 14:59, Pawel Laszczak wrote: >> Hi, >> >>> >>> On 21/07/2019 21:32, Pawel Laszczak wrote: >>>> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >>>> >>>> The Cadence USBSS DRD Controller is a

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
> >Hi, > >Pawel Laszczak writes: >>>>>>>Quick question, then: these ISTS registers, are they masked interrupt >>>>>>>status or raw interrupt status? >>>>>> >>>>>> Yes it's masked, but after masking th

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >On 11/08/2019 14:59, Pawel Laszczak wrote: >> Hi, >> >>> >>> On 21/07/2019 21:32, Pawel Laszczak wrote: >>>> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >>>> >>>> The Cadence USBSS DRD Controller

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >>>> I have such situation in which one interrupt line is shared with ehci and >>>> cdns3 driver. >>>> In such case this function returns error code. >>> >>>which function returns error code? >

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-12 Thread Pawel Laszczak
Hi, > >Hi, > >Pawel Laszczak writes: > >> Hi, >> >>> >>>Pawel Laszczak writes: >>>>>> +static int cdns3_gadget_start(struct cdns3 *cdns) >>>>>> +{ >>>>>> +struct cdns3_device *priv_dev;

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-11 Thread Pawel Laszczak
> >> >> Yes, driver frees not used buffers here. >> I think that it's the safest place for this purpose. >> >> > >> + dma_free_coherent(priv_dev->sysdev, buf- >> >size, >> + buf->buf, >> +

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-11 Thread Pawel Laszczak
Hi, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripher

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-10 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >>>> +static int cdns3_gadget_start(struct cdns3 *cdns) >>>> +{ >>>> + struct cdns3_device *priv_dev; >>>> + u32 max_speed; >>>> + int ret; >>>> + >>>> + priv_dev = kza

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-07 Thread Pawel Laszczak
Hi Roger, > > >On 23/07/2019 07:32, Pawel Laszczak wrote: > >> Hi, > >> > >>> On Mon 2019-07-22 13:56:44, Pavel Machek wrote: > >>>> Hi! > >>>> > >>>>>>>> This patch introduce new Cadence USBS

RE: [PATCH v9 2/6] usb:gadget Separated decoding functions from dwc3 driver.

2019-08-07 Thread Pawel Laszczak
Hi, > >Roger Quadros writes: > +extern const char *usb_decode_ctrl(char *str, size_t size, __u8 > bRequestType, > +__u8 bRequest, __u16 wValue, __u16 wIndex, > +__u16 wLength); > + where's the stub when !TRACIN

RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-30 Thread Pawel Laszczak
Hi Felipe, What about this patch. I just noticed that prefix is incorrect "1/3". Can it stay or should I send it again ? Cheers, Pawel >>>Pawel Laszczak writes: >>>>>> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h >>>>>&g

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-22 Thread Pawel Laszczak
Hi, >On Mon 2019-07-22 13:56:44, Pavel Machek wrote: >> Hi! >> >> > > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> > > >> >> > > >> The Cadence USBSS DRD Controller is a highly configurable IP Core >> > > >> which >> > > >> can be instantiated as Dual-Role Device (DRD

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-22 Thread Pawel Laszczak
> >Hi! > >> > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> > >> >> > >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> > >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >> > >> Host Only (XHCI)configurations. >> > > >> >

RE: [PATCH v10 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-07-22 Thread Pawel Laszczak
> > >On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote: >> Patch adds usb_decode_test_mode and usb_decode_device_feature functions, >> which allow to make more readable and simplify the >> usb_decode_set_clear_feature function. > > I need to read entire pat

RE: [PATCH v10 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-07-22 Thread Pawel Laszczak
Hi, > >On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >[] >> diff --git a/drivers/usb/common/debug.c b

RE: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-22 Thread Pawel Laszczak
Hi, > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >> Host Only (XHCI)configurations. > >I see you are using debugfs to sele

[PATCH v10 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-07-21 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/cdns-usb3.txt | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation

[PATCH v10 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-07-21 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 1 + drivers/usb/common/debug.c

[PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-07-21 Thread Pawel Laszczak
ved ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6): dt-bindings: add binding for USBSS-DRD controller. usb:common Separated decoding functions from dwc3 driver. usb:common Patch simplify usb_decode_set_clear_fea

[PATCH v10 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-07-21 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v10 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-07-21 Thread Pawel Laszczak
ned-off-by: Pawel Laszczak --- drivers/usb/cdns3/gadget.c | 338 - drivers/usb/cdns3/gadget.h | 13 ++ 2 files changed, 349 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 291f08be56fe..a42e832b3c6a 10

[PATCH v10 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-07-21 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 89 ++ 1 file changed, 43

RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-21 Thread Pawel Laszczak
Hi, >>Pawel Laszczak writes: >>>>> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h >>>>> index 69f1b6328532..c156817672c4 100644 >>>>> --- a/include/linux/usb/otg.h >>>>> +++ b/include/linux/usb/otg.h >>&

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-07-15 Thread Pawel Laszczak
Hi Felipe > >Hi, > >Pawel Laszczak writes: >> +static void cdns3_gadget_config(struct cdns3_device *priv_dev) >> +{ >> +struct cdns3_usb_regs __iomem *regs = priv_dev->regs; >> +u32 reg; >> + >> +cdns3_ep0_config(priv_dev); >>

RE: [PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-03-06 Thread Pawel Laszczak
Hi, >Hi, > >On 21/02/2019 09:14, Felipe Balbi wrote: >> >> Hi, >> >> (please break your emails at 80-columns) >> >> Pawel Laszczak writes: >>>>> One more thing. Workaround has implemented algorithm that decide for which >>>&g

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-06 Thread Pawel Laszczak
Hi, >Pawel, > >On 14/02/2019 21:45, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi >> can be instantiated as Dual-Role Device (DRD), Perip

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-04 Thread Pawel Laszczak
>From: Pawel Laszczak >Sent: Monday, March 4, 2019 12:02 PM >To: Chunfeng Yun >Cc: devicet...@vger.kernel.org; gre...@linuxfoundation.org; >felipe.ba...@linux.intel.com; mark.rutl...@arm.com; linux- >u...@vger.kernel.org; hdego...@redhat.com; heikki.kroge...@linux.intel.c

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-04 Thread Pawel Laszczak
Hi, > >hi, >On Thu, 2019-02-14 at 19:45 +0000, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi >> can be instantiated as Dual-Role Device (DRD),

RE: [PATCH v4 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-03-04 Thread Pawel Laszczak
Hi, > >On Thu, Feb 14, 2019 at 07:45:13PM +, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to linux kernel. > >Nit, "Linux" :) > >> The Cadence USBSS DRD Driver is a highly configurable IP Core whichi > >"whichi&quo

RE: [PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-02-20 Thread Pawel Laszczak
> >On 20/02/2019 13:18, Pawel Laszczak wrote: >> Hi Roger. >>> >>> On 14/02/2019 21:45, Pawel Laszczak wrote: >>>> Controller for OUT endpoints has shared on-chip buffers for all incoming >>>> packets, including ep0out. It's FIFO buffer,

RE: [PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-02-20 Thread Pawel Laszczak
Hi Roger. > >On 14/02/2019 21:45, Pawel Laszczak wrote: >> Controller for OUT endpoints has shared on-chip buffers for all incoming >> packets, including ep0out. It's FIFO buffer, so packets must be handle >> by DMA in correct order. If the first packet in the buffer

RE: [PATCH v4 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-19 Thread Pawel Laszczak
Hi, >On Thu, Feb 14, 2019 at 07:45:10PM +0000, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >> dwc3_decode_get_status >> dw

[PATCH v4 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-02-14 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns-usb3.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns

[PATCH v4 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-02-14 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 89 ++ 1 file changed, 43

[PATCH v4 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-02-14 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 113 +++-- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH v4 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-02-14 Thread Pawel Laszczak
uld be fixed in function driver. This work around can be disabled/enabled by means of quirk_internal_buffer module parameter. By default feature is enabled. It can has impact to transfer performance and in most case this feature can be disabled. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3

[PATCH v4 0/6] Introduced new Cadence USBSS DRD Driver.

2019-02-14 Thread Pawel Laszczak
eps array - removed cdns3_free_trb_pool and cdns3_ep_addr_to_bit_pos macros. - removed ep0_trb_dma, ep0_trb fields from cdns3_device. - Removed ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6): dt-bind

[PATCH v4 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-14 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 2 +- drivers/usb/common/debug.c

RE: [PATCH v3 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-02-13 Thread Pawel Laszczak
Hi Rob, >On Thu, Jan 31, 2019 at 11:52:28AM +0000, Pawel Laszczak wrote: >> This patch aim at documenting USB related dt-bindings for the >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../devicetree/bindings/usb/cdns-usb3

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-11 Thread Pawel Laszczak
> >Pawel Laszczak writes: >>>>> +/** >>>>> + * usb_decode_ctrl - Returns human readable representation of control >>>>> request. >>>>> + * @str: buffer to return a human-readable representation of control >>>>> r

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-11 Thread Pawel Laszczak
Hi, > >Greg KH writes: >> On Thu, Jan 31, 2019 at 11:52:29AM +, Pawel Laszczak wrote: >>> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >>> to driver/usb/common/debug.c file. These moved functions include:

RE: [PATCH v3 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-02-11 Thread Pawel Laszczak
>On Thu, Jan 31, 2019 at 11:52:31AM +0000, Pawel Laszczak wrote: >> Patch moves switch responsible for decoding descriptor type >> outside snprintf. It's little improves code readability. > >Should that last sentence read: "It improves code readability a little"? > Yes, it should. Thanks Pawel

RE: [PATCH v3 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-02-05 Thread Pawel Laszczak
Hi, >On Thu, Jan 31, 2019 at 11:52:32AM +0000, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role De

RE: [PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-02-05 Thread Pawel Laszczak
H Greg > >On Thu, Jan 31, 2019 at 11:52:29AM +, Pawel Laszczak wrote: >> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver >> to driver/usb/common/debug.c file. These moved functions include: >> dwc3_decode_get_status >>

[PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-01-31 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. mend Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 2 +- drivers/usb/common/de

[PATCH v3 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-01-31 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 83 ++ 1 file changed, 40

[PATCH v3 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-01-31 Thread Pawel Laszczak
uld be fixed in function driver. This work around can be disabled/enabled by means of quirk_internal_buffer module parameter. By default feature is enabled. It can has impact to transfer performance and in most case this feature can be disabled. Signed-off-by: Pawel Laszczak --- drivers/usb/cdns3

[PATCH v3 0/6] Introduced new Cadence USBSS DRD Driver.

2019-01-31 Thread Pawel Laszczak
common eps array - removed cdns3_free_trb_pool and cdns3_ep_addr_to_bit_pos macros. - removed ep0_trb_dma, ep0_trb fields from cdns3_device. - Removed ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (6

[PATCH v3 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-01-31 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns-usb3.txt | 33 +++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns

[PATCH v3 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-01-31 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It's little improves code readability. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 111 +++-- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/dr

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2019-01-09 Thread Pawel Laszczak
Hi, >On Thu, Jan 10, 2019 at 09:30:41AM +0800, Peter Chen wrote: >> On Mon, Dec 24, 2018 at 12:44 AM Pawel Laszczak wrote: >> - debugfs is nice to have feature, I suggest removing it at this >> initial version. Besides, role switch >> through /sys is normal feature,

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-31 Thread Pawel Laszczak
Hi >On Sun, 2018-12-23 at 15:13 +0000, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. > ><...> > >> diff --git a/drivers/usb/cdns3/cdns3-pci-wrap.c >> b/drivers/usb/cdns3/cdns3-pci-wrap.c >> new file

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-31 Thread Pawel Laszczak
degrades to > integer > > drivers/usb/common/debug.c:255:25: warning: restricted __le16 degrades to > integer > > drivers/usb/common/debug.c:256:25: warning: restricted __le16 degrades to > integer > > drivers/usb/common/debug.c:257:25: warning: restricted __le16 d

RE: [PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-30 Thread Pawel Laszczak
Hi Bob, >> >> >On Mon, Dec 10, 2018 at 12:39:14PM +, Pawel Laszczak wrote: >> >> This patch aim at documenting USB related dt-bindings for the >> >> Cadence USBSS-DRD controller. >> >> >> >> Signed-off-by: Pawel Laszczak > >

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-30 Thread Pawel Laszczak
Hi Peter, > >> > >> >@@ -299,6 +306,7 @@ int cdns3_drd_init(struct cdns3 *cdns) >> >cdns->version = CDNS3_CONTROLLER_V0; >> >cdns->otg_v1_regs = NULL; >> >cdns->otg_regs = regs; >> >+ writel(0x1, &cdns->otg_v0_regs->simulate); >> >

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-27 Thread Pawel Laszczak
.o >+obj-$(CONFIG_USB_CDNS3_PCI_WRAP) += cdns3-pci-wrap.o >+obj-$(CONFIG_USB_CDNS3_IMX_WRAP) += cdns3-imx.o > > >> diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c >> new file mode 100644 >> index ..b0c32302eb0b >> --- /dev/nul

RE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-27 Thread Pawel Laszczak
Hi, >> > + >> > + if (ret) >> > + return ret; >> > + >> > + state = readl(&cdns->otg_regs->sts); >> > + if (OTGSTS_OTG_NRDY(state) != 0) { >> > + dev_err(cdns->dev, "Cadence USB3 OTG device not ready\n"); >> > + return -ENODEV; >> > +

[PATCH v2 0/5] Introduced new Cadence USBSS DRD Driver.

2018-12-23 Thread Pawel Laszczak
cdns3_device. - Removed ep0_request and ep_nums fields from cdns3_device. - Other minor changes according with Felipe suggestion. --- Pawel Laszczak (5): dt-bindings: add binding for USBSS-DRD controller. usb:common Separated decoding functions from dwc3 driver. usb:common Patch simplify

[PATCH v2 3/5] usb:common Patch simplify usb_decode_set_clear_feature function.

2018-12-23 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 83 ++ 1 file changed, 40

[PATCH v2 2/5] usb:common Separated decoding functions from dwc3 driver.

2018-12-23 Thread Pawel Laszczak
. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/ch9.h file. mend Signed-off-by: Pawel Laszczak --- drivers/usb/common/Makefile | 2 +- drivers/usb/common/de

[PATCH v2 4/5] usb:common Simplify usb_decode_get_set_descriptor function.

2018-12-23 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It's little improves code readability. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 111 +++-- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/dr

[PATCH v2 1/5] dt-bindings: add binding for USBSS-DRD controller.

2018-12-23 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns3-usb.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns3

RE: [PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-22 Thread Pawel Laszczak
Hi Rob, >On Mon, Dec 10, 2018 at 12:39:14PM +0000, Pawel Laszczak wrote: >> This patch aim at documenting USB related dt-bindings for the >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../devicetree/bindings/usb/cdns3-usb

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Pawel Laszczak
Hi, > +static irqreturn_t cdns3_device_irq_handler(int irq, void *data) +{ + struct cdns3_device *priv_dev; + struct cdns3 *cdns = data; + irqreturn_t ret = IRQ_NONE; + unsigned long flags; + u32 reg; + + priv_dev = cdns->gadget_dev; + spin_

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Pawel Laszczak
Hi Felipe > >Pawel Laszczak writes: > > >>>> + case USB_REQ_SET_ISOCH_DELAY: >>>> + sprintf(str, "Set Isochronous Delay Delay: %d ns", wValue); >>>> + break; >>>> + default: >>>> + spri

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-16 Thread Pawel Laszczak
Hi, > >On 12/12/18 12:22 PM, Felipe Balbi wrote: >> >> Hi >> >> Pawel Laszczak writes: >>>>> + cdns->phy = devm_phy_get(dev, "cdns3,usbphy"); >>>>> + if (IS_ERR(cdns->phy)) { >>>>> + ret = PTR_ERR

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-16 Thread Pawel Laszczak
Hi > >On 14/12/18 4:56 PM, Felipe Balbi wrote: >> Hi, >> >> Sekhar Nori writes: All this should be part of comments in code along with information about controller versions which suffer from the errata. Is there a version of controller available which

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-16 Thread Pawel Laszczak
Hi Peter >On Mon, Dec 10, 2018 at 8:55 PM Pawel Laszczak wrote: >> >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-R

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-13 Thread Pawel Laszczak
Hi, > >On Wed, Dec 12, 2018 at 3:49 AM Pawel Laszczak wrote: >> >> Hi, >> >> >On 10/12/18 7:42 AM, Peter Chen wrote: >> >>>> +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, >> >>>> +

RE: [PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-13 Thread Pawel Laszczak
Hi, >On Tue, Dec 11, 2018 at 6:19 PM Roger Quadros wrote: >> >> Pawel, >> >> On 10/12/18 14:39, Pawel Laszczak wrote: >> > This patch aim at documenting USB related dt-bindings for the >> > Cadence USBSS-DRD controller. >> > >> &g

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 7:42 AM, Peter Chen wrote: +static struct usb_ep *cdns3_gadget_match_ep(struct usb_gadget *gadget, + struct usb_endpoint_descriptor *desc, + struct usb_ss_ep_comp_descriptor

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: >> +static int cdns3_probe(struct platform_device *pdev) >> +{ >> +struct device *dev = &pdev->dev; >> +struct resource *res; >> +struct cdns3 *cdns; >> +void __iomem *regs; >> +int

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-11 Thread Pawel Laszczak
Hi, >On 10/12/18 14:39, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD),

[PATCH v1 0/2] Introduced new Cadence USBSS DRD Driver.

2018-12-10 Thread Pawel Laszczak
have support for PCIe bus, which is used on FPGA prototyping. The host site of USBSS controller is compliance with XHCI specification, so it works with standard XHCI linux driver. --- Pawel Laszczak (2): dt-bindings: add binding for USBSS-DRD controller. usb:cdns3 Add Cadence USB3 DRD Driver

[PATCH v1 1/2] dt-bindings: add binding for USBSS-DRD controller.

2018-12-10 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns3-usb.txt | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns3

RE: [RFC PATCH v2 03/15] dt-bindings: add binding for USBSS-DRD controller.

2018-12-06 Thread Pawel Laszczak
Hi, >On Sun, Nov 18, 2018 at 10:08:59AM +0000, Pawel Laszczak wrote: >> Thsi patch aim at documenting USB related dt-bindings for the > >typo > >> Cadence USBSS-DRD controller. >> >> Signed-off-by: Pawel Laszczak >> --- >> .../

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-06 Thread Pawel Laszczak
Hi, >>> > + >>> > +static inline void cdns3_role_stop(struct cdns3 *cdns) >>> > +{ >>> > + enum cdns3_roles role = cdns->role; >>> > + >>> > + if (role == CDNS3_ROLE_END) >>> >>> WARN_ON(role >= CNDS3_ROLE_END) ? >>> >>> > + return; >>> > + >>> > + mutex_lock(&cdns->mutex);

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-06 Thread Pawel Laszczak
Hi, >On 04/12/18 10:50, Peter Chen wrote: >>>> + * Cadence USBSS DRD Driver. >>>> + * >>>> + * Copyright (C) 2018 Cadence. >>>> + * >>>> + * Author: Peter Chen >>>> + * Pawel Laszczak >>>> + *

RE: [RFC PATCH v2 05/15] usb:cdns3: Added DRD support

2018-12-05 Thread Pawel Laszczak
>> Patch adds supports for detecting Host/Device mode. >> Controller has additional OTG register that allow >> implement even whole OTG functionality. >> At this moment patch adds support only for detecting >> the appropriate mode based on strap pins and ID pin. >&

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-05 Thread Pawel Laszczak
> >> Hi Roger >> >> >On 18/11/18 12:09, Pawel Laszczak wrote: >> >> Patch adds core.c and core.h file that implements initialization >> >> of platform driver and adds function responsible for selecting, >> >> switching and running ap

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-05 Thread Pawel Laszczak
+ Tomek Klimek >> > + >> > +static inline void cdns3_role_stop(struct cdns3 *cdns) >> > +{ >> > + enum cdns3_roles role = cdns->role; >> > + >> > + if (role == CDNS3_ROLE_END) >> >> WARN_ON(role >= CNDS3_ROLE_END) ? >> >> > + return; >> > + >> > + mutex_lock(&cdns->mutex);

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-05 Thread Pawel Laszczak
Hi + Tomek >> > + * Cadence USBSS DRD Driver. >> > + * >> > + * Copyright (C) 2018 Cadence. >> > + * >> > + * Author: Peter Chen >> > + * Pawel Laszczak >> > + */ >> > + >> > +#includ

RE: [RFC PATCH v2 04/15] usb:cdns3: Driver initialization code.

2018-12-04 Thread Pawel Laszczak
Hi, >> >> >> >> Patch adds core.c and core.h file that implements initialization >> >> of platform driver and adds function responsible for selecting, >> >> switching and running appropriate Device/Host mode. >> >> >> >> Si

  1   2   >