stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq
@ 2017-10-07 22:37 Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 04/24] mfd: ab8500-sysctrl: Handle probe deferral Levin, Alexander (Sasha Levin)
                   ` (22 more replies)
  0 siblings, 23 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Grygorii Strashko, Tony Lindgren, Rafael J . Wysocki, Levin,
	Alexander (Sasha Levin)

From: Grygorii Strashko <grygorii.strashko@ti.com>

[ Upstream commit 09bb6e93956ae5175b96905b723ec879c3ca0765 ]

There are two reasons for reporting wakeup event when dedicated wakeup
IRQ is triggered:

- wakeup events accounting, so proper statistical data will be
  displayed in sysfs and debugfs;

- there are small window when System is entering suspend during which
  dedicated wakeup IRQ can be lost:

dpm_suspend_noirq()
  |- device_wakeup_arm_wake_irqs()
      |- dev_pm_arm_wake_irq(X)
         |- IRQ is enabled and marked as wakeup source
[1]...
  |- suspend_device_irqs()
     |- suspend_device_irq(X)
	|- irqd_set(X, IRQD_WAKEUP_ARMED);
	   |- wakup IRQ armed

The wakeup IRQ can be lost if it's triggered at point [1]
and not armed yet.

Hence, fix above cases by adding simple pm_wakeup_event() call in
handle_threaded_wake_irq().

Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling)
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
[ tony@atomide.com: added missing return to avoid warnings ]
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/base/power/wakeirq.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c
index 404d94c6c8bc..feba1b211898 100644
--- a/drivers/base/power/wakeirq.c
+++ b/drivers/base/power/wakeirq.c
@@ -141,6 +141,13 @@ static irqreturn_t handle_threaded_wake_irq(int irq, void *_wirq)
 	struct wake_irq *wirq = _wirq;
 	int res;
 
+	/* Maybe abort suspend? */
+	if (irqd_is_wakeup_set(irq_get_irq_data(irq))) {
+		pm_wakeup_event(wirq->dev, 0);
+
+		return IRQ_HANDLED;
+	}
+
 	/* We don't want RPM_ASYNC or RPM_NOWAIT here */
 	res = pm_runtime_resume(wirq->dev);
 	if (res < 0)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 02/24] mmc: s3cmci: include linux/interrupt.h for tasklet_struct
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 04/24] mfd: ab8500-sysctrl: Handle probe deferral Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 05/24] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 03/24] ARM: pxa: Don't rely on public mmc header to include leds.h Levin, Alexander (Sasha Levin)
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Arnd Bergmann, Ulf Hansson, Levin, Alexander (Sasha Levin)

From: Arnd Bergmann <arnd@arndb.de>

[ Upstream commit e1c6ec26b853e9062f0b3daaf695c546d0702953 ]

I got this new build error on today's linux-next

drivers/mmc/host/s3cmci.h:69:24: error: field 'pio_tasklet' has incomplete type
  struct tasklet_struct pio_tasklet;
drivers/mmc/host/s3cmci.c: In function 's3cmci_enable_irq':
drivers/mmc/host/s3cmci.c:390:4: error: implicit declaration of function 'enable_irq';did you mean 'enable_imask'? [-Werror=implicit-function-declaration]

While I haven't found out why this happened now and not earlier, the
solution is obvious, we should include the header that defines
the structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/mmc/host/s3cmci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 6291d5042ef2..6fed41bd016a 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -21,6 +21,7 @@
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/gpio.h>
+#include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/io.h>
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 05/24] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 04/24] mfd: ab8500-sysctrl: Handle probe deferral Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 02/24] mmc: s3cmci: include linux/interrupt.h for tasklet_struct Levin, Alexander (Sasha Levin)
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Hans de Goede, Lee Jones, Levin, Alexander (Sasha Levin)

From: Hans de Goede <hdegoede@redhat.com>

[ Upstream commit 1af468ebe45591651ec3bafc2e9ddc6fdef70ae0 ]

The R in PEK_DBR stands for rising, so it should be mapped to
AXP288_IRQ_POKP where the last P stands for positive edge.

Likewise PEK_DBF should be mapped to the falling edge, aka the
_N_egative edge, so it should be mapped to AXP288_IRQ_POKN.

This fixes the inverted powerbutton status reporting by the
axp20x-pek driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/mfd/axp20x.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index 9842199e2e6c..89a2dd4d212a 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -164,14 +164,14 @@ static struct resource axp22x_pek_resources[] = {
 static struct resource axp288_power_button_resources[] = {
 	{
 		.name	= "PEK_DBR",
-		.start	= AXP288_IRQ_POKN,
-		.end	= AXP288_IRQ_POKN,
+		.start	= AXP288_IRQ_POKP,
+		.end	= AXP288_IRQ_POKP,
 		.flags	= IORESOURCE_IRQ,
 	},
 	{
 		.name	= "PEK_DBF",
-		.start	= AXP288_IRQ_POKP,
-		.end	= AXP288_IRQ_POKP,
+		.start	= AXP288_IRQ_POKN,
+		.end	= AXP288_IRQ_POKN,
 		.flags	= IORESOURCE_IRQ,
 	},
 };
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 03/24] ARM: pxa: Don't rely on public mmc header to include leds.h
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (2 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 02/24] mmc: s3cmci: include linux/interrupt.h for tasklet_struct Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 07/24] ext4: fix stripe-unaligned allocations Levin, Alexander (Sasha Levin)
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ulf Hansson, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	linux-arm-kernel, Levin, Alexander (Sasha Levin)

From: Ulf Hansson <ulf.hansson@linaro.org>

[ Upstream commit 40d727a2defa176b78159d445bcf7afcc2ed9021 ]

Some of the pxa platforms, balloon3, colibri-pxa270-income, corgi,
trizeps4, vpac270, zeus and zylonite depends on leds.h. Explicitly include
it instead of relying on the public mmc header host.h.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: <linux-arm-kernel@lists.infradead.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 arch/arm/mach-pxa/balloon3.c              | 1 +
 arch/arm/mach-pxa/colibri-pxa270-income.c | 1 +
 arch/arm/mach-pxa/corgi.c                 | 1 +
 arch/arm/mach-pxa/trizeps4.c              | 1 +
 arch/arm/mach-pxa/vpac270.c               | 1 +
 arch/arm/mach-pxa/zeus.c                  | 1 +
 arch/arm/mach-pxa/zylonite.c              | 1 +
 7 files changed, 7 insertions(+)

diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index a727282bfa99..761d7d64d643 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
+#include <linux/leds.h>
 #include <linux/sched.h>
 #include <linux/bitops.h>
 #include <linux/fb.h>
diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c
index db20d25daaab..1b92a4112bd1 100644
--- a/arch/arm/mach-pxa/colibri-pxa270-income.c
+++ b/arch/arm/mach-pxa/colibri-pxa270-income.c
@@ -17,6 +17,7 @@
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/leds.h>
 #include <linux/ioport.h>
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 89f790dda93e..d1f12909f740 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -18,6 +18,7 @@
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
+#include <linux/leds.h>
 #include <linux/mmc/host.h>
 #include <linux/mtd/physmap.h>
 #include <linux/pm.h>
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 066e3a250ee0..5e50c53f1f4b 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
+#include <linux/leds.h>
 #include <linux/export.h>
 #include <linux/sched.h>
 #include <linux/bitops.h>
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index 54122a983ae3..2cce92924068 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -15,6 +15,7 @@
 #include <linux/irq.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
+#include <linux/leds.h>
 #include <linux/gpio.h>
 #include <linux/usb/gpio_vbus.h>
 #include <linux/mtd/mtd.h>
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 30e62a3f0701..d757cfb5f8a6 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -13,6 +13,7 @@
 
 #include <linux/cpufreq.h>
 #include <linux/interrupt.h>
+#include <linux/leds.h>
 #include <linux/irq.h>
 #include <linux/pm.h>
 #include <linux/gpio.h>
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index e20359a7433c..d7f0a7d87ef2 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/interrupt.h>
+#include <linux/leds.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 04/24] mfd: ab8500-sysctrl: Handle probe deferral
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 05/24] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped Levin, Alexander (Sasha Levin)
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Linus Walleij, Lee Jones, Levin, Alexander (Sasha Levin)

From: Linus Walleij <linus.walleij@linaro.org>

[ Upstream commit 7e9c40c63933a643908d686bd89dfc2315e8c70a ]

In the current boot, clients making use of the AB8500 sysctrl
may be probed before the ab8500-sysctrl driver. This gives them
-EINVAL, but should rather give -EPROBE_DEFER.

Before this, the abx500 clock driver didn't probe properly,
and as a result the codec driver in turn using the clocks did
not probe properly. After this patch, everything probes
properly.

Also add OF compatible-string probing. This driver is all
device tree, so let's just make a drive-by-fix of that as
well.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/mfd/ab8500-sysctrl.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index 0d1825696153..405ce78c1ef4 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -99,7 +99,7 @@ int ab8500_sysctrl_read(u16 reg, u8 *value)
 	u8 bank;
 
 	if (sysctrl_dev == NULL)
-		return -EINVAL;
+		return -EPROBE_DEFER;
 
 	bank = (reg >> 8);
 	if (!valid_bank(bank))
@@ -115,11 +115,13 @@ int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value)
 	u8 bank;
 
 	if (sysctrl_dev == NULL)
-		return -EINVAL;
+		return -EPROBE_DEFER;
 
 	bank = (reg >> 8);
-	if (!valid_bank(bank))
+	if (!valid_bank(bank)) {
+		pr_err("invalid bank\n");
 		return -EINVAL;
+	}
 
 	return abx500_mask_and_set_register_interruptible(sysctrl_dev, bank,
 		(u8)(reg & 0xFF), mask, value);
@@ -180,9 +182,15 @@ static int ab8500_sysctrl_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id ab8500_sysctrl_match[] = {
+	{ .compatible = "stericsson,ab8500-sysctrl", },
+	{}
+};
+
 static struct platform_driver ab8500_sysctrl_driver = {
 	.driver = {
 		.name = "ab8500-sysctrl",
+		.of_match_table = ab8500_sysctrl_match,
 	},
 	.probe = ab8500_sysctrl_probe,
 	.remove = ab8500_sysctrl_remove,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 07/24] ext4: fix stripe-unaligned allocations
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (3 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 03/24] ARM: pxa: Don't rely on public mmc header to include leds.h Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 06/24] staging: rtl8712u: Fix endian settings for structs describing network packets Levin, Alexander (Sasha Levin)
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jan Kara, Theodore Ts'o, Levin, Alexander (Sasha Levin)

From: Jan Kara <jack@suse.cz>

[ Upstream commit d9b22cf9f5466a057f2a4f1e642b469fa9d73117 ]

When a filesystem is created using:

	mkfs.ext4 -b 4096 -E stride=512 <dev>

and we try to allocate 64MB extent, we will end up directly in
ext4_mb_complex_scan_group(). This is because the request is detected
as power-of-two allocation (so we start in ext4_mb_regular_allocator()
with ac_criteria == 0) however the check before
ext4_mb_simple_scan_group() refuses the direct buddy scan because the
allocation request is too large. Since cr == 0, the check whether we
should use ext4_mb_scan_aligned() fails as well and we fall back to
ext4_mb_complex_scan_group().

Fix the problem by checking for upper limit on power-of-two requests
directly when detecting them.

Reported-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 fs/ext4/mballoc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 84cd77663e1f..1ba82dc5afa3 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2136,8 +2136,10 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
 	 * We search using buddy data only if the order of the request
 	 * is greater than equal to the sbi_s_mb_order2_reqs
 	 * You can tune it via /sys/fs/ext4/<partition>/mb_order2_req
+	 * We also support searching for power-of-two requests only for
+	 * requests upto maximum buddy size we have constructed.
 	 */
-	if (i >= sbi->s_mb_order2_reqs) {
+	if (i >= sbi->s_mb_order2_reqs && i <= sb->s_blocksize_bits + 2) {
 		/*
 		 * This should tell if fe_len is exactly power of 2
 		 */
@@ -2207,7 +2209,7 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
 			}
 
 			ac->ac_groups_scanned++;
-			if (cr == 0 && ac->ac_2order < sb->s_blocksize_bits+2)
+			if (cr == 0)
 				ext4_mb_simple_scan_group(ac, &e4b);
 			else if (cr == 1 && sbi->s_stripe &&
 					!(ac->ac_g_ex.fe_len % sbi->s_stripe))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 06/24] staging: rtl8712u: Fix endian settings for structs describing network packets
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (4 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 07/24] ext4: fix stripe-unaligned allocations Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 08/24] ext4: do not use stripe_width if it is not set Levin, Alexander (Sasha Levin)
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Larry Finger, Greg Kroah-Hartman, Levin, Alexander (Sasha Levin)

From: Larry Finger <Larry.Finger@lwfinger.net>

[ Upstream commit 221c46d28957bd6e2158abc2179ce4a8c9ce07d3 ]

The headers describing a number of network packets do not have the
correct endian settings for several types of data.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/staging/rtl8712/ieee80211.h | 84 ++++++++++++++++++-------------------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index d374824c4f33..7b16c05b5e8b 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -143,52 +143,52 @@ struct ieee_ibss_seq {
 };
 
 struct ieee80211_hdr {
-	u16 frame_ctl;
-	u16 duration_id;
+	__le16 frame_ctl;
+	__le16 duration_id;
 	u8 addr1[ETH_ALEN];
 	u8 addr2[ETH_ALEN];
 	u8 addr3[ETH_ALEN];
-	u16 seq_ctl;
+	__le16 seq_ctl;
 	u8 addr4[ETH_ALEN];
-} __packed;
+}  __packed __aligned(2);
 
 struct ieee80211_hdr_3addr {
-	u16 frame_ctl;
-	u16 duration_id;
+	__le16 frame_ctl;
+	__le16 duration_id;
 	u8 addr1[ETH_ALEN];
 	u8 addr2[ETH_ALEN];
 	u8 addr3[ETH_ALEN];
-	u16 seq_ctl;
-} __packed;
+	__le16 seq_ctl;
+}  __packed __aligned(2);
 
 
 struct	ieee80211_hdr_qos {
-	u16 frame_ctl;
-	u16 duration_id;
+	__le16 frame_ctl;
+	__le16 duration_id;
 	u8 addr1[ETH_ALEN];
 	u8 addr2[ETH_ALEN];
 	u8 addr3[ETH_ALEN];
-	u16 seq_ctl;
+	__le16 seq_ctl;
 	u8 addr4[ETH_ALEN];
-	u16	qc;
-}  __packed;
+	__le16	qc;
+}   __packed __aligned(2);
 
 struct  ieee80211_hdr_3addr_qos {
-	u16 frame_ctl;
-	u16 duration_id;
+	__le16 frame_ctl;
+	__le16 duration_id;
 	u8  addr1[ETH_ALEN];
 	u8  addr2[ETH_ALEN];
 	u8  addr3[ETH_ALEN];
-	u16 seq_ctl;
-	u16 qc;
+	__le16 seq_ctl;
+	__le16 qc;
 }  __packed;
 
 struct eapol {
 	u8 snap[6];
-	u16 ethertype;
+	__be16 ethertype;
 	u8 version;
 	u8 type;
-	u16 length;
+	__le16 length;
 } __packed;
 
 
@@ -528,13 +528,13 @@ struct ieee80211_security {
  */
 
 struct ieee80211_header_data {
-	u16 frame_ctl;
-	u16 duration_id;
+	__le16 frame_ctl;
+	__le16 duration_id;
 	u8 addr1[6];
 	u8 addr2[6];
 	u8 addr3[6];
-	u16 seq_ctrl;
-};
+	__le16 seq_ctrl;
+} __packed __aligned(2);
 
 #define BEACON_PROBE_SSID_ID_POSITION 12
 
@@ -566,18 +566,18 @@ struct ieee80211_info_element {
 /*
  * These are the data types that can make up management packets
  *
-	u16 auth_algorithm;
-	u16 auth_sequence;
-	u16 beacon_interval;
-	u16 capability;
+	__le16 auth_algorithm;
+	__le16 auth_sequence;
+	__le16 beacon_interval;
+	__le16 capability;
 	u8 current_ap[ETH_ALEN];
-	u16 listen_interval;
+	__le16 listen_interval;
 	struct {
 		u16 association_id:14, reserved:2;
 	} __packed;
-	u32 time_stamp[2];
-	u16 reason;
-	u16 status;
+	__le32 time_stamp[2];
+	__le16 reason;
+	__le16 status;
 */
 
 #define IEEE80211_DEFAULT_TX_ESSID "Penguin"
@@ -585,16 +585,16 @@ struct ieee80211_info_element {
 
 struct ieee80211_authentication {
 	struct ieee80211_header_data header;
-	u16 algorithm;
-	u16 transaction;
-	u16 status;
+	__le16 algorithm;
+	__le16 transaction;
+	__le16 status;
 } __packed;
 
 struct ieee80211_probe_response {
 	struct ieee80211_header_data header;
-	u32 time_stamp[2];
-	u16 beacon_interval;
-	u16 capability;
+	__le32 time_stamp[2];
+	__le16 beacon_interval;
+	__le16 capability;
 	struct ieee80211_info_element info_element;
 } __packed;
 
@@ -604,16 +604,16 @@ struct ieee80211_probe_request {
 
 struct ieee80211_assoc_request_frame {
 	struct ieee80211_hdr_3addr header;
-	u16 capability;
-	u16 listen_interval;
+	__le16 capability;
+	__le16 listen_interval;
 	struct ieee80211_info_element_hdr info_element;
 } __packed;
 
 struct ieee80211_assoc_response_frame {
 	struct ieee80211_hdr_3addr header;
-	u16 capability;
-	u16 status;
-	u16 aid;
+	__le16 capability;
+	__le16 status;
+	__le16 aid;
 } __packed;
 
 struct ieee80211_txb {
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 09/24] i2c: riic: correctly finish transfers
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (6 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 08/24] ext4: do not use stripe_width if it is not set Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 13/24] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge Levin, Alexander (Sasha Levin)
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Chris Brandt, Wolfram Sang, Levin, Alexander (Sasha Levin)

From: Chris Brandt <chris.brandt@renesas.com>

[ Upstream commit 71ccea095ea1d4efd004dab971be6d599e06fc3f ]

This fixes the condition where the controller has not fully completed its
final transfer and leaves the bus and controller in a undesirable state.

At the end of the last transmitted byte, the existing driver would just
signal for a STOP condition to be transmitted then immediately signal
completion. However, the full STOP procedure might not have fully taken
place by the time the runtime PM shuts off the peripheral clock, leaving
the bus in a suspended state.

Alternatively, the STOP condition on the bus may have completed, but when
the next transaction is requested by the upper layer, not all the
necessary register cleanup was finished from the last transfer which made
the driver return BUS BUSY when it really wasn't.

This patch now makes all transmit and receive transactions wait for the
STOP condition to fully complete before signaling a completed transaction.
With this new method, runtime PM no longer seems to be an issue.

Fixes: 310c18a41450 ("i2c: riic: add driver")
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/i2c/busses/i2c-riic.c | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index d7e3af671543..d8803c3bbfdc 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -80,6 +80,7 @@
 #define ICIER_TEIE	0x40
 #define ICIER_RIE	0x20
 #define ICIER_NAKIE	0x10
+#define ICIER_SPIE	0x08
 
 #define ICSR2_NACKF	0x10
 
@@ -216,11 +217,10 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
 		return IRQ_NONE;
 	}
 
-	if (riic->is_last || riic->err)
+	if (riic->is_last || riic->err) {
+		riic_clear_set_bit(riic, 0, ICIER_SPIE, RIIC_ICIER);
 		writeb(ICCR2_SP, riic->base + RIIC_ICCR2);
-
-	writeb(0, riic->base + RIIC_ICIER);
-	complete(&riic->msg_done);
+	}
 
 	return IRQ_HANDLED;
 }
@@ -240,13 +240,13 @@ static irqreturn_t riic_rdrf_isr(int irq, void *data)
 
 	if (riic->bytes_left == 1) {
 		/* STOP must come before we set ACKBT! */
-		if (riic->is_last)
+		if (riic->is_last) {
+			riic_clear_set_bit(riic, 0, ICIER_SPIE, RIIC_ICIER);
 			writeb(ICCR2_SP, riic->base + RIIC_ICCR2);
+		}
 
 		riic_clear_set_bit(riic, 0, ICMR3_ACKBT, RIIC_ICMR3);
 
-		writeb(0, riic->base + RIIC_ICIER);
-		complete(&riic->msg_done);
 	} else {
 		riic_clear_set_bit(riic, ICMR3_ACKBT, 0, RIIC_ICMR3);
 	}
@@ -259,6 +259,21 @@ static irqreturn_t riic_rdrf_isr(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
+static irqreturn_t riic_stop_isr(int irq, void *data)
+{
+	struct riic_dev *riic = data;
+
+	/* read back registers to confirm writes have fully propagated */
+	writeb(0, riic->base + RIIC_ICSR2);
+	readb(riic->base + RIIC_ICSR2);
+	writeb(0, riic->base + RIIC_ICIER);
+	readb(riic->base + RIIC_ICIER);
+
+	complete(&riic->msg_done);
+
+	return IRQ_HANDLED;
+}
+
 static u32 riic_func(struct i2c_adapter *adap)
 {
 	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
@@ -326,6 +341,7 @@ static struct riic_irq_desc riic_irqs[] = {
 	{ .res_num = 0, .isr = riic_tend_isr, .name = "riic-tend" },
 	{ .res_num = 1, .isr = riic_rdrf_isr, .name = "riic-rdrf" },
 	{ .res_num = 2, .isr = riic_tdre_isr, .name = "riic-tdre" },
+	{ .res_num = 3, .isr = riic_stop_isr, .name = "riic-stop" },
 	{ .res_num = 5, .isr = riic_tend_isr, .name = "riic-nack" },
 };
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 08/24] ext4: do not use stripe_width if it is not set
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (5 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 06/24] staging: rtl8712u: Fix endian settings for structs describing network packets Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 09/24] i2c: riic: correctly finish transfers Levin, Alexander (Sasha Levin)
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jan Kara, Theodore Ts'o, Levin, Alexander (Sasha Levin)

From: Jan Kara <jack@suse.cz>

[ Upstream commit 5469d7c3087ecaf760f54b447f11af6061b7c897 ]

Avoid using stripe_width for sbi->s_stripe value if it is not actually
set. It prevents using the stride for sbi->s_stripe.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 fs/ext4/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 32941cd6d34b..8bdb0cc2722f 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2499,9 +2499,9 @@ static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
 
 	if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
 		ret = sbi->s_stripe;
-	else if (stripe_width <= sbi->s_blocks_per_group)
+	else if (stripe_width && stripe_width <= sbi->s_blocks_per_group)
 		ret = stripe_width;
-	else if (stride <= sbi->s_blocks_per_group)
+	else if (stride && stride <= sbi->s_blocks_per_group)
 		ret = stride;
 	else
 		ret = 0;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i)
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (11 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 11/24] perf tools: Only increase index if perf_evsel__new_idx() succeeds Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-08  2:27   ` Icenowy Zheng
  2017-10-07 22:37 ` [PATCH review for 4.4 15/24] xen/manage: correct return value check on xenbus_scanf() Levin, Alexander (Sasha Levin)
                   ` (9 subsequent siblings)
  22 siblings, 1 reply; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Icenowy Zheng, Vinod Koul, Levin, Alexander (Sasha Levin)

