Re: [PATCH v2 1/2] PTP: introduce new versions of IOCTLs

2019-08-30 Thread Felipe Balbi
Hi, Richard Cochran writes: >> @@ -139,11 +141,24 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int >> cmd, unsigned long arg) >> break; >> >> case PTP_EXTTS_REQUEST: >> +case PTP_EXTTS_REQUEST2: >> +memset(, 0, sizeof(req)); >> + >> if

[PATCH v2 2/2] PTP: add support for one-shot output

2019-08-29 Thread Felipe Balbi
Some controllers allow for a one-shot output pulse, in contrast to periodic output. Now that we have extensible versions of our IOCTLs, we can finally make use of the 'flags' field to pass a bit telling driver that if we want one-shot pulse output. Signed-off-by: Felipe Balbi --- Changes since

[PATCH v2 1/2] PTP: introduce new versions of IOCTLs

2019-08-29 Thread Felipe Balbi
-off-by: Felipe Balbi --- Changes since v1: - Add a blank line after memset() - Move memset(req) to the three places where it's needed - Fix the accidental removal of GETFUNC and SETFUNC drivers/ptp/ptp_chardev.c | 62 ++ include/uapi

Re: [PATCH 1/2] PTP: introduce new versions of IOCTLs

2019-08-28 Thread Felipe Balbi
Hi, Joe Perches writes: > On Mon, 2019-08-19 at 08:43 -0700, Richard Cochran wrote: >> On Sun, Aug 18, 2019 at 03:07:18PM -0700, Joe Perches wrote: >> > Also the original patch deletes 2 case entries for >> > PTP_PIN_GETFUNC and PTP_PIN_SETFUNC and converts them to >> > PTP_PIN_GETFUNC2 and

Re: [RFC PATCH 1/5] x86: tsc: add tsc to art helpers

2019-08-14 Thread Felipe Balbi
Hi, Thomas Gleixner writes: > Felipe, > > On Tue, 16 Jul 2019, Felipe Balbi wrote: > > -ENOCHANGELOG > > As you said in the cover letter: > >> (3) The change in arch/x86/kernel/tsc.c needs to be reviewed at length >> before going in. > >

[PATCH 1/2] PTP: introduce new versions of IOCTLs

2019-08-14 Thread Felipe Balbi
The current version of the IOCTL have a small problem which prevents us from extending the API by making use of reserved fields. In these new IOCTLs, we are now making sure that flags and rsv fields are zero which will allow us to extend the API in the future. Signed-off-by: Felipe Balbi

[PATCH 2/2] PTP: add support for one-shot output

2019-08-14 Thread Felipe Balbi
Some controllers allow for a one-shot output pulse, in contrast to periodic output. Now that we have extensible versions of our IOCTLs, we can finally make use of the 'flags' field to pass a bit telling driver that if we want one-shot pulse output. Signed-off-by: Felipe Balbi --- drivers/ptp

Re: [RFC PATCH 4/5] PTP: Add flag for non-periodic output

