1
0
Fork 0

Char/Misc fixes for 4.10-rc3

Here are a few small char/misc driver fixes for 4.10-rc3.
 
 2 MEI driver fixes, and 3 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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWHI2oQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yk9NwCfUAUm3Mhv38VxfeYeff9HJ6jXSRYAn1jWfd+L
 slxXLO4ZfukxPo5WF2qm
 =Sv9Y
 -----END PGP SIGNATURE-----

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
hifive-unleashed-5.1
Linus Torvalds 2017-01-08 11:37:44 -08:00
commit cc250e267b
6 changed files with 24 additions and 19 deletions

View File

@ -5965,6 +5965,7 @@ F: drivers/media/platform/sti/hva
Hyper-V CORE AND DRIVERS Hyper-V CORE AND DRIVERS
M: "K. Y. Srinivasan" <kys@microsoft.com> M: "K. Y. Srinivasan" <kys@microsoft.com>
M: Haiyang Zhang <haiyangz@microsoft.com> M: Haiyang Zhang <haiyangz@microsoft.com>
M: Stephen Hemminger <sthemmin@microsoft.com>
L: devel@linuxdriverproject.org L: devel@linuxdriverproject.org
S: Maintained S: Maintained
F: arch/x86/include/asm/mshyperv.h F: arch/x86/include/asm/mshyperv.h

View File

@ -450,7 +450,7 @@ bool mei_cldev_enabled(struct mei_cl_device *cldev)
EXPORT_SYMBOL_GPL(mei_cldev_enabled); EXPORT_SYMBOL_GPL(mei_cldev_enabled);
/** /**
* mei_cldev_enable_device - enable me client device * mei_cldev_enable - enable me client device
* create connection with me client * create connection with me client
* *
* @cldev: me client device * @cldev: me client device

View File

@ -1541,7 +1541,7 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
rets = first_chunk ? mei_cl_tx_flow_ctrl_creds(cl) : 1; rets = first_chunk ? mei_cl_tx_flow_ctrl_creds(cl) : 1;
if (rets < 0) if (rets < 0)
return rets; goto err;
if (rets == 0) { if (rets == 0) {
cl_dbg(dev, cl, "No flow control credentials: not sending.\n"); 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,
cb->buf.size, cb->buf_idx); cb->buf.size, cb->buf_idx);
rets = mei_write_message(dev, &mei_hdr, buf->data + cb->buf_idx); rets = mei_write_message(dev, &mei_hdr, buf->data + cb->buf_idx);
if (rets) { if (rets)
cl->status = rets; goto err;
list_move_tail(&cb->list, &cmpl_list->list);
return rets;
}
cl->status = 0; cl->status = 0;
cl->writing_state = MEI_WRITING; cl->writing_state = MEI_WRITING;
@ -1587,14 +1584,21 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
cb->completed = mei_hdr.msg_complete == 1; cb->completed = mei_hdr.msg_complete == 1;
if (first_chunk) { if (first_chunk) {
if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) {
return -EIO; rets = -EIO;
goto err;
}
} }
if (mei_hdr.msg_complete) if (mei_hdr.msg_complete)
list_move_tail(&cb->list, &dev->write_waiting_list.list); list_move_tail(&cb->list, &dev->write_waiting_list.list);
return 0; return 0;
err:
cl->status = rets;
list_move_tail(&cb->list, &cmpl_list->list);
return rets;
} }
/** /**

View File

@ -981,8 +981,8 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem,
* @cell: nvmem cell to be read. * @cell: nvmem cell to be read.
* @len: pointer to length of cell which will be populated on successful read. * @len: pointer to length of cell which will be populated on successful read.
* *
* Return: ERR_PTR() on error or a valid pointer to a char * buffer on success. * Return: ERR_PTR() on error or a valid pointer to a buffer on success. The
* The buffer should be freed by the consumer with a kfree(). * buffer should be freed by the consumer with a kfree().
*/ */
void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
{ {

View File

@ -71,7 +71,7 @@ static struct nvmem_config imx_ocotp_nvmem_config = {
static const struct of_device_id imx_ocotp_dt_ids[] = { static const struct of_device_id imx_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx6q-ocotp", (void *)128 }, { .compatible = "fsl,imx6q-ocotp", (void *)128 },
{ .compatible = "fsl,imx6sl-ocotp", (void *)32 }, { .compatible = "fsl,imx6sl-ocotp", (void *)64 },
{ .compatible = "fsl,imx6sx-ocotp", (void *)128 }, { .compatible = "fsl,imx6sx-ocotp", (void *)128 },
{ }, { },
}; };

View File

@ -21,11 +21,11 @@ static int qfprom_reg_read(void *context,
unsigned int reg, void *_val, size_t bytes) unsigned int reg, void *_val, size_t bytes)
{ {
void __iomem *base = context; void __iomem *base = context;
u32 *val = _val; u8 *val = _val;
int i = 0, words = bytes / 4; int i = 0, words = bytes;
while (words--) while (words--)
*val++ = readl(base + reg + (i++ * 4)); *val++ = readb(base + reg + i++);
return 0; return 0;
} }
@ -34,11 +34,11 @@ static int qfprom_reg_write(void *context,
unsigned int reg, void *_val, size_t bytes) unsigned int reg, void *_val, size_t bytes)
{ {
void __iomem *base = context; void __iomem *base = context;
u32 *val = _val; u8 *val = _val;
int i = 0, words = bytes / 4; int i = 0, words = bytes;
while (words--) while (words--)
writel(*val++, base + reg + (i++ * 4)); writeb(*val++, base + reg + i++);
return 0; return 0;
} }
@ -53,7 +53,7 @@ static int qfprom_remove(struct platform_device *pdev)
static struct nvmem_config econfig = { static struct nvmem_config econfig = {
.name = "qfprom", .name = "qfprom",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.stride = 4, .stride = 1,
.word_size = 1, .word_size = 1,
.reg_read = qfprom_reg_read, .reg_read = qfprom_reg_read,
.reg_write = qfprom_reg_write, .reg_write = qfprom_reg_write,