From: Icenowy Zheng <icenowy@aosc.xyz>

[ Upstream commit c429ceb1e18252122ba96b52e689dcf87103c186 ]

As 64-bit Allwinner H5 SoC has the same DMA engine with H3, the DMA
driver should be allowed to be built for ARM64, in order to make it work on H5.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/dma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index e6cd1a32025a..27b7b3a9bdd2 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -158,7 +158,7 @@ config DMA_SUN4I
 
 config DMA_SUN6I
 	tristate "Allwinner A31 SoCs DMA support"
-	depends on MACH_SUN6I || MACH_SUN8I || COMPILE_TEST
+	depends on MACH_SUN6I || MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST
 	depends on RESET_CONTROLLER
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 12/24] [media] cx231xx: Fix I2C on Internal Master 3 Bus
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (8 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 13/24] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 10/24] drm/amdgpu: when dpm disabled, also need to stop/start vce Levin, Alexander (Sasha Levin)
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Oleh Kravchenko, Mauro Carvalho Chehab, Levin, Alexander (Sasha Levin)

From: Oleh Kravchenko <oleg@kaa.org.ua>

[ Upstream commit 6c5da8031a3abfad259190d35f83d89568b72ee2 ]

Internal Master 3 Bus can send and receive only 4 bytes per time.

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/media/usb/cx231xx/cx231xx-core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c
index 19b0293312a0..07670117f922 100644
--- a/drivers/media/usb/cx231xx/cx231xx-core.c
+++ b/drivers/media/usb/cx231xx/cx231xx-core.c
@@ -356,7 +356,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev,
 	 */
 	if ((ven_req->wLength > 4) && ((ven_req->bRequest == 0x4) ||
 					(ven_req->bRequest == 0x5) ||
-					(ven_req->bRequest == 0x6))) {
+					(ven_req->bRequest == 0x6) ||
+
+					/* Internal Master 3 Bus can send
+					 * and receive only 4 bytes per time
+					 */
+					(ven_req->bRequest == 0x2))) {
 		unsend_size = 0;
 		pdata = ven_req->pBuff;
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 11/24] perf tools: Only increase index if perf_evsel__new_idx() succeeds
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (10 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 10/24] drm/amdgpu: when dpm disabled, also need to stop/start vce Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i) Levin, Alexander (Sasha Levin)
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Taeung Song, Jiri Olsa, Namhyung Kim, Peter Zijlstra, Wang Nan,
	Arnaldo Carvalho de Melo, Levin, Alexander (Sasha Levin)

