mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:51:00 +07:00
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
This commit is contained in:
commit
cc250e267b
@ -5965,6 +5965,7 @@ F: drivers/media/platform/sti/hva
|
||||
Hyper-V CORE AND DRIVERS
|
||||
M: "K. Y. Srinivasan" <kys@microsoft.com>
|
||||
M: Haiyang Zhang <haiyangz@microsoft.com>
|
||||
M: Stephen Hemminger <sthemmin@microsoft.com>
|
||||
L: devel@linuxdriverproject.org
|
||||
S: Maintained
|
||||
F: arch/x86/include/asm/mshyperv.h
|
||||
|
@ -450,7 +450,7 @@ bool mei_cldev_enabled(struct mei_cl_device *cldev)
|
||||
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
|
||||
*
|
||||
* @cldev: me client device
|
||||
|
@ -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;
|
||||
if (rets < 0)
|
||||
return rets;
|
||||
goto err;
|
||||
|
||||
if (rets == 0) {
|
||||
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);
|
||||
|
||||
rets = mei_write_message(dev, &mei_hdr, buf->data + cb->buf_idx);
|
||||
if (rets) {
|
||||
cl->status = rets;
|
||||
list_move_tail(&cb->list, &cmpl_list->list);
|
||||
return rets;
|
||||
}
|
||||
if (rets)
|
||||
goto err;
|
||||
|
||||
cl->status = 0;
|
||||
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;
|
||||
|
||||
if (first_chunk) {
|
||||
if (mei_cl_tx_flow_ctrl_creds_reduce(cl))
|
||||
return -EIO;
|
||||
if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) {
|
||||
rets = -EIO;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if (mei_hdr.msg_complete)
|
||||
list_move_tail(&cb->list, &dev->write_waiting_list.list);
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
cl->status = rets;
|
||||
list_move_tail(&cb->list, &cmpl_list->list);
|
||||
return rets;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -981,8 +981,8 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem,
|
||||
* @cell: nvmem cell to be 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.
|
||||
* The buffer should be freed by the consumer with a kfree().
|
||||
* Return: ERR_PTR() on error or a valid pointer to a buffer on success. The
|
||||
* buffer should be freed by the consumer with a kfree().
|
||||
*/
|
||||
void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ static struct nvmem_config imx_ocotp_nvmem_config = {
|
||||
|
||||
static const struct of_device_id imx_ocotp_dt_ids[] = {
|
||||
{ .compatible = "fsl,imx6q-ocotp", (void *)128 },
|
||||
{ .compatible = "fsl,imx6sl-ocotp", (void *)32 },
|
||||
{ .compatible = "fsl,imx6sl-ocotp", (void *)64 },
|
||||
{ .compatible = "fsl,imx6sx-ocotp", (void *)128 },
|
||||
{ },
|
||||
};
|
||||
|
@ -21,11 +21,11 @@ static int qfprom_reg_read(void *context,
|
||||
unsigned int reg, void *_val, size_t bytes)
|
||||
{
|
||||
void __iomem *base = context;
|
||||
u32 *val = _val;
|
||||
int i = 0, words = bytes / 4;
|
||||
u8 *val = _val;
|
||||
int i = 0, words = bytes;
|
||||
|
||||
while (words--)
|
||||
*val++ = readl(base + reg + (i++ * 4));
|
||||
*val++ = readb(base + reg + i++);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -34,11 +34,11 @@ static int qfprom_reg_write(void *context,
|
||||
unsigned int reg, void *_val, size_t bytes)
|
||||
{
|
||||
void __iomem *base = context;
|
||||
u32 *val = _val;
|
||||
int i = 0, words = bytes / 4;
|
||||
u8 *val = _val;
|
||||
int i = 0, words = bytes;
|
||||
|
||||
while (words--)
|
||||
writel(*val++, base + reg + (i++ * 4));
|
||||
writeb(*val++, base + reg + i++);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -53,7 +53,7 @@ static int qfprom_remove(struct platform_device *pdev)
|
||||
static struct nvmem_config econfig = {
|
||||
.name = "qfprom",
|
||||
.owner = THIS_MODULE,
|
||||
.stride = 4,
|
||||
.stride = 1,
|
||||
.word_size = 1,
|
||||
.reg_read = qfprom_reg_read,
|
||||
.reg_write = qfprom_reg_write,
|
||||
|
Loading…
Reference in New Issue
Block a user