Commit cc250e267bd56c531b0bee455fc724d50af83fac
Merge tag 'char-misc-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc fixes from Greg KH: "Here are a few small char/misc driver fixes for 4.10-rc3. Two MEI driver fixes, and three NVMEM patches for reported issues, and a new Hyper-V driver MAINTAINER update. Nothing major at all, all have been in linux-next with no reported issues" * tag 'char-misc-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: hyper-v: Add myself as additional MAINTAINER nvmem: fix nvmem_cell_read() return type doc nvmem: imx-ocotp: Fix wrong register size nvmem: qfprom: Allow single byte accesses for read/write mei: move write cb to completion on credentials failures mei: bus: fix mei_cldev_enable KDoc
Showing 6 changed files Side-by-side Diff
MAINTAINERS
... | ... | @@ -5965,6 +5965,7 @@ |
5965 | 5965 | Hyper-V CORE AND DRIVERS |
5966 | 5966 | M: "K. Y. Srinivasan" <kys@microsoft.com> |
5967 | 5967 | M: Haiyang Zhang <haiyangz@microsoft.com> |
5968 | +M: Stephen Hemminger <sthemmin@microsoft.com> | |
5968 | 5969 | L: devel@linuxdriverproject.org |
5969 | 5970 | S: Maintained |
5970 | 5971 | F: arch/x86/include/asm/mshyperv.h |
drivers/misc/mei/bus.c
drivers/misc/mei/client.c
... | ... | @@ -1541,7 +1541,7 @@ |
1541 | 1541 | |
1542 | 1542 | rets = first_chunk ? mei_cl_tx_flow_ctrl_creds(cl) : 1; |
1543 | 1543 | if (rets < 0) |
1544 | - return rets; | |
1544 | + goto err; | |
1545 | 1545 | |
1546 | 1546 | if (rets == 0) { |
1547 | 1547 | cl_dbg(dev, cl, "No flow control credentials: not sending.\n"); |
... | ... | @@ -1575,11 +1575,8 @@ |
1575 | 1575 | cb->buf.size, cb->buf_idx); |
1576 | 1576 | |
1577 | 1577 | rets = mei_write_message(dev, &mei_hdr, buf->data + cb->buf_idx); |
1578 | - if (rets) { | |
1579 | - cl->status = rets; | |
1580 | - list_move_tail(&cb->list, &cmpl_list->list); | |
1581 | - return rets; | |
1582 | - } | |
1578 | + if (rets) | |
1579 | + goto err; | |
1583 | 1580 | |
1584 | 1581 | cl->status = 0; |
1585 | 1582 | cl->writing_state = MEI_WRITING; |
1586 | 1583 | |
... | ... | @@ -1587,14 +1584,21 @@ |
1587 | 1584 | cb->completed = mei_hdr.msg_complete == 1; |
1588 | 1585 | |
1589 | 1586 | if (first_chunk) { |
1590 | - if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) | |
1591 | - return -EIO; | |
1587 | + if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) { | |
1588 | + rets = -EIO; | |
1589 | + goto err; | |
1590 | + } | |
1592 | 1591 | } |
1593 | 1592 | |
1594 | 1593 | if (mei_hdr.msg_complete) |
1595 | 1594 | list_move_tail(&cb->list, &dev->write_waiting_list.list); |
1596 | 1595 | |
1597 | 1596 | return 0; |
1597 | + | |
1598 | +err: | |
1599 | + cl->status = rets; | |
1600 | + list_move_tail(&cb->list, &cmpl_list->list); | |
1601 | + return rets; | |
1598 | 1602 | } |
1599 | 1603 | |
1600 | 1604 | /** |
drivers/nvmem/core.c
... | ... | @@ -981,8 +981,8 @@ |
981 | 981 | * @cell: nvmem cell to be read. |
982 | 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. | |
985 | - * The buffer should be freed by the consumer with a kfree(). | |
984 | + * Return: ERR_PTR() on error or a valid pointer to a buffer on success. The | |
985 | + * buffer should be freed by the consumer with a kfree(). | |
986 | 986 | */ |
987 | 987 | void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) |
988 | 988 | { |
drivers/nvmem/imx-ocotp.c
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | |
72 | 72 | static const struct of_device_id imx_ocotp_dt_ids[] = { |
73 | 73 | { .compatible = "fsl,imx6q-ocotp", (void *)128 }, |
74 | - { .compatible = "fsl,imx6sl-ocotp", (void *)32 }, | |
74 | + { .compatible = "fsl,imx6sl-ocotp", (void *)64 }, | |
75 | 75 | { .compatible = "fsl,imx6sx-ocotp", (void *)128 }, |
76 | 76 | { }, |
77 | 77 | }; |
drivers/nvmem/qfprom.c
... | ... | @@ -21,11 +21,11 @@ |
21 | 21 | unsigned int reg, void *_val, size_t bytes) |
22 | 22 | { |
23 | 23 | void __iomem *base = context; |
24 | - u32 *val = _val; | |
25 | - int i = 0, words = bytes / 4; | |
24 | + u8 *val = _val; | |
25 | + int i = 0, words = bytes; | |
26 | 26 | |
27 | 27 | while (words--) |
28 | - *val++ = readl(base + reg + (i++ * 4)); | |
28 | + *val++ = readb(base + reg + i++); | |
29 | 29 | |
30 | 30 | return 0; |
31 | 31 | } |
32 | 32 | |
... | ... | @@ -34,11 +34,11 @@ |
34 | 34 | unsigned int reg, void *_val, size_t bytes) |
35 | 35 | { |
36 | 36 | void __iomem *base = context; |
37 | - u32 *val = _val; | |
38 | - int i = 0, words = bytes / 4; | |
37 | + u8 *val = _val; | |
38 | + int i = 0, words = bytes; | |
39 | 39 | |
40 | 40 | while (words--) |
41 | - writel(*val++, base + reg + (i++ * 4)); | |
41 | + writeb(*val++, base + reg + i++); | |
42 | 42 | |
43 | 43 | return 0; |
44 | 44 | } |
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | static struct nvmem_config econfig = { |
54 | 54 | .name = "qfprom", |
55 | 55 | .owner = THIS_MODULE, |
56 | - .stride = 4, | |
56 | + .stride = 1, | |
57 | 57 | .word_size = 1, |
58 | 58 | .reg_read = qfprom_reg_read, |
59 | 59 | .reg_write = qfprom_reg_write, |