2019-08-14 Thread Felipe Balbi
Hi, Richard Cochran writes: > On Tue, Aug 13, 2019 at 10:48:21AM -0700, Richard Cochran wrote: >> > + if (copy_from_user(, (void __user *)arg, >> > + sizeof(req.extts))) { >> > + err = -EFAULT; >> > + break; >> > +

Re: [RFC PATCH 0/5] PTP: add support for Intel's TGPIO controller

2019-08-13 Thread Felipe Balbi
Hi, Andrew Lunn writes: >> Andrew Lunn writes: >> > On Tue, Jul 16, 2019 at 10:20:33AM +0300, Felipe Balbi wrote: >> >> TGPIO is a new IP which allows for time synchronization between systems >> >> without any other means of synchronization such as PTP

Re: [RFC PATCH 4/5] PTP: Add flag for non-periodic output

2019-08-13 Thread Felipe Balbi
Hi, Richard Cochran writes: > On Thu, Jul 18, 2019 at 11:59:10AM +0300, Felipe Balbi wrote: >> no problem, anything in particular in mind? Just create new versions of >> all the IOCTLs so we can actually use the reserved fields in the future? > > Yes, please! before I se

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

2019-08-12 Thread Felipe Balbi
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 them the new interrupts will not be > reported > In ISTS registers. Form this reason I can mask

Re: [PATCH] usb: dwc3: remove generic PHYs forwarding for XHCI device

2019-08-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > Commit 08f871a3aca2 ("usb: dwc3: host: convey the PHYs to xhci") added > forwarding of the generic PHYs from DWC3 core to the instantiated XHCI-plat > device. However XHCI(-plat) driver never gained support for generic PHYs, > thus the lookup added by that commit

RE: [PATCH V2] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-08-08 Thread Felipe Balbi
Hi, "Yang, Fei" writes: >> I need tracepoints to see what's going on, please collect tracepoints. > > See attached. Search for "length 16384/16384" to the USB request using > sg list. And the transfer stalls at a request with "length 512/512". which gadget driver is this btw? Let's look at

Re: [RFC PATCH 0/5] PTP: add support for Intel's TGPIO controller

2019-07-19 Thread Felipe Balbi
Hi, Andrew Lunn writes: > On Tue, Jul 16, 2019 at 10:20:33AM +0300, Felipe Balbi wrote: >> TGPIO is a new IP which allows for time synchronization between systems >> without any other means of synchronization such as PTP or NTP. The >> driver is implemented as part of th

RE: [PATCH V2] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-07-19 Thread Felipe Balbi
"Yang, Fei" writes: Hi, >> Can only be true for last TRB >> > | if (event->status & DEPEVT_STATUS_IOC) > | return 1; > > This is the problem. The whole USB request gets only one interrupt > when the last TRB completes, so dwc3_gadget_ep_reclaim_trb_sg() gets > called with

Re: [RFC PATCH 4/5] PTP: Add flag for non-periodic output

2019-07-18 Thread Felipe Balbi
Hi, Richard Cochran writes: > On Wed, Jul 17, 2019 at 09:49:13AM +0300, Felipe Balbi wrote: >> No worries, I'll work on this after vacations (I'll off for 2 weeks >> starting next week). I thought about adding a new IOCTL until I saw that >> rsv field. Oh well :-) > &g

Re: [RFC PATCH 0/5] PTP: add support for Intel's TGPIO controller

2019-07-18 Thread Felipe Balbi
Hi, Richard Cochran writes: > On Wed, Jul 17, 2019 at 09:52:55AM +0300, Felipe Balbi wrote: >> >> It's just a pin, like a GPIO. So it would be a PCB trace, flat flex, >> copper wire... Anything, really. > > Cool. Are there any Intel CPUs available that have th

Re: [RFC PATCH 0/5] PTP: add support for Intel's TGPIO controller

2019-07-17 Thread Felipe Balbi
Hi, Richard Cochran writes: > On Tue, Jul 16, 2019 at 10:20:33AM +0300, Felipe Balbi wrote: >> TGPIO is a new IP which allows for time synchronization between systems >> without any other means of synchronization such as PTP or NTP. The >> driver is implemented as part

Re: [RFC PATCH 5/5] PTP: Add support for Intel PMC Timed GPIO Controller

2019-07-17 Thread Felipe Balbi
Hi, Shannon Nelson writes: > On 7/16/19 12:20 AM, Felipe Balbi wrote: >> Add a driver supporting Intel Timed GPIO controller available as part >> of some Intel PMCs. >> >> Signed-off-by: Felipe Balbi > > Hi Felipe, just a couple of quick comments: > >

Re: [RFC PATCH 4/5] PTP: Add flag for non-periodic output

2019-07-17 Thread Felipe Balbi
Hi Richard, Richard Cochran writes: > On Tue, Jul 16, 2019 at 10:20:37AM +0300, Felipe Balbi wrote: >> When this new flag is set, we can use single-shot output. >> >> Signed-off-by: Felipe Balbi >> --- >> include/uapi/linux/ptp_clock.h | 4 +++- >&

[RFC PATCH 3/5] PTP: implement PTP_EVENT_COUNT_TSTAMP ioctl

2019-07-16 Thread Felipe Balbi
With this, we can request the underlying driver to count the number of events that have been captured. Signed-off-by: Felipe Balbi --- drivers/ptp/ptp_chardev.c | 15 +++ include/uapi/linux/ptp_clock.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/drivers/ptp

[RFC PATCH 4/5] PTP: Add flag for non-periodic output

2019-07-16 Thread Felipe Balbi
When this new flag is set, we can use single-shot output. Signed-off-by: Felipe Balbi --- include/uapi/linux/ptp_clock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h index 674db7de64f3..439cbdfc3d9b 100644

[RFC PATCH 0/5] PTP: add support for Intel's TGPIO controller

2019-07-16 Thread Felipe Balbi
()? (2) ACPI IDs can't be shared at this moment, unfortunately. (3) The change in arch/x86/kernel/tsc.c needs to be reviewed at length before going in. Let me know what you guys think, Cheers Felipe Balbi (5): x86: tsc: add tsc to art helpers PTP: add a callback for counting

[RFC PATCH 2/5] PTP: add a callback for counting timestamp events

