On 13 April 2016 at 17:25, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Wed, 13 Apr 2016, Rafał Miłecki wrote: >> I'm trying to debug some EHCI issue so I enabled debugging by adding >> ccflags-y := -DDEBUG >> to the drivers/usb/host/Makefile >> >> Some of debugging lines contain random memory, e.g.: >> ehci-platform ehci-platform.0: .|��`|���5P5@�3�.��*�.|��o >> >> It's caused by dbg_status, dbg_cmd and dbg_port calling ehci_dbg even with: >> # CONFIG_DYNAMIC_DEBUG >> >> The lack of above config implies using dummy dbg_status_buf, >> dbg_command_buf and dbg_port_buf. They don't print anything to the >> buffer and it stays uninitialized. >> >> Can you give me a hint how to solve this (apart from enabling >> CONFIG_DYNAMIC_DEBUG for my debugging which I did)? Should dbg_*_buf >> functions return some error instead of 0? We could check for that in >> dbg_* functions then. Unfortunately I'm not sure how it's going to >> affect other places, e.g. fill_registers_buffer. > > That's a real problem. The whole ehci-dbg.c file needs to be cleaned > up -- we should just remove all the debugging when CONFIG_DYNAMIC_DEBUG > isn't enabled. > > See if the patch below fixes the problem. Sorry, I was a bit busy recently debugging this initial USB issue. Your patch fixes the issue for me! -- Rafał -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html