All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series
@ 2014-08-19  8:54 Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 01/12] usb: dwc2/gadget: fix phy disable sequence Robert Baldyga
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

Hi Paul,

I'm resending this patchset rebased on linux-next. Now it should apply.

Thanks,
Robert Baldyga

Changelog:
v3: https://lkml.org/lkml/2014/8/4/617
- use endpoint index instead of FIFO index for EPFIFO
- extend patch description

v2: https://lkml.org/lkml/2014/7/16/199
- add patch usb: dwc2/gadget: avoid disabling ep0
- fix FIFO flushing when it's assigned to endpoint dynamically
- write to proper FIFO in s3c_hsotg_write_fifo() function
- use real FIFO size in kill_all_requests
- fix comment in s3c_hsotg_init_fifo() function

v1: https://lkml.org/lkml/2014/6/23/67

Andrzej Pietrasiewicz (1):
  usb: dwc2/gadget: Fix comment text

Kamil Debski (3):
  usb: dwc2/gadget: fix phy disable sequence
  usb: dwc2/gadget: fix phy initialization sequence
  usb: dwc2/gadget: move phy bus legth initialization

Marek Szyprowski (5):
  usb: dwc2/gadget: hide some not really needed debug messages
  usb: dwc2/gadget: ensure that all fifos have correct memory buffers
  usb: dwc2/gadget: break infinite loop in endpoint disable code
  usb: dwc2/gadget: do not call disconnect method in pullup
  usb: dwc2/gadget: delay enabling irq once hardware is configured
    properly

Robert Baldyga (3):
  usb: dwc2/gadget: assign TX FIFO dynamically
  usb: dwc2/gadget: disable clock when it's not needed
  usb: dwc2/gadget: avoid disabling ep0

 drivers/usb/dwc2/core.h   |   3 +
 drivers/usb/dwc2/gadget.c | 184 +++++++++++++++++++++++++++-------------------
 2 files changed, 111 insertions(+), 76 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 01/12] usb: dwc2/gadget: fix phy disable sequence
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 02/12] usb: dwc2/gadget: fix phy initialization sequence Robert Baldyga
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Kamil Debski, Robert Baldyga

From: Kamil Debski <k.debski@samsung.com>

When the driver is removed s3c_hsotg_phy_disable is called three times
instead of once. This results in decreasing of the phy reference counter
below zero and thus consecutive inserts of the module fails.

This patch removes calls to s3c_hsotg_phy_disable from s3c_hsotg_remove
and s3c_hsotg_udc_stop.

s3c_hsotg_udc_stop is called from udc-core.c only after
usb_gadget_disconnect, which in turn calls s3c_hsotg_pullup, which
already calls s3c_hsotg_phy_disable.

s3c_hsotg_remove must be called only after udc_stop, so there is no
point in disabling phy once again there.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 0ba9c33..d27417e 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2897,8 +2897,6 @@ static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,
 
 	spin_lock_irqsave(&hsotg->lock, flags);
 
-	s3c_hsotg_phy_disable(hsotg);
-
 	if (!driver)
 		hsotg->driver = NULL;
 
@@ -3582,7 +3580,6 @@ static int s3c_hsotg_remove(struct platform_device *pdev)
 		usb_gadget_unregister_driver(hsotg->driver);
 	}
 
-	s3c_hsotg_phy_disable(hsotg);
 	if (hsotg->phy)
 		phy_exit(hsotg->phy);
 	clk_disable_unprepare(hsotg->clk);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 02/12] usb: dwc2/gadget: fix phy initialization sequence
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 01/12] usb: dwc2/gadget: fix phy disable sequence Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 03/12] usb: dwc2/gadget: move phy bus legth initialization Robert Baldyga
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Kamil Debski, Robert Baldyga

From: Kamil Debski <k.debski@samsung.com>

In the Generic PHY Framework a NULL phy is considered to be a valid phy
thus the "if (hsotg->phy)" check does not give us the information whether
the Generic PHY Framework is used.

In addition to the above this patch also removes phy_init from probe and
phy_exit from remove. This is not necessary when init/exit is done in the
s3c_hsotg_phy_enable/disable functions.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index d27417e..f0135a5 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2747,13 +2747,14 @@ static void s3c_hsotg_phy_enable(struct s3c_hsotg *hsotg)
 
 	dev_dbg(hsotg->dev, "pdev 0x%p\n", pdev);
 
-	if (hsotg->phy) {
-		phy_init(hsotg->phy);
-		phy_power_on(hsotg->phy);
-	} else if (hsotg->uphy)
+	if (hsotg->uphy)
 		usb_phy_init(hsotg->uphy);
-	else if (hsotg->plat->phy_init)
+	else if (hsotg->plat && hsotg->plat->phy_init)
 		hsotg->plat->phy_init(pdev, hsotg->plat->phy_type);
+	else {
+		phy_init(hsotg->phy);
+		phy_power_on(hsotg->phy);
+	}
 }
 
 /**
@@ -2767,13 +2768,14 @@ static void s3c_hsotg_phy_disable(struct s3c_hsotg *hsotg)
 {
 	struct platform_device *pdev = to_platform_device(hsotg->dev);
 
-	if (hsotg->phy) {
-		phy_power_off(hsotg->phy);
-		phy_exit(hsotg->phy);
-	} else if (hsotg->uphy)
+	if (hsotg->uphy)
 		usb_phy_shutdown(hsotg->uphy);
-	else if (hsotg->plat->phy_exit)
+	else if (hsotg->plat && hsotg->plat->phy_exit)
 		hsotg->plat->phy_exit(pdev, hsotg->plat->phy_type);
+	else {
+		phy_power_off(hsotg->phy);
+		phy_exit(hsotg->phy);
+	}
 }
 
 /**
@@ -3486,9 +3488,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
 	if (hsotg->phy && (phy_get_bus_width(phy) == 8))
 		hsotg->phyif = GUSBCFG_PHYIF8;
 
-	if (hsotg->phy)
-		phy_init(hsotg->phy);
-
 	/* usb phy enable */
 	s3c_hsotg_phy_enable(hsotg);
 
@@ -3580,8 +3579,6 @@ static int s3c_hsotg_remove(struct platform_device *pdev)
 		usb_gadget_unregister_driver(hsotg->driver);
 	}
 
-	if (hsotg->phy)
-		phy_exit(hsotg->phy);
 	clk_disable_unprepare(hsotg->clk);
 
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 03/12] usb: dwc2/gadget: move phy bus legth initialization
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 01/12] usb: dwc2/gadget: fix phy disable sequence Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 02/12] usb: dwc2/gadget: fix phy initialization sequence Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 04/12] usb: dwc2/gadget: Fix comment text Robert Baldyga
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Kamil Debski, Robert Baldyga

From: Kamil Debski <k.debski@samsung.com>

This patch moves the part of code that initializes the PHY bus width.
This results in simpler code and removes the need to check whether
the Generic PHY Framework is used.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index f0135a5..2d09ed1 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3392,6 +3392,9 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
 	if (!hsotg)
 		return -ENOMEM;
 
+	/* Set default UTMI width */
+	hsotg->phyif = GUSBCFG_PHYIF16;
+
 	/*
 	 * Attempt to find a generic PHY, then look for an old style
 	 * USB PHY, finally fall back to pdata
@@ -3410,8 +3413,15 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
 			hsotg->plat = plat;
 		} else
 			hsotg->uphy = uphy;
-	} else
+	} else {
 		hsotg->phy = phy;
+		/*
+		 * If using the generic PHY framework, check if the PHY bus
+		 * width is 8-bit and set the phyif appropriately.
+		 */
+		if (phy_get_bus_width(phy) == 8)
+			hsotg->phyif = GUSBCFG_PHYIF8;
+	}
 
 	hsotg->dev = dev;
 
@@ -3478,16 +3488,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
 		goto err_supplies;
 	}
 
-	/* Set default UTMI width */
-	hsotg->phyif = GUSBCFG_PHYIF16;
-
-	/*
-	 * If using the generic PHY framework, check if the PHY bus
-	 * width is 8-bit and set the phyif appropriately.
-	 */
-	if (hsotg->phy && (phy_get_bus_width(phy) == 8))
-		hsotg->phyif = GUSBCFG_PHYIF8;
-
 	/* usb phy enable */
 	s3c_hsotg_phy_enable(hsotg);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 04/12] usb: dwc2/gadget: Fix comment text
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (2 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 03/12] usb: dwc2/gadget: move phy bus legth initialization Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 05/12] usb: dwc2/gadget: hide some not really needed debug messages Robert Baldyga
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>

Adjust the debug text to the name of the printed variable.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 2d09ed1..8131ccd 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2934,7 +2934,7 @@ static int s3c_hsotg_pullup(struct usb_gadget *gadget, int is_on)
 	struct s3c_hsotg *hsotg = to_hsotg(gadget);
 	unsigned long flags = 0;
 
-	dev_dbg(hsotg->dev, "%s: is_in: %d\n", __func__, is_on);
+	dev_dbg(hsotg->dev, "%s: is_on: %d\n", __func__, is_on);
 
 	spin_lock_irqsave(&hsotg->lock, flags);
 	if (is_on) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 05/12] usb: dwc2/gadget: hide some not really needed debug messages
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (3 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 04/12] usb: dwc2/gadget: Fix comment text Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 06/12] usb: dwc2/gadget: ensure that all fifos have correct memory buffers Robert Baldyga
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

From: Marek Szyprowski <m.szyprowski@samsung.com>

Some DWC2/s3c-hsotg debug messages are really useless for typical user,
so hide them behind dev_dbg().

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 8131ccd..6d20ae9 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2567,7 +2567,7 @@ static int s3c_hsotg_ep_disable(struct usb_ep *ep)
 	u32 epctrl_reg;
 	u32 ctrl;
 
