This is a note to let you know that I've just added the patch titled
net: hns3: fix a bug in hclge_uninit_client_instance
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
net-hns3-fix-a-bug-in-hclge_uninit_client_instance.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Lipeng <lipeng321(a)huawei.com>
Date: Tue, 24 Oct 2017 21:02:11 +0800
Subject: net: hns3: fix a bug in hclge_uninit_client_instance
From: Lipeng <lipeng321(a)huawei.com>
[ Upstream commit a17dcf3f0124698d1120da71574bf4c339e5a368 ]
HNS3 driver initialize hdev->roce_client and vport->roce.client in
hclge_init_client_instance, and need set hdev->roce_client and
vport->roce.client NULL.
If do not set them NULL when uninit, it will fail in the scene:
insmod hns3.ko, hns-roce.ko, hns-roce-hw-v3.ko successfully, but
rmmod hns3.ko after rmmod hns-roce-hw-v2.ko and hns-roce.ko.
This patch fixes the issue.
Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support)
Signed-off-by: Lipeng <lipeng321(a)huawei.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -4007,13 +4007,19 @@ static void hclge_uninit_client_instance
for (i = 0; i < hdev->num_vmdq_vport + 1; i++) {
vport = &hdev->vport[i];
- if (hdev->roce_client)
+ if (hdev->roce_client) {
hdev->roce_client->ops->uninit_instance(&vport->roce,
0);
+ hdev->roce_client = NULL;
+ vport->roce.client = NULL;
+ }
if (client->type == HNAE3_CLIENT_ROCE)
return;
- if (client->ops->uninit_instance)
+ if (client->ops->uninit_instance) {
client->ops->uninit_instance(&vport->nic, 0);
+ hdev->nic_client = NULL;
+ vport->nic.client = NULL;
+ }
}
}
Patches currently in stable-queue which might be from lipeng321(a)huawei.com are
queue-4.14/net-hns3-fix-the-tx-rx-ring.queue_index-in-hns3_ring_get_cfg.patch
queue-4.14/net-hns3-fix-the-bug-when-map-buffer-fail.patch
queue-4.14/net-hns3-fix-a-bug-when-alloc-new-buffer.patch
queue-4.14/net-hns3-fix-the-bug-of-hns3_set_txbd_baseinfo.patch
queue-4.14/net-hns3-fix-a-bug-in-hclge_uninit_client_instance.patch
queue-4.14/net-hns3-fix-a-misuse-to-devm_free_irq.patch
queue-4.14/net-hns3-fix-for-getting-advertised_caps-in-hns3_get_link_ksettings.patch
queue-4.14/net-hns3-add-nic_client-check-when-initialize-roce-base-information.patch
This is a note to let you know that I've just added the patch titled
net: hns3: add nic_client check when initialize roce base information
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
net-hns3-add-nic_client-check-when-initialize-roce-base-information.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Lipeng <lipeng321(a)huawei.com>
Date: Tue, 24 Oct 2017 21:02:10 +0800
Subject: net: hns3: add nic_client check when initialize roce base information
From: Lipeng <lipeng321(a)huawei.com>
[ Upstream commit 3a46f34d20d453f09defb76b11a567647939c0aa ]
Roce driver works base on HNS3 driver.If insmod Roce driver before
NIC driver there is a error because do not check nic_client. This patch
adds nic_client check when initialize roce base information.
Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support)
Signed-off-by: Lipeng <lipeng321(a)huawei.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -3981,7 +3981,7 @@ static int hclge_init_client_instance(st
vport->roce.client = client;
}
- if (hdev->roce_client) {
+ if (hdev->roce_client && hdev->nic_client) {
ret = hclge_init_roce_base_info(vport);
if (ret)
goto err;
Patches currently in stable-queue which might be from lipeng321(a)huawei.com are
queue-4.14/net-hns3-fix-the-tx-rx-ring.queue_index-in-hns3_ring_get_cfg.patch
queue-4.14/net-hns3-fix-the-bug-when-map-buffer-fail.patch
queue-4.14/net-hns3-fix-a-bug-when-alloc-new-buffer.patch
queue-4.14/net-hns3-fix-the-bug-of-hns3_set_txbd_baseinfo.patch
queue-4.14/net-hns3-fix-a-bug-in-hclge_uninit_client_instance.patch
queue-4.14/net-hns3-fix-a-misuse-to-devm_free_irq.patch
queue-4.14/net-hns3-fix-for-getting-advertised_caps-in-hns3_get_link_ksettings.patch
queue-4.14/net-hns3-add-nic_client-check-when-initialize-roce-base-information.patch
This is a note to let you know that I've just added the patch titled
net: dsa: lan9303: Do not disable switch fabric port 0 at .probe
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
net-dsa-lan9303-do-not-disable-switch-fabric-port-0-at-.probe.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Egil Hjelmeland <privat(a)egil-hjelmeland.no>
Date: Tue, 24 Oct 2017 17:14:10 +0200
Subject: net: dsa: lan9303: Do not disable switch fabric port 0 at .probe
From: Egil Hjelmeland <privat(a)egil-hjelmeland.no>
[ Upstream commit 3c91b0c1de8d013490bbc41ce9ee8810ea5baddd ]
Make the LAN9303 work when lan9303_probe() is called twice.
For some unknown reason the LAN9303 switch fail to forward data when switch
fabric port 0 TX is disabled during probe. (Write of LAN9303_MAC_TX_CFG_0
in lan9303_disable_processing_port().)
In that situation the switch fabric seem to receive frames, because the ALR
is learning addresses. But no frames are transmitted on any of the ports.
In our system lan9303_probe() is called twice, first time
dsa_register_switch() return -EPROBE_DEFER. As an experiment, modified the
code to skip writing LAN9303_MAC_TX_CFG_0, port 0 during the first probe.
Then the switch works as expected.
Resolve the problem by not calling lan9303_disable_processing_port() on
port 0 during probe. Ports 1 and 2 are still disabled.
Although unsatisfying that the exact failure mechanism is not known,
the patch should not cause any harm.
Signed-off-by: Egil Hjelmeland <privat(a)egil-hjelmeland.no>
Reviewed-by: Andrew Lunn <andrew(a)lunn.ch>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/dsa/lan9303-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -569,7 +569,7 @@ static int lan9303_disable_processing(st
{
int p;
- for (p = 0; p < LAN9303_NUM_PORTS; p++) {
+ for (p = 1; p < LAN9303_NUM_PORTS; p++) {
int ret = lan9303_disable_processing_port(chip, p);
if (ret)
Patches currently in stable-queue which might be from privat(a)egil-hjelmeland.no are
queue-4.14/net-dsa-lan9303-do-not-disable-switch-fabric-port-0-at-.probe.patch
This is a note to let you know that I've just added the patch titled
mtd: spi-nor: stm32-quadspi: Fix uninitialized error return code
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mtd-spi-nor-stm32-quadspi-fix-uninitialized-error-return-code.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
Date: Thu, 26 Oct 2017 17:12:33 +0200
Subject: mtd: spi-nor: stm32-quadspi: Fix uninitialized error return code
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
[ Upstream commit 05521bd3d117704a1458eb4d0c3ae821858658f2 ]
With gcc 4.1.2:
drivers/mtd/spi-nor/stm32-quadspi.c: In function ‘stm32_qspi_tx_poll’:
drivers/mtd/spi-nor/stm32-quadspi.c:230: warning: ‘ret’ may be used uninitialized in this function
Indeed, if stm32_qspi_cmd.len is zero, ret will be uninitialized.
This length is passed from outside the driver using the
spi_nor.{read,write}{,_reg}() callbacks.
Several functions in drivers/mtd/spi-nor/spi-nor.c (e.g. write_enable(),
write_disable(), and erase_chip()) call spi_nor.write_reg() with a zero
length.
Fix this by returning an explicit zero on success.
Fixes: 0d43d7ab277a048c ("mtd: spi-nor: add driver for STM32 quad spi flash controller")
Signed-off-by: Geert Uytterhoeven <geert(a)linux-m68k.org>
Acked-by: Ludovic Barre <ludovic.barre(a)st.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen(a)wedev4u.fr>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/mtd/spi-nor/stm32-quadspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/mtd/spi-nor/stm32-quadspi.c
+++ b/drivers/mtd/spi-nor/stm32-quadspi.c
@@ -240,12 +240,12 @@ static int stm32_qspi_tx_poll(struct stm
STM32_QSPI_FIFO_TIMEOUT_US);
if (ret) {
dev_err(qspi->dev, "fifo timeout (stat:%#x)\n", sr);
- break;
+ return ret;
}
tx_fifo(buf++, qspi->io_base + QUADSPI_DR);
}
- return ret;
+ return 0;
}
static int stm32_qspi_tx_mm(struct stm32_qspi *qspi,
Patches currently in stable-queue which might be from geert(a)linux-m68k.org are
queue-4.14/fbdev-controlfb-add-missing-modes-to-fix-out-of-bounds-access.patch
queue-4.14/mtd-spi-nor-stm32-quadspi-fix-uninitialized-error-return-code.patch
This is a note to let you know that I've just added the patch titled
mm: Handle 0 flags in _calc_vm_trans() macro
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mm-handle-0-flags-in-_calc_vm_trans-macro.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Jan Kara <jack(a)suse.cz>
Date: Fri, 3 Nov 2017 12:21:21 +0100
Subject: mm: Handle 0 flags in _calc_vm_trans() macro
From: Jan Kara <jack(a)suse.cz>
[ Upstream commit 592e254502041f953e84d091eae2c68cba04c10b ]
_calc_vm_trans() does not handle the situation when some of the passed
flags are 0 (which can happen if these VM flags do not make sense for
the architecture). Improve the _calc_vm_trans() macro to return 0 in
such situation. Since all passed flags are constant, this does not add
any runtime overhead.
Signed-off-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
include/linux/mman.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -64,8 +64,9 @@ static inline bool arch_validate_prot(un
* ("bit1" and "bit2" must be single bits)
*/
#define _calc_vm_trans(x, bit1, bit2) \
+ ((!(bit1) || !(bit2)) ? 0 : \
((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \
- : ((x) & (bit1)) / ((bit1) / (bit2)))
+ : ((x) & (bit1)) / ((bit1) / (bit2))))
/*
* Combine the mmap "prot" argument into "vm_flags" used internally.
Patches currently in stable-queue which might be from jack(a)suse.cz are
queue-4.14/mm-handle-0-flags-in-_calc_vm_trans-macro.patch
queue-4.14/udf-avoid-overflow-when-session-starts-at-large-offset.patch
This is a note to let you know that I've just added the patch titled
mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create()
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mlxsw-spectrum-fix-error-return-code-in-mlxsw_sp_port_create.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Wei Yongjun <weiyongjun1(a)huawei.com>
Date: Mon, 6 Nov 2017 11:11:28 +0000
Subject: mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create()
From: Wei Yongjun <weiyongjun1(a)huawei.com>
[ Upstream commit d86fd113ebbb37726ef7c7cc6fd6d5ce377455d6 ]
Fix to return a negative error code from the VID create error handling
case instead of 0, as done elsewhere in this function.
Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN")
Signed-off-by: Wei Yongjun <weiyongjun1(a)huawei.com>
Reviewed-by: Ido Schimmel <idosch(a)mellanox.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2974,6 +2974,7 @@ static int mlxsw_sp_port_create(struct m
if (IS_ERR(mlxsw_sp_port_vlan)) {
dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n",
mlxsw_sp_port->local_port);
+ err = PTR_ERR(mlxsw_sp_port_vlan);
goto err_port_vlan_get;
}
Patches currently in stable-queue which might be from weiyongjun1(a)huawei.com are
queue-4.14/nullb-fix-error-return-code-in-null_init.patch
queue-4.14/mlxsw-spectrum-fix-error-return-code-in-mlxsw_sp_port_create.patch
This is a note to let you know that I've just added the patch titled
misc: pci_endpoint_test: Fix failure path return values in probe
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
misc-pci_endpoint_test-fix-failure-path-return-values-in-probe.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Kishon Vijay Abraham I <kishon(a)ti.com>
Date: Wed, 11 Oct 2017 14:14:36 +0530
Subject: misc: pci_endpoint_test: Fix failure path return values in probe
From: Kishon Vijay Abraham I <kishon(a)ti.com>
[ Upstream commit 80068c93688f6143100859c4856f895801c1a1d9 ]
Return value of pci_endpoint_test_probe is not set properly in a couple of
failure cases. Fix it here.
Signed-off-by: Kishon Vijay Abraham I <kishon(a)ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/pci_endpoint_test.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -533,6 +533,7 @@ static int pci_endpoint_test_probe(struc
test->base = test->bar[test_reg_bar];
if (!test->base) {
+ err = -ENOMEM;
dev_err(dev, "Cannot perform PCI test without BAR%d\n",
test_reg_bar);
goto err_iounmap;
@@ -542,6 +543,7 @@ static int pci_endpoint_test_probe(struc
id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL);
if (id < 0) {
+ err = id;
dev_err(dev, "unable to get id\n");
goto err_iounmap;
}
Patches currently in stable-queue which might be from kishon(a)ti.com are
queue-4.14/misc-pci_endpoint_test-fix-failure-path-return-values-in-probe.patch
This is a note to let you know that I've just added the patch titled
misc: pci_endpoint_test: Avoid triggering a BUG()
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
misc-pci_endpoint_test-avoid-triggering-a-bug.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Dan Carpenter <dan.carpenter(a)oracle.com>
Date: Sat, 30 Sep 2017 11:16:51 +0300
Subject: misc: pci_endpoint_test: Avoid triggering a BUG()
From: Dan Carpenter <dan.carpenter(a)oracle.com>
[ Upstream commit 846df244ebefbc9f7b91e9ae7a5e5a2e69fb4772 ]
If you call ida_simple_remove(&pci_endpoint_test_ida, id) with a
negative "id" then it triggers an immediate BUG_ON(). Let's not allow
that.
Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device")
Signed-off-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/misc/pci_endpoint_test.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -590,6 +590,8 @@ static void pci_endpoint_test_remove(str
if (sscanf(misc_device->name, DRV_MODULE_NAME ".%d", &id) != 1)
return;
+ if (id < 0)
+ return;
misc_deregister(&test->miscdev);
ida_simple_remove(&pci_endpoint_test_ida, id);
Patches currently in stable-queue which might be from dan.carpenter(a)oracle.com are
queue-4.14/scsi-bfa-integer-overflow-in-debugfs.patch
queue-4.14/fbdev-controlfb-add-missing-modes-to-fix-out-of-bounds-access.patch
queue-4.14/misc-pci_endpoint_test-avoid-triggering-a-bug.patch
This is a note to let you know that I've just added the patch titled
mfd: mxs-lradc: Fix error handling in mxs_lradc_probe()
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
mfd-mxs-lradc-fix-error-handling-in-mxs_lradc_probe.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Alexey Khoroshilov <khoroshilov(a)ispras.ru>
Date: Sat, 14 Oct 2017 01:06:56 +0300
Subject: mfd: mxs-lradc: Fix error handling in mxs_lradc_probe()
From: Alexey Khoroshilov <khoroshilov(a)ispras.ru>
[ Upstream commit 362741a21a5c4b9ee31e75ce28d63c6d238a745c ]
There is the only path, where mxs_lradc_probe() leaves clk undisabled,
since it does return instead of goto err_clk.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov(a)ispras.ru>
Signed-off-by: Lee Jones <lee.jones(a)linaro.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/mfd/mxs-lradc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/mfd/mxs-lradc.c
+++ b/drivers/mfd/mxs-lradc.c
@@ -196,8 +196,10 @@ static int mxs_lradc_probe(struct platfo
platform_set_drvdata(pdev, lradc);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENOMEM;
+ if (!res) {
+ ret = -ENOMEM;
+ goto err_clk;
+ }
switch (lradc->soc) {
case IMX23_LRADC:
Patches currently in stable-queue which might be from khoroshilov(a)ispras.ru are
queue-4.14/mfd-mxs-lradc-fix-error-handling-in-mxs_lradc_probe.patch
This is a note to let you know that I've just added the patch titled
media: usbtv: fix brightness and contrast controls
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
media-usbtv-fix-brightness-and-contrast-controls.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Mon Dec 18 13:28:59 CET 2017
From: Adam Sampson <ats(a)offog.org>
Date: Tue, 24 Oct 2017 16:14:46 -0400
Subject: media: usbtv: fix brightness and contrast controls
From: Adam Sampson <ats(a)offog.org>
[ Upstream commit b3168c87c0492661badc3e908f977d79e7738a41 ]
Because the brightness and contrast controls share a register,
usbtv_s_ctrl needs to read the existing values for both controls before
inserting the new value. However, the code accidentally wrote to the
registers (from an uninitialised stack array), rather than reading them.
The user-visible effect of this was that adjusting the brightness would
also set the contrast to a random value, and vice versa -- so it wasn't
possible to correctly adjust the brightness of usbtv's video output.
Tested with an "EasyDAY" UTV007 device.
Fixes: c53a846c48f2 ("usbtv: add video controls")
Signed-off-by: Adam Sampson <ats(a)offog.org>
Reviewed-by: Lubomir Rintel <lkundrak(a)v3.sk>
Signed-off-by: Hans Verkuil <hans.verkuil(a)cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/media/usb/usbtv/usbtv-video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/media/usb/usbtv/usbtv-video.c
+++ b/drivers/media/usb/usbtv/usbtv-video.c
@@ -718,8 +718,8 @@ static int usbtv_s_ctrl(struct v4l2_ctrl
*/
if (ctrl->id == V4L2_CID_BRIGHTNESS || ctrl->id == V4L2_CID_CONTRAST) {
ret = usb_control_msg(usbtv->udev,
- usb_sndctrlpipe(usbtv->udev, 0), USBTV_CONTROL_REG,
- USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+ usb_rcvctrlpipe(usbtv->udev, 0), USBTV_CONTROL_REG,
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
0, USBTV_BASE + 0x0244, (void *)data, 3, 0);
if (ret < 0)
goto error;
Patches currently in stable-queue which might be from ats(a)offog.org are
queue-4.14/media-usbtv-fix-brightness-and-contrast-controls.patch