MUSB: fix wrongly created sysfs entry
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 1229354799.22285.234.camel@violet
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 1229356837.22285.239.camel@violet
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 MUSB: fix wrongly created sysfs entry
From: Vikram Pandita <[email protected]>
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.
--- drivers/usb/musb/musb_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/musb/musb_core.c +1 -1
@@ -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 ;
Signature · 1 line
1.6.0.3.613.g9f8f13
A message that is not in the archive (sent off-list or not yet received): FCCFB4CDC6E5564B9182F639FC356087025127B95B-/tLxBxkBPtCIQmiDNMet8wC/[email protected]
PATCH v2 1/1 MUSB: fix wrongly created sysfs entry
From: Vikram Pandita <[email protected]>
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.
---
Fixing the comment-line in v2 of this patch
drivers/usb/musb/musb_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/musb/musb_core.c +2 -2
@@ -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)
Signature · 6 lines
1.6.0.3.613.g9f8f13 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
NAKQuoted 9 lines · Vikram
From: Vikram Pandita <[email protected]>
attr_srpis created wrongly for GADGET only mode of MUSB The attribute is related to OTG mode onlyFor Gadget mode, this attribute gets created on insmod but does not get deleted. Fixing the bug.
Signed-off-by Vikram Pandita <[email protected]>
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"
Signature · 1 line
balbi
Quoted 13 lines
-----Original Message-----
From: Felipe Balbi [mailto:me-uiRdBs8odbtmTBlB0Cgj/[email protected]]Quoted 8 lines · Vikram
From: Vikram Pandita <[email protected]>
attr_srpis created wrongly for GADGET only mode of MUSB The attribute is related to OTG mode onlyFor Gadget mode, this attribute gets created on insmod but does not get deleted. Fixing the bug.
Quoted 7 lines
Quoted 1 line
Signed-off-by Vikram Pandita <[email protected]>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.
drivers/usb/musb/musb_core.c +3 -3
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 2 lines · Vikram
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:
Quoted 15 lines
Signed-off-by Vikram Pandita <[email protected]>drivers/usb/musb/musb_core.c +1
-1@@ -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
drivers/usb/musb/musb_core.c bad_config: · line 2063
Quoted 5 lines
drivers/usb/musb/musb_core.c +1
-1@@ -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 :-)
Signature · 1 line
balbi
PATCH v3 1/1 MUSB: fix srp sysfs entry deletion
From: Vikram Pandita <[email protected]>
srp sysfs attribute is dependent on gadget mode
the entry was not getting deleted in rmmod case,
fixing the bug
--- drivers/usb/musb/musb_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/musb/musb_core.c +2 -2
@@ -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
Signature · 1 line
1.6.0.3.613.g9f8f13
Felipe Balbi
AppliedRe: [PATCH v3] MUSB: fix srp sysfs entry deletion
Quoted 9 lines · Vikram
From: Vikram Pandita <[email protected]>
srp sysfs attribute is dependent on gadget mode
the entry was not getting deleted in rmmod case,
fixing the bugSigned-off-by Vikram Pandita <[email protected]>CC Felipe Balbi <[email protected]>
applied, thanks
Signature · 1 line
balbi