aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS1
-rw-r--r--drivers/misc/mei/bus.c2
-rw-r--r--drivers/misc/mei/client.c20
-rw-r--r--drivers/nvmem/core.c4
-rw-r--r--drivers/nvmem/imx-ocotp.c2
-rw-r--r--drivers/nvmem/qfprom.c14
6 files changed, 24 insertions, 19 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index c0441ab2f8b0..5f0420a0da5b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5965,6 +5965,7 @@ F: drivers/media/platform/sti/hva
5965Hyper-V CORE AND DRIVERS 5965Hyper-V CORE AND DRIVERS
5966M: "K. Y. Srinivasan" <kys@microsoft.com> 5966M: "K. Y. Srinivasan" <kys@microsoft.com>
5967M: Haiyang Zhang <haiyangz@microsoft.com> 5967M: Haiyang Zhang <haiyangz@microsoft.com>
5968M: Stephen Hemminger <sthemmin@microsoft.com>
5968L: devel@linuxdriverproject.org 5969L: devel@linuxdriverproject.org
5969S: Maintained 5970S: Maintained
5970F: arch/x86/include/asm/mshyperv.h 5971F: arch/x86/include/asm/mshyperv.h
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 0037153c80a6..2d9c5dd06e42 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -450,7 +450,7 @@ bool mei_cldev_enabled(struct mei_cl_device *cldev)
450EXPORT_SYMBOL_GPL(mei_cldev_enabled); 450EXPORT_SYMBOL_GPL(mei_cldev_enabled);
451 451
452/** 452/**
453 * mei_cldev_enable_device - enable me client device 453 * mei_cldev_enable - enable me client device
454 * create connection with me client 454 * create connection with me client
455 * 455 *
456 * @cldev: me client device 456 * @cldev: me client device
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 391936c1aa04..b0395601c6ae 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -1541,7 +1541,7 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
1541 1541
1542 rets = first_chunk ? mei_cl_tx_flow_ctrl_creds(cl) : 1; 1542 rets = first_chunk ? mei_cl_tx_flow_ctrl_creds(cl) : 1;
1543 if (rets < 0) 1543 if (rets < 0)
1544 return rets; 1544 goto err;
1545 1545
1546 if (rets == 0) { 1546 if (rets == 0) {
1547 cl_dbg(dev, cl, "No flow control credentials: not sending.\n"); 1547 cl_dbg(dev, cl, "No flow control credentials: not sending.\n");
@@ -1575,11 +1575,8 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
1575 cb->buf.size, cb->buf_idx); 1575 cb->buf.size, cb->buf_idx);
1576 1576
1577 rets = mei_write_message(dev, &mei_hdr, buf->data + cb->buf_idx); 1577 rets = mei_write_message(dev, &mei_hdr, buf->data + cb->buf_idx);
1578 if (rets) { 1578 if (rets)
1579 cl->status = rets; 1579 goto err;
1580 list_move_tail(&cb->list, &cmpl_list->list);
1581 return rets;
1582 }
1583 1580
1584 cl->status = 0; 1581 cl->status = 0;
1585 cl->writing_state = MEI_WRITING; 1582 cl->writing_state = MEI_WRITING;
@@ -1587,14 +1584,21 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
1587 cb->completed = mei_hdr.msg_complete == 1; 1584 cb->completed = mei_hdr.msg_complete == 1;
1588 1585
1589 if (first_chunk) { 1586 if (first_chunk) {
1590 if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) 1587 if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) {
1591 return -EIO; 1588 rets = -EIO;
1589 goto err;
1590 }
1592 } 1591 }
1593 1592
1594 if (mei_hdr.msg_complete) 1593 if (mei_hdr.msg_complete)
1595 list_move_tail(&cb->list, &dev->write_waiting_list.list); 1594 list_move_tail(&cb->list, &dev->write_waiting_list.list);
1596 1595
1597 return 0; 1596 return 0;
1597
1598err:
1599 cl->status = rets;
1600 list_move_tail(&cb->list, &cmpl_list->list);
1601 return rets;
1598} 1602}
1599 1603
1600/** 1604/**
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 965911d9b36a..398ea7f54826 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -981,8 +981,8 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem,
981 * @cell: nvmem cell to be read. 981 * @cell: nvmem cell to be read.
982 * @len: pointer to length of cell which will be populated on successful read. 982 * @len: pointer to length of cell which will be populated on successful read.
983 * 983 *
984 * Return: ERR_PTR() on error or a valid pointer to a char * buffer on success. 984 * Return: ERR_PTR() on error or a valid pointer to a buffer on success. The
985 * The buffer should be freed by the consumer with a kfree(). 985 * buffer should be freed by the consumer with a kfree().
986 */ 986 */
987void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) 987void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
988{ 988{
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index ac27b9bac3b9..8e7b120696fa 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -71,7 +71,7 @@ static struct nvmem_config imx_ocotp_nvmem_config = {
71 71
72static const struct of_device_id imx_ocotp_dt_ids[] = { 72static const struct of_device_id imx_ocotp_dt_ids[] = {
73 { .compatible = "fsl,imx6q-ocotp", (void *)128 }, 73 { .compatible = "fsl,imx6q-ocotp", (void *)128 },
74 { .compatible = "fsl,imx6sl-ocotp", (void *)32 }, 74 { .compatible = "fsl,imx6sl-ocotp", (void *)64 },
75 { .compatible = "fsl,imx6sx-ocotp", (void *)128 }, 75 { .compatible = "fsl,imx6sx-ocotp", (void *)128 },
76 { }, 76 { },
77}; 77};
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index b5305f08b184..2bdb6c389328 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -21,11 +21,11 @@ static int qfprom_reg_read(void *context,
21 unsigned int reg, void *_val, size_t bytes) 21 unsigned int reg, void *_val, size_t bytes)
22{ 22{
23 void __iomem *base = context; 23 void __iomem *base = context;
24 u32 *val = _val; 24 u8 *val = _val;
25 int i = 0, words = bytes / 4; 25 int i = 0, words = bytes;
26 26
27 while (words--) 27 while (words--)
28 *val++ = readl(base + reg + (i++ * 4)); 28 *val++ = readb(base + reg + i++);
29 29
30 return 0; 30 return 0;
31} 31}
@@ -34,11 +34,11 @@ static int qfprom_reg_write(void *context,
34 unsigned int reg, void *_val, size_t bytes) 34 unsigned int reg, void *_val, size_t bytes)
35{ 35{
36 void __iomem *base = context; 36 void __iomem *base = context;
37 u32 *val = _val; 37 u8 *val = _val;
38 int i = 0, words = bytes / 4; 38 int i = 0, words = bytes;
39 39
40 while (words--) 40 while (words--)
41 writel(*val++, base + reg + (i++ * 4)); 41 writeb(*val++, base + reg + i++);
42 42
43 return 0; 43 return 0;
44} 44}
@@ -53,7 +53,7 @@ static int qfprom_remove(struct platform_device *pdev)
53static struct nvmem_config econfig = { 53static struct nvmem_config econfig = {
54 .name = "qfprom", 54 .name = "qfprom",
55 .owner = THIS_MODULE, 55 .owner = THIS_MODULE,
56 .stride = 4, 56 .stride = 1,
57 .word_size = 1, 57 .word_size = 1,
58 .reg_read = qfprom_reg_read, 58 .reg_read = qfprom_reg_read,
59 .reg_write = qfprom_reg_write, 59 .reg_write = qfprom_reg_write,