From: Taeung Song <treeze.taeung@gmail.com>

[ Upstream commit 75fc5ae5cc53fff71041ecadeb3354a2b4c9fe42 ]

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1485952447-7013-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 tools/perf/util/parse-events.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 38304b7e4f81..e81dfb2e239c 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -291,10 +291,11 @@ __add_event(struct list_head *list, int *idx,
 
 	event_attr_init(attr);
 
-	evsel = perf_evsel__new_idx(attr, (*idx)++);
+	evsel = perf_evsel__new_idx(attr, *idx);
 	if (!evsel)
 		return NULL;
 
+	(*idx)++;
 	evsel->cpus     = cpu_map__get(cpus);
 	evsel->own_cpus = cpu_map__get(cpus);
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 10/24] drm/amdgpu: when dpm disabled, also need to stop/start vce.
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (9 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 12/24] [media] cx231xx: Fix I2C on Internal Master 3 Bus Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 11/24] perf tools: Only increase index if perf_evsel__new_idx() succeeds Levin, Alexander (Sasha Levin)
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Rex Zhu, Alex Deucher, Levin, Alexander (Sasha Levin)

From: Rex Zhu <Rex.Zhu@amd.com>

[ Upstream commit 28ed5504ab4b211a4e589e648e5ebd1e0caa7a6a ]

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index bb0da76051a1..e5da6f19b9b8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -284,6 +284,10 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work)
 			amdgpu_dpm_enable_vce(adev, false);
 		} else {
 			amdgpu_asic_set_vce_clocks(adev, 0, 0);
+			amdgpu_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+							    AMD_PG_STATE_GATE);
+			amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+							    AMD_CG_STATE_GATE);
 		}
 	} else {
 		schedule_delayed_work(&adev->vce.idle_work,
@@ -315,6 +319,11 @@ static void amdgpu_vce_note_usage(struct amdgpu_device *adev)
 			amdgpu_dpm_enable_vce(adev, true);
 		} else {
 			amdgpu_asic_set_vce_clocks(adev, 53300, 40000);
+			amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+							    AMD_CG_STATE_UNGATE);
+			amdgpu_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+							    AMD_PG_STATE_UNGATE);
+
 		}
 	}
 }
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 13/24] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (7 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 09/24] i2c: riic: correctly finish transfers Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 12/24] [media] cx231xx: Fix I2C on Internal Master 3 Bus Levin, Alexander (Sasha Levin)
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Archit Taneja, Laurent Pinchart, Rob Clark, Levin,
	Alexander (Sasha Levin)

