fhc led registration warnings
While booting todays 2.6.29-rc1+git on E3500, these warning about FHC LEDs sysfs registration appeared in the logs. I sent the previous mail away and decided to send this one separately, but now I see that the location of platform-specific device registrations js the same where CPU detection problem were, so maybe they are related afterall.
[ 136.437166] WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x44/0x60() [ 136.437226] sysfs: duplicate filename 'sunfire-fhc-leds.0' can not be created [ 136.437288] Modules linked in: [ 136.437343] Call Trace: [ 136.437407] [000000000045c8cc] warn_slowpath+0x6c/0xc0 [ 136.437467] [0000000000541a04] sysfs_add_one+0x44/0x60 [ 136.437530] [0000000000542d4c] sysfs_do_create_link+0x12c/0x1a0 [ 136.437595] [0000000000542e1c] sysfs_create_link+0x1c/0x40 [ 136.437660] [00000000005ed544] bus_add_device+0xe4/0x180 [ 136.437735] [00000000005eb8e0] device_add+0x300/0x540 [ 136.437800] [00000000005efb30] platform_device_add+0xd0/0x1e0 [ 136.437865] [00000000005efc58] platform_device_register+0x18/0x40 [ 136.437941] [00000000006c5744] fhc_probe+0xf8/0x264 [ 136.438016] [0000000000627170] of_platform_device_probe+0x50/0xe0 [ 136.438082] [00000000005ee23c] driver_probe_device+0x9c/0x1c0 [ 136.438145] [00000000005ee3e4] __driver_attach+0x84/0xa0 [ 136.438205] [00000000005ed998] bus_for_each_dev+0x58/0xa0 [ 136.438267] [00000000005ee080] driver_attach+0x20/0x40 [ 136.438326] [00000000005ed16c] bus_add_driver+0xac/0x240 [ 136.438387] [00000000005ee648] driver_register+0x68/0x160 [ 136.438604] ---[ end trace 139ce121c98e96c9 ]--- [ 136.439011] fhc: Could not register LEDS platform device [ 136.439104] fhc: probe of f0071c1c failed with error -17 [ 136.439296] ------------[ cut here ]------------ [ 136.439351] WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x44/0x60() [ 136.439413] sysfs: duplicate filename 'sunfire-fhc-leds.0' can not be created [ 136.439474] Modules linked in: [ 136.439525] Call Trace: [ 136.439576] [000000000045c8cc] warn_slowpath+0x6c/0xc0 [ 136.439636] [0000000000541a04] sysfs_add_one+0x44/0x60 [ 136.439696] [0000000000542d4c] sysfs_do_create_link+0x12c/0x1a0 [ 136.439761] [0000000000542e1c] sysfs_create_link+0x1c/0x40 [ 136.439822] [00000000005ed544] bus_add_device+0xe4/0x180 [ 136.439888] [00000000005eb8e0] device_add+0x300/0x540 [ 136.439949] [00000000005efb30] platform_device_add+0xd0/0x1e0 [ 136.440015] [00000000005efc58] platform_device_register+0x18/0x40 [ 136.440082] [00000000006c5744] fhc_probe+0xf8/0x264 [ 136.440147] [0000000000627170] of_platform_device_probe+0x50/0xe0 [ 136.440212] [00000000005ee23c] driver_probe_device+0x9c/0x1c0 [ 136.440276] [00000000005ee3e4] __driver_attach+0x84/0xa0 [ 136.440337] [00000000005ed998] bus_for_each_dev+0x58/0xa0 [ 136.440398] [00000000005ee080] driver_attach+0x20/0x40 [ 136.440458] [00000000005ed16c] bus_add_driver+0xac/0x240 [ 136.440520] [00000000005ee648] driver_register+0x68/0x160 [ 136.440576] ---[ end trace 139ce121c98e96ca ]--- [ 136.440982] fhc: Could not register LEDS platform device [ 136.441070] fhc: probe of f01c923c failed with error -17
Signature · 1 line
Meelis Roos ([email protected])
Quoted 6 lines · Meelis Roos
While booting todays 2.6.29-rc1+git on E3500, these warning about FHC LEDs sysfs registration appeared in the logs. I sent the previous mail away and decided to send this one separately, but now I see that the location of platform-specific device registrations js the same where CPU detection problem were, so maybe they are related afterall.
There were two interesting lines above these.
[ 136.436067] fhc: Board #1, Version[1] PartID[fa0] Manuf[3e] (Central) [ 136.436823] fhc: Board #3, Version[1] PartID[fa0] Manuf[3e] (JTAG Master)
Quoted 2 lines
[ 136.437166] WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x44/0x60() [ 136.437226] sysfs: duplicate filename 'sunfire-fhc-leds.0' can not be created
So it looks like we:
1) Only finds two where we found four with the older kernel according to your other mail where you said:
===
Btw, these fhc messages appear later in boot process than before. Before the boards were detected just after 'Booting Linux':
Booting Linux...
CENTRAL: Detected 5 slot Enterprise system. cfreg[68] cver[78] FHC(board 1): Version[1] PartID[fa0] Manuf[3e] (CENTRAL) FHC(board 3): Version[1] PartID[fa0] Manuf[3e] (JTAG Master) FHC(board 1): Version[1] PartID[fa0] Manuf[3e]
FHC(board 7): Version[1] PartID[fa0] Manuf[3e]
==
And it looks like we try to create two entires in sysfs with the same name.
Davind did some changes in this part of the code base, so I hope he can spot it.
I did not find anything obvious.
Sam
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Fri, 16 Jan 2009 21:48:32 +0100
Quoted 2 lines
David did some changes in this part of the code base, so I hope he can spot it.
I definitely introduced these bugs and will look into it :-)
David Miller
maintainerFrom: Meelis Roos <[email protected]>
Date: Fri, 16 Jan 2009 13:02:33 +0200 (EET)
Quoted 8 lines
While booting todays 2.6.29-rc1+git on E3500, these warning about FHC LEDs sysfs registration appeared in the logs. I sent the previous mail away and decided to send this one separately, but now I see that the location of platform-specific device registrations js the same where CPU detection problem were, so maybe they are related afterall.
[ 136.437166] WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x44/0x60() [ 136.437226] sysfs: duplicate filename 'sunfire-fhc-leds.0' can not be created
Does this patch fix the problem?
sparc64: Initialize FHC/CLOCK LED platform_device 'id' field correctly.
There is only one clock board, so use -1 as the 'id' so we get just the base name as the LED device name string.
There are multiple FHC boards potentially in a system so use the board number as the 'id' value for that case.
Based upon a bug report from Meelis Roos.
arch/sparc/kernel/central.c +2 -0
@@ -103,6 +103,7 @@ static int __devinit clock_board_probe(struct of_device *op, p->leds_resource.name ="leds" ; p->leds_pdev.name ="sunfire-clockboard-leds" ; + p->leds_pdev.id =-1 ; p->leds_pdev.resource = &p->leds_resource; p->leds_pdev.num_resources =1 ; p->leds_pdev.dev.parent = &op->dev;
@@ -197,6 +198,7 @@ static int __devinit fhc_probe(struct of_device *op, p->leds_resource.name ="leds" ; p->leds_pdev.name ="sunfire-fhc-leds" ; + p->leds_pdev.id = p->board_num; p->leds_pdev.resource = &p->leds_resource; p->leds_pdev.num_resources =1 ; p->leds_pdev.dev.parent = &op->dev;
Quoted 3 lines
Does this patch fix the problem?
sparc64: Initialize FHC/CLOCK LED
platform_device'id' field correctly.
Yes, than you very much!
[ 135.931836] fhc: Board #1, Version[1] PartID[fa0] Manuf[3e] (Central) [ 135.932612] fhc: Board #3, Version[1] PartID[fa0] Manuf[3e] (JTAG Master) [ 135.933390] fhc: Board #1, Version[1] PartID[fa0] Manuf[3e] [ 135.934172] fhc: Board #7, Version[1] PartID[fa0] Manuf[3e] [ 135.935570] clock_board: Detected 5 slot Enterprise system.
$ ls -l /sys/bus/platform/devices/ total 0 lrwxrwxrwx 1 root root 0 2009-01-19 09:04 rtc-m48t59.0 -> ../../../devices/platform/rtc-m48t59.0 lrwxrwxrwx 1 root root 0 2009-01-19 09:04 sunfire-clockboard- -> ../../../devices/root/f005da70/f005db8c/f005e05c/sunfire-clockboard- lrwxrwxrwx 1 root root 0 2009-01-19 09:04 sunfire-fhc-leds.1 -> ../../../devices/root/f0071c1c/sunfire-fhc-leds.1 lrwxrwxrwx 1 root root 0 2009-01-19 09:04 sunfire-fhc-leds.3 -> ../../../devices/root/f00df7bc/sunfire-fhc-leds.3 lrwxrwxrwx 1 root root 0 2009-01-19 09:04 sunfire-fhc-leds.7 -> ../../../devices/root/f01c923c/sunfire-fhc-leds.7
With Sams 2 patches and this path, my E3500 seems to work fine again.
Signature · 1 line
Meelis Roos ([email protected])
David Miller
maintainerFrom: Meelis Roos <[email protected]>
Date: Mon, 19 Jan 2009 09:49:54 +0200 (EET)
Quoted 11 lines
Quoted 3 lines
Does this patch fix the problem?
sparc64: Initialize FHC/CLOCK LED
platform_device'id' field correctly.Yes, than you very much!
[ 135.931836] fhc: Board #1, Version[1] PartID[fa0] Manuf[3e] (Central) [ 135.932612] fhc: Board #3, Version[1] PartID[fa0] Manuf[3e] (JTAG Master) [ 135.933390] fhc: Board #1, Version[1] PartID[fa0] Manuf[3e] [ 135.934172] fhc: Board #7, Version[1] PartID[fa0] Manuf[3e] [ 135.935570] clock_board: Detected 5 slot Enterprise system.
...
Quoted 1 line
With Sams 2 patches and this path, my E3500 seems to work fine again.
Thank you for testing.