diff options
-rw-r--r-- | drivers/block/cciss.c | 8 | ||||
-rw-r--r-- | drivers/block/cciss.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 4a49d7972126..8bcd6c498c60 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -468,6 +468,9 @@ static int cciss_open(struct inode *inode, struct file *filep) | |||
468 | printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name); | 468 | printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name); |
469 | #endif /* CCISS_DEBUG */ | 469 | #endif /* CCISS_DEBUG */ |
470 | 470 | ||
471 | if (host->busy_initializing) | ||
472 | return -EBUSY; | ||
473 | |||
471 | /* | 474 | /* |
472 | * Root is allowed to open raw volume zero even if it's not configured | 475 | * Root is allowed to open raw volume zero even if it's not configured |
473 | * so array config can still work. Root is also allowed to open any | 476 | * so array config can still work. Root is also allowed to open any |
@@ -2742,6 +2745,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
2742 | i = alloc_cciss_hba(); | 2745 | i = alloc_cciss_hba(); |
2743 | if(i < 0) | 2746 | if(i < 0) |
2744 | return (-1); | 2747 | return (-1); |
2748 | |||
2749 | hba[i]->busy_initializing = 1; | ||
2750 | |||
2745 | if (cciss_pci_init(hba[i], pdev) != 0) | 2751 | if (cciss_pci_init(hba[i], pdev) != 0) |
2746 | goto clean1; | 2752 | goto clean1; |
2747 | 2753 | ||
@@ -2864,6 +2870,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
2864 | add_disk(disk); | 2870 | add_disk(disk); |
2865 | } | 2871 | } |
2866 | 2872 | ||
2873 | hba[i]->busy_initializing = 0; | ||
2867 | return(1); | 2874 | return(1); |
2868 | 2875 | ||
2869 | clean4: | 2876 | clean4: |
@@ -2884,6 +2891,7 @@ clean2: | |||
2884 | clean1: | 2891 | clean1: |
2885 | release_io_mem(hba[i]); | 2892 | release_io_mem(hba[i]); |
2886 | free_hba(i); | 2893 | free_hba(i); |
2894 | hba[i]->busy_initializing = 0; | ||
2887 | return(-1); | 2895 | return(-1); |
2888 | } | 2896 | } |
2889 | 2897 | ||
diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h index 566587d0a500..11ee83504b38 100644 --- a/drivers/block/cciss.h +++ b/drivers/block/cciss.h | |||
@@ -83,6 +83,7 @@ struct ctlr_info | |||
83 | int nr_allocs; | 83 | int nr_allocs; |
84 | int nr_frees; | 84 | int nr_frees; |
85 | int busy_configuring; | 85 | int busy_configuring; |
86 | int busy_initializing; | ||
86 | 87 | ||
87 | /* This element holds the zero based queue number of the last | 88 | /* This element holds the zero based queue number of the last |
88 | * queue to be started. It is used for fairness. | 89 | * queue to be started. It is used for fairness. |