From: Archit Taneja <architt@codeaurora.org>

[ Upstream commit 0bb70b82c2f91e4667f3c617505235efd6d77e46 ]

The commit "drm: bridge: Link encoder and bridge in core code" updated
the drm_bridge_attach() API to also include the drm_encoder pointer
the bridge attaches to.

The func msm_dsi_manager_bridge_init() now relies on the drm_encoder
pointer stored in msm_dsi->encoders to pass the encoder to the bridge
API.

msm_dsi->encoders is unfortunately set after this function is called,
resulting in us passing a NULL pointer to drm_brigde_attach. This
results in an error and the DSI driver probe fails.

Move the initialization of msm_dsi->encoders[] a bit up. Also, don't
try to set the encoder's bridge. That's now managed by the bridge
API.

Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/gpu/drm/msm/dsi/dsi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
index 6edcd6f57e70..b36e12eb89ef 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -205,6 +205,9 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
 		goto fail;
 	}
 
+	for (i = 0; i < MSM_DSI_ENCODER_NUM; i++)
+		msm_dsi->encoders[i] = encoders[i];
+
 	msm_dsi->bridge = msm_dsi_manager_bridge_init(msm_dsi->id);
 	if (IS_ERR(msm_dsi->bridge)) {
 		ret = PTR_ERR(msm_dsi->bridge);
@@ -213,11 +216,6 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
 		goto fail;
 	}
 
-	for (i = 0; i < MSM_DSI_ENCODER_NUM; i++) {
-		encoders[i]->bridge = msm_dsi->bridge;
-		msm_dsi->encoders[i] = encoders[i];
-	}
-
 	/*
 	 * check if the dsi encoder output is connected to a panel or an
 	 * external bridge. We create a connector only if we're connected to a
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 15/24] xen/manage: correct return value check on xenbus_scanf()
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (12 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i) Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 16/24] scsi: aacraid: Process Error for response I/O Levin, Alexander (Sasha Levin)
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jan Beulich, Jan Beulich, Boris Ostrovsky, Levin,
	Alexander (Sasha Levin)

From: Jan Beulich <JBeulich@suse.com>

[ Upstream commit 4fed1b125eb6252bde478665fc05d4819f774fa8 ]

A negative return value indicates an error; in fact the function at
present won't ever return zero.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/xen/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index e12bd3635f83..e8850b0e3272 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -275,7 +275,7 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
 	err = xenbus_transaction_start(&xbt);
 	if (err)
 		return;
-	if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) {
+	if (xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key) < 0) {
 		pr_err("Unable to read sysrq code in control/sysrq\n");
 		xenbus_transaction_end(xbt, 1);
 		return;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 17/24] platform/x86: intel_mid_thermal: Fix module autoload
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (14 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 16/24] scsi: aacraid: Process Error for response I/O Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 20/24] staging: lustre: ptlrpc: skip lock if export failed Levin, Alexander (Sasha Levin)
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Javier Martinez Canillas, Andy Shevchenko, Levin,
	Alexander (Sasha Levin)

From: Javier Martinez Canillas <javier@osg.samsung.com>

[ Upstream commit a93151a72061e944a4915458b1b1d6d505c03bbf ]

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias
$

After this patch:

$ modinfo drivers/platform/x86/intel_mid_thermal.ko | grep alias
alias:          platform:msic_thermal

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/platform/x86/intel_mid_thermal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index 9f713b832ba3..5c768c4627d3 100644
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@ -550,6 +550,7 @@ static const struct platform_device_id therm_id_table[] = {
 	{ "msic_thermal", 1 },
 	{ }
 };
+MODULE_DEVICE_TABLE(platform, therm_id_table);
 
 static struct platform_driver mid_thermal_driver = {
 	.driver = {
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 16/24] scsi: aacraid: Process Error for response I/O
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (13 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 15/24] xen/manage: correct return value check on xenbus_scanf() Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 17/24] platform/x86: intel_mid_thermal: Fix module autoload Levin, Alexander (Sasha Levin)
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Raghava Aditya Renukunta, Dave Carroll, Martin K . Petersen,
	Levin, Alexander (Sasha Levin)

From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>

[ Upstream commit 4ec57fb4edaec523f0f78a0449a3b063749ac58b ]

Make sure that the driver processes error conditions even in the fast
response path for response from the adapter.

Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Dave Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/scsi/aacraid/aachba.c | 289 ++++++++++++++++++++++--------------------
 1 file changed, 151 insertions(+), 138 deletions(-)

diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index e4c243748a97..de33801ca31e 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -2977,16 +2977,11 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
 		return;
 
 	BUG_ON(fibptr == NULL);
-	dev = fibptr->dev;
-
-	scsi_dma_unmap(scsicmd);
 
-	/* expose physical device if expose_physicald flag is on */
-	if (scsicmd->cmnd[0] == INQUIRY && !(scsicmd->cmnd[1] & 0x01)
-	  && expose_physicals > 0)
-		aac_expose_phy_device(scsicmd);
+	dev = fibptr->dev;
 
 	srbreply = (struct aac_srb_reply *) fib_data(fibptr);
