• Wei Yang's avatar
    powerpc/eeh: Skip eeh sysfs when eeh is disabled · 2213fb14
    Wei Yang authored
    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: default avatarWei Yang <weiyang@linux.vnet.ibm.com>
    Acked-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    2213fb14
eeh_sysfs.c 3.28 KB