]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Apr 2012 17:37:50 +0000 (10:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Apr 2012 17:37:50 +0000 (10:37 -0700)
added patches:
mtd-block2mtd-initialize-writebufsize.patch
mtd-lart-initialize-writebufsize.patch
mtd-m25p80-set-writebufsize.patch
mtd-sst25l-initialize-writebufsize.patch

queue-3.0/mtd-block2mtd-initialize-writebufsize.patch [new file with mode: 0644]
queue-3.0/mtd-lart-initialize-writebufsize.patch [new file with mode: 0644]
queue-3.0/mtd-m25p80-set-writebufsize.patch [new file with mode: 0644]
queue-3.0/mtd-sst25l-initialize-writebufsize.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/mtd-block2mtd-initialize-writebufsize.patch b/queue-3.0/mtd-block2mtd-initialize-writebufsize.patch
new file mode 100644 (file)
index 0000000..38e39b0
--- /dev/null
@@ -0,0 +1,37 @@
+From b604387411ec6a072e95910099262616edd2bd2f Mon Sep 17 00:00:00 2001
+From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Date: Fri, 3 Feb 2012 09:32:44 +0200
+Subject: mtd: block2mtd: initialize writebufsize
+
+From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+
+commit b604387411ec6a072e95910099262616edd2bd2f upstream.
+
+The writebufsize concept was introduce by commit
+"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
+the maximum amount of data the device writes to the media at a time. This is
+an important parameter for UBIFS which is used during recovery and which
+basically defines how big a corruption caused by a power cut can be.
+
+However, we forgot to set this parameter for block2mtd. Set it to PAGE_SIZE
+because this is actually the amount of data we write at a time.
+
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Acked-by: Joern Engel <joern@lazybastard.org>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/devices/block2mtd.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/mtd/devices/block2mtd.c
++++ b/drivers/mtd/devices/block2mtd.c
+@@ -284,6 +284,7 @@ static struct block2mtd_dev *add_device(
+       dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
+       dev->mtd.erasesize = erase_size;
+       dev->mtd.writesize = 1;
++      dev->mtd.writebufsize = PAGE_SIZE;
+       dev->mtd.type = MTD_RAM;
+       dev->mtd.flags = MTD_CAP_RAM;
+       dev->mtd.erase = block2mtd_erase;
diff --git a/queue-3.0/mtd-lart-initialize-writebufsize.patch b/queue-3.0/mtd-lart-initialize-writebufsize.patch
new file mode 100644 (file)
index 0000000..3e02ca0
--- /dev/null
@@ -0,0 +1,35 @@
+From fcc44a07dae0af16e84e93425fc8afe642ddc603 Mon Sep 17 00:00:00 2001
+From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Date: Fri, 3 Feb 2012 09:53:28 +0200
+Subject: mtd: lart: initialize writebufsize
+
+From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+
+commit fcc44a07dae0af16e84e93425fc8afe642ddc603 upstream.
+
+The writebufsize concept was introduce by commit
+"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
+the maximum amount of data the device writes to the media at a time. This is
+an important parameter for UBIFS which is used during recovery and which
+basically defines how big a corruption caused by a power cut can be.
+
+Set writebufsize to 4 because this drivers writes at max 4 bytes at a time.
+
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/devices/lart.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/mtd/devices/lart.c
++++ b/drivers/mtd/devices/lart.c
+@@ -636,6 +636,7 @@ static int __init lart_flash_init (void)
+    mtd.name = module_name;
+    mtd.type = MTD_NORFLASH;
+    mtd.writesize = 1;
++   mtd.writebufsize = 4;
+    mtd.flags = MTD_CAP_NORFLASH;
+    mtd.size = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM + FLASH_BLOCKSIZE_MAIN * FLASH_NUMBLOCKS_16m_MAIN;
+    mtd.erasesize = FLASH_BLOCKSIZE_MAIN;
diff --git a/queue-3.0/mtd-m25p80-set-writebufsize.patch b/queue-3.0/mtd-m25p80-set-writebufsize.patch
new file mode 100644 (file)
index 0000000..6ce1d52
--- /dev/null
@@ -0,0 +1,35 @@
+From b54f47c8bcfc5f766bf13ec31bd7dd1d4726d33b Mon Sep 17 00:00:00 2001
+From: Brian Norris <computersforpeace@gmail.com>
+Date: Tue, 31 Jan 2012 00:06:03 -0800
+Subject: mtd: m25p80: set writebufsize
+
+From: Brian Norris <computersforpeace@gmail.com>
+
+commit b54f47c8bcfc5f766bf13ec31bd7dd1d4726d33b upstream.
+
+Using UBI on m25p80 can give messages like:
+
+    UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit
+
+We need to initialize writebufsize; I think "page_size" is the correct
+"bufsize", although I'm not sure. Comments?
+
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/devices/m25p80.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -930,6 +930,7 @@ static int __devinit m25p_probe(struct s
+       flash->mtd.dev.parent = &spi->dev;
+       flash->page_size = info->page_size;
++      flash->mtd.writebufsize = flash->page_size;
+       if (info->addr_width)
+               flash->addr_width = info->addr_width;
diff --git a/queue-3.0/mtd-sst25l-initialize-writebufsize.patch b/queue-3.0/mtd-sst25l-initialize-writebufsize.patch
new file mode 100644 (file)
index 0000000..853bf44
--- /dev/null
@@ -0,0 +1,36 @@
+From c4cc625ea5958d065c21cc0fcea29e9ed8f3d2bc Mon Sep 17 00:00:00 2001
+From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Date: Fri, 3 Feb 2012 10:16:50 +0200
+Subject: mtd: sst25l: initialize writebufsize
+
+From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+
+commit c4cc625ea5958d065c21cc0fcea29e9ed8f3d2bc upstream.
+
+The writebufsize concept was introduce by commit
+"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
+the maximum amount of data the device writes to the media at a time. This is
+an important parameter for UBIFS which is used during recovery and which
+basically defines how big a corruption caused by a power cut can be.
+
+Set writebufsize to the flash page size because it is the maximum amount of
+data it writes at a time.
+
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/devices/sst25l.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/mtd/devices/sst25l.c
++++ b/drivers/mtd/devices/sst25l.c
+@@ -406,6 +406,7 @@ static int __devinit sst25l_probe(struct
+       flash->mtd.flags        = MTD_CAP_NORFLASH;
+       flash->mtd.erasesize    = flash_info->erase_size;
+       flash->mtd.writesize    = flash_info->page_size;
++      flash->mtd.writebufsize = flash_info->page_size;
+       flash->mtd.size         = flash_info->page_size * flash_info->nr_pages;
+       flash->mtd.erase        = sst25l_erase;
+       flash->mtd.read         = sst25l_read;
index 6f355cc4571ce3994c9a5f33cc663af2c55b9199..250e84e6983e4cfcd2f42bbabdf178539a8ea692 100644 (file)
@@ -1,3 +1,7 @@
 x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch
 rose_dev-fix-memcpy-bug-in-rose_set_mac_address.patch
 net-usb-cdc_eem-fix-mtu.patch
+mtd-sst25l-initialize-writebufsize.patch
+mtd-block2mtd-initialize-writebufsize.patch
+mtd-lart-initialize-writebufsize.patch
+mtd-m25p80-set-writebufsize.patch