+
 	scsicmd->sense_buffer[0] = '\0';  /* Initialize sense valid flag to false */
 
 	if (fibptr->flags & FIB_CONTEXT_FLAG_FASTRESP) {
@@ -2999,158 +2994,176 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
 		 */
 		scsi_set_resid(scsicmd, scsi_bufflen(scsicmd)
 				   - le32_to_cpu(srbreply->data_xfer_length));
-		/*
-		 * First check the fib status
-		 */
+	}
 
-		if (le32_to_cpu(srbreply->status) != ST_OK) {
-			int len;
 
-			printk(KERN_WARNING "aac_srb_callback: srb failed, status = %d\n", le32_to_cpu(srbreply->status));
-			len = min_t(u32, le32_to_cpu(srbreply->sense_data_size),
-				    SCSI_SENSE_BUFFERSIZE);
-			scsicmd->result = DID_ERROR << 16
-						| COMMAND_COMPLETE << 8
-						| SAM_STAT_CHECK_CONDITION;
-			memcpy(scsicmd->sense_buffer,
-					srbreply->sense_data, len);
-		}
+	scsi_dma_unmap(scsicmd);
 
-		/*
-		 * Next check the srb status
-		 */
-		switch ((le32_to_cpu(srbreply->srb_status))&0x3f) {
-		case SRB_STATUS_ERROR_RECOVERY:
-		case SRB_STATUS_PENDING:
-		case SRB_STATUS_SUCCESS:
-			scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
-			break;
-		case SRB_STATUS_DATA_OVERRUN:
-			switch (scsicmd->cmnd[0]) {
-			case  READ_6:
-			case  WRITE_6:
-			case  READ_10:
-			case  WRITE_10:
-			case  READ_12:
-			case  WRITE_12:
-			case  READ_16:
-			case  WRITE_16:
-				if (le32_to_cpu(srbreply->data_xfer_length)
-							< scsicmd->underflow)
-					printk(KERN_WARNING"aacraid: SCSI CMD underflow\n");
-				else
-					printk(KERN_WARNING"aacraid: SCSI CMD Data Overrun\n");
-				scsicmd->result = DID_ERROR << 16
-							| COMMAND_COMPLETE << 8;
-				break;
-			case INQUIRY: {
-				scsicmd->result = DID_OK << 16
-							| COMMAND_COMPLETE << 8;
-				break;
-			}
-			default:
-				scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
-				break;
-			}
-			break;
-		case SRB_STATUS_ABORTED:
-			scsicmd->result = DID_ABORT << 16 | ABORT << 8;
-			break;
-		case SRB_STATUS_ABORT_FAILED:
-			/*
-			 * Not sure about this one - but assuming the
-			 * hba was trying to abort for some reason
-			 */
-			scsicmd->result = DID_ERROR << 16 | ABORT << 8;
-			break;
-		case SRB_STATUS_PARITY_ERROR:
-			scsicmd->result = DID_PARITY << 16
-						| MSG_PARITY_ERROR << 8;
-			break;
-		case SRB_STATUS_NO_DEVICE:
-		case SRB_STATUS_INVALID_PATH_ID:
-		case SRB_STATUS_INVALID_TARGET_ID:
-		case SRB_STATUS_INVALID_LUN:
-		case SRB_STATUS_SELECTION_TIMEOUT:
-			scsicmd->result = DID_NO_CONNECT << 16
-						| COMMAND_COMPLETE << 8;
-			break;
+	/* expose physical device if expose_physicald flag is on */
+	if (scsicmd->cmnd[0] == INQUIRY && !(scsicmd->cmnd[1] & 0x01)
+	  && expose_physicals > 0)
+		aac_expose_phy_device(scsicmd);
 
-		case SRB_STATUS_COMMAND_TIMEOUT:
-		case SRB_STATUS_TIMEOUT:
-			scsicmd->result = DID_TIME_OUT << 16
-						| COMMAND_COMPLETE << 8;
-			break;
+	/*
+	 * First check the fib status
+	 */
 
-		case SRB_STATUS_BUSY:
-			scsicmd->result = DID_BUS_BUSY << 16
-						| COMMAND_COMPLETE << 8;
-			break;
+	if (le32_to_cpu(srbreply->status) != ST_OK) {
+		int len;
 
-		case SRB_STATUS_BUS_RESET:
-			scsicmd->result = DID_RESET << 16
-						| COMMAND_COMPLETE << 8;
-			break;
+		pr_warn("aac_srb_callback: srb failed, status = %d\n",
+				le32_to_cpu(srbreply->status));
+		len = min_t(u32, le32_to_cpu(srbreply->sense_data_size),
+			    SCSI_SENSE_BUFFERSIZE);
+		scsicmd->result = DID_ERROR << 16
+				| COMMAND_COMPLETE << 8
+				| SAM_STAT_CHECK_CONDITION;
+		memcpy(scsicmd->sense_buffer,
+				srbreply->sense_data, len);
+	}
 
-		case SRB_STATUS_MESSAGE_REJECTED:
+	/*
+	 * Next check the srb status
+	 */
+	switch ((le32_to_cpu(srbreply->srb_status))&0x3f) {
+	case SRB_STATUS_ERROR_RECOVERY:
+	case SRB_STATUS_PENDING:
+	case SRB_STATUS_SUCCESS:
+		scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
+		break;
+	case SRB_STATUS_DATA_OVERRUN:
+		switch (scsicmd->cmnd[0]) {
+		case  READ_6:
+		case  WRITE_6:
+		case  READ_10:
+		case  WRITE_10:
+		case  READ_12:
+		case  WRITE_12:
+		case  READ_16:
+		case  WRITE_16:
+			if (le32_to_cpu(srbreply->data_xfer_length)
+						< scsicmd->underflow)
+				pr_warn("aacraid: SCSI CMD underflow\n");
+			else
+				pr_warn("aacraid: SCSI CMD Data Overrun\n");
 			scsicmd->result = DID_ERROR << 16
-						| MESSAGE_REJECT << 8;
+					| COMMAND_COMPLETE << 8;
+			break;
+		case INQUIRY:
+			scsicmd->result = DID_OK << 16
+					| COMMAND_COMPLETE << 8;
 			break;
-		case SRB_STATUS_REQUEST_FLUSHED:
-		case SRB_STATUS_ERROR:
-		case SRB_STATUS_INVALID_REQUEST:
-		case SRB_STATUS_REQUEST_SENSE_FAILED:
-		case SRB_STATUS_NO_HBA:
-		case SRB_STATUS_UNEXPECTED_BUS_FREE:
-		case SRB_STATUS_PHASE_SEQUENCE_FAILURE:
-		case SRB_STATUS_BAD_SRB_BLOCK_LENGTH:
-		case SRB_STATUS_DELAYED_RETRY:
-		case SRB_STATUS_BAD_FUNCTION:
-		case SRB_STATUS_NOT_STARTED:
-		case SRB_STATUS_NOT_IN_USE:
-		case SRB_STATUS_FORCE_ABORT:
-		case SRB_STATUS_DOMAIN_VALIDATION_FAIL:
 		default:
+			scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
+			break;
+		}
+		break;
+	case SRB_STATUS_ABORTED:
+		scsicmd->result = DID_ABORT << 16 | ABORT << 8;
+		break;
+	case SRB_STATUS_ABORT_FAILED:
+		/*
+		 * Not sure about this one - but assuming the
+		 * hba was trying to abort for some reason
+		 */
+		scsicmd->result = DID_ERROR << 16 | ABORT << 8;
+		break;
+	case SRB_STATUS_PARITY_ERROR:
+		scsicmd->result = DID_PARITY << 16
+				| MSG_PARITY_ERROR << 8;
+		break;
+	case SRB_STATUS_NO_DEVICE:
+	case SRB_STATUS_INVALID_PATH_ID:
+	case SRB_STATUS_INVALID_TARGET_ID:
+	case SRB_STATUS_INVALID_LUN:
+	case SRB_STATUS_SELECTION_TIMEOUT:
+		scsicmd->result = DID_NO_CONNECT << 16
+				| COMMAND_COMPLETE << 8;
+		break;
+
+	case SRB_STATUS_COMMAND_TIMEOUT:
+	case SRB_STATUS_TIMEOUT:
+		scsicmd->result = DID_TIME_OUT << 16
+				| COMMAND_COMPLETE << 8;
+		break;
+
+	case SRB_STATUS_BUSY:
+		scsicmd->result = DID_BUS_BUSY << 16
+				| COMMAND_COMPLETE << 8;
+		break;
+
+	case SRB_STATUS_BUS_RESET:
+		scsicmd->result = DID_RESET << 16
+				| COMMAND_COMPLETE << 8;
+		break;
+
+	case SRB_STATUS_MESSAGE_REJECTED:
+		scsicmd->result = DID_ERROR << 16
+				| MESSAGE_REJECT << 8;
+		break;
+	case SRB_STATUS_REQUEST_FLUSHED:
+	case SRB_STATUS_ERROR:
+	case SRB_STATUS_INVALID_REQUEST:
+	case SRB_STATUS_REQUEST_SENSE_FAILED:
+	case SRB_STATUS_NO_HBA:
+	case SRB_STATUS_UNEXPECTED_BUS_FREE:
+	case SRB_STATUS_PHASE_SEQUENCE_FAILURE:
+	case SRB_STATUS_BAD_SRB_BLOCK_LENGTH:
+	case SRB_STATUS_DELAYED_RETRY:
+	case SRB_STATUS_BAD_FUNCTION:
+	case SRB_STATUS_NOT_STARTED:
+	case SRB_STATUS_NOT_IN_USE:
+	case SRB_STATUS_FORCE_ABORT:
+	case SRB_STATUS_DOMAIN_VALIDATION_FAIL:
+	default:
 #ifdef AAC_DETAILED_STATUS_INFO
-			printk(KERN_INFO "aacraid: SRB ERROR(%u) %s scsi cmd 0x%x - scsi status 0x%x\n",
-				le32_to_cpu(srbreply->srb_status) & 0x3F,
-				aac_get_status_string(
-					le32_to_cpu(srbreply->srb_status) & 0x3F),
-				scsicmd->cmnd[0],
-				le32_to_cpu(srbreply->scsi_status));
+		pr_info("aacraid: SRB ERROR(%u) %s scsi cmd 0x%x -scsi status 0x%x\n",
+			le32_to_cpu(srbreply->srb_status) & 0x3F,
+			aac_get_status_string(
+				le32_to_cpu(srbreply->srb_status) & 0x3F),
+			scsicmd->cmnd[0],
+			le32_to_cpu(srbreply->scsi_status));
 #endif
-			if ((scsicmd->cmnd[0] == ATA_12)
-				|| (scsicmd->cmnd[0] == ATA_16)) {
-					if (scsicmd->cmnd[2] & (0x01 << 5)) {
-						scsicmd->result = DID_OK << 16
-							| COMMAND_COMPLETE << 8;
-				break;
-				} else {
-					scsicmd->result = DID_ERROR << 16
-						| COMMAND_COMPLETE << 8;
-					break;
-				}
+		/*
+		 * When the CC bit is SET by the host in ATA pass thru CDB,
+		 *  driver is supposed to return DID_OK
+		 *
+		 * When the CC bit is RESET by the host, driver should
+		 *  return DID_ERROR
+		 */
+		if ((scsicmd->cmnd[0] == ATA_12)
+			|| (scsicmd->cmnd[0] == ATA_16)) {
+
+			if (scsicmd->cmnd[2] & (0x01 << 5)) {
+				scsicmd->result = DID_OK << 16
+					| COMMAND_COMPLETE << 8;
+			break;
 			} else {
 				scsicmd->result = DID_ERROR << 16
 					| COMMAND_COMPLETE << 8;
-				break;
+			break;
 			}
+		} else {
+			scsicmd->result = DID_ERROR << 16
+				| COMMAND_COMPLETE << 8;
+			break;
 		}
-		if (le32_to_cpu(srbreply->scsi_status)
-				== SAM_STAT_CHECK_CONDITION) {
-			int len;
+	}
+	if (le32_to_cpu(srbreply->scsi_status)
+			== SAM_STAT_CHECK_CONDITION) {
+		int len;
 
-			scsicmd->result |= SAM_STAT_CHECK_CONDITION;
-			len = min_t(u32, le32_to_cpu(srbreply->sense_data_size),
-				    SCSI_SENSE_BUFFERSIZE);
+		scsicmd->result |= SAM_STAT_CHECK_CONDITION;
+		len = min_t(u32, le32_to_cpu(srbreply->sense_data_size),
+			    SCSI_SENSE_BUFFERSIZE);
 #ifdef AAC_DETAILED_STATUS_INFO
-			printk(KERN_WARNING "aac_srb_callback: check condition, status = %d len=%d\n",
-						le32_to_cpu(srbreply->status), len);
+		pr_warn("aac_srb_callback: check condition, status = %d len=%d\n",
+					le32_to_cpu(srbreply->status), len);
 #endif
-			memcpy(scsicmd->sense_buffer,
-					srbreply->sense_data, len);
-		}
+		memcpy(scsicmd->sense_buffer,
+				srbreply->sense_data, len);
 	}
+
 	/*
 	 * OR in the scsi status (already shifted up a bit)
 	 */
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 18/24] staging: lustre: llite: don't invoke direct_IO for the EOF case
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (18 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 21/24] [media] exynos4-is: fimc-is: Unmap region obtained by of_iomap() Levin, Alexander (Sasha Levin)
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Yang Sheng, James Simmons, Greg Kroah-Hartman, Levin,
	Alexander (Sasha Levin)

From: Yang Sheng <yang.sheng@intel.com>

[ Upstream commit 77759771fb95420d23876cb104ab65c022613325 ]

The function generic_file_read_iter() does not check EOF
before invoke direct_IO callback. So we have to check it
ourselves.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8969
Reviewed-on: https://review.whamcloud.com/24552
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/staging/lustre/lustre/llite/rw26.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c
index 3da4c01e2159..adeefb31cbad 100644
--- a/drivers/staging/lustre/lustre/llite/rw26.c
+++ b/drivers/staging/lustre/lustre/llite/rw26.c
@@ -376,6 +376,10 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
 	if (!lli->lli_has_smd)
 		return -EBADF;
 
+	/* Check EOF by ourselves */
+	if (iov_iter_rw(iter) == READ && file_offset >= i_size_read(inode))
+		return 0;
+
 	/* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */
 	if ((file_offset & ~CFS_PAGE_MASK) || (count & ~CFS_PAGE_MASK))
 		return -EINVAL;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 22/24] mei: return error on notification request to a disconnected client
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (16 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 20/24] staging: lustre: ptlrpc: skip lock if export failed Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field Levin, Alexander (Sasha Levin)
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Alexander Usyskin, Tomas Winkler, Greg Kroah-Hartman, Levin,
	Alexander (Sasha Levin)

