]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/s390/pci/pci.c
Merge remote-tracking branch 'pci/next'
[karo-tx-linux.git] / arch / s390 / pci / pci.c
index 4859c401b75e9cd82ad14e9a4263208745eeab60..66670ff262a0b5b722aa2f20418f1dae3c2e389f 100644 (file)
@@ -919,17 +919,23 @@ static void zpci_mem_exit(void)
        kmem_cache_destroy(zdev_fmb_cache);
 }
 
-static unsigned int s390_pci_probe;
+static unsigned int s390_pci_probe = 1;
+static unsigned int s390_pci_initialized;
 
 char * __init pcibios_setup(char *str)
 {
-       if (!strcmp(str, "on")) {
-               s390_pci_probe = 1;
+       if (!strcmp(str, "off")) {
+               s390_pci_probe = 0;
                return NULL;
        }
        return str;
 }
 
+bool zpci_is_enabled(void)
+{
+       return s390_pci_initialized;
+}
+
 static int __init pci_base_init(void)
 {
        int rc;
@@ -961,6 +967,7 @@ static int __init pci_base_init(void)
        if (rc)
                goto out_find;
 
+       s390_pci_initialized = 1;
        return 0;
 
 out_find:
@@ -978,5 +985,6 @@ subsys_initcall_sync(pci_base_init);
 
 void zpci_rescan(void)
 {
-       clp_rescan_pci_devices_simple();
+       if (zpci_is_enabled())
+               clp_rescan_pci_devices_simple();
 }