2019-07-16 Thread Felipe Balbi
This will be used for frequency discipline adjustments. Signed-off-by: Felipe Balbi --- include/linux/ptp_clock_kernel.h | 12 1 file changed, 12 insertions(+) diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index 28eb9c792522..1a4e3f916128 100644

[RFC PATCH 1/5] x86: tsc: add tsc to art helpers

2019-07-16 Thread Felipe Balbi
Signed-off-by: Felipe Balbi --- arch/x86/include/asm/tsc.h | 2 ++ arch/x86/kernel/tsc.c | 32 2 files changed, 34 insertions(+) diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h index 8a0c25c6bf09..b7a9f4385a82 100644 --- a/arch/x86

[RFC PATCH 5/5] PTP: Add support for Intel PMC Timed GPIO Controller

2019-07-16 Thread Felipe Balbi
Add a driver supporting Intel Timed GPIO controller available as part of some Intel PMCs. Signed-off-by: Felipe Balbi --- drivers/ptp/Kconfig | 8 + drivers/ptp/Makefile | 1 + drivers/ptp/ptp-intel-pmc-tgpio.c | 378 ++ 3 files changed

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

2019-07-09 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > IRQF_ONESHOT can be used only in threaded handled. > " > * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler > finished. > *Used by threaded interrupts which need to keep the > *irq line

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

2019-07-09 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>> IRQF_ONESHOT can be used only in threaded handled. >>> " >>> * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler >>> finished. >>> *Used by threaded interrupts which need to keep the >>> *irq line disabled

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

