From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755147AbbEUIWP (ORCPT ); Thu, 21 May 2015 04:22:15 -0400 Received: from mga14.intel.com ([192.55.52.115]:21738 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753328AbbEUIWK (ORCPT ); Thu, 21 May 2015 04:22:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,467,1427785200"; d="scan'208";a="574724631" Message-ID: <555D95A0.7020307@linux.intel.com> Date: Thu, 21 May 2015 16:21:52 +0800 From: "Lu, Baolu" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Heikki Krogerus CC: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, qiuxu.zhuo@intel.com, Sasha Levin Subject: Re: [PATCH 1/1] usb: ulpi: ulpi_init should be used in subsys_initcall References: <1432186843-31823-1-git-send-email-baolu.lu@linux.intel.com> <20150521073319.GB16847@kuha.fi.intel.com> In-Reply-To: <20150521073319.GB16847@kuha.fi.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/21/2015 03:33 PM, Heikki Krogerus wrote: > On Thu, May 21, 2015 at 01:40:43PM +0800, Lu Baolu wrote: >> The intention of this change is to fix below kernel panic when >> USB_ULPI_BUS was configured as buildin. > That is actually incorrect. Having the bus build-in does not cause > this panic.. > >> [0.746856] kernel BUG at drivers/base/driver.c:153! >> [0.752418] invalid opcode: 0000 [#1] PREEMPT SMP >> [0.757804] Modules linked in: >> [0.893985] Call Trace: >> [0.896729] [] ? ulpi_register_driver+0x21/0x30 >> [0.903654] [] tusb1210_driver_init+0x10/0x12 >> [0.910386] [] do_one_initcall+0xd8/0x200 >> [0.916729] [] kernel_init_freeable+0x196/0x21e >> [0.923655] [] ? rest_init+0x90/0x90 >> [0.929509] [] kernel_init+0xe/0xf0 >> [0.935266] [] ret_from_fork+0x42/0x70 >> [0.941315] [] ? rest_init+0x90/0x90 > This happens if the PHY drivers are build-in. If the bus is build-in, > but the drivers are modules, you are still fine. I ever tried the config of bus "=y" and driver "=n". It results in panic as well. The call trace looks like below. 1.058876] [] device_add+0x402/0x640 [1.064829] [] device_register+0x1e/0x30 [1.071072] [] ulpi_register_interface+0x14c/0x1f0 [1.078291] [] dwc3_ulpi_init+0x24/0x60 [1.084437] [] dwc3_probe+0x802/0x1650 [1.090487] [] platform_drv_probe+0x34/0xa0 [1.097022] [] driver_probe_device+0x209/0x4b0 [1.103850] [] ? driver_probe_device+0x4b0/0x4b0 [1.110871] [] __device_attach+0x3b/0x40 [1.117114] [] bus_for_each_drv+0x63/0xa0 [1.123454] [] device_attach+0x98/0xb0 [1.129503] [] bus_probe_device+0xa0/0xc0 [1.135843] [] device_add+0x46f/0x640 [1.141799] [] ? __insert_resource+0x60/0x150 [1.148530] [] platform_device_add+0xd0/0x2b0 [1.155260] [] dwc3_pci_probe+0xf6/0x2c0 [1.161505] [] pci_device_probe+0x8c/0xf0 [1.167846] [] driver_probe_device+0x209/0x4b0 [1.174673] [] __driver_attach+0x9b/0xa0 [1.180917] [] ? __device_attach+0x40/0x40 [1.187354] [] bus_for_each_dev+0x6b/0xb0 [1.193694] [] driver_attach+0x1e/0x20 [1.199742] [] bus_add_driver+0x180/0x250 [1.206086] [] ? ftrace_define_fields_dwc3_log_trb+0x126/0x126 [1.214474] [] driver_register+0x64/0xf0 [1.220718] [] __pci_register_driver+0x4b/0x50 [1.227546] [] dwc3_pci_driver_init+0x19/0x1b [1.234277] [] do_one_initcall+0xd8/0x200 [1.240619] [] kernel_init_freeable+0x196/0x21e [1.247545] [] ? rest_init+0x90/0x90 [1.253399] [] kernel_init+0xe/0xf0 [1.259156] [] ret_from_fork+0x42/0x70 [1.265205] [] ? rest_init+0x90/0x90 > > Maybe it would have been better to explain that this is addressing an > issue with the execution sequence, and consider Sasha's patch as the > actual fix for panic. Fair enough. I will resend the patch. > > > Thanks guys, > Thanks, Baolu