>-----Original Message----- >From: Felipe Balbi [mailto:me@xxxxxxxxxxxxxxx] > >On Tue, Dec 16, 2008 at 12:53:47AM +0530, Pandita, Vikram wrote: >> From: Vikram Pandita <vikram.pandita@xxxxxx> >> >> 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@xxxxxx> > >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@xxxxxx> 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-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html