diff options
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e5e7d7856454..d1bb0e1d2d28 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -86,6 +86,10 @@ MODULE_ALIAS_SCSI_DEVICE(TYPE_DISK); | |||
86 | MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD); | 86 | MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD); |
87 | MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC); | 87 | MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC); |
88 | 88 | ||
89 | #define SD_PARTS 64 | ||
90 | #define SD_MINORS 16 | ||
91 | #define SD_EXT_MINORS (SD_PARTS - SD_MINORS) | ||
92 | |||
89 | static int sd_revalidate_disk(struct gendisk *); | 93 | static int sd_revalidate_disk(struct gendisk *); |
90 | static int sd_probe(struct device *); | 94 | static int sd_probe(struct device *); |
91 | static int sd_remove(struct device *); | 95 | static int sd_remove(struct device *); |
@@ -1801,7 +1805,7 @@ static int sd_probe(struct device *dev) | |||
1801 | if (!sdkp) | 1805 | if (!sdkp) |
1802 | goto out; | 1806 | goto out; |
1803 | 1807 | ||
1804 | gd = alloc_disk(16); | 1808 | gd = alloc_disk_ext(SD_MINORS, SD_EXT_MINORS); |
1805 | if (!gd) | 1809 | if (!gd) |
1806 | goto out_free; | 1810 | goto out_free; |
1807 | 1811 | ||
@@ -1845,7 +1849,8 @@ static int sd_probe(struct device *dev) | |||
1845 | 1849 | ||
1846 | gd->major = sd_major((index & 0xf0) >> 4); | 1850 | gd->major = sd_major((index & 0xf0) >> 4); |
1847 | gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00); | 1851 | gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00); |
1848 | gd->minors = 16; | 1852 | gd->minors = SD_MINORS; |
1853 | gd->ext_minors = SD_EXT_MINORS; | ||
1849 | gd->fops = &sd_fops; | 1854 | gd->fops = &sd_fops; |
1850 | 1855 | ||
1851 | if (index < 26) { | 1856 | if (index < 26) { |