]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/eeh: Skip eeh sysfs when eeh is disabled
authorWei Yang <weiyang@linux.vnet.ibm.com>
Wed, 4 Jun 2014 01:49:17 +0000 (09:49 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 5 Jun 2014 03:20:38 +0000 (13:20 +1000)
commita785110ff0c04338a3c3863da56c6da1695e4c19
treef619b6979d9180a6dab550af0fce14de488e0942
parent846ef85df8f363f37bb6a2983976e1e7b7dc5242
powerpc/eeh: Skip eeh sysfs when eeh is disabled

When eeh is not enabled, and hotplug two pci devices on the same bus, eeh
related sysfs would be added twice for the first added pci device. Since the
eeh_dev is not created when eeh is not enabled.

This patch adds the check, if eeh is not enabled, eeh sysfs will not be
created.

After applying this patch, following warnings are reduced:

sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:00.0/eeh_mode'
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:00.0/eeh_config_addr'
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:00.0/eeh_pe_config_addr'

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/eeh_sysfs.c