From: Alexander Usyskin <alexander.usyskin@intel.com>

[ Upstream commit 7c47d2ca0feca767479329da23523ed798acb854 ]

Request for a notification from a disconnected client will be ignored
silently by the FW but the caller should know that the operation hasn't
succeeded.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/misc/mei/client.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 2ff39fbc70d1..df268365e04e 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -1300,6 +1300,9 @@ int mei_cl_notify_request(struct mei_cl *cl, struct file *file, u8 request)
 		return -EOPNOTSUPP;
 	}
 
+	if (!mei_cl_is_connected(cl))
+		return -ENODEV;
+
 	rets = pm_runtime_get(dev->dev);
 	if (rets < 0 && rets != -EINPROGRESS) {
 		pm_runtime_put_noidle(dev->dev);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (17 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 22/24] mei: return error on notification request to a disconnected client Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 18/24] staging: lustre: llite: don't invoke direct_IO for the EOF case Levin, Alexander (Sasha Levin)
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: frank zago, James Simmons, Greg Kroah-Hartman, Levin,
	Alexander (Sasha Levin)

From: frank zago <fzago@cray.com>

[ Upstream commit 22aadb91c0a0055935109c175f5446abfb130702 ]

The function hai_dump_data_field will do a stack buffer
overrun when cat'ing /sys/fs/lustre/.../hsm/actions if an action has
some data in it.