2019-07-09 Thread Felipe Balbi
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 >>> @@ -129,4 +129,20 @@ enum usb_dr_mode { >>> */ >>> extern enum usb_dr_mode

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

2019-07-09 Thread Felipe Balbi
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 > @@ -129,4 +129,20 @@ enum usb_dr_mode { > */ > extern enum usb_dr_mode

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

2019-07-08 Thread Felipe Balbi
(please send it as a formal patch from now on) Hi, Pawel Laszczak writes: > The prototype was added , but not all text was past. Sorry for that. > > Fixed version: with your changes. > > / v2 corrected > commit 4553d48dd0500085d90c8280e28714072279c3dd (HEAD) > Author: Pawel Laszczak >

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

2019-07-08 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > Please look at the changes in drivers/usb/common/common.c file. > I'm going to add it as next patch to next version. > > >>Pawel Laszczak writes: > +void cdns3_role_stop(struct cdns3 *cdns) >> > +static const char *const cdns3_mode[] = { > +

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

2019-07-08 Thread Felipe Balbi
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); > + > + /* enable interrupts for endpoint 0 (in and out) */ > +

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

2019-07-08 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>> +void cdns3_role_stop(struct cdns3 *cdns) >> >>not static? Why is it so that _start() is static but _stop() is not? >>Looks fishy > > This function is used in cdns3_role_stop in debugfs.c file so it can't > be static. it's still super fishy. Why don't you need

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

2019-07-05 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c > new file mode 100644 > index ..ddc73f1c87c5 > --- /dev/null > +++ b/drivers/usb/cdns3/core.c > @@ -0,0 +1,543 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Cadence USBSS DRD

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

2019-07-05 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h > index da82606be605..d388a3a5ab7e 100644 > --- a/include/linux/usb/ch9.h > +++ b/include/linux/usb/ch9.h > @@ -70,4 +70,29 @@ extern enum usb_device_speed usb_get_maximum_speed(struct > device *dev);

Re: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Felipe Balbi
Hi, Greg KH writes: > On Thu, Jul 04, 2019 at 12:44:08PM +0300, Felipe Balbi wrote: >> >> Hi, >> >> Pawel Laszczak writes: >> >> >> >> >> >> >>Hi, >> >> >> >>Pawel Laszczak

RE: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >>> >>> >>>Hi, >>> >>>Pawel Laszczak writes: >>> > >Hi, > >On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrote: >> >> On Thu, Jul 04, 2019 at 04:34:58PM +1000, Stephen Rothwell wrote: >> > Hi all, >> > >> > After merging the usb tree,

RE: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >> >> >>Hi, >> >>Pawel Laszczak writes: >> Hi, On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrote: > > On Thu, Jul 04, 2019 at 04:34:58PM +1000, Stephen Rothwell wrote: > > Hi all, > > > > After merging the usb tree, today's

Re: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Felipe Balbi
Hi, Greg KH writes: > On Thu, Jul 04, 2019 at 11:25:16AM +0300, Felipe Balbi wrote: >> >> Hi, >> >> Pawel Laszczak writes: >> >> >> >> >>Hi, >> >> >> >>On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrot

RE: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Felipe Balbi
Hi, Pawel Laszczak writes: >> >>Hi, >> >>On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrote: >>> >>> On Thu, Jul 04, 2019 at 04:34:58PM +1000, Stephen Rothwell wrote: >>> > Hi all, >>> > >>> > After merging the usb tree, today's linux-next build (arm >>> > multi_v7_defconfig) failed like this: >>>

Re: linux-next: build failure after merge of the usb and usb-gadget trees

2019-07-04 Thread Felipe Balbi
Hi, On Thu, Jul 4, 2019 at 9:59 AM Greg KH wrote: > > On Thu, Jul 04, 2019 at 04:34:58PM +1000, Stephen Rothwell wrote: > > Hi all, > > > > After merging the usb tree, today's linux-next build (arm > > multi_v7_defconfig) failed like this: > > > > arm-linux-gnueabi-ld: drivers/usb/dwc3/trace.o:

Re: [PATCH] usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()

2019-07-03 Thread Felipe Balbi
Hi, Martin Blumenstingl writes: > On Mon, Jul 1, 2019 at 7:54 PM Martin Blumenstingl > wrote: >> >> On Mon, Jun 24, 2019 at 7:41 AM Minas Harutyunyan >> wrote: >> > >> > On 6/20/2019 9:51 PM, Martin Blumenstingl wrote: >> > > Use a 1us AHB idle timeout in dwc2_core_reset() and make it

RE: [PATCH] usb: dwc3: Enable the USB snooping

2019-06-23 Thread Felipe Balbi
Hi, Ran Wang writes: >> >> > >> >> > /* Global Debug Queue/FIFO Space Available Register */ >> >> > >> >> > #define DWC3_GDBGFIFOSPACE_NUM(n) ((n) & 0x1f) >> >> > >> >> > #define DWC3_GDBGFIFOSPACE_TYPE(n) (((n) << 5) & 0x1e0) >> >> > >> >> > @@ -859,6 +867,7 @@ struct

Re: [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct

2019-06-20 Thread Felipe Balbi
Hi, Chunfeng Yun writes: > Hi, > On Thu, 2019-06-20 at 11:19 +0300, Felipe Balbi wrote: >> Hi, >> >> Chunfeng Yun writes: >> >> > The member @lock of dwc2_ep struct is only initialized, >> > and not used elsewhere, so remove it. > Sorry,

Re: [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct

2019-06-20 Thread Felipe Balbi
Hi, Chunfeng Yun writes: > The member @lock of dwc2_ep struct is only initialized, > and not used elsewhere, so remove it. > > Signed-off-by: Chunfeng Yun > --- > drivers/usb/dwc3/core.h | 2 -- > drivers/usb/dwc3/gadget.c | 2 -- > 2 files changed, 4 deletions(-) > > diff --git

RE: [EXTERNAL] Re: Kernel patch in USB 4.4.138 Version

2019-06-18 Thread Felipe Balbi
e- > From: Varadarajan, Kiruthika > Sent: Tuesday, June 18, 2019 2:07 PM > To: 'Greg Kroah-Hartman' > Cc: Felipe Balbi ; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: RE: [EXTERNAL] Re: Kernel patch in USB 4.4.138 Version > > Hi Greg, > I applied t

Re: [RESEND v4 0/4] I2C: DWC3 USB: Add support for ACPI based AArch64 Laptops

2019-06-18 Thread Felipe Balbi
Hi, Lee Jones writes: > On Tue, 18 Jun 2019, Felipe Balbi wrote: >> Lee Jones writes: >> > On Mon, 17 Jun 2019, Felipe Balbi wrote: >> > >> >> Lee Jones writes: >> >> >> >> > This patch-set ensures the kernel is boota

Re: [PATCH] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC

2019-06-18 Thread Felipe Balbi
Hi, Alexandre Belloni writes: > Hi, > > On 18/06/2019 10:33:41+0300, Felipe Balbi wrote: >> Alexandre Belloni writes: >> >> > Gadget drivers may queue request in interrupt context. This would lead to >> > a descriptor allocation in that context

Re: [PATCH] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC

2019-06-18 Thread Felipe Balbi
Alexandre Belloni writes: > Gadget drivers may queue request in interrupt context. This would lead to > a descriptor allocation in that context. In that case we would hit > BUG_ON(in_interrupt()) in __get_vm_area_node. > > Signed-off-by: Alexandre Belloni > --- >

Re: [PATCH] usb: remove redundant 'default n' from Kconfig-s

2019-06-18 Thread Felipe Balbi
e 'default n' is > redundant. > ... > > Signed-off-by: Bartlomiej Zolnierkiewicz Fine by me. Greg if you want to take this directly (since it touches things all over the place): Acked-by: Felipe Balbi If you prefer that I put this in my pull request to you, just let me know. -- balbi signature.asc Description: PGP signature

Re: [RESEND v4 0/4] I2C: DWC3 USB: Add support for ACPI based AArch64 Laptops

2019-06-18 Thread Felipe Balbi
Hi, Lee Jones writes: > On Mon, 17 Jun 2019, Felipe Balbi wrote: > >> Lee Jones writes: >> >> > This patch-set ensures the kernel is bootable on the newly released >> > AArch64 based Laptops using ACPI configuration tables. The Pinctrl >> >

Re: [RESEND v4 0/4] I2C: DWC3 USB: Add support for ACPI based AArch64 Laptops

2019-06-17 Thread Felipe Balbi
Lee Jones writes: > This patch-set ensures the kernel is bootable on the newly released > AArch64 based Laptops using ACPI configuration tables. The Pinctrl > changes have been accepted, leaving only I2C (keyboard, touchpad, > touchscreen, fingerprint, etc, HID device) and USB (root filesystem,

RE: [PATCH] usb: dwc3: Enable the USB snooping

2019-06-17 Thread Felipe Balbi
Hi, Ran Wang writes: > Hi Felipe, > > On Thursday, May 30, 2019 17:09, Ran Wang wrote: >> >> >> > >> >> > /* Global Debug Queue/FIFO Space Available Register */ >> > >> >> > #define DWC3_GDBGFIFOSPACE_NUM(n) ((n) & 0x1f) >> > >> >> > #define DWC3_GDBGFIFOSPACE_TYPE(n)(((n) << 5) &

Re: [PATCH v4 4/6] usb: dwc3: qcom: Add support for booting with ACPI

2019-06-17 Thread Felipe Balbi
Hi, Lee Jones writes: > On Mon, 17 Jun 2019, Felipe Balbi wrote: > >> Hi, >> >> Lee Jones writes: >> >> In Linux, the DWC3 core exists as its own independent platform device. >> >> Thus when describing relationships in Device Tree, the curre

Re: [PATCH v4 4/6] usb: dwc3: qcom: Add support for booting with ACPI

2019-06-17 Thread Felipe Balbi
Hi, Lee Jones writes: >> In Linux, the DWC3 core exists as its own independent platform device. >> Thus when describing relationships in Device Tree, the current default >> boot configuration table option, the DWC3 core often resides as a child >> of the platform specific node. Both of which

RE: [PATCH] usb: dwc3: gadget: Correct the logic for finding last SG entry

2019-06-07 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: >>> The dma_map_sg() merges sg1 & sg2 memory regions into sg1- >>>dma_address. >>> Similarly sg3 & sg4 into sg2->dma_address, sg5 & sg6 into the >>> sg3->dma_address and sg6 & sg8 into sg4->dma_address. Here the >>memory >>> regions are merged but the page_link

Re: [PATCH] usb: dwc3: gadget: Correct the logic for finding last SG entry

2019-06-05 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > As a process of preparing TRBs usb_gadget_map_request_by_dev() is > called from dwc3_prepare_trbs() for mapping the request. This will > call dma_map_sg() if req->num_sgs are greater than 0. dma_map_sg() > will map the sg entries in sglist and return the

Re: [PATCH] USB: move usb debugfs directory creation to the usb common core

2019-06-05 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: >> Greg Kroah-Hartman writes: >> > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c >> > index 7fcb9f782931..f3d6b1ab80cb 100644 >> > --- a/drivers/usb/core/usb.c >> > +++ b/drivers/usb/core/usb.c >> > @@ -1185,19 +1185,17 @@ static struct

Re: [PATCH] USB: move usb debugfs directory creation to the usb common core

2019-06-04 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c > index 7fcb9f782931..f3d6b1ab80cb 100644 > --- a/drivers/usb/core/usb.c > +++ b/drivers/usb/core/usb.c > @@ -1185,19 +1185,17 @@ static struct notifier_block usb_bus_nb = { > .notifier_call =

Re: [PATCH v4] usb: create usb_debug_root for gadget only

2019-06-04 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: >> +struct dentry *usb_debugfs_init(void) >> +{ >> +if (!usb_debug_root) >> +usb_debug_root = debugfs_create_dir("usb", NULL); >> + >> +atomic_inc(_debug_root_refcnt); >> + >> +return usb_debug_root; >> +} >>

Re: [v3 PATCH] usb: create usb_debug_root for gadget only

2019-05-30 Thread Felipe Balbi
Hi, Chunfeng Yun writes: > Hi Felipe, > On Tue, 2019-05-28 at 11:11 +0300, Felipe Balbi wrote: >> Hi, >> >> Chunfeng Yun writes: >> > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c >> > index 7fcb9f782931..88b3ee03a12d 100644 &g

RE: [PATCH] usb: dwc3: Enable the USB snooping

2019-05-29 Thread Felipe Balbi
Hi, Ran Wang writes: >> >> >> c) WHAT does this mean for PCI devices? > > According to DWC3 data book, I think this (PCI) mean to the case of 'master > bus type = Native' > The data book describes this feature as 'system bus DMA option for the master > bus, > which may be configured as AHB,

RE: [PATCH] usb: dwc3: Enable the USB snooping

2019-05-28 Thread Felipe Balbi
Hi, Ran Wang writes: > Hi Felipe, > > Sorry for the late reply: > > On Wednesday, November 15, 2017 18:23, Felipe Balbi wrote: that's 1.5 year ago. I really don't remember the details of this conversation >> Ran Wang writes: >> >> Ran Wang writes: >

Re: [v3 PATCH] usb: create usb_debug_root for gadget only

2019-05-28 Thread Felipe Balbi
Hi, Chunfeng Yun writes: > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c > index 7fcb9f782931..88b3ee03a12d 100644 > --- a/drivers/usb/core/usb.c > +++ b/drivers/usb/core/usb.c > @@ -1190,7 +1190,7 @@ EXPORT_SYMBOL_GPL(usb_debug_root); > > static void usb_debugfs_init(void) >

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

2019-02-20 Thread Felipe Balbi
Hi, (please break your emails at 80-columns) Pawel Laszczak writes: >>> One more thing. Workaround has implemented algorithm that decide for which >>> endpoint it should be enabled. e.g for composite device MSC+NCM+ACM it >>> should work only for ACM OUT endpoint. >>> >> >>If ACM driver

Re: [PATCH] usb: xhci: add Immediate Data Transfer support

2019-02-20 Thread Felipe Balbi
implementation takes into account that the 8 byte buffers provided > by the URB will never cross a 64KB boundary. > > Signed-off-by: Nicolas Saenz Julienne This looks good to my eyes. Reviewed-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

[PATCH v2] scripts: gdb: redefine MS_RDONLY

2019-02-17 Thread Felipe Balbi
This patch includes to constants.py.in so gdb scripts are functional again. While at that, also remove since it's no longer necessary. Fixes: e262e32d6bde "vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled" Signed-off-by: Felipe Balbi --- Changes since v1:

Re: [PATCH] scripts: gdb: redefine MS_RDONLY

2019-02-17 Thread Felipe Balbi
Hi, Kieran Bingham writes: > Hi Felipe, > > Thank you for the patch, > > On 15/02/2019 11:29, Felipe Balbi wrote: >> Since commit e262e32d6bde0f77fb0c95d977482fc872c51996 "vfs: Suppress >> MS_* flag defs within the kernel unless explicitly enabled", the &

[PATCH] scripts: gdb: redefine MS_RDONLY

2019-02-15 Thread Felipe Balbi
This patch includes to constants.py.in so gdb scripts are functional again. Fixes: e262e32d6bde "vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled" Signed-off-by: Felipe Balbi --- scripts/gdb/linux/constants.py.in | 1 + 1 file changed, 1 insertion(+) diff --git

RE: [PATCH] usb: gadget: udc: renesas_usb3: add support for r8a774c0

2019-02-14 Thread Felipe Balbi
Hi, (no top-posting, please) Fabrizio Castro writes: > Hello Felipe, > > Who is the best person for taking patches for renesas_usb3.c? they're already in my 'next' branch. I'll send pull request to Greg shortly -- balbi signature.asc Description: PGP signature

Re: [PATCH 12/18] fotg210-udc: remove a bogus dma_sync_single_for_device call

2019-02-11 Thread Felipe Balbi
Hi, Christoph Hellwig writes: > On Fri, Feb 01, 2019 at 05:10:26PM +0100, Christoph Hellwig wrote: >> On Fri, Feb 01, 2019 at 03:19:41PM +0200, Felipe Balbi wrote: >> > Christoph Hellwig writes: >> > >> > > dma_map_single already transfers ownership

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

2019-02-11 Thread Felipe Balbi
Hi, Pawel Laszczak writes: +/** + * usb_decode_ctrl - Returns human readable representation of control request. + * @str: buffer to return a human-readable representation of control request. + * This buffer should have about 200 bytes. >>> >>> "about 200

Re: [PATCH] usb: dwc3: Enable GBit Ethernet on Odroid XU4

2019-02-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: On 21/01/19 16:02, Jochen Sprickerhof wrote: >>> [..] > I'm not sure why this it only works with the driver compiled into the > kernel nor why it needs a hard reset or why it was the line was dropped > when the patch was accepted. Would be great to

Re: [PATCH] xhci: Use ffs() to find page size in xhci_mem_init()

2019-02-07 Thread Felipe Balbi
Hi, Mathias Nyman writes: Get page size order using ffs() instead of open coding it with a loop. Signed-off-by: Andrey Smirnov Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org ---

Re: [PATCH] xhci: Use ffs() to find page size in xhci_mem_init()

2019-02-07 Thread Felipe Balbi
Hi, Mathias Nyman writes: > On 07.02.2019 02:03, Andrey Smirnov wrote: >> Get page size order using ffs() instead of open coding it with a loop. >> >> Signed-off-by: Andrey Smirnov >> Cc: Mathias Nyman >> Cc: Greg Kroah-Hartman >> Cc: linux-...@vger.kernel.org >> Cc:

Re: [PATCH] xhci: Convert xhci_handshake() to use readl_poll_timeout()

2019-02-07 Thread Felipe Balbi
Hi, Mathias Nyman writes: > On 07.02.2019 02:03, Andrey Smirnov wrote: >> Xhci_handshake() implements the algorithm already captured by >> readl_poll_timeout(). Convert the former to use the latter to avoid >> repetition. > > readl_poll_timeout() doesn't really work here as it might sleep. > >

Re: [RFC v2] usb: xhci: add Immediate Data Transfer support

2019-02-06 Thread Felipe Balbi
Hi, Nicolas Saenz Julienne writes: >> > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c >> > index 005e65922608..dec62f7f5dc8 100644 >> > --- a/drivers/usb/host/xhci.c >> > +++ b/drivers/usb/host/xhci.c >> > @@ -1238,6 +1238,21 @@ EXPORT_SYMBOL_GPL(xhci_resume); >> > >> > >>

Re: [PATCH] usb: gadget: function: f_uac1 add interface assoc desc

2019-02-05 Thread Felipe Balbi
liangshengjun writes: > Add f_uac1 interface association descriptor, make f_uac1 link other > function(like f_uvc) is possible. > > Signed-off-by: Liang Shengjun doesn't apply. Also, remember to break commit log lines at 72 columns -- balbi signature.asc Description: PGP signature

Re: [PATCH] usb: dwc3: Enable GBit Ethernet on Odroid XU4

2019-02-05 Thread Felipe Balbi
hi, Jochen Sprickerhof writes: > Note that it only works with USB_XHCI_PLATFORM=y. Also it needs a hard > reset when coming from an unpatched kernel. > > This was included in the original patch in > https://patchwork.kernel.org/patch/9992809/ but got dropped when > accepted in d8c80bb3b55b phy:

Re: [RFC v2] usb: xhci: add Immediate Data Transfer support

2019-02-05 Thread Felipe Balbi
Hi, Nicolas Saenz Julienne writes: > diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c > index 40fa25c4d041..a4efbe62a1a3 100644 > --- a/drivers/usb/host/xhci-ring.c > +++ b/drivers/usb/host/xhci-ring.c > @@ -3272,8 +3272,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd

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

2019-02-05 Thread Felipe Balbi
Hi, Pawel Laszczak 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: >>> dwc3_decode_get_status >>>

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

2019-02-04 Thread Felipe Balbi
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: >> dwc3_decode_get_status >>

Re: [RFC] usb: xhci: add Immediate Data Transfers support

2019-02-01 Thread Felipe Balbi
Hi, Nicolas Saenz Julienne writes: > Immediate data transfers (IDT) allow the HCD to copy small chunks of > data (up to 8bits) directly into its output transfer TRBs. This avoids ^ 8 bytes > the somewhat expensive DMA mappings that are performed by default on >

Re: [PATCH 12/18] fotg210-udc: remove a bogus dma_sync_single_for_device call

2019-02-01 Thread Felipe Balbi
Christoph Hellwig writes: > dma_map_single already transfers ownership to the device. > > Signed-off-by: Christoph Hellwig Do you want me to take the USB bits or will you take the entire series? In case you're taking the entire series: Acked-by: Felipe Balbi > --- > drivers

Re: [PATCH 13/18] fotg210-udc: pass struct device to DMA API functions

2019-02-01 Thread Felipe Balbi
e you're taking the entire series: Acked-by: Felipe Balbi -- balbi signature.asc Description: PGP signature

RE: [PATCH] usb: dwc3: gadget: don't remove the request if bus-expired

2019-01-21 Thread Felipe Balbi
Hi, "Zengtao (B)" writes: >>-Original Message- >>From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] >>Sent: Monday, January 14, 2019 4:13 PM >>To: Zengtao (B) >>Cc: Zengtao (B) ; Greg Kroah-Hartman >>; linux-...@vger.kernel.org

RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint

2019-01-21 Thread Felipe Balbi
Hi, "Zengtao (B)" writes: >>-Original Message- >>From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] >>Sent: Monday, January 21, 2019 4:17 PM >>To: Zengtao (B) >>Cc: Zengtao (B) ; Greg Kroah-Hartman >>; linux-...@vger.kernel.org

Re: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint

2019-01-21 Thread Felipe Balbi
Hi, Zeng Tao writes: > For ISOC transfers, if there is no available data for a period, we need > to stop the transfer by issue a stop command, otherwise, all the > upcoming transfers will started by update transfer command, and will be > dropped with MISS ISOC errors. We, actually, have code

Re: [PATCH 2/2] usb: dwc3: Add workaround for host mode VBUS glitch when boot

2019-01-16 Thread Felipe Balbi
Hi, Ran Wang writes: > +static void dwc3_power_off_all_roothub_ports(struct dwc3 *dwc) > +{ > + int i, port_num; > + u32 reg, op_regs_base, offset; > + void __iomem*xhci_regs; > + > + /* xhci regs is not mapped yet, do it temperary here */ > + if

Re: [PATCH] usb: dwc3: gadget: don't remove the request if bus-expired

2019-01-14 Thread Felipe Balbi
Hi, Zeng Tao writes: > We have already returned EAGAIN for bus-expiry, and it's designed to > start with a future Frame number and start the transfer again. So we > should not remove the request for that case. > > Signed-off-by: Zeng Tao Do we need a Fixes tag here? How about Cc stable? Can

Re: [PATCH] usb: dwc3: gadget: Fail request submission if it was already queued

2019-01-11 Thread Felipe Balbi
Hi, Manu Gautam writes: >> Manu Gautam writes: >>> If a function driver tries to re-submit an already queued request, >>> it can results in corruption of pending/started request lists. >>> Catch such conditions and fail the request submission to DCD. >>> >>> Signed-off-by: Manu Gautam >>> ---

Re: [PATCH] usb: dwc3: gadget: Fail request submission if it was already queued

2019-01-10 Thread Felipe Balbi
Hi, Manu Gautam writes: > If a function driver tries to re-submit an already queued request, > it can results in corruption of pending/started request lists. > Catch such conditions and fail the request submission to DCD. > > Signed-off-by: Manu Gautam > --- > drivers/usb/dwc3/gadget.c | 6

Re: [PATCH] usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup

2019-01-10 Thread Felipe Balbi
Hi, Jack Pham writes: > OUT endpoint requests may somtimes have this flag set when > preparing to be submitted to HW indicating that there is an > additional TRB chained to the request for alignment purposes. > If that request is removed before the controller can execute the > transfer (e.g.

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-19 Thread Felipe Balbi
Hi, Rob Herring writes: >> +Example: >> +    usb3: hisi_dwc3 { >> +    compatible = "hisilicon,hi3660-dwc3"; >> +    #address-cells = <2>; >> +    #size-cells = <2>; >> +    ranges; >> + >> +    clocks = <_ctrl HI3660_CLK_ABB_USB>, >>

Re: [PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd

2018-12-17 Thread Felipe Balbi
Nicolas Saenz Julienne writes: > As commented in the struct's definition there shouldn't be anything > underneath it's 'priv[0]' member as it would break some macros. its? I guess Mathias can fix when applying. -- balbi signature.asc Description: PGP signature

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

2018-12-17 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > +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 =

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

2018-12-17 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > + case USB_REQ_SET_ISOCH_DELAY: > + sprintf(str, "Set Isochronous Delay Delay: %d ns", wValue); > + break; > + default: > + sprintf(str, > + "SETUP BRT: %02x BR: %02x V: %04x I: %04x L: %04x\n", > +

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

2018-12-14 Thread Felipe Balbi
Hi, Sekhar Nori writes: > especially since you already know there is going to be another revision > of hardware. It has the advantage that one can easily grep to see which > hardware is running current version of controller without having access > to the hardware itself. Becomes

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

2018-12-14 Thread Felipe Balbi
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 does not have the >> defect? Is there a future plan to fix this?

<    1   2   3   4   5   6   7   8   9   10   >