-	dev_info(hsotg->dev, "%s(ep %p)\n", __func__, ep);
+	dev_dbg(hsotg->dev, "%s(ep %p)\n", __func__, ep);
 
 	if (ep == &hsotg->eps[0].ep) {
 		dev_err(hsotg->dev, "%s: called for ep0\n", __func__);
@@ -2625,7 +2625,7 @@ static int s3c_hsotg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
 	struct s3c_hsotg *hs = hs_ep->parent;
 	unsigned long flags;
 
-	dev_info(hs->dev, "ep_dequeue(%p,%p)\n", ep, req);
+	dev_dbg(hs->dev, "ep_dequeue(%p,%p)\n", ep, req);
 
 	spin_lock_irqsave(&hs->lock, flags);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 06/12] usb: dwc2/gadget: ensure that all fifos have correct memory buffers
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (4 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 05/12] usb: dwc2/gadget: hide some not really needed debug messages Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 07/12] usb: dwc2/gadget: break infinite loop in endpoint disable code Robert Baldyga
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

From: Marek Szyprowski <m.szyprowski@samsung.com>

Print warning if FIFOs are configured in such a way that they don't fit
into the SPRAM available on the s3c hsotg module.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/core.h   |  1 +
 drivers/usb/dwc2/gadget.c | 15 ++++++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 1efd10c..067390e 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -194,6 +194,7 @@ struct s3c_hsotg {
 	struct regulator_bulk_data supplies[ARRAY_SIZE(s3c_hsotg_supply_names)];
 
 	u32                     phyif;
+	int			fifo_mem;
 	unsigned int            dedicated_fifos:1;
 	unsigned char           num_of_eps;
 
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 6d20ae9..3faa4f3 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -192,6 +192,8 @@ static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg)
 	for (ep = 1; ep <= 15; ep++) {
 		val = addr;
 		val |= size << FIFOSIZE_DEPTH_SHIFT;
+		WARN_ONCE(addr + size > hsotg->fifo_mem,
+			  "insufficient fifo memory");
 		addr += size;
 
 		writel(val, hsotg->regs + DPTXFSIZN(ep));
@@ -3029,19 +3031,22 @@ static void s3c_hsotg_initep(struct s3c_hsotg *hsotg,
  */
 static void s3c_hsotg_hw_cfg(struct s3c_hsotg *hsotg)
 {
-	u32 cfg2, cfg4;
+	u32 cfg2, cfg3, cfg4;
 	/* check hardware configuration */
 
 	cfg2 = readl(hsotg->regs + 0x48);
 	hsotg->num_of_eps = (cfg2 >> 10) & 0xF;
 
-	dev_info(hsotg->dev, "EPs:%d\n", hsotg->num_of_eps);
+	cfg3 = readl(hsotg->regs + 0x4C);
+	hsotg->fifo_mem = (cfg3 >> 16);
 
 	cfg4 = readl(hsotg->regs + 0x50);
 	hsotg->dedicated_fifos = (cfg4 >> 25) & 1;
 
-	dev_info(hsotg->dev, "%s fifos\n",
-		 hsotg->dedicated_fifos ? "dedicated" : "shared");
+	dev_info(hsotg->dev, "EPs: %d, %s fifos, %d entries in SPRAM\n",
+		 hsotg->num_of_eps,
+		 hsotg->dedicated_fifos ? "dedicated" : "shared",
+		 hsotg->fifo_mem);
 }
 
 /**
@@ -3492,8 +3497,8 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
 	s3c_hsotg_phy_enable(hsotg);
 
 	s3c_hsotg_corereset(hsotg);
-	s3c_hsotg_init(hsotg);
 	s3c_hsotg_hw_cfg(hsotg);
+	s3c_hsotg_init(hsotg);
 
 	/* hsotg->num_of_eps holds number of EPs other than ep0 */
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 07/12] usb: dwc2/gadget: break infinite loop in endpoint disable code
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (5 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 06/12] usb: dwc2/gadget: ensure that all fifos have correct memory buffers Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 08/12] usb: dwc2/gadget: do not call disconnect method in pullup Robert Baldyga
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

From: Marek Szyprowski <m.szyprowski@samsung.com>

This patch fixes possible freeze caused by infinite loop in interrupt
context.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 3faa4f3..c829c05 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1651,6 +1651,7 @@ static void s3c_hsotg_txfifo_flush(struct s3c_hsotg *hsotg, unsigned int idx)
 			dev_err(hsotg->dev,
 				"%s: timeout flushing fifo (GRSTCTL=%08x)\n",
 				__func__, val);
+			break;
 		}
 
 		udelay(1);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 08/12] usb: dwc2/gadget: do not call disconnect method in pullup
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (6 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 07/12] usb: dwc2/gadget: break infinite loop in endpoint disable code Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 09/12] usb: dwc2/gadget: delay enabling irq once hardware is configured properly Robert Baldyga
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

