Description of issue:
Patch with commit id "c1a6c5ac4278d406c112cc2f038e6e506feadff9"
has modified ioctl path 'timeout' variable type to u8 from
unsigned long. With this maximum timeout value that the driver
can support is 255 seconds. But for some commands application is
providing the higher timeout value (512 seconds as default), so
it will be round off to zero value. Hence timeout is observed
immediately and the IOCTL request fails.
Fix:
Inorder to accommodate higher timeout value change datatype back to
unsigned long.
Cc: <stable(a)vger.kernel.org> #v4.18+
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani(a)broadcom.com>
---
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index b21aa55..c8a0ce1 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -664,7 +664,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
Mpi26NVMeEncapsulatedRequest_t *nvme_encap_request = NULL;
struct _pcie_device *pcie_device = NULL;
u16 smid;
- u8 timeout;
+ unsigned long timeout;
u8 issue_reset;
u32 sz, sz_arg;
void *psge;
--
2.27.0
From: "DingHua Ma" <dinghua.ma.sz(a)gmail.com>
When I use the axp20x chip to power my SDIO device on the 5.4 kernel,
the output voltage of DLDO2 is wrong. After comparing the register
manual and source code of the chip, I found that the mask bit of the
driver register of the port was wrong. I fixed this error by modifying
the mask register of the source code. This error seems to be a copy
error of the macro when writing the code. Now the voltage output of
the DLDO2 port of axp20x is correct. My development environment is
Allwinner A40I of arm architecture, and the kernel version is 5.4.
Signed-off-by: DingHua Ma <dinghua.ma.sz(a)gmail.com>
Reviewed-by: Chen-Yu Tsai <wens(a)csie.org>
Cc: <stable(a)vger.kernel.org>
Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks")
---
Changes since v2:
- Modify topic description
---
Changes since v1:
- More accurate description for this patch
---
drivers/regulator/axp20x-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
index cd1224182ad7..90cb8445f721 100644
--- a/drivers/regulator/axp20x-regulator.c
+++ b/drivers/regulator/axp20x-regulator.c
@@ -594,7 +594,7 @@ static const struct regulator_desc axp22x_regulators[] = {
AXP22X_DLDO1_V_OUT, AXP22X_DLDO1_V_OUT_MASK,
AXP22X_PWR_OUT_CTRL2, AXP22X_PWR_OUT_DLDO1_MASK),
AXP_DESC(AXP22X, DLDO2, "dldo2", "dldoin", 700, 3300, 100,
- AXP22X_DLDO2_V_OUT, AXP22X_PWR_OUT_DLDO2_MASK,
+ AXP22X_DLDO2_V_OUT, AXP22X_DLDO2_V_OUT_MASK,
AXP22X_PWR_OUT_CTRL2, AXP22X_PWR_OUT_DLDO2_MASK),
AXP_DESC(AXP22X, DLDO3, "dldo3", "dldoin", 700, 3300, 100,
AXP22X_DLDO3_V_OUT, AXP22X_DLDO3_V_OUT_MASK,
--
2.25.1
After commit 74d905d2d38a devices requiring the workaround
for edge triggered interrupts stopped working.
This is because the "data" state container defaults to
*not* using the workaround, but the workaround gets used
*before* the check of whether it is needed or not. This
semantic is not obvious from just looking on the patch,
but related to the program flow.
The hardware needs the quirk to be used before even
proceeding to check if the quirk is needed.
This patch makes the quirk be used until we determine
it is *not* needed. It is determined as not needed when
we either have a level-triggered interrupt or the
firmware claims that it has enabled retrigging.
Cc: Andre MΓΌller <andre.muller(a)web.de>
Cc: Nick Dyer <nick.dyer(a)itdev.co.uk>
Cc: Jiada Wang <jiada_wang(a)mentor.com>
Cc: stable(a)vger.kernel.org
Reported-by: Andre MΓΌller <andre.muller(a)web.de>
Fixes: 74d905d2d38a ("Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary")
Signed-off-by: Linus Walleij <linus.walleij(a)linaro.org>
---
ChangeLog v1->v2:
- Explicitly disable the retrig workaround also if the
IRQ descriptor says we have a level triggered interrupt.
- Drop the second explicit assigning of "true" to the
use_retrigen_workaround bool, it is already enabled.
- Augment debug text to say that we leave it enabled
rather than enable it.
---
drivers/input/touchscreen/atmel_mxt_ts.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index e34984388791..c822db8dbd02 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1297,14 +1297,18 @@ static int mxt_check_retrigen(struct mxt_data *data)
int val;
struct irq_data *irqd;
- data->use_retrigen_workaround = false;
-
irqd = irq_get_irq_data(data->irq);
if (!irqd)
return -EINVAL;
- if (irqd_is_level_type(irqd))
+ if (irqd_is_level_type(irqd)) {
+ /*
+ * We don't need the workaround if we have level trigged
+ * interrupts. This will just work fine.
+ */
+ data->use_retrigen_workaround = false;
return 0;
+ }
if (data->T18_address) {
error = __mxt_read_reg(client,
@@ -1313,12 +1317,13 @@ static int mxt_check_retrigen(struct mxt_data *data)
if (error)
return error;
- if (val & MXT_COMMS_RETRIGEN)
+ if (val & MXT_COMMS_RETRIGEN) {
+ data->use_retrigen_workaround = false;
return 0;
+ }
}
- dev_warn(&client->dev, "Enabling RETRIGEN workaround\n");
- data->use_retrigen_workaround = true;
+ dev_warn(&client->dev, "Leaving RETRIGEN workaround enabled\n");
return 0;
}
@@ -3117,6 +3122,7 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
data = devm_kzalloc(&client->dev, sizeof(struct mxt_data), GFP_KERNEL);
if (!data)
return -ENOMEM;
+ data->use_retrigen_workaround = true;
snprintf(data->phys, sizeof(data->phys), "i2c-%u-%04x/input0",
client->adapter->nr, client->addr);
--
2.26.2
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 184eead057cc7e803558269babc1f2cfb9113ad1 Mon Sep 17 00:00:00 2001
From: Alan Stern <stern(a)rowland.harvard.edu>
Date: Thu, 19 Nov 2020 12:00:40 -0500
Subject: [PATCH] USB: core: Fix regression in Hercules audio card
Commit 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints")
aimed to make the USB stack more reliable by detecting and skipping
over endpoints that are duplicated between interfaces. This caused a
regression for a Hercules audio card (reported as Bugzilla #208357),
which contains such non-compliant duplications. Although the
duplications are harmless, skipping the valid endpoints prevented the
device from working.
This patch fixes the regression by adding ENDPOINT_IGNORE quirks for
the Hercules card, telling the kernel to ignore the invalid duplicate
endpoints and thereby allowing the valid endpoints to be used as
intended.
Fixes: 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints")
CC: <stable(a)vger.kernel.org>
Reported-by: Alexander Chalikiopoulos <bugzilla.kernel.org(a)mrtoasted.com>
Signed-off-by: Alan Stern <stern(a)rowland.harvard.edu>
Link: https://lore.kernel.org/r/20201119170040.GA576844@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index f536ea9fe945..fad31ccd1fa8 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -348,6 +348,10 @@ static const struct usb_device_id usb_quirk_list[] = {
/* Guillemot Webcam Hercules Dualpix Exchange*/
{ USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME },
+ /* Guillemot Hercules DJ Console audio card (BZ 208357) */
+ { USB_DEVICE(0x06f8, 0xb000), .driver_info =
+ USB_QUIRK_ENDPOINT_IGNORE },
+
/* Midiman M-Audio Keystation 88es */
{ USB_DEVICE(0x0763, 0x0192), .driver_info = USB_QUIRK_RESET_RESUME },
@@ -525,6 +529,8 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
* Matched for devices with USB_QUIRK_ENDPOINT_IGNORE.
*/
static const struct usb_device_id usb_endpoint_ignore[] = {
+ { USB_DEVICE_INTERFACE_NUMBER(0x06f8, 0xb000, 5), .driver_info = 0x01 },
+ { USB_DEVICE_INTERFACE_NUMBER(0x06f8, 0xb000, 5), .driver_info = 0x81 },
{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0208, 1), .driver_info = 0x85 },
{ }