hai_dump_data_field uses snprintf. But there is no check for
truncation, and the value returned by snprintf is used as-is.  The
coordinator code calls hai_dump_data_field with 12 bytes in the
buffer. The 6th byte of data is printed incompletely to make room for
the terminating NUL. However snprintf still returns 2, so when
hai_dump_data_field writes the final NUL, it does it outside the
reserved buffer, in the 13th byte of the buffer. This stack buffer
overrun hangs my VM.

Fix by checking that there is enough room for the next 2 characters
plus the NUL terminator. Don't print half bytes. Change the format to
02X instead of .2X, which makes more sense.

Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8171
Reviewed-on: http://review.whamcloud.com/20338
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jean-Baptiste Riaux <riaux.jb@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 .../staging/lustre/lustre/include/lustre/lustre_user.h | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index 80f8ec529424..8ed4558238fc 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -1063,23 +1063,21 @@ struct hsm_action_item {
  * \retval buffer
  */
 static inline char *hai_dump_data_field(struct hsm_action_item *hai,
-					char *buffer, int len)
+					char *buffer, size_t len)
 {
-	int i, sz, data_len;
+	int i, data_len;
 	char *ptr;
 
 	ptr = buffer;
-	sz = len;
 	data_len = hai->hai_len - sizeof(*hai);
-	for (i = 0 ; (i < data_len) && (sz > 0) ; i++) {
-		int cnt;
-
-		cnt = snprintf(ptr, sz, "%.2X",
-			       (unsigned char)hai->hai_data[i]);
-		ptr += cnt;
-		sz -= cnt;
+	for (i = 0; (i < data_len) && (len > 2); i++) {
+		snprintf(ptr, 3, "%02X", (unsigned char)hai->hai_data[i]);
+		ptr += 2;
+		len -= 2;
 	}
+
 	*ptr = '\0';
+
 	return buffer;
 }
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 21/24] [media] exynos4-is: fimc-is: Unmap region obtained by of_iomap()
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (19 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 18/24] staging: lustre: llite: don't invoke direct_IO for the EOF case Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 23/24] s390/dasd: check for device error pointer within state change interrupts Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 24/24] [media] bt8xx: fix memory leak Levin, Alexander (Sasha Levin)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Arvind Yadav, Sylwester Nawrocki, Mauro Carvalho Chehab, Levin,
	Alexander (Sasha Levin)

From: Arvind Yadav <arvind.yadav.cs@gmail.com>

[ Upstream commit 4742575cde1f3cee0ea6b41af42781672315b04b ]

Free memory mapping, if fimc_is_probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/media/platform/exynos4-is/fimc-is.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 49658ca39e51..a851f20dca23 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -815,12 +815,13 @@ static int fimc_is_probe(struct platform_device *pdev)
 	is->irq = irq_of_parse_and_map(dev->of_node, 0);
 	if (!is->irq) {
 		dev_err(dev, "no irq found\n");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto err_iounmap;
 	}
 
 	ret = fimc_is_get_clocks(is);
 	if (ret < 0)
-		return ret;
+		goto err_iounmap;
 
 	platform_set_drvdata(pdev, is);
 
@@ -880,6 +881,8 @@ static int fimc_is_probe(struct platform_device *pdev)
 	free_irq(is->irq, is);
 err_clk:
 	fimc_is_put_clocks(is);
+err_iounmap:
+	iounmap(is->pmu_regs);
 	return ret;
 }
 
@@ -935,6 +938,7 @@ static int fimc_is_remove(struct platform_device *pdev)
 	fimc_is_unregister_subdevs(is);
 	vb2_dma_contig_cleanup_ctx(is->alloc_ctx);
 	fimc_is_put_clocks(is);
+	iounmap(is->pmu_regs);
 	fimc_is_debugfs_remove(is);
 	release_firmware(is->fw.f_w);
 	fimc_is_free_cpu_memory(is);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 20/24] staging: lustre: ptlrpc: skip lock if export failed
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (15 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 17/24] platform/x86: intel_mid_thermal: Fix module autoload Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 22/24] mei: return error on notification request to a disconnected client Levin, Alexander (Sasha Levin)
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Alexander Boyko, James Simmons, Greg Kroah-Hartman, Levin,
	Alexander (Sasha Levin)

From: Alexander Boyko <alexander.boyko@seagate.com>

[ Upstream commit 4c43c27ddc461d8473cedd70f2549614641dfbc7 ]

