linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] usb: gadget: udc: atmel: Endpoint allocation scheme fixes
@ 2017-04-07 16:07 cristian.birsan
  2017-04-07 16:07 ` [PATCH v4 1/2] usb: gadget: udc: atmel: Use dev_err() to display EP configuration error cristian.birsan
  2017-04-07 16:07 ` [PATCH v4 2/2] usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0 cristian.birsan
  0 siblings, 2 replies; 3+ messages in thread
From: cristian.birsan @ 2017-04-07 16:07 UTC (permalink / raw)
  To: nicolas.ferre, balbi, gregkh, linux-arm-kernel, linux-usb, linux-kernel
  Cc: ludovic.desroches, alexandre.belloni, boris.brezillon, Cristian Birsan

From: Cristian Birsan <cristian.birsan@microchip.com>

This patch series provides fixes, based on the feedback received on the mailing list, for
the following:
	- fifo table parameters validation against device tree values
	- coding style
	- message display for EP configuration error
	- Kconfig comments for fifo_mode=0

Changes since v1:
	- Removed static for usba_config_fifo_table() function from "Check fifo
	configuration values against device tree" patch

Changes since v2:
	- Use shorter warning message if the fifo table size is greather than device 
	tree value
	- replace dev_warn() with dev_err() for hardware fifo allocation error

Changes since v3:
	- rebase the code on testing/next branch as requested
	- remove from patch series the patches that are already in testing/next branch

Cristian Birsan (2):
  usb: gadget: udc: atmel: Use dev_err() to display EP configuration
    error
  usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0

 drivers/usb/gadget/udc/Kconfig          | 5 +++--
 drivers/usb/gadget/udc/atmel_usba_udc.c | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

-- 
2.7.4

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

* [PATCH v4 1/2] usb: gadget: udc: atmel: Use dev_err() to display EP configuration error
  2017-04-07 16:07 [PATCH v4 0/2] usb: gadget: udc: atmel: Endpoint allocation scheme fixes cristian.birsan
@ 2017-04-07 16:07 ` cristian.birsan
  2017-04-07 16:07 ` [PATCH v4 2/2] usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0 cristian.birsan
  1 sibling, 0 replies; 3+ messages in thread
From: cristian.birsan @ 2017-04-07 16:07 UTC (permalink / raw)
  To: nicolas.ferre, balbi, gregkh, linux-arm-kernel, linux-usb, linux-kernel
  Cc: ludovic.desroches, alexandre.belloni, boris.brezillon, Cristian Birsan

From: Cristian Birsan <cristian.birsan@microchip.com>

Use dev_err() to display EP configuration error to avoid silent failure.

Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 8bc0b52a..3ccc341 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -1851,8 +1851,8 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
 		 * but it's clearly harmless...
 		 */
 		if (!(usba_ep_readl(ep0, CFG) & USBA_EPT_MAPPED))
-			dev_dbg(&udc->pdev->dev,
-				 "ODD: EP0 configuration is invalid!\n");
+			dev_err(&udc->pdev->dev,
+				"ODD: EP0 configuration is invalid!\n");
 
 		/* Preallocate other endpoints */
 		n = fifo_mode ? udc->num_ep : udc->configured_ep;
@@ -1860,8 +1860,8 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
 			ep = &udc->usba_ep[i];
 			usba_ep_writel(ep, CFG, ep->ept_cfg);
 			if (!(usba_ep_readl(ep, CFG) & USBA_EPT_MAPPED))
-				dev_dbg(&udc->pdev->dev,
-				 "ODD: EP%d configuration is invalid!\n", i);
+				dev_err(&udc->pdev->dev,
+					"ODD: EP%d configuration is invalid!\n", i);
 		}
 	}
 
-- 
2.7.4

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

* [PATCH v4 2/2] usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0
  2017-04-07 16:07 [PATCH v4 0/2] usb: gadget: udc: atmel: Endpoint allocation scheme fixes cristian.birsan
  2017-04-07 16:07 ` [PATCH v4 1/2] usb: gadget: udc: atmel: Use dev_err() to display EP configuration error cristian.birsan
@ 2017-04-07 16:07 ` cristian.birsan
  1 sibling, 0 replies; 3+ messages in thread
From: cristian.birsan @ 2017-04-07 16:07 UTC (permalink / raw)
  To: nicolas.ferre, balbi, gregkh, linux-arm-kernel, linux-usb, linux-kernel
  Cc: ludovic.desroches, alexandre.belloni, boris.brezillon, Cristian Birsan

From: Cristian Birsan <cristian.birsan@microchip.com>

Update Kconfig help for fifo_mode = 0 to explain the behavior better.

Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
 drivers/usb/gadget/udc/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
index 707814d..c90a4a2 100644
--- a/drivers/usb/gadget/udc/Kconfig
+++ b/drivers/usb/gadget/udc/Kconfig
@@ -62,8 +62,9 @@ config USB_ATMEL_USBA
 
 	  The fifo_mode parameter is used to select endpoint allocation mode.
 	  fifo_mode = 0 is used to let the driver autoconfigure the endpoints.
-	  In this case 2 banks are allocated for isochronous endpoints and
-	  only one bank is allocated for the rest of the endpoints.
+	  In this case, for ep1 2 banks are allocated if it works in isochronous
+	  mode and only 1 bank otherwise. For the rest of the endpoints
+	  only 1 bank is allocated.
 
 	  fifo_mode = 1 is a generic maximum fifo size (1024 bytes) configuration
 	  allowing the usage of ep1 - ep6
-- 
2.7.4

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

end of thread, other threads:[~2017-04-07 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-07 16:07 [PATCH v4 0/2] usb: gadget: udc: atmel: Endpoint allocation scheme fixes cristian.birsan
2017-04-07 16:07 ` [PATCH v4 1/2] usb: gadget: udc: atmel: Use dev_err() to display EP configuration error cristian.birsan
2017-04-07 16:07 ` [PATCH v4 2/2] usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0 cristian.birsan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).