[PATCH 0/9] usb: musb: several bugfixes for the musb driver
The first three patches do some source code cleanup in the files that are modified in the subsequent patches. Patch 4 carries the proper fix reported in commit: 7adb5c876e9c ("usb: musb: Fix panic upon musb_am335x module removal") Patch 6 makes the USBOTG_ID pin override via the USB_MODE register really work. Patch 5 makes the error message upon driver probe failure visible without having to recompile the driver with DEBUG enabled. Patch 7 makes sure the parameters for the usb_gen_phy are properly set up before registering it. Patch 8 makes it possible to use the driver with HW that requires external regulators or clocks. Patch 9 reinstates module unloading support for the musb_am335x driver which was disabled due to a false failure analysis -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/9] usb: musb: several bugfixes for the musb driver
Hi Lothar, On 18 Jul 11:31 AM, Lothar Waßmann wrote: > The first three patches do some source code cleanup in the files that > are modified in the subsequent patches. > I've applied patches 4 and 9 on a recent -next, after fixing a conflict due to patch 3 ("usb: musb_am335x: source cleanup"): > Patch 4 carries the proper fix reported in commit: > 7adb5c876e9c ("usb: musb: Fix panic upon musb_am335x module removal") > > Patch 9 reinstates module unloading support for the musb_am335x driver > which was disabled due to a false failure analysis > For these two patches, Tested-by: Ezequiel Garcia Tested on a beaglebone with a mass storage USB device, module load/unload works without issues. The module_get/put in the phy is now preventing the musb_am335x driver unload, which seems to be the real cause of the issue I reported. Thanks for providing a proper fix! -- Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/9] usb: musb: several bugfixes for the musb driver
Hi, On Fri, Jul 18, 2014 at 01:16:36PM -0300, Ezequiel Garcia wrote: > Hi Lothar, > > On 18 Jul 11:31 AM, Lothar Waßmann wrote: > > The first three patches do some source code cleanup in the files that > > are modified in the subsequent patches. > > > > I've applied patches 4 and 9 on a recent -next, after fixing a conflict > due to patch 3 ("usb: musb_am335x: source cleanup"): > > > Patch 4 carries the proper fix reported in commit: > > 7adb5c876e9c ("usb: musb: Fix panic upon musb_am335x module > > removal") > > > > Patch 9 reinstates module unloading support for the musb_am335x driver > > which was disabled due to a false failure analysis > > > > For these two patches, Tested-by: Ezequiel Garcia > > > Tested on a beaglebone with a mass storage USB device, module load/unload > works without issues. The module_get/put in the phy is now preventing the > musb_am335x driver unload, which seems to be the real cause of the issue > I reported. Thanks for providing a proper fix! I don't that's a good fix. The problem is that even after am335x removing all its child, someone else tried to release the PHY. That ordering is the one that needs to be fixed. Doing a module_get on the parent device looks like a hack to me. -- balbi signature.asc Description: Digital signature
Re: [PATCH 0/9] usb: musb: several bugfixes for the musb driver
Hi, Felipe Balbi wrote: > Hi, > > On Fri, Jul 18, 2014 at 01:16:36PM -0300, Ezequiel Garcia wrote: > > Hi Lothar, > > > > On 18 Jul 11:31 AM, Lothar Waßmann wrote: > > > The first three patches do some source code cleanup in the files that > > > are modified in the subsequent patches. > > > > > > > I've applied patches 4 and 9 on a recent -next, after fixing a conflict > > due to patch 3 ("usb: musb_am335x: source cleanup"): > > > > > Patch 4 carries the proper fix reported in commit: > > > 7adb5c876e9c ("usb: musb: Fix panic upon musb_am335x module > > > removal") > > > > > > Patch 9 reinstates module unloading support for the musb_am335x driver > > > which was disabled due to a false failure analysis > > > > > > > For these two patches, Tested-by: Ezequiel Garcia > > > > > > Tested on a beaglebone with a mass storage USB device, module load/unload > > works without issues. The module_get/put in the phy is now preventing the > > musb_am335x driver unload, which seems to be the real cause of the issue > > I reported. Thanks for providing a proper fix! > > I don't that's a good fix. The problem is that even after am335x > removing all its child, someone else tried to release the PHY. That > ordering is the one that needs to be fixed. Doing a module_get on the > parent device looks like a hack to me. > No. It guarantees that the module cannot be unloaded when its resources are still in use! Lothar Waßmann -- ___ Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Geschäftsführer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | i...@karo-electronics.de ___ -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/9] usb: musb: several bugfixes for the musb driver
On Mon, Jul 21, 2014 at 09:34:30AM +0200, Lothar Waßmann wrote: > Hi, > > Felipe Balbi wrote: > > Hi, > > > > On Fri, Jul 18, 2014 at 01:16:36PM -0300, Ezequiel Garcia wrote: > > > Hi Lothar, > > > > > > On 18 Jul 11:31 AM, Lothar Waßmann wrote: > > > > The first three patches do some source code cleanup in the files that > > > > are modified in the subsequent patches. > > > > > > > > > > I've applied patches 4 and 9 on a recent -next, after fixing a conflict > > > due to patch 3 ("usb: musb_am335x: source cleanup"): > > > > > > > Patch 4 carries the proper fix reported in commit: > > > > 7adb5c876e9c ("usb: musb: Fix panic upon musb_am335x module > > > > removal") > > > > > > > > Patch 9 reinstates module unloading support for the musb_am335x driver > > > > which was disabled due to a false failure analysis > > > > > > > > > > For these two patches, Tested-by: Ezequiel Garcia > > > > > > > > > Tested on a beaglebone with a mass storage USB device, module load/unload > > > works without issues. The module_get/put in the phy is now preventing the > > > musb_am335x driver unload, which seems to be the real cause of the issue > > > I reported. Thanks for providing a proper fix! > > > > I don't that's a good fix. The problem is that even after am335x > > removing all its child, someone else tried to release the PHY. That > > ordering is the one that needs to be fixed. Doing a module_get on the > > parent device looks like a hack to me. > > > No. It guarantees that the module cannot be unloaded when its resources > are still in use! it's still a hack. You have a child incrementing the usage count on its parent just because a sibbling isn't doing the right thing. -- balbi signature.asc Description: Digital signature
Re: [PATCH 0/9] usb: musb: several bugfixes for the musb driver
On 21 Jul 10:11 AM, Felipe Balbi wrote: > On Mon, Jul 21, 2014 at 09:34:30AM +0200, Lothar Waßmann wrote: > > Hi, > > > > Felipe Balbi wrote: > > > Hi, > > > > > > On Fri, Jul 18, 2014 at 01:16:36PM -0300, Ezequiel Garcia wrote: > > > > Hi Lothar, > > > > > > > > On 18 Jul 11:31 AM, Lothar Waßmann wrote: > > > > > The first three patches do some source code cleanup in the files that > > > > > are modified in the subsequent patches. > > > > > > > > > > > > > I've applied patches 4 and 9 on a recent -next, after fixing a conflict > > > > due to patch 3 ("usb: musb_am335x: source cleanup"): > > > > > > > > > Patch 4 carries the proper fix reported in commit: > > > > > 7adb5c876e9c ("usb: musb: Fix panic upon musb_am335x module > > > > > removal") > > > > > > > > > > Patch 9 reinstates module unloading support for the musb_am335x driver > > > > > which was disabled due to a false failure analysis > > > > > > > > > > > > > For these two patches, Tested-by: Ezequiel Garcia > > > > > > > > > > > > Tested on a beaglebone with a mass storage USB device, module > > > > load/unload > > > > works without issues. The module_get/put in the phy is now preventing > > > > the > > > > musb_am335x driver unload, which seems to be the real cause of the issue > > > > I reported. Thanks for providing a proper fix! > > > > > > I don't that's a good fix. The problem is that even after am335x > > > removing all its child, someone else tried to release the PHY. That > > > ordering is the one that needs to be fixed. Doing a module_get on the > > > parent device looks like a hack to me. > > > > > No. It guarantees that the module cannot be unloaded when its resources > > are still in use! > > it's still a hack. You have a child incrementing the usage count on its > parent just because a sibbling isn't doing the right thing. > How about having the musb_am335x (glue driver) call request_module and module_get on the phy-am335x? Wouldn't this be a cleaner approach? I haven't checked if this possible, though. -- Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/9] usb: musb: several bugfixes for the musb driver
On Mon, Jul 21, 2014 at 12:53:52PM -0300, Ezequiel Garcia wrote: > On 21 Jul 10:11 AM, Felipe Balbi wrote: > > On Mon, Jul 21, 2014 at 09:34:30AM +0200, Lothar Waßmann wrote: > > > Hi, > > > > > > Felipe Balbi wrote: > > > > Hi, > > > > > > > > On Fri, Jul 18, 2014 at 01:16:36PM -0300, Ezequiel Garcia wrote: > > > > > Hi Lothar, > > > > > > > > > > On 18 Jul 11:31 AM, Lothar Waßmann wrote: > > > > > > The first three patches do some source code cleanup in the files > > > > > > that > > > > > > are modified in the subsequent patches. > > > > > > > > > > > > > > > > I've applied patches 4 and 9 on a recent -next, after fixing a > > > > > conflict > > > > > due to patch 3 ("usb: musb_am335x: source cleanup"): > > > > > > > > > > > Patch 4 carries the proper fix reported in commit: > > > > > > 7adb5c876e9c ("usb: musb: Fix panic upon musb_am335x module > > > > > > removal") > > > > > > > > > > > > Patch 9 reinstates module unloading support for the musb_am335x > > > > > > driver > > > > > > which was disabled due to a false failure analysis > > > > > > > > > > > > > > > > For these two patches, Tested-by: Ezequiel Garcia > > > > > > > > > > > > > > > Tested on a beaglebone with a mass storage USB device, module > > > > > load/unload > > > > > works without issues. The module_get/put in the phy is now preventing > > > > > the > > > > > musb_am335x driver unload, which seems to be the real cause of the > > > > > issue > > > > > I reported. Thanks for providing a proper fix! > > > > > > > > I don't that's a good fix. The problem is that even after am335x > > > > removing all its child, someone else tried to release the PHY. That > > > > ordering is the one that needs to be fixed. Doing a module_get on the > > > > parent device looks like a hack to me. > > > > > > > No. It guarantees that the module cannot be unloaded when its resources > > > are still in use! > > > > it's still a hack. You have a child incrementing the usage count on its > > parent just because a sibbling isn't doing the right thing. > > > > How about having the musb_am335x (glue driver) call request_module and > module_get on the phy-am335x? Wouldn't this be a cleaner approach? > > I haven't checked if this possible, though. at most, you would have the phy layer do that so that all PHYs get usage counter incremented when they're in use. We can't have this 'fixed' for MUSB only. -- balbi signature.asc Description: Digital signature