--- /dev/null
+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;
--- /dev/null
+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;
--- /dev/null
+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;
--- /dev/null
+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;
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