From: Marek Szyprowski <m.szyprowski@samsung.com>

This leads to potential spinlock recursion in composite framework, other
udc drivers also don't call it directly from pullup method.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index c829c05..1d5e387 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2944,7 +2944,6 @@ static int s3c_hsotg_pullup(struct usb_gadget *gadget, int is_on)
 		s3c_hsotg_phy_enable(hsotg);
 		s3c_hsotg_core_init(hsotg);
 	} else {
-		s3c_hsotg_disconnect(hsotg);
 		s3c_hsotg_phy_disable(hsotg);
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 09/12] usb: dwc2/gadget: delay enabling irq once hardware is configured properly
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (7 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 08/12] usb: dwc2/gadget: do not call disconnect method in pullup Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 10/12] usb: dwc2/gadget: assign TX FIFO dynamically Robert Baldyga
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

From: Marek Szyprowski <m.szyprowski@samsung.com>

This patch fixes kernel panic/interrupt storm/etc issues if bootloader
left s3c-hsotg module in enabled state. Now interrupt handler is enabled
only after proper configuration of hardware registers.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 1d5e387..619fbff 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3456,13 +3456,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
 
 	hsotg->irq = ret;
 
-	ret = devm_request_irq(&pdev->dev, hsotg->irq, s3c_hsotg_irq, 0,
-				dev_name(dev), hsotg);
-	if (ret < 0) {
-		dev_err(dev, "cannot claim IRQ\n");
-		goto err_clk;
-	}
-
 	dev_info(dev, "regs %p, irq %d\n", hsotg->regs, hsotg->irq);
 
 	hsotg->gadget.max_speed = USB_SPEED_HIGH;
@@ -3500,6 +3493,17 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
 	s3c_hsotg_hw_cfg(hsotg);
 	s3c_hsotg_init(hsotg);
 
+	ret = devm_request_irq(&pdev->dev, hsotg->irq, s3c_hsotg_irq, 0,
+				dev_name(dev), hsotg);
+	if (ret < 0) {
+		s3c_hsotg_phy_disable(hsotg);
+		clk_disable_unprepare(hsotg->clk);
+		regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),
+				       hsotg->supplies);
+		dev_err(dev, "cannot claim IRQ\n");
+		goto err_clk;
+	}
+
 	/* hsotg->num_of_eps holds number of EPs other than ep0 */
 
 	if (hsotg->num_of_eps == 0) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 10/12] usb: dwc2/gadget: assign TX FIFO dynamically
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (8 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 09/12] usb: dwc2/gadget: delay enabling irq once hardware is configured properly Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 11/12] usb: dwc2/gadget: disable clock when it's not needed Robert Baldyga
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

Because we have not enough memory to have each TX FIFO of size at least
3072 bytes (the maximum single packet size with 3 transactions per
microframe), we create four FIFOs of lenght 1024, and four of length
3072 bytes, and assing them to endpoints dynamically according to
maxpacket size value of given endpoint.

Up to now there were initialized 16 TX FIFOs, but we use only 8 IN
endpoints, so we can split available memory for 8 FIFOs to have more
memory for each one.

It needed to do some small modifications in few places in code, because
there was assumption that TX FIFO numbers assigned to endpoints are the
same as the endpoint numbers, which is not true since we have dynamic
FIFO assigning.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/core.h   |  2 ++
 drivers/usb/dwc2/gadget.c | 80 +++++++++++++++++++++++++++++------------------
 2 files changed, 52 insertions(+), 30 deletions(-)

diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 067390e..3b4bd4c 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -139,6 +139,7 @@ struct s3c_hsotg_ep {
 	unsigned int            last_load;
 	unsigned int            fifo_load;
 	unsigned short          fifo_size;
+	unsigned short		fifo_index;
 
 	unsigned char           dir_in;
 	unsigned char           index;
@@ -197,6 +198,7 @@ struct s3c_hsotg {
 	int			fifo_mem;
 	unsigned int            dedicated_fifos:1;
 	unsigned char           num_of_eps;
+	u32			fifo_map;
 
 	struct dentry           *debug_root;
 	struct dentry           *debug_file;
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 619fbff..b914365 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -182,14 +182,29 @@ static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg)
 
 	/* start at the end of the GNPTXFSIZ, rounded up */
 	addr = 2048 + 1024;
-	size = 768;
 
 	/*
-	 * currently we allocate TX FIFOs for all possible endpoints,
-	 * and assume that they are all the same size.
+	 * Because we have not enough memory to have each TX FIFO of size at
+	 * least 3072 bytes (the maximum single packet size), we create four
+	 * FIFOs of lenght 1024, and four of length 3072 bytes, and assing
+	 * them to endpoints dynamically according to maxpacket size value of
+	 * given endpoint.
 	 */
 
-	for (ep = 1; ep <= 15; ep++) {
+	/* 256*4=1024 bytes FIFO length */
+	size = 256;
+	for (ep = 1; ep <= 4; ep++) {
+		val = addr;
+		val |= size << FIFOSIZE_DEPTH_SHIFT;
+		WARN_ONCE(addr + size > hsotg->fifo_mem,
+			  "insufficient fifo memory");
+		addr += size;
+
+		writel(val, hsotg->regs + DPTXFSIZN(ep));
+	}
+	/* 768*4=3072 bytes FIFO length */
+	size = 768;
+	for (ep = 5; ep <= 8; ep++) {
 		val = addr;
 		val |= size << FIFOSIZE_DEPTH_SHIFT;
 		WARN_ONCE(addr + size > hsotg->fifo_mem,
@@ -1834,7 +1849,7 @@ static void s3c_hsotg_epint(struct s3c_hsotg *hsotg, unsigned int idx,
 		if (dir_in) {
 			int epctl = readl(hsotg->regs + epctl_reg);
 
-			s3c_hsotg_txfifo_flush(hsotg, idx);
+			s3c_hsotg_txfifo_flush(hsotg, hs_ep->fifo_index);
 
 			if ((epctl & DXEPCTL_STALL) &&
 				(epctl & DXEPCTL_EPTYPE_BULK)) {
@@ -1983,6 +1998,7 @@ static void kill_all_requests(struct s3c_hsotg *hsotg,
 			      int result, bool force)
 {
 	struct s3c_hsotg_req *req, *treq;
+	unsigned size;
 
 	list_for_each_entry_safe(req, treq, &ep->queue, queue) {
 		/*
@@ -1996,9 +2012,11 @@ static void kill_all_requests(struct s3c_hsotg *hsotg,
 		s3c_hsotg_complete_request(hsotg, ep, req,
 					   result);
 	}
-	if (hsotg->dedicated_fifos)
-		if ((readl(hsotg->regs + DTXFSTS(ep->index)) & 0xffff) * 4 < 3072)
-			s3c_hsotg_txfifo_flush(hsotg, ep->index);
+	if (!hsotg->dedicated_fifos)
+		return;
+	size = (readl(hsotg->regs + DTXFSTS(ep->index)) & 0xffff) * 4;
+	if (size < ep->fifo_size)
+		s3c_hsotg_txfifo_flush(hsotg, ep->fifo_index);
 }
 
 /**
@@ -2439,6 +2457,7 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep,
 	u32 epctrl;
 	u32 mps;
 	int dir_in;
+	int i, val, size;
 	int ret = 0;
 
 	dev_dbg(hsotg->dev,
@@ -2511,17 +2530,8 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep,
 		break;
 
 	case USB_ENDPOINT_XFER_INT:
-		if (dir_in) {
-			/*
-			 * Allocate our TxFNum by simply using the index
-			 * of the endpoint for the moment. We could do
-			 * something better if the host indicates how
-			 * many FIFOs we are expecting to use.
-			 */
-
+		if (dir_in)
 			hs_ep->periodic = 1;
-			epctrl |= DXEPCTL_TXFNUM(index);
-		}
 
 		epctrl |= DXEPCTL_EPTYPE_INTERRUPT;
 		break;
@@ -2535,8 +2545,25 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep,
 	 * if the hardware has dedicated fifos, we must give each IN EP
 	 * a unique tx-fifo even if it is non-periodic.
 	 */
-	if (dir_in && hsotg->dedicated_fifos)
-		epctrl |= DXEPCTL_TXFNUM(index);
+	if (dir_in && hsotg->dedicated_fifos) {
+		size = hs_ep->ep.maxpacket*hs_ep->mc;
+		for (i = 1; i <= 8; ++i) {
+			if (hsotg->fifo_map & (1<<i))
+				continue;
+			val = readl(hsotg->regs + DPTXFSIZN(i));
+			val = (val >> FIFOSIZE_DEPTH_SHIFT)*4;
+			if (val < size)
+				continue;
+			hsotg->fifo_map |= 1<<i;
+
+			epctrl |= DXEPCTL_TXFNUM(i);
+			hs_ep->fifo_index = i;
+			hs_ep->fifo_size = val;
+			break;
+		}
+		if (i == 8)
+			return -ENOMEM;
+	}
 
 	/* for non control endpoints, set PID to D0 */
 	if (index)
@@ -2583,6 +2610,9 @@ static int s3c_hsotg_ep_disable(struct usb_ep *ep)
 	/* terminate all requests with shutdown */
 	kill_all_requests(hsotg, hs_ep, -ESHUTDOWN, false);
 
+	hsotg->fifo_map &= ~(1<<hs_ep->fifo_index);
+	hs_ep->fifo_index = 0;
+	hs_ep->fifo_size = 0;
 
 	ctrl = readl(hsotg->regs + epctrl_reg);
 	ctrl &= ~DXEPCTL_EPENA;
@@ -2974,7 +3004,6 @@ static void s3c_hsotg_initep(struct s3c_hsotg *hsotg,
 				       struct s3c_hsotg_ep *hs_ep,
 				       int epnum)
 {
-	u32 ptxfifo;
 	char *dir;
 
 	if (epnum == 0)
@@ -3003,15 +3032,6 @@ static void s3c_hsotg_initep(struct s3c_hsotg *hsotg,
 	hs_ep->ep.ops = &s3c_hsotg_ep_ops;
 
 	/*
-	 * Read the FIFO size for the Periodic TX FIFO, even if we're
-	 * an OUT endpoint, we may as well do this if in future the
-	 * code is changed to make each endpoint's direction changeable.
-	 */
-
-	ptxfifo = readl(hsotg->regs + DPTXFSIZN(epnum));
-	hs_ep->fifo_size = FIFOSIZE_DEPTH_GET(ptxfifo) * 4;
-
-	/*
 	 * if we're using dma, we need to set the next-endpoint pointer
 	 * to be something valid.
 	 */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 11/12] usb: dwc2/gadget: disable clock when it's not needed
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (9 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 10/12] usb: dwc2/gadget: assign TX FIFO dynamically Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19  8:54 ` [PATCH RESEND v3 12/12] usb: dwc2/gadget: avoid disabling ep0 Robert Baldyga
  2014-08-19 15:46 ` [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Paul Zimmerman
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

When device is stopped or suspended clock is not needed so we
can disable it for this time.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index b914365..148ef3c 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2893,6 +2893,8 @@ static int s3c_hsotg_udc_start(struct usb_gadget *gadget,
 	hsotg->gadget.dev.of_node = hsotg->dev->of_node;
 	hsotg->gadget.speed = USB_SPEED_UNKNOWN;
 
+	clk_enable(hsotg->clk);
+
 	ret = regulator_bulk_enable(ARRAY_SIZE(hsotg->supplies),
 				    hsotg->supplies);
 	if (ret) {
@@ -2941,6 +2943,8 @@ static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,
 
 	regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies), hsotg->supplies);
 
+	clk_disable(hsotg->clk);
+
 	return 0;
 }
 
@@ -2972,8 +2976,10 @@ static int s3c_hsotg_pullup(struct usb_gadget *gadget, int is_on)
 	spin_lock_irqsave(&hsotg->lock, flags);
 	if (is_on) {
 		s3c_hsotg_phy_enable(hsotg);
+		clk_enable(hsotg->clk);
 		s3c_hsotg_core_init(hsotg);
 	} else {
+		clk_disable(hsotg->clk);
 		s3c_hsotg_phy_disable(hsotg);
 	}
 
@@ -3636,6 +3642,7 @@ static int s3c_hsotg_suspend(struct platform_device *pdev, pm_message_t state)
 
 		ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),
 					     hsotg->supplies);
+		clk_disable(hsotg->clk);
 	}
 
 	return ret;
@@ -3650,6 +3657,8 @@ static int s3c_hsotg_resume(struct platform_device *pdev)
 	if (hsotg->driver) {
 		dev_info(hsotg->dev, "resuming usb gadget %s\n",
 			 hsotg->driver->driver.name);
+
+		clk_enable(hsotg->clk);
 		ret = regulator_bulk_enable(ARRAY_SIZE(hsotg->supplies),
 				      hsotg->supplies);
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH RESEND v3 12/12] usb: dwc2/gadget: avoid disabling ep0
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (10 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 11/12] usb: dwc2/gadget: disable clock when it's not needed Robert Baldyga
@ 2014-08-19  8:54 ` Robert Baldyga
  2014-08-19 15:46 ` [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Paul Zimmerman
  12 siblings, 0 replies; 16+ messages in thread
From: Robert Baldyga @ 2014-08-19  8:54 UTC (permalink / raw
  To: Paul.Zimmerman
  Cc: gregkh, balbi, linux-usb, linux-kernel, m.szyprowski, andrzej.p,
	Robert Baldyga

Endpoint 0 should not be disabled, so we start loop counter from number 1.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 148ef3c..3c1dfe1 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2929,7 +2929,7 @@ static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,
 		return -ENODEV;
 
 	/* all endpoints should be shutdown */
-	for (ep = 0; ep < hsotg->num_of_eps; ep++)
+	for (ep = 1; ep < hsotg->num_of_eps; ep++)
 		s3c_hsotg_ep_disable(&hsotg->eps[ep].ep);
 
 	spin_lock_irqsave(&hsotg->lock, flags);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* RE: [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series
  2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
                   ` (11 preceding siblings ...)
  2014-08-19  8:54 ` [PATCH RESEND v3 12/12] usb: dwc2/gadget: avoid disabling ep0 Robert Baldyga
@ 2014-08-19 15:46 ` Paul Zimmerman
  2014-08-19 16:15   ` gregkh
  12 siblings, 1 reply; 16+ messages in thread
From: Paul Zimmerman @ 2014-08-19 15:46 UTC (permalink / raw
  To: gregkh@linuxfoundation.org, Robert Baldyga
  Cc: balbi@ti.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
	andrzej.p@samsung.com

> From: Robert Baldyga [mailto:r.baldyga@samsung.com]
> Sent: Tuesday, August 19, 2014 1:54 AM
> 
> Hi Paul,
> 
> I'm resending this patchset rebased on linux-next. Now it should apply.
> 
> Thanks,
> Robert Baldyga
> 
> Changelog:
> v3: https://lkml.org/lkml/2014/8/4/617
> - use endpoint index instead of FIFO index for EPFIFO
> - extend patch description
> 
> v2: https://lkml.org/lkml/2014/7/16/199
> - add patch usb: dwc2/gadget: avoid disabling ep0
> - fix FIFO flushing when it's assigned to endpoint dynamically
> - write to proper FIFO in s3c_hsotg_write_fifo() function
> - use real FIFO size in kill_all_requests
> - fix comment in s3c_hsotg_init_fifo() function
> 
> v1: https://lkml.org/lkml/2014/6/23/67
> 
> Andrzej Pietrasiewicz (1):
>   usb: dwc2/gadget: Fix comment text
> 
> Kamil Debski (3):
>   usb: dwc2/gadget: fix phy disable sequence
>   usb: dwc2/gadget: fix phy initialization sequence
>   usb: dwc2/gadget: move phy bus legth initialization
> 
> Marek Szyprowski (5):
>   usb: dwc2/gadget: hide some not really needed debug messages
>   usb: dwc2/gadget: ensure that all fifos have correct memory buffers
>   usb: dwc2/gadget: break infinite loop in endpoint disable code
>   usb: dwc2/gadget: do not call disconnect method in pullup
>   usb: dwc2/gadget: delay enabling irq once hardware is configured
>     properly
> 
> Robert Baldyga (3):
>   usb: dwc2/gadget: assign TX FIFO dynamically
>   usb: dwc2/gadget: disable clock when it's not needed
>   usb: dwc2/gadget: avoid disabling ep0
> 
>  drivers/usb/dwc2/core.h   |   3 +
>  drivers/usb/dwc2/gadget.c | 184 +++++++++++++++++++++++++++-------------------
>  2 files changed, 111 insertions(+), 76 deletions(-)

Thanks Robert.

For the entire series,
Acked-by: Paul Zimmerman <paulz@synopsys.com>

Greg, can you please apply this to your usb-next tree? Thanks.

-- 
Paul


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series
  2014-08-19 15:46 ` [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Paul Zimmerman
@ 2014-08-19 16:15   ` gregkh
  2014-08-19 17:56     ` Paul Zimmerman
  0 siblings, 1 reply; 16+ messages in thread
From: gregkh @ 2014-08-19 16:15 UTC (permalink / raw
  To: Paul Zimmerman
  Cc: Robert Baldyga, balbi@ti.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
	andrzej.p@samsung.com

On Tue, Aug 19, 2014 at 03:46:58PM +0000, Paul Zimmerman wrote:
> > From: Robert Baldyga [mailto:r.baldyga@samsung.com]
> > Sent: Tuesday, August 19, 2014 1:54 AM
> > 
> > Hi Paul,
> > 
> > I'm resending this patchset rebased on linux-next. Now it should apply.
> > 
> > Thanks,
> > Robert Baldyga
> > 
> > Changelog:
> > v3: https://lkml.org/lkml/2014/8/4/617
> > - use endpoint index instead of FIFO index for EPFIFO
> > - extend patch description
> > 
> > v2: https://lkml.org/lkml/2014/7/16/199
> > - add patch usb: dwc2/gadget: avoid disabling ep0
> > - fix FIFO flushing when it's assigned to endpoint dynamically
> > - write to proper FIFO in s3c_hsotg_write_fifo() function
> > - use real FIFO size in kill_all_requests
> > - fix comment in s3c_hsotg_init_fifo() function
> > 
> > v1: https://lkml.org/lkml/2014/6/23/67
> > 
> > Andrzej Pietrasiewicz (1):
> >   usb: dwc2/gadget: Fix comment text
> > 
> > Kamil Debski (3):
> >   usb: dwc2/gadget: fix phy disable sequence
> >   usb: dwc2/gadget: fix phy initialization sequence
> >   usb: dwc2/gadget: move phy bus legth initialization
> > 
> > Marek Szyprowski (5):
> >   usb: dwc2/gadget: hide some not really needed debug messages
> >   usb: dwc2/gadget: ensure that all fifos have correct memory buffers
> >   usb: dwc2/gadget: break infinite loop in endpoint disable code
> >   usb: dwc2/gadget: do not call disconnect method in pullup
> >   usb: dwc2/gadget: delay enabling irq once hardware is configured
> >     properly
> > 
> > Robert Baldyga (3):
> >   usb: dwc2/gadget: assign TX FIFO dynamically
> >   usb: dwc2/gadget: disable clock when it's not needed
> >   usb: dwc2/gadget: avoid disabling ep0
> > 
> >  drivers/usb/dwc2/core.h   |   3 +
> >  drivers/usb/dwc2/gadget.c | 184 +++++++++++++++++++++++++++-------------------
> >  2 files changed, 111 insertions(+), 76 deletions(-)
> 
> Thanks Robert.
> 
> For the entire series,
> Acked-by: Paul Zimmerman <paulz@synopsys.com>
> 
> Greg, can you please apply this to your usb-next tree? Thanks.

For 3.17-final, or 3.18-rc1?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series
  2014-08-19 16:15   ` gregkh
@ 2014-08-19 17:56     ` Paul Zimmerman
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Zimmerman @ 2014-08-19 17:56 UTC (permalink / raw
  To: gregkh@linuxfoundation.org
  Cc: Robert Baldyga, balbi@ti.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
	andrzej.p@samsung.com

> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> Sent: Tuesday, August 19, 2014 9:16 AM
> 
> On Tue, Aug 19, 2014 at 03:46:58PM +0000, Paul Zimmerman wrote:
> > > From: Robert Baldyga [mailto:r.baldyga@samsung.com]
> > > Sent: Tuesday, August 19, 2014 1:54 AM
> > >
> > > Hi Paul,
> > >
> > > I'm resending this patchset rebased on linux-next. Now it should apply.
> > >
> > > Thanks,
> > > Robert Baldyga
> > >
> > > Changelog:
> > > v3: https://lkml.org/lkml/2014/8/4/617
> > > - use endpoint index instead of FIFO index for EPFIFO
> > > - extend patch description
> > >
> > > v2: https://lkml.org/lkml/2014/7/16/199
> > > - add patch usb: dwc2/gadget: avoid disabling ep0
> > > - fix FIFO flushing when it's assigned to endpoint dynamically
> > > - write to proper FIFO in s3c_hsotg_write_fifo() function
> > > - use real FIFO size in kill_all_requests
> > > - fix comment in s3c_hsotg_init_fifo() function
> > >
> > > v1: https://lkml.org/lkml/2014/6/23/67
> > >
> > > Andrzej Pietrasiewicz (1):
> > >   usb: dwc2/gadget: Fix comment text
> > >
> > > Kamil Debski (3):
> > >   usb: dwc2/gadget: fix phy disable sequence
> > >   usb: dwc2/gadget: fix phy initialization sequence
> > >   usb: dwc2/gadget: move phy bus legth initialization
> > >
> > > Marek Szyprowski (5):
> > >   usb: dwc2/gadget: hide some not really needed debug messages
> > >   usb: dwc2/gadget: ensure that all fifos have correct memory buffers
> > >   usb: dwc2/gadget: break infinite loop in endpoint disable code
> > >   usb: dwc2/gadget: do not call disconnect method in pullup
> > >   usb: dwc2/gadget: delay enabling irq once hardware is configured
> > >     properly
> > >
> > > Robert Baldyga (3):
> > >   usb: dwc2/gadget: assign TX FIFO dynamically
> > >   usb: dwc2/gadget: disable clock when it's not needed
> > >   usb: dwc2/gadget: avoid disabling ep0
> > >
> > >  drivers/usb/dwc2/core.h   |   3 +
> > >  drivers/usb/dwc2/gadget.c | 184 +++++++++++++++++++++++++++-------------------
> > >  2 files changed, 111 insertions(+), 76 deletions(-)
> >
> > Thanks Robert.
> >
> > For the entire series,
> > Acked-by: Paul Zimmerman <paulz@synopsys.com>
> >
> > Greg, can you please apply this to your usb-next tree? Thanks.
> 
> For 3.17-final, or 3.18-rc1?

For 3.18-rc1. Thanks.

-- 
Paul


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-08-19 17:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19  8:54 [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 01/12] usb: dwc2/gadget: fix phy disable sequence Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 02/12] usb: dwc2/gadget: fix phy initialization sequence Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 03/12] usb: dwc2/gadget: move phy bus legth initialization Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 04/12] usb: dwc2/gadget: Fix comment text Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 05/12] usb: dwc2/gadget: hide some not really needed debug messages Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 06/12] usb: dwc2/gadget: ensure that all fifos have correct memory buffers Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 07/12] usb: dwc2/gadget: break infinite loop in endpoint disable code Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 08/12] usb: dwc2/gadget: do not call disconnect method in pullup Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 09/12] usb: dwc2/gadget: delay enabling irq once hardware is configured properly Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 10/12] usb: dwc2/gadget: assign TX FIFO dynamically Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 11/12] usb: dwc2/gadget: disable clock when it's not needed Robert Baldyga
2014-08-19  8:54 ` [PATCH RESEND v3 12/12] usb: dwc2/gadget: avoid disabling ep0 Robert Baldyga
2014-08-19 15:46 ` [PATCH RESEND v3 00/12] usb: dwc2/gadget: fix series Paul Zimmerman
2014-08-19 16:15   ` gregkh
2014-08-19 17:56     ` Paul Zimmerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.