This patch resolves IO vs eviction race.
After eviction failed export stayed at stale list,
a client had IO processing and reconnected during it.
A client sent brw rpc with last lock cookie and new connection.
The lock with failed export was found and assert was happened.
 (ost_handler.c:1812:ost_prolong_lock_one())
  ASSERTION( lock->l_export == opd->opd_exp ) failed:

 1. Skip the lock at ldlm_handle2lock if lock export failed.
 2. Validation of lock for IO was added at hpreq_check(). The lock
    searching is based on granted interval tree. If server doesn`t
    have a valid lock, it reply to client with ESTALE.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7702
Seagate-bug-id: MRP-2787
Reviewed-on: http://review.whamcloud.com/18120
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c |  7 +++++++
 drivers/staging/lustre/lustre/ptlrpc/service.c | 21 ++++++++-------------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index 7f8c70056ffd..040553d6e316 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -550,6 +550,13 @@ struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,
 	if (lock == NULL)
 		return NULL;
 
+	if (lock->l_export && lock->l_export->exp_failed) {
+		CDEBUG(D_INFO, "lock export failed: lock %p, exp %p\n",
+		       lock, lock->l_export);
+		LDLM_LOCK_PUT(lock);
+		return NULL;
+	}
+
 	/* It's unlikely but possible that someone marked the lock as
 	 * destroyed after we did handle2object on it */
 	if (flags == 0 && ((lock->l_flags & LDLM_FL_DESTROYED) == 0)) {
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index f45898f17793..6d3c25ccb297 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -1240,20 +1240,15 @@ static int ptlrpc_server_hpreq_init(struct ptlrpc_service_part *svcpt,
 		 * it may hit swab race at LU-1044. */
 		if (req->rq_ops->hpreq_check) {
 			rc = req->rq_ops->hpreq_check(req);
-			/**
-			 * XXX: Out of all current
-			 * ptlrpc_hpreq_ops::hpreq_check(), only
-			 * ldlm_cancel_hpreq_check() can return an error code;
-			 * other functions assert in similar places, which seems
-			 * odd. What also does not seem right is that handlers
-			 * for those RPCs do not assert on the same checks, but
-			 * rather handle the error cases. e.g. see
-			 * ost_rw_hpreq_check(), and ost_brw_read(),
-			 * ost_brw_write().
+			if (rc == -ESTALE) {
+				req->rq_status = rc;
+				ptlrpc_error(req);
+			}
+			/** can only return error,
+			 * 0 for normal request,
+			 *  or 1 for high priority request
 			 */
-			if (rc < 0)
-				return rc;
-			LASSERT(rc == 0 || rc == 1);
+			LASSERT(rc <= 1);
 		}
 
 		spin_lock_bh(&req->rq_export->exp_rpc_lock);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 24/24] [media] bt8xx: fix memory leak
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (21 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 23/24] s390/dasd: check for device error pointer within state change interrupts Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sudip Mukherjee, Sudip Mukherjee, Hans Verkuil,
	Mauro Carvalho Chehab, Levin, Alexander (Sasha Levin)

From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>

[ Upstream commit 6792eb0cf9310ec240b7e7c9bfa86dff4c758c68 ]

If dvb_attach() fails then we were just printing an error message and
exiting but the memory allocated to state was not released.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/media/pci/bt8xx/dvb-bt8xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c
index d407244fd1bc..bd0f5b195188 100644
--- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
@@ -680,6 +680,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
 		/*	DST is not a frontend, attaching the ASIC	*/
 		if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) {
 			pr_err("%s: Could not find a Twinhan DST\n", __func__);
+			kfree(state);
 			break;
 		}
 		/*	Attach other DST peripherals if any		*/
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH review for 4.4 23/24] s390/dasd: check for device error pointer within state change interrupts
  2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
                   ` (20 preceding siblings ...)
  2017-10-07 22:37 ` [PATCH review for 4.4 21/24] [media] exynos4-is: fimc-is: Unmap region obtained by of_iomap() Levin, Alexander (Sasha Levin)
@ 2017-10-07 22:37 ` Levin, Alexander (Sasha Levin)
  2017-10-07 22:37 ` [PATCH review for 4.4 24/24] [media] bt8xx: fix memory leak Levin, Alexander (Sasha Levin)
  22 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-07 22:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Stefan Haberland, Martin Schwidefsky, Levin, Alexander (Sasha Levin)

From: Stefan Haberland <sth@linux.vnet.ibm.com>

[ Upstream commit 2202134e48a3b50320aeb9e3dd1186833e9d7e66 ]

Check if the device pointer is valid. Just a sanity check since we already
are in the int handler of the device.

Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/s390/block/dasd.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 84c13dffa3a8..e7a6f1222642 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1635,8 +1635,11 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
 	/* check for for attention message */
 	if (scsw_dstat(&irb->scsw) & DEV_STAT_ATTENTION) {
 		device = dasd_device_from_cdev_locked(cdev);
-		device->discipline->check_attention(device, irb->esw.esw1.lpum);
-		dasd_put_device(device);
+		if (!IS_ERR(device)) {
+			device->discipline->check_attention(device,
+							    irb->esw.esw1.lpum);
+			dasd_put_device(device);
+		}
 	}
 
 	if (!cqr)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i)
  2017-10-07 22:37 ` [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i) Levin, Alexander (Sasha Levin)
@ 2017-10-08  2:27   ` Icenowy Zheng
  2017-10-24  2:19     ` Levin, Alexander (Sasha Levin)
  0 siblings, 1 reply; 26+ messages in thread
From: Icenowy Zheng @ 2017-10-08  2:27 UTC (permalink / raw)
  To: Levin, Alexander (Sasha Levin), linux-kernel, stable
  Cc: Icenowy Zheng, Vinod Koul



于 2017年10月8日 GMT+08:00 上午6:37:46, "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> 写到:
>From: Icenowy Zheng <icenowy@aosc.xyz>
>
>[ Upstream commit c429ceb1e18252122ba96b52e689dcf87103c186 ]
>
>As 64-bit Allwinner H5 SoC has the same DMA engine with H3, the DMA
>driver should be allowed to be built for ARM64, in order to make it
>work on H5.

There's no H5 support in 4.4/4.9.

This patch can be ignored.

>
>Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
>Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>Acked-by: Chen-Yu Tsai <wens@csie.org>
>Signed-off-by: Vinod Koul <vinod.koul@intel.com>
>Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
>---
> drivers/dma/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
>index e6cd1a32025a..27b7b3a9bdd2 100644
>--- a/drivers/dma/Kconfig
>+++ b/drivers/dma/Kconfig
>@@ -158,7 +158,7 @@ config DMA_SUN4I
> 
> config DMA_SUN6I
> 	tristate "Allwinner A31 SoCs DMA support"
>-	depends on MACH_SUN6I || MACH_SUN8I || COMPILE_TEST
>+	depends on MACH_SUN6I || MACH_SUN8I || (ARM64 && ARCH_SUNXI) ||
>COMPILE_TEST
> 	depends on RESET_CONTROLLER
> 	select DMA_ENGINE
> 	select DMA_VIRTUAL_CHANNELS

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i)
  2017-10-08  2:27   ` Icenowy Zheng
@ 2017-10-24  2:19     ` Levin, Alexander (Sasha Levin)
  0 siblings, 0 replies; 26+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-10-24  2:19 UTC (permalink / raw)
  To: Icenowy Zheng; +Cc: linux-kernel, stable, Icenowy Zheng, Vinod Koul

On Sun, Oct 08, 2017 at 10:27:45AM +0800, Icenowy Zheng wrote:
>
>
>于 2017年10月8日 GMT+08:00 上午6:37:46, "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> 写到:
>>From: Icenowy Zheng <icenowy@aosc.xyz>
>>
>>[ Upstream commit c429ceb1e18252122ba96b52e689dcf87103c186 ]
>>
>>As 64-bit Allwinner H5 SoC has the same DMA engine with H3, the DMA
>>driver should be allowed to be built for ARM64, in order to make it
>>work on H5.
>
>There's no H5 support in 4.4/4.9.
>
>This patch can be ignored.

Dropped, thanks!

-- 

Thanks,
Sasha

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-10-24  2:19 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 04/24] mfd: ab8500-sysctrl: Handle probe deferral Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 05/24] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 02/24] mmc: s3cmci: include linux/interrupt.h for tasklet_struct Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 03/24] ARM: pxa: Don't rely on public mmc header to include leds.h Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 07/24] ext4: fix stripe-unaligned allocations Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 06/24] staging: rtl8712u: Fix endian settings for structs describing network packets Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 08/24] ext4: do not use stripe_width if it is not set Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 09/24] i2c: riic: correctly finish transfers Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 13/24] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 12/24] [media] cx231xx: Fix I2C on Internal Master 3 Bus Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 10/24] drm/amdgpu: when dpm disabled, also need to stop/start vce Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 11/24] perf tools: Only increase index if perf_evsel__new_idx() succeeds Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i) Levin, Alexander (Sasha Levin)
2017-10-08  2:27   ` Icenowy Zheng
2017-10-24  2:19     ` Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 15/24] xen/manage: correct return value check on xenbus_scanf() Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 16/24] scsi: aacraid: Process Error for response I/O Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 17/24] platform/x86: intel_mid_thermal: Fix module autoload Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 20/24] staging: lustre: ptlrpc: skip lock if export failed Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 22/24] mei: return error on notification request to a disconnected client Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 18/24] staging: lustre: llite: don't invoke direct_IO for the EOF case Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 21/24] [media] exynos4-is: fimc-is: Unmap region obtained by of_iomap() Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 23/24] s390/dasd: check for device error pointer within state change interrupts Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 24/24] [media] bt8xx: fix memory leak Levin, Alexander (Sasha Levin)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).