public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb:udc:samsung:fix Remove the req_config flag
@ 2012-03-13  8:08 Lukasz Majewski
  2012-03-14  2:04 ` Marek Vasut
  0 siblings, 1 reply; 2+ messages in thread
From: Lukasz Majewski @ 2012-03-13  8:08 UTC (permalink / raw)
  To: u-boot

The dev->req_config flag was indicating that the forwarded
request needs to perform the usb gadget delayed status.
This is however not needed anymore, so it can be removed.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
---
 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c |   18 +++++-------------
 include/usb/s3c_udc.h                     |    2 +-
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
index b11108d..afd4931 100644
--- a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
@@ -1316,7 +1316,7 @@ void s3c_ep0_setup(struct s3c_udc *dev)
 	/* cope with automagic for some standard requests. */
 	dev->req_std = (usb_ctrl->bRequestType & USB_TYPE_MASK)
 		== USB_TYPE_STANDARD;
-	dev->req_config = 0;
+
 	dev->req_pending = 1;
 
 	/* Handle some SETUP packets ourselves */
@@ -1337,10 +1337,9 @@ void s3c_ep0_setup(struct s3c_udc *dev)
 			DEBUG_SETUP("%s: USB_REQ_SET_CONFIGURATION (%d)\n",
 					__func__, usb_ctrl->wValue);
 
-			if (usb_ctrl->bRequestType == USB_RECIP_DEVICE) {
+			if (usb_ctrl->bRequestType == USB_RECIP_DEVICE)
 				reset_available = 1;
-				dev->req_config = 1;
-			}
+
 			break;
 
 		case USB_REQ_GET_DESCRIPTOR:
@@ -1352,10 +1351,9 @@ void s3c_ep0_setup(struct s3c_udc *dev)
 			DEBUG_SETUP("%s: *** USB_REQ_SET_INTERFACE (%d)\n",
 					__func__, usb_ctrl->wValue);
 
-			if (usb_ctrl->bRequestType == USB_RECIP_INTERFACE) {
+			if (usb_ctrl->bRequestType == USB_RECIP_INTERFACE)
 				reset_available = 1;
-				dev->req_config = 1;
-			}
+
 			break;
 
 		case USB_REQ_GET_CONFIGURATION:
@@ -1404,12 +1402,6 @@ void s3c_ep0_setup(struct s3c_udc *dev)
 		spin_lock(&dev->lock);
 
 		if (i < 0) {
-			if (dev->req_config) {
-				DEBUG_SETUP("\tconfig change 0x%02x fail %d?\n",
-					(u32)usb_ctrl->bRequest, i);
-				return;
-			}
-
 			/* setup processing failed, force stall */
 			s3c_udc_ep0_set_stall(ep);
 			dev->ep0state = WAIT_FOR_SETUP;
diff --git a/include/usb/s3c_udc.h b/include/usb/s3c_udc.h
index 31d8f6c..6c973b6 100644
--- a/include/usb/s3c_udc.h
+++ b/include/usb/s3c_udc.h
@@ -102,7 +102,7 @@ struct s3c_udc {
 
 	unsigned char usb_address;
 
-	unsigned req_pending:1, req_std:1, req_config:1;
+	unsigned req_pending:1, req_std:1;
 };
 
 extern struct s3c_udc *the_controller;
-- 
1.7.2.3

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

* [U-Boot] [PATCH] usb:udc:samsung:fix Remove the req_config flag
  2012-03-13  8:08 [U-Boot] [PATCH] usb:udc:samsung:fix Remove the req_config flag Lukasz Majewski
@ 2012-03-14  2:04 ` Marek Vasut
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2012-03-14  2:04 UTC (permalink / raw)
  To: u-boot

Dear Lukasz Majewski,

> The dev->req_config flag was indicating that the forwarded
> request needs to perform the usb gadget delayed status.
> This is however not needed anymore, so it can be removed.

You're the expert, but why is it not needed anymore ? :) Otherwise I'm all right 
with the patch.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

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

end of thread, other threads:[~2012-03-14  2:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-13  8:08 [U-Boot] [PATCH] usb:udc:samsung:fix Remove the req_config flag Lukasz Majewski
2012-03-14  2:04 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox