mmc_block: Increase max_devices and set MMC_BLOCK_MINORS to 256 (Closes: #765621)
svn path=/dists/sid/linux/; revision=21975
This commit is contained in:
parent
8e1020e9f4
commit
44ff4a9061
|
@ -6,6 +6,8 @@ linux (3.16.5-2) UNRELEASED; urgency=medium
|
||||||
* [i386/486] Update description to say that the processor must have a TSC
|
* [i386/486] Update description to say that the processor must have a TSC
|
||||||
(see #766105)
|
(see #766105)
|
||||||
* [x86] r8723au: Backport changes up to Linux 3.17 (Closes: #765685)
|
* [x86] r8723au: Backport changes up to Linux 3.17 (Closes: #765685)
|
||||||
|
* mmc_block: Increase max_devices and set MMC_BLOCK_MINORS to 256
|
||||||
|
(Closes: #765621)
|
||||||
|
|
||||||
[ Mauricio Faria de Oliveira ]
|
[ Mauricio Faria de Oliveira ]
|
||||||
* [ppc64el] Disable CONFIG_CMDLINE{,_BOOL} usage for setting consoles
|
* [ppc64el] Disable CONFIG_CMDLINE{,_BOOL} usage for setting consoles
|
||||||
|
|
|
@ -2189,7 +2189,7 @@ CONFIG_SENSORS_LIS3_I2C=m
|
||||||
##
|
##
|
||||||
## file: drivers/mmc/card/Kconfig
|
## file: drivers/mmc/card/Kconfig
|
||||||
##
|
##
|
||||||
CONFIG_MMC_BLOCK_MINORS=8
|
CONFIG_MMC_BLOCK_MINORS=256
|
||||||
CONFIG_MMC_BLOCK_BOUNCE=y
|
CONFIG_MMC_BLOCK_BOUNCE=y
|
||||||
CONFIG_SDIO_UART=m
|
CONFIG_SDIO_UART=m
|
||||||
# CONFIG_MMC_TEST is not set
|
# CONFIG_MMC_TEST is not set
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
From: Ben Hutchings <ben@decadent.org.uk>
|
||||||
|
Date: Sun, 26 Oct 2014 02:09:23 +0000
|
||||||
|
Subject: mmc_block: Increase max_devices
|
||||||
|
Bug-Debian: https://bugs.debian.org/765621
|
||||||
|
|
||||||
|
Currently the driver imposes a limit of 256 total minor numbers,
|
||||||
|
apparently based on the historic Unix/Linux limit. This is quite
|
||||||
|
restrictive, particularly if we raise the maximum number of
|
||||||
|
partitions per card to 256 to match sd.
|
||||||
|
|
||||||
|
In order to make the full minor number space available we would
|
||||||
|
have to replace the static dev_use and name_use arrays with struct
|
||||||
|
ida. But we can at least allow use of 256 cards rather than just
|
||||||
|
256 minors, with only a small change.
|
||||||
|
|
||||||
|
---
|
||||||
|
--- a/drivers/mmc/card/block.c
|
||||||
|
+++ b/drivers/mmc/card/block.c
|
||||||
|
@@ -78,13 +78,16 @@ static int perdev_minors = CONFIG_MMC_BL
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We've only got one major, so number of mmcblk devices is
|
||||||
|
- * limited to 256 / number of minors per device.
|
||||||
|
+ * limited to (1 << 20) / number of minors per device. It is also
|
||||||
|
+ * currently limited by the size of the static bitmaps below.
|
||||||
|
*/
|
||||||
|
static int max_devices;
|
||||||
|
|
||||||
|
-/* 256 minors, so at most 256 separate devices */
|
||||||
|
-static DECLARE_BITMAP(dev_use, 256);
|
||||||
|
-static DECLARE_BITMAP(name_use, 256);
|
||||||
|
+#define MAX_DEVICES 256
|
||||||
|
+
|
||||||
|
+/* TODO: Replace these with struct ida */
|
||||||
|
+static DECLARE_BITMAP(dev_use, MAX_DEVICES);
|
||||||
|
+static DECLARE_BITMAP(name_use, MAX_DEVICES);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* There is one mmc_blk_data per slot.
|
||||||
|
@@ -2558,7 +2561,7 @@ static int __init mmc_blk_init(void)
|
||||||
|
if (perdev_minors != CONFIG_MMC_BLOCK_MINORS)
|
||||||
|
pr_info("mmcblk: using %d minors per device\n", perdev_minors);
|
||||||
|
|
||||||
|
- max_devices = 256 / perdev_minors;
|
||||||
|
+ max_devices = min(MAX_DEVICES, (1 << MINORBITS) / perdev_minors);
|
||||||
|
|
||||||
|
res = register_blkdev(MMC_BLOCK_MAJOR, "mmc");
|
||||||
|
if (res)
|
|
@ -388,3 +388,4 @@ bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch
|
||||||
bugfix/all/fold-swapping-d_name.hash-into-switch_names.patch
|
bugfix/all/fold-swapping-d_name.hash-into-switch_names.patch
|
||||||
bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch
|
bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch
|
||||||
bugfix/all/qla2xxx-fix-kernel-NULL-pointer-access.patch
|
bugfix/all/qla2xxx-fix-kernel-NULL-pointer-access.patch
|
||||||
|
features/all/mmc_block-increase-max_devices.patch
|
||||||
|
|
Loading…
Reference in New Issue