summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-09-23 22:11:05 -0700
committerOlof Johansson <olof@lixom.net>2014-09-23 22:11:25 -0700
commit8adc36bcd374dc7381d15e654215dd1f548ccbef (patch)
treeafc86512891f75b04efa0273694a977a77529a86 /drivers/block
parent96bdd9aeb2cbc5eaae586f4d43badd072611fcb1 (diff)
parentd27704d1ec2f9ba06247b402c58a6f2febecef78 (diff)
Merge tag 'dt-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt
Merge "omap dts changes for v3.18 merge window" from Tony Lindgren: Changes for .dts files for omaps for v3.18 merge window: - Updates for gta04 to add gta04a3 model - Add support for Tehnexion TAO3530 boards - Regulator names for beaglebone - Pinctrl related updates for omap5, dra7 and am437 - Model name fix for sbc-t54 - Enable mailbox for various omaps * tag 'dt-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (291 commits) ARM: dts: OMAP2+: Add sub mailboxes device node information ARM: dts: dra7-evm: Mark uart1 rxd as wakeup capable ARM: dts: OMAP5 / DRA7: switch over to interrupts-extended property for UART ARM: dts: AM437x: switch to compatible pinctrl ARM: dts: DRA7: switch to compatible pinctrl ARM: dts: OMAP5: switch to compatible pinctrl ARM: dts: am335x-boneblack: Add names for remaining regulators ARM: dts: sbc-t54: fix model property ARM: dts: omap5.dtsi: add DSS RFBI node ARM: dts: omap3: Add HEAD acoustics omap3-ha.dts and omap3-ha-lcd.dts (TAO3530 based) ARM: dts: omap3: Add Technexion Thunder support (TAO3530 SOM based) ARM: dts: omap3: Add Technexion TAO3530 SOM omap3-tao3530.dtsi ARM: OMAP2+: tao3530: Add pdata-quirk for the mmc2 internal clock ARM: OMAP2+: board-generic: add support for AM57xx family ARM: dts: dra72-evm: Add tps65917 PMIC node ARM: dts: dra72-evm: Enable I2C1 node Linux 3.17-rc3 unicore32: Fix build error vexpress/spc: fix a build warning on array bounds spi: sh-msiof: Fix transmit-only DMA transfers ... Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/brd.c6
-rw-r--r--drivers/block/xsysace.c1
-rw-r--r--drivers/block/zram/zram_drv.c10
-rw-r--r--drivers/block/zram/zram_drv.h2
4 files changed, 13 insertions, 6 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index c7d138eca731..3598110d2cef 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -442,12 +442,15 @@ static int rd_nr;
int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
static int max_part;
static int part_shift;
+static int part_show = 0;
module_param(rd_nr, int, S_IRUGO);
MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices");
module_param(rd_size, int, S_IRUGO);
MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
module_param(max_part, int, S_IRUGO);
MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk");
+module_param(part_show, int, S_IRUGO);
+MODULE_PARM_DESC(part_show, "Control RAM disk visibility in /proc/partitions");
MODULE_LICENSE("GPL");
MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
MODULE_ALIAS("rd");
@@ -501,7 +504,8 @@ static struct brd_device *brd_alloc(int i)
disk->fops = &brd_fops;
disk->private_data = brd;
disk->queue = brd->brd_queue;
- disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
+ if (!part_show)
+ disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
sprintf(disk->disk_name, "ram%d", i);
set_capacity(disk, rd_size * 2);
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index ab3ea62e5dfc..c4328d9d9981 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1203,7 +1203,6 @@ static struct platform_driver ace_platform_driver = {
.probe = ace_probe,
.remove = ace_remove,
.driver = {
- .owner = THIS_MODULE,
.name = "xsysace",
.of_match_table = ace_of_match,
},
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index dfa4024c448a..d00831c3d731 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -378,7 +378,6 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
/* Should NEVER happen. Return bio error if it does. */
if (unlikely(ret)) {
pr_err("Decompression failed! err=%d, page=%u\n", ret, index);
- atomic64_inc(&zram->stats.failed_reads);
return ret;
}
@@ -547,8 +546,6 @@ out:
zcomp_strm_release(zram->comp, zstrm);
if (is_partial_io(bvec))
kfree(uncmem);
- if (ret)
- atomic64_inc(&zram->stats.failed_writes);
return ret;
}
@@ -566,6 +563,13 @@ static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index,
ret = zram_bvec_write(zram, bvec, index, offset);
}
+ if (unlikely(ret)) {
+ if (rw == READ)
+ atomic64_inc(&zram->stats.failed_reads);
+ else
+ atomic64_inc(&zram->stats.failed_writes);
+ }
+
return ret;
}
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index 5b0afde729cd..e0f725c87cc6 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -84,7 +84,7 @@ struct zram_stats {
atomic64_t compr_data_size; /* compressed size of pages stored */
atomic64_t num_reads; /* failed + successful */
atomic64_t num_writes; /* --do-- */
- atomic64_t failed_reads; /* should NEVER! happen */
+ atomic64_t failed_reads; /* can happen when memory is too low */
atomic64_t failed_writes; /* can happen when memory is too low */
atomic64_t invalid_io; /* non-page-aligned I/O requests */
atomic64_t notify_free; /* no. of swap slot free notifications */