* [PATCH] MUSB: fix wrongly created sysfs entry
[not found] ` <20081215180740.02ef1667@lxorguk.ukuu.org.uk>
@ 2008-12-15 19:19 ` Pandita, Vikram
[not found] ` <FCCFB4CDC6E5564B9182F639FC356087025127B95B-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Pandita, Vikram @ 2008-12-15 19:19 UTC (permalink / raw)
To: linux-usb@vger.kernel.org; +Cc: linux-omap
From: Vikram Pandita <vikram.pandita@ti.com>
attr_srp is created wrongly for GADGET only mode of MUSB
The attribute is related to OTG mode only
For Gadget mode, this attribute gets created on insmod but does
not get deleted. Fixing this bug.
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
---
drivers/usb/musb/musb_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 5280dba..e7a5759 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2058,7 +2058,7 @@ bad_config:
#ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode);
status = device_create_file(dev, &dev_attr_vbus);
-#ifdef CONFIG_USB_GADGET_MUSB_HDRC
+#ifdef CONFIG_USB_MUSB_OTG
status = device_create_file(dev, &dev_attr_srp);
#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
status = 0;
--
1.6.0.3.613.g9f8f13
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2] MUSB: fix wrongly created sysfs entry
[not found] ` <FCCFB4CDC6E5564B9182F639FC356087025127B95B-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2008-12-15 19:23 ` Pandita, Vikram
2008-12-15 19:51 ` Felipe Balbi
0 siblings, 1 reply; 7+ messages in thread
From: Pandita, Vikram @ 2008-12-15 19:23 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; +Cc: linux-omap
From: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
attr_srp is created wrongly for GADGET only mode of MUSB
The attribute is related to OTG mode only
For Gadget mode, this attribute gets created on insmod but does
not get deleted. Fixing the bug.
Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
---
Fixing the comment-line in v2 of this patch
drivers/usb/musb/musb_core.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 5280dba..6b42667 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2058,9 +2058,9 @@ bad_config:
#ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode);
status = device_create_file(dev, &dev_attr_vbus);
-#ifdef CONFIG_USB_GADGET_MUSB_HDRC
+#ifdef CONFIG_USB_MUSB_OTG
status = device_create_file(dev, &dev_attr_srp);
-#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
+#endif /* CONFIG_USB_MUSB_OTG */
status = 0;
#endif
if (status)
--
1.6.0.3.613.g9f8f13
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] MUSB: fix wrongly created sysfs entry
2008-12-15 19:23 ` [PATCH v2] " Pandita, Vikram
@ 2008-12-15 19:51 ` Felipe Balbi
2008-12-15 19:55 ` Pandita, Vikram
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-12-15 19:51 UTC (permalink / raw)
To: Pandita, Vikram; +Cc: linux-usb@vger.kernel.org, linux-omap
On Tue, Dec 16, 2008 at 12:53:47AM +0530, Pandita, Vikram wrote:
> From: Vikram Pandita <vikram.pandita@ti.com>
>
> attr_srp is created wrongly for GADGET only mode of MUSB
> The attribute is related to OTG mode only
>
> For Gadget mode, this attribute gets created on insmod but does
> not get deleted. Fixing the bug.
>
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
NAK, any gadget is allowed to initiate SRP.
See otg rev1.3 page 20:
"Any B-device, including a standard USB peripheral, is allowed to
initiate SRP"
--
balbi
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v2] MUSB: fix wrongly created sysfs entry
2008-12-15 19:51 ` Felipe Balbi
@ 2008-12-15 19:55 ` Pandita, Vikram
2008-12-15 19:59 ` Felipe Balbi
0 siblings, 1 reply; 7+ messages in thread
From: Pandita, Vikram @ 2008-12-15 19:55 UTC (permalink / raw)
To: me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap
>-----Original Message-----
>From: Felipe Balbi [mailto:me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org]
>
>On Tue, Dec 16, 2008 at 12:53:47AM +0530, Pandita, Vikram wrote:
>> From: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
>>
>> attr_srp is created wrongly for GADGET only mode of MUSB
>> The attribute is related to OTG mode only
>>
>> For Gadget mode, this attribute gets created on insmod but does
>> not get deleted. Fixing the bug.
>>
>> Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
>
>NAK, any gadget is allowed to initiate SRP.
>See otg rev1.3 page 20:
>
>"Any B-device, including a standard USB peripheral, is allowed to
>initiate SRP"
Agreed. In that case, we still need the following patch:
Otherwise the srp entry does not get deleted on rmmod.
Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 5280dba..824ea57 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1829,7 +1829,7 @@ static void musb_free(struct musb *musb)
#ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_vbus);
-#ifdef CONFIG_USB_MUSB_OTG
+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
device_remove_file(musb->controller, &dev_attr_srp);
#endif
#endif
@@ -2060,7 +2060,7 @@ bad_config:
status = device_create_file(dev, &dev_attr_vbus);
#ifdef CONFIG_USB_GADGET_MUSB_HDRC
status = device_create_file(dev, &dev_attr_srp);
-#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
+#endif
status = 0;
#endif
if (status)
@@ -2072,7 +2072,7 @@ fail2:
#ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_vbus);
-#ifdef CONFIG_USB_MUSB_OTG
+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
device_remove_file(musb->controller, &dev_attr_srp);
#endif
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] MUSB: fix wrongly created sysfs entry
2008-12-15 19:55 ` Pandita, Vikram
@ 2008-12-15 19:59 ` Felipe Balbi
2008-12-15 20:05 ` [PATCH v3] MUSB: fix srp sysfs entry deletion Pandita, Vikram
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-12-15 19:59 UTC (permalink / raw)
To: Pandita, Vikram; +Cc: me@felipebalbi.com, linux-usb@vger.kernel.org, linux-omap
Hi,
On Tue, Dec 16, 2008 at 01:25:58AM +0530, Pandita, Vikram wrote:
> Agreed. In that case, we still need the following patch:
> Otherwise the srp entry does not get deleted on rmmod.
makes sense, can you just update one thing:
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 5280dba..824ea57 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1829,7 +1829,7 @@ static void musb_free(struct musb *musb)
> #ifdef CONFIG_SYSFS
> device_remove_file(musb->controller, &dev_attr_mode);
> device_remove_file(musb->controller, &dev_attr_vbus);
> -#ifdef CONFIG_USB_MUSB_OTG
> +#ifdef CONFIG_USB_GADGET_MUSB_HDRC
> device_remove_file(musb->controller, &dev_attr_srp);
> #endif
> #endif
> @@ -2060,7 +2060,7 @@ bad_config:
> status = device_create_file(dev, &dev_attr_vbus);
> #ifdef CONFIG_USB_GADGET_MUSB_HDRC
> status = device_create_file(dev, &dev_attr_srp);
> -#endif /* CONFIG_USB_GADGET_MUSB_HDRC */
> +#endif
leave the comment there :-)
--
balbi
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] MUSB: fix srp sysfs entry deletion
2008-12-15 19:59 ` Felipe Balbi
@ 2008-12-15 20:05 ` Pandita, Vikram
2008-12-15 20:08 ` Felipe Balbi
0 siblings, 1 reply; 7+ messages in thread
From: Pandita, Vikram @ 2008-12-15 20:05 UTC (permalink / raw)
To: me@felipebalbi.com, linux-usb@vger.kernel.org; +Cc: linux-omap
From: Vikram Pandita <vikram.pandita@ti.com>
srp sysfs attribute is dependent on gadget mode
the entry was not getting deleted in rmmod case,
fixing the bug
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
CC: Felipe Balbi <me@felipebalbi.com>
---
drivers/usb/musb/musb_core.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 5280dba..4cc2638 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1829,7 +1829,7 @@ static void musb_free(struct musb *musb)
#ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_vbus);
-#ifdef CONFIG_USB_MUSB_OTG
+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
device_remove_file(musb->controller, &dev_attr_srp);
#endif
#endif
@@ -2072,7 +2072,7 @@ fail2:
#ifdef CONFIG_SYSFS
device_remove_file(musb->controller, &dev_attr_mode);
device_remove_file(musb->controller, &dev_attr_vbus);
-#ifdef CONFIG_USB_MUSB_OTG
+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
device_remove_file(musb->controller, &dev_attr_srp);
#endif
#endif
--
1.6.0.3.613.g9f8f13
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3] MUSB: fix srp sysfs entry deletion
2008-12-15 20:05 ` [PATCH v3] MUSB: fix srp sysfs entry deletion Pandita, Vikram
@ 2008-12-15 20:08 ` Felipe Balbi
0 siblings, 0 replies; 7+ messages in thread
From: Felipe Balbi @ 2008-12-15 20:08 UTC (permalink / raw)
To: Pandita, Vikram; +Cc: me@felipebalbi.com, linux-usb@vger.kernel.org, linux-omap
On Tue, Dec 16, 2008 at 01:35:05AM +0530, Pandita, Vikram wrote:
> From: Vikram Pandita <vikram.pandita@ti.com>
>
> srp sysfs attribute is dependent on gadget mode
>
> the entry was not getting deleted in rmmod case,
> fixing the bug
>
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
> CC: Felipe Balbi <me@felipebalbi.com>
applied, thanks
--
balbi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-12-15 20:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1229272442.6775.3.camel@localhost.localdomain>
[not found] ` <49462232.10308@option.com>
[not found] ` <1229352834.12163.9.camel@localhost.localdomain>
[not found] ` <1229354799.22285.234.camel@violet>
[not found] ` <20081215154937.6e1bf0e1@lxorguk.ukuu.org.uk>
[not found] ` <1229356837.22285.239.camel@violet>
[not found] ` <1229357553.12163.55.camel@localhost.localdomain>
[not found] ` <20081215162505.4b11c9be@lxorguk.ukuu.org.uk>
[not found] ` <1229359592.12163.80.camel@localhost.localdomain>
[not found] ` <20081215171611.0b3877d5@lxorguk.ukuu.org.uk>
[not found] ` <1229362427.12163.94.camel@localhost.localdomain>
[not found] ` <1229363671.12163.109.camel@localhost.localdomain>
[not found] ` <20081215180740.02ef1667@lxorguk.ukuu.org.uk>
2008-12-15 19:19 ` [PATCH] MUSB: fix wrongly created sysfs entry Pandita, Vikram
[not found] ` <FCCFB4CDC6E5564B9182F639FC356087025127B95B-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2008-12-15 19:23 ` [PATCH v2] " Pandita, Vikram
2008-12-15 19:51 ` Felipe Balbi
2008-12-15 19:55 ` Pandita, Vikram
2008-12-15 19:59 ` Felipe Balbi
2008-12-15 20:05 ` [PATCH v3] MUSB: fix srp sysfs entry deletion Pandita, Vikram
2008-12-15 20:08 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox