From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: CONFIG_FIXED_PHY breaks fec on arm/mx51 Date: Thu, 5 Aug 2010 17:17:32 +0200 Message-ID: <20100805151732.GA14527@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Bryan Wu , Andy Whitcroft , Amit Kucheria , Stefan Bader To: netdev@vger.kernel.org Return-path: Received: from metis.ext.pengutronix.de ([92.198.50.35]:54149 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756019Ab0HEPRe (ORCPT ); Thu, 5 Aug 2010 11:17:34 -0400 Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: Hello, when I enable CONFIG_FIXED_PHY my mx51evm board fails to initialize the fec network device. The relevant kernel log is: ... Fixed MDIO Bus: probed FEC Ethernet Driver ------------[ cut here ]------------ WARNING: at /ptx/work/octopus/WORK_2_A/ukl/backup/gsrc/linux-2.6/fs/sy= sfs/dir.c:451 sysfs_add_one+0x6c/0x8c() sysfs: cannot create duplicate filename '/class/mdio_bus/0' Modules linked in: Backtrace:=20 [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+= 0x18/0x1c) r7:df839d60 r6:c00db380 r5:c03434df r4:000001c3 [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_co= mmon+0x58/0x88) [] (warn_slowpath_common+0x0/0x88) from [] (warn_s= lowpath_fmt+0x38/0x40) r8:df84a480 r7:ffffffef r6:df839db0 r5:df811000 r4:df8dc600 [] (warn_slowpath_fmt+0x0/0x40) from [] (sysfs_add= _one+0x6c/0x8c) r3:df811000 r2:c0343523 [] (sysfs_add_one+0x0/0x8c) from [] (sysfs_do_crea= te_link+0xfc/0x1c8) r7:df8e8648 r6:00000000 r5:df8dc600 r4:df8dc570 [] (sysfs_do_create_link+0x0/0x1c8) from [] (sysfs= _create_link+0x14/0x18) [] (sysfs_create_link+0x0/0x18) from [] (device_ad= d+0x198/0x520) [] (device_add+0x0/0x520) from [] (device_register= +0x20/0x24) [] (device_register+0x0/0x24) from [] (mdiobus_reg= ister+0x90/0x178) r4:df8e8600 [] (mdiobus_register+0x0/0x178) from [] (fec_probe= +0x39c/0x48c) [] (fec_probe+0x0/0x48c) from [] (platform_drv_pro= be+0x20/0x24) [] (platform_drv_probe+0x0/0x24) from [] (driver_p= robe_device+0xb0/0x188) [] (driver_probe_device+0x0/0x188) from [] (__driv= er_attach+0x6c/0x90) r7:df839f00 r6:c03abe0x58/0x98) r6:c03abe08 r5:c01e3fa0 r4:00000000 [] (bus_for_each_dev+0x0/0x98) from [] (driver_att= ach+0x20/0x28) r7:df8db1e0 r6:c03abe08 r5:c03abe08 r4:c001e498 [] (driver_attach+0x0/0x28) from [] (bus_add_drive= r+0xa4/0x228) [] (bus_add_driver+0x0/0x228) from [] (driver_regi= ster+0xc8/0x154) [] (driver_register+0x0/0x154) from [] (platform_d= river_register+0x4c/0x60) r8:00000000 r7:00000000 r6:c00187a8 r5:c001e4f8 r4:c001e498 [] (platform_driver_register+0x0/0x60) from [] (fe= c_enet_module_init+0x1c/0x28) [] (fec_enet_module_init+0x0/0x28) from [] (do_one= _initcall+0x64/0x1c4) [] (do_one_initcall+0x0/0x1c4) from [] (kernel_ini= t+0xa0/0x154) r7:00000013 r6:c003a7dc r5:c001e4f8 r4:c001e498 [] (kernel_init+0x0/0x154) from [] (do_exit+0x0/0x= 564) r5:c0008554 r4:00000000 ---[ end trace 1220371fd8e97d24 ]--- mii_bus 0 failed to register ... As far as I understand the problem this is just that both drivers (drivers/net/phy/fixed.c and drivers/net/fec.c) try to register a mdio_bus with the same number. There isn't a mechanism to circumvent this problem, e.g. some auto-increment logic that just isn't used, is there? The people from Ubuntu had the same problem (Cc:d): http://kernel.ubuntu.com/git?p=3Dubuntu/ubuntu-lucid.git;a=3Dcommitdiff= ;h=3D0e5e6e2a981eeab61dcc184d51ab769a33af6589 (I used Linus' tree as of today (3a09b1be53d2) plus a few unrelated patches with mx51_defconfig.) Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig = | Industrial Linux Solutions | http://www.pengutronix.de/= |