Skip to contentSkip to conversation

4.19.85-stable review

PATCH NAK Greg Kroah-Hartman 14 participants 478 messages Nov 19, 2019 – Nov 22, 2019 Page 3 of 3

Subsystems (9)
lore
Share & tools
lore
author maintainer
#326 lore raw

PATCH 297/422 ARM: dts: ti: Fix SPI and I2C bus warnings

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit cc893871f092be9ac1184a78f9ae1e76b85d5317 ]

dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses.

arch/arm/boot/dts/am437x-idk-evm.dtb: Warning (spi_bus_bridge): /ocp@44000000/qspi@47900000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am437x-sk-evm.dtb: Warning (spi_bus_bridge): /ocp@44000000/qspi@47900000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am43x-epos-evm.dtb: Warning (spi_bus_bridge): /ocp@44000000/qspi@47900000: node name for SPI buses should be 'spi' arch/arm/boot/dts/omap3-n9.dtb: Warning (i2c_bus_reg): /ocp@68000000/i2c@48060000/ak8975@0f: I2C bus unit address format error, expected "f" arch/arm/boot/dts/am335x-osd3358-sm-red.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/pressure@78: I2C bus unit address format error, expected "76" arch/arm/boot/dts/am335x-boneblack.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/tda19988: I2C bus unit address format error, expected "70" arch/arm/boot/dts/am335x-boneblack-wireless.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/tda19988: I2C bus unit address format error, expected "70" arch/arm/boot/dts/am335x-sancloud-bbe.dtb: Warning (i2c_bus_reg): /ocp/i2c@44e0b000/tda19988: I2C bus unit address format error, expected "70" arch/arm/boot/dts/am571x-idk.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am572x-idk.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am574x-idk.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am57xx-cl-som-am57x.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am57xx-sbc-am57x.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra72-evm.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra72-evm-revc.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra76-evm.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/dra7-evm.dtb: Warning (spi_bus_bridge): /ocp/qspi@4b300000: node name for SPI buses should be 'spi' arch/arm/boot/dts/am335x-pdu001.dtb: Warning (spi_bus_reg): /ocp/spi@481a0000/cfaf240320a032t: SPI bus unit address format error, expected "0" arch/arm/boot/dts/keystone-k2g-evm.dtb: Warning (spi_bus_bridge): /soc@0/qspi@2940000: node name for SPI buses should be 'spi' arch/arm/boot/dts/keystone-k2g-ice.dtb: Warning (spi_bus_bridge): /soc@0/qspi@2940000: node name for SPI buses should be 'spi'

Cc "Benoît Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Santosh Shilimkar <[email protected]>
[[email protected]: fixed mode to 644 for am335x-osd3358-sm-red.dts while at it]
---
 arch/arm/boot/dts/am335x-boneblack-common.dtsi | 2 +-
 arch/arm/boot/dts/am335x-osd3358-sm-red.dts    | 2 +-
 arch/arm/boot/dts/am335x-pdu001.dts            | 2 +-
 arch/arm/boot/dts/am4372.dtsi                  | 2 +-
 arch/arm/boot/dts/am57xx-cl-som-am57x.dts      | 2 +-
 arch/arm/boot/dts/dra7.dtsi                    | 2 +-
 arch/arm/boot/dts/keystone-k2g.dtsi            | 2 +-
 arch/arm/boot/dts/omap2.dtsi                   | 4 ++--
 arch/arm/boot/dts/omap2430.dtsi                | 2 +-
 arch/arm/boot/dts/omap3-n9.dts                 | 2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
arch/arm/boot/dts/am335x-boneblack-common.dtsi +1 -1
index 325daae40278a..21bc1173fa6b9 100644
@@ -88,7 +88,7 @@
 };
 
 &i2c0 {
-	tda19988: tda19988 {
+	tda19988: tda19988@70 {
 		compatible = "nxp,tda998x";
 		reg = <0x70>;
 
arch/arm/boot/dts/am335x-osd3358-sm-red.dts +1 -1
index 4d969013f99a6..d9e92671055bd 100644
@@ -161,7 +161,7 @@
 		invensense,key = [4e cc 7e eb f6 1e 35 22 00 34 0d 65 32 e9 94 89];*/
 	};
 
-	bmp280: pressure@78 {
+	bmp280: pressure@76 {
 		compatible = "bosch,bmp280";
 		reg = <0x76>;
 	};
arch/arm/boot/dts/am335x-pdu001.dts +1 -1
index 1ad530a39a957..34fb63ef420f5 100644
@@ -373,7 +373,7 @@
 	ti,pindir-d0-out-d1-in;
 	status = "okay";
 
-	cfaf240320a032t {
+	display-controller@0 {
 		compatible = "orisetech,otm3225a";
 		reg = <0>;
 		spi-max-frequency = <1000000>;
arch/arm/boot/dts/am4372.dtsi +1 -1
index cf1e4f747242f..09e58fb810d95 100644
@@ -1101,7 +1101,7 @@
 			};
 		};
 
-		qspi: qspi@47900000 {
+		qspi: spi@47900000 {
 			compatible = "ti,am4372-qspi";
 			reg = <0x47900000 0x100>,
 			      <0x30000000 0x4000000>;
arch/arm/boot/dts/am57xx-cl-som-am57x.dts +1 -1
index 203266f884807..52ae8eef60fc3 100644
@@ -518,7 +518,7 @@
 	};
 
 	/* touch controller */
-	ads7846@0 {
+	touchscreen@1 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&ads7846_pins>;
 
arch/arm/boot/dts/dra7.dtsi +1 -1
index 2cb45ddd2ae3b..9136b3cf9a2ce 100644
@@ -1369,7 +1369,7 @@
 			status = "disabled";
 		};
 
-		qspi: qspi@4b300000 {
+		qspi: spi@4b300000 {
 			compatible = "ti,dra7xxx-qspi";
 			reg = <0x4b300000 0x100>,
 			      <0x5c000000 0x4000000>;
arch/arm/boot/dts/keystone-k2g.dtsi +1 -1
index 738b44cf2b0bb..1c833105d6c54 100644
@@ -416,7 +416,7 @@
 			clock-names = "fck", "mmchsdb_fck";
 		};
 
-		qspi: qspi@2940000 {
+		qspi: spi@2940000 {
 			compatible = "ti,k2g-qspi", "cdns,qspi-nor";
 			#address-cells = <1>;
 			#size-cells = <0>;
arch/arm/boot/dts/omap2.dtsi +2 -2
index f1d6de8b3c193..000bf16de6517 100644
@@ -114,7 +114,7 @@
 			dma-names = "tx", "rx";
 		};
 
-		mcspi1: mcspi@48098000 {
+		mcspi1: spi@48098000 {
 			compatible = "ti,omap2-mcspi";
 			ti,hwmods = "mcspi1";
 			reg = <0x48098000 0x100>;
@@ -125,7 +125,7 @@
 				    "tx2", "rx2", "tx3", "rx3";
 		};
 
-		mcspi2: mcspi@4809a000 {
+		mcspi2: spi@4809a000 {
 			compatible = "ti,omap2-mcspi";
 			ti,hwmods = "mcspi2";
 			reg = <0x4809a000 0x100>;
arch/arm/boot/dts/omap2430.dtsi +1 -1
index 84635eeb99cd4..7f57af2f10acb 100644
@@ -285,7 +285,7 @@
 			ti,timer-alwon;
 		};
 
-		mcspi3: mcspi@480b8000 {
+		mcspi3: spi@480b8000 {
 			compatible = "ti,omap2-mcspi";
 			ti,hwmods = "mcspi3";
 			reg = <0x480b8000 0x100>;
arch/arm/boot/dts/omap3-n9.dts +1 -1
index ded5fcf084eb7..1f91646b89516 100644
@@ -40,7 +40,7 @@
 };
 
 &i2c3 {
-	ak8975@0f {
+	ak8975@f {
 		compatible = "asahi-kasei,ak8975";
 		reg = <0x0f>;
 	};
Signature · 1 line
2.20.1
author maintainer
#327 lore raw

PATCH 298/422 f2fs: avoid infinite loop in f2fs_alloc_nid

In reply to Greg Kroah-Hartman

From: Jaegeuk Kim <[email protected]>

[ Upstream commit f84262b0862d43b71b3e80a036cdd9d82e620367 ]

If we have an error in f2fs_build_free_nids, we're able to fall into a loop to find free nids.

---
 fs/f2fs/node.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fs/f2fs/node.c +3 -2
index aa8f19e1bdb3d..e5d474681471c 100644
@@ -2367,8 +2367,9 @@ retry:
 	spin_unlock(&nm_i->nid_list_lock);
 
 	/* Let's scan nat pages and its caches to get free nids */
-	f2fs_build_free_nids(sbi, true, false);
-	goto retry;
+	if (!f2fs_build_free_nids(sbi, true, false))
+		goto retry;
+	return false;
 }
 
 /*
Signature · 1 line
2.20.1
author maintainer
#328 lore raw

PATCH 299/422 f2fs: fix to recover inodes uid/gid during POR

In reply to Greg Kroah-Hartman

From: Chao Yu <[email protected]>

[ Upstream commit dc4cd1257c86451cec3e8e352cc376348e4f4af4 ]

Step to reproduce this bug:
1. logon as root
2. mount -t f2fs /dev/sdd /mnt;
3. touch /mnt/file;
4. chown system /mnt/file; chgrp system /mnt/file;
5. xfs_io -f /mnt/file -c "fsync";
6. godown /mnt;
7. umount /mnt;
8. mount -t f2fs /dev/sdd /mnt;

After step 8) we will expect file's uid/gid are all system, but during recovery, these two fields were not been recovered, fix it.

---
 fs/f2fs/recovery.c | 2 ++
 1 file changed, 2 insertions(+)
fs/f2fs/recovery.c +2 -0
index 2c3be4c3c626f..2c5d2c25d37e3 100644
@@ -216,6 +216,8 @@ static void recover_inode(struct inode *inode, struct page *page)
 	char *name;
 
 	inode->i_mode = le16_to_cpu(raw->i_mode);
+	i_uid_write(inode, le32_to_cpu(raw->i_uid));
+	i_gid_write(inode, le32_to_cpu(raw->i_gid));
 	f2fs_i_size_write(inode, le64_to_cpu(raw->i_size));
 	inode->i_atime.tv_sec = le64_to_cpu(raw->i_atime);
 	inode->i_ctime.tv_sec = le64_to_cpu(raw->i_ctime);
Signature · 1 line
2.20.1
author maintainer
#329 lore raw

PATCH 300/422 ARM: dts: ux500: Correct SCU unit address

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 2f217d24ecaec2012e628d21e244eef0608656a4 ]

The unit address of the Cortex-A9 SCU device node contains one zero too many. Remove it.

---
 arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +1 -1
index 2310a4e97768c..3dc0028e108b3 100644
@@ -197,7 +197,7 @@
 			      <0xa0410100 0x100>;
 		};
 
-		scu@a04100000 {
+		scu@a0410000 {
 			compatible = "arm,cortex-a9-scu";
 			reg = <0xa0410000 0x100>;
 		};
Signature · 1 line
2.20.1
author maintainer
#330 lore raw

PATCH 301/422 ARM: dts: ux500: Fix LCDA clock line muxing

In reply to Greg Kroah-Hartman

From: Linus Walleij <[email protected]>

[ Upstream commit ecde29569e3484e1d0a032bf4074449bce4d4a03 ]

The "lcdaclk_b_1" group is muxed with the function "lcd" but needs a separate entry to be muxed in with "lcda" rather than "lcd".

---
 arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ste-href-family-pinctrl.dtsi +6 -2
index 5c5cea232743d..1ec193b0c5065 100644
@@ -607,16 +607,20 @@
 
 			mcde {
 				lcd_default_mode: lcd_default {
-					default_mux {
+					default_mux1 {
 						/* Mux in VSI0 and all the data lines */
 						function = "lcd";
 						groups =
 						"lcdvsi0_a_1", /* VSI0 for LCD */
 						"lcd_d0_d7_a_1", /* Data lines */
 						"lcd_d8_d11_a_1", /* TV-out */
-						"lcdaclk_b_1", /* Clock line for TV-out */
 						"lcdvsi1_a_1"; /* VSI1 for HDMI */
 					};
+					default_mux2 {
+						function = "lcda";
+						groups =
+						"lcdaclk_b_1"; /* Clock line for TV-out */
+					};
 					default_cfg1 {
 						pins =
 						"GPIO68_E1", /* VSI0 */
Signature · 1 line
2.20.1
author maintainer
#331 lore raw

PATCH 302/422 ARM: dts: ste: Fix SPI controller node names

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit 2f967f9e9fa076affb711da1a8389b5d33814fc6 ]

SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks.

---
 arch/arm/boot/dts/ste-dbx5x0.dtsi     | 4 ++--
 arch/arm/boot/dts/ste-hrefprev60.dtsi | 2 +-
 arch/arm/boot/dts/ste-snowball.dts    | 2 +-
 arch/arm/boot/dts/ste-u300.dts        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/ste-dbx5x0.dtsi +2 -2
index 3dc0028e108b3..986767735e249 100644
@@ -878,7 +878,7 @@
 			power-domains = <&pm_domains DOMAIN_VAPE>;
 		};
 
-		ssp@80002000 {
+		spi@80002000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x80002000 0x1000>;
 			interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
@@ -892,7 +892,7 @@
 			power-domains = <&pm_domains DOMAIN_VAPE>;
 		};
 
-		ssp@80003000 {
+		spi@80003000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x80003000 0x1000>;
 			interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/ste-hrefprev60.dtsi +1 -1
index 3f14b4df69b4e..94eeb7f1c9478 100644
@@ -57,7 +57,7 @@
 			};
 		};
 
-		ssp@80002000 {
+		spi@80002000 {
 			/*
 			 * On the first generation boards, this SSP/SPI port was connected
 			 * to the AB8500.
arch/arm/boot/dts/ste-snowball.dts +1 -1
index b0b94d0530985..603890461ae0f 100644
@@ -376,7 +376,7 @@
 			pinctrl-1 = <&i2c3_sleep_mode>;
 		};
 
-		ssp@80002000 {
+		spi@80002000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&ssp0_snowball_mode>;
 		};
arch/arm/boot/dts/ste-u300.dts +1 -1
index 62ecb6a2fa39e..1bd1aba3322f1 100644
@@ -442,7 +442,7 @@
 			dma-names = "rx";
 		};
 
-		spi: ssp@c0006000 {
+		spi: spi@c0006000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0xc0006000 0x1000>;
 			interrupt-parent = <&vica>;
Signature · 1 line
2.20.1
author maintainer
#332 lore raw

PATCH 303/422 spi: pic32: Use proper enum in dmaengine_prep_slave_rg

In reply to Greg Kroah-Hartman

From: Nathan Chancellor <[email protected]>

[ Upstream commit 8cfde7847d5ed0bb77bace41519572963e43cd17 ]

Clang warns when one enumerated type is converted implicitly to another:

drivers/spi/spi-pic32.c:323:8: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion]

                                          DMA_FROM_DEVICE,
                                          ^~~~~~~~~~~~~~~
drivers/spi/spi-pic32.c:333:8: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
                                          DMA_TO_DEVICE,
                                          ^~~~~~~~~~~~~

2 warnings generated.

Use the proper enums from dma_transfer_direction (DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2, DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1) to satify Clang.

---
 drivers/spi/spi-pic32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-pic32.c +2 -2
index f8a45af1fa9f2..288002f6c613e 100644
@@ -320,7 +320,7 @@ static int pic32_spi_dma_transfer(struct pic32_spi *pic32s,
 	desc_rx = dmaengine_prep_slave_sg(master->dma_rx,
 					  xfer->rx_sg.sgl,
 					  xfer->rx_sg.nents,
-					  DMA_FROM_DEVICE,
+					  DMA_DEV_TO_MEM,
 					  DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
 	if (!desc_rx) {
 		ret = -EINVAL;
@@ -330,7 +330,7 @@ static int pic32_spi_dma_transfer(struct pic32_spi *pic32s,
 	desc_tx = dmaengine_prep_slave_sg(master->dma_tx,
 					  xfer->tx_sg.sgl,
 					  xfer->tx_sg.nents,
-					  DMA_TO_DEVICE,
+					  DMA_MEM_TO_DEV,
 					  DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
 	if (!desc_tx) {
 		ret = -EINVAL;
Signature · 1 line
2.20.1
author maintainer
#333 lore raw

PATCH 304/422 crypto: chacha20 - Fix chacha20_block() keystream alignment (again)

In reply to Greg Kroah-Hartman

From: Eric Biggers <[email protected]>

[ Upstream commit a5e9f557098e54af44ade5d501379be18435bfbf ]

In commit 9f480faec58c ("crypto: chacha20 - Fix keystream alignment for chacha20_block()"), I had missed that chacha20_block() can be called directly on the buffer passed to get_random_bytes(), which can have any alignment. So, while my commit didn't break anything, it didn't fully solve the alignment problems.

Revert my solution and just update chacha20_block() to use put_unaligned_le32(), so the output buffer need not be aligned. This is simpler, and on many CPUs it's the same speed.

But, I kept the 'tmp' buffers in extract_crng_user() and _get_random_bytes() 4-byte aligned, since that alignment is actually needed for _crng_backtrack_protect() too.

---
 crypto/chacha20_generic.c |  7 ++++---
 drivers/char/random.c     | 24 ++++++++++++------------
 include/crypto/chacha20.h |  3 +--
 lib/chacha20.c            |  6 +++---
 4 files changed, 20 insertions(+), 20 deletions(-)
crypto/chacha20_generic.c +4 -3
index e451c3cb6a56e..3ae96587caf9a 100644
@@ -18,20 +18,21 @@
 static void chacha20_docrypt(u32 *state, u8 *dst, const u8 *src,
 			     unsigned int bytes)
 {
-	u32 stream[CHACHA20_BLOCK_WORDS];
+	/* aligned to potentially speed up crypto_xor() */
+	u8 stream[CHACHA20_BLOCK_SIZE] __aligned(sizeof(long));
 
 	if (dst != src)
 		memcpy(dst, src, bytes);
 
 	while (bytes >= CHACHA20_BLOCK_SIZE) {
 		chacha20_block(state, stream);
-		crypto_xor(dst, (const u8 *)stream, CHACHA20_BLOCK_SIZE);
+		crypto_xor(dst, stream, CHACHA20_BLOCK_SIZE);
 		bytes -= CHACHA20_BLOCK_SIZE;
 		dst += CHACHA20_BLOCK_SIZE;
 	}
 	if (bytes) {
 		chacha20_block(state, stream);
-		crypto_xor(dst, (const u8 *)stream, bytes);
+		crypto_xor(dst, stream, bytes);
 	}
 }
 
drivers/char/random.c +12 -12
index 0a84b7f468ad0..86fe1df902393 100644
@@ -433,9 +433,9 @@ static int crng_init_cnt = 0;
 static unsigned long crng_global_init_time = 0;
 #define CRNG_INIT_CNT_THRESH (2*CHACHA20_KEY_SIZE)
 static void _extract_crng(struct crng_state *crng,
-			  __u32 out[CHACHA20_BLOCK_WORDS]);
+			  __u8 out[CHACHA20_BLOCK_SIZE]);
 static void _crng_backtrack_protect(struct crng_state *crng,
-				    __u32 tmp[CHACHA20_BLOCK_WORDS], int used);
+				    __u8 tmp[CHACHA20_BLOCK_SIZE], int used);
 static void process_random_ready_list(void);
 static void _get_random_bytes(void *buf, int nbytes);
 
@@ -929,7 +929,7 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
 	unsigned long	flags;
 	int		i, num;
 	union {
-		__u32	block[CHACHA20_BLOCK_WORDS];
+		__u8	block[CHACHA20_BLOCK_SIZE];
 		__u32	key[8];
 	} buf;
 
@@ -976,7 +976,7 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
 }
 
 static void _extract_crng(struct crng_state *crng,
-			  __u32 out[CHACHA20_BLOCK_WORDS])
+			  __u8 out[CHACHA20_BLOCK_SIZE])
 {
 	unsigned long v, flags;
 
@@ -993,7 +993,7 @@ static void _extract_crng(struct crng_state *crng,
 	spin_unlock_irqrestore(&crng->lock, flags);
 }
 
-static void extract_crng(__u32 out[CHACHA20_BLOCK_WORDS])
+static void extract_crng(__u8 out[CHACHA20_BLOCK_SIZE])
 {
 	struct crng_state *crng = NULL;
 
@@ -1011,7 +1011,7 @@ static void extract_crng(__u32 out[CHACHA20_BLOCK_WORDS])
  * enough) to mutate the CRNG key to provide backtracking protection.
  */
 static void _crng_backtrack_protect(struct crng_state *crng,
-				    __u32 tmp[CHACHA20_BLOCK_WORDS], int used)
+				    __u8 tmp[CHACHA20_BLOCK_SIZE], int used)
 {
 	unsigned long	flags;
 	__u32		*s, *d;
@@ -1023,14 +1023,14 @@ static void _crng_backtrack_protect(struct crng_state *crng,
 		used = 0;
 	}
 	spin_lock_irqsave(&crng->lock, flags);
-	s = &tmp[used / sizeof(__u32)];
+	s = (__u32 *) &tmp[used];
 	d = &crng->state[4];
 	for (i=0; i < 8; i++)
 		*d++ ^= *s++;
 	spin_unlock_irqrestore(&crng->lock, flags);
 }
 
-static void crng_backtrack_protect(__u32 tmp[CHACHA20_BLOCK_WORDS], int used)
+static void crng_backtrack_protect(__u8 tmp[CHACHA20_BLOCK_SIZE], int used)
 {
 	struct crng_state *crng = NULL;
 
@@ -1046,7 +1046,7 @@ static void crng_backtrack_protect(__u32 tmp[CHACHA20_BLOCK_WORDS], int used)
 static ssize_t extract_crng_user(void __user *buf, size_t nbytes)
 {
 	ssize_t ret = 0, i = CHACHA20_BLOCK_SIZE;
-	__u32 tmp[CHACHA20_BLOCK_WORDS];
+	__u8 tmp[CHACHA20_BLOCK_SIZE] __aligned(4);
 	int large_request = (nbytes > 256);
 
 	while (nbytes) {
@@ -1625,7 +1625,7 @@ static void _warn_unseeded_randomness(const char *func_name, void *caller,
  */
 static void _get_random_bytes(void *buf, int nbytes)
 {
-	__u32 tmp[CHACHA20_BLOCK_WORDS];
+	__u8 tmp[CHACHA20_BLOCK_SIZE] __aligned(4);
 
 	trace_get_random_bytes(nbytes, _RET_IP_);
 
@@ -2251,7 +2251,7 @@ u64 get_random_u64(void)
 	batch = raw_cpu_ptr(&batched_entropy_u64);
 	spin_lock_irqsave(&batch->batch_lock, flags);
 	if (batch->position % ARRAY_SIZE(batch->entropy_u64) == 0) {
-		extract_crng((__u32 *)batch->entropy_u64);
+		extract_crng((u8 *)batch->entropy_u64);
 		batch->position = 0;
 	}
 	ret = batch->entropy_u64[batch->position++];
@@ -2278,7 +2278,7 @@ u32 get_random_u32(void)
 	batch = raw_cpu_ptr(&batched_entropy_u32);
 	spin_lock_irqsave(&batch->batch_lock, flags);
 	if (batch->position % ARRAY_SIZE(batch->entropy_u32) == 0) {
-		extract_crng(batch->entropy_u32);
+		extract_crng((u8 *)batch->entropy_u32);
 		batch->position = 0;
 	}
 	ret = batch->entropy_u32[batch->position++];
include/crypto/chacha20.h +1 -2
index b83d66073db03..f76302d99e2be 100644
@@ -13,13 +13,12 @@
 #define CHACHA20_IV_SIZE	16
 #define CHACHA20_KEY_SIZE	32
 #define CHACHA20_BLOCK_SIZE	64
-#define CHACHA20_BLOCK_WORDS	(CHACHA20_BLOCK_SIZE / sizeof(u32))
 
 struct chacha20_ctx {
 	u32 key[8];
 };
 
-void chacha20_block(u32 *state, u32 *stream);
+void chacha20_block(u32 *state, u8 *stream);
 void crypto_chacha20_init(u32 *state, struct chacha20_ctx *ctx, u8 *iv);
 int crypto_chacha20_setkey(struct crypto_skcipher *tfm, const u8 *key,
 			   unsigned int keysize);
lib/chacha20.c +3 -3
index c1cc50fb68c9f..d907fec6a9ed1 100644
@@ -16,9 +16,9 @@
 #include <asm/unaligned.h>
 #include <crypto/chacha20.h>
 
-void chacha20_block(u32 *state, u32 *stream)
+void chacha20_block(u32 *state, u8 *stream)
 {
-	u32 x[16], *out = stream;
+	u32 x[16];
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(x); i++)
@@ -67,7 +67,7 @@ void chacha20_block(u32 *state, u32 *stream)
 	}
 
 	for (i = 0; i < ARRAY_SIZE(x); i++)
-		out[i] = cpu_to_le32(x[i] + state[i]);
+		put_unaligned_le32(x[i] + state[i], &stream[i * sizeof(u32)]);
 
 	state[12]++;
 }
Signature · 1 line
2.20.1
author maintainer
#334 lore raw

PATCH 305/422 cpufeature: avoid warning when compiling with clang

In reply to Greg Kroah-Hartman

From: Stefan Agner <[email protected]>

[ Upstream commit c785896b21dd8e156326ff660050b0074d3431df ]

The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to warnings when building the kernel with Clang:
arch/arm/crypto/aes-ce-glue.c:450:1: warning: variable
'cpu_feature_match_AES' is not needed and will not be emitted [-Wunneeded-internal-declaration]
module_cpu_feature_match(AES, aes_init);
^

Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused").

Fixes 67bad2fdb754 ("cpu: add generic support for CPU feature based module autoloading")
---
 include/linux/cpufeature.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/cpufeature.h +1 -1
index 986c06c88d814..84d3c81b59781 100644
@@ -45,7 +45,7 @@
  * 'asm/cpufeature.h' of your favorite architecture.
  */
 #define module_cpu_feature_match(x, __initfunc)			\
-static struct cpu_feature const cpu_feature_match_ ## x[] =	\
+static struct cpu_feature const __maybe_unused cpu_feature_match_ ## x[] = \
 	{ { .feature = cpu_feature(x) }, { } };			\
 MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x);		\
 								\
Signature · 1 line
2.20.1
author maintainer
#335 lore raw

PATCH 306/422 crypto: arm/crc32 - avoid warning when compiling with Clang

In reply to Greg Kroah-Hartman

From: Stefan Agner <[email protected]>

[ Upstream commit cd560235d8f9ddd94aa51e1c4dabdf3212b9b241 ]

The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to a warning when building the kernel with Clang:
arch/arm/crypto/crc32-ce-glue.c:239:33: warning: variable
'crc32_cpu_feature' is not needed and will not be emitted [-Wunneeded-internal-declaration]

  static const struct cpu_feature crc32_cpu_feature[] = {
                                  ^

Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused").

Fixes 2a9faf8b7e43 ("crypto: arm/crc32 - enable module autoloading based on CPU feature bits")
---
 arch/arm/crypto/crc32-ce-glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/crypto/crc32-ce-glue.c +1 -1
index 96e62ec105d06..cd9e93b46c2dd 100644
@@ -236,7 +236,7 @@ static void __exit crc32_pmull_mod_exit(void)
 				  ARRAY_SIZE(crc32_pmull_algs));
 }
 
-static const struct cpu_feature crc32_cpu_feature[] = {
+static const struct cpu_feature __maybe_unused crc32_cpu_feature[] = {
 	{ cpu_feature(CRC32) }, { cpu_feature(PMULL) }, { }
 };
 MODULE_DEVICE_TABLE(cpu, crc32_cpu_feature);
Signature · 1 line
2.20.1
author maintainer
#336 lore raw

PATCH 307/422 ARM: dts: marvell: Fix SPI and I2C bus warnings

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit cf680cc5251487b9a39919c3cda31a108af19cf8 ]

dtc has new checks for I2C and SPI buses. Fix the warnings in node names and unit-addresses.

arch/arm/boot/dts/dove-cubox.dtb: Warning (i2c_bus_reg): /i2c-mux/i2c@0/clock-generator: I2C bus unit address format error, expected "60" arch/arm/boot/dts/dove-cubox-es.dtb: Warning (i2c_bus_reg): /i2c-mux/i2c@0/clock-generator: I2C bus unit address format error, expected "60" arch/arm/boot/dts/dove-cubox.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-cubox-es.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-dove-db.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-sbc-a510.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@10600: node name for SPI buses should be 'spi' arch/arm/boot/dts/dove-sbc-a510.dtb: Warning (spi_bus_bridge): /mbus/internal-regs/spi-ctrl@14600: node name for SPI buses should be 'spi' arch/arm/boot/dts/orion5x-kuroboxpro.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lschl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lsgl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32" arch/arm/boot/dts/orion5x-linkstation-lswtgl.dtb: Warning (i2c_bus_reg): /soc/internal-regs/i2c@11000/rtc: I2C bus unit address format error, expected "32"

Cc Jason Cooper <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Sebastian Hesselbarth <[email protected]>
Cc Gregory Clement <[email protected]>
---
 arch/arm/boot/dts/dove-cubox.dts           | 2 +-
 arch/arm/boot/dts/dove.dtsi                | 6 +++---
 arch/arm/boot/dts/orion5x-linkstation.dtsi | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/dove-cubox.dts +1 -1
index 580e3cbcfbf7c..3e1584e787aec 100644
@@ -87,7 +87,7 @@
 	status = "okay";
 	clock-frequency = <100000>;
 
-	si5351: clock-generator {
+	si5351: clock-generator@60 {
 		compatible = "silabs,si5351a-msop";
 		reg = <0x60>;
 		#address-cells = <1>;
arch/arm/boot/dts/dove.dtsi +3 -3
index 4a0a5115b2984..250ad0535e8cc 100644
@@ -155,7 +155,7 @@
 				  0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800   /* CESA SRAM  2k */
 				  0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU  SRAM  2k */
 
-			spi0: spi-ctrl@10600 {
+			spi0: spi@10600 {
 				compatible = "marvell,orion-spi";
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -168,7 +168,7 @@
 				status = "disabled";
 			};
 
-			i2c: i2c-ctrl@11000 {
+			i2c: i2c@11000 {
 				compatible = "marvell,mv64xxx-i2c";
 				reg = <0x11000 0x20>;
 				#address-cells = <1>;
@@ -218,7 +218,7 @@
 				status = "disabled";
 			};
 
-			spi1: spi-ctrl@14600 {
+			spi1: spi@14600 {
 				compatible = "marvell,orion-spi";
 				#address-cells = <1>;
 				#size-cells = <0>;
arch/arm/boot/dts/orion5x-linkstation.dtsi +1 -1
index ebd93df5d07a8..b6c9b85951ea6 100644
@@ -156,7 +156,7 @@
 &i2c {
 	status = "okay";
 
-	rtc {
+	rtc@32 {
 		compatible = "ricoh,rs5c372a";
 		reg = <0x32>;
 	};
Signature · 1 line
2.20.1
author maintainer
#337 lore raw

PATCH 308/422 x86/mce-inject: Reset injection struct after injection

In reply to Greg Kroah-Hartman

From: Borislav Petkov <[email protected]>

[ Upstream commit 7401a633c34adc7aefd3edfec60074cb0475a3e8 ]

Clear the MCE struct which is used for collecting the injection details after injection.

Also, populate it with more details from the machine.

---
 arch/x86/kernel/cpu/mcheck/mce-inject.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/x86/kernel/cpu/mcheck/mce-inject.c +6 -0
index ff1c00b695aed..1ceccc4a5472c 100644
@@ -106,6 +106,9 @@ static void setup_inj_struct(struct mce *m)
 	memset(m, 0, sizeof(struct mce));
 
 	m->cpuvendor = boot_cpu_data.x86_vendor;
+	m->time	     = ktime_get_real_seconds();
+	m->cpuid     = cpuid_eax(1);
+	m->microcode = boot_cpu_data.microcode;
 }
 
 /* Update fake mce registers on current CPU. */
@@ -580,6 +583,9 @@ static int inj_bank_set(void *data, u64 val)
 	m->bank = val;
 	do_inject();
 
+	/* Reset injection struct */
+	setup_inj_struct(&i_mce);
+
 	return 0;
 }
 
Signature · 1 line
2.20.1
author maintainer
#338 lore raw

PATCH 309/422 ARM: dts: stm32: enable display on stm32mp157c-ev1 board

In reply to Greg Kroah-Hartman

From: Yannick Fertré <[email protected]>

[ Upstream commit 67330599f93672bd351123c729e2591a460fd24c ]

Enable panel raydium RM68200, DSI bridge & display controller.

---
 arch/arm/boot/dts/stm32mp157c-ev1.dts | 73 ++++++++++++++++++++++++---
 1 file changed, 67 insertions(+), 6 deletions(-)
arch/arm/boot/dts/stm32mp157c-ev1.dts +67 -6
index 372bc2ea6b921..063ee8ac5dcbd 100644
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "stm32mp157c-ed1.dts"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
@@ -19,6 +20,58 @@
 		serial0 = &uart4;
 		ethernet0 = &ethernet0;
 	};
+
+	panel_backlight: panel-backlight {
+		compatible = "gpio-backlight";
+		gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
+		default-on;
+		status = "okay";
+	};
+};
+
+&cec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cec_pins_a>;
+	status = "okay";
+};
+
+&dsi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			dsi_in: endpoint {
+				remote-endpoint = <&ltdc_ep0_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			dsi_out: endpoint {
+				remote-endpoint = <&dsi_panel_in>;
+			};
+		};
+	};
+
+	panel-dsi@0 {
+		compatible = "raydium,rm68200";
+		reg = <0>;
+		reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
+		backlight = <&panel_backlight>;
+		status = "okay";
+
+		port {
+			dsi_panel_in: endpoint {
+				remote-endpoint = <&dsi_out>;
+			};
+		};
+	};
 };
 
 &ethernet0 {
@@ -40,12 +93,6 @@
 	};
 };
 
-&cec {
-	pinctrl-names = "default";
-	pinctrl-0 = <&cec_pins_a>;
-	status = "okay";
-};
-
 &i2c2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c2_pins_a>;
@@ -62,6 +109,20 @@
 	status = "okay";
 };
 
+&ltdc {
+	status = "okay";
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ltdc_ep0_out: endpoint@0 {
+			reg = <0>;
+			remote-endpoint = <&dsi_in>;
+		};
+	};
+};
+
 &m_can1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&m_can1_pins_a>;
Signature · 1 line
2.20.1
author maintainer
#339 lore raw

PATCH 310/422 ARM: dts: clearfog: fix sdhci supply property name

In reply to Greg Kroah-Hartman

From: Baruch Siach <[email protected]>

[ Upstream commit e807f0298144c06740022a2f900d86b7f115595e ]

The vmmc phandle, like all power supply property names, must have the '-supply' suffix.

---
 arch/arm/boot/dts/armada-388-clearfog.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-388-clearfog.dtsi +1 -1
index 7c6ad2afb0947..1b0d0680c8b62 100644
@@ -48,7 +48,7 @@
 					     &clearfog_sdhci_cd_pins>;
 				pinctrl-names = "default";
 				status = "okay";
-				vmmc = <&reg_3p3v>;
+				vmmc-supply = <&reg_3p3v>;
 				wp-inverted;
 			};
 
Signature · 1 line
2.20.1
author maintainer
#340 lore raw

PATCH 311/422 ARM: dts: stm32: Fix SPI controller node names

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit 1ba23b1df0bb6eec430408614c3a11280941e112 ]

SPI controller nodes should be named 'spi' rather than 'qspi'. Fixing the name enables dtc SPI bus checks.

---
 arch/arm/boot/dts/stm32mp157c.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/stm32mp157c.dtsi +1 -1
index 185541a5b69fb..c50c36baba758 100644
@@ -947,7 +947,7 @@
 			dma-requests = <48>;
 		};
 
-		qspi: qspi@58003000 {
+		qspi: spi@58003000 {
 			compatible = "st,stm32f469-qspi";
 			reg = <0x58003000 0x1000>, <0x70000000 0x10000000>;
 			reg-names = "qspi", "qspi_mm";
Signature · 1 line
2.20.1
author maintainer
#341 lore raw

PATCH 312/422 bnx2x: Ignore bandwidth attention in single function mode

In reply to Greg Kroah-Hartman

From: Shahed Shaikh <[email protected]>

[ Upstream commit 75a110a1783ef8324ffd763b24f4ac268253cbca ]

This is a workaround for FW bug -
MFW generates bandwidth attention in single function mode, which is only expected to be generated in multi function mode. This undesired attention in SF mode results in incorrect HW configuration and resulting into Tx timeout.

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +10 -0
index 68c62e32e8820..af57568c922eb 100644
@@ -3540,6 +3540,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
  */
 static void bnx2x_config_mf_bw(struct bnx2x *bp)
 {
+	/* Workaround for MFW bug.
+	 * MFW is not supposed to generate BW attention in
+	 * single function mode.
+	 */
+	if (!IS_MF(bp)) {
+		DP(BNX2X_MSG_MCP,
+		   "Ignoring MF BW config in single function mode\n");
+		return;
+	}
+
 	if (bp->link_vars.link_up) {
 		bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX);
 		bnx2x_link_sync_notify(bp);
Signature · 1 line
2.20.1
author maintainer
#342 lore raw

PATCH 313/422 PCI/AER: Take reference on error devices

In reply to Greg Kroah-Hartman

From: Keith Busch <[email protected]>

[ Upstream commit 60271ab044a53edb9dcbe76bebea2221c4ff04d9 ]

Error handling may be running in parallel with a hot removal. Reference count the device during AER handling so the device can not be freed while AER wants to reference it.

---
 drivers/pci/pcie/aer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/pcie/aer.c +2 -1
index 637d638f73da5..ffbbd759683c5 100644
@@ -866,7 +866,7 @@ void cper_print_aer(struct pci_dev *dev, int aer_severity,
 static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev)
 {
 	if (e_info->error_dev_num < AER_MAX_MULTI_ERR_DEVICES) {
-		e_info->dev[e_info->error_dev_num] = dev;
+		e_info->dev[e_info->error_dev_num] = pci_dev_get(dev);
 		e_info->error_dev_num++;
 		return 0;
 	}
@@ -1013,6 +1013,7 @@ static void handle_error_source(struct pci_dev *dev, struct aer_err_info *info)
 		pcie_do_nonfatal_recovery(dev);
 	else if (info->severity == AER_FATAL)
 		pcie_do_fatal_recovery(dev, PCIE_PORT_SERVICE_AER);
+	pci_dev_put(dev);
 }
 
 #ifdef CONFIG_ACPI_APEI_PCIEAER
Signature · 1 line
2.20.1
author maintainer
#343 lore raw

PATCH 314/422 PCI/AER: Dont read upstream ports below fatal errors

In reply to Greg Kroah-Hartman

From: Keith Busch <[email protected]>

[ Upstream commit 9d938ea53b265ed6df6cdd1715d971f0235fdbfc ]

The AER driver has never read the config space of an endpoint that reported a fatal error because the link to that device is considered unreliable.

An ERR_FATAL from an upstream port almost certainly indicates an error on its upstream link, so we can't expect to reliably read its config space for the same reason.

---
 drivers/pci/pcie/aer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/pcie/aer.c +3 -2
index ffbbd759683c5..5c3ea7254c6ae 100644
@@ -1116,8 +1116,9 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
 			&info->mask);
 		if (!(info->status & ~info->mask))
 			return 0;
-	} else if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-		info->severity == AER_NONFATAL) {
+	} else if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
+	           pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM ||
+		   info->severity == AER_NONFATAL) {
 
 		/* Link is still healthy for IO reads */
 		pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS,
Signature · 1 line
2.20.1
author maintainer
#344 lore raw

PATCH 315/422 PCI/ERR: Use slot reset if available

In reply to Greg Kroah-Hartman

From: Keith Busch <[email protected]>

[ Upstream commit c4eed62a214330908eec11b0dc170d34fa50b412 ]

The secondary bus reset may have link side effects that a hotplug capable port may incorrectly react to. Use the slot specific reset for hotplug ports, fixing the undesirable link down-up handling during error recovering.

[bhelgaas: fold in
https://lore.kernel.org/linux-pci/[email protected]
for issue reported by Stephen Rothwell <[email protected]>]

---
 drivers/pci/pci.c      | 37 +++++++++++++++++++++++++++++++++++++
 drivers/pci/pci.h      |  2 ++
 drivers/pci/pcie/aer.c |  2 +-
 drivers/pci/pcie/err.c |  2 +-
 drivers/pci/slot.c     |  1 -
 5 files changed, 41 insertions(+), 3 deletions(-)
drivers/pci/pci.c +37 -0
index 2baf1f82f8933..c9f51fc24563c 100644
@@ -35,6 +35,8 @@
 #include <linux/aer.h>
 #include "pci.h"
 
+DEFINE_MUTEX(pci_slot_mutex);
+
 const char *pci_power_names[] = {
 	"error", "D0", "D1", "D2", "D3hot", "D3cold", "unknown",
 };
@@ -5191,6 +5193,41 @@ static int pci_bus_reset(struct pci_bus *bus, int probe)
 	return ret;
 }
 
+/**
+ * pci_bus_error_reset - reset the bridge's subordinate bus
+ * @bridge: The parent device that connects to the bus to reset
+ *
+ * This function will first try to reset the slots on this bus if the method is
+ * available. If slot reset fails or is not available, this will fall back to a
+ * secondary bus reset.
+ */
+int pci_bus_error_reset(struct pci_dev *bridge)
+{
+	struct pci_bus *bus = bridge->subordinate;
+	struct pci_slot *slot;
+
+	if (!bus)
+		return -ENOTTY;
+
+	mutex_lock(&pci_slot_mutex);
+	if (list_empty(&bus->slots))
+		goto bus_reset;
+
+	list_for_each_entry(slot, &bus->slots, list)
+		if (pci_probe_reset_slot(slot))
+			goto bus_reset;
+
+	list_for_each_entry(slot, &bus->slots, list)
+		if (pci_slot_reset(slot, 0))
+			goto bus_reset;
+
+	mutex_unlock(&pci_slot_mutex);
+	return 0;
+bus_reset:
+	mutex_unlock(&pci_slot_mutex);
+	return pci_bus_reset(bridge->subordinate, 0);
+}
+
 /**
  * pci_probe_reset_bus - probe whether a PCI bus can be reset
  * @bus: PCI bus to probe
drivers/pci/pci.h +2 -0
index ab25752f00d96..e9ede82ee2c25 100644
@@ -35,6 +35,7 @@ int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vmai,
 
 int pci_probe_reset_function(struct pci_dev *dev);
 int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
+int pci_bus_error_reset(struct pci_dev *dev);
 
 /**
  * struct pci_platform_pm_ops - Firmware PM callbacks
@@ -136,6 +137,7 @@ static inline void pci_remove_legacy_files(struct pci_bus *bus) { return; }
 
 /* Lock for read/write access to pci device and bus lists */
 extern struct rw_semaphore pci_bus_sem;
+extern struct mutex pci_slot_mutex;
 
 extern raw_spinlock_t pci_lock;
 
drivers/pci/pcie/aer.c +1 -1
index 5c3ea7254c6ae..1563e22600eca 100644
@@ -1528,7 +1528,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
 	reg32 &= ~ROOT_PORT_INTR_ON_MESG_MASK;
 	pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, reg32);
 
-	rc = pci_bridge_secondary_bus_reset(dev);
+	rc = pci_bus_error_reset(dev);
 	pci_printk(KERN_DEBUG, dev, "Root Port link has been reset\n");
 
 	/* Clear Root Error Status */
drivers/pci/pcie/err.c +1 -1
index 708fd3a0d6466..12c1205e1d804 100644
@@ -177,7 +177,7 @@ static pci_ers_result_t default_reset_link(struct pci_dev *dev)
 {
 	int rc;
 
-	rc = pci_bridge_secondary_bus_reset(dev);
+	rc = pci_bus_error_reset(dev);
 	pci_printk(KERN_DEBUG, dev, "downstream link has been reset\n");
 	return rc ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED;
 }
drivers/pci/slot.c +0 -1
index e634229ece895..a32897f83ee51 100644
@@ -14,7 +14,6 @@
 
 struct kset *pci_slots_kset;
 EXPORT_SYMBOL_GPL(pci_slots_kset);
-static DEFINE_MUTEX(pci_slot_mutex);
 
 static ssize_t pci_slot_attr_show(struct kobject *kobj,
 					struct attribute *attr, char *buf)
Signature · 1 line
2.20.1
author maintainer
#345 lore raw

PATCH 316/422 samples/bpf: fix compilation failure

In reply to Greg Kroah-Hartman

From: Prashant Bhole <[email protected]>

[ Upstream commit 32c009798385ce21080beaa87a9b95faad3acd1e ]

following commit:
commit d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") added struct bpf_flow_keys which conflicts with the struct with same name in sockex2_kern.c and sockex3_kern.c

similar to commit:
commit 534e0e52bc23 ("samples/bpf: fix a compilation failure") we tried the rename it "flow_keys" but it also conflicted with struct having same name in include/net/flow_dissector.h. Hence renaming the struct to "flow_key_record". Also, this commit doesn't fix the compilation error completely because the similar struct is present in sockex3_kern.c. Hence renaming it in both files sockex3_user.c and sockex3_kern.c

---
 samples/bpf/sockex2_kern.c | 11 ++++++-----
 samples/bpf/sockex3_kern.c |  8 ++++----
 samples/bpf/sockex3_user.c |  4 ++--
 3 files changed, 12 insertions(+), 11 deletions(-)
samples/bpf/sockex2_kern.c +6 -5
index f58acfc925561..f2f9dbc021b0d 100644
@@ -14,7 +14,7 @@ struct vlan_hdr {
 	__be16 h_vlan_encapsulated_proto;
 };
 
-struct bpf_flow_keys {
+struct flow_key_record {
 	__be32 src;
 	__be32 dst;
 	union {
@@ -59,7 +59,7 @@ static inline __u32 ipv6_addr_hash(struct __sk_buff *ctx, __u64 off)
 }
 
 static inline __u64 parse_ip(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto,
-			     struct bpf_flow_keys *flow)
+			     struct flow_key_record *flow)
 {
 	__u64 verlen;
 
@@ -83,7 +83,7 @@ static inline __u64 parse_ip(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto
 }
 
 static inline __u64 parse_ipv6(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto,
-			       struct bpf_flow_keys *flow)
+			       struct flow_key_record *flow)
 {
 	*ip_proto = load_byte(skb,
 			      nhoff + offsetof(struct ipv6hdr, nexthdr));
@@ -96,7 +96,8 @@ static inline __u64 parse_ipv6(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_pro
 	return nhoff;
 }
 
-static inline bool flow_dissector(struct __sk_buff *skb, struct bpf_flow_keys *flow)
+static inline bool flow_dissector(struct __sk_buff *skb,
+				  struct flow_key_record *flow)
 {
 	__u64 nhoff = ETH_HLEN;
 	__u64 ip_proto;
@@ -198,7 +199,7 @@ struct bpf_map_def SEC("maps") hash_map = {
 SEC("socket2")
 int bpf_prog2(struct __sk_buff *skb)
 {
-	struct bpf_flow_keys flow = {};
+	struct flow_key_record flow = {};
 	struct pair *value;
 	u32 key;
 
samples/bpf/sockex3_kern.c +4 -4
index 95907f8d2b17d..c527b57d3ec8a 100644
@@ -61,7 +61,7 @@ struct vlan_hdr {
 	__be16 h_vlan_encapsulated_proto;
 };
 
-struct bpf_flow_keys {
+struct flow_key_record {
 	__be32 src;
 	__be32 dst;
 	union {
@@ -88,7 +88,7 @@ static inline __u32 ipv6_addr_hash(struct __sk_buff *ctx, __u64 off)
 }
 
 struct globals {
-	struct bpf_flow_keys flow;
+	struct flow_key_record flow;
 };
 
 struct bpf_map_def SEC("maps") percpu_map = {
@@ -114,14 +114,14 @@ struct pair {
 
 struct bpf_map_def SEC("maps") hash_map = {
 	.type = BPF_MAP_TYPE_HASH,
-	.key_size = sizeof(struct bpf_flow_keys),
+	.key_size = sizeof(struct flow_key_record),
 	.value_size = sizeof(struct pair),
 	.max_entries = 1024,
 };
 
 static void update_stats(struct __sk_buff *skb, struct globals *g)
 {
-	struct bpf_flow_keys key = g->flow;
+	struct flow_key_record key = g->flow;
 	struct pair *value;
 
 	value = bpf_map_lookup_elem(&hash_map, &key);
samples/bpf/sockex3_user.c +2 -2
index 22f74d0e14934..9d02e0404719a 100644
@@ -13,7 +13,7 @@
 #define PARSE_IP_PROG_FD (prog_fd[0])
 #define PROG_ARRAY_FD (map_fd[0])
 
-struct flow_keys {
+struct flow_key_record {
 	__be32 src;
 	__be32 dst;
 	union {
@@ -64,7 +64,7 @@ int main(int argc, char **argv)
 	(void) f;
 
 	for (i = 0; i < 5; i++) {
-		struct flow_keys key = {}, next_key;
+		struct flow_key_record key = {}, next_key;
 		struct pair value;
 
 		sleep(1);
Signature · 1 line
2.20.1
author maintainer
#346 lore raw

PATCH 317/422 net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider

In reply to Greg Kroah-Hartman

From: Florian Fainelli <[email protected]>

[ Upstream commit b78ac6ecd1b6b46f8767cbafa95a7b0b51b87ad8 ]

Allow the configuration of the MDIO clock divider when the Device Tree contains 'clock-frequency' property (similar to I2C and SPI buses). Because the hardware may have lost its state during suspend/resume, re-apply the MDIO clock divider upon resumption.

---
 .../bindings/net/brcm,unimac-mdio.txt         |  3 +
 drivers/net/phy/mdio-bcm-unimac.c             | 83 ++++++++++++++++++-
 2 files changed, 84 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt +3 -0
index 4648948f7c3b8..e15589f477876 100644
@@ -19,6 +19,9 @@ Optional properties:
 - interrupt-names: must be "mdio_done_error" when there is a share interrupt fed
   to this hardware block, or must be "mdio_done" for the first interrupt and
   "mdio_error" for the second when there are separate interrupts
+- clocks: A reference to the clock supplying the MDIO bus controller
+- clock-frequency: the MDIO bus clock that must be output by the MDIO bus
+  hardware, if absent, the default hardware values are used
 
 Child nodes of this MDIO bus controller node are standard Ethernet PHY device
 nodes as described in Documentation/devicetree/bindings/net/phy.txt
drivers/net/phy/mdio-bcm-unimac.c +81 -2

130 lines not on this page · raw message

Signature · 1 line
2.20.1
author maintainer
#347 lore raw

PATCH 318/422 net: micrel: fix return type of ndo_start_xmit function

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit 2b49117a5abee8478b0470cba46ac74f93b4a479 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.

Found by coccinelle.

---
 drivers/net/ethernet/micrel/ks8695net.c  | 2 +-
 drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/micrel/ks8695net.c +1 -1
index bd51e057e9150..b881f5d4a7f9e 100644
@@ -1164,7 +1164,7 @@ ks8695_timeout(struct net_device *ndev)
  *	sk_buff and adds it to the TX ring. It then kicks the TX DMA
  *	engine to ensure transmission begins.
  */
-static int
+static netdev_tx_t
 ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	struct ks8695_priv *ksp = netdev_priv(ndev);
drivers/net/ethernet/micrel/ks8851_mll.c +2 -2
index 0e9719fbc6243..35f8c9ef204d9 100644
@@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
  * spin_lock_irqsave is required because tx and rx should be mutual exclusive.
  * So while tx is in-progress, prevent IRQ interrupt from happenning.
  */
-static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
-	int retv = NETDEV_TX_OK;
+	netdev_tx_t retv = NETDEV_TX_OK;
 	struct ks_net *ks = netdev_priv(netdev);
 
 	disable_irq(netdev->irq);
Signature · 1 line
2.20.1
author maintainer
#348 lore raw

PATCH 319/422 net: freescale: fix return type of ndo_start_xmit function

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit 06983aa526c759ebdf43f202d8d0491d9494e2f4 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.

Found by coccinelle.

---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c        | 3 ++-
 drivers/net/ethernet/freescale/fec_mpc52xx.c          | 3 ++-
 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 3 ++-
 drivers/net/ethernet/freescale/gianfar.c              | 4 ++--
 drivers/net/ethernet/freescale/ucc_geth.c             | 3 ++-
 5 files changed, 10 insertions(+), 6 deletions(-)
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +2 -1
index d7915cd68dc14..462bb8c4f80c9 100644
@@ -2046,7 +2046,8 @@ static inline int dpaa_xmit(struct dpaa_priv *priv,
 	return 0;
 }
 
-static int dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
+static netdev_tx_t
+dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
 {
 	const int queue_mapping = skb_get_queue_mapping(skb);
 	bool nonlinear = skb_is_nonlinear(skb);
drivers/net/ethernet/freescale/fec_mpc52xx.c +2 -1
index 6d7269d87a850..b90bab72efdb3 100644
@@ -305,7 +305,8 @@ static int mpc52xx_fec_close(struct net_device *dev)
  * invariant will hold if you make sure that the netif_*_queue()
  * calls are done at the proper times.
  */
-static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct mpc52xx_fec_priv *priv = netdev_priv(dev);
 	struct bcom_fec_bd *bd;
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +2 -1
index 2c2976a2dda6b..7c548ed535da5 100644
@@ -481,7 +481,8 @@ static struct sk_buff *tx_skb_align_workaround(struct net_device *dev,
 }
 #endif
 
-static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
 	cbd_t __iomem *bdp;
drivers/net/ethernet/freescale/gianfar.c +2 -2
index f27f9bae1a4ac..c97c4edfa31bc 100644
@@ -112,7 +112,7 @@
 const char gfar_driver_version[] = "2.0";
 
 static int gfar_enet_open(struct net_device *dev);
-static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t gfar_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static void gfar_reset_task(struct work_struct *work);
 static void gfar_timeout(struct net_device *dev);
 static int gfar_close(struct net_device *dev);
@@ -2334,7 +2334,7 @@ static inline bool gfar_csum_errata_76(struct gfar_private *priv,
 /* This is called by the kernel when a frame is ready for transmission.
  * It is pointed to by the dev->hard_start_xmit function pointer
  */
-static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct gfar_private *priv = netdev_priv(dev);
 	struct gfar_priv_tx_q *tx_queue = NULL;
drivers/net/ethernet/freescale/ucc_geth.c +2 -1
index 1e2b53a934fb9..a5bf02ae4bc5c 100644
@@ -3085,7 +3085,8 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
 
 /* This is called by the kernel when a frame is ready for transmission. */
 /* It is pointed to by the dev->hard_start_xmit function pointer */
-static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ucc_geth_private *ugeth = netdev_priv(dev);
 #ifdef CONFIG_UGETH_TX_ON_DEMAND
Signature · 1 line
2.20.1
author maintainer
#349 lore raw

PATCH 320/422 x86/CPU: Use correct macros for Cyrix calls

In reply to Greg Kroah-Hartman

From: Matthew Whitehead <[email protected]>

[ Upstream commit 03b099bdcdf7125d4a63dc9ddeefdd454e05123d ]

There are comments in processor-cyrix.h advising you to _not_ make calls using the deprecated macros in this style:

  setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);

This is because it expands the macro into a non-functioning calling sequence. The calling order must be:

  outb(CX86_CCR2, 0x22);
  inb(0x23);
Quoted 1 line

From the comments:

* When using the old macros a line like
* setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
* gets expanded to:
* do {
* outb((CX86_CCR2), 0x22);
* outb((({
* outb((CX86_CCR2), 0x22);
* inb(0x23);
* }) | 0x88), 0x23);
* } while (0);

The new macros fix this problem, so use them instead.

---
 arch/x86/kernel/cpu/cyrix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/cyrix.c +1 -1
index fa61c870ada94..1d9b8aaea06c8 100644
@@ -437,7 +437,7 @@ static void cyrix_identify(struct cpuinfo_x86 *c)
 			/* enable MAPEN  */
 			setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);
 			/* enable cpuid  */
-			setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);
+			setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80);
 			/* disable MAPEN */
 			setCx86(CX86_CCR3, ccr3);
 			local_irq_restore(flags);
Signature · 1 line
2.20.1
author maintainer
#350 lore raw

PATCH 321/422 x86/CPU: Change query logic so CPUID is enabled before testing

In reply to Greg Kroah-Hartman

From: Matthew Whitehead <[email protected]>

[ Upstream commit 2893cc8ff892fa74972d8dc0e1d0dc65116daaa3 ]

Presently we check first if CPUID is enabled. If it is not already enabled, then we next call identify_cpu_without_cpuid() and clear X86_FEATURE_CPUID.

Unfortunately, identify_cpu_without_cpuid() is the function where CPUID becomes _enabled_ on Cyrix 6x86/6x86L CPUs.

Reverse the calling sequence so that CPUID is first enabled, and then check a second time to see if the feature has now been activated.

[ bp: Massage commit message and remove trailing whitespace. ]

---
 arch/x86/kernel/cpu/common.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/common.c +3 -1
index 1e07814f02bc6..a6458ab499c21 100644
@@ -1133,6 +1133,9 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 	memset(&c->x86_capability, 0, sizeof c->x86_capability);
 	c->extended_cpuid_level = 0;
 
+	if (!have_cpuid_p())
+		identify_cpu_without_cpuid(c);
+
 	/* cyrix could have cpuid enabled via c_identify()*/
 	if (have_cpuid_p()) {
 		cpu_detect(c);
@@ -1150,7 +1153,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 		if (this_cpu->c_bsp_init)
 			this_cpu->c_bsp_init(c);
 	} else {
-		identify_cpu_without_cpuid(c);
 		setup_clear_cpu_cap(X86_FEATURE_CPUID);
 	}
 
Signature · 1 line
2.20.1
author maintainer
#351 lore raw

PATCH 322/422 EDAC: Correct DIMM capacity unit symbol

In reply to Greg Kroah-Hartman

From: Qiuxu Zhuo <[email protected]>

[ Upstream commit 6f6da136046294a1e8d2944336eb97412751f653 ]

The {i3200|i7core|sb|skx}_edac drivers show DIMM capacity using the wrong unit symbol: 'Mb' - megabit. Fix them by replacing 'Mb' with 'MiB' - mebibyte.

[Tony: These are all "edac_dbg()" messages, so this won't break scripts
that parse console logs.]

---
 drivers/edac/i3200_edac.c  | 2 +-
 drivers/edac/i7core_edac.c | 2 +-
 drivers/edac/sb_edac.c     | 2 +-
 drivers/edac/skx_edac.c    | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
drivers/edac/i3200_edac.c +1 -1
index d92d56cee1017..299b441647cd5 100644
@@ -399,7 +399,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
 			if (nr_pages == 0)
 				continue;
 
-			edac_dbg(0, "csrow %d, channel %d%s, size = %ld Mb\n", i, j,
+			edac_dbg(0, "csrow %d, channel %d%s, size = %ld MiB\n", i, j,
 				 stacked ? " (stacked)" : "", PAGES_TO_MiB(nr_pages));
 
 			dimm->nr_pages = nr_pages;
drivers/edac/i7core_edac.c +1 -1
index f1d19504a0281..4a3300c2da333 100644
@@ -597,7 +597,7 @@ static int get_dimm_config(struct mem_ctl_info *mci)
 			/* DDR3 has 8 I/O banks */
 			size = (rows * cols * banks * ranks) >> (20 - 3);
 
-			edac_dbg(0, "\tdimm %d %d Mb offset: %x, bank: %d, rank: %d, row: %#x, col: %#x\n",
+			edac_dbg(0, "\tdimm %d %d MiB offset: %x, bank: %d, rank: %d, row: %#x, col: %#x\n",
 				 j, size,
 				 RANKOFFSET(dimm_dod[j]),
 				 banks, ranks, rows, cols);
drivers/edac/sb_edac.c +1 -1
index 7447f1453200d..53074ad361e58 100644
@@ -1622,7 +1622,7 @@ static int __populate_dimms(struct mem_ctl_info *mci,
 				size = ((u64)rows * cols * banks * ranks) >> (20 - 3);
 				npages = MiB_TO_PAGES(size);
 
-				edac_dbg(0, "mc#%d: ha %d channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
+				edac_dbg(0, "mc#%d: ha %d channel %d, dimm %d, %lld MiB (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
 					 pvt->sbridge_dev->mc, pvt->sbridge_dev->dom, i, j,
 					 size, npages,
 					 banks, ranks, rows, cols);
drivers/edac/skx_edac.c +2 -2
index 4ba92f1dd0f74..dd209e0dd9abb 100644
@@ -364,7 +364,7 @@ static int get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm,
 	size = ((1ull << (rows + cols + ranks)) * banks) >> (20 - 3);
 	npages = MiB_TO_PAGES(size);
 
-	edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
+	edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld MiB (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
 		 imc->mc, chan, dimmno, size, npages,
 		 banks, 1 << ranks, rows, cols);
 
@@ -424,7 +424,7 @@ unknown_size:
 	dimm->mtype = MEM_NVDIMM;
 	dimm->edac_mode = EDAC_SECDED; /* likely better than this */
 
-	edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu Mb (%u pages)\n",
+	edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu MiB (%u pages)\n",
 		 imc->mc, chan, dimmno, size >> 20, dimm->nr_pages);
 
 	snprintf(dimm->label, sizeof(dimm->label), "CPU_SrcID#%u_MC#%u_Chan#%u_DIMM#%u",
Signature · 1 line
2.20.1
author maintainer
#352 lore raw

PATCH 323/422 MIPS: kexec: Relax memory restriction

In reply to Greg Kroah-Hartman

From: Dengcheng Zhu <[email protected]>

[ Upstream commit a6da4d6fdf8bd512c98d3ac7f1d16bc4bb282919 ]

We can rely on the system kernel and the dump capture kernel themselves in memory usage.

Being restrictive with 512MB limit may cause kexec tool failure on some platforms.

Patchwork: https://patchwork.linux-mips.org/patch/20568/

---
 arch/mips/include/asm/kexec.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/mips/include/asm/kexec.h +3 -3
index 493a3cc7c39ad..cfdbe66575f4d 100644
@@ -12,11 +12,11 @@
 #include <asm/stacktrace.h>
 
 /* Maximum physical address we can use pages from */
-#define KEXEC_SOURCE_MEMORY_LIMIT (0x20000000)
+#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
 /* Maximum address we can reach in physical address mode */
-#define KEXEC_DESTINATION_MEMORY_LIMIT (0x20000000)
+#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
  /* Maximum address we can use for the control code buffer */
-#define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000)
+#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
 /* Reserve 3*4096 bytes for board-specific info */
 #define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)
 
Signature · 1 line
2.20.1
author maintainer
#353 lore raw

PATCH 324/422 arm64: dts: rockchip: Fix microSD in rk3399 sapphire board

In reply to Greg Kroah-Hartman

From: Vicente Bergas <[email protected]>

[ Upstream commit 88a20edf76091ee7f1bb459b89d714d53f0f8940 ]

The microSD card slot in the Sapphire board is not working because of several issues:
1.- The vmmc power supply is missing in the DTS. It is capable of 3.0V and has a GPIO-based enable control.
2.- The vqmmc power supply can provide up to 3.3V, but it is capped in the DTS to just 3.0V because of the vmmc capability. This results in a conflict from the mmc driver requesting an unsupportable voltage range from 3.3V to 3.0V (min > max) as reported in dmesg. So, extend the range up to 3.3V. The hw should be able to stand this 0.3V tolerance. See mmc_regulator_set_vqmmc in drivers/mmc/core/core.c.
3.- The card detect signal is non-working. There is a known conflict with jtag, but the workaround in drivers/soc/rockchip/grf.c does not work. Adding the broken-cd attribute to the DTS fixes the issue.

---
 .../boot/dts/rockchip/rk3399-sapphire.dtsi    | 24 ++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +23 -1
index 8b33ef3306820..6062cc8250b11 100644
@@ -93,6 +93,19 @@
 		vin-supply = <&vcc_1v8>;
 	};
 
+	vcc3v0_sd: vcc3v0-sd {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdmmc0_pwr_h>;
+		regulator-always-on;
+		regulator-max-microvolt = <3000000>;
+		regulator-min-microvolt = <3000000>;
+		regulator-name = "vcc3v0_sd";
+		vin-supply = <&vcc3v3_sys>;
+	};
+
 	vcc3v3_sys: vcc3v3-sys {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3_sys";
@@ -310,7 +323,7 @@
 				regulator-always-on;
 				regulator-boot-on;
 				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
 				regulator-state-mem {
 					regulator-on-in-suspend;
 					regulator-suspend-microvolt = <3000000>;
@@ -469,6 +482,13 @@
 		};
 	};
 
+	sd {
+		sdmmc0_pwr_h: sdmmc0-pwr-h {
+			rockchip,pins =
+				<RK_GPIO0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	usb2 {
 		vcc5v0_host_en: vcc5v0-host-en {
 			rockchip,pins =
@@ -499,6 +519,7 @@
 };
 
 &sdmmc {
+	broken-cd;
 	bus-width = <4>;
 	cap-mmc-highspeed;
 	cap-sd-highspeed;
@@ -507,6 +528,7 @@
 	max-frequency = <150000000>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
+	vmmc-supply = <&vcc3v0_sd>;
 	vqmmc-supply = <&vcc_sdio>;
 	status = "okay";
 };
Signature · 1 line
2.20.1
author maintainer
#354 lore raw

PATCH 325/422 mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement

In reply to Greg Kroah-Hartman

From: Petr Machata <[email protected]>

[ Upstream commit 12ba7e1045521ec9f251c93ae0a6735cc3f42337 ]

Up until now, mlxsw tolerated firmware versions that weren't exactly matching the required version, if the branch number matched. That allowed the users to test various firmware versions as long as they were on the right branch.

On the other hand, it made it impossible for mlxsw to put a hard lower bound on a version that fixes all problems known to date. If a user had a somewhat older FW version installed, mlxsw would start up just fine, possibly performing non-optimally as it would use features that trigger problematic behavior.

Therefore tweak the check to accept any FW version that is:

- on the same branch as the preferred version, and
- the same as or newer than the preferred version.

---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +4 -1
index 1c170a0fd2cc9..e498ee95bacab 100644
@@ -336,7 +336,10 @@ static int mlxsw_sp_fw_rev_validate(struct mlxsw_sp *mlxsw_sp)
 		return -EINVAL;
 	}
 	if (MLXSW_SP_FWREV_MINOR_TO_BRANCH(rev->minor) ==
-	    MLXSW_SP_FWREV_MINOR_TO_BRANCH(req_rev->minor))
+	    MLXSW_SP_FWREV_MINOR_TO_BRANCH(req_rev->minor) &&
+	    (rev->minor > req_rev->minor ||
+	     (rev->minor == req_rev->minor &&
+	      rev->subminor >= req_rev->subminor)))
 		return 0;
 
 	dev_info(mlxsw_sp->bus_info->dev, "The firmware version %d.%d.%d is incompatible with the driver\n",
Signature · 1 line
2.20.1
author maintainer
#355 lore raw

PATCH 326/422 media: imx: work around false-positive warning, again

In reply to Greg Kroah-Hartman

From: Arnd Bergmann <[email protected]>

[ Upstream commit 8d1a4817cce1b15b4909f0e324a4f5af5952da67 ]

A warning that I thought to be solved by a previous patch of mine has resurfaced with gcc-8:

media/imx/imx-media-csi.c: In function 'csi_link_validate':
media/imx/imx-media-csi.c:1025:20: error: 'upstream_ep' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c:1026:24: error: 'upstream_ep.bus_type' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c:127:19: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c: In function 'csi_enum_mbus_code':
media/imx/imx-media-csi.c:132:9: error: '*((void *)&upstream_ep+12)' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/imx/imx-media-csi.c:132:48: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I spent some more time digging in this time, and think I have a better fix, bailing out of the function that either initializes or errors out here, which simplifies the code enough for gcc to figure out what is going on. The earlier partial workaround can be removed now, as the new workaround is better.

Fixes 890f27693f2a ("media: imx: work around false-positive warning")
---
 drivers/staging/media/imx/imx-media-csi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-csi.c +4 -1
index d17ce1fb4ef51..0f8fdc347091b 100644
@@ -166,6 +166,9 @@ static int csi_get_upstream_endpoint(struct csi_priv *priv,
 	struct v4l2_subdev *sd;
 	struct media_pad *pad;
 
+	if (!IS_ENABLED(CONFIG_OF))
+		return -ENXIO;
+
 	if (!priv->src_sd)
 		return -EPIPE;
 
@@ -1072,7 +1075,7 @@ static int csi_link_validate(struct v4l2_subdev *sd,
 			     struct v4l2_subdev_format *sink_fmt)
 {
 	struct csi_priv *priv = v4l2_get_subdevdata(sd);
-	struct v4l2_fwnode_endpoint upstream_ep = {};
+	struct v4l2_fwnode_endpoint upstream_ep;
 	bool is_csi2;
 	int ret;
 
Signature · 1 line
2.20.1
author maintainer
#356 lore raw

PATCH 327/422 media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()

In reply to Greg Kroah-Hartman

From: Jia-Ju Bai <[email protected]>

[ Upstream commit 8d11eb847de7d89c2754988c944d51a4f63e219b ]

The driver may sleep in a interrupt handler.

The function call paths (from bottom to top) in Linux-4.16 are:

[FUNC] kzalloc(GFP_KERNEL) drivers/media/pci/ivtv/ivtv-yuv.c, 938:
kzalloc in ivtv_yuv_init
drivers/media/pci/ivtv/ivtv-yuv.c, 960:
ivtv_yuv_init in ivtv_yuv_next_free
drivers/media/pci/ivtv/ivtv-yuv.c, 1126:
ivtv_yuv_next_free in ivtv_yuv_setup_stream_frame
drivers/media/pci/ivtv/ivtv-irq.c, 827:
ivtv_yuv_setup_stream_frame in ivtv_irq_dec_data_req
drivers/media/pci/ivtv/ivtv-irq.c, 1013:
ivtv_irq_dec_data_req in ivtv_irq_handler

To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.

This bug is found by my static analysis tool DSAC.

---
 drivers/media/pci/ivtv/ivtv-yuv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-yuv.c +1 -1
index 44936d6d7c396..1380474519f2b 100644
@@ -935,7 +935,7 @@ static void ivtv_yuv_init(struct ivtv *itv)
 	}
 
 	/* We need a buffer for blanking when Y plane is offset - non-fatal if we can't get one */
-	yi->blanking_ptr = kzalloc(720 * 16, GFP_KERNEL|__GFP_NOWARN);
+	yi->blanking_ptr = kzalloc(720 * 16, GFP_ATOMIC|__GFP_NOWARN);
 	if (yi->blanking_ptr) {
 		yi->blanking_dmaptr = pci_map_single(itv->pdev, yi->blanking_ptr, 720*16, PCI_DMA_TODEVICE);
 	} else {
Signature · 1 line
2.20.1
author maintainer
#357 lore raw

PATCH 328/422 media: au0828: Fix incorrect error messages

In reply to Greg Kroah-Hartman

From: Brad Love <[email protected]>

[ Upstream commit f347596f2bf114a3af3d80201c6e6bef538d884f ]

Correcting red herring error messages.

Where appropriate, replaces au0282_dev_register with:
- au0828_analog_register
- au0828_dvb_register

---
 drivers/media/usb/au0828/au0828-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/au0828/au0828-core.c +2 -2
index e3f63299f85c0..07e3322bb1827 100644
@@ -632,7 +632,7 @@ static int au0828_usb_probe(struct usb_interface *interface,
 	/* Analog TV */
 	retval = au0828_analog_register(dev, interface);
 	if (retval) {
-		pr_err("%s() au0282_dev_register failed to register on V4L2\n",
+		pr_err("%s() au0828_analog_register failed to register on V4L2\n",
 			__func__);
 		mutex_unlock(&dev->lock);
 		goto done;
@@ -641,7 +641,7 @@ static int au0828_usb_probe(struct usb_interface *interface,
 	/* Digital TV */
 	retval = au0828_dvb_register(dev);
 	if (retval)
-		pr_err("%s() au0282_dev_register failed\n",
+		pr_err("%s() au0828_dvb_register failed\n",
 		       __func__);
 
 	/* Remote controller */
Signature · 1 line
2.20.1
author maintainer
#358 lore raw

PATCH 329/422 media: davinci: Fix implicit enum conversion warning

In reply to Greg Kroah-Hartman

From: Nathan Chancellor <[email protected]>

[ Upstream commit 4158757395b300b6eb308fc20b96d1d231484413 ]

Clang warns when one enumerated type is implicitly converted to another.

drivers/media/platform/davinci/vpbe_display.c:524:24: warning: implicit conversion from enumeration type 'enum osd_v_exp_ratio' to different enumeration type 'enum osd_h_exp_ratio' [-Wenum-conversion]

                        layer_info->h_exp = V_EXP_6_OVER_5;
                                          ~ ^~~~~~~~~~~~~~

1 warning generated.

This appears to be a copy and paste error judging from the couple of lines directly above this statement and the way that height is handled in the if block above this one.

---
 drivers/media/platform/davinci/vpbe_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/davinci/vpbe_display.c +1 -1
index b0eb3d899eb44..6f82693524331 100644
@@ -521,7 +521,7 @@ vpbe_disp_calculate_scale_factor(struct vpbe_display *disp_dev,
 		else if (v_scale == 4)
 			layer_info->v_zoom = ZOOM_X4;
 		if (v_exp)
-			layer_info->h_exp = V_EXP_6_OVER_5;
+			layer_info->v_exp = V_EXP_6_OVER_5;
 	} else {
 		/* no scaling, only cropping. Set display area to crop area */
 		cfg->ysize = expected_ysize;
Signature · 1 line
2.20.1
author maintainer
#359 lore raw

PATCH 330/422 ARM: dts: rockchip: explicitly set vcc_sd0 pin to gpio on rk3188-radxarock

In reply to Greg Kroah-Hartman

From: Heiko Stuebner <[email protected]>

[ Upstream commit a2df0984e73fd9e1dad5fc3f1c307ec3de395e30 ]

It is good practice to make the setting of gpio-pinctrls explicitly in the devicetree, and in this case even necessary.
Rockchip boards start with iomux settings set to gpio for most pins and while the linux pinctrl driver also implicitly sets the gpio function if a pin is requested as gpio that is not necessarily true for other drivers.

The issue in question stems from uboot, where the sdmmc_pwr pin is set to function 1 (sdmmc-power) by the bootrom when reading the 1st-stage loader. The regulator controlled by the pin is active-low though, so when the dwmmc hw-block sets its enabled bit, it actually disables the regulator. By changing the pin back to gpio we fix that behaviour.

---
 arch/arm/boot/dts/rk3188-radxarock.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/rk3188-radxarock.dts +8 -0
index 45fd2b302dda1..4a2890618f6fc 100644
@@ -93,6 +93,8 @@
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 		gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdmmc_pwr>;
 		startup-delay-us = <100000>;
 		vin-supply = <&vcc_io>;
 	};
@@ -315,6 +317,12 @@
 		};
 	};
 
+	sd0 {
+		sdmmc_pwr: sdmmc-pwr {
+			rockchip,pins = <RK_GPIO3 1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	usb {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
Signature · 1 line
2.20.1
author maintainer
#360 lore raw

PATCH 331/422 usb: gadget: uvc: configfs: Drop leaked references to config items

In reply to Greg Kroah-Hartman

From: Laurent Pinchart <[email protected]>

[ Upstream commit 86f3daed59bceb4fa7981d85e89f63ebbae1d561 ]

Some of the .allow_link() and .drop_link() operations implementations call config_group_find_item() and then leak the reference to the returned item. Fix this by dropping those references where needed.

---
 drivers/usb/gadget/function/uvc_configfs.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/usb/gadget/function/uvc_configfs.c +4 -0
index b51f0d2788269..dc4edba95a478 100644
@@ -544,6 +544,7 @@ static int uvcg_control_class_allow_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 	return ret;
 }
@@ -579,6 +580,7 @@ static void uvcg_control_class_drop_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 }
 
@@ -2038,6 +2040,7 @@ static int uvcg_streaming_class_allow_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 	return ret;
 }
@@ -2078,6 +2081,7 @@ static void uvcg_streaming_class_drop_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 }
 
Signature · 1 line
2.20.1
author maintainer
#361 lore raw

PATCH 332/422 usb: gadget: uvc: configfs: Prevent format changes after linking header

In reply to Greg Kroah-Hartman

From: Joel Pepper <[email protected]>

[ Upstream commit cb2200f7af8341aaf0c6abd7ba37e4c667c41639 ]

While checks are in place to avoid attributes and children of a format being manipulated after the format is linked into the streaming header, the linked flag was never actually set, invalidating the protections. Update the flag as appropriate in the header link calls.

---
 drivers/usb/gadget/function/uvc_configfs.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/gadget/function/uvc_configfs.c +3 -0
index dc4edba95a478..9478a7cdb1433 100644
@@ -766,6 +766,7 @@ static int uvcg_streaming_header_allow_link(struct config_item *src,
 	format_ptr->fmt = target_fmt;
 	list_add_tail(&format_ptr->entry, &src_hdr->formats);
 	++src_hdr->num_fmt;
+	++target_fmt->linked;
 
 out:
 	mutex_unlock(&opts->lock);
@@ -803,6 +804,8 @@ static void uvcg_streaming_header_drop_link(struct config_item *src,
 			break;
 		}
 
+	--target_fmt->linked;
+
 out:
 	mutex_unlock(&opts->lock);
 	mutex_unlock(su_mutex);
Signature · 1 line
2.20.1
author maintainer
#362 lore raw

PATCH 333/422 usb: gadget: uvc: configfs: Sort frame intervals upon writing

In reply to Greg Kroah-Hartman

From: Paul Elder <[email protected]>

[ Upstream commit 89969a842e72b1b653140a4bbddd927b242736d0 ]

There is an issue where the host is unable to tell the gadget what frame rate it wants if the dwFrameIntervals in the interface descriptors are not in ascending order. This means that when instantiating a uvc gadget via configfs the user must make sure the dwFrameIntervals are in ascending order.

Instead of silently failing the breaking of this rule, we sort the dwFrameIntervals upon writing to configfs.

---
 drivers/usb/gadget/function/uvc_configfs.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/usb/gadget/function/uvc_configfs.c +13 -0
index 9478a7cdb1433..2e4c0391b5836 100644
@@ -9,6 +9,9 @@
  *
  * Author: Andrzej Pietrasiewicz <[email protected]>
  */
+
+#include <linux/sort.h>
+
 #include "u_uvc.h"
 #include "uvc_configfs.h"
 
@@ -31,6 +34,14 @@ static struct configfs_attribute prefix##attr_##cname = { \
 	.show		= prefix##cname##_show,				\
 }
 
+static int uvcg_config_compare_u32(const void *l, const void *r)
+{
+	u32 li = *(const u32 *)l;
+	u32 ri = *(const u32 *)r;
+
+	return li < ri ? -1 : li == ri ? 0 : 1;
+}
+
 static inline struct f_uvc_opts *to_f_uvc_opts(struct config_item *item)
 {
 	return container_of(to_config_group(item), struct f_uvc_opts,
@@ -1134,6 +1145,8 @@ static ssize_t uvcg_frame_dw_frame_interval_store(struct config_item *item,
 	kfree(ch->dw_frame_interval);
 	ch->dw_frame_interval = frm_intrv;
 	ch->frame.b_frame_interval_type = n;
+	sort(ch->dw_frame_interval, n, sizeof(*ch->dw_frame_interval),
+	     uvcg_config_compare_u32, NULL);
 	ret = len;
 
 end:
Signature · 1 line
2.20.1
author maintainer
#363 lore raw

PATCH 334/422 ARM: dts: exynos: Correct audio subsystem parent clock on Peach Chromebooks

In reply to Greg Kroah-Hartman

From: Marek Szyprowski <[email protected]>

[ Upstream commit ff1e37c6809daab75f7b2dea1efe69330e8eb65b ]

The proper parent clock for audio subsystem for Exynos5420 and Exynos5800 SoCs is CLK_MAU_EPLL. This fixes following warning:

clk: failed to reparent mout_audss to fout_epll: -22

Fixes ed7d1307077e: ARM: dts: exynos: Enable HDMI audio support on Peach Pit
Fixes bae0f445c1e7: ARM: dts: exynos: Enable HDMI audio support on Peach Pi
---
 arch/arm/boot/dts/exynos5420-peach-pit.dts | 2 +-
 arch/arm/boot/dts/exynos5800-peach-pi.dts  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/exynos5420-peach-pit.dts +1 -1
index 769d60d6c9006..9eb48cabcca45 100644
@@ -153,7 +153,7 @@
 
 &clock_audss {
 	assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
-	assigned-clock-parents = <&clock CLK_FOUT_EPLL>;
+	assigned-clock-parents = <&clock CLK_MAU_EPLL>;
 };
 
 &cpu0 {
arch/arm/boot/dts/exynos5800-peach-pi.dts +1 -1
index 492e2cd2e559e..4398f2d1fe881 100644
@@ -153,7 +153,7 @@
 
 &clock_audss {
 	assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
-	assigned-clock-parents = <&clock CLK_FOUT_EPLL>;
+	assigned-clock-parents = <&clock CLK_MAU_EPLL>;
 };
 
 &cpu0 {
Signature · 1 line
2.20.1
author maintainer
#364 lore raw

PATCH 335/422 i2c: aspeed: fix invalid clock parameters for very large divisors

In reply to Greg Kroah-Hartman

From: Brendan Higgins <[email protected]>

[ Upstream commit 17ccba67109cd0631f206cf49e17986218b47854 ]

The function that computes clock parameters from divisors did not respect the maximum size of the bitfields that the parameters were written to. This fixes the bug.

This bug can be reproduced with (and this fix verified with) the test
at: https://kunit-review.googlesource.com/c/linux/+/1035/

Discovered-by-KUnit: https://kunit-review.googlesource.com/c/linux/+/1035/

---
 drivers/i2c/busses/i2c-aspeed.c | 65 +++++++++++++++++++++++----------
 1 file changed, 45 insertions(+), 20 deletions(-)
drivers/i2c/busses/i2c-aspeed.c +45 -20
index a19fbff168617..d9401b5191069 100644
@@ -137,7 +137,8 @@ struct aspeed_i2c_bus {
 	/* Synchronizes I/O mem access to base. */
 	spinlock_t			lock;
 	struct completion		cmd_complete;
-	u32				(*get_clk_reg_val)(u32 divisor);
+	u32				(*get_clk_reg_val)(struct device *dev,
+							   u32 divisor);
 	unsigned long			parent_clk_frequency;
 	u32				bus_frequency;
 	/* Transaction state. */
@@ -686,16 +687,27 @@ static const struct i2c_algorithm aspeed_i2c_algo = {
 #endif /* CONFIG_I2C_SLAVE */
 };
 
-static u32 aspeed_i2c_get_clk_reg_val(u32 clk_high_low_max, u32 divisor)
+static u32 aspeed_i2c_get_clk_reg_val(struct device *dev,
+				      u32 clk_high_low_mask,
+				      u32 divisor)
 {
-	u32 base_clk, clk_high, clk_low, tmp;
+	u32 base_clk_divisor, clk_high_low_max, clk_high, clk_low, tmp;
+
+	/*
+	 * SCL_high and SCL_low represent a value 1 greater than what is stored
+	 * since a zero divider is meaningless. Thus, the max value each can
+	 * store is every bit set + 1. Since SCL_high and SCL_low are added
+	 * together (see below), the max value of both is the max value of one
+	 * them times two.
+	 */
+	clk_high_low_max = (clk_high_low_mask + 1) * 2;
 
 	/*
 	 * The actual clock frequency of SCL is:
 	 *	SCL_freq = APB_freq / (base_freq * (SCL_high + SCL_low))
 	 *		 = APB_freq / divisor
 	 * where base_freq is a programmable clock divider; its value is
-	 *	base_freq = 1 << base_clk
+	 *	base_freq = 1 << base_clk_divisor
 	 * SCL_high is the number of base_freq clock cycles that SCL stays high
 	 * and SCL_low is the number of base_freq clock cycles that SCL stays
 	 * low for a period of SCL.
@@ -705,47 +717,59 @@ static u32 aspeed_i2c_get_clk_reg_val(u32 clk_high_low_max, u32 divisor)
 	 *	SCL_low	 = clk_low + 1
 	 * Thus,
 	 *	SCL_freq = APB_freq /
-	 *		((1 << base_clk) * (clk_high + 1 + clk_low + 1))
+	 *		((1 << base_clk_divisor) * (clk_high + 1 + clk_low + 1))
 	 * The documentation recommends clk_high >= clk_high_max / 2 and
 	 * clk_low >= clk_low_max / 2 - 1 when possible; this last constraint
 	 * gives us the following solution:
 	 */
-	base_clk = divisor > clk_high_low_max ?
+	base_clk_divisor = divisor > clk_high_low_max ?
 			ilog2((divisor - 1) / clk_high_low_max) + 1 : 0;
-	tmp = (divisor + (1 << base_clk) - 1) >> base_clk;
-	clk_low = tmp / 2;
-	clk_high = tmp - clk_low;
 
-	if (clk_high)
-		clk_high--;
+	if (base_clk_divisor > ASPEED_I2CD_TIME_BASE_DIVISOR_MASK) {
+		base_clk_divisor = ASPEED_I2CD_TIME_BASE_DIVISOR_MASK;
+		clk_low = clk_high_low_mask;
+		clk_high = clk_high_low_mask;
+		dev_err(dev,
+			"clamping clock divider: divider requested, %u, is greater than largest possible divider, %u.\n",
+			divisor, (1 << base_clk_divisor) * clk_high_low_max);
+	} else {
+		tmp = (divisor + (1 << base_clk_divisor) - 1)
+				>> base_clk_divisor;
+		clk_low = tmp / 2;
+		clk_high = tmp - clk_low;
+
+		if (clk_high)
+			clk_high--;
 
-	if (clk_low)
-		clk_low--;
+		if (clk_low)
+			clk_low--;
+	}
 
 
 	return ((clk_high << ASPEED_I2CD_TIME_SCL_HIGH_SHIFT)
 		& ASPEED_I2CD_TIME_SCL_HIGH_MASK)
 			| ((clk_low << ASPEED_I2CD_TIME_SCL_LOW_SHIFT)
 			   & ASPEED_I2CD_TIME_SCL_LOW_MASK)
-			| (base_clk & ASPEED_I2CD_TIME_BASE_DIVISOR_MASK);
+			| (base_clk_divisor
+			   & ASPEED_I2CD_TIME_BASE_DIVISOR_MASK);
 }
 
-static u32 aspeed_i2c_24xx_get_clk_reg_val(u32 divisor)
+static u32 aspeed_i2c_24xx_get_clk_reg_val(struct device *dev, u32 divisor)
 {
 	/*
 	 * clk_high and clk_low are each 3 bits wide, so each can hold a max
 	 * value of 8 giving a clk_high_low_max of 16.
 	 */
-	return aspeed_i2c_get_clk_reg_val(16, divisor);
+	return aspeed_i2c_get_clk_reg_val(dev, GENMASK(2, 0), divisor);
 }
 
-static u32 aspeed_i2c_25xx_get_clk_reg_val(u32 divisor)
+static u32 aspeed_i2c_25xx_get_clk_reg_val(struct device *dev, u32 divisor)
 {
 	/*
 	 * clk_high and clk_low are each 4 bits wide, so each can hold a max
 	 * value of 16 giving a clk_high_low_max of 32.
 	 */
-	return aspeed_i2c_get_clk_reg_val(32, divisor);
+	return aspeed_i2c_get_clk_reg_val(dev, GENMASK(3, 0), divisor);
 }
 
 /* precondition: bus.lock has been acquired. */
@@ -758,7 +782,7 @@ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus)
 	clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |
 			ASPEED_I2CD_TIME_THDSTA_MASK |
 			ASPEED_I2CD_TIME_TACST_MASK);
-	clk_reg_val |= bus->get_clk_reg_val(divisor);
+	clk_reg_val |= bus->get_clk_reg_val(bus->dev, divisor);
 	writel(clk_reg_val, bus->base + ASPEED_I2C_AC_TIMING_REG1);
 	writel(ASPEED_NO_TIMEOUT_CTRL, bus->base + ASPEED_I2C_AC_TIMING_REG2);
 
@@ -874,7 +898,8 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev)
 	if (!match)
 		bus->get_clk_reg_val = aspeed_i2c_24xx_get_clk_reg_val;
 	else
-		bus->get_clk_reg_val = (u32 (*)(u32))match->data;
+		bus->get_clk_reg_val = (u32 (*)(struct device *, u32))
+				match->data;
 
 	/* Initialize the I2C adapter */
 	spin_lock_init(&bus->lock);
Signature · 1 line
2.20.1
author maintainer
#365 lore raw

PATCH 336/422 gpiolib: Fix gpio_direction_* for single direction GPIOs

In reply to Greg Kroah-Hartman

From: Ricardo Ribalda Delgado <[email protected]>

[ Upstream commit ae9847f48a4b4bff0335da20be63ac84d94eb54c ]

GPIOs with no programmable direction are not required to implement direction_output nor direction_input.

If we try to set an output direction on an output-only GPIO or input direction on an input-only GPIO simply return 0.

This allows this single direction GPIO to be used by libgpiod.

---
 drivers/gpio/gpiolib.c | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)
drivers/gpio/gpiolib.c +28 -8
index 565ab945698ca..b81a27c7f89c4 100644
@@ -2541,19 +2541,27 @@ EXPORT_SYMBOL_GPL(gpiochip_free_own_desc);
 int gpiod_direction_input(struct gpio_desc *desc)
 {
 	struct gpio_chip	*chip;
-	int			status = -EINVAL;
+	int			status = 0;
 
 	VALIDATE_DESC(desc);
 	chip = desc->gdev->chip;
 
-	if (!chip->get || !chip->direction_input) {
+	if (!chip->get && chip->direction_input) {
 		gpiod_warn(desc,
-			"%s: missing get() or direction_input() operations\n",
+			"%s: missing get() and direction_input() operations\n",
 			__func__);
 		return -EIO;
 	}
 
-	status = chip->direction_input(chip, gpio_chip_hwgpio(desc));
+	if (chip->direction_input) {
+		status = chip->direction_input(chip, gpio_chip_hwgpio(desc));
+	} else if (chip->get_direction &&
+		  (chip->get_direction(chip, gpio_chip_hwgpio(desc)) != 1)) {
+		gpiod_warn(desc,
+			"%s: missing direction_input() operation\n",
+			__func__);
+		return -EIO;
+	}
 	if (status == 0)
 		clear_bit(FLAG_IS_OUT, &desc->flags);
 
@@ -2575,16 +2583,28 @@ static int gpiod_direction_output_raw_commit(struct gpio_desc *desc, int value)
 {
 	struct gpio_chip *gc = desc->gdev->chip;
 	int val = !!value;
-	int ret;
+	int ret = 0;
 
-	if (!gc->set || !gc->direction_output) {
+	if (!gc->set && !gc->direction_output) {
 		gpiod_warn(desc,
-		       "%s: missing set() or direction_output() operations\n",
+		       "%s: missing set() and direction_output() operations\n",
 		       __func__);
 		return -EIO;
 	}
 
-	ret = gc->direction_output(gc, gpio_chip_hwgpio(desc), val);
+	if (gc->direction_output) {
+		ret = gc->direction_output(gc, gpio_chip_hwgpio(desc), val);
+	} else {
+		if (gc->get_direction &&
+		    gc->get_direction(gc, gpio_chip_hwgpio(desc))) {
+			gpiod_warn(desc,
+				"%s: missing direction_output() operation\n",
+				__func__);
+			return -EIO;
+		}
+		gc->set(gc, gpio_chip_hwgpio(desc), val);
+	}
+
 	if (!ret)
 		set_bit(FLAG_IS_OUT, &desc->flags);
 	trace_gpio_value(desc_to_gpio(desc), 0, val);
Signature · 1 line
2.20.1
author maintainer
#366 lore raw

PATCH 337/422 ARM: at91: pm: call put_device instead of of_node_put in at91_pm_config_ws

In reply to Greg Kroah-Hartman

From: zhong jiang <[email protected]>

[ Upstream commit 95590a6286c547b7287d01c55515fb96b904aa03 ]

of_find_device_by_node takes a reference to the struct device when it finds a match via get_device. but it fails to put_device in at91_pm_config_ws, for_each_matching_node_and_match will get and put the node properly, there is no need to call the of_put_node. Therefore, just call put_device instead of of_node_put in at91_pm_config_ws.

Fixes d7484f5c6b3b ("ARM: at91: pm: configure wakeup sources for ULP1 mode")
---
 arch/arm/mach-at91/pm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-at91/pm.c +3 -3
index 0921e2c10edfd..e2e4df3d11e53 100644
@@ -143,15 +143,15 @@ static int at91_pm_config_ws(unsigned int pm_mode, bool set)
 
 			/* Check if enabled on SHDWC. */
 			if (wsi->shdwc_mr_bit && !(val & wsi->shdwc_mr_bit))
-				goto put_node;
+				goto put_device;
 
 			mode |= wsi->pmc_fsmr_bit;
 			if (wsi->set_polarity)
 				polarity |= wsi->pmc_fsmr_bit;
 		}
 
-put_node:
-		of_node_put(np);
+put_device:
+		put_device(&pdev->dev);
 	}
 
 	if (mode) {
Signature · 1 line
2.20.1
author maintainer
#367 lore raw

PATCH 338/422 phy: brcm-sata: allow PHY_BRCM_SATA driver to be built for DSL SoCs

In reply to Greg Kroah-Hartman

From: Florian Fainelli <[email protected]>

[ Upstream commit 26728df4b254ae06247726a9a6e64823e39ac504 ]

Broadcom ARM-based DSL SoCs (BCM63xx product line) have the same Broadcom SATA PHY that other SoCs are using, make it possible to select that driver on these platforms.

---
 drivers/phy/broadcom/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/broadcom/Kconfig +2 -1
index 8786a9674471d..aa917a61071db 100644
@@ -60,7 +60,8 @@ config PHY_NS2_USB_DRD
 
 config PHY_BRCM_SATA
 	tristate "Broadcom SATA PHY driver"
-	depends on ARCH_BRCMSTB || ARCH_BCM_IPROC || BMIPS_GENERIC || COMPILE_TEST
+	depends on ARCH_BRCMSTB || ARCH_BCM_IPROC || BMIPS_GENERIC || \
+		   ARCH_BCM_63XX || COMPILE_TEST
 	depends on OF
 	select GENERIC_PHY
 	default ARCH_BCM_IPROC
Signature · 1 line
2.20.1
author maintainer
#368 lore raw

PATCH 339/422 phy: renesas: rcar-gen3-usb2: fix vbus_ctrl for role sysfs

In reply to Greg Kroah-Hartman

From: Yoshihiro Shimoda <[email protected]>

[ Upstream commit 09938ea9d136243e8d1fed6d4d7a257764f28f6d ]

This patch fixes and issue that the vbus_ctrl is disabled by rcar_gen3_init_from_a_peri_to_a_host(), so a usb host cannot supply the vbus.

Note that this condition will exit when the otg irq happens even if we don't apply this patch.

Fixes 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap")
---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +1 -1
index 6fb2b69695905..d22b1ec2e58c7 100644
@@ -199,7 +199,7 @@ static void rcar_gen3_init_from_a_peri_to_a_host(struct rcar_gen3_chan *ch)
 	val = readl(usb2_base + USB2_OBINTEN);
 	writel(val & ~USB2_OBINT_BITS, usb2_base + USB2_OBINTEN);
 
-	rcar_gen3_enable_vbus_ctrl(ch, 0);
+	rcar_gen3_enable_vbus_ctrl(ch, 1);
 	rcar_gen3_init_for_host(ch);
 
 	writel(val | USB2_OBINT_BITS, usb2_base + USB2_OBINTEN);
Signature · 1 line
2.20.1
author maintainer
#369 lore raw

PATCH 340/422 phy: phy-twl4030-usb: fix denied runtime access

In reply to Greg Kroah-Hartman

From: Andreas Kemnade <[email protected]>

[ Upstream commit 6c7103aa026094a4ee2c2708ec6977a6dfc5331d ]

When runtime is not enabled, pm_runtime_get_sync() returns -EACCESS, the counter will be incremented but the resume callback not called, so enumeration and charging will not start properly.
To avoid that happen, disable irq on suspend and recheck on resume.

Practically this happens when the device is woken up from suspend by plugging in usb.

---
 drivers/phy/ti/phy-twl4030-usb.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/phy/ti/phy-twl4030-usb.c +29 -0
index a44680d64f9b4..c267afb68f077 100644
@@ -144,6 +144,7 @@
 #define PMBR1				0x0D
 #define GPIO_USB_4PIN_ULPI_2430C	(3 << 0)
 
+static irqreturn_t twl4030_usb_irq(int irq, void *_twl);
 /*
  * If VBUS is valid or ID is ground, then we know a
  * cable is present and we need to be runtime-enabled
@@ -395,6 +396,33 @@ static void __twl4030_phy_power(struct twl4030_usb *twl, int on)
 	WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0);
 }
 
+static int __maybe_unused twl4030_usb_suspend(struct device *dev)
+{
+	struct twl4030_usb *twl = dev_get_drvdata(dev);
+
+	/*
+	 * we need enabled runtime on resume,
+	 * so turn irq off here, so we do not get it early
+	 * note: wakeup on usb plug works independently of this
+	 */
+	dev_dbg(twl->dev, "%s\n", __func__);
+	disable_irq(twl->irq);
+
+	return 0;
+}
+
+static int __maybe_unused twl4030_usb_resume(struct device *dev)
+{
+	struct twl4030_usb *twl = dev_get_drvdata(dev);
+
+	dev_dbg(twl->dev, "%s\n", __func__);
+	enable_irq(twl->irq);
+	/* check whether cable status changed */
+	twl4030_usb_irq(0, twl);
+
+	return 0;
+}
+
 static int __maybe_unused twl4030_usb_runtime_suspend(struct device *dev)
 {
 	struct twl4030_usb *twl = dev_get_drvdata(dev);
@@ -655,6 +683,7 @@ static const struct phy_ops ops = {
 static const struct dev_pm_ops twl4030_usb_pm_ops = {
 	SET_RUNTIME_PM_OPS(twl4030_usb_runtime_suspend,
 			   twl4030_usb_runtime_resume, NULL)
+	SET_SYSTEM_SLEEP_PM_OPS(twl4030_usb_suspend, twl4030_usb_resume)
 };
 
 static int twl4030_usb_probe(struct platform_device *pdev)
Signature · 1 line
2.20.1
author maintainer
#370 lore raw

PATCH 341/422 ARM: dts: imx6ull: update vdd_soc voltage for 900MHz operating point

In reply to Greg Kroah-Hartman

From: Anson Huang <[email protected]>

[ Upstream commit 245f880c25dbd8927af0f33aa5d1404370013957 ]

Update VDD_SOC voltage to 1.25V for 900MHz operating point according to datasheet Rev. 1.3, 08/2018, 25mV is added to the minimum allowed values to cover power supply ripple.

---
 arch/arm/boot/dts/imx6ull.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6ull.dtsi +1 -1
index cd1776a7015ac..796ed35d4ac9a 100644
@@ -22,7 +22,7 @@
 	>;
 	fsl,soc-operating-points = <
 		/* KHz	uV */
-		900000	1175000
+		900000	1250000
 		792000	1175000
 		528000	1175000
 		396000	1175000
Signature · 1 line
2.20.1
author maintainer
#371 lore raw

PATCH 342/422 usb: gadget: uvc: Factor out video USB request queueing

In reply to Greg Kroah-Hartman

From: Laurent Pinchart <[email protected]>

[ Upstream commit 9d1ff5dcb3cd3390b1e56f1c24ae42c72257c4a3 ]

USB requests for video data are queued from two different locations in the driver, with the same code block occurring twice. Factor it out to a function.

---
 drivers/usb/gadget/function/uvc_video.c | 30 ++++++++++++++++---------
 1 file changed, 20 insertions(+), 10 deletions(-)
drivers/usb/gadget/function/uvc_video.c +20 -10
index d3567b90343a4..a95c8e2364edc 100644
@@ -125,6 +125,19 @@ uvc_video_encode_isoc(struct usb_request *req, struct uvc_video *video,
  * Request handling
  */
 
+static int uvcg_video_ep_queue(struct uvc_video *video, struct usb_request *req)
+{
+	int ret;
+
+	ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
+	if (ret < 0) {
+		printk(KERN_INFO "Failed to queue request (%d).\n", ret);
+		usb_ep_set_halt(video->ep);
+	}
+
+	return ret;
+}
+
 /*
  * I somehow feel that synchronisation won't be easy to achieve here. We have
  * three events that control USB requests submission:
@@ -189,14 +202,13 @@ uvc_video_complete(struct usb_ep *ep, struct usb_request *req)
 
 	video->encode(req, video, buf);
 
-	if ((ret = usb_ep_queue(ep, req, GFP_ATOMIC)) < 0) {
-		printk(KERN_INFO "Failed to queue request (%d).\n", ret);
-		usb_ep_set_halt(ep);
-		spin_unlock_irqrestore(&video->queue.irqlock, flags);
+	ret = uvcg_video_ep_queue(video, req);
+	spin_unlock_irqrestore(&video->queue.irqlock, flags);
+
+	if (ret < 0) {
 		uvcg_queue_cancel(queue, 0);
 		goto requeue;
 	}
-	spin_unlock_irqrestore(&video->queue.irqlock, flags);
 
 	return;
 
@@ -316,15 +328,13 @@ int uvcg_video_pump(struct uvc_video *video)
 		video->encode(req, video, buf);
 
 		/* Queue the USB request */
-		ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
+		ret = uvcg_video_ep_queue(video, req);
+		spin_unlock_irqrestore(&queue->irqlock, flags);
+
 		if (ret < 0) {
-			printk(KERN_INFO "Failed to queue request (%d)\n", ret);
-			usb_ep_set_halt(video->ep);
-			spin_unlock_irqrestore(&queue->irqlock, flags);
 			uvcg_queue_cancel(queue, 0);
 			break;
 		}
-		spin_unlock_irqrestore(&queue->irqlock, flags);
 	}
 
 	spin_lock_irqsave(&video->req_lock, flags);
Signature · 1 line
2.20.1
author maintainer
#372 lore raw

PATCH 343/422 usb: gadget: uvc: Only halt video streaming endpoint in bulk mode

In reply to Greg Kroah-Hartman

From: Laurent Pinchart <[email protected]>

[ Upstream commit 8dbf9c7abefd5c1434a956d5c6b25e11183061a3 ]

When USB requests for video data fail to be submitted, the driver signals a problem to the host by halting the video streaming endpoint. This is only valid in bulk mode, as isochronous transfers have no handshake phase and can't thus report a stall. The usb_ep_set_halt() call returns an error when using isochronous endpoints, which we happily ignore, but some UDCs complain in the kernel log. Fix this by only trying to halt the endpoint in bulk mode.

---
 drivers/usb/gadget/function/uvc_video.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/gadget/function/uvc_video.c +3 -1
index a95c8e2364edc..2c9821ec836e7 100644
@@ -132,7 +132,9 @@ static int uvcg_video_ep_queue(struct uvc_video *video, struct usb_request *req)
 	ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
 	if (ret < 0) {
 		printk(KERN_INFO "Failed to queue request (%d).\n", ret);
-		usb_ep_set_halt(video->ep);
+		/* Isochronous endpoints can't be halted. */
+		if (usb_endpoint_xfer_bulk(video->ep->desc))
+			usb_ep_set_halt(video->ep);
 	}
 
 	return ret;
Signature · 1 line
2.20.1
author maintainer
#373 lore raw

PATCH 344/422 coresight: Use ERR_CAST instead of ERR_PTR

In reply to Greg Kroah-Hartman

From: zhong jiang <[email protected]>

[ Upstream commit bbd35ba6fab5419e58e96f35f1431f13bdc14f98 ]

Use ERR_CAT inlined function to replace the ERR_PTR(PTR_ERR). It make the code more concise.

---
 drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-tmc-etr.c +1 -1
index 2eda5de304c20..11963647e19ae 100644
@@ -536,7 +536,7 @@ tmc_init_etr_sg_table(struct device *dev, int node,
 	sg_table = tmc_alloc_sg_table(dev, node, nr_tpages, nr_dpages, pages);
 	if (IS_ERR(sg_table)) {
 		kfree(etr_table);
-		return ERR_PTR(PTR_ERR(sg_table));
+		return ERR_CAST(sg_table);
 	}
 
 	etr_table->sg_table = sg_table;
Signature · 1 line
2.20.1
author maintainer
#374 lore raw

PATCH 345/422 coresight: Fix handling of sinks

In reply to Greg Kroah-Hartman

From: Suzuki K Poulose <[email protected]>

[ Upstream commit c71369de02b285d9da526a526d8f2affc7b17c59 ]

The coresight components could be operated either in sysfs mode or in perf mode. For some of the components, the mode of operation doesn't matter as they simply relay the data to the next component in the trace path. But for sinks, they need to be able to provide the trace data back to the user. Thus we need to make sure that "mode" is handled appropriately. e.g, the sysfs mode could have multiple sources driving the trace data, while perf mode doesn't allow sharing the sink.

The coresight_enable_sink() however doesn't really allow this check to trigger as it skips the "enable_sink" callback if the component is already enabled, irrespective of the mode. This could cause mixing of data from different modes or even same mode (in perf), if the sources are different. Also, if we fail to enable the sink while enabling a path (where sink is the first component enabled), we could end up in disabling the components in the "entire" path which were not enabled in this trial, causing disruptions in the existing trace paths.

---
 drivers/hwtracing/coresight/coresight.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
drivers/hwtracing/coresight/coresight.c +15 -7
index 3e07fd335f8cf..c0dabbddc1e49 100644
@@ -132,12 +132,14 @@ static int coresight_enable_sink(struct coresight_device *csdev, u32 mode)
 {
 	int ret;
 
-	if (!csdev->enable) {
-		if (sink_ops(csdev)->enable) {
-			ret = sink_ops(csdev)->enable(csdev, mode);
-			if (ret)
-				return ret;
-		}
+	/*
+	 * We need to make sure the "new" session is compatible with the
+	 * existing "mode" of operation.
+	 */
+	if (sink_ops(csdev)->enable) {
+		ret = sink_ops(csdev)->enable(csdev, mode);
+		if (ret)
+			return ret;
 		csdev->enable = true;
 	}
 
@@ -339,8 +341,14 @@ int coresight_enable_path(struct list_head *path, u32 mode)
 		switch (type) {
 		case CORESIGHT_DEV_TYPE_SINK:
 			ret = coresight_enable_sink(csdev, mode);
+			/*
+			 * Sink is the first component turned on. If we
+			 * failed to enable the sink, there are no components
+			 * that need disabling. Disabling the path here
+			 * would mean we could disrupt an existing session.
+			 */
 			if (ret)
-				goto err;
+				goto out;
 			break;
 		case CORESIGHT_DEV_TYPE_SOURCE:
 			/* sources are enabled from either sysFS or Perf */
Signature · 1 line
2.20.1
author maintainer
#375 lore raw

PATCH 346/422 coresight: perf: Fix per cpu path management

In reply to Greg Kroah-Hartman

From: Suzuki K Poulose <[email protected]>

[ Upstream commit 5ecabe4a76e8cdb61fa3e24862d9ca240a1c4ddf ]

We create a coresight trace path for each online CPU when we start the event. We rely on the number of online CPUs and then go on to allocate an array matching the "number of online CPUs" for holding the path and then uses normal CPU id as the index to the array. This is problematic as we could have some offline CPUs causing us to access beyond the actual array size (e.g, on a dual SMP system, if CPU0 is offline, CPU1 could be really accessing beyond the array). The solution is to switch to per-cpu array for holding the path.

---
 .../hwtracing/coresight/coresight-etm-perf.c  | 55 ++++++++++++++-----
 1 file changed, 40 insertions(+), 15 deletions(-)
drivers/hwtracing/coresight/coresight-etm-perf.c +40 -15
index 0f5e03e4df22c..4b53d55788a07 100644
@@ -12,6 +12,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/perf_event.h>
+#include <linux/percpu-defs.h>
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/workqueue.h>
@@ -33,7 +34,7 @@ struct etm_event_data {
 	struct work_struct work;
 	cpumask_t mask;
 	void *snk_config;
-	struct list_head **path;
+	struct list_head * __percpu *path;
 };
 
 static DEFINE_PER_CPU(struct perf_output_handle, ctx_handle);
@@ -61,6 +62,18 @@ static const struct attribute_group *etm_pmu_attr_groups[] = {
 	NULL,
 };
 
+static inline struct list_head **
+etm_event_cpu_path_ptr(struct etm_event_data *data, int cpu)
+{
+	return per_cpu_ptr(data->path, cpu);
+}
+
+static inline struct list_head *
+etm_event_cpu_path(struct etm_event_data *data, int cpu)
+{
+	return *etm_event_cpu_path_ptr(data, cpu);
+}
+
 static void etm_event_read(struct perf_event *event) {}
 
 static int etm_addr_filters_alloc(struct perf_event *event)
@@ -120,23 +133,26 @@ static void free_event_data(struct work_struct *work)
 	 */
 	if (event_data->snk_config) {
 		cpu = cpumask_first(mask);
-		sink = coresight_get_sink(event_data->path[cpu]);
+		sink = coresight_get_sink(etm_event_cpu_path(event_data, cpu));
 		if (sink_ops(sink)->free_buffer)
 			sink_ops(sink)->free_buffer(event_data->snk_config);
 	}
 
 	for_each_cpu(cpu, mask) {
-		if (!(IS_ERR_OR_NULL(event_data->path[cpu])))
-			coresight_release_path(event_data->path[cpu]);
+		struct list_head **ppath;
+
+		ppath = etm_event_cpu_path_ptr(event_data, cpu);
+		if (!(IS_ERR_OR_NULL(*ppath)))
+			coresight_release_path(*ppath);
+		*ppath = NULL;
 	}
 
-	kfree(event_data->path);
+	free_percpu(event_data->path);
 	kfree(event_data);
 }
 
 static void *alloc_event_data(int cpu)
 {
-	int size;
 	cpumask_t *mask;
 	struct etm_event_data *event_data;
 
@@ -147,7 +163,6 @@ static void *alloc_event_data(int cpu)
 
 	/* Make sure nothing disappears under us */
 	get_online_cpus();
-	size = num_online_cpus();
 
 	mask = &event_data->mask;
 	if (cpu != -1)
@@ -164,8 +179,8 @@ static void *alloc_event_data(int cpu)
 	 * unused memory when dealing with single CPU trace scenarios is small
 	 * compared to the cost of searching through an optimized array.
 	 */
-	event_data->path = kcalloc(size,
-				   sizeof(struct list_head *), GFP_KERNEL);
+	event_data->path = alloc_percpu(struct list_head *);
+
 	if (!event_data->path) {
 		kfree(event_data);
 		return NULL;
@@ -213,6 +228,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages,
 
 	/* Setup the path for each CPU in a trace session */
 	for_each_cpu(cpu, mask) {
+		struct list_head *path;
 		struct coresight_device *csdev;
 
 		csdev = per_cpu(csdev_src, cpu);
@@ -224,9 +240,11 @@ static void *etm_setup_aux(struct perf_event *event, void **pages,
 		 * list of devices from source to sink that can be
 		 * referenced later when the path is actually needed.
 		 */
-		event_data->path[cpu] = coresight_build_path(csdev, sink);
-		if (IS_ERR(event_data->path[cpu]))
+		path = coresight_build_path(csdev, sink);
+		if (IS_ERR(path))
 			goto err;
+
+		*etm_event_cpu_path_ptr(event_data, cpu) = path;
 	}
 
 	if (!sink_ops(sink)->alloc_buffer)
@@ -255,6 +273,7 @@ static void etm_event_start(struct perf_event *event, int flags)
 	struct etm_event_data *event_data;
 	struct perf_output_handle *handle = this_cpu_ptr(&ctx_handle);
 	struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu);
+	struct list_head *path;
 
 	if (!csdev)
 		goto fail;
@@ -267,8 +286,9 @@ static void etm_event_start(struct perf_event *event, int flags)
 	if (!event_data)
 		goto fail;
 
+	path = etm_event_cpu_path(event_data, cpu);
 	/* We need a sink, no need to continue without one */
-	sink = coresight_get_sink(event_data->path[cpu]);
+	sink = coresight_get_sink(path);
 	if (WARN_ON_ONCE(!sink || !sink_ops(sink)->set_buffer))
 		goto fail_end_stop;
 
@@ -278,7 +298,7 @@ static void etm_event_start(struct perf_event *event, int flags)
 		goto fail_end_stop;
 
 	/* Nothing will happen without a path */
-	if (coresight_enable_path(event_data->path[cpu], CS_MODE_PERF))
+	if (coresight_enable_path(path, CS_MODE_PERF))
 		goto fail_end_stop;
 
 	/* Tell the perf core the event is alive */
@@ -306,6 +326,7 @@ static void etm_event_stop(struct perf_event *event, int mode)
 	struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu);
 	struct perf_output_handle *handle = this_cpu_ptr(&ctx_handle);
 	struct etm_event_data *event_data = perf_get_aux(handle);
+	struct list_head *path;
 
 	if (event->hw.state == PERF_HES_STOPPED)
 		return;
@@ -313,7 +334,11 @@ static void etm_event_stop(struct perf_event *event, int mode)
 	if (!csdev)
 		return;
 
-	sink = coresight_get_sink(event_data->path[cpu]);
+	path = etm_event_cpu_path(event_data, cpu);
+	if (!path)
+		return;
+
+	sink = coresight_get_sink(path);
 	if (!sink)
 		return;
 
@@ -344,7 +369,7 @@ static void etm_event_stop(struct perf_event *event, int mode)
 	}
 
 	/* Disabling the path make its elements available to other sessions */
-	coresight_disable_path(event_data->path[cpu]);
+	coresight_disable_path(path);
 }
 
 static int etm_event_add(struct perf_event *event, int mode)
Signature · 1 line
2.20.1
author maintainer
#376 lore raw

PATCH 347/422 coresight: perf: Disable trace path upon source error

In reply to Greg Kroah-Hartman

From: Suzuki K Poulose <[email protected]>

[ Upstream commit 4f8ef21007531c3d7cb5b826e7b2c8999b65ecae ]

We enable the trace path, before activating the source. If we fail to enable the source, we must disable the path to make sure it is available for another session.

---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-etm-perf.c +3 -1
index 4b53d55788a07..c3c6452015142 100644
@@ -306,11 +306,13 @@ static void etm_event_start(struct perf_event *event, int flags)
 
 	/* Finally enable the tracer */
 	if (source_ops(csdev)->enable(csdev, event, CS_MODE_PERF))
-		goto fail_end_stop;
+		goto fail_disable_path;
 
 out:
 	return;
 
+fail_disable_path:
+	coresight_disable_path(path);
 fail_end_stop:
 	perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
 	perf_aux_output_end(handle, 0);
Signature · 1 line
2.20.1
author maintainer
#377 lore raw

PATCH 348/422 coresight: tmc-etr: Handle driver mode specific ETR buffers

In reply to Greg Kroah-Hartman

From: Suzuki K Poulose <[email protected]>

[ Upstream commit 96a7f644006ecc05eaaa1a5d09373d0ee63beb0a ]

Since the ETR could be driven either by SYSFS or by perf, it becomes complicated how we deal with the buffers used for each of these modes. The ETR driver cannot simply free the current attached buffer without knowing the provider (i.e, sysfs vs perf).

To solve this issue, we provide:
1) the driver-mode specific etr buffer to be retained in the drvdata
2) the etr_buf for a session should be passed on when enabling the hardware, which will be stored in drvdata->etr_buf. This will be replaced (not free'd) as soon as the hardware is disabled, after necessary sync operation.

The advantages of this are :

1) The common code path doesn't need to worry about how to dispose an existing buffer, if it is about to start a new session with a different buffer, possibly in a different mode.
2) The driver mode can control its buffers and can get access to the saved session even when the hardware is operating in a different mode. (e.g, we can still access a trace buffer from a sysfs mode even if the etr is now used in perf mode, without disrupting the current session.)

Towards this, we introduce a sysfs specific data which will hold the etr_buf used for sysfs mode of operation, controlled solely by the sysfs mode handling code.

---
 .../hwtracing/coresight/coresight-tmc-etr.c   | 58 ++++++++++++-------
 drivers/hwtracing/coresight/coresight-tmc.h   |  2 +
 2 files changed, 40 insertions(+), 20 deletions(-)
drivers/hwtracing/coresight/coresight-tmc-etr.c +38 -20
index 11963647e19ae..2d6f428176ff8 100644
@@ -895,10 +895,15 @@ static void tmc_sync_etr_buf(struct tmc_drvdata *drvdata)
 		tmc_etr_buf_insert_barrier_packet(etr_buf, etr_buf->offset);
 }
 
-static void tmc_etr_enable_hw(struct tmc_drvdata *drvdata)
+static void tmc_etr_enable_hw(struct tmc_drvdata *drvdata,
+			      struct etr_buf *etr_buf)
 {
 	u32 axictl, sts;
-	struct etr_buf *etr_buf = drvdata->etr_buf;
+
+	/* Callers should provide an appropriate buffer for use */
+	if (WARN_ON(!etr_buf || drvdata->etr_buf))
+		return;
+	drvdata->etr_buf = etr_buf;
 
 	/*
 	 * If this ETR is connected to a CATU, enable it before we turn
@@ -960,13 +965,16 @@ static void tmc_etr_enable_hw(struct tmc_drvdata *drvdata)
  * also updating the @bufpp on where to find it. Since the trace data
  * starts at anywhere in the buffer, depending on the RRP, we adjust the
  * @len returned to handle buffer wrapping around.
+ *
+ * We are protected here by drvdata->reading != 0, which ensures the
+ * sysfs_buf stays alive.
  */
 ssize_t tmc_etr_get_sysfs_trace(struct tmc_drvdata *drvdata,
 				loff_t pos, size_t len, char **bufpp)
 {
 	s64 offset;
 	ssize_t actual = len;
-	struct etr_buf *etr_buf = drvdata->etr_buf;
+	struct etr_buf *etr_buf = drvdata->sysfs_buf;
 
 	if (pos + actual > etr_buf->len)
 		actual = etr_buf->len - pos;
@@ -996,7 +1004,14 @@ tmc_etr_free_sysfs_buf(struct etr_buf *buf)
 
 static void tmc_etr_sync_sysfs_buf(struct tmc_drvdata *drvdata)
 {
-	tmc_sync_etr_buf(drvdata);
+	struct etr_buf *etr_buf = drvdata->etr_buf;
+
+	if (WARN_ON(drvdata->sysfs_buf != etr_buf)) {
+		tmc_etr_free_sysfs_buf(drvdata->sysfs_buf);
+		drvdata->sysfs_buf = NULL;
+	} else {
+		tmc_sync_etr_buf(drvdata);
+	}
 }
 
 static void tmc_etr_disable_hw(struct tmc_drvdata *drvdata)
@@ -1017,6 +1032,8 @@ static void tmc_etr_disable_hw(struct tmc_drvdata *drvdata)
 
 	/* Disable CATU device if this ETR is connected to one */
 	tmc_etr_disable_catu(drvdata);
+	/* Reset the ETR buf used by hardware */
+	drvdata->etr_buf = NULL;
 }
 
 static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
@@ -1024,7 +1041,7 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
 	int ret = 0;
 	unsigned long flags;
 	struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
-	struct etr_buf *new_buf = NULL, *free_buf = NULL;
+	struct etr_buf *sysfs_buf = NULL, *new_buf = NULL, *free_buf = NULL;
 
 	/*
 	 * If we are enabling the ETR from disabled state, we need to make
@@ -1035,7 +1052,8 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
 	 * with the lock released.
 	 */
 	spin_lock_irqsave(&drvdata->spinlock, flags);
-	if (!drvdata->etr_buf || (drvdata->etr_buf->size != drvdata->size)) {
+	sysfs_buf = READ_ONCE(drvdata->sysfs_buf);
+	if (!sysfs_buf || (sysfs_buf->size != drvdata->size)) {
 		spin_unlock_irqrestore(&drvdata->spinlock, flags);
 
 		/* Allocate memory with the locks released */
@@ -1064,14 +1082,14 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
 	 * If we don't have a buffer or it doesn't match the requested size,
 	 * use the buffer allocated above. Otherwise reuse the existing buffer.
 	 */
-	if (!drvdata->etr_buf ||
-	    (new_buf && drvdata->etr_buf->size != new_buf->size)) {
-		free_buf = drvdata->etr_buf;
-		drvdata->etr_buf = new_buf;
+	sysfs_buf = READ_ONCE(drvdata->sysfs_buf);
+	if (!sysfs_buf || (new_buf && sysfs_buf->size != new_buf->size)) {
+		free_buf = sysfs_buf;
+		drvdata->sysfs_buf = new_buf;
 	}
 
 	drvdata->mode = CS_MODE_SYSFS;
-	tmc_etr_enable_hw(drvdata);
+	tmc_etr_enable_hw(drvdata, drvdata->sysfs_buf);
 out:
 	spin_unlock_irqrestore(&drvdata->spinlock, flags);
 
@@ -1156,13 +1174,13 @@ int tmc_read_prepare_etr(struct tmc_drvdata *drvdata)
 		goto out;
 	}
 
-	/* If drvdata::etr_buf is NULL the trace data has been read already */
-	if (drvdata->etr_buf == NULL) {
+	/* If sysfs_buf is NULL the trace data has been read already */
+	if (!drvdata->sysfs_buf) {
 		ret = -EINVAL;
 		goto out;
 	}
 
-	/* Disable the TMC if need be */
+	/* Disable the TMC if we are trying to read from a running session */
 	if (drvdata->mode == CS_MODE_SYSFS)
 		tmc_etr_disable_hw(drvdata);
 
@@ -1176,7 +1194,7 @@ out:
 int tmc_read_unprepare_etr(struct tmc_drvdata *drvdata)
 {
 	unsigned long flags;
-	struct etr_buf *etr_buf = NULL;
+	struct etr_buf *sysfs_buf = NULL;
 
 	/* config types are set a boot time and never change */
 	if (WARN_ON_ONCE(drvdata->config_type != TMC_CONFIG_TYPE_ETR))
@@ -1191,22 +1209,22 @@ int tmc_read_unprepare_etr(struct tmc_drvdata *drvdata)
 		 * buffer. Since the tracer is still enabled drvdata::buf can't
 		 * be NULL.
 		 */
-		tmc_etr_enable_hw(drvdata);
+		tmc_etr_enable_hw(drvdata, drvdata->sysfs_buf);
 	} else {
 		/*
 		 * The ETR is not tracing and the buffer was just read.
 		 * As such prepare to free the trace buffer.
 		 */
-		etr_buf =  drvdata->etr_buf;
-		drvdata->etr_buf = NULL;
+		sysfs_buf = drvdata->sysfs_buf;
+		drvdata->sysfs_buf = NULL;
 	}
 
 	drvdata->reading = false;
 	spin_unlock_irqrestore(&drvdata->spinlock, flags);
 
 	/* Free allocated memory out side of the spinlock */
-	if (etr_buf)
-		tmc_free_etr_buf(etr_buf);
+	if (sysfs_buf)
+		tmc_etr_free_sysfs_buf(sysfs_buf);
 
 	return 0;
 }
drivers/hwtracing/coresight/coresight-tmc.h +2 -0
index 7027bd60c4cc8..872f63e3651ba 100644
@@ -170,6 +170,7 @@ struct etr_buf {
  * @trigger_cntr: amount of words to store after a trigger.
  * @etr_caps:	Bitmask of capabilities of the TMC ETR, inferred from the
  *		device configuration register (DEVID)
+ * @sysfs_data:	SYSFS buffer for ETR.
  */
 struct tmc_drvdata {
 	void __iomem		*base;
@@ -189,6 +190,7 @@ struct tmc_drvdata {
 	enum tmc_mem_intf_width	memwidth;
 	u32			trigger_cntr;
 	u32			etr_caps;
+	struct etr_buf		*sysfs_buf;
 };
 
 struct etr_buf_operations {
Signature · 1 line
2.20.1
author maintainer
#378 lore raw

PATCH 349/422 coresight: etm4x: Configure EL2 exception level when kernel is running in HYP

In reply to Greg Kroah-Hartman

From: Tomasz Nowicki <[email protected]>

[ Upstream commit b860801e3237ec4c74cf8de0be4816996757ae5c ]

For non-VHE systems host kernel runs at EL1 and jumps to EL2 whenever hypervisor code should be executed. In this case ETM4x driver must restrict configuration to EL1 when it setups kernel tracing. However, there is no separate hypervisor privilege level when VHE is enabled, the host kernel runs at EL2.

This patch fixes configuration of TRCACATRn register for VHE systems so that ETM_EXLEVEL_NS_HYP bit is used instead of ETM_EXLEVEL_NS_OS to on/off kernel tracing. At the same time, it moves common code to new helper.

---
 drivers/hwtracing/coresight/coresight-etm4x.c | 40 +++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/hwtracing/coresight/coresight-etm4x.c +20 -20
index e45b5ec2f4512..b7bc08cf90c69 100644
@@ -28,6 +28,7 @@
 #include <linux/pm_runtime.h>
 #include <asm/sections.h>
 #include <asm/local.h>
+#include <asm/virt.h>
 
 #include "coresight-etm4x.h"
 #include "coresight-etm-perf.h"
@@ -616,7 +617,7 @@ static void etm4_set_default_config(struct etmv4_config *config)
 	config->vinst_ctrl |= BIT(0);
 }
 
-static u64 etm4_get_access_type(struct etmv4_config *config)
+static u64 etm4_get_ns_access_type(struct etmv4_config *config)
 {
 	u64 access_type = 0;
 
@@ -627,17 +628,26 @@ static u64 etm4_get_access_type(struct etmv4_config *config)
 	 *   Bit[13] Exception level 1 - OS
 	 *   Bit[14] Exception level 2 - Hypervisor
 	 *   Bit[15] Never implemented
-	 *
-	 * Always stay away from hypervisor mode.
 	 */
-	access_type = ETM_EXLEVEL_NS_HYP;
-
-	if (config->mode & ETM_MODE_EXCL_KERN)
-		access_type |= ETM_EXLEVEL_NS_OS;
+	if (!is_kernel_in_hyp_mode()) {
+		/* Stay away from hypervisor mode for non-VHE */
+		access_type =  ETM_EXLEVEL_NS_HYP;
+		if (config->mode & ETM_MODE_EXCL_KERN)
+			access_type |= ETM_EXLEVEL_NS_OS;
+	} else if (config->mode & ETM_MODE_EXCL_KERN) {
+		access_type = ETM_EXLEVEL_NS_HYP;
+	}
 
 	if (config->mode & ETM_MODE_EXCL_USER)
 		access_type |= ETM_EXLEVEL_NS_APP;
 
+	return access_type;
+}
+
+static u64 etm4_get_access_type(struct etmv4_config *config)
+{
+	u64 access_type = etm4_get_ns_access_type(config);
+
 	/*
 	 * EXLEVEL_S, bits[11:8], don't trace anything happening
 	 * in secure state.
@@ -891,20 +901,10 @@ void etm4_config_trace_mode(struct etmv4_config *config)
 
 	addr_acc = config->addr_acc[ETM_DEFAULT_ADDR_COMP];
 	/* clear default config */
-	addr_acc &= ~(ETM_EXLEVEL_NS_APP | ETM_EXLEVEL_NS_OS);
+	addr_acc &= ~(ETM_EXLEVEL_NS_APP | ETM_EXLEVEL_NS_OS |
+		      ETM_EXLEVEL_NS_HYP);
 
-	/*
-	 * EXLEVEL_NS, bits[15:12]
-	 * The Exception levels are:
-	 *   Bit[12] Exception level 0 - Application
-	 *   Bit[13] Exception level 1 - OS
-	 *   Bit[14] Exception level 2 - Hypervisor
-	 *   Bit[15] Never implemented
-	 */
-	if (mode & ETM_MODE_EXCL_KERN)
-		addr_acc |= ETM_EXLEVEL_NS_OS;
-	else
-		addr_acc |= ETM_EXLEVEL_NS_APP;
+	addr_acc |= etm4_get_ns_access_type(config);
 
 	config->addr_acc[ETM_DEFAULT_ADDR_COMP] = addr_acc;
 	config->addr_acc[ETM_DEFAULT_ADDR_COMP + 1] = addr_acc;
Signature · 1 line
2.20.1
author maintainer
#379 lore raw

PATCH 350/422 coresight: tmc: Fix byte-address alignment for RRP

In reply to Greg Kroah-Hartman

From: Leo Yan <[email protected]>

[ Upstream commit e7753f3937610633a540f2be81be87531f96ff04 ]

Quoted 1 line

From the comment in the code, it claims the requirement for byte-address

alignment for RRP register: 'for 32-bit, 64-bit and 128-bit wide trace memory, the four LSBs must be 0s. For 256-bit wide trace memory, the five LSBs must be 0s'. This isn't consistent with the program, the program sets five LSBs as zeros for 32/64/128-bit wide trace memory and set six LSBs zeros for 256-bit wide trace memory.

After checking with the CoreSight Trace Memory Controller technical reference manual (ARM DDI 0461B, section 3.3.4 RAM Read Pointer Register), it proves the comment is right and the program does wrong setting.

This patch fixes byte-address alignment for RRP by following correct definition in the technical reference manual.

---
 drivers/hwtracing/coresight/coresight-tmc-etf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwtracing/coresight/coresight-tmc-etf.c +2 -2
index 0549249f4b398..e31061308e19e 100644
@@ -438,10 +438,10 @@ static void tmc_update_etf_buffer(struct coresight_device *csdev,
 		case TMC_MEM_INTF_WIDTH_32BITS:
 		case TMC_MEM_INTF_WIDTH_64BITS:
 		case TMC_MEM_INTF_WIDTH_128BITS:
-			mask = GENMASK(31, 5);
+			mask = GENMASK(31, 4);
 			break;
 		case TMC_MEM_INTF_WIDTH_256BITS:
-			mask = GENMASK(31, 6);
+			mask = GENMASK(31, 5);
 			break;
 		}
 
Signature · 1 line
2.20.1
author maintainer
#380 lore raw

PATCH 351/422 coresight: dynamic-replicator: Handle multiple connections

In reply to Greg Kroah-Hartman

From: Suzuki K Poulose <[email protected]>

[ Upstream commit 30af4fb619e5126cb3152072e687b377fc9398d6 ]

When a replicator port is enabled, we block the traffic on the other port and route all traffic to the new enabled port. If there are two active trace sessions each targeting the two different paths from the replicator, the second session will disable the first session and route all the data to the second path.

                    ETR
                 /
e.g, replicator
                 \
                    ETB

If CPU0 is operated in sysfs mode to ETR and CPU1 is operated in perf mode to ETB, depending on the order in which the replicator is enabled one device is blocked.

Ideally we need trace-id for the session to make the right choice. That implies we need a trace-id allocation logic for the coresight subsystem and use that to route the traffic. The short term solution is to only manage the "target port" and leave the other port untouched. That leaves both the paths unaffected, except that some unwanted traffic may be pushed to the paths (if the Trace-IDs are not far enough), which is still fine and can be filtered out while processing rather than silently blocking the data.

---
 .../coresight/coresight-dynamic-replicator.c  | 64 ++++++++++++++-----
 1 file changed, 47 insertions(+), 17 deletions(-)
drivers/hwtracing/coresight/coresight-dynamic-replicator.c +47 -17
index f6d0571ab9dd5..d31f1d8758b24 100644
@@ -34,26 +34,42 @@ struct replicator_state {
 	struct coresight_device	*csdev;
 };
 
+/*
+ * replicator_reset : Reset the replicator configuration to sane values.
+ */
+static void replicator_reset(struct replicator_state *drvdata)
+{
+	CS_UNLOCK(drvdata->base);
+
+	writel_relaxed(0xff, drvdata->base + REPLICATOR_IDFILTER0);
+	writel_relaxed(0xff, drvdata->base + REPLICATOR_IDFILTER1);
+
+	CS_LOCK(drvdata->base);
+}
+
 static int replicator_enable(struct coresight_device *csdev, int inport,
 			      int outport)
 {
+	u32 reg;
 	struct replicator_state *drvdata = dev_get_drvdata(csdev->dev.parent);
 
+	switch (outport) {
+	case 0:
+		reg = REPLICATOR_IDFILTER0;
+		break;
+	case 1:
+		reg = REPLICATOR_IDFILTER1;
+		break;
+	default:
+		WARN_ON(1);
+		return -EINVAL;
+	}
+
 	CS_UNLOCK(drvdata->base);
 
-	/*
-	 * Ensure that the other port is disabled
-	 * 0x00 - passing through the replicator unimpeded
-	 * 0xff - disable (or impede) the flow of ATB data
-	 */
-	if (outport == 0) {
-		writel_relaxed(0x00, drvdata->base + REPLICATOR_IDFILTER0);
-		writel_relaxed(0xff, drvdata->base + REPLICATOR_IDFILTER1);
-	} else {
-		writel_relaxed(0x00, drvdata->base + REPLICATOR_IDFILTER1);
-		writel_relaxed(0xff, drvdata->base + REPLICATOR_IDFILTER0);
-	}
 
+	/* Ensure that the outport is enabled. */
+	writel_relaxed(0x00, drvdata->base + reg);
 	CS_LOCK(drvdata->base);
 
 	dev_info(drvdata->dev, "REPLICATOR enabled\n");
@@ -63,15 +79,25 @@ static int replicator_enable(struct coresight_device *csdev, int inport,
 static void replicator_disable(struct coresight_device *csdev, int inport,
 				int outport)
 {
+	u32 reg;
 	struct replicator_state *drvdata = dev_get_drvdata(csdev->dev.parent);
 
+	switch (outport) {
+	case 0:
+		reg = REPLICATOR_IDFILTER0;
+		break;
+	case 1:
+		reg = REPLICATOR_IDFILTER1;
+		break;
+	default:
+		WARN_ON(1);
+		return;
+	}
+
 	CS_UNLOCK(drvdata->base);
 
 	/* disable the flow of ATB data through port */
-	if (outport == 0)
-		writel_relaxed(0xff, drvdata->base + REPLICATOR_IDFILTER0);
-	else
-		writel_relaxed(0xff, drvdata->base + REPLICATOR_IDFILTER1);
+	writel_relaxed(0xff, drvdata->base + reg);
 
 	CS_LOCK(drvdata->base);
 
@@ -156,7 +182,11 @@ static int replicator_probe(struct amba_device *adev, const struct amba_id *id)
 	desc.groups = replicator_groups;
 	drvdata->csdev = coresight_register(&desc);
 
-	return PTR_ERR_OR_ZERO(drvdata->csdev);
+	if (!IS_ERR(drvdata->csdev)) {
+		replicator_reset(drvdata);
+		return 0;
+	}
+	return PTR_ERR(drvdata->csdev);
 }
 
 #ifdef CONFIG_PM
Signature · 1 line
2.20.1
author maintainer
#381 lore raw

PATCH 352/422 slimbus: ngd: register ngd driver only once.

In reply to Greg Kroah-Hartman

From: Srinivas Kandagatla <[email protected]>

[ Upstream commit 1830dad34c070161fda2ff1db77b39ffa78aa380 ]

Move ngd platform driver out of loop so that it registers only once.

---
 drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/slimbus/qcom-ngd-ctrl.c +1 -1
index f63d1b8a09335..a9abde2f4088b 100644
@@ -1346,7 +1346,6 @@ static int of_qcom_slim_ngd_register(struct device *parent,
 		ngd->base = ctrl->base + ngd->id * data->offset +
 					(ngd->id - 1) * data->size;
 		ctrl->ngd = ngd;
-		platform_driver_register(&qcom_slim_ngd_driver);
 
 		return 0;
 	}
@@ -1445,6 +1444,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
 	init_completion(&ctrl->reconf);
 	init_completion(&ctrl->qmi.qmi_comp);
 
+	platform_driver_register(&qcom_slim_ngd_driver);
 	return of_qcom_slim_ngd_register(dev, ctrl);
 }
 
Signature · 1 line
2.20.1
#382 lore raw

Re: [PATCH 4.19 352/422] slimbus: ngd: register ngd driver only once.

Quoted 5 lines · Greg Kroah-Hartman

From: Srinivas Kandagatla <[email protected]>

[ Upstream commit 1830dad34c070161fda2ff1db77b39ffa78aa380 ]

Move ngd platform driver out of loop so that it registers only once.

AFAICT driver_register is immediately followed by "return", so it was already registered only once before you patched it.

I don't think this should be in stable.

Best regards,
Pavel

Quoted 17 lines

+++ b/drivers/slimbus/qcom-ngd-ctrl.c

drivers/slimbus/qcom-ngd-ctrl.c +1 -1
@@ -1346,7 +1346,6 @@ static int of_qcom_slim_ngd_register(struct device *parent,
 		ngd->base = ctrl->base + ngd->id * data->offset +
 					(ngd->id - 1) * data->size;
 		ctrl->ngd = ngd;
-		platform_driver_register(&qcom_slim_ngd_driver);
 
 		return 0;
 	}
@@ -1445,6 +1444,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
 	init_completion(&ctrl->reconf);
 	init_completion(&ctrl->qmi.qmi_comp);
 
+	platform_driver_register(&qcom_slim_ngd_driver);
 	return of_qcom_slim_ngd_register(dev, ctrl);
 }
 
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#383 lore raw

PATCH 353/422 slimbus: ngd: return proper error code instead of zero

In reply to Greg Kroah-Hartman

From: Srinivas Kandagatla <[email protected]>

[ Upstream commit 9652e6aa62a1836494ebb8dbd402587c083b568c ]

It looks like there is a typo in probe return. Fix it.

---
 drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/slimbus/qcom-ngd-ctrl.c +1 -1
index a9abde2f4088b..e587be9064e74 100644
@@ -1393,7 +1393,7 @@ wq_err:
 	if (ctrl->mwq)
 		destroy_workqueue(ctrl->mwq);
 
-	return 0;
+	return ret;
 }
 
 static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
Signature · 1 line
2.20.1
#384 lore raw

Re: [PATCH 4.19 353/422] slimbus: ngd: return proper error code instead of zero

Quoted 18 lines · Greg Kroah-Hartman

From: Srinivas Kandagatla <[email protected]>

[ Upstream commit 9652e6aa62a1836494ebb8dbd402587c083b568c ]

It looks like there is a typo in probe return. Fix it.

---
 drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/slimbus/qcom-ngd-ctrl.c +0 -0
index a9abde2f4088b..e587be9064e74 100644

drivers/slimbus/qcom-ngd-ctrl.c wq_err: · line 1397

Quoted 6 lines
drivers/slimbus/qcom-ngd-ctrl.c +1 -1
@@ -1393,7 +1393,7 @@ wq_err:
 	if (ctrl->mwq)
 		destroy_workqueue(ctrl->mwq);
 
-	return 0;
+	return ret;
 }

The code makes no sense, even after the fix. Only way to enter wq_err is with via if !ctrl->mwq... but it proceeds to test it for zero.

IOW... this.

drivers/slimbus/qcom-ngd-ctrl.c +2 -8
index d72f8eed2e8b..5a327d45dc2d 100644
@@ -1385,17 +1385,11 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev)
 	ctrl->mwq = create_singlethread_workqueue("ngd_master");
 	if (!ctrl->mwq) {
 		dev_err(&pdev->dev, "Failed to start master worker\n");
-		ret = -ENOMEM;
-		goto wq_err;
+		qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi);
+		return -ENOMEM;
 	}
 
 	return 0;
-wq_err:
-	qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi);
-	if (ctrl->mwq)
-		destroy_workqueue(ctrl->mwq);
-
-	return ret;
 }
 
 static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#385 lore raw

PATCH 354/422 silmbus: ngd: register controller after power up.

In reply to Greg Kroah-Hartman

From: Srinivas Kandagatla <[email protected]>

[ Upstream commit 94fe5f2b45c4108885e4b71f6b181068632ec904 ]

Register slimbus controller only after finishing powerup sequnce so that we do not endup in situation where core starts sending transactions before the controller is ready.

---
 drivers/slimbus/qcom-ngd-ctrl.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/slimbus/qcom-ngd-ctrl.c +11 -9
index e587be9064e74..d72f8eed2e8b7 100644
@@ -1234,8 +1234,17 @@ static int qcom_slim_ngd_enable(struct qcom_slim_ngd_ctrl *ctrl, bool enable)
 			pm_runtime_resume(ctrl->dev);
 		pm_runtime_mark_last_busy(ctrl->dev);
 		pm_runtime_put(ctrl->dev);
+
+		ret = slim_register_controller(&ctrl->ctrl);
+		if (ret) {
+			dev_err(ctrl->dev, "error adding slim controller\n");
+			return ret;
+		}
+
+		dev_info(ctrl->dev, "SLIM controller Registered\n");
 	} else {
 		qcom_slim_qmi_exit(ctrl);
+		slim_unregister_controller(&ctrl->ctrl);
 	}
 
 	return 0;
@@ -1360,11 +1369,6 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev)
 	int ret;
 
 	ctrl->ctrl.dev = dev;
-	ret = slim_register_controller(&ctrl->ctrl);
-	if (ret) {
-		dev_err(dev, "error adding slim controller\n");
-		return ret;
-	}
 
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_set_autosuspend_delay(dev, QCOM_SLIM_NGD_AUTOSUSPEND);
@@ -1374,7 +1378,7 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev)
 	ret = qcom_slim_ngd_qmi_svc_event_init(ctrl);
 	if (ret) {
 		dev_err(&pdev->dev, "QMI service registration failed:%d", ret);
-		goto err;
+		return ret;
 	}
 
 	INIT_WORK(&ctrl->m_work, qcom_slim_ngd_master_worker);
@@ -1386,8 +1390,6 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev)
 	}
 
 	return 0;
-err:
-	slim_unregister_controller(&ctrl->ctrl);
 wq_err:
 	qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi);
 	if (ctrl->mwq)
@@ -1460,7 +1462,7 @@ static int qcom_slim_ngd_remove(struct platform_device *pdev)
 	struct qcom_slim_ngd_ctrl *ctrl = platform_get_drvdata(pdev);
 
 	pm_runtime_disable(&pdev->dev);
-	slim_unregister_controller(&ctrl->ctrl);
+	qcom_slim_ngd_enable(ctrl, false);
 	qcom_slim_ngd_exit_dma(ctrl);
 	qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi);
 	if (ctrl->mwq)
Signature · 1 line
2.20.1
author maintainer
#386 lore raw

PATCH 355/422 misc: kgdbts: Fix restrict error

In reply to Greg Kroah-Hartman

From: Laura Abbott <[email protected]>

[ Upstream commit fa0218ef733e6f247a1a3986e3eb12460064ac77 ]

kgdbts current fails when compiled with restrict:

drivers/misc/kgdbts.c: In function ‘configure_kgdbts’:
drivers/misc/kgdbts.c:1070:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict]
strcpy(config, opt);
^~~~~~~~~~~~~~~~~~~

As the error says, config is being used in both the source and destination. Refactor the code to avoid the extra copy and put the parsing closer to the actual location.

---
 drivers/misc/kgdbts.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/misc/kgdbts.c +6 -10
index eb4d90b7d99e1..8b01257783dd8 100644
@@ -985,6 +985,12 @@ static void kgdbts_run_tests(void)
 	int nmi_sleep = 0;
 	int i;
 
+	verbose = 0;
+	if (strstr(config, "V1"))
+		verbose = 1;
+	if (strstr(config, "V2"))
+		verbose = 2;
+
 	ptr = strchr(config, 'F');
 	if (ptr)
 		fork_test = simple_strtol(ptr + 1, NULL, 10);
@@ -1068,13 +1074,6 @@ static int kgdbts_option_setup(char *opt)
 		return -ENOSPC;
 	}
 	strcpy(config, opt);
-
-	verbose = 0;
-	if (strstr(config, "V1"))
-		verbose = 1;
-	if (strstr(config, "V2"))
-		verbose = 2;
-
 	return 0;
 }
 
@@ -1086,9 +1085,6 @@ static int configure_kgdbts(void)
 
 	if (!strlen(config) || isspace(config[0]))
 		goto noconfig;
-	err = kgdbts_option_setup(config);
-	if (err)
-		goto noconfig;
 
 	final_ack = 0;
 	run_plant_and_detach_test(1);
Signature · 1 line
2.20.1
author maintainer
#387 lore raw

PATCH 356/422 misc: genwqe: should return proper error value.

In reply to Greg Kroah-Hartman

From: zhong jiang <[email protected]>

[ Upstream commit 02241995b004faa7d9ff628e97f24056190853f8 ]

The function should return -EFAULT when copy_from_user fails. Even though the caller does not distinguish them. but we should keep backward compatibility.

---
 drivers/misc/genwqe/card_utils.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/misc/genwqe/card_utils.c +7 -6
index f68435df76d48..22301bba8c495 100644
@@ -298,7 +298,7 @@ static int genwqe_sgl_size(int num_pages)
 int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 			  void __user *user_addr, size_t user_size, int write)
 {
-	int rc;
+	int ret = -ENOMEM;
 	struct pci_dev *pci_dev = cd->pci_dev;
 
 	sgl->fpage_offs = offset_in_page((unsigned long)user_addr);
@@ -318,7 +318,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 	if (get_order(sgl->sgl_size) > MAX_ORDER) {
 		dev_err(&pci_dev->dev,
 			"[%s] err: too much memory requested!\n", __func__);
-		return -ENOMEM;
+		return ret;
 	}
 
 	sgl->sgl = __genwqe_alloc_consistent(cd, sgl->sgl_size,
@@ -326,7 +326,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 	if (sgl->sgl == NULL) {
 		dev_err(&pci_dev->dev,
 			"[%s] err: no memory available!\n", __func__);
-		return -ENOMEM;
+		return ret;
 	}
 
 	/* Only use buffering on incomplete pages */
@@ -339,7 +339,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 		/* Sync with user memory */
 		if (copy_from_user(sgl->fpage + sgl->fpage_offs,
 				   user_addr, sgl->fpage_size)) {
-			rc = -EFAULT;
+			ret = -EFAULT;
 			goto err_out;
 		}
 	}
@@ -352,7 +352,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 		/* Sync with user memory */
 		if (copy_from_user(sgl->lpage, user_addr + user_size -
 				   sgl->lpage_size, sgl->lpage_size)) {
-			rc = -EFAULT;
+			ret = -EFAULT;
 			goto err_out2;
 		}
 	}
@@ -374,7 +374,8 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 	sgl->sgl = NULL;
 	sgl->sgl_dma_addr = 0;
 	sgl->sgl_size = 0;
-	return -ENOMEM;
+
+	return ret;
 }
 
 int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
Signature · 1 line
2.20.1
author maintainer
#388 lore raw

PATCH 357/422 vmbus: keep pointer to ring buffer page

In reply to Greg Kroah-Hartman

From: Stephen Hemminger <[email protected]>

[ Upstream commit 52a42c2a90226dc61c99bbd0cb096deeb52c334b ]

Avoid going from struct page to virt address (and back) by just keeping pointer to the allocated pages instead of virt address.

---
 drivers/hv/channel.c         | 20 +++++++++-----------
 drivers/uio/uio_hv_generic.c |  5 +++--
 include/linux/hyperv.h       |  2 +-
 3 files changed, 13 insertions(+), 14 deletions(-)
drivers/hv/channel.c +9 -11
index fdb0f832fadef..5e515533e9cdb 100644
@@ -91,11 +91,14 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
 	unsigned long flags;
 	int ret, err = 0;
 	struct page *page;
+	unsigned int order;
 
 	if (send_ringbuffer_size % PAGE_SIZE ||
 	    recv_ringbuffer_size % PAGE_SIZE)
 		return -EINVAL;
 
+	order = get_order(send_ringbuffer_size + recv_ringbuffer_size);
+
 	spin_lock_irqsave(&newchannel->lock, flags);
 	if (newchannel->state == CHANNEL_OPEN_STATE) {
 		newchannel->state = CHANNEL_OPENING_STATE;
@@ -110,21 +113,17 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
 
 	/* Allocate the ring buffer */
 	page = alloc_pages_node(cpu_to_node(newchannel->target_cpu),
-				GFP_KERNEL|__GFP_ZERO,
-				get_order(send_ringbuffer_size +
-				recv_ringbuffer_size));
+				GFP_KERNEL|__GFP_ZERO, order);
 
 	if (!page)
-		page = alloc_pages(GFP_KERNEL|__GFP_ZERO,
-				   get_order(send_ringbuffer_size +
-					     recv_ringbuffer_size));
+		page = alloc_pages(GFP_KERNEL|__GFP_ZERO, order);
 
 	if (!page) {
 		err = -ENOMEM;
 		goto error_set_chnstate;
 	}
 
-	newchannel->ringbuffer_pages = page_address(page);
+	newchannel->ringbuffer_page = page;
 	newchannel->ringbuffer_pagecount = (send_ringbuffer_size +
 					   recv_ringbuffer_size) >> PAGE_SHIFT;
 
@@ -239,8 +238,7 @@ error_free_gpadl:
 error_free_pages:
 	hv_ringbuffer_cleanup(&newchannel->outbound);
 	hv_ringbuffer_cleanup(&newchannel->inbound);
-	__free_pages(page,
-		     get_order(send_ringbuffer_size + recv_ringbuffer_size));
+	__free_pages(page, order);
 error_set_chnstate:
 	newchannel->state = CHANNEL_OPEN_STATE;
 	return err;
@@ -666,8 +664,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel)
 	hv_ringbuffer_cleanup(&channel->outbound);
 	hv_ringbuffer_cleanup(&channel->inbound);
 
-	free_pages((unsigned long)channel->ringbuffer_pages,
-		get_order(channel->ringbuffer_pagecount * PAGE_SIZE));
+	__free_pages(channel->ringbuffer_page,
+		     get_order(channel->ringbuffer_pagecount << PAGE_SHIFT));
 
 out:
 	return ret;
drivers/uio/uio_hv_generic.c +3 -2
index e401be8321ab5..170fa1f8f00e0 100644
@@ -131,11 +131,12 @@ static int hv_uio_ring_mmap(struct file *filp, struct kobject *kobj,
 		= container_of(kobj, struct vmbus_channel, kobj);
 	struct hv_device *dev = channel->primary_channel->device_obj;
 	u16 q_idx = channel->offermsg.offer.sub_channel_index;
+	void *ring_buffer = page_address(channel->ringbuffer_page);
 
 	dev_dbg(&dev->device, "mmap channel %u pages %#lx at %#lx\n",
 		q_idx, vma_pages(vma), vma->vm_pgoff);
 
-	return vm_iomap_memory(vma, virt_to_phys(channel->ringbuffer_pages),
+	return vm_iomap_memory(vma, virt_to_phys(ring_buffer),
 			       channel->ringbuffer_pagecount << PAGE_SHIFT);
 }
 
@@ -224,7 +225,7 @@ hv_uio_probe(struct hv_device *dev,
 	/* mem resources */
 	pdata->info.mem[TXRX_RING_MAP].name = "txrx_rings";
 	pdata->info.mem[TXRX_RING_MAP].addr
-		= (uintptr_t)dev->channel->ringbuffer_pages;
+		= (uintptr_t)page_address(dev->channel->ringbuffer_page);
 	pdata->info.mem[TXRX_RING_MAP].size
 		= dev->channel->ringbuffer_pagecount << PAGE_SHIFT;
 	pdata->info.mem[TXRX_RING_MAP].memtype = UIO_MEM_LOGICAL;
include/linux/hyperv.h +1 -1
index bbde887ed3931..c43e694fef7dd 100644
@@ -739,7 +739,7 @@ struct vmbus_channel {
 	u32 ringbuffer_gpadlhandle;
 
 	/* Allocated memory for ring buffer */
-	void *ringbuffer_pages;
+	struct page *ringbuffer_page;
 	u32 ringbuffer_pagecount;
 	struct hv_ring_buffer_info outbound;	/* send to parent */
 	struct hv_ring_buffer_info inbound;	/* receive from parent */
Signature · 1 line
2.20.1
author maintainer
#389 lore raw

PATCH 358/422 vfio/pci: Fix potential memory leak in vfio_msi_cap_len

In reply to Greg Kroah-Hartman

From: Li Qiang <[email protected]>

[ Upstream commit 30ea32ab1951c80c6113f300fce2c70cd12659e4 ]

Free allocated vdev->msi_perm in error path.

---
 drivers/vfio/pci/vfio_pci_config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/vfio/pci/vfio_pci_config.c +3 -1
index 115a36f6f4039..62023b4a373b4 100644
@@ -1180,8 +1180,10 @@ static int vfio_msi_cap_len(struct vfio_pci_device *vdev, u8 pos)
 		return -ENOMEM;
 
 	ret = init_pci_cap_msi_perm(vdev->msi_perm, len, flags);
-	if (ret)
+	if (ret) {
+		kfree(vdev->msi_perm);
 		return ret;
+	}
 
 	return len;
 }
Signature · 1 line
2.20.1
author maintainer
#390 lore raw

PATCH 359/422 vfio/pci: Mask buggy SR-IOV VF INTx support

In reply to Greg Kroah-Hartman

From: Alex Williamson <[email protected]>

[ Upstream commit db04264fe9bc0f2b62e036629f9afb530324b693 ]

The SR-IOV spec requires that VFs must report zero for the INTx pin register as VFs are precluded from INTx support. It's much easier for the host kernel to understand whether a device is a VF and therefore whether a non-zero pin register value is bogus than it is to do the same in userspace. Override the INTx count for such devices and virtualize the pin register to provide a consistent view of the device to the user.

As this is clearly a spec violation, warn about it to support hardware validation, but also provide a known whitelist as it doesn't do much good to continue complaining if the hardware vendor doesn't plan to fix it.

Known devices with this issue: 8086:270c

---
 drivers/vfio/pci/vfio_pci.c        |  8 ++++++--
 drivers/vfio/pci/vfio_pci_config.c | 27 +++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 2 deletions(-)
drivers/vfio/pci/vfio_pci.c +6 -2
index a92c2868d9021..0a6eb53e79fbf 100644
@@ -443,10 +443,14 @@ static int vfio_pci_get_irq_count(struct vfio_pci_device *vdev, int irq_type)
 {
 	if (irq_type == VFIO_PCI_INTX_IRQ_INDEX) {
 		u8 pin;
+
+		if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) ||
+		    vdev->nointx || vdev->pdev->is_virtfn)
+			return 0;
+
 		pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin);
-		if (IS_ENABLED(CONFIG_VFIO_PCI_INTX) && !vdev->nointx && pin)
-			return 1;
 
+		return pin ? 1 : 0;
 	} else if (irq_type == VFIO_PCI_MSI_IRQ_INDEX) {
 		u8 pos;
 		u16 flags;
drivers/vfio/pci/vfio_pci_config.c +27 -0
index 62023b4a373b4..423ea1f98441a 100644
@@ -1611,6 +1611,15 @@ static int vfio_ecap_init(struct vfio_pci_device *vdev)
 	return 0;
 }
 
+/*
+ * Nag about hardware bugs, hopefully to have vendors fix them, but at least
+ * to collect a list of dependencies for the VF INTx pin quirk below.
+ */
+static const struct pci_device_id known_bogus_vf_intx_pin[] = {
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x270c) },
+	{}
+};
+
 /*
  * For each device we allocate a pci_config_map that indicates the
  * capability occupying each dword and thus the struct perm_bits we
@@ -1676,6 +1685,24 @@ int vfio_config_init(struct vfio_pci_device *vdev)
 	if (pdev->is_virtfn) {
 		*(__le16 *)&vconfig[PCI_VENDOR_ID] = cpu_to_le16(pdev->vendor);
 		*(__le16 *)&vconfig[PCI_DEVICE_ID] = cpu_to_le16(pdev->device);
+
+		/*
+		 * Per SR-IOV spec rev 1.1, 3.4.1.18 the interrupt pin register
+		 * does not apply to VFs and VFs must implement this register
+		 * as read-only with value zero.  Userspace is not readily able
+		 * to identify whether a device is a VF and thus that the pin
+		 * definition on the device is bogus should it violate this
+		 * requirement.  We already virtualize the pin register for
+		 * other purposes, so we simply need to replace the bogus value
+		 * and consider VFs when we determine INTx IRQ count.
+		 */
+		if (vconfig[PCI_INTERRUPT_PIN] &&
+		    !pci_match_id(known_bogus_vf_intx_pin, pdev))
+			pci_warn(pdev,
+				 "Hardware bug: VF reports bogus INTx pin %d\n",
+				 vconfig[PCI_INTERRUPT_PIN]);
+
+		vconfig[PCI_INTERRUPT_PIN] = 0; /* Gratuitous for good VFs */
 	}
 
 	if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) || vdev->nointx)
Signature · 1 line
2.20.1
author maintainer
#391 lore raw

PATCH 360/422 iw_cxgb4: Use proper enumerated type in c4iw_bar2_addrs

In reply to Greg Kroah-Hartman

From: Nathan Chancellor <[email protected]>

[ Upstream commit 1b571086e869395b6a11ab24186b0104fe05c057 ]

Clang warns when one enumerated type is implicitly converted to another.

drivers/infiniband/hw/cxgb4/qp.c:287:8: warning: implicit conversion from enumeration type 'enum t4_bar2_qtype' to different enumeration type 'enum cxgb4_bar2_qtype' [-Wenum-conversion]

                                                 T4_BAR2_QTYPE_EGRESS,
                                                 ^~~~~~~~~~~~~~~~~~~~

c4iw_bar2_addrs expects a value from enum cxgb4_bar2_qtype so use the corresponding values from that type so Clang is satisfied without changing the meaning of the code.

T4_BAR2_QTYPE_EGRESS = CXGB4_BAR2_QTYPE_EGRESS = 0 T4_BAR2_QTYPE_INGRESS = CXGB4_BAR2_QTYPE_INGRESS = 1

---
 drivers/infiniband/hw/cxgb4/cq.c | 2 +-
 drivers/infiniband/hw/cxgb4/qp.c | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/infiniband/hw/cxgb4/cq.c +1 -1
index 6d30427940942..1fd8798d91a73 100644
@@ -161,7 +161,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq,
 	cq->gts = rdev->lldi.gts_reg;
 	cq->rdev = rdev;
 
-	cq->bar2_va = c4iw_bar2_addrs(rdev, cq->cqid, T4_BAR2_QTYPE_INGRESS,
+	cq->bar2_va = c4iw_bar2_addrs(rdev, cq->cqid, CXGB4_BAR2_QTYPE_INGRESS,
 				      &cq->bar2_qid,
 				      user ? &cq->bar2_pa : NULL);
 	if (user && !cq->bar2_pa) {
drivers/infiniband/hw/cxgb4/qp.c +4 -3
index 347fe18b1a41c..a9e3a11bea54a 100644
@@ -279,12 +279,13 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
 
 	wq->db = rdev->lldi.db_reg;
 
-	wq->sq.bar2_va = c4iw_bar2_addrs(rdev, wq->sq.qid, T4_BAR2_QTYPE_EGRESS,
+	wq->sq.bar2_va = c4iw_bar2_addrs(rdev, wq->sq.qid,
+					 CXGB4_BAR2_QTYPE_EGRESS,
 					 &wq->sq.bar2_qid,
 					 user ? &wq->sq.bar2_pa : NULL);
 	if (need_rq)
 		wq->rq.bar2_va = c4iw_bar2_addrs(rdev, wq->rq.qid,
-						 T4_BAR2_QTYPE_EGRESS,
+						 CXGB4_BAR2_QTYPE_EGRESS,
 						 &wq->rq.bar2_qid,
 						 user ? &wq->rq.bar2_pa : NULL);
 
@@ -2572,7 +2573,7 @@ static int alloc_srq_queue(struct c4iw_srq *srq, struct c4iw_dev_ucontext *uctx,
 	memset(wq->queue, 0, wq->memsize);
 	pci_unmap_addr_set(wq, mapping, wq->dma_addr);
 
-	wq->bar2_va = c4iw_bar2_addrs(rdev, wq->qid, T4_BAR2_QTYPE_EGRESS,
+	wq->bar2_va = c4iw_bar2_addrs(rdev, wq->qid, CXGB4_BAR2_QTYPE_EGRESS,
 				      &wq->bar2_qid,
 			user ? &wq->bar2_pa : NULL);
 
Signature · 1 line
2.20.1
author maintainer
#392 lore raw

PATCH 361/422 scsi: libsas: always unregister the old device if going to discover new

In reply to Greg Kroah-Hartman

From: Jason Yan <[email protected]>

[ Upstream commit 32c850bf587f993b2620b91e5af8a64a7813f504 ]

If we went into sas_rediscover_dev() the attached_sas_addr was already insured not to be zero. So it's unnecessary to check if the attached_sas_addr is zero.

And although if the sas address is not changed, we always have to unregister the old device when we are going to register a new one. We cannot just leave the device there and bring up the new.

CC chenxiang <[email protected]>
CC John Garry <[email protected]>
CC Johannes Thumshirn <[email protected]>
CC Ewan Milne <[email protected]>
CC Christoph Hellwig <[email protected]>
CC Tomas Henzl <[email protected]>
CC Dan Williams <[email protected]>
CC Hannes Reinecke <[email protected]>
---
 drivers/scsi/libsas/sas_expander.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/scsi/libsas/sas_expander.c +5 -8
index b141d1061f38e..2ee9c4ec7a541 100644
@@ -2062,14 +2062,11 @@ static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)
 		return res;
 	}
 
-	/* delete the old link */
-	if (SAS_ADDR(phy->attached_sas_addr) &&
-	    SAS_ADDR(sas_addr) != SAS_ADDR(phy->attached_sas_addr)) {
-		SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n",
-			    SAS_ADDR(dev->sas_addr), phy_id,
-			    SAS_ADDR(phy->attached_sas_addr));
-		sas_unregister_devs_sas_addr(dev, phy_id, last);
-	}
+	/* we always have to delete the old device when we went here */
+	SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n",
+		    SAS_ADDR(dev->sas_addr), phy_id,
+		    SAS_ADDR(phy->attached_sas_addr));
+	sas_unregister_devs_sas_addr(dev, phy_id, last);
 
 	return sas_discover_new(dev, phy_id);
 }
Signature · 1 line
2.20.1
author maintainer
#393 lore raw

PATCH 362/422 f2fs: fix remount problem of option io_bits

In reply to Greg Kroah-Hartman

From: Chengguang Xu <[email protected]>

[ Upstream commit c6b1867b1da3b1203b4c49988afeebdcbdf65499 ]

Currently we show mount option "io_bits=%u" as "io_size=%uKB", it will cause option parsing problem(unrecognized mount option) in remount.

---
 fs/f2fs/super.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/super.c +2 -1
index c5d28e92d146e..b05e10c332b7e 100644
@@ -1336,7 +1336,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
 				from_kgid_munged(&init_user_ns,
 					F2FS_OPTION(sbi).s_resgid));
 	if (F2FS_IO_SIZE_BITS(sbi))
-		seq_printf(seq, ",io_size=%uKB", F2FS_IO_SIZE_KB(sbi));
+		seq_printf(seq, ",io_bits=%u",
+				F2FS_OPTION(sbi).write_io_size_bits);
 #ifdef CONFIG_F2FS_FAULT_INJECTION
 	if (test_opt(sbi, FAULT_INJECTION)) {
 		seq_printf(seq, ",fault_injection=%u",
Signature · 1 line
2.20.1
author maintainer
#394 lore raw

PATCH 363/422 phy: lantiq: Fix compile warning

In reply to Greg Kroah-Hartman

From: Hauke Mehrtens <[email protected]>

[ Upstream commit 3a00dae006623d799266d85f28b5f76ef07d6b6c ]

This local variable is unused, remove it.

Fixes dea54fbad332 ("phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module")
---
 drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 1 -
 1 file changed, 1 deletion(-)
drivers/phy/lantiq/phy-lantiq-rcu-usb2.c +0 -1
index 986224fca9e91..5a180f71d8d4d 100644
@@ -156,7 +156,6 @@ static int ltq_rcu_usb2_of_parse(struct ltq_rcu_usb2_priv *priv,
 {
 	struct device *dev = priv->dev;
 	const __be32 *offset;
-	int ret;
 
 	priv->reg_bits = of_device_get_match_data(dev);
 
Signature · 1 line
2.20.1
author maintainer
#395 lore raw

PATCH 364/422 ARM: dts: meson8b: odroidc1: enable the SAR ADC

In reply to Greg Kroah-Hartman

From: Martin Blumenstingl <[email protected]>

[ Upstream commit fd6643142a0c5ab4d423ed7173a0be414d509214 ]

Odroid-C1 exposes ADC channels 0 and 1 on the GPIO headers. NOTE: Due to the SoC design these are limited to 1.8V (instead of 3.3V like all other pins).
Enable the SAR ADC to enable voltage measurements on these pins.

---
 arch/arm/boot/dts/meson8b-odroidc1.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/meson8b-odroidc1.dts +5 -0
index 8fdeeffecbdbc..8a09071d712a5 100644
@@ -153,6 +153,11 @@
 	pinctrl-names = "default";
 };
 
+&saradc {
+	status = "okay";
+	vref-supply = <&vcc_1v8>;
+};
+
 &sdio {
 	status = "okay";
 
Signature · 1 line
2.20.1
author maintainer
#396 lore raw

PATCH 365/422 arm64: dts: fsl: Fix I2C and SPI bus warnings

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit b739c177e1aeab532f355493439a1901b85be38c ]

dtc has new checks for I2C and SPI buses. Fix the SPI bus node names and warnings in unit-addresses.

arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: Warning (i2c_bus_reg): /soc/i2c@2180000/eeprom@57: I2C bus unit address format error, expected "53" arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: Warning (i2c_bus_reg): /soc/i2c@2180000/eeprom@56: I2C bus unit address format error, expected "52"

---
 arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi    | 2 +-
 arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi    | 6 +++---
 arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts | 4 ++--
 arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi    | 4 ++--
 arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi    | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi +1 -1
index 68ac78c4564dc..5da732f82fa0c 100644
@@ -337,7 +337,7 @@
 			status = "disabled";
 		};
 
-		dspi: dspi@2100000 {
+		dspi: spi@2100000 {
 			compatible = "fsl,ls1012a-dspi", "fsl,ls1021a-v1.0-dspi";
 			#address-cells = <1>;
 			#size-cells = <0>;
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +3 -3
index 7881e3d81a9ab..b9c0f2de8f12c 100644
@@ -284,7 +284,7 @@
 			interrupts = <0 43 0x4>;
 		};
 
-		qspi: quadspi@1550000 {
+		qspi: spi@1550000 {
 			compatible = "fsl,ls1043a-qspi", "fsl,ls1021a-qspi";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -382,7 +382,7 @@
 			ranges = <0x0 0x5 0x00000000 0x8000000>;
 		};
 
-		dspi0: dspi@2100000 {
+		dspi0: spi@2100000 {
 			compatible = "fsl,ls1043a-dspi", "fsl,ls1021a-v1.0-dspi";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -395,7 +395,7 @@
 			status = "disabled";
 		};
 
-		dspi1: dspi@2110000 {
+		dspi1: spi@2110000 {
 			compatible = "fsl,ls1043a-dspi", "fsl,ls1021a-v1.0-dspi";
 			#address-cells = <1>;
 			#size-cells = <0>;
arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts +2 -2
index 440e111651d53..a59b48203688a 100644
@@ -57,12 +57,12 @@
 		reg = <0x4c>;
 	};
 
-	eeprom@56 {
+	eeprom@52 {
 		compatible = "atmel,24c512";
 		reg = <0x52>;
 	};
 
-	eeprom@57 {
+	eeprom@53 {
 		compatible = "atmel,24c512";
 		reg = <0x53>;
 	};
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +2 -2
index ef83786b8b905..de6af453a6e16 100644
@@ -202,7 +202,7 @@
 			interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
-		qspi: quadspi@1550000 {
+		qspi: spi@1550000 {
 			compatible = "fsl,ls1021a-qspi";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -361,7 +361,7 @@
 			#thermal-sensor-cells = <1>;
 		};
 
-		dspi: dspi@2100000 {
+		dspi: spi@2100000 {
 			compatible = "fsl,ls1021a-v1.0-dspi";
 			#address-cells = <1>;
 			#size-cells = <0>;
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi +2 -2
index 8cb78dd996728..ebe0cd4bf2b7e 100644
@@ -469,7 +469,7 @@
 			mmu-masters = <&fsl_mc 0x300 0>;
 		};
 
-		dspi: dspi@2100000 {
+		dspi: spi@2100000 {
 			status = "disabled";
 			compatible = "fsl,ls2080a-dspi", "fsl,ls2085a-dspi";
 			#address-cells = <1>;
@@ -595,7 +595,7 @@
 				  3 0 0x5 0x20000000 0x00010000>;
 		};
 
-		qspi: quadspi@20c0000 {
+		qspi: spi@20c0000 {
 			status = "disabled";
 			compatible = "fsl,ls2080a-qspi", "fsl,ls1021a-qspi";
 			#address-cells = <1>;
Signature · 1 line
2.20.1
author maintainer
#397 lore raw

PATCH 366/422 ARM: dts: imx51-zii-rdu1: Fix the rtc compatible string

In reply to Greg Kroah-Hartman

From: Fabio Estevam <[email protected]>

[ Upstream commit 1c5f335f61ffb838fc3cc1cec9464067663eb8c8 ]

According to Documentation/devicetree/bindings/rtc/rtc-ds1307.txt the original compatible "maxim,ds1341" is not a valid entry.

Switch to the documented "dallas,ds1341" compatible.

---
 arch/arm/boot/dts/imx51-zii-rdu1.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx51-zii-rdu1.dts +1 -1
index 6e80254c4562a..3fb66ddfe93a5 100644
@@ -514,7 +514,7 @@
 	};
 
 	ds1341: rtc@68 {
-		compatible = "maxim,ds1341";
+		compatible = "dallas,ds1341";
 		reg = <0x68>;
 	};
 
Signature · 1 line
2.20.1
author maintainer
#398 lore raw

PATCH 367/422 arm64: tegra: I2C on Tegra194 is not compatible with Tegra114

In reply to Greg Kroah-Hartman

From: Thierry Reding <[email protected]>

[ Upstream commit d9fd22447ba59a9b53a202fade977e82bfba8d8d ]

Tegra194 contains a version of the I2C controller that is no longer compatible with the version found in Tegra114.

---
 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/nvidia/tegra194.dtsi +8 -8
index a4dfcd19b9e88..9fc14bb9a0aff 100644
@@ -118,7 +118,7 @@
 		};
 
 		gen1_i2c: i2c@3160000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x03160000 0x10000>;
 			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
@@ -143,7 +143,7 @@
 		};
 
 		cam_i2c: i2c@3180000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x03180000 0x10000>;
 			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
@@ -157,7 +157,7 @@
 
 		/* shares pads with dpaux1 */
 		dp_aux_ch1_i2c: i2c@3190000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x03190000 0x10000>;
 			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
@@ -171,7 +171,7 @@
 
 		/* shares pads with dpaux0 */
 		dp_aux_ch0_i2c: i2c@31b0000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x031b0000 0x10000>;
 			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
@@ -184,7 +184,7 @@
 		};
 
 		gen7_i2c: i2c@31c0000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x031c0000 0x10000>;
 			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
@@ -197,7 +197,7 @@
 		};
 
 		gen9_i2c: i2c@31e0000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x031e0000 0x10000>;
 			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
@@ -264,7 +264,7 @@
 		};
 
 		gen2_i2c: i2c@c240000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x0c240000 0x10000>;
 			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
@@ -277,7 +277,7 @@
 		};
 
 		gen8_i2c: i2c@c250000 {
-			compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+			compatible = "nvidia,tegra194-i2c";
 			reg = <0x0c250000 0x10000>;
 			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
Signature · 1 line
2.20.1
author maintainer
#399 lore raw

PATCH 368/422 ARM: dts: tegra30: fix xcvr-setup-use-fuses

In reply to Greg Kroah-Hartman

From: Marcel Ziswiler <[email protected]>

[ Upstream commit 564706f65cda3de52b09e51feb423a43940fe661 ]

There was a dot instead of a comma. Fix this.

---
 arch/arm/boot/dts/tegra30.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/tegra30.dtsi +3 -3
index a6781f6533105..5a04ddefb71f6 100644
@@ -896,7 +896,7 @@
 		nvidia,elastic-limit = <16>;
 		nvidia,term-range-adj = <6>;
 		nvidia,xcvr-setup = <51>;
-		nvidia.xcvr-setup-use-fuses;
+		nvidia,xcvr-setup-use-fuses;
 		nvidia,xcvr-lsfslew = <1>;
 		nvidia,xcvr-lsrslew = <1>;
 		nvidia,xcvr-hsslew = <32>;
@@ -933,7 +933,7 @@
 		nvidia,elastic-limit = <16>;
 		nvidia,term-range-adj = <6>;
 		nvidia,xcvr-setup = <51>;
-		nvidia.xcvr-setup-use-fuses;
+		nvidia,xcvr-setup-use-fuses;
 		nvidia,xcvr-lsfslew = <2>;
 		nvidia,xcvr-lsrslew = <2>;
 		nvidia,xcvr-hsslew = <32>;
@@ -969,7 +969,7 @@
 		nvidia,elastic-limit = <16>;
 		nvidia,term-range-adj = <6>;
 		nvidia,xcvr-setup = <51>;
-		nvidia.xcvr-setup-use-fuses;
+		nvidia,xcvr-setup-use-fuses;
 		nvidia,xcvr-lsfslew = <2>;
 		nvidia,xcvr-lsrslew = <2>;
 		nvidia,xcvr-hsslew = <32>;
Signature · 1 line
2.20.1
author maintainer
#400 lore raw

PATCH 369/422 ARM: dts: tegra20: restore address order

In reply to Greg Kroah-Hartman

From: Marcel Ziswiler <[email protected]>

[ Upstream commit 8188391c127ea34d66f37eda6755d0acb51dc600 ]

Commit 6c468f109884 ("ARM: dts: tegra: add Tegra20 NAND flash controller node") introduced the nand-controller node. However, it got added at the wrong spot not honoring the address order. Fix this.

---
 arch/arm/boot/dts/tegra20.dtsi | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
arch/arm/boot/dts/tegra20.dtsi +13 -13
index 15b73bd377f04..80854f7de765c 100644
@@ -419,19 +419,6 @@
 		status = "disabled";
 	};
 
-	gmi@70009000 {
-		compatible = "nvidia,tegra20-gmi";
-		reg = <0x70009000 0x1000>;
-		#address-cells = <2>;
-		#size-cells = <1>;
-		ranges = <0 0 0xd0000000 0xfffffff>;
-		clocks = <&tegra_car TEGRA20_CLK_NOR>;
-		clock-names = "gmi";
-		resets = <&tegra_car 42>;
-		reset-names = "gmi";
-		status = "disabled";
-	};
-
 	nand-controller@70008000 {
 		compatible = "nvidia,tegra20-nand";
 		reg = <0x70008000 0x100>;
@@ -447,6 +434,19 @@
 		status = "disabled";
 	};
 
+	gmi@70009000 {
+		compatible = "nvidia,tegra20-gmi";
+		reg = <0x70009000 0x1000>;
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 0xd0000000 0xfffffff>;
+		clocks = <&tegra_car TEGRA20_CLK_NOR>;
+		clock-names = "gmi";
+		resets = <&tegra_car 42>;
+		reset-names = "gmi";
+		status = "disabled";
+	};
+
 	pwm: pwm@7000a000 {
 		compatible = "nvidia,tegra20-pwm";
 		reg = <0x7000a000 0x100>;
Signature · 1 line
2.20.1
author maintainer
#401 lore raw

PATCH 370/422 ARM: tegra: apalis_t30: fix mmc1 cmd pull-up

In reply to Greg Kroah-Hartman

From: Marcel Ziswiler <[email protected]>

[ Upstream commit 1c997fe4becdc6fcbc06e23982ceb65621e6572a ]

Fix MMC1 cmd pin pull-up causing issues on carrier boards without external pull-up.

---
 arch/arm/boot/dts/tegra30-apalis.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/tegra30-apalis.dtsi +3 -3
index 2f807d40c1b79..e749e047db7ab 100644
@@ -171,14 +171,14 @@
 
 			/* Apalis MMC1 */
 			sdmmc3_clk_pa6 {
-				nvidia,pins = "sdmmc3_clk_pa6",
-					      "sdmmc3_cmd_pa7";
+				nvidia,pins = "sdmmc3_clk_pa6";
 				nvidia,function = "sdmmc3";
 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
 			};
 			sdmmc3_dat0_pb7 {
-				nvidia,pins = "sdmmc3_dat0_pb7",
+				nvidia,pins = "sdmmc3_cmd_pa7",
+					      "sdmmc3_dat0_pb7",
 					      "sdmmc3_dat1_pb6",
 					      "sdmmc3_dat2_pb5",
 					      "sdmmc3_dat3_pb4",
Signature · 1 line
2.20.1
author maintainer
#402 lore raw

PATCH 371/422 ARM: tegra: apalis_t30: fix mcp2515 can controller interrupt polarity

In reply to Greg Kroah-Hartman

From: Marcel Ziswiler <[email protected]>

[ Upstream commit b38f6aa4b60a1fcc41f5c469981f8f62d6070ee3 ]

Fix the MCP2515 SPI CAN controller interrupt polarity which according to its datasheet defaults to low-active aka falling edge.

---
 arch/arm/boot/dts/tegra30-apalis.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/tegra30-apalis.dtsi +2 -2
index e749e047db7ab..f810bbf8212bd 100644
@@ -659,7 +659,7 @@
 			reg = <1>;
 			clocks = <&clk16m>;
 			interrupt-parent = <&gpio>;
-			interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_RISING>;
+			interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_FALLING>;
 			spi-max-frequency = <10000000>;
 		};
 	};
@@ -674,7 +674,7 @@
 			reg = <0>;
 			clocks = <&clk16m>;
 			interrupt-parent = <&gpio>;
-			interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_RISING>;
+			interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_FALLING>;
 			spi-max-frequency = <10000000>;
 		};
 	};
Signature · 1 line
2.20.1
author maintainer
#403 lore raw

PATCH 372/422 ARM: tegra: colibri_t30: fix mcp2515 can controller interrupt polarity

In reply to Greg Kroah-Hartman

From: Marcel Ziswiler <[email protected]>

[ Upstream commit 503fcd8464fb6cd18073e97dec59b933930655d6 ]

Fix the MCP2515 SPI CAN controller interrupt polarity which according to its datasheet defaults to low-active aka falling edge.

---
 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +2 -1
index 16e1f387aa6db..a0c550e26738f 100644
@@ -79,7 +79,8 @@
 			reg = <0>;
 			clocks = <&clk16m>;
 			interrupt-parent = <&gpio>;
-			interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_RISING>;
+			/* CAN_INT */
+			interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_FALLING>;
 			spi-max-frequency = <10000000>;
 		};
 		spidev0: spi@1 {
Signature · 1 line
2.20.1
author maintainer
#404 lore raw

PATCH 373/422 ARM: dts: paz00: fix wakeup gpio keycode

In reply to Greg Kroah-Hartman

From: Marc Dietrich <[email protected]>

[ Upstream commit ebea2a43fdafdbce918bd7e200b709d6c33b9f3b ]

The power key is controlled solely by the EC, which only tiggeres this gpio after wakeup.
Fixes immediately return to suspend after wake from LP1.

---
 arch/arm/boot/dts/tegra20-paz00.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/tegra20-paz00.dts +3 -3
index ef245291924f0..4f9b4a889febe 100644
@@ -524,10 +524,10 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 
-		power {
-			label = "Power";
+		wakeup {
+			label = "Wakeup";
 			gpios = <&gpio TEGRA_GPIO(J, 7) GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_POWER>;
+			linux,code = <KEY_WAKEUP>;
 			wakeup-source;
 		};
 	};
Signature · 1 line
2.20.1
author maintainer
#405 lore raw

PATCH 374/422 net: smsc: fix return type of ndo_start_xmit function

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit 6323d57f335ce1490d025cacc83fc10b07792130 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.

Found by coccinelle.

---
 drivers/net/ethernet/smsc/smc911x.c  | 3 ++-
 drivers/net/ethernet/smsc/smc91x.c   | 3 ++-
 drivers/net/ethernet/smsc/smsc911x.c | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/smsc/smc911x.c +2 -1
index b1b53f6c452f5..8355dfbb8ec3c 100644
@@ -513,7 +513,8 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
  * now, or set the card to generates an interrupt when ready
  * for the packet.
  */
-static int smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct smc911x_local *lp = netdev_priv(dev);
 	unsigned int free;
drivers/net/ethernet/smsc/smc91x.c +2 -1
index b944828f9ea3d..8d6cff8bd1622 100644
@@ -638,7 +638,8 @@ done:	if (!THROTTLE_TX_PKTS)
  * now, or set the card to generates an interrupt when ready
  * for the packet.
  */
-static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct smc_local *lp = netdev_priv(dev);
 	void __iomem *ioaddr = lp->base;
drivers/net/ethernet/smsc/smsc911x.c +2 -1
index f0afb88d7bc2b..ce4bfecc26c7a 100644
@@ -1786,7 +1786,8 @@ static int smsc911x_stop(struct net_device *dev)
 }
 
 /* Entry point for transmitting a packet */
-static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct smsc911x_data *pdata = netdev_priv(dev);
 	unsigned int freespace;
Signature · 1 line
2.20.1
author maintainer
#406 lore raw

PATCH 375/422 net: faraday: fix return type of ndo_start_xmit function

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit 0a715156656bddf4aa92d9868f850aeeb0465fd0 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t.

Found by coccinelle.

---
 drivers/net/ethernet/faraday/ftgmac100.c | 4 ++--
 drivers/net/ethernet/faraday/ftmac100.c  | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/ethernet/faraday/ftgmac100.c +2 -2
index f6ed889bc36a2..e4fc38cbe8535 100644
@@ -712,8 +712,8 @@ static bool ftgmac100_prep_tx_csum(struct sk_buff *skb, u32 *csum_vlan)
 	return skb_checksum_help(skb) == 0;
 }
 
-static int ftgmac100_hard_start_xmit(struct sk_buff *skb,
-				     struct net_device *netdev)
+static netdev_tx_t ftgmac100_hard_start_xmit(struct sk_buff *skb,
+					     struct net_device *netdev)
 {
 	struct ftgmac100 *priv = netdev_priv(netdev);
 	struct ftgmac100_txdes *txdes, *first;
drivers/net/ethernet/faraday/ftmac100.c +4 -3
index 9015bd911bee9..084f24daf2b5a 100644
@@ -634,8 +634,8 @@ static void ftmac100_tx_complete(struct ftmac100 *priv)
 		;
 }
 
-static int ftmac100_xmit(struct ftmac100 *priv, struct sk_buff *skb,
-			 dma_addr_t map)
+static netdev_tx_t ftmac100_xmit(struct ftmac100 *priv, struct sk_buff *skb,
+				 dma_addr_t map)
 {
 	struct net_device *netdev = priv->netdev;
 	struct ftmac100_txdes *txdes;
@@ -1015,7 +1015,8 @@ static int ftmac100_stop(struct net_device *netdev)
 	return 0;
 }
 
-static int ftmac100_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t
+ftmac100_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
 	struct ftmac100 *priv = netdev_priv(netdev);
 	dma_addr_t map;
Signature · 1 line
2.20.1
author maintainer
#407 lore raw

PATCH 376/422 PCI/ERR: Run error recovery callbacks for all affected devices

In reply to Greg Kroah-Hartman

From: Keith Busch <[email protected]>

[ Upstream commit bfcb79fca19d267712e425af1dd48812c40dec0c ]

If an Endpoint reported an error with ERR_FATAL, we previously ran driver error recovery callbacks only for the Endpoint's driver. But if we reset a Link to recover from the error, all downstream components are affected, including the Endpoint, any multi-function peers, and children of those peers.

Initiate the Link reset from the deepest Downstream Port that is reliable, and call the error recovery callbacks for all its children.

If a Downstream Port (including a Root Port) reports an error, we assume the Port itself is reliable and we need to reset its downstream Link. In all other cases (Switch Upstream Ports, Endpoints, Bridges, etc), we assume the Link leading to the component needs to be reset, so we initiate the reset at the parent Downstream Port.

This allows two other clean-ups. First, we currently only use a Link reset, which can only be initiated using a Downstream Port, so we can remove checks for Endpoints. Second, the Downstream Port where we initiate the Link reset is reliable (unlike components downstream from it), so the special cases for error detect and resume are no longer necessary.

---
 drivers/pci/pcie/err.c | 85 +++++++++++-------------------------------
 1 file changed, 21 insertions(+), 64 deletions(-)
drivers/pci/pcie/err.c +21 -64
index 12c1205e1d804..2c3b5bd59b18f 100644
@@ -63,30 +63,12 @@ static int report_error_detected(struct pci_dev *dev, void *data)
 	if (!dev->driver ||
 		!dev->driver->err_handler ||
 		!dev->driver->err_handler->error_detected) {
-		if (result_data->state == pci_channel_io_frozen &&
-			dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
-			/*
-			 * In case of fatal recovery, if one of down-
-			 * stream device has no driver. We might be
-			 * unable to recover because a later insmod
-			 * of a driver for this device is unaware of
-			 * its hw state.
-			 */
-			pci_printk(KERN_DEBUG, dev, "device has %s\n",
-				   dev->driver ?
-				   "no AER-aware driver" : "no driver");
-		}
-
 		/*
-		 * If there's any device in the subtree that does not
-		 * have an error_detected callback, returning
-		 * PCI_ERS_RESULT_NO_AER_DRIVER prevents calling of
-		 * the subsequent mmio_enabled/slot_reset/resume
-		 * callbacks of "any" device in the subtree. All the
-		 * devices in the subtree are left in the error state
-		 * without recovery.
+		 * If any device in the subtree does not have an error_detected
+		 * callback, PCI_ERS_RESULT_NO_AER_DRIVER prevents subsequent
+		 * error callbacks of "any" device in the subtree, and will
+		 * exit in the disconnected error state.
 		 */
-
 		if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE)
 			vote = PCI_ERS_RESULT_NO_AER_DRIVER;
 		else
@@ -184,34 +166,23 @@ static pci_ers_result_t default_reset_link(struct pci_dev *dev)
 
 static pci_ers_result_t reset_link(struct pci_dev *dev, u32 service)
 {
-	struct pci_dev *udev;
 	pci_ers_result_t status;
 	struct pcie_port_service_driver *driver = NULL;
 
-	if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
-		/* Reset this port for all subordinates */
-		udev = dev;
-	} else {
-		/* Reset the upstream component (likely downstream port) */
-		udev = dev->bus->self;
-	}
-
-	/* Use the aer driver of the component firstly */
-	driver = pcie_port_find_service(udev, service);
-
+	driver = pcie_port_find_service(dev, service);
 	if (driver && driver->reset_link) {
-		status = driver->reset_link(udev);
-	} else if (udev->has_secondary_link) {
-		status = default_reset_link(udev);
+		status = driver->reset_link(dev);
+	} else if (dev->has_secondary_link) {
+		status = default_reset_link(dev);
 	} else {
 		pci_printk(KERN_DEBUG, dev, "no link-reset support at upstream device %s\n",
-			pci_name(udev));
+			pci_name(dev));
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
 	if (status != PCI_ERS_RESULT_RECOVERED) {
 		pci_printk(KERN_DEBUG, dev, "link reset at upstream device %s failed\n",
-			pci_name(udev));
+			pci_name(dev));
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -243,31 +214,7 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev,
 	else
 		result_data.result = PCI_ERS_RESULT_RECOVERED;
 
-	if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
-		/*
-		 * If the error is reported by a bridge, we think this error
-		 * is related to the downstream link of the bridge, so we
-		 * do error recovery on all subordinates of the bridge instead
-		 * of the bridge and clear the error status of the bridge.
-		 */
-		if (cb == report_error_detected)
-			dev->error_state = state;
-		pci_walk_bus(dev->subordinate, cb, &result_data);
-		if (cb == report_resume) {
-			pci_aer_clear_device_status(dev);
-			pci_cleanup_aer_uncorrect_error_status(dev);
-			dev->error_state = pci_channel_io_normal;
-		}
-	} else {
-		/*
-		 * If the error is reported by an end point, we think this
-		 * error is related to the upstream link of the end point.
-		 * The error is non fatal so the bus is ok; just invoke
-		 * the callback for the function that logged the error.
-		 */
-		cb(dev, &result_data);
-	}
-
+	pci_walk_bus(dev->subordinate, cb, &result_data);
 	return result_data.result;
 }
 
@@ -347,6 +294,14 @@ void pcie_do_nonfatal_recovery(struct pci_dev *dev)
 
 	state = pci_channel_io_normal;
 
+	/*
+	 * Error recovery runs on all subordinates of the first downstream port.
+	 * If the downstream port detected the error, it is cleared at the end.
+	 */
+	if (!(pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
+	      pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM))
+		dev = dev->bus->self;
+
 	status = broadcast_error_message(dev,
 			state,
 			"error_detected",
@@ -378,6 +333,8 @@ void pcie_do_nonfatal_recovery(struct pci_dev *dev)
 				"resume",
 				report_resume);
 
+	pci_aer_clear_device_status(dev);
+	pci_cleanup_aer_uncorrect_error_status(dev);
 	pci_info(dev, "AER: Device recovery successful\n");
 	return;
 
Signature · 1 line
2.20.1
author maintainer
#408 lore raw

PATCH 377/422 f2fs: update i_size after DIO completion

In reply to Greg Kroah-Hartman

From: Jaegeuk Kim <[email protected]>

[ Upstream commit 0a4daae5ffea39f5015334e4d18a6a80b447cae4 ]

This is related to
ee70daaba82d ("xfs: update i_size after unwritten conversion in dio completion")

If we update i_size during dio_write, dio_read can read out stale data, which breaks xfstests/465.

---
 fs/f2fs/data.c | 15 +++++++--------
 fs/f2fs/f2fs.h |  1 +
 2 files changed, 8 insertions(+), 8 deletions(-)
fs/f2fs/data.c +7 -8
index b4a634da1372b..3a2fd66769660 100644
@@ -889,7 +889,6 @@ static int __allocate_data_block(struct dnode_of_data *dn, int seg_type)
 	struct f2fs_summary sum;
 	struct node_info ni;
 	block_t old_blkaddr;
-	pgoff_t fofs;
 	blkcnt_t count = 1;
 	int err;
 
@@ -918,12 +917,10 @@ alloc:
 					old_blkaddr, old_blkaddr);
 	f2fs_set_data_blkaddr(dn);
 
-	/* update i_size */
-	fofs = f2fs_start_bidx_of_node(ofs_of_node(dn->node_page), dn->inode) +
-							dn->ofs_in_node;
-	if (i_size_read(dn->inode) < ((loff_t)(fofs + 1) << PAGE_SHIFT))
-		f2fs_i_size_write(dn->inode,
-				((loff_t)(fofs + 1) << PAGE_SHIFT));
+	/*
+	 * i_size will be updated by direct_IO. Otherwise, we'll get stale
+	 * data from unwritten block via dio_read.
+	 */
 	return 0;
 }
 
@@ -1089,6 +1086,8 @@ next_block:
 					last_ofs_in_node = dn.ofs_in_node;
 				}
 			} else {
+				WARN_ON(flag != F2FS_GET_BLOCK_PRE_DIO &&
+					flag != F2FS_GET_BLOCK_DIO);
 				err = __allocate_data_block(&dn,
 							map->m_seg_type);
 				if (!err)
@@ -1268,7 +1267,7 @@ static int get_data_block_dio(struct inode *inode, sector_t iblock,
 			struct buffer_head *bh_result, int create)
 {
 	return __get_data_block(inode, iblock, bh_result, create,
-						F2FS_GET_BLOCK_DEFAULT, NULL,
+						F2FS_GET_BLOCK_DIO, NULL,
 						f2fs_rw_hint_to_seg_type(
 							inode->i_write_hint));
 }
fs/f2fs/f2fs.h +1 -0
index 6d361c8c61306..2dc49a5419070 100644
@@ -600,6 +600,7 @@ enum {
 	F2FS_GET_BLOCK_DEFAULT,
 	F2FS_GET_BLOCK_FIEMAP,
 	F2FS_GET_BLOCK_BMAP,
+	F2FS_GET_BLOCK_DIO,
 	F2FS_GET_BLOCK_PRE_DIO,
 	F2FS_GET_BLOCK_PRE_AIO,
 	F2FS_GET_BLOCK_PRECACHE,
Signature · 1 line
2.20.1
author maintainer
#409 lore raw

PATCH 378/422 f2fs: fix to recover inodes project id during POR

In reply to Greg Kroah-Hartman

From: Chao Yu <[email protected]>

[ Upstream commit f4474aa6e5e901ee4af21f39f1b9115aaaaec503 ]

Testcase to reproduce this bug:
1. mkfs.f2fs -O extra_attr -O project_quota /dev/sdd
2. mount -t f2fs /dev/sdd /mnt/f2fs
3. touch /mnt/f2fs/file
4. sync
5. chattr -p 1 /mnt/f2fs/file
6. xfs_io -f /mnt/f2fs/file -c "fsync"
7. godown /mnt/f2fs
8. umount /mnt/f2fs
9. mount -t f2fs /dev/sdd /mnt/f2fs
10. lsattr -p /mnt/f2fs/file

    0 -----------------N- /mnt/f2fs/file

But actually, we expect the correct result is:

    1 -----------------N- /mnt/f2fs/file

The reason is we didn't recover inode.i_projid field during mount, fix it.

---
 fs/f2fs/recovery.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
fs/f2fs/recovery.c +13 -0
index 2c5d2c25d37e3..01636d996ba41 100644
@@ -218,6 +218,19 @@ static void recover_inode(struct inode *inode, struct page *page)
 	inode->i_mode = le16_to_cpu(raw->i_mode);
 	i_uid_write(inode, le32_to_cpu(raw->i_uid));
 	i_gid_write(inode, le32_to_cpu(raw->i_gid));
+
+	if (raw->i_inline & F2FS_EXTRA_ATTR) {
+		if (f2fs_sb_has_project_quota(F2FS_I_SB(inode)->sb) &&
+			F2FS_FITS_IN_INODE(raw, le16_to_cpu(raw->i_extra_isize),
+								i_projid)) {
+			projid_t i_projid;
+
+			i_projid = (projid_t)le32_to_cpu(raw->i_projid);
+			F2FS_I(inode)->i_projid =
+				make_kprojid(&init_user_ns, i_projid);
+		}
+	}
+
 	f2fs_i_size_write(inode, le64_to_cpu(raw->i_size));
 	inode->i_atime.tv_sec = le64_to_cpu(raw->i_atime);
 	inode->i_ctime.tv_sec = le64_to_cpu(raw->i_ctime);
Signature · 1 line
2.20.1
author maintainer
#410 lore raw

PATCH 379/422 f2fs: mark inode dirty explicitly in recover_inode()

In reply to Greg Kroah-Hartman

From: Chao Yu <[email protected]>

[ Upstream commit 4a1728cad6340bfbe17bd17fd158b2165cd99508 ]

Mark inode dirty explicitly in the end of recover_inode() to make sure that all recoverable fields can be persisted later.

---
 fs/f2fs/recovery.c | 2 ++
 1 file changed, 2 insertions(+)
fs/f2fs/recovery.c +2 -0
index 01636d996ba41..733f005b85d65 100644
@@ -247,6 +247,8 @@ static void recover_inode(struct inode *inode, struct page *page)
 
 	recover_inline_flags(inode, raw);
 
+	f2fs_mark_inode_dirty_sync(inode, true);
+
 	if (file_enc_name(inode))
 		name = "<encrypted>";
 	else
Signature · 1 line
2.20.1
author maintainer
#411 lore raw

PATCH 380/422 RDMA: Fix dependencies for rdma_user_mmap_io

In reply to Greg Kroah-Hartman

From: Arnd Bergmann <[email protected]>

[ Upstream commit 46bdf777685677c1cc6b3da9220aace9da690731 ]

The mlx4 driver produces a link error when it is configured as built-in while CONFIG_INFINIBAND_USER_ACCESS is set to =m:

drivers/infiniband/hw/mlx4/main.o: In function `mlx4_ib_mmap':
main.c:(.text+0x1af4): undefined reference to `rdma_user_mmap_io'

The same function is called from mlx5, which already has a dependency to ensure we can call it, and from hns, which appears to suffer from the same problem.

This adds the same dependency that mlx5 uses to the other two.

Fixes 6745d356ab39 ("RDMA/hns: Use rdma_user_mmap_io")
Fixes c282da4109e4 ("RDMA/mlx4: Use rdma_user_mmap_io")
---
 drivers/infiniband/hw/hns/Kconfig  | 1 +
 drivers/infiniband/hw/mlx4/Kconfig | 1 +
 2 files changed, 2 insertions(+)
drivers/infiniband/hw/hns/Kconfig +1 -0
index fddb5fdf92de8..21c2100b2ea98 100644
@@ -1,6 +1,7 @@
 config INFINIBAND_HNS
 	tristate "HNS RoCE Driver"
 	depends on NET_VENDOR_HISILICON
+	depends on INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS
 	depends on ARM64 || (COMPILE_TEST && 64BIT)
 	---help---
 	  This is a RoCE/RDMA driver for the Hisilicon RoCE engine. The engine
drivers/infiniband/hw/mlx4/Kconfig +1 -0
index db4aa13ebae0c..d1de3285fd885 100644
@@ -1,6 +1,7 @@
 config MLX4_INFINIBAND
 	tristate "Mellanox ConnectX HCA support"
 	depends on NETDEVICES && ETHERNET && PCI && INET
+	depends on INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS
 	depends on MAY_USE_DEVLINK
 	select NET_VENDOR_MELLANOX
 	select MLX4_CORE
Signature · 1 line
2.20.1
author maintainer
#412 lore raw

PATCH 381/422 EDAC: Raise the maximum number of memory controllers

In reply to Greg Kroah-Hartman

From: Justin Ernst <[email protected]>

[ Upstream commit 6b58859419554fb824e09cfdd73151a195473cbc ]

We observe an oops in the skx_edac module during boot:

EDAC MC0: Giving out device to module skx_edac controller Skylake Socket#0 IMC#0 EDAC MC1: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1 EDAC MC2: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0
...
EDAC MC13: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1 EDAC MC14: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0 EDAC MC15: Giving out device to module skx_edac controller Skylake Socket#1 IMC#1 Too many memory controllers: 16
EDAC MC: Removed device 0 for skx_edac Skylake Socket#0 IMC#0

We observe there are two memory controllers per socket, with a limit of 16. Raise the maximum number of memory controllers from 16 to 2 * MAX_NUMNODES (1024).

[ bp: This is just a band-aid fix until we've sorted out the whole issue
with the bus_type association and handling in EDAC and can get rid of this arbitrary limit. ]

---
 include/linux/edac.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/edac.h +2 -1
index bffb97828ed67..958d69332c1d5 100644
@@ -17,6 +17,7 @@
 #include <linux/completion.h>
 #include <linux/workqueue.h>
 #include <linux/debugfs.h>
+#include <linux/numa.h>
 
 #define EDAC_DEVICE_NAME_LEN	31
 
@@ -670,6 +671,6 @@ struct mem_ctl_info {
 /*
  * Maximum number of memory controllers in the coherent fabric.
  */
-#define EDAC_MAX_MCS	16
+#define EDAC_MAX_MCS	2 * MAX_NUMNODES
 
 #endif
Signature · 1 line
2.20.1
author maintainer
#413 lore raw

PATCH 382/422 ARM: dts: realview: Fix SPI controller node names

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit 016add12977bcc30f77d7e48fc9a3a024cb46645 ]

SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks.

---
 arch/arm/boot/dts/arm-realview-eb.dtsi    | 2 +-
 arch/arm/boot/dts/arm-realview-pb1176.dts | 2 +-
 arch/arm/boot/dts/arm-realview-pb11mp.dts | 2 +-
 arch/arm/boot/dts/arm-realview-pbx.dtsi   | 2 +-
 arch/arm/boot/dts/versatile-ab.dts        | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/arm-realview-eb.dtsi +1 -1
index a917cf8825ca8..0e4c7c4c8c093 100644
@@ -371,7 +371,7 @@
 			clock-names = "uartclk", "apb_pclk";
 		};
 
-		ssp: ssp@1000d000 {
+		ssp: spi@1000d000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x1000d000 0x1000>;
 			clocks = <&sspclk>, <&pclk>;
arch/arm/boot/dts/arm-realview-pb1176.dts +1 -1
index f935b72d3d964..f2a1d25eb6cf3 100644
@@ -380,7 +380,7 @@
 			clock-names = "apb_pclk";
 		};
 
-		pb1176_ssp: ssp@1010b000 {
+		pb1176_ssp: spi@1010b000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x1010b000 0x1000>;
 			interrupt-parent = <&intc_dc1176>;
arch/arm/boot/dts/arm-realview-pb11mp.dts +1 -1
index 36203288de426..7f9cbdf33a510 100644
@@ -523,7 +523,7 @@
 			clock-names = "uartclk", "apb_pclk";
 		};
 
-		ssp@1000d000 {
+		spi@1000d000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x1000d000 0x1000>;
 			interrupt-parent = <&intc_pb11mp>;
arch/arm/boot/dts/arm-realview-pbx.dtsi +1 -1
index 10868ba3277f5..a5676697ff3b7 100644
@@ -362,7 +362,7 @@
 			clock-names = "uartclk", "apb_pclk";
 		};
 
-		ssp: ssp@1000d000 {
+		ssp: spi@1000d000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x1000d000 0x1000>;
 			clocks = <&sspclk>, <&pclk>;
arch/arm/boot/dts/versatile-ab.dts +1 -1
index 5f61d36090270..6f4f60ba5429c 100644
@@ -373,7 +373,7 @@
 			clock-names = "apb_pclk";
 		};
 
-		ssp@101f4000 {
+		spi@101f4000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x101f4000 0x1000>;
 			interrupts = <11>;
Signature · 1 line
2.20.1
author maintainer
#414 lore raw

PATCH 383/422 firmware: dell_rbu: Make payload memory uncachable

In reply to Greg Kroah-Hartman

From: Stuart Hayes <[email protected]>

[ Upstream commit 6aecee6ad41cf97c0270f72da032c10eef025bf0 ]

The dell_rbu driver takes firmware update payloads and puts them in memory so the system BIOS can find them after a reboot. This sometimes fails (though rarely), because the memory containing the payload is in the CPU cache but never gets written back to main memory before the system is rebooted (CPU cache contents are lost on reboot).

With this patch, the payload memory will be changed to uncachable to ensure that the payload is actually in main memory before the system is rebooted.

---
 drivers/firmware/dell_rbu.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/firmware/dell_rbu.c +8 -0
index fb8af5cb7c9bf..ccefa84f73057 100644
@@ -45,6 +45,7 @@
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
 #include <linux/dma-mapping.h>
+#include <asm/set_memory.h>
 
 MODULE_AUTHOR("Abhay Salunke <[email protected]>");
 MODULE_DESCRIPTION("Driver for updating BIOS image on DELL systems");
@@ -181,6 +182,11 @@ static int create_packet(void *data, size_t length)
 			packet_data_temp_buf = NULL;
 		}
 	}
+	/*
+	 * set to uncachable or it may never get written back before reboot
+	 */
+	set_memory_uc((unsigned long)packet_data_temp_buf, 1 << ordernum);
+
 	spin_lock(&rbu_data.lock);
 
 	newpacket->data = packet_data_temp_buf;
@@ -349,6 +355,8 @@ static void packet_empty_list(void)
 		 * to make sure there are no stale RBU packets left in memory
 		 */
 		memset(newpacket->data, 0, rbu_data.packetsize);
+		set_memory_wb((unsigned long)newpacket->data,
+			1 << newpacket->ordernum);
 		free_pages((unsigned long) newpacket->data,
 			newpacket->ordernum);
 		kfree(newpacket);
Signature · 1 line
2.20.1
#415 lore raw

Re: [PATCH 4.19 383/422] firmware: dell_rbu: Make payload memory uncachable

Hi!

Quoted 10 lines

From: Stuart Hayes <[email protected]>

[ Upstream commit 6aecee6ad41cf97c0270f72da032c10eef025bf0 ]

The dell_rbu driver takes firmware update payloads and puts them in memory so the system BIOS can find them after a reboot. This sometimes fails (though rarely), because the memory containing the payload is in the CPU cache but never gets written back to main memory before the system is rebooted (CPU cache contents are lost on reboot).

Quoted 3 lines

With this patch, the payload memory will be changed to uncachable to ensure that the payload is actually in main memory before the system is rebooted.

Flushing the cache sounds like easier way to accomplish same goal... and perhaps with better performance too.

Best regards,
Pavel

Quoted 34 lines

+++ b/drivers/firmware/dell_rbu.c

drivers/firmware/dell_rbu.c +8 -0
@@ -45,6 +45,7 @@
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
 #include <linux/dma-mapping.h>
+#include <asm/set_memory.h>
 
 MODULE_AUTHOR("Abhay Salunke <[email protected]>");
 MODULE_DESCRIPTION("Driver for updating BIOS image on DELL systems");
@@ -181,6 +182,11 @@ static int create_packet(void *data, size_t length)
 			packet_data_temp_buf = NULL;
 		}
 	}
+	/*
+	 * set to uncachable or it may never get written back before reboot
+	 */
+	set_memory_uc((unsigned long)packet_data_temp_buf, 1 << ordernum);
+
 	spin_lock(&rbu_data.lock);
 
 	newpacket->data = packet_data_temp_buf;
@@ -349,6 +355,8 @@ static void packet_empty_list(void)
 		 * to make sure there are no stale RBU packets left in memory
 		 */
 		memset(newpacket->data, 0, rbu_data.packetsize);
+		set_memory_wb((unsigned long)newpacket->data,
+			1 << newpacket->ordernum);
 		free_pages((unsigned long) newpacket->data,
 			newpacket->ordernum);
 		kfree(newpacket);
Signature · 1 line
2.20.1
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#416 lore raw

PATCH 384/422 Bluetooth: hci_serdev: clear HCI_UART_PROTO_READY to avoid closing proto races

In reply to Greg Kroah-Hartman

From: Balakrishna Godavarthi <[email protected]>

[ Upstream commit 7cf7846d27bfc9731e449857db3eec5e0e9701ba ]

Clearing HCI_UART_PROTO_READY will avoid usage of proto function pointers before running the proto close function pointer. There is chance of kernel crash, due to usage of non proto close function pointers after proto close.

---
 drivers/bluetooth/hci_serdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/bluetooth/hci_serdev.c +1 -0
index aa2543b3c2869..46e20444ba19b 100644
@@ -368,6 +368,7 @@ void hci_uart_unregister_device(struct hci_uart *hu)
 {
 	struct hci_dev *hdev = hu->hdev;
 
+	clear_bit(HCI_UART_PROTO_READY, &hu->flags);
 	hci_unregister_dev(hdev);
 	hci_free_dev(hdev);
 
Signature · 1 line
2.20.1
author maintainer
#417 lore raw

PATCH 385/422 Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS

In reply to Greg Kroah-Hartman

From: Luiz Augusto von Dentz <[email protected]>

[ Upstream commit a5c3021bb62b970713550db3f7fd08aa70665d7e ]

If the remote is not able to fully utilize the MPS choosen recalculate the credits based on the actual amount it is sending that way it can still send packets of MTU size without credits dropping to 0.

---
 net/bluetooth/l2cap_core.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
net/bluetooth/l2cap_core.c +10 -0
index 260ef5426e0ca..974c1b8a689c1 100644
@@ -6819,6 +6819,16 @@ static int l2cap_le_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
 		chan->sdu_len = sdu_len;
 		chan->sdu_last_frag = skb;
 
+		/* Detect if remote is not able to use the selected MPS */
+		if (skb->len + L2CAP_SDULEN_SIZE < chan->mps) {
+			u16 mps_len = skb->len + L2CAP_SDULEN_SIZE;
+
+			/* Adjust the number of credits */
+			BT_DBG("chan->mps %u -> %u", chan->mps, mps_len);
+			chan->mps = mps_len;
+			l2cap_chan_le_send_credits(chan);
+		}
+
 		return 0;
 	}
 
Signature · 1 line
2.20.1
author maintainer
#418 lore raw

PATCH 386/422 Bluetooth: btrsi: fix bt tx timeout issue

In reply to Greg Kroah-Hartman

From: Sanjay Kumar Konduri <[email protected]>

[ Upstream commit 7cbfd1e2aad410d96fa6162aeb3f9cff1fecfc58 ]

observed sometimes data is coming with unaligned address from kernel BT stack. If unaligned address is passed, some data in payload is stripped when packet is loading to firmware and this results, BT connection timeout is happening.

sh# hciconfig hci0 up
Can't init device hci0: hci0 command 0x0c03 tx timeout

Fixed this by moving the data to aligned address.

---
 drivers/bluetooth/btrsi.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/bluetooth/btrsi.c +12 -1
index 60d1419590bab..3951f7b238404 100644
@@ -21,8 +21,9 @@
 #include <net/rsi_91x.h>
 #include <net/genetlink.h>
 
-#define RSI_HEADROOM_FOR_BT_HAL	16
+#define RSI_DMA_ALIGN	8
 #define RSI_FRAME_DESC_SIZE	16
+#define RSI_HEADROOM_FOR_BT_HAL	(RSI_FRAME_DESC_SIZE + RSI_DMA_ALIGN)
 
 struct rsi_hci_adapter {
 	void *priv;
@@ -70,6 +71,16 @@ static int rsi_hci_send_pkt(struct hci_dev *hdev, struct sk_buff *skb)
 		bt_cb(new_skb)->pkt_type = hci_skb_pkt_type(skb);
 		kfree_skb(skb);
 		skb = new_skb;
+		if (!IS_ALIGNED((unsigned long)skb->data, RSI_DMA_ALIGN)) {
+			u8 *skb_data = skb->data;
+			int skb_len = skb->len;
+
+			skb_push(skb, RSI_DMA_ALIGN);
+			skb_pull(skb, PTR_ALIGN(skb->data,
+						RSI_DMA_ALIGN) - skb->data);
+			memmove(skb->data, skb_data, skb_len);
+			skb_trim(skb, skb_len);
+		}
 	}
 
 	return h_adapter->proto_ops->coex_send_pkt(h_adapter->priv, skb,
Signature · 1 line
2.20.1
author maintainer
#419 lore raw

PATCH 387/422 x86/hyperv: Suppress "PCI: Fatal: No config space access function found"

In reply to Greg Kroah-Hartman

From: Dexuan Cui <[email protected]>

[ Upstream commit 2f285f46240d67060061d153786740d4df53cd78 ]

A Generation-2 Linux VM on Hyper-V doesn't have the legacy PCI bus, and users always see the scary warning, which is actually harmless.

Suppress it.

Cc "H. Peter Anvin" <[email protected]>
Cc KY Srinivasan <[email protected]>
Cc Haiyang Zhang <[email protected]>
Cc Stephen Hemminger <[email protected]>
Cc Olaf Aepfle <[email protected]>
Cc Andy Whitcroft <[email protected]>
Cc Jason Wang <[email protected]>
Cc Vitaly Kuznetsov <[email protected]>
Cc Marcelo Cerri <[email protected]>
Cc Josh Poulson <[email protected]>
Link https://lkml.kernel.org/r/ <KU1P153MB0166D977DC930996C4BF538ABF1D0@KU1P153MB0166.APCP153.PROD.OUTLOOK.COM
---
 arch/x86/hyperv/hv_init.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/x86/hyperv/hv_init.c +19 -0
index 3fb8551552862..8a9cff1f129dc 100644
@@ -17,6 +17,7 @@
  *
  */
 
+#include <linux/efi.h>
 #include <linux/types.h>
 #include <asm/apic.h>
 #include <asm/desc.h>
@@ -257,6 +258,22 @@ static int hv_cpu_die(unsigned int cpu)
 	return 0;
 }
 
+static int __init hv_pci_init(void)
+{
+	int gen2vm = efi_enabled(EFI_BOOT);
+
+	/*
+	 * For Generation-2 VM, we exit from pci_arch_init() by returning 0.
+	 * The purpose is to suppress the harmless warning:
+	 * "PCI: Fatal: No config space access function found"
+	 */
+	if (gen2vm)
+		return 0;
+
+	/* For Generation-1 VM, we'll proceed in pci_arch_init().  */
+	return 1;
+}
+
 /*
  * This function is to be invoked early in the boot sequence after the
  * hypervisor has been detected.
@@ -333,6 +350,8 @@ void __init hyperv_init(void)
 
 	hv_apic_init();
 
+	x86_init.pci.arch_init = hv_pci_init;
+
 	/*
 	 * Register Hyper-V specific clocksource.
 	 */
Signature · 1 line
2.20.1
author maintainer
#420 lore raw

PATCH 388/422 crypto: s5p-sss: Fix race in error handling

In reply to Greg Kroah-Hartman

From: Christoph Manszewski <[email protected]>

[ Upstream commit 5842cd44786055231b233ed5ed98cdb63ffb7db3 ]

Remove a race condition introduced by error path in functions:
s5p_aes_interrupt and s5p_aes_crypt_start. Setting the busy field of struct s5p_aes_dev to false made it possible for s5p_tasklet_cb to change the req field, before s5p_aes_complete was called.

Change the first parameter of s5p_aes_complete to struct ablkcipher_request. Before spin_unlock, make a copy of the currently handled request, to ensure s5p_aes_complete function call with the correct request.

---
 drivers/crypto/s5p-sss.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/crypto/s5p-sss.c +7 -5
index faa282074e5aa..9021ad9df0c45 100644
@@ -475,9 +475,9 @@ static void s5p_sg_done(struct s5p_aes_dev *dev)
 }
 
 /* Calls the completion. Cannot be called with dev->lock hold. */
-static void s5p_aes_complete(struct s5p_aes_dev *dev, int err)
+static void s5p_aes_complete(struct ablkcipher_request *req, int err)
 {
-	dev->req->base.complete(&dev->req->base, err);
+	req->base.complete(&req->base, err);
 }
 
 static void s5p_unset_outdata(struct s5p_aes_dev *dev)
@@ -655,6 +655,7 @@ static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
 {
 	struct platform_device *pdev = dev_id;
 	struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
+	struct ablkcipher_request *req;
 	int err_dma_tx = 0;
 	int err_dma_rx = 0;
 	int err_dma_hx = 0;
@@ -727,7 +728,7 @@ static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
 
 		spin_unlock_irqrestore(&dev->lock, flags);
 
-		s5p_aes_complete(dev, 0);
+		s5p_aes_complete(dev->req, 0);
 		/* Device is still busy */
 		tasklet_schedule(&dev->tasklet);
 	} else {
@@ -752,11 +753,12 @@ static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
 error:
 	s5p_sg_done(dev);
 	dev->busy = false;
+	req = dev->req;
 	if (err_dma_hx == 1)
 		s5p_set_dma_hashdata(dev, dev->hash_sg_iter);
 
 	spin_unlock_irqrestore(&dev->lock, flags);
-	s5p_aes_complete(dev, err);
+	s5p_aes_complete(req, err);
 
 hash_irq_end:
 	/*
@@ -1983,7 +1985,7 @@ indata_error:
 	s5p_sg_done(dev);
 	dev->busy = false;
 	spin_unlock_irqrestore(&dev->lock, flags);
-	s5p_aes_complete(dev, err);
+	s5p_aes_complete(req, err);
 }
 
 static void s5p_tasklet_cb(unsigned long data)
Signature · 1 line
2.20.1
author maintainer
#421 lore raw

PATCH 389/422 crypto: s5p-sss: Fix Fix argument list alignment

In reply to Greg Kroah-Hartman

From: Christoph Manszewski <[email protected]>

[ Upstream commit 6c12b6ba45490eeb820fdceccf5a53f42a26799c ]

Fix misalignment of continued argument list.

---
 drivers/crypto/s5p-sss.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/s5p-sss.c +2 -2
index 9021ad9df0c45..b7216935236f0 100644
@@ -491,7 +491,7 @@ static void s5p_unset_indata(struct s5p_aes_dev *dev)
 }
 
 static int s5p_make_sg_cpy(struct s5p_aes_dev *dev, struct scatterlist *src,
-			    struct scatterlist **dst)
+			   struct scatterlist **dst)
 {
 	void *pages;
 	int len;
@@ -1889,7 +1889,7 @@ static int s5p_set_indata_start(struct s5p_aes_dev *dev,
 }
 
 static int s5p_set_outdata_start(struct s5p_aes_dev *dev,
-				struct ablkcipher_request *req)
+				 struct ablkcipher_request *req)
 {
 	struct scatterlist *sg;
 	int err;
Signature · 1 line
2.20.1
#422 lore raw

Re: [PATCH 4.19 389/422] crypto: s5p-sss: Fix Fix argument list alignment

Quoted 5 lines · Greg Kroah-Hartman

From: Christoph Manszewski <[email protected]>

[ Upstream commit 6c12b6ba45490eeb820fdceccf5a53f42a26799c ]

Fix misalignment of continued argument list.

Including whitespace changes in -stable is forbidden by rules.

This one is _just_ whitespace change. Please drop.

Pavel

Quoted 23 lines

+++ b/drivers/crypto/s5p-sss.c

drivers/crypto/s5p-sss.c +2 -2
@@ -491,7 +491,7 @@ static void s5p_unset_indata(struct s5p_aes_dev *dev)
 }
 
 static int s5p_make_sg_cpy(struct s5p_aes_dev *dev, struct scatterlist *src,
-			    struct scatterlist **dst)
+			   struct scatterlist **dst)
 {
 	void *pages;
 	int len;
@@ -1889,7 +1889,7 @@ static int s5p_set_indata_start(struct s5p_aes_dev *dev,
 }
 
 static int s5p_set_outdata_start(struct s5p_aes_dev *dev,
-				struct ablkcipher_request *req)
+				 struct ablkcipher_request *req)
 {
 	struct scatterlist *sg;
 	int err;
Signature · 1 line
2.20.1
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#423 lore raw

PATCH 390/422 crypto: fix a memory leak in rsa-kcs1pads encryption mode

In reply to Greg Kroah-Hartman

From: Dan Aloni <[email protected]>

[ Upstream commit 3944f139d5592790b70bc64f197162e643a8512b ]

The encryption mode of pkcs1pad never uses out_sg and out_buf, so there's no need to allocate the buffer, which presently is not even being freed.

---
 crypto/rsa-pkcs1pad.c | 9 ---------
 1 file changed, 9 deletions(-)
crypto/rsa-pkcs1pad.c +0 -9
index 9893dbfc1af45..812476e468213 100644
@@ -261,15 +261,6 @@ static int pkcs1pad_encrypt(struct akcipher_request *req)
 	pkcs1pad_sg_set_buf(req_ctx->in_sg, req_ctx->in_buf,
 			ctx->key_size - 1 - req->src_len, req->src);
 
-	req_ctx->out_buf = kmalloc(ctx->key_size, GFP_KERNEL);
-	if (!req_ctx->out_buf) {
-		kfree(req_ctx->in_buf);
-		return -ENOMEM;
-	}
-
-	pkcs1pad_sg_set_buf(req_ctx->out_sg, req_ctx->out_buf,
-			ctx->key_size, NULL);
-
 	akcipher_request_set_tfm(&req_ctx->child_req, ctx->child);
 	akcipher_request_set_callback(&req_ctx->child_req, req->base.flags,
 			pkcs1pad_encrypt_sign_complete_cb, req);
Signature · 1 line
2.20.1
author maintainer
#424 lore raw

PATCH 391/422 iwlwifi: dbg: dont crash if the firmware crashes in the middle of a debug dump

In reply to Greg Kroah-Hartman

From: Emmanuel Grumbach <[email protected]>

[ Upstream commit 79f25b10c9da3dbc953e47033d0494e51580ac3b ]

We can dump data from the firmware either when it crashes, or when the firmware is alive.
Not all the data is available if the firmware is running (like the Tx / Rx FIFOs which are available only when the firmware is halted), so we first check that the firmware is alive to compute the required size for the dump and then fill the buffer with the data.

When we allocate the buffer, we test the STATUS_FW_ERROR bit to check if the firmware is alive or not. This bit can be changed during the course of the dump since it is modified in the interrupt handler.

We hit a case where we allocate the buffer while the firmware is sill working, and while we start to fill the buffer, the firmware crashes. Then we test STATUS_FW_ERROR again and decide to fill the buffer with data like the FIFOs even if no room was allocated for this data in the buffer. This means that we overflow the buffer that was allocated leading to memory corruption.

To fix this, test the STATUS_FW_ERROR bit only once and rely on local variables to check if we should dump fifos or other firmware components.

Fixes 04fd2c28226f ("iwlwifi: mvm: add rxf and txf to dump data")
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/fw/dbg.c +1 -1
index 8070b2d4c46fe..3443cbdbab4ae 100644
@@ -824,7 +824,7 @@ void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt)
 	}
 
 	/* We only dump the FIFOs if the FW is in error state */
-	if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status)) {
+	if (fifo_data_len) {
 		iwl_fw_dump_fifos(fwrt, &dump_data);
 		if (radio_len)
 			iwl_read_radio_regs(fwrt, &dump_data);
Signature · 1 line
2.20.1
author maintainer
#425 lore raw

PATCH 392/422 iwlwifi: fix non_shared_ant for 22000 devices

In reply to Greg Kroah-Hartman

From: Erel Geron <[email protected]>

[ Upstream commit a40287727d9b737e183959fd31a4e0c55f312853 ]

The non-shared antenna was wrong for 22000 device series. Fix it to ANT_B for correct antenna preference by coex in MVM driver.

Fixes e34d975e40ff ("iwlwifi: Add a000 HW family support")
---
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/cfg/22000.c +1 -1
index b4347806a59ed..a0de61aa0feff 100644
@@ -143,7 +143,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
 	.ucode_api_min = IWL_22000_UCODE_API_MIN,			\
 	.led_mode = IWL_LED_RF_STATE,					\
 	.nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_22000,		\
-	.non_shared_ant = ANT_A,					\
+	.non_shared_ant = ANT_B,					\
 	.dccm_offset = IWL_22000_DCCM_OFFSET,				\
 	.dccm_len = IWL_22000_DCCM_LEN,					\
 	.dccm2_offset = IWL_22000_DCCM2_OFFSET,				\
Signature · 1 line
2.20.1
author maintainer
#426 lore raw

PATCH 393/422 iwlwifi: pcie: read correct prph address for newer devices

In reply to Greg Kroah-Hartman

From: Sara Sharon <[email protected]>

[ Upstream commit 84fb372c892e231e9a2ffdaa5c2df52d94aa536c ]

For newer devices we have higher range of periphery addresses. Currently it is masked out, so we end up reading another address.

---
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +14 -2
index 7d319b6863feb..954f932e9c88e 100644
@@ -1830,18 +1830,30 @@ static u32 iwl_trans_pcie_read32(struct iwl_trans *trans, u32 ofs)
 	return readl(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs);
 }
 
+static u32 iwl_trans_pcie_prph_msk(struct iwl_trans *trans)
+{
+	if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560)
+		return 0x00FFFFFF;
+	else
+		return 0x000FFFFF;
+}
+
 static u32 iwl_trans_pcie_read_prph(struct iwl_trans *trans, u32 reg)
 {
+	u32 mask = iwl_trans_pcie_prph_msk(trans);
+
 	iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_RADDR,
-			       ((reg & 0x000FFFFF) | (3 << 24)));
+			       ((reg & mask) | (3 << 24)));
 	return iwl_trans_pcie_read32(trans, HBUS_TARG_PRPH_RDAT);
 }
 
 static void iwl_trans_pcie_write_prph(struct iwl_trans *trans, u32 addr,
 				      u32 val)
 {
+	u32 mask = iwl_trans_pcie_prph_msk(trans);
+
 	iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_WADDR,
-			       ((addr & 0x000FFFFF) | (3 << 24)));
+			       ((addr & mask) | (3 << 24)));
 	iwl_trans_pcie_write32(trans, HBUS_TARG_PRPH_WDAT, val);
 }
 
Signature · 1 line
2.20.1
author maintainer
#427 lore raw

PATCH 394/422 iwlwifi: api: annotate compressed BA notif array sizes

In reply to Greg Kroah-Hartman

From: Johannes Berg <[email protected]>

[ Upstream commit 6f68cc367ab6578a33cca21b6056804165621f00 ]

Annotate the compressed BA notification array sizes and make both of them 0-length since the length of 1 is just confusing - it may be different than that and the offset to the second one needs to be calculated in the C code anyhow.

---
 drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/tx.h +3 -3
index 514b86123d3d3..80853f6cbd6d2 100644
@@ -747,9 +747,9 @@ enum iwl_mvm_ba_resp_flags {
  * @tfd_cnt: number of TFD-Q elements
  * @ra_tid_cnt: number of RATID-Q elements
  * @tfd: array of TFD queue status updates. See &iwl_mvm_compressed_ba_tfd
- *	for details.
+ *	for details. Length in @tfd_cnt.
  * @ra_tid: array of RA-TID queue status updates. For debug purposes only. See
- *	&iwl_mvm_compressed_ba_ratid for more details.
+ *	&iwl_mvm_compressed_ba_ratid for more details. Length in @ra_tid_cnt.
  */
 struct iwl_mvm_compressed_ba_notif {
 	__le32 flags;
@@ -766,7 +766,7 @@ struct iwl_mvm_compressed_ba_notif {
 	__le32 tx_rate;
 	__le16 tfd_cnt;
 	__le16 ra_tid_cnt;
-	struct iwl_mvm_compressed_ba_tfd tfd[1];
+	struct iwl_mvm_compressed_ba_tfd tfd[0];
 	struct iwl_mvm_compressed_ba_ratid ra_tid[0];
 } __packed; /* COMPRESSED_BA_RES_API_S_VER_4 */
 
Signature · 1 line
2.20.1
author maintainer
#428 lore raw

PATCH 395/422 iwlwifi: pcie: gen2: build A-MSDU only for GSO

In reply to Greg Kroah-Hartman

From: Johannes Berg <[email protected]>

[ Upstream commit 53f474e6a8d74d5dc0c3a015d889471f9a157685 ]

If the incoming frame should be an A-MSDU, it may already be one, for example in the case of NAN multicast being encapsulated in an A-MSDU. Thus, use the GSO algorithm to build A-MSDU only if the skb actually contains GSO data.

Fixes 6ffe5de35b05 ("iwlwifi: pcie: add AMSDU to gen2")
---
 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c +6 -1
index b99f33ff91230..61ffa1d1a00d7 100644
@@ -526,7 +526,12 @@ struct iwl_tfh_tfd *iwl_pcie_gen2_build_tfd(struct iwl_trans *trans,
 
 	hdr_len = ieee80211_hdrlen(hdr->frame_control);
 
-	if (amsdu)
+	/*
+	 * Only build A-MSDUs here if doing so by GSO, otherwise it may be
+	 * an A-MSDU for other reasons, e.g. NAN or an A-MSDU having been
+	 * built in the higher layers already.
+	 */
+	if (amsdu && skb_shinfo(skb)->gso_size)
 		return iwl_pcie_gen2_build_tx_amsdu(trans, txq, dev_cmd, skb,
 						    out_meta, hdr_len, len);
 
Signature · 1 line
2.20.1
author maintainer
#429 lore raw

PATCH 396/422 iwlwifi: pcie: fit reclaim msg to MAX_MSG_LEN

In reply to Greg Kroah-Hartman

From: Golan Ben Ami <[email protected]>

[ Upstream commit 81f0c66187e1ebb7b63529d82faf7ff1e0ef428a ]

Today, the length of a debug message in iwl_trans_pcie_reclaim may pass the MAX_MSG_LEN, which is 110.
An example for this kind of message is:

'iwl_trans_pcie_reclaim: Read index for DMA queue txq id (2), last_to_free 65535 is out of range [0-65536] 2 2.'

Cut the message a bit so it will fit the allowed MAX_MSG_LEN.

---
 drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +1 -1
index 42fdb7970cfdc..2fec394a988c1 100644
@@ -1103,7 +1103,7 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
 
 	if (!iwl_queue_used(txq, last_to_free)) {
 		IWL_ERR(trans,
-			"%s: Read index for DMA queue txq id (%d), last_to_free %d is out of range [0-%d] %d %d.\n",
+			"%s: Read index for txq id (%d), last_to_free %d is out of range [0-%d] %d %d.\n",
 			__func__, txq_id, last_to_free,
 			trans->cfg->base_params->max_tfd_queue_size,
 			txq->write_ptr, txq->read_ptr);
Signature · 1 line
2.20.1
author maintainer
#430 lore raw

PATCH 397/422 iwlwifi: mvm: use correct FIFO length

In reply to Greg Kroah-Hartman

From: Sara Sharon <[email protected]>

[ Upstream commit 7126b6f2bbdf8e25f85e7ca6d91d49ea4ce9f6a6 ]

Current FIFO size calculation is wrong for two reasons:
- We access lmac 0 by default
- We don't take 11ax into consideration.
Fix both.

---
 .../net/wireless/intel/iwlwifi/mvm/mac-ctxt.c |  4 ++
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c   | 47 +++++++++++++------
 2 files changed, 36 insertions(+), 15 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +4 -0
index b3fd20502abb3..d90d58309bf0e 100644
@@ -85,6 +85,10 @@ const u8 iwl_mvm_ac_to_gen2_tx_fifo[] = {
 	IWL_GEN2_EDCA_TX_FIFO_VI,
 	IWL_GEN2_EDCA_TX_FIFO_BE,
 	IWL_GEN2_EDCA_TX_FIFO_BK,
+	IWL_GEN2_TRIG_TX_FIFO_VO,
+	IWL_GEN2_TRIG_TX_FIFO_VI,
+	IWL_GEN2_TRIG_TX_FIFO_BE,
+	IWL_GEN2_TRIG_TX_FIFO_BK,
 };
 
 struct iwl_mvm_mac_iface_iterator_data {
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +32 -15

65 lines not on this page · raw message

Signature · 1 line
2.20.1
author maintainer
#431 lore raw

PATCH 398/422 iwlwifi: mvm: Allow TKIP for AP mode

In reply to Greg Kroah-Hartman

From: Ilan Peer <[email protected]>

[ Upstream commit 6f3df8c1192c873a6ad9a76328920f6f85af90a8 ]

Support for setting keys for TKIP cipher suite was mistakenly removed for AP mode. Fix this.

Fixes 85aeb58cec1a ("iwlwifi: mvm: Enable security on new TX API")
---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +0 -4
index 18db1ed92d9b0..04ea516bddcc0 100644
@@ -3133,10 +3133,6 @@ static int __iwl_mvm_set_sta_key(struct iwl_mvm *mvm,
 
 	switch (keyconf->cipher) {
 	case WLAN_CIPHER_SUITE_TKIP:
-		if (vif->type == NL80211_IFTYPE_AP) {
-			ret = -EINVAL;
-			break;
-		}
 		addr = iwl_mvm_get_mac_addr(mvm, vif, sta);
 		/* get phase 1 key from mac80211 */
 		ieee80211_get_key_rx_seq(keyconf, 0, &seq);
Signature · 1 line
2.20.1
author maintainer
#432 lore raw

PATCH 399/422 scsi: NCR5380: Clear all unissued commands on host reset

In reply to Greg Kroah-Hartman

From: Hannes Reinecke <[email protected]>

[ Upstream commit 1aeeeed7f03c576f096eede7b0384f99a98f588c ]

When doing a host reset we should be clearing all outstanding commands, not just the command triggering the reset.

[mkp: adjusted Hannes' SoB address]

---
 drivers/scsi/NCR5380.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/scsi/NCR5380.c +5 -2
index 5160d6214a36b..d0bbb20518048 100644
@@ -2303,7 +2303,7 @@ static int NCR5380_host_reset(struct scsi_cmnd *cmd)
 	spin_lock_irqsave(&hostdata->lock, flags);
 
 #if (NDEBUG & NDEBUG_ANY)
-	scmd_printk(KERN_INFO, cmd, __func__);
+	shost_printk(KERN_INFO, instance, __func__);
 #endif
 	NCR5380_dprint(NDEBUG_ANY, instance);
 	NCR5380_dprint_phase(NDEBUG_ANY, instance);
@@ -2321,10 +2321,13 @@ static int NCR5380_host_reset(struct scsi_cmnd *cmd)
 	 * commands!
 	 */
 
-	if (list_del_cmd(&hostdata->unissued, cmd)) {
+	list_for_each_entry(ncmd, &hostdata->unissued, list) {
+		struct scsi_cmnd *cmd = NCR5380_to_scmd(ncmd);
+
 		cmd->result = DID_RESET << 16;
 		cmd->scsi_done(cmd);
 	}
+	INIT_LIST_HEAD(&hostdata->unissued);
 
 	if (hostdata->selecting) {
 		hostdata->selecting->result = DID_RESET << 16;
Signature · 1 line
2.20.1
author maintainer
#433 lore raw

PATCH 400/422 scsi: NCR5380: Have NCR5380_select() return a bool

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit dad8261e643849ea134c7cd5c8e794e31d93b9eb ]

The return value is taken to mean "retry" or "don't retry". Change it to bool to improve readability. Fix related comments. No functional change.

---
 drivers/scsi/NCR5380.c | 46 +++++++++++++++++++-----------------------
 drivers/scsi/NCR5380.h |  2 +-
 2 files changed, 22 insertions(+), 26 deletions(-)
drivers/scsi/NCR5380.c +21 -25
index d0bbb20518048..d600d3e94ba4a 100644
@@ -904,20 +904,16 @@ static irqreturn_t __maybe_unused NCR5380_intr(int irq, void *dev_id)
 	return IRQ_RETVAL(handled);
 }
 
-/*
- * Function : int NCR5380_select(struct Scsi_Host *instance,
- * struct scsi_cmnd *cmd)
- *
- * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command,
- * including ARBITRATION, SELECTION, and initial message out for
- * IDENTIFY and queue messages.
+/**
+ * NCR5380_select - attempt arbitration and selection for a given command
+ * @instance: the Scsi_Host instance
+ * @cmd: the scsi_cmnd to execute
  *
- * Inputs : instance - instantiation of the 5380 driver on which this
- * target lives, cmd - SCSI command to execute.
+ * This routine establishes an I_T_L nexus for a SCSI command. This involves
+ * ARBITRATION, SELECTION and MESSAGE OUT phases and an IDENTIFY message.
  *
- * Returns cmd if selection failed but should be retried,
- * NULL if selection failed and should not be retried, or
- * NULL if selection succeeded (hostdata->connected == cmd).
+ * Returns true if the operation should be retried.
+ * Returns false if it should not be retried.
  *
  * Side effects :
  * If bus busy, arbitration failed, etc, NCR5380_select() will exit
@@ -925,16 +921,15 @@ static irqreturn_t __maybe_unused NCR5380_intr(int irq, void *dev_id)
  * SELECT_ENABLE will be set appropriately, the NCR5380
  * will cease to drive any SCSI bus signals.
  *
- * If successful : I_T_L or I_T_L_Q nexus will be established,
- * instance->connected will be set to cmd.
+ * If successful : the I_T_L nexus will be established, and
+ * hostdata->connected will be set to cmd.
  * SELECT interrupt will be disabled.
  *
  * If failed (no target) : cmd->scsi_done() will be called, and the
  * cmd->result host byte set to DID_BAD_TARGET.
  */
 
-static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
-                                        struct scsi_cmnd *cmd)
+static bool NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
 	__releases(&hostdata->lock) __acquires(&hostdata->lock)
 {
 	struct NCR5380_hostdata *hostdata = shost_priv(instance);
@@ -942,6 +937,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 	unsigned char *data;
 	int len;
 	int err;
+	bool ret = true;
 
 	NCR5380_dprint(NDEBUG_ARBITRATION, instance);
 	dsprintk(NDEBUG_ARBITRATION, instance, "starting arbitration, id = %d\n",
@@ -950,7 +946,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 	/*
 	 * Arbitration and selection phases are slow and involve dropping the
 	 * lock, so we have to watch out for EH. An exception handler may
-	 * change 'selecting' to NULL. This function will then return NULL
+	 * change 'selecting' to NULL. This function will then return false
 	 * so that the caller will forget about 'cmd'. (During information
 	 * transfer phases, EH may change 'connected' to NULL.)
 	 */
@@ -986,7 +982,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 	if (!hostdata->selecting) {
 		/* Command was aborted */
 		NCR5380_write(MODE_REG, MR_BASE);
-		return NULL;
+		return false;
 	}
 	if (err < 0) {
 		NCR5380_write(MODE_REG, MR_BASE);
@@ -1035,7 +1031,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 	if (!hostdata->selecting) {
 		NCR5380_write(MODE_REG, MR_BASE);
 		NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
-		return NULL;
+		return false;
 	}
 
 	dsprintk(NDEBUG_ARBITRATION, instance, "won arbitration\n");
@@ -1118,13 +1114,13 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 
 		/* Can't touch cmd if it has been reclaimed by the scsi ML */
 		if (!hostdata->selecting)
-			return NULL;
+			return false;
 
 		cmd->result = DID_BAD_TARGET << 16;
 		complete_cmd(instance, cmd);
 		dsprintk(NDEBUG_SELECTION, instance,
 			"target did not respond within 250ms\n");
-		cmd = NULL;
+		ret = false;
 		goto out;
 	}
 
@@ -1156,7 +1152,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 	}
 	if (!hostdata->selecting) {
 		do_abort(instance);
-		return NULL;
+		return false;
 	}
 
 	dsprintk(NDEBUG_SELECTION, instance, "target %d selected, going into MESSAGE OUT phase.\n",
@@ -1172,7 +1168,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 		cmd->result = DID_ERROR << 16;
 		complete_cmd(instance, cmd);
 		dsprintk(NDEBUG_SELECTION, instance, "IDENTIFY message transfer failed\n");
-		cmd = NULL;
+		ret = false;
 		goto out;
 	}
 
@@ -1187,13 +1183,13 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
 
 	initialize_SCp(cmd);
 
-	cmd = NULL;
+	ret = false;
 
 out:
 	if (!hostdata->selecting)
 		return NULL;
 	hostdata->selecting = NULL;
-	return cmd;
+	return ret;
 }
 
 /*
drivers/scsi/NCR5380.h +1 -1
index 8a6d002e67894..5935fd6d1a058 100644
@@ -275,7 +275,7 @@ static irqreturn_t NCR5380_intr(int irq, void *dev_id);
 static void NCR5380_main(struct work_struct *work);
 static const char *NCR5380_info(struct Scsi_Host *instance);
 static void NCR5380_reselect(struct Scsi_Host *instance);
-static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *, struct scsi_cmnd *);
+static bool NCR5380_select(struct Scsi_Host *, struct scsi_cmnd *);
 static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
 static int NCR5380_transfer_pio(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
 static int NCR5380_poll_politely2(struct NCR5380_hostdata *,
Signature · 1 line
2.20.1
author maintainer
#434 lore raw

PATCH 401/422 scsi: NCR5380: Withhold disconnect privilege for REQUEST SENSE

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit 7c8ed783c2faa1e3f741844ffac41340338ea0f4 ]

This is mostly needed because an AztecMonster II target has been observed disconnecting REQUEST SENSE commands and then failing to reselect properly.

---
 drivers/scsi/NCR5380.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/NCR5380.c +3 -1
index d600d3e94ba4a..144bb0c2b3064 100644
@@ -938,6 +938,8 @@ static bool NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
 	int len;
 	int err;
 	bool ret = true;
+	bool can_disconnect = instance->irq != NO_IRQ &&
+			      cmd->cmnd[0] != REQUEST_SENSE;
 
 	NCR5380_dprint(NDEBUG_ARBITRATION, instance);
 	dsprintk(NDEBUG_ARBITRATION, instance, "starting arbitration, id = %d\n",
@@ -1157,7 +1159,7 @@ static bool NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
 
 	dsprintk(NDEBUG_SELECTION, instance, "target %d selected, going into MESSAGE OUT phase.\n",
 	         scmd_id(cmd));
-	tmp[0] = IDENTIFY(((instance->irq == NO_IRQ) ? 0 : 1), cmd->device->lun);
+	tmp[0] = IDENTIFY(can_disconnect, cmd->device->lun);
 
 	len = 1;
 	data = tmp;
Signature · 1 line
2.20.1
author maintainer
#435 lore raw

PATCH 402/422 scsi: NCR5380: Use DRIVER_SENSE to indicate valid sense data

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit 070356513963be6196142acff56acc8359069fa1 ]

When sense data is valid, call set_driver_byte(cmd, DRIVER_SENSE). Otherwise some callers of scsi_execute() will ignore sense data. Don't set DID_ERROR or DID_RESET just because sense data is missing.

---
 drivers/scsi/NCR5380.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/scsi/NCR5380.c +4 -5
index 144bb0c2b3064..90136942f4882 100644
@@ -513,11 +513,12 @@ static void complete_cmd(struct Scsi_Host *instance,
 
 	if (hostdata->sensing == cmd) {
 		/* Autosense processing ends here */
-		if ((cmd->result & 0xff) != SAM_STAT_GOOD) {
+		if (status_byte(cmd->result) != GOOD) {
 			scsi_eh_restore_cmnd(cmd, &hostdata->ses);
-			set_host_byte(cmd, DID_ERROR);
-		} else
+		} else {
 			scsi_eh_restore_cmnd(cmd, &hostdata->ses);
+			set_driver_byte(cmd, DRIVER_SENSE);
+		}
 		hostdata->sensing = NULL;
 	}
 
@@ -2265,7 +2266,6 @@ static int NCR5380_abort(struct scsi_cmnd *cmd)
 	if (list_del_cmd(&hostdata->autosense, cmd)) {
 		dsprintk(NDEBUG_ABORT, instance,
 		         "abort: removed %p from sense queue\n", cmd);
-		set_host_byte(cmd, DID_ERROR);
 		complete_cmd(instance, cmd);
 	}
 
@@ -2344,7 +2344,6 @@ static int NCR5380_host_reset(struct scsi_cmnd *cmd)
 	list_for_each_entry(ncmd, &hostdata->autosense, list) {
 		struct scsi_cmnd *cmd = NCR5380_to_scmd(ncmd);
 
-		set_host_byte(cmd, DID_RESET);
 		cmd->scsi_done(cmd);
 	}
 	INIT_LIST_HEAD(&hostdata->autosense);
Signature · 1 line
2.20.1
author maintainer
#436 lore raw

PATCH 403/422 scsi: NCR5380: Check for invalid reselection target

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit 7ef55f6744c45e3d7c85a3f74ada39b67ac741dd ]

The X3T9.2 specification (draft) says, under "6.1.4.1 RESELECTION", that "the initiator shall not respond to a RESELECTION phase if other than two SCSI ID bits are on the DATA BUS." This issue (too many bits set) has been observed in the wild, so add a check.

---
 drivers/scsi/NCR5380.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/scsi/NCR5380.c +5 -0
index 90136942f4882..c67f476447372 100644
@@ -2008,6 +2008,11 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 	NCR5380_write(MODE_REG, MR_BASE);
 
 	target_mask = NCR5380_read(CURRENT_SCSI_DATA_REG) & ~(hostdata->id_mask);
+	if (!target_mask || target_mask & (target_mask - 1)) {
+		shost_printk(KERN_WARNING, instance,
+			     "reselect: bad target_mask 0x%02x\n", target_mask);
+		return;
+	}
 
 	dsprintk(NDEBUG_RESELECTION, instance, "reselect\n");
 
Signature · 1 line
2.20.1
author maintainer
#437 lore raw

PATCH 404/422 scsi: NCR5380: Dont clear busy flag when abort fails

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit 45ddc1b24806cc8f1a09f23dd4e7b6e4a8ae36e1 ]

When NCR5380_abort() returns FAILED, the driver forgets that the target is still busy. Hence, further commands may be sent to the target, which may fail during selection and produce the error message, "reselection after won arbitration?". Prevent this by leaving the busy flag set when NCR5380_abort() fails.

---
 drivers/scsi/NCR5380.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/scsi/NCR5380.c +10 -4
index c67f476447372..227ceb5197555 100644
@@ -522,8 +522,6 @@ static void complete_cmd(struct Scsi_Host *instance,
 		hostdata->sensing = NULL;
 	}
 
-	hostdata->busy[scmd_id(cmd)] &= ~(1 << cmd->device->lun);
-
 	cmd->scsi_done(cmd);
 }
 
@@ -1711,6 +1709,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
 				cmd->result = DID_ERROR << 16;
 				complete_cmd(instance, cmd);
 				hostdata->connected = NULL;
+				hostdata->busy[scmd_id(cmd)] &= ~(1 << cmd->device->lun);
 				return;
 #endif
 			case PHASE_DATAIN:
@@ -1793,6 +1792,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
 					         cmd, scmd_id(cmd), cmd->device->lun);
 
 					hostdata->connected = NULL;
+					hostdata->busy[scmd_id(cmd)] &= ~(1 << cmd->device->lun);
 
 					cmd->result &= ~0xffff;
 					cmd->result |= cmd->SCp.Status;
@@ -1946,6 +1946,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
 				NCR5380_transfer_pio(instance, &phase, &len, &data);
 				if (msgout == ABORT) {
 					hostdata->connected = NULL;
+					hostdata->busy[scmd_id(cmd)] &= ~(1 << cmd->device->lun);
 					cmd->result = DID_ERROR << 16;
 					complete_cmd(instance, cmd);
 					maybe_release_dma_irq(instance);
@@ -2100,13 +2101,16 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 		dsprintk(NDEBUG_RESELECTION | NDEBUG_QUEUES, instance,
 		         "reselect: removed %p from disconnected queue\n", tmp);
 	} else {
+		int target = ffs(target_mask) - 1;
+
 		shost_printk(KERN_ERR, instance, "target bitmask 0x%02x lun %d not in disconnected queue.\n",
 		             target_mask, lun);
 		/*
 		 * Since we have an established nexus that we can't do anything
 		 * with, we must abort it.
 		 */
-		do_abort(instance);
+		if (do_abort(instance) == 0)
+			hostdata->busy[target] &= ~(1 << lun);
 		return;
 	}
 
@@ -2277,8 +2281,10 @@ static int NCR5380_abort(struct scsi_cmnd *cmd)
 out:
 	if (result == FAILED)
 		dsprintk(NDEBUG_ABORT, instance, "abort: failed to abort %p\n", cmd);
-	else
+	else {
+		hostdata->busy[scmd_id(cmd)] &= ~(1 << cmd->device->lun);
 		dsprintk(NDEBUG_ABORT, instance, "abort: successfully aborted %p\n", cmd);
+	}
 
 	queue_work(hostdata->work_q, &hostdata->main_task);
 	maybe_release_dma_irq(instance);
Signature · 1 line
2.20.1
author maintainer
#438 lore raw

PATCH 405/422 scsi: NCR5380: Dont call dsprintk() following reselection interrupt

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit 08267216b3f8aa5adc204bdccf8deb72c1cd7665 ]

The X3T9.2 specification (draft) says, under "6.1.4.1 RESELECTION",

... The reselected initiator shall then assert the BSY signal within a selection abort time of its most recent detection of being reselected; this is required for correct operation of the time-out procedure.

The selection abort time is only 200 us which may be insufficient time for a printk() call. Move the diagnostics to the error paths.

---
 drivers/scsi/NCR5380.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/NCR5380.c +2 -2
index 227ceb5197555..5c3ffb466bb10 100644
@@ -2015,8 +2015,6 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 		return;
 	}
 
-	dsprintk(NDEBUG_RESELECTION, instance, "reselect\n");
-
 	/*
 	 * At this point, we have detected that our SCSI ID is on the bus,
 	 * SEL is true and BSY was false for at least one bus settle delay
@@ -2029,6 +2027,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 	NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_BSY);
 	if (NCR5380_poll_politely(hostdata,
 	                          STATUS_REG, SR_SEL, 0, 2 * HZ) < 0) {
+		shost_printk(KERN_ERR, instance, "reselect: !SEL timeout\n");
 		NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
 		return;
 	}
@@ -2040,6 +2039,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 
 	if (NCR5380_poll_politely(hostdata,
 	                          STATUS_REG, SR_REQ, SR_REQ, 2 * HZ) < 0) {
+		shost_printk(KERN_ERR, instance, "reselect: REQ timeout\n");
 		do_abort(instance);
 		return;
 	}
Signature · 1 line
2.20.1
author maintainer
#439 lore raw

PATCH 406/422 scsi: NCR5380: Handle BUS FREE during reselection

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit ca694afad707cb3ae2fdef3b28454444d9ac726e ]

The X3T9.2 specification (draft) says, under "6.1.4.2 RESELECTION time-out procedure", that a target may assert RST or go to BUS FREE phase if the initiator does not respond within 200 us. Something like this has been observed with AztecMonster II target. When it happens, all we can do is wait for the target to try again.

---
 drivers/scsi/NCR5380.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/NCR5380.c +3 -0
index 5c3ffb466bb10..bce6c990d060a 100644
@@ -2039,6 +2039,9 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 
 	if (NCR5380_poll_politely(hostdata,
 	                          STATUS_REG, SR_REQ, SR_REQ, 2 * HZ) < 0) {
+		if ((NCR5380_read(STATUS_REG) & (SR_BSY | SR_SEL)) == 0)
+			/* BUS FREE phase */
+			return;
 		shost_printk(KERN_ERR, instance, "reselect: REQ timeout\n");
 		do_abort(instance);
 		return;
Signature · 1 line
2.20.1
author maintainer
#440 lore raw

PATCH 407/422 scsi: NCR5380: Check for bus reset

In reply to Greg Kroah-Hartman

From: Finn Thain <[email protected]>

[ Upstream commit 6b0e87a6aafe12d75c2bea6fc8e49e88b98b3083 ]

The SR_RST bit isn't latched. Hence, detecting a bus reset isn't reliable. When it is detected, the right thing to do is to drop all connected and disconnected commands. The code for that is already present so refactor it and call it when SR_RST is set.

---
 drivers/scsi/NCR5380.c | 74 +++++++++++++++++++++++++-----------------
 1 file changed, 45 insertions(+), 29 deletions(-)
drivers/scsi/NCR5380.c +45 -29
index bce6c990d060a..8ec68dcc0cc4a 100644
@@ -131,6 +131,7 @@
 
 static int do_abort(struct Scsi_Host *);
 static void do_reset(struct Scsi_Host *);
+static void bus_reset_cleanup(struct Scsi_Host *);
 
 /**
  * initialize_SCp - init the scsi pointer field
@@ -885,7 +886,14 @@ static irqreturn_t __maybe_unused NCR5380_intr(int irq, void *dev_id)
 			/* Probably Bus Reset */
 			NCR5380_read(RESET_PARITY_INTERRUPT_REG);
 
-			dsprintk(NDEBUG_INTR, instance, "unknown interrupt\n");
+			if (sr & SR_RST) {
+				/* Certainly Bus Reset */
+				shost_printk(KERN_WARNING, instance,
+					     "bus reset interrupt\n");
+				bus_reset_cleanup(instance);
+			} else {
+				dsprintk(NDEBUG_INTR, instance, "unknown interrupt\n");
+			}
 #ifdef SUN3_SCSI_VME
 			dregs->csr |= CSR_DMA_ENABLE;
 #endif
@@ -2297,31 +2305,12 @@ out:
 }
 
 
-/**
- * NCR5380_host_reset - reset the SCSI host
- * @cmd: SCSI command undergoing EH
- *
- * Returns SUCCESS
- */
-
-static int NCR5380_host_reset(struct scsi_cmnd *cmd)
+static void bus_reset_cleanup(struct Scsi_Host *instance)
 {
-	struct Scsi_Host *instance = cmd->device->host;
 	struct NCR5380_hostdata *hostdata = shost_priv(instance);
 	int i;
-	unsigned long flags;
 	struct NCR5380_cmd *ncmd;
 
-	spin_lock_irqsave(&hostdata->lock, flags);
-
-#if (NDEBUG & NDEBUG_ANY)
-	shost_printk(KERN_INFO, instance, __func__);
-#endif
-	NCR5380_dprint(NDEBUG_ANY, instance);
-	NCR5380_dprint_phase(NDEBUG_ANY, instance);
-
-	do_reset(instance);
-
 	/* reset NCR registers */
 	NCR5380_write(MODE_REG, MR_BASE);
 	NCR5380_write(TARGET_COMMAND_REG, 0);
@@ -2333,14 +2322,6 @@ static int NCR5380_host_reset(struct scsi_cmnd *cmd)
 	 * commands!
 	 */
 
-	list_for_each_entry(ncmd, &hostdata->unissued, list) {
-		struct scsi_cmnd *cmd = NCR5380_to_scmd(ncmd);
-
-		cmd->result = DID_RESET << 16;
-		cmd->scsi_done(cmd);
-	}
-	INIT_LIST_HEAD(&hostdata->unissued);
-
 	if (hostdata->selecting) {
 		hostdata->selecting->result = DID_RESET << 16;
 		complete_cmd(instance, hostdata->selecting);
@@ -2374,6 +2355,41 @@ static int NCR5380_host_reset(struct scsi_cmnd *cmd)
 
 	queue_work(hostdata->work_q, &hostdata->main_task);
 	maybe_release_dma_irq(instance);
+}
+
+/**
+ * NCR5380_host_reset - reset the SCSI host
+ * @cmd: SCSI command undergoing EH
+ *
+ * Returns SUCCESS
+ */
+
+static int NCR5380_host_reset(struct scsi_cmnd *cmd)
+{
+	struct Scsi_Host *instance = cmd->device->host;
+	struct NCR5380_hostdata *hostdata = shost_priv(instance);
+	unsigned long flags;
+	struct NCR5380_cmd *ncmd;
+
+	spin_lock_irqsave(&hostdata->lock, flags);
+
+#if (NDEBUG & NDEBUG_ANY)
+	shost_printk(KERN_INFO, instance, __func__);
+#endif
+	NCR5380_dprint(NDEBUG_ANY, instance);
+	NCR5380_dprint_phase(NDEBUG_ANY, instance);
+
+	list_for_each_entry(ncmd, &hostdata->unissued, list) {
+		struct scsi_cmnd *scmd = NCR5380_to_scmd(ncmd);
+
+		scmd->result = DID_RESET << 16;
+		scmd->scsi_done(scmd);
+	}
+	INIT_LIST_HEAD(&hostdata->unissued);
+
+	do_reset(instance);
+	bus_reset_cleanup(instance);
+
 	spin_unlock_irqrestore(&hostdata->lock, flags);
 
 	return SUCCESS;
Signature · 1 line
2.20.1
author maintainer
#441 lore raw

PATCH 408/422 arm64: dts: amd: Fix SPI bus warnings

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit e9f0878c4b2004ac19581274c1ae4c61ae3ca70e ]

dtc has new checks for SPI buses. Fix the warnings in node names.

arch/arm64/boot/dts/amd/amd-overdrive.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi' arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi' arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'

Cc Brijesh Singh <[email protected]>
Cc Suravee Suthikulpanit <[email protected]>
Cc Tom Lendacky <[email protected]>
---
 arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi +2 -2
index 125f4deb52fe9..b664e7af74eb3 100644
@@ -107,7 +107,7 @@
 			clock-names = "uartclk", "apb_pclk";
 		};
 
-		spi0: ssp@e1020000 {
+		spi0: spi@e1020000 {
 			status = "disabled";
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0 0xe1020000 0 0x1000>;
@@ -117,7 +117,7 @@
 			clock-names = "apb_pclk";
 		};
 
-		spi1: ssp@e1030000 {
+		spi1: spi@e1030000 {
 			status = "disabled";
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0 0xe1030000 0 0x1000>;
Signature · 1 line
2.20.1
author maintainer
#442 lore raw

PATCH 409/422 arm64: dts: lg: Fix SPI controller node names

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit 09bae3b64cb580c95329bd8d16f08f0a5cb81ec9 ]

SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks.

---
 arch/arm64/boot/dts/lg/lg1312.dtsi | 4 ++--
 arch/arm64/boot/dts/lg/lg1313.dtsi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/lg/lg1312.dtsi +2 -2
index 860c8fb107950..4bde7b6f2b113 100644
@@ -168,14 +168,14 @@
 			clock-names = "apb_pclk";
 			status="disabled";
 		};
-		spi0: ssp@fe800000 {
+		spi0: spi@fe800000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x0 0xfe800000 0x1000>;
 			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clk_bus>;
 			clock-names = "apb_pclk";
 		};
-		spi1: ssp@fe900000 {
+		spi1: spi@fe900000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x0 0xfe900000 0x1000>;
 			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/lg/lg1313.dtsi +2 -2
index 1887af654a7db..16ced1ff1ad36 100644
@@ -168,14 +168,14 @@
 			clock-names = "apb_pclk";
 			status="disabled";
 		};
-		spi0: ssp@fe800000 {
+		spi0: spi@fe800000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x0 0xfe800000 0x1000>;
 			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clk_bus>;
 			clock-names = "apb_pclk";
 		};
-		spi1: ssp@fe900000 {
+		spi1: spi@fe900000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x0 0xfe900000 0x1000>;
 			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.20.1
author maintainer
#443 lore raw

PATCH 410/422 ARM: dts: lpc32xx: Fix SPI controller node names

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit 11236ef582b8d66290bb3b3710e03ca1d85d8ad8 ]

SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the name enables dtc SPI bus checks.

---
 arch/arm/boot/dts/lpc32xx.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/lpc32xx.dtsi +2 -2
index 4981741377f3a..ed0d6fb20122a 100644
@@ -179,7 +179,7 @@
 			 * ssp0 and spi1 are shared pins;
 			 * enable one in your board dts, as needed.
 			 */
-			ssp0: ssp@20084000 {
+			ssp0: spi@20084000 {
 				compatible = "arm,pl022", "arm,primecell";
 				reg = <0x20084000 0x1000>;
 				interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
@@ -199,7 +199,7 @@
 			 * ssp1 and spi2 are shared pins;
 			 * enable one in your board dts, as needed.
 			 */
-			ssp1: ssp@2008c000 {
+			ssp1: spi@2008c000 {
 				compatible = "arm,pl022", "arm,primecell";
 				reg = <0x2008c000 0x1000>;
 				interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.20.1
author maintainer
#444 lore raw

PATCH 411/422 rtc: isl1208: avoid possible sysfs race

In reply to Greg Kroah-Hartman

From: Alexandre Belloni <[email protected]>

[ Upstream commit 1b4c794fda583edabe864ac466e9cd43c707be80 ]

Use rtc_add_group to add the common sysfs group to avoid a possible race condition.

[[email protected]: use to_i2c_client(dev->parent)]

The move of atrim, dtrim usr sysfs properties from i2c device to rtc device require to access them via dev->parent. This patch also aligns timestamp0.

---
 drivers/rtc/rtc-isl1208.c | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)
drivers/rtc/rtc-isl1208.c +10 -17
index ea18a8f4bce06..033f65aef5788 100644
@@ -518,7 +518,7 @@ static ssize_t timestamp0_store(struct device *dev,
 				struct device_attribute *attr,
 				const char *buf, size_t count)
 {
-	struct i2c_client *client = dev_get_drvdata(dev);
+	struct i2c_client *client = to_i2c_client(dev->parent);
 	int sr;
 
 	sr = isl1208_i2c_get_sr(client);
@@ -540,7 +540,7 @@ static ssize_t timestamp0_store(struct device *dev,
 static ssize_t timestamp0_show(struct device *dev,
 			       struct device_attribute *attr, char *buf)
 {
-	struct i2c_client *client = dev_get_drvdata(dev);
+	struct i2c_client *client = to_i2c_client(dev->parent);
 	u8 regs[ISL1219_EVT_SECTION_LEN] = { 0, };
 	struct rtc_time tm;
 	int sr;
@@ -650,7 +650,7 @@ static ssize_t
 isl1208_sysfs_show_atrim(struct device *dev,
 			 struct device_attribute *attr, char *buf)
 {
-	int atr = isl1208_i2c_get_atr(to_i2c_client(dev));
+	int atr = isl1208_i2c_get_atr(to_i2c_client(dev->parent));
 	if (atr < 0)
 		return atr;
 
@@ -663,7 +663,7 @@ static ssize_t
 isl1208_sysfs_show_dtrim(struct device *dev,
 			 struct device_attribute *attr, char *buf)
 {
-	int dtr = isl1208_i2c_get_dtr(to_i2c_client(dev));
+	int dtr = isl1208_i2c_get_dtr(to_i2c_client(dev->parent));
 	if (dtr < 0)
 		return dtr;
 
@@ -676,7 +676,7 @@ static ssize_t
 isl1208_sysfs_show_usr(struct device *dev,
 		       struct device_attribute *attr, char *buf)
 {
-	int usr = isl1208_i2c_get_usr(to_i2c_client(dev));
+	int usr = isl1208_i2c_get_usr(to_i2c_client(dev->parent));
 	if (usr < 0)
 		return usr;
 
@@ -701,7 +701,10 @@ isl1208_sysfs_store_usr(struct device *dev,
 	if (usr < 0 || usr > 0xffff)
 		return -EINVAL;
 
-	return isl1208_i2c_set_usr(to_i2c_client(dev), usr) ? -EIO : count;
+	if (isl1208_i2c_set_usr(to_i2c_client(dev->parent), usr))
+		return -EIO;
+
+	return count;
 }
 
 static DEVICE_ATTR(usr, S_IRUGO | S_IWUSR, isl1208_sysfs_show_usr,
@@ -765,7 +768,6 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	rtc->ops = &isl1208_rtc_ops;
 
 	i2c_set_clientdata(client, rtc);
-	dev_set_drvdata(&rtc->dev, client);
 
 	rc = isl1208_i2c_get_sr(client);
 	if (rc < 0) {
@@ -804,7 +806,7 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		evdet_irq = of_irq_get_byname(np, "evdet");
 	}
 
-	rc = sysfs_create_group(&client->dev.kobj, &isl1208_rtc_sysfs_files);
+	rc = rtc_add_group(rtc, &isl1208_rtc_sysfs_files);
 	if (rc)
 		return rc;
 
@@ -821,14 +823,6 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	return rtc_register_device(rtc);
 }
 
-static int
-isl1208_remove(struct i2c_client *client)
-{
-	sysfs_remove_group(&client->dev.kobj, &isl1208_rtc_sysfs_files);
-
-	return 0;
-}
-
 static const struct i2c_device_id isl1208_id[] = {
 	{ "isl1208", TYPE_ISL1208 },
 	{ "isl1218", TYPE_ISL1218 },
@@ -851,7 +845,6 @@ static struct i2c_driver isl1208_driver = {
 		.of_match_table = of_match_ptr(isl1208_of_match),
 	},
 	.probe = isl1208_probe,
-	.remove = isl1208_remove,
 	.id_table = isl1208_id,
 };
 
Signature · 1 line
2.20.1
author maintainer
#445 lore raw

PATCH 412/422 rtc: tx4939: fixup nvmem name and register size

In reply to Greg Kroah-Hartman

From: Alexandre Belloni <[email protected]>

[ Upstream commit 2ab78755e93a10f6216c860a2012f3592f395603 ]

The default word_size and stride of 1 are correct for the tx4939. Also fix the nvmem folder name.

---
 drivers/rtc/rtc-tx4939.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-tx4939.c +1 -3
index 08dbefc79520e..61c110b2045f8 100644
@@ -253,9 +253,7 @@ static int __init tx4939_rtc_probe(struct platform_device *pdev)
 	struct resource *res;
 	int irq, ret;
 	struct nvmem_config nvmem_cfg = {
-		.name = "rv8803_nvram",
-		.word_size = 4,
-		.stride = 4,
+		.name = "tx4939_nvram",
 		.size = TX4939_RTC_REG_RAMSIZE,
 		.reg_read = tx4939_nvram_read,
 		.reg_write = tx4939_nvram_write,
Signature · 1 line
2.20.1
author maintainer
#446 lore raw

PATCH 413/422 rtc: armada38x: fix possible race condition

In reply to Greg Kroah-Hartman

From: Alexandre Belloni <[email protected]>

[ Upstream commit 7d61cbb945a753af08e247b5f10bdd5dbb8d6c80 ]

The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference.

Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ.

---
 drivers/rtc/rtc-armada38x.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/rtc/rtc-armada38x.c +11 -11
index bde53c8ccee2c..b74338d6dde60 100644
@@ -514,7 +514,6 @@ MODULE_DEVICE_TABLE(of, armada38x_rtc_of_match_table);
 
 static __init int armada38x_rtc_probe(struct platform_device *pdev)
 {
-	const struct rtc_class_ops *ops;
 	struct resource *res;
 	struct armada38x_rtc *rtc;
 	const struct of_device_id *match;
@@ -551,6 +550,11 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "no irq\n");
 		return rtc->irq;
 	}
+
+	rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
+	if (IS_ERR(rtc->rtc_dev))
+		return PTR_ERR(rtc->rtc_dev);
+
 	if (devm_request_irq(&pdev->dev, rtc->irq, armada38x_rtc_alarm_irq,
 				0, pdev->name, rtc) < 0) {
 		dev_warn(&pdev->dev, "Interrupt not available.\n");
@@ -560,28 +564,24 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
 
 	if (rtc->irq != -1) {
 		device_init_wakeup(&pdev->dev, 1);
-		ops = &armada38x_rtc_ops;
+		rtc->rtc_dev->ops = &armada38x_rtc_ops;
 	} else {
 		/*
 		 * If there is no interrupt available then we can't
 		 * use the alarm
 		 */
-		ops = &armada38x_rtc_ops_noirq;
+		rtc->rtc_dev->ops = &armada38x_rtc_ops_noirq;
 	}
 	rtc->data = (struct armada38x_rtc_data *)match->data;
 
-
 	/* Update RTC-MBUS bridge timing parameters */
 	rtc->data->update_mbus_timing(rtc);
 
-	rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, pdev->name,
-						ops, THIS_MODULE);
-	if (IS_ERR(rtc->rtc_dev)) {
-		ret = PTR_ERR(rtc->rtc_dev);
+	ret = rtc_register_device(rtc->rtc_dev);
+	if (ret)
 		dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
-		return ret;
-	}
-	return 0;
+
+	return ret;
 }
 
 #ifdef CONFIG_PM_SLEEP
Signature · 1 line
2.20.1
author maintainer
#447 lore raw

PATCH 414/422 netfilter: masquerade: dont flush all conntracks if only one address deleted on device

In reply to Greg Kroah-Hartman

From: Tan Hu <[email protected]>

[ Upstream commit 097f95d319f817e651bd51f8846aced92a55a6a1 ]

We configured iptables as below, which only allowed incoming data on established connections:

iptables -t mangle -A PREROUTING -m state --state ESTABLISHED -j ACCEPT iptables -t mangle -P PREROUTING DROP

When deleting a secondary address, current masquerade implements would flush all conntracks on this device. All the established connections on primary address also be deleted, then subsequent incoming data on the connections would be dropped wrongly because it was identified as NEW connection.

So when an address was delete, it should only flush connections related with the address.

---
 net/ipv4/netfilter/nf_nat_masquerade_ipv4.c | 22 ++++++++++++++++++---
 net/ipv6/netfilter/nf_nat_masquerade_ipv6.c | 19 +++++++++++++++---
 2 files changed, 35 insertions(+), 6 deletions(-)
net/ipv4/netfilter/nf_nat_masquerade_ipv4.c +19 -3
index 4c7fcd32f8e62..41327bb990932 100644
@@ -104,12 +104,26 @@ static int masq_device_event(struct notifier_block *this,
 	return NOTIFY_DONE;
 }
 
+static int inet_cmp(struct nf_conn *ct, void *ptr)
+{
+	struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;
+	struct net_device *dev = ifa->ifa_dev->dev;
+	struct nf_conntrack_tuple *tuple;
+
+	if (!device_cmp(ct, (void *)(long)dev->ifindex))
+		return 0;
+
+	tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple;
+
+	return ifa->ifa_address == tuple->dst.u3.ip;
+}
+
 static int masq_inet_event(struct notifier_block *this,
 			   unsigned long event,
 			   void *ptr)
 {
 	struct in_device *idev = ((struct in_ifaddr *)ptr)->ifa_dev;
-	struct netdev_notifier_info info;
+	struct net *net = dev_net(idev->dev);
 
 	/* The masq_dev_notifier will catch the case of the device going
 	 * down.  So if the inetdev is dead and being destroyed we have
@@ -119,8 +133,10 @@ static int masq_inet_event(struct notifier_block *this,
 	if (idev->dead)
 		return NOTIFY_DONE;
 
-	netdev_notifier_info_init(&info, idev->dev);
-	return masq_device_event(this, event, &info);
+	if (event == NETDEV_DOWN)
+		nf_ct_iterate_cleanup_net(net, inet_cmp, ptr, 0, 0);
+
+	return NOTIFY_DONE;
 }
 
 static struct notifier_block masq_dev_notifier = {
net/ipv6/netfilter/nf_nat_masquerade_ipv6.c +16 -3
index 37b1d413c825b..0ad0da5a26002 100644
@@ -87,18 +87,30 @@ static struct notifier_block masq_dev_notifier = {
 struct masq_dev_work {
 	struct work_struct work;
 	struct net *net;
+	struct in6_addr addr;
 	int ifindex;
 };
 
+static int inet_cmp(struct nf_conn *ct, void *work)
+{
+	struct masq_dev_work *w = (struct masq_dev_work *)work;
+	struct nf_conntrack_tuple *tuple;
+
+	if (!device_cmp(ct, (void *)(long)w->ifindex))
+		return 0;
+
+	tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple;
+
+	return ipv6_addr_equal(&w->addr, &tuple->dst.u3.in6);
+}
+
 static void iterate_cleanup_work(struct work_struct *work)
 {
 	struct masq_dev_work *w;
-	long index;
 
 	w = container_of(work, struct masq_dev_work, work);
 
-	index = w->ifindex;
-	nf_ct_iterate_cleanup_net(w->net, device_cmp, (void *)index, 0, 0);
+	nf_ct_iterate_cleanup_net(w->net, inet_cmp, (void *)w, 0, 0);
 
 	put_net(w->net);
 	kfree(w);
@@ -147,6 +159,7 @@ static int masq_inet6_event(struct notifier_block *this,
 		INIT_WORK(&w->work, iterate_cleanup_work);
 		w->ifindex = dev->ifindex;
 		w->net = net;
+		w->addr = ifa->addr;
 		schedule_work(&w->work);
 
 		return NOTIFY_DONE;
Signature · 1 line
2.20.1
author maintainer
#448 lore raw

PATCH 415/422 usb: xhci-mtk: fix ISOC error when interval is zero

In reply to Greg Kroah-Hartman

From: Chunfeng Yun <[email protected]>

[ Upstream commit 87173acc0d8f0987bda8827da35fff67f52ad15d ]

If the interval equal zero, needn't round up to power of two for the number of packets in each ESIT, so fix it.

---
 drivers/usb/host/xhci-mtk-sch.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-mtk-sch.c +3 -1
index fa33d6e5b1cbd..d04fdd173ed2e 100644
@@ -113,7 +113,9 @@ static void setup_sch_info(struct usb_device *udev,
 		}
 
 		if (ep_type == ISOC_IN_EP || ep_type == ISOC_OUT_EP) {
-			if (esit_pkts <= sch_ep->esit)
+			if (sch_ep->esit == 1)
+				sch_ep->pkts = esit_pkts;
+			else if (esit_pkts <= sch_ep->esit)
 				sch_ep->pkts = 1;
 			else
 				sch_ep->pkts = roundup_pow_of_two(esit_pkts)
Signature · 1 line
2.20.1
author maintainer
#449 lore raw

PATCH 416/422 usb: usbtmc: uninitialized symbol actual in usbtmc_ioctl_clear

In reply to Greg Kroah-Hartman

From: Guido Kiener <[email protected]>

[ Upstream commit 9a83190300867fb024d53f47c31088e34188efc1 ]

Fix uninitialized symbol 'actual' in function usbtmc_ioctl_clear.

When symbol 'actual' is not initialized and usb_bulk_msg() fails, the subsequent kernel debug message shows a random value.

Fixes dfee02ac4bce ("usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR")
---
 drivers/usb/class/usbtmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/class/usbtmc.c +1 -0
index 3ce45c9e9d20d..e6a7c86b70f25 100644
@@ -1016,6 +1016,7 @@ usbtmc_clear_check_status:
 		do {
 			dev_dbg(dev, "Reading from bulk in EP\n");
 
+			actual = 0;
 			rv = usb_bulk_msg(data->usb_dev,
 					  usb_rcvbulkpipe(data->usb_dev,
 							  data->bulk_in),
Signature · 1 line
2.20.1
author maintainer
#450 lore raw

PATCH 417/422 fuse: use READ_ONCE on congestion_threshold and max_background

In reply to Greg Kroah-Hartman

From: Kirill Tkhai <[email protected]>

[ Upstream commit 2a23f2b8adbe4bd584f936f7ac17a99750eed9d7 ]

Since they are of unsigned int type, it's allowed to read them unlocked during reporting to userspace. Let's underline this fact with READ_ONCE() macroses.

---
 fs/fuse/control.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/fuse/control.c +2 -2
index 0b694655d9880..acc35819aae64 100644
@@ -107,7 +107,7 @@ static ssize_t fuse_conn_max_background_read(struct file *file,
 	if (!fc)
 		return 0;
 
-	val = fc->max_background;
+	val = READ_ONCE(fc->max_background);
 	fuse_conn_put(fc);
 
 	return fuse_conn_limit_read(file, buf, len, ppos, val);
@@ -144,7 +144,7 @@ static ssize_t fuse_conn_congestion_threshold_read(struct file *file,
 	if (!fc)
 		return 0;
 
-	val = fc->congestion_threshold;
+	val = READ_ONCE(fc->congestion_threshold);
 	fuse_conn_put(fc);
 
 	return fuse_conn_limit_read(file, buf, len, ppos, val);
Signature · 1 line
2.20.1
author maintainer
#451 lore raw

PATCH 418/422 IB/iser: Fix possible NULL deref at iser_inv_desc()

In reply to Greg Kroah-Hartman

From: Israel Rukshin <[email protected]>

[ Upstream commit 65f07f5a09dacf3b60619f196f096ea3671a5eda ]

In case target remote invalidates bogus rkey and signature is not used, pi_ctx is NULL deref.

The commit also fails the connection on bogus remote invalidation.

Fixes 59caaed7a72a ("IB/iser: Support the remote invalidation exception")
---
 drivers/infiniband/ulp/iser/iser_initiator.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
drivers/infiniband/ulp/iser/iser_initiator.c +13 -5
index 2f6388596f886..96af06cfe0afd 100644
@@ -589,13 +589,19 @@ void iser_login_rsp(struct ib_cq *cq, struct ib_wc *wc)
 	ib_conn->post_recv_buf_count--;
 }
 
-static inline void
+static inline int
 iser_inv_desc(struct iser_fr_desc *desc, u32 rkey)
 {
-	if (likely(rkey == desc->rsc.mr->rkey))
+	if (likely(rkey == desc->rsc.mr->rkey)) {
 		desc->rsc.mr_valid = 0;
-	else if (likely(rkey == desc->pi_ctx->sig_mr->rkey))
+	} else if (likely(desc->pi_ctx && rkey == desc->pi_ctx->sig_mr->rkey)) {
 		desc->pi_ctx->sig_mr_valid = 0;
+	} else {
+		iser_err("Bogus remote invalidation for rkey %#x\n", rkey);
+		return -EINVAL;
+	}
+
+	return 0;
 }
 
 static int
@@ -623,12 +629,14 @@ iser_check_remote_inv(struct iser_conn *iser_conn,
 
 			if (iser_task->dir[ISER_DIR_IN]) {
 				desc = iser_task->rdma_reg[ISER_DIR_IN].mem_h;
-				iser_inv_desc(desc, rkey);
+				if (unlikely(iser_inv_desc(desc, rkey)))
+					return -EINVAL;
 			}
 
 			if (iser_task->dir[ISER_DIR_OUT]) {
 				desc = iser_task->rdma_reg[ISER_DIR_OUT].mem_h;
-				iser_inv_desc(desc, rkey);
+				if (unlikely(iser_inv_desc(desc, rkey)))
+					return -EINVAL;
 			}
 		} else {
 			iser_err("failed to get task for itt=%d\n", hdr->itt);
Signature · 1 line
2.20.1
author maintainer
#452 lore raw

PATCH 419/422 media: ov2680: fix null dereference at power on

In reply to Greg Kroah-Hartman

From: Rui Miguel Silva <[email protected]>

[ Upstream commit c45fbdf24c61a7b7a37f1b3bbd46f054637a3627 ]

Swapping the order between v4l2 subdevice registration and checking chip id in b7a417628abf ("media: ov2680: don't register the v4l2 subdevice before checking chip ID") makes the mode restore to use the sensor controls before they are set, so move the mode restore call to s_power after the handler setup for controls is done.

This remove also the need for the error code path in power on function.

Fixes b7a417628abf ("media: ov2680: don't register the v4l2 subdevice before checking chip ID")
---
 drivers/media/i2c/ov2680.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/media/i2c/ov2680.c +2 -10
index 3ccd584568fb5..d8798fb714ba8 100644
@@ -568,10 +568,6 @@ static int ov2680_power_on(struct ov2680_dev *sensor)
 	if (ret < 0)
 		return ret;
 
-	ret = ov2680_mode_restore(sensor);
-	if (ret < 0)
-		goto disable;
-
 	sensor->is_enabled = true;
 
 	/* Set clock lane into LP-11 state */
@@ -580,12 +576,6 @@ static int ov2680_power_on(struct ov2680_dev *sensor)
 	ov2680_stream_disable(sensor);
 
 	return 0;
-
-disable:
-	dev_err(dev, "failed to enable sensor: %d\n", ret);
-	ov2680_power_off(sensor);
-
-	return ret;
 }
 
 static int ov2680_s_power(struct v4l2_subdev *sd, int on)
@@ -606,6 +596,8 @@ static int ov2680_s_power(struct v4l2_subdev *sd, int on)
 		ret = v4l2_ctrl_handler_setup(&sensor->ctrls.handler);
 		if (ret < 0)
 			return ret;
+
+		ret = ov2680_mode_restore(sensor);
 	}
 
 	return ret;
Signature · 1 line
2.20.1
author maintainer
#453 lore raw

PATCH 420/422 s390/vdso: correct vdso mapping for compat tasks

In reply to Greg Kroah-Hartman

From: Vasily Gorbik <[email protected]>

[ Upstream commit 190f056fba230abee80712eb810939ef9a8c462f ]

While "s390/vdso: avoid 64-bit vdso mapping for compat tasks" fixed 64-bit vdso mapping for compat tasks under gdb it introduced another problem. "compat_mm" flag is not inherited during fork and when 31-bit process forks a child (but does not perform exec) it ends up with 64-bit vdso. To address that, init_new_context (which is called during fork and exec) now initialize compat_mm based on thread TIF_31BIT flag. Later compat_mm is adjusted in arch_setup_additional_pages, which is called during exec.

Fixes d1befa65823e ("s390/vdso: avoid 64-bit vdso mapping for compat tasks")
Cc <[email protected]> # v4.20+
---
 arch/s390/include/asm/mmu_context.h | 2 +-
 arch/s390/kernel/vdso.c             | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)
arch/s390/include/asm/mmu_context.h +1 -1
index e4462202200d7..8d04e6f3f7964 100644
@@ -25,7 +25,7 @@ static inline int init_new_context(struct task_struct *tsk,
 	atomic_set(&mm->context.flush_count, 0);
 	mm->context.gmap_asce = 0;
 	mm->context.flush_mm = 0;
-	mm->context.compat_mm = 0;
+	mm->context.compat_mm = test_thread_flag(TIF_31BIT);
 #ifdef CONFIG_PGSTE
 	mm->context.alloc_pgste = page_table_allocate_pgste ||
 		test_thread_flag(TIF_PGSTE) ||
arch/s390/kernel/vdso.c +2 -3
index ec31b48a42a52..7ab7d256d1eb7 100644
@@ -224,10 +224,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
 
 	vdso_pages = vdso64_pages;
 #ifdef CONFIG_COMPAT
-	if (is_compat_task()) {
+	mm->context.compat_mm = is_compat_task();
+	if (mm->context.compat_mm)
 		vdso_pages = vdso32_pages;
-		mm->context.compat_mm = 1;
-	}
 #endif
 	/*
 	 * vDSO has a problem and was disabled, just don't "enable" it for
Signature · 1 line
2.20.1
author maintainer
#454 lore raw

PATCH 421/422 net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused

In reply to Greg Kroah-Hartman

From: Arnd Bergmann <[email protected]>

[ Upstream commit 9b97123a584f60a5bca5a2663485768a1f6cd0a4 ]

The newly added runtime-pm support causes a harmless warning when CONFIG_PM is disabled:

drivers/net/phy/mdio-bcm-unimac.c:330:12: error: 'unimac_mdio_resume' defined but not used [-Werror=unused-function]
static int unimac_mdio_resume(struct device *d)
drivers/net/phy/mdio-bcm-unimac.c:321:12: error: 'unimac_mdio_suspend' defined but not used [-Werror=unused-function]
static int unimac_mdio_suspend(struct device *d)

Marking the functions as __maybe_unused is the easiest workaround and avoids adding #ifdef checks.

Fixes b78ac6ecd1b6 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider")
---
 drivers/net/phy/mdio-bcm-unimac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/mdio-bcm-unimac.c +2 -2
index 80b9583eaa952..df75efa96a7d9 100644
@@ -318,7 +318,7 @@ static int unimac_mdio_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int unimac_mdio_suspend(struct device *d)
+static int __maybe_unused unimac_mdio_suspend(struct device *d)
 {
 	struct unimac_mdio_priv *priv = dev_get_drvdata(d);
 
@@ -327,7 +327,7 @@ static int unimac_mdio_suspend(struct device *d)
 	return 0;
 }
 
-static int unimac_mdio_resume(struct device *d)
+static int __maybe_unused unimac_mdio_resume(struct device *d)
 {
 	struct unimac_mdio_priv *priv = dev_get_drvdata(d);
 	int ret;
Signature · 1 line
2.20.1
author maintainer
#455 lore raw

PATCH 422/422 memfd: Use radix_tree_deref_slot_protected to avoid the warning.

In reply to Greg Kroah-Hartman

From: zhong jiang <[email protected]>

The commit 99b45e7a1ba1 ("memfd: Fix locking when tagging pins") introduces the following warning messages.

*WARNING: suspicious RCU usage in memfd_wait_for_pins*

It is because we still use radix_tree_deref_slot without read_rcu_lock. We should use radix_tree_deref_slot_protected instead in the case.

Fixes 99b45e7a1ba1 ("memfd: Fix locking when tagging pins")
---
 mm/memfd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memfd.c +1 -1
@@ -41,7 +41,7 @@ static void memfd_tag_pins(struct addres
 
 	xa_lock_irq(&mapping->i_pages);
 	radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) {
-		page = radix_tree_deref_slot(slot);
+		page = radix_tree_deref_slot_protected(slot, &mapping->i_pages.xa_lock);
 		if (!page || radix_tree_exception(page)) {
 			if (radix_tree_deref_retry(page)) {
 				slot = radix_tree_iter_retry(&iter);
#456 lore raw
In reply to Greg Kroah-Hartman

Hello Greg, all,

Quoted 8 lines

From: stable-owner at vger.kernel.org <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release (1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions of Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285/artifacts/file/output/4.19.85-rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o
3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o
3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_remove_one':
3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o

I haven't tried to trace the issue further yet, sorry.

Kind regards, Chris

Quoted 1,830 lines

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-
4.19.85-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

    Linux 4.19.85-rc1

zhong jiang <[email protected]>
memfd: Use radix_tree_deref_slot_protected to avoid the warning.

Arnd Bergmann <[email protected]>
net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused

Vasily Gorbik <[email protected]>
s390/vdso: correct vdso mapping for compat tasks

Rui Miguel Silva <[email protected]>
media: ov2680: fix null dereference at power on

Israel Rukshin <[email protected]>
IB/iser: Fix possible NULL deref at iser_inv_desc()

Kirill Tkhai <[email protected]>
fuse: use READ_ONCE on congestion_threshold and max_background

Guido Kiener <[email protected]>
usb: usbtmc: uninitialized symbol 'actual' in usbtmc_ioctl_clear

Chunfeng Yun <[email protected]>
usb: xhci-mtk: fix ISOC error when interval is zero

Tan Hu <[email protected]>
netfilter: masquerade: don't flush all conntracks if only one address deleted on
device

Alexandre Belloni <[email protected]>
rtc: armada38x: fix possible race condition

Alexandre Belloni <[email protected]>
rtc: tx4939: fixup nvmem name and register size

Alexandre Belloni <[email protected]>
rtc: isl1208: avoid possible sysfs race

Rob Herring <[email protected]>
ARM: dts: lpc32xx: Fix SPI controller node names

Rob Herring <[email protected]>
arm64: dts: lg: Fix SPI controller node names

Rob Herring <[email protected]>
arm64: dts: amd: Fix SPI bus warnings

Finn Thain <[email protected]>
scsi: NCR5380: Check for bus reset

Finn Thain <[email protected]>
scsi: NCR5380: Handle BUS FREE during reselection

Finn Thain <[email protected]>
scsi: NCR5380: Don't call dsprintk() following reselection interrupt

Finn Thain <[email protected]>
scsi: NCR5380: Don't clear busy flag when abort fails

Finn Thain <[email protected]>
scsi: NCR5380: Check for invalid reselection target

Finn Thain <[email protected]>
scsi: NCR5380: Use DRIVER_SENSE to indicate valid sense data

Finn Thain <[email protected]>
scsi: NCR5380: Withhold disconnect privilege for REQUEST SENSE

Finn Thain <[email protected]>

    scsi: NCR5380: Have NCR5380_select() return a bool

Hannes Reinecke <[email protected]>
scsi: NCR5380: Clear all unissued commands on host reset

Ilan Peer <[email protected]>
iwlwifi: mvm: Allow TKIP for AP mode

Sara Sharon <[email protected]>
iwlwifi: mvm: use correct FIFO length

Golan Ben Ami <[email protected]>
iwlwifi: pcie: fit reclaim msg to MAX_MSG_LEN

Johannes Berg <[email protected]>
iwlwifi: pcie: gen2: build A-MSDU only for GSO

Johannes Berg <[email protected]>
iwlwifi: api: annotate compressed BA notif array sizes

Sara Sharon <[email protected]>
iwlwifi: pcie: read correct prph address for newer devices

Erel Geron <[email protected]>
iwlwifi: fix non_shared_ant for 22000 devices

Emmanuel Grumbach <[email protected]>
iwlwifi: dbg: don't crash if the firmware crashes in the middle of a debug dump

Dan Aloni <[email protected]>
crypto: fix a memory leak in rsa-kcs1pad's encryption mode

Christoph Manszewski <[email protected]>
crypto: s5p-sss: Fix Fix argument list alignment

Christoph Manszewski <[email protected]>
crypto: s5p-sss: Fix race in error handling

Dexuan Cui <[email protected]>
x86/hyperv: Suppress "PCI: Fatal: No config space access function found"

Sanjay Kumar Konduri <[email protected]>
Bluetooth: btrsi: fix bt tx timeout issue

Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS

Balakrishna Godavarthi <[email protected]>
Bluetooth: hci_serdev: clear HCI_UART_PROTO_READY to avoid closing proto
races

Stuart Hayes <[email protected]>
firmware: dell_rbu: Make payload memory uncachable

Rob Herring <[email protected]>
ARM: dts: realview: Fix SPI controller node names

Justin Ernst <[email protected]>
EDAC: Raise the maximum number of memory controllers

Arnd Bergmann <[email protected]>
RDMA: Fix dependencies for rdma_user_mmap_io

Chao Yu <[email protected]>
f2fs: mark inode dirty explicitly in recover_inode()

Chao Yu <[email protected]>
f2fs: fix to recover inode's project id during POR

Jaegeuk Kim <[email protected]>
f2fs: update i_size after DIO completion

Keith Busch <[email protected]>
PCI/ERR: Run error recovery callbacks for all affected devices

YueHaibing <[email protected]>
net: faraday: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: smsc: fix return type of ndo_start_xmit function

Marc Dietrich <[email protected]>
ARM: dts: paz00: fix wakeup gpio keycode

Marcel Ziswiler <[email protected]>
ARM: tegra: colibri_t30: fix mcp2515 can controller interrupt polarity

Marcel Ziswiler <[email protected]>
ARM: tegra: apalis_t30: fix mcp2515 can controller interrupt polarity

Marcel Ziswiler <[email protected]>
ARM: tegra: apalis_t30: fix mmc1 cmd pull-up

Marcel Ziswiler <[email protected]>
ARM: dts: tegra20: restore address order

Marcel Ziswiler <[email protected]>
ARM: dts: tegra30: fix xcvr-setup-use-fuses

Thierry Reding <[email protected]>
arm64: tegra: I2C on Tegra194 is not compatible with Tegra114

Fabio Estevam <[email protected]>
ARM: dts: imx51-zii-rdu1: Fix the rtc compatible string

Rob Herring <[email protected]>
arm64: dts: fsl: Fix I2C and SPI bus warnings

Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: odroidc1: enable the SAR ADC

Hauke Mehrtens <[email protected]>
phy: lantiq: Fix compile warning

Chengguang Xu <[email protected]>
f2fs: fix remount problem of option io_bits

Jason Yan <[email protected]>
scsi: libsas: always unregister the old device if going to discover new

Nathan Chancellor <[email protected]>
iw_cxgb4: Use proper enumerated type in c4iw_bar2_addrs

Alex Williamson <[email protected]>
vfio/pci: Mask buggy SR-IOV VF INTx support

Li Qiang <[email protected]>
vfio/pci: Fix potential memory leak in vfio_msi_cap_len

Stephen Hemminger <[email protected]>
vmbus: keep pointer to ring buffer page

zhong jiang <[email protected]>
misc: genwqe: should return proper error value.

Laura Abbott <[email protected]>
misc: kgdbts: Fix restrict error

Srinivas Kandagatla <[email protected]>
silmbus: ngd: register controller after power up.

Srinivas Kandagatla <[email protected]>
slimbus: ngd: return proper error code instead of zero

Srinivas Kandagatla <[email protected]>
slimbus: ngd: register ngd driver only once.

Suzuki K Poulose <[email protected]>
coresight: dynamic-replicator: Handle multiple connections

Leo Yan <[email protected]>
coresight: tmc: Fix byte-address alignment for RRP

Tomasz Nowicki <[email protected]>
coresight: etm4x: Configure EL2 exception level when kernel is running in HYP

Suzuki K Poulose <[email protected]>
coresight: tmc-etr: Handle driver mode specific ETR buffers

Suzuki K Poulose <[email protected]>
coresight: perf: Disable trace path upon source error

Suzuki K Poulose <[email protected]>
coresight: perf: Fix per cpu path management

Suzuki K Poulose <[email protected]>
coresight: Fix handling of sinks

zhong jiang <[email protected]>
coresight: Use ERR_CAST instead of ERR_PTR

Laurent Pinchart <[email protected]>
usb: gadget: uvc: Only halt video streaming endpoint in bulk mode

Laurent Pinchart <[email protected]>
usb: gadget: uvc: Factor out video USB request queueing

Anson Huang <[email protected]>
ARM: dts: imx6ull: update vdd_soc voltage for 900MHz operating point

Andreas Kemnade <[email protected]>
phy: phy-twl4030-usb: fix denied runtime access

Yoshihiro Shimoda <[email protected]>
phy: renesas: rcar-gen3-usb2: fix vbus_ctrl for role sysfs

Florian Fainelli <[email protected]>
phy: brcm-sata: allow PHY_BRCM_SATA driver to be built for DSL SoCs

zhong jiang <[email protected]>
ARM: at91: pm: call put_device instead of of_node_put in
at91_pm_config_ws

Ricardo Ribalda Delgado <[email protected]>
gpiolib: Fix gpio_direction_* for single direction GPIOs

Brendan Higgins <[email protected]>
i2c: aspeed: fix invalid clock parameters for very large divisors

Marek Szyprowski <[email protected]>
ARM: dts: exynos: Correct audio subsystem parent clock on Peach
Chromebooks

Paul Elder <[email protected]>
usb: gadget: uvc: configfs: Sort frame intervals upon writing

Joel Pepper <[email protected]>
usb: gadget: uvc: configfs: Prevent format changes after linking header

Laurent Pinchart <[email protected]>
usb: gadget: uvc: configfs: Drop leaked references to config items

Heiko Stuebner <[email protected]>
ARM: dts: rockchip: explicitly set vcc_sd0 pin to gpio on rk3188-radxarock

Nathan Chancellor <[email protected]>
media: davinci: Fix implicit enum conversion warning

Brad Love <[email protected]>
media: au0828: Fix incorrect error messages

Jia-Ju Bai <[email protected]>
media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()

Arnd Bergmann <[email protected]>
media: imx: work around false-positive warning, again

Petr Machata <[email protected]>
mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement

Vicente Bergas <[email protected]>
arm64: dts: rockchip: Fix microSD in rk3399 sapphire board

Dengcheng Zhu <[email protected]>
MIPS: kexec: Relax memory restriction

Qiuxu Zhuo <[email protected]>
EDAC: Correct DIMM capacity unit symbol

Matthew Whitehead <[email protected]>
x86/CPU: Change query logic so CPUID is enabled before testing

Matthew Whitehead <[email protected]>
x86/CPU: Use correct macros for Cyrix calls

YueHaibing <[email protected]>
net: freescale: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: micrel: fix return type of ndo_start_xmit function

Florian Fainelli <[email protected]>
net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider

Prashant Bhole <[email protected]>
samples/bpf: fix compilation failure

Keith Busch <[email protected]>
PCI/ERR: Use slot reset if available

Keith Busch <[email protected]>
PCI/AER: Don't read upstream ports below fatal errors

Keith Busch <[email protected]>
PCI/AER: Take reference on error devices

Shahed Shaikh <[email protected]>
bnx2x: Ignore bandwidth attention in single function mode

Rob Herring <[email protected]>
ARM: dts: stm32: Fix SPI controller node names

Baruch Siach <[email protected]>
ARM: dts: clearfog: fix sdhci supply property name

Yannick Fertr? <[email protected]>
ARM: dts: stm32: enable display on stm32mp157c-ev1 board

Borislav Petkov <[email protected]>
x86/mce-inject: Reset injection struct after injection

Rob Herring <[email protected]>
ARM: dts: marvell: Fix SPI and I2C bus warnings

Stefan Agner <[email protected]>
crypto: arm/crc32 - avoid warning when compiling with Clang

Stefan Agner <[email protected]>
cpufeature: avoid warning when compiling with clang

Eric Biggers <[email protected]>
crypto: chacha20 - Fix chacha20_block() keystream alignment (again)

Nathan Chancellor <[email protected]>
spi: pic32: Use proper enum in dmaengine_prep_slave_rg

Rob Herring <[email protected]>
ARM: dts: ste: Fix SPI controller node names

Linus Walleij <[email protected]>
ARM: dts: ux500: Fix LCDA clock line muxing

Geert Uytterhoeven <[email protected]>
ARM: dts: ux500: Correct SCU unit address

Chao Yu <[email protected]>
f2fs: fix to recover inode's uid/gid during POR

Jaegeuk Kim <[email protected]>
f2fs: avoid infinite loop in f2fs_alloc_nid

Rob Herring <[email protected]>
ARM: dts: ti: Fix SPI and I2C bus warnings

Grygorii Strashko <[email protected]>
ARM: dts: am335x-evm: fix number of cpsw

Keith Busch <[email protected]>
PCI: portdrv: Initialize service drivers directly

Petr Machata <[email protected]>
mlxsw: spectrum: Init shaper for TCs 8..15

Takashi Iwai <[email protected]>
brcmsmac: Use kvmalloc() for ucode allocations

Arend van Spriel <[email protected]>
brcmfmac: increase buffer for obtaining firmware capabilities

Vasily Gorbik <[email protected]>
s390/vdso: correct CFI annotations of vDSO functions

Vasily Gorbik <[email protected]>
s390/vdso: avoid 64-bit vdso mapping for compat tasks

Halil Pasic <[email protected]>
s390/zcrypt: enable AP bus scan without a valid default domain

Guido Kiener <[email protected]>
usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_OUT

Loic Poulain <[email protected]>
usb: chipidea: Fix otg event handler

Nicolas Adell <[email protected]>
usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already
started

Jakub Kicinski <[email protected]>
nfp: provide a better warning when ring allocation fails

Jian Shen <[email protected]>
net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg()

Jian Shen <[email protected]>
net: hns3: Fix client initialize state issue when roce client initialize failed

Jian Shen <[email protected]>
net: hns3: Clear client pointer when initialize client failed or unintialize finished

Jian Shen <[email protected]>
net: hns3: Fix cmdq registers initialization issue for vf

Fuyun Liang <[email protected]>
net: hns3: Fix for setting speed for phy failed problem

YueHaibing <[email protected]>
net: sun: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: amd: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: broadcom: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: xilinx: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: toshiba: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: marvell: fix return type of ndo_start_xmit function

Antoine Tenart <[email protected]>
net: mvpp2: fix the number of queues per cpu for PPv2.2

Andreas Kemnade <[email protected]>
power: supply: twl4030_charger: disable eoc interrupt on linear charge

Andreas Kemnade <[email protected]>
power: supply: twl4030_charger: fix charging current out-of-bounds

Rob Herring <[email protected]>
libfdt: Ensure INT_MAX is defined in libfdt_env.h

Rob Herring <[email protected]>
of/unittest: Fix I2C bus unit-address error

Viresh Kumar <[email protected]>
OPP: Protect dev_list with opp_table lock

Rob Herring <[email protected]>
ARM: dts: atmel: Fix I2C and SPI bus warnings

H?kon Bugge <[email protected]>
RDMA/i40iw: Fix incorrect iterator type

Anton Blanchard <[email protected]>
powerpc: Fix duplicate const clang warning in user access code

Nathan Fontenot <[email protected]>
powerpc/pseries: Disable CPU hotplug across migrations

Nathan Fontenot <[email protected]>
powerpc/pseries/memory-hotplug: Only update DT once per memory DLPAR
request

Nicholas Piggin <[email protected]>
powerpc/64s/hash: Fix stab_rr off by one initialization

Breno Leitao <[email protected]>
selftests/powerpc: Do not fail with reschedule

Breno Leitao <[email protected]>
powerpc/iommu: Avoid derefence before pointer check

YueHaibing <[email protected]>
net: ibm: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: cavium: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
net: hns3: fix return type of ndo_start_xmit function

YueHaibing <[email protected]>
ipmi: fix return value of ipmi_set_my_LUN

Corey Minyard <[email protected]>
ipmi:dmi: Ignore IPMI SMBIOS entries with a zero base address

Colin Ian King <[email protected]>
ipmi_si: fix potential integer overflow on large shift

Meelis Roos <[email protected]>
ipmi_si_pci: fix NULL device in ipmi_si error message

Shuming Fan <[email protected]>
ASoC: rt5682: Fix the boost volume at the begining of playback

Peter Shih <[email protected]>
spi: mediatek: Don't modify spi_transfer when transfer.

Jonas Gorski <[email protected]>
spi/bcm63xx-hsspi: keep pll clk enabled

Yonghong Song <[email protected]>
samples/bpf: fix a compilation failure

Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: k3-am65: Change #address-cells and #size-cells of interconnect
to 2

Douglas Anderson <[email protected]>
tty: serial: qcom_geni_serial: Fix serial when not used as console

Anton Vasilyev <[email protected]>
serial: mxs-auart: Fix potential infinite loop

Marek Szyprowski <[email protected]>
serial: samsung: Enable baud clock for UART reset procedure in resume

Nava kishore Manne <[email protected]>
serial: uartps: Fix suspend functionality

Rob Herring <[email protected]>
ARM: dts: xilinx: Fix I2C and SPI bus warnings

Gustavo A. R. Silva <[email protected]>
PCI: mediatek: Fix unchecked return value

Jia-Ju Bai <[email protected]>
net: socionext: Fix two sleep-in-atomic-context bugs in ave_rxfifo_reset()

Sinan Kaya <[email protected]>
PCI/ACPI: Correct error message for ASPM disabling

Javier Martinez Canillas <[email protected]>
media: ov2680: don't register the v4l2 subdevice before checking chip ID

Koji Matsuoka <[email protected]>
media: vsp1: Fix YCbCr planar formats pitch calculation

Laurent Pinchart <[email protected]>
media: vsp1: Fix vsp1_regs.h license header

Julian Wiedmann <[email protected]>
s390/qeth: invoke softirqs after napi_schedule()

Julian Wiedmann <[email protected]>
s390/qeth: uninstall IRQ handler on device removal

Dan Carpenter <[email protected]>
ath9k: Fix a locking bug in ath9k_add_interface()

Florian Westphal <[email protected]>
netfilter: nf_tables: avoid BUG_ON usage

Hans de Goede <[email protected]>
ACPI / LPSS: Exclude I2C busses shared with PUNIT from pmc_atom_d3_mask

Rob Herring <[email protected]>
arm64: dts: rockchip: Fix I2C bus unit-address error on rk3399-puma-haikou

Rob Herring <[email protected]>
ARM: dts: rockchip: Fix erroneous SPI bus dtc warnings on rk3036

Vivek Gautam <[email protected]>
scsi: ufshcd: Fix NULL pointer dereference for in ufshcd_init

Haishuang Yan <[email protected]>
ip_gre: fix parsing gre header in ipgre_err

Bernd Edlinger <[email protected]>
kernfs: Fix range checks in kernfs_get_target_path

Banajit Goswami <[email protected]>
component: fix loop condition to call unbind() if bind() fails

Tomasz Figa <[email protected]>
power: supply: max8998-charger: Fix platform data retrieval

Claudiu Beznea <[email protected]>
power: reset: at91-poweroff: do not procede if at91_shdwc is allocated

Dan Carpenter <[email protected]>
power: supply: ab8500_fg: silence uninitialized variable warnings

Rob Herring <[email protected]>
arm64: dts: meson: Fix erroneous SPI bus warnings

Paolo Valente <[email protected]>
blok, bfq: do not plug I/O if all queues are weight-raised

Paolo Valente <[email protected]>
block, bfq: inject other-queue I/O into seeky idle queues on NCQ flash

Hari Vyas <[email protected]>
arm64: fix for bad_mode() handler to always result in panic

Ganesh Goudar <[email protected]>
cxgb4: Fix endianness issue in t4_fwcache()

Sherry Yang <[email protected]>
android: binder: no outgoing transaction when thread todo has transaction

Rob Herring <[email protected]>
ARM: dts: sun9i: Fix I2C bus warnings

Ludovic Desroches <[email protected]>
pinctrl: at91: don't use the same irqchip with multiple gpiochips

Rob Herring <[email protected]>
ARM: dts: sunxi: Fix I2C bus warnings

Dinh Nguyen <[email protected]>
ARM: dts: socfpga: Fix I2C bus unit-address error

Alan Modra <[email protected]>
powerpc/vdso: Correct call frame information

Rob Herring <[email protected]>
ARM: dts: aspeed: Fix I2C bus warnings

Rob Herring <[email protected]>
ARM: dts: bcm: Fix SPI bus warnings

Rob Herring <[email protected]>
arm64: dts: broadcom: Fix I2C and SPI bus warnings

Lina Iyer <[email protected]>
drivers: qcom: rpmh-rsc: clear wait_for_compl after use

Niklas Cassel <[email protected]>
soc: qcom: apr: Avoid string overflow

Niklas Cassel <[email protected]>
soc: qcom: wcnss_ctrl: Avoid string overflow

Douglas Anderson <[email protected]>
soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples

Douglas Anderson <[email protected]>
soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()

Christian Lamparter <[email protected]>
ARM: dts: qcom: ipq4019: fix cpu0's qcom,saw2 reg value

Cong Wang <[email protected]>
llc: avoid blocking in llc_sap_close()

Dan Carpenter <[email protected]>
pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()

Geert Uytterhoeven <[email protected]>

    arm64: dts: renesas: r8a77965: Fix clock/reset for usb2_phy1

Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r8a77965: Fix HS-USB compatible

Magnus Damm <[email protected]>
arm64: dts: renesas: r8a77965: Attach the SYS-DMAC to the IPMMU

Kieran Bingham <[email protected]>
arm64: dts: renesas: salvator-common: adv748x: Override secondary
addresses

Takashi Iwai <[email protected]>
ALSA: intel8x0m: Register irq handler after register initializations

Neil Armstrong <[email protected]>
arm64: dts: meson-axg: use the proper compatible for ethmac

Jerome Brunet <[email protected]>
arm64: dts: meson: libretech: update board model

Andrew Lunn <[email protected]>
net: bcmgenet: Fix speed selection for reverse MII

Arnd Bergmann <[email protected]>
media: dvb: fix compat ioctl translation

Lao Wei <[email protected]>
media: fix: media: pci: meye: validate offset to avoid arbitrary access

Mark Brown <[email protected]>
ALSA: hda: Fix implicit definition of pci_iomap() on SH

Geert Uytterhoeven <[email protected]>
media: dt-bindings: adv748x: Fix decimal unit addresses

Srinivas Kandagatla <[email protected]>
nvmem: core: return error code instead of NULL from nvmem_device_get

Michael Kelley <[email protected]>
Drivers: hv: vmbus: Fix synic per-cpu context initialization

Yana Esina <[email protected]>
net: aquantia: fix hw_atl_utils_fw_upload_dwords

Masami Hiramatsu <[email protected]>
kprobes: Don't call BUG_ON() if there is a kprobe in use on free list

Deepak Ukey <[email protected]>

    scsi: pm80xx: Fixed system hang issue during kexec boot

Deepak Ukey <[email protected]>

    scsi: pm80xx: Corrected dma_unmap_sg() parameter

Oleksij Rempel <[email protected]>
ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set

George Kennedy <[email protected]>
scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()

James Smart <[email protected]>
scsi: lpfc: Fix errors in log messages.

James Smart <[email protected]>
scsi: lpfc: Correct invalid EQ doorbell write on if_type=6

James Smart <[email protected]>
scsi: lpfc: Fix GFT_ID and PRLI logic for RSCN

Quinn Tran <[email protected]>
scsi: qla2xxx: Fix duplicate switch's Nport ID entries

Quinn Tran <[email protected]>
scsi: qla2xxx: Fix dropped srb resource.

Quinn Tran <[email protected]>
scsi: qla2xxx: Fix port speed display on chip reset

Sawan Chandak <[email protected]>
scsi: qla2xxx: Check for Register disconnect

Quinn Tran <[email protected]>
scsi: qla2xxx: Increase abort timeout value

Quinn Tran <[email protected]>
scsi: qla2xxx: Fix deadlock between ATIO and HW lock

Quinn Tran <[email protected]>
scsi: qla2xxx: Terminate Plogi/PRLI if WWN is 0

Quinn Tran <[email protected]>
scsi: qla2xxx: Defer chip reset until target mode is enabled

Quinn Tran <[email protected]>
scsi: qla2xxx: Fix iIDMA error

Quinn Tran <[email protected]>
scsi: qla2xxx: Use correct qpair for ABTS/CMD

Wang Shilong <[email protected]>
f2fs: fix setattr project check upon fssetxattr ioctl

Chao Yu <[email protected]>
f2fs: fix memory leak of percpu counter in fill_super()

Chao Yu <[email protected]>
f2fs: fix memory leak of write_io in fill_super()

Eric W. Biederman <[email protected]>
signal: Properly deliver SIGSEGV from x86 uprobes

Eric W. Biederman <[email protected]>
signal: Properly deliver SIGILL from uprobes

Eric W. Biederman <[email protected]>
signal: Always ignore SIGKILL and SIGSTOP sent to the global init

Michael J. Ruhl <[email protected]>
IB/hfi1: Missing return value in error path for user sdma

Dan Carpenter <[email protected]>
RDMA/hns: Fix an error code in hns_roce_v2_init_eq_table()

Dan Carpenter <[email protected]>
dmaengine: at_xdmac: remove a stray bottom half unlock

Felix Fietkau <[email protected]>
ath9k: add back support for using active monitor interfaces for tx99

Alexandre Belloni <[email protected]>
rtc: pl030: fix possible race condition

Alexandre Belloni <[email protected]>
rtc: mt6397: fix possible race condition

Qiuxu Zhuo <[email protected]>
EDAC, sb_edac: Return early on ADDRV bit and address type test

Daniel Silsby <[email protected]>
dmaengine: dma-jz4780: Further residue status fix

Paul Cercueil <[email protected]>

    dmaengine: dma-jz4780: Don't depend on MACH_JZ4780

Chunfeng Yun <[email protected]>
usb: mtu3: disable vbus rise/fall interrupts of ltssm

Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for PMIC IRQ line on Artik5 board

Radu Pirea <[email protected]>
tty/serial: atmel: Change the driver to work under at91-usart MFD

Vicente Bergas <[email protected]>
arm64: dts: rockchip: Fix VCC5V0_HOST_EN on rk3399-sapphire

Sudeep Holla <[email protected]>
firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings

Uwe Kleine-K?nig <[email protected]>
sched/debug: Use symbolic names for task state constants

Peter Zijlstra <[email protected]>
sched/debug: Explicitly cast sched_feat() to bool

YueHaibing <[email protected]>
failover: Fix error return code in net_failover_create

Jaegeuk Kim <[email protected]>
f2fs: submit bio after shutdown

H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: keep vpll2 always on

H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-
Boot

H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: fix touchscreen tsc2007

H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: tvout: enable as display1 alias

H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: fixes for tvout / venc

H. Nikolaus Schaller <[email protected]>
ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in
other DTS files

Rob Herring <[email protected]>
of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC

Suman Tripathi <[email protected]>
ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA

Yong Zhi <[email protected]>
ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation

Charles Keepax <[email protected]>
ASoC: dapm: Avoid uninitialised variable warning

Jan Kara <[email protected]>
udf: Fix crash during mount

Ding Xiang <[email protected]>
mips: txx9: fix iounmap related issue

Parav Pandit <[email protected]>
RDMA/core: Follow correct unregister order between sysfs and cgroup

Parav Pandit <[email protected]>
RDMA/core: Rate limit MAD error messages

Muhammad Sammar <[email protected]>
IB/ipoib: Ensure that MTU isn't less than minimum permitted

Parav Pandit <[email protected]>
IB/mlx5: Don't hold spin lock while checking device state

Jun Gao <[email protected]>
i2c: mediatek: Use DMA safe buffers for i2c transactions

Erik Stromdahl <[email protected]>
ath10k: wmi: disable softirq's while calling ieee80211_rx

Marek Szyprowski <[email protected]>
ARM: dts: exynos: Disable pull control for S5M8767 PMIC

K.T.VIJAYAKUMAAR <[email protected]>
ath10k: avoid possible memory access violation

Colin Ian King <[email protected]>
ASoC: sgtl5000: avoid division by zero if lo_vag is zero

Christian Brauner <[email protected]>
rtnetlink: move type calculation out of loop

Stefan Wahren <[email protected]>
net: lan78xx: Bail out if lan78xx_get_endpoints fails

Jaegeuk Kim <[email protected]>
f2fs: avoid wrong decrypted data from disk

Stanislaw Gruszka <[email protected]>
cfg80211: validate wmm rule when setting

Naftali Goldstein <[email protected]>
mac80211: fix saving a few HE values

Peter Wu <[email protected]>
qxl: fix null-pointer crash during suspend

Majd Dibbiny <[email protected]>
IB/mlx5: Change TX affinity assignment in RoCE LAG mode

Christoph Hellwig <[email protected]>
mtd: rawnand: qcom: don't include dma-direct.h

Kurt Kanzenbach <[email protected]>
mtd: rawnand: fsl_ifc: fixup SRAM init for newer ctrl versions

Kurt Kanzenbach <[email protected]>
mtd: rawnand: fsl_ifc: check result of SRAM initialization

Thomas Petazzoni <[email protected]>
mtd: rawnand: marvell: use regmap_update_bits() for syscon access

Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: fix the clock controller register size

Martin Blumenstingl <[email protected]>
ARM: dts: meson8: fix the clock controller register size

Quentin Schulz <[email protected]>
net: phy: mscc: read 'vsc8531, edge-slowdown' as an u32

Quentin Schulz <[email protected]>

    net: phy: mscc: read 'vsc8531,vddmac' as an u32

Moni Shoua <[email protected]>
net/mlx5: Fix atomic_mode enum values

Yunsheng Lin <[email protected]>
net: hns3: Change the dst mac addr of loopback packet

Yunsheng Lin <[email protected]>
net: hns3: Fix for loopback selftest failed problem

Jian Shen <[email protected]>
net: hns3: Fix error of checking used vlan id

Huazhong Tan <[email protected]>
net: hns3: Fix for multicast failure

Jiada Wang <[email protected]>
ASoC: rsnd: ssi: Fix issue in dma data address assignment

Sven Schmitt <[email protected]>
soc: imx: gpc: fix PDN delay

Geert Uytterhoeven <[email protected]>
mt76: Fix comparisons with invalid hardware key index

Rasmus Villemoes <[email protected]>
brcmfmac: fix wrong strnchr usage

Ganapathi Bhat <[email protected]>
mwifex: free rx_cmd skb in suspended state

Ganapathi Bhat <[email protected]>
mwifiex: do no submit URB in suspended state

Larry Finger <[email protected]>
rtl8187: Fix warning generated when strncpy() destination length matches the
sixe argument

Marcel Ziswiler <[email protected]>
ARM: dts: pxa: fix power i2c base address

Robert Jarzmik <[email protected]>
ARM: dts: pxa: fix the rtc controller

Alexey Khoroshilov <[email protected]>
media: ov772x: Disable clk on error path

Sakari Ailus <[email protected]>
media: i2c: Fix pm_runtime_get_if_in_use() usage in sensor drivers

Hans Verkuil <[email protected]>
media: vicodec: fix out-of-range values when decoding

Sara Sharon <[email protected]>
iwlwifi: mvm: avoid sending too many BARs

Johannes Berg <[email protected]>
iwlwifi: don't WARN on trying to dump dead firmware

Sara Sharon <[email protected]>
iwlwifi: drop packets with bad status in CD

Vijay Immanuel <[email protected]>
IB/rxe: fixes for rdma read retry

Vijay Immanuel <[email protected]>
IB/rxe: avoid back-to-back retries

Patryk Ma?ek <[email protected]>
i40e: Prevent deleting MAC address from VF when set by PF

Lihong Yang <[email protected]>
i40evf: cancel workqueue sync for adminq when a VF is removed

Patryk Ma?ek <[email protected]>
i40e: hold the rtnl lock on clearing interrupt scheme

Patryk Ma?ek <[email protected]>
i40evf: Don't enable vlan stripping when rx offload is turned on

Jan Sokolowski <[email protected]>
i40e: Check and correct speed values for link on open

Lihong Yang <[email protected]>
i40evf: set IFF_UNICAST_FLT flag for the VF

Mitch Williams <[email protected]>
i40e: use correct length for strncpy

Paul M Stillwell Jr <[email protected]>
i40evf: Validate the number of queues a PF sends

Marek Szyprowski <[email protected]>
ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks

Alan Tull <[email protected]>
arm64: dts: stratix10: i2c clock running out of spec

Rick Farrington <[email protected]>
liquidio: fix race condition in instruction completion processing

Marek Szyprowski <[email protected]>
ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook

Andrzej Hajda <[email protected]>
ARM: dts: exynos: Fix HDMI-HPD line handling on Arndale

Andrzej Hajda <[email protected]>
ARM: dts: exynos: Use i2c-gpio for HDMI-DDC on Arndale

Tuomas Tynkkynen <[email protected]>
MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3

Paul Cercueil <[email protected]>
pinctrl: ingenic: Probe driver at subsys_initcall

Akshu Agrawal <[email protected]>
ASoC: AMD: Change MCLK to 48Mhz

Jerome Brunet <[email protected]>
ASoC: meson: axg-fifo: report interrupt request failure

Charles Keepax <[email protected]>

    ASoC: dpcm: Properly initialise hw->rate_max

Charles Keepax <[email protected]>
ASoC: dapm: Don't fail creating new DAPM control on NULL pinctrl

Anirudh Venkataramanan <[email protected]>
ice: Fix and update driver version string

Bob Peterson <[email protected]>
gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated

Anirudh Venkataramanan <[email protected]>
ice: Prevent control queue operations during reset

Dan Nowlin <[email protected]>
ice: Update request resource command to latest specification

Sven Eckelmann <[email protected]>
ath10k: limit available channels via DT ieee80211-freq-limit

Dedy Lansky <[email protected]>
wil6210: fix invalid memory access for rx_buff_mgmt debugfs

Maya Erez <[email protected]>
wil6210: prevent usage of tx ring 0 for eDMA

Maya Erez <[email protected]>
wil6210: set edma variables only for Talyn-MB devices

Dedy Lansky <[email protected]>
wil6210: drop Rx multicast packets that are looped-back to STA

Felix Fietkau <[email protected]>
ath9k: fix tx99 with monitor mode interface

Rakesh Pillai <[email protected]>
ath10k: skip resetting rx filter for WCN3990

Takashi Iwai <[email protected]>
ALSA: seq: Do error checks at creating system ports

Rajeev Kumar Sirasanagandla <[email protected]>
cfg80211: Avoid regulatory restore when COUNTRY_IE_IGNORE is set

Andy Shevchenko <[email protected]>
extcon: cht-wc: Return from default case to avoid warnings

Bjorn Andersson <[email protected]>
remoteproc/davinci: Use %zx for formating size_t

Alexandre Belloni <[email protected]>
rtc: rv8803: fix the rv8803 id in the OF table

Dan Carpenter <[email protected]>
rtc: sysfs: fix NULL check in rtc_add_groups()

Jay Foster <[email protected]>
ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45

Geert Uytterhoeven <[email protected]>
ARM: dts: rcar: Correct SATA device sizes to 2 MiB

Arnd Bergmann <[email protected]>
y2038: make do_gettimeofday() and get_seconds() inline

Aapo Vienamo <[email protected]>

    arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply

Aapo Vienamo <[email protected]>
soc/tegra: pmc: Fix pad voltage configuration for Tegra186

Dan Carpenter <[email protected]>
ALSA: pcm: signedness bug in snd_pcm_plug_alloc()

Andre Przywara <[email protected]>
arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage

Andre Przywara <[email protected]>
arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage

Samuel Holland <[email protected]>
arm64: dts: allwinner: a64: Orange Pi Win: Fix SD card node

Vinod Koul <[email protected]>
soundwire: intel: Fix uninitialized adev deref

Shreyas NC <[email protected]>
soundwire: Initialize completion for defer messages

Rongyi Chen <[email protected]>
clk: sunxi-ng: h6: fix PWM gate/reset offset

Marcus Folkesson <[email protected]>
iio: dac: mcp4922: fix error handling in mcp4922_write_raw

Tamizh chelvam <[email protected]>
ath10k: fix kernel panic by moving pci flush after napi_disable

Ard Biesheuvel <[email protected]>
tee: optee: take DT status property into account

Stefan Agner <[email protected]>
iio: adc: max9611: explicitly cast gain_selectors

Eugen Hristev <[email protected]>
mmc: sdhci-of-at91: fix quirk2 overwrite

Roman Gushchin <[email protected]>
mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()

Roman Gushchin <[email protected]>
mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()

Yang Shi <[email protected]>
mm: mempolicy: fix the wrong return value and potential pages leak of mbind

Eric Auger <[email protected]>
iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros

Corentin Labbe <[email protected]>
net: ethernet: dwmac-sun8i: Use the correct function in exit path

Al Viro <[email protected]>

    ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either

Al Viro <[email protected]>

    ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable

Kai-Heng Feng <[email protected]>
x86/quirks: Disable HPET on Intel Coffe Lake platforms

Hans de Goede <[email protected]>
i2c: acpi: Force bus speed to 400KHz if a Silead touchscreen is present

Mike Marciniszyn <[email protected]>
IB/hfi1: Use a common pad buffer for 9B and 16B packets

James Erwin <[email protected]>
IB/hfi1: Ensure full Gen3 speed in a Gen4 system

Chuhong Yuan <[email protected]>
Input: synaptics-rmi4 - destroy F54 poller workqueue when removing

Lucas Stach <[email protected]>
Input: synaptics-rmi4 - clear IRQ enables for F54

Andrew Duggan <[email protected]>
Input: synaptics-rmi4 - do not consume more data than we have (F11, F12)

Andrew Duggan <[email protected]>
Input: synaptics-rmi4 - disable the relative position IRQ in the F12 driver

Lucas Stach <[email protected]>
Input: synaptics-rmi4 - fix video buffer size

Oliver Neukum <[email protected]>
Input: ff-memless - kill timer in destroy()

Filipe Manana <[email protected]>
Btrfs: fix log context list corruption after rename exchange operation

Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix incorrect size check for processing/extension units

Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix incorrect NULL check in create_yamaha_midi_quirk()

Henry Lin <[email protected]>
ALSA: usb-audio: not submit urb for stopped endpoint

Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix missing error check at mixer resolution test

Jiri Pirko <[email protected]>
devlink: disallow reload operation during device cleanup

Jouni Hogander <[email protected]>
slip: Fix memory leak in slip_open error path

Aleksander Morgado <[email protected]>
net: usb: qmi_wwan: add support for Foxconn T77W968 LTE modules

Chuhong Yuan <[email protected]>
net: gemini: add missed free_netdev

Guillaume Nault <[email protected]>
ipmr: Fix skb headroom in ipmr_get_route().

Oliver Neukum <[email protected]>
ax88172a: fix information leak on short answers

Michael Schmitz <[email protected]>
scsi: core: Handle drivers which set sg_tablesize to zero

Jonas Gorski <[email protected]>
MIPS: BCM63XX: fix switch core reset on BCM6368

Paolo Bonzini <[email protected]>
KVM: x86: introduce is_pae_paging

-------------

Diffstat:

 .../devicetree/bindings/media/i2c/adv748x.txt      |   4 +-
 .../devicetree/bindings/net/brcm,unimac-mdio.txt   |   3 +
 Makefile                                           |   4 +-
 arch/arm/boot/compressed/libfdt_env.h              |   2 +
 arch/arm/boot/dts/am335x-boneblack-common.dtsi     |   2 +-
 arch/arm/boot/dts/am335x-evm.dts                   |  12 +-
 arch/arm/boot/dts/am335x-osd3358-sm-red.dts        |   2 +-
 arch/arm/boot/dts/am335x-pdu001.dts                |   2 +-
 arch/arm/boot/dts/am4372.dtsi                      |   2 +-
 arch/arm/boot/dts/am57xx-cl-som-am57x.dts          |   2 +-
 arch/arm/boot/dts/arm-realview-eb.dtsi             |   2 +-
 arch/arm/boot/dts/arm-realview-pb1176.dts          |   2 +-
 arch/arm/boot/dts/arm-realview-pb11mp.dts          |   2 +-
 arch/arm/boot/dts/arm-realview-pbx.dtsi            |   2 +-
 arch/arm/boot/dts/armada-388-clearfog.dtsi         |   2 +-
 arch/arm/boot/dts/aspeed-g4.dtsi                   |   2 +-
 arch/arm/boot/dts/aspeed-g5.dtsi                   |   2 +-
 arch/arm/boot/dts/at91-dvk_su60_somc.dtsi          |   4 +-
 arch/arm/boot/dts/at91-dvk_su60_somc_lcm.dtsi      |   4 +-
 arch/arm/boot/dts/at91-vinco.dts                   |   2 +-
 arch/arm/boot/dts/at91sam9260ek.dts                |   2 +-
 arch/arm/boot/dts/at91sam9261ek.dts                |   2 +-
 arch/arm/boot/dts/at91sam9g20ek_common.dtsi        |   2 +-
 arch/arm/boot/dts/at91sam9g45.dtsi                 |   2 +-
 arch/arm/boot/dts/bcm-hr2.dtsi                     |   2 +-
 arch/arm/boot/dts/bcm-nsp.dtsi                     |   2 +-
 arch/arm/boot/dts/dove-cubox.dts                   |   2 +-
 arch/arm/boot/dts/dove.dtsi                        |   6 +-
 arch/arm/boot/dts/dra7.dtsi                        |   2 +-
 arch/arm/boot/dts/exynos3250-artik5.dtsi           |   7 +
 arch/arm/boot/dts/exynos5250-arndale.dts           |  41 ++++--
 arch/arm/boot/dts/exynos5250-pinctrl.dtsi          |  11 ++
 arch/arm/boot/dts/exynos5250-snow-rev5.dts         |  11 ++
 arch/arm/boot/dts/exynos5420-peach-pit.dts         |   5 +-
 arch/arm/boot/dts/exynos5800-peach-pi.dts          |   5 +-
 arch/arm/boot/dts/imx51-zii-rdu1.dts               |   2 +-
 arch/arm/boot/dts/imx6ull.dtsi                     |   2 +-
 arch/arm/boot/dts/keystone-k2g.dtsi                |   2 +-
 arch/arm/boot/dts/lpc32xx.dtsi                     |   4 +-
 arch/arm/boot/dts/meson8.dtsi                      |   2 +-
 arch/arm/boot/dts/meson8b-odroidc1.dts             |   5 +
 arch/arm/boot/dts/meson8b.dtsi                     |   2 +-
 arch/arm/boot/dts/omap2.dtsi                       |   4 +-
 arch/arm/boot/dts/omap2430.dtsi                    |   2 +-
 arch/arm/boot/dts/omap3-gta04.dtsi                 |  49 +++++--
 arch/arm/boot/dts/omap3-n9.dts                     |   2 +-
 arch/arm/boot/dts/orion5x-linkstation.dtsi         |   2 +-
 arch/arm/boot/dts/pxa25x.dtsi                      |   4 +
 arch/arm/boot/dts/pxa27x.dtsi                      |   6 +-
 arch/arm/boot/dts/qcom-ipq4019.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7779.dtsi                     |   2 +-
 arch/arm/boot/dts/r8a7790.dtsi                     |   4 +-
 arch/arm/boot/dts/r8a7791.dtsi                     |   4 +-
 arch/arm/boot/dts/rk3036.dtsi                      |   2 +-
 arch/arm/boot/dts/rk3188-radxarock.dts             |   8 ++
 arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts  |   2 +-
 arch/arm/boot/dts/ste-dbx5x0.dtsi                  |   6 +-
 arch/arm/boot/dts/ste-href-family-pinctrl.dtsi     |   8 +-
 arch/arm/boot/dts/ste-hrefprev60.dtsi              |   2 +-
 arch/arm/boot/dts/ste-snowball.dts                 |   2 +-
 arch/arm/boot/dts/ste-u300.dts                     |   2 +-
 arch/arm/boot/dts/stm32mp157c-ev1.dts              |  73 +++++++++-
 arch/arm/boot/dts/stm32mp157c.dtsi                 |   2 +-
 .../boot/dts/sun5i-reference-design-tablet.dtsi    |   3 +-
 .../boot/dts/sun8i-reference-design-tablet.dtsi    |   3 +-
 arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts  |   2 +-
 arch/arm/boot/dts/sun9i-a80.dtsi                   |   2 +-
 arch/arm/boot/dts/tegra20-paz00.dts                |   6 +-
 arch/arm/boot/dts/tegra20.dtsi                     |  26 ++--
 arch/arm/boot/dts/tegra30-apalis.dtsi              |  10 +-
 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts      |   3 +-
 arch/arm/boot/dts/tegra30.dtsi                     |   6 +-
 arch/arm/boot/dts/versatile-ab.dts                 |   2 +-
 arch/arm/boot/dts/zynq-zc702.dts                   |  12 +-
 arch/arm/boot/dts/zynq-zc770-xm010.dts             |   2 +-
 arch/arm/boot/dts/zynq-zc770-xm013.dts             |   2 +-
 arch/arm/crypto/crc32-ce-glue.c                    |   2 +-
 arch/arm/mach-at91/pm.c                            |   6 +-
 arch/arm/mach-imx/pm-imx6.c                        |  25 ++++
 .../boot/dts/allwinner/sun50i-a64-nanopi-a64.dts   |   6 +-
 .../boot/dts/allwinner/sun50i-a64-olinuxino.dts    |   8 +-
 .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts |   4 +-
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    |   2 +
 arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi       |   4 +-
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi         |   2 +-
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        |   2 +-
 .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts   |   2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi         |   2 +-
 arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi   |   4 +-
 .../boot/dts/broadcom/stingray/bcm958742-base.dtsi |   2 +-
 .../arm64/boot/dts/broadcom/stingray/stingray.dtsi |   4 +-
 arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi     |   2 +-
 arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi     |   6 +-
 arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts  |   4 +-
 arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi     |   4 +-
 arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi     |   4 +-
 arch/arm64/boot/dts/lg/lg1312.dtsi                 |   4 +-
 arch/arm64/boot/dts/lg/lg1313.dtsi                 |   4 +-
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           |  16 +--
 arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi     |   1 +
 arch/arm64/boot/dts/renesas/r8a77965.dtsi          |  30 +++-
 arch/arm64/boot/dts/renesas/salvator-common.dtsi   |   5 +-
 .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts |   2 +-
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi  |  26 +++-
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi           |  10 +-
 arch/arm64/boot/dts/ti/k3-am65.dtsi                |  44 +++---
 arch/arm64/kernel/traps.c                          |   1 -
 arch/mips/bcm47xx/workarounds.c                    |   8 +-
 arch/mips/bcm63xx/reset.c                          |   2 +-
 arch/mips/include/asm/kexec.h                      |   6 +-
 arch/mips/txx9/generic/setup.c                     |   5 +-
 arch/powerpc/boot/libfdt_env.h                     |   2 +
 arch/powerpc/include/asm/drmem.h                   |   5 +
 arch/powerpc/include/asm/uaccess.h                 |   6 +-
 arch/powerpc/kernel/iommu.c                        |   2 +-
 arch/powerpc/kernel/rtas.c                         |   2 +
 arch/powerpc/kernel/vdso32/datapage.S              |   1 +
 arch/powerpc/kernel/vdso32/gettimeofday.S          |   1 +
 arch/powerpc/kernel/vdso64/datapage.S              |   1 +
 arch/powerpc/kernel/vdso64/gettimeofday.S          |   1 +
 arch/powerpc/mm/slb.c                              |   2 +-
 arch/powerpc/platforms/pseries/hotplug-memory.c    |  55 +++-----
 arch/s390/include/asm/mmu.h                        |   2 +
 arch/s390/include/asm/mmu_context.h                |   1 +
 arch/s390/kernel/vdso.c                            |   7 +-
 arch/s390/kernel/vdso32/clock_gettime.S            |  19 +--
 arch/s390/kernel/vdso32/gettimeofday.S             |   3 +-
 arch/s390/kernel/vdso64/clock_gettime.S            |  25 ++--
 arch/s390/kernel/vdso64/gettimeofday.S             |   3 +-
 arch/x86/hyperv/hv_init.c                          |  19 +++
 arch/x86/kernel/cpu/common.c                       |   4 +-
 arch/x86/kernel/cpu/cyrix.c                        |   2 +-
 arch/x86/kernel/cpu/mcheck/mce-inject.c            |   6 +
 arch/x86/kernel/early-quirks.c                     |   2 +
 arch/x86/kernel/uprobes.c                          |   2 +-
 arch/x86/kvm/vmx.c                                 |   7 +-
 arch/x86/kvm/x86.c                                 |   8 +-
 arch/x86/kvm/x86.h                                 |   5 +
 block/bfq-iosched.c                                |  78 +++++++++--
 block/bfq-iosched.h                                |  26 ++++
 crypto/chacha20_generic.c                          |   7 +-
 crypto/rsa-pkcs1pad.c                              |   9 --
 drivers/acpi/acpi_lpss.c                           |  22 ++-
 drivers/acpi/pci_root.c                            |   5 +-
 drivers/android/binder.c                           |  44 ++++--
 drivers/ata/ahci_platform.c                        |  15 +-
 drivers/base/component.c                           |   6 +-
 drivers/bluetooth/btrsi.c                          |  13 +-
 drivers/bluetooth/hci_serdev.c                     |   1 +
 drivers/char/ipmi/ipmi_dmi.c                       |   4 +
 drivers/char/ipmi/ipmi_msghandler.c                |   2 +-
 drivers/char/ipmi/ipmi_si_mem_io.c                 |   2 +-
 drivers/char/ipmi/ipmi_si_pci.c                    |   4 +-
 drivers/char/random.c                              |  24 ++--
 drivers/clk/sunxi-ng/ccu-sun50i-h6.c               |   2 +-
 drivers/crypto/s5p-sss.c                           |  16 ++-
 drivers/dma/Kconfig                                |   2 +-
 drivers/dma/at_xdmac.c                             |   2 +-
 drivers/dma/dma-jz4780.c                           |   2 +-
 drivers/edac/i3200_edac.c                          |   2 +-
 drivers/edac/i7core_edac.c                         |   2 +-
 drivers/edac/sb_edac.c                             |  70 ++++-----
 drivers/edac/skx_edac.c                            |   4 +-
 drivers/extcon/extcon-intel-cht-wc.c               |   2 +-
 drivers/firmware/arm_scmi/base.c                   |   2 +-
 drivers/firmware/arm_scmi/clock.c                  |   2 +-
 drivers/firmware/arm_scmi/perf.c                   |   2 +-
 drivers/firmware/arm_scmi/power.c                  |   2 +-
 drivers/firmware/arm_scmi/sensors.c                |   2 +-
 drivers/firmware/dell_rbu.c                        |   8 ++
 drivers/gpio/gpiolib.c                             |  36 +++--
 drivers/gpu/drm/qxl/qxl_drv.c                      |  26 +---
 drivers/hv/channel.c                               |  20 ++-
 drivers/hv/hv.c                                    |  15 +-
 .../coresight/coresight-dynamic-replicator.c       |  64 ++++++---
 drivers/hwtracing/coresight/coresight-etm-perf.c   |  59 +++++---
 drivers/hwtracing/coresight/coresight-etm4x.c      |  40 +++---
 drivers/hwtracing/coresight/coresight-tmc-etf.c    |   4 +-
 drivers/hwtracing/coresight/coresight-tmc-etr.c    |  60 +++++---
 drivers/hwtracing/coresight/coresight-tmc.h        |   2 +
 drivers/hwtracing/coresight/coresight.c            |  22 ++-
 drivers/i2c/busses/i2c-aspeed.c                    |  65 ++++++---
 drivers/i2c/busses/i2c-mt65xx.c                    |  62 +++++++-
 drivers/i2c/i2c-core-acpi.c                        |  28 +++-
 drivers/iio/adc/max9611.c                          |   2 +-
 drivers/iio/dac/mcp4922.c                          |  11 +-
 drivers/infiniband/core/device.c                   |   2 +-
 drivers/infiniband/core/mad.c                      |  72 +++++-----
 drivers/infiniband/hw/cxgb4/cq.c                   |   2 +-
 drivers/infiniband/hw/cxgb4/qp.c                   |   7 +-
 drivers/infiniband/hw/hfi1/pcie.c                  |   4 +-
 drivers/infiniband/hw/hfi1/sdma.c                  |   5 +-
 drivers/infiniband/hw/hfi1/user_sdma.c             |   4 +-
 drivers/infiniband/hw/hfi1/verbs.c                 |  10 +-
 drivers/infiniband/hw/hns/Kconfig                  |   1 +
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c         |   1 +
 drivers/infiniband/hw/i40iw/i40iw_cm.c             |   2 +-
 drivers/infiniband/hw/mlx4/Kconfig                 |   1 +
 drivers/infiniband/hw/mlx5/main.c                  |   8 ++
 drivers/infiniband/hw/mlx5/mlx5_ib.h               |   4 +-
 drivers/infiniband/hw/mlx5/qp.c                    |  63 ++++++---
 drivers/infiniband/sw/rxe/rxe_comp.c               |  39 +++++-
 drivers/infiniband/sw/rxe/rxe_req.c                |  15 +-
 drivers/infiniband/sw/rxe/rxe_verbs.h              |   1 +
 drivers/infiniband/ulp/ipoib/ipoib_main.c          |   3 +-
 drivers/infiniband/ulp/iser/iser_initiator.c       |  18 ++-
 drivers/input/ff-memless.c                         |   9 ++
 drivers/input/rmi4/rmi_f11.c                       |   4 +-
 drivers/input/rmi4/rmi_f12.c                       |  32 ++++-
 drivers/input/rmi4/rmi_f54.c                       |   5 +-
 drivers/media/i2c/ov13858.c                        |   2 +-
 drivers/media/i2c/ov2680.c                         |  26 +---
 drivers/media/i2c/ov2685.c                         |   2 +-
 drivers/media/i2c/ov5670.c                         |   2 +-
 drivers/media/i2c/ov5695.c                         |   2 +-
 drivers/media/i2c/ov772x.c                         |   1 +
 drivers/media/i2c/ov7740.c                         |   2 +-
 drivers/media/pci/ivtv/ivtv-yuv.c                  |   2 +-
 drivers/media/pci/meye/meye.c                      |   2 +-
 drivers/media/platform/davinci/vpbe_display.c      |   2 +-
 drivers/media/platform/vicodec/vicodec-codec.c     |  10 +-
 drivers/media/platform/vsp1/vsp1_drm.c             |  11 +-
 drivers/media/platform/vsp1/vsp1_regs.h            |   2 +-
 drivers/media/usb/au0828/au0828-core.c             |   4 +-
 drivers/misc/genwqe/card_utils.c                   |  13 +-
 drivers/misc/kgdbts.c                              |  16 +--
 drivers/mmc/host/sdhci-of-at91.c                   |   2 +-
 drivers/mtd/nand/raw/fsl_ifc_nand.c                |  36 ++++-
 drivers/mtd/nand/raw/marvell_nand.c                |  23 ++-
 drivers/mtd/nand/raw/qcom_nandc.c                  |   1 -
 drivers/net/ethernet/amd/am79c961a.c               |   2 +-
 drivers/net/ethernet/amd/atarilance.c              |   6 +-
 drivers/net/ethernet/amd/declance.c                |   2 +-
 drivers/net/ethernet/amd/sun3lance.c               |   6 +-
 drivers/net/ethernet/amd/sunlance.c                |   2 +-
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c           |   4 +-
 .../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c |   8 ++
 .../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h |   3 +
 .../aquantia/atlantic/hw_atl/hw_atl_llh_internal.h |  13 ++
 .../aquantia/atlantic/hw_atl/hw_atl_utils.c        |  36 +++--
 .../aquantia/atlantic/hw_atl/hw_atl_utils.h        |   5 +
 .../aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c   |   5 +
 drivers/net/ethernet/broadcom/bcm63xx_enet.c       |   5 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c   |  10 ++
 drivers/net/ethernet/broadcom/genet/bcmmii.c       |   7 +-
 drivers/net/ethernet/broadcom/sb1250-mac.c         |   4 +-
 drivers/net/ethernet/cavium/liquidio/lio_main.c    |   2 +-
 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c |   2 +-
 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c  |   5 +-
 .../net/ethernet/cavium/liquidio/octeon_device.c   |   5 +-
 drivers/net/ethernet/cavium/liquidio/octeon_iq.h   |   2 +
 .../net/ethernet/cavium/liquidio/request_manager.c |   2 +
 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c   |   5 +-
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c         |   2 +-
 drivers/net/ethernet/cortina/gemini.c              |   1 +
 drivers/net/ethernet/faraday/ftgmac100.c           |   4 +-
 drivers/net/ethernet/faraday/ftmac100.c            |   7 +-
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c     |   3 +-
 drivers/net/ethernet/freescale/fec_mpc52xx.c       |   3 +-
 .../net/ethernet/freescale/fs_enet/fs_enet-main.c  |   3 +-
 drivers/net/ethernet/freescale/gianfar.c           |   4 +-
 drivers/net/ethernet/freescale/ucc_geth.c          |   3 +-
 drivers/net/ethernet/hisilicon/hip04_eth.c         |   3 +-
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c      |   2 +-
 drivers/net/ethernet/hisilicon/hns3/hnae3.c        |  12 +-
 drivers/net/ethernet/hisilicon/hns3/hnae3.h        |   3 +
 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c |  18 +--
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    |  93 +++++++-----
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c  |   2 +-
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c   |   4 +-
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c  |  42 ++++--
 drivers/net/ethernet/ibm/ehea/ehea_main.c          |   2 +-
 drivers/net/ethernet/ibm/emac/core.c               |   7 +-
 drivers/net/ethernet/ibm/ibmvnic.c                 |   4 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  35 ++++-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c         |   3 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  10 ++
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  15 +-
 .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    |  32 +++++
 drivers/net/ethernet/intel/ice/ice_common.c        |  75 +++++++---
 drivers/net/ethernet/intel/ice/ice_common.h        |   2 +-
 drivers/net/ethernet/intel/ice/ice_controlq.c      |   3 +
 drivers/net/ethernet/intel/ice/ice_main.c          |  36 ++++-
 drivers/net/ethernet/intel/ice/ice_nvm.c           |   2 +-
 drivers/net/ethernet/intel/ice/ice_status.h        |   1 +
 drivers/net/ethernet/intel/ice/ice_type.h          |  10 +-
 drivers/net/ethernet/marvell/mvneta.c              |   2 +-
 drivers/net/ethernet/marvell/mvpp2/mvpp2.h         |   3 +-
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c    |   9 +-
 drivers/net/ethernet/marvell/pxa168_eth.c          |   3 +-
 drivers/net/ethernet/mellanox/mlx4/main.c          |   3 +
 drivers/net/ethernet/mellanox/mlxsw/core.c         |   4 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     |  12 +-
 drivers/net/ethernet/micrel/ks8695net.c            |   2 +-
 drivers/net/ethernet/micrel/ks8851_mll.c           |   4 +-
 .../net/ethernet/netronome/nfp/nfp_net_common.c    |  16 ++-
 drivers/net/ethernet/smsc/smc911x.c                |   3 +-
 drivers/net/ethernet/smsc/smc91x.c                 |   3 +-
 drivers/net/ethernet/smsc/smsc911x.c               |   3 +-
 drivers/net/ethernet/socionext/sni_ave.c           |   4 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c  |   2 +-
 drivers/net/ethernet/sun/ldmvsw.c                  |   2 +-
 drivers/net/ethernet/sun/sunbmac.c                 |   3 +-
 drivers/net/ethernet/sun/sunqe.c                   |   2 +-
 drivers/net/ethernet/sun/sunvnet.c                 |   2 +-
 drivers/net/ethernet/sun/sunvnet_common.c          |  14 +-
 drivers/net/ethernet/sun/sunvnet_common.h          |   7 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.c       |   4 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.h       |   2 +-
 drivers/net/ethernet/toshiba/spider_net.c          |   4 +-
 drivers/net/ethernet/toshiba/tc35815.c             |   6 +-
 drivers/net/ethernet/xilinx/ll_temac_main.c        |   3 +-
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c  |   3 +-
 drivers/net/ethernet/xilinx/xilinx_emaclite.c      |   9 +-
 drivers/net/net_failover.c                         |   4 +-
 drivers/net/netdevsim/netdev.c                     |   5 +
 drivers/net/phy/mdio-bcm-unimac.c                  |  83 ++++++++++-
 drivers/net/phy/mscc.c                             |  11 +-
 drivers/net/slip/slip.c                            |   1 +
 drivers/net/usb/ax88172a.c                         |   2 +-
 drivers/net/usb/lan78xx.c                          |   5 +
 drivers/net/usb/qmi_wwan.c                         |   2 +
 drivers/net/wireless/ath/ath10k/ahb.c              |   4 +-
 drivers/net/wireless/ath/ath10k/core.c             |  17 ++-
 drivers/net/wireless/ath/ath10k/hw.h               |   5 +
 drivers/net/wireless/ath/ath10k/mac.c              |   2 +
 drivers/net/wireless/ath/ath10k/pci.c              |   2 +-
 drivers/net/wireless/ath/ath10k/wmi.c              |  10 +-
 drivers/net/wireless/ath/ath9k/main.c              |   1 -
 drivers/net/wireless/ath/ath9k/tx99.c              |  10 +-
 drivers/net/wireless/ath/wil6210/debugfs.c         |   3 +
 drivers/net/wireless/ath/wil6210/main.c            |   9 +-
 drivers/net/wireless/ath/wil6210/pcie_bus.c        |   1 +
 drivers/net/wireless/ath/wil6210/txrx.c            |  15 +-
 .../wireless/broadcom/brcm80211/brcmfmac/common.c  |   4 +-
 .../wireless/broadcom/brcm80211/brcmfmac/feature.c |   2 +-
 .../broadcom/brcm80211/brcmsmac/mac80211_if.c      |   6 +-
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c     |   2 +-
 drivers/net/wireless/intel/iwlwifi/fw/api/rx.h     |  63 +++++++++
 drivers/net/wireless/intel/iwlwifi/fw/api/tx.h     |   6 +-
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c        |   9 +-
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h     |   1 +
 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c  |   4 +
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c       |   4 -
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c        |  55 ++++++--
 drivers/net/wireless/intel/iwlwifi/pcie/internal.h |  60 --------
 drivers/net/wireless/intel/iwlwifi/pcie/rx.c       |   8 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c    |  16 ++-
 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c  |   7 +-
 drivers/net/wireless/intel/iwlwifi/pcie/tx.c       |   2 +-
 drivers/net/wireless/marvell/mwifiex/usb.c         |  13 ++
 drivers/net/wireless/mediatek/mt76/mt76x0/tx.c     |   2 +-
 .../net/wireless/mediatek/mt76/mt76x2_tx_common.c  |   2 +-
 .../net/wireless/realtek/rtl818x/rtl8187/leds.c    |   2 +-
 drivers/nvmem/core.c                               |   2 +-
 drivers/of/base.c                                  |   2 +-
 drivers/of/unittest-data/overlay_15.dts            |   4 +-
 drivers/of/unittest-data/tests-overlay.dtsi        |   4 +-
 drivers/opp/core.c                                 |  21 ++-
 drivers/opp/cpu.c                                  |   2 +
 drivers/opp/opp.h                                  |   2 +-
 drivers/pci/controller/pcie-mediatek.c             |   4 +-
 drivers/pci/hotplug/pciehp_core.c                  |   3 +-
 drivers/pci/pci.c                                  |  37 +++++
 drivers/pci/pci.h                                  |   2 +
 drivers/pci/pcie/aer.c                             |  13 +-
 drivers/pci/pcie/dpc.c                             |   3 +-
 drivers/pci/pcie/err.c                             |  87 +++---------
 drivers/pci/pcie/pme.c                             |   3 +-
 drivers/pci/pcie/portdrv.h                         |  24 ++++
 drivers/pci/pcie/portdrv_pci.c                     |   9 ++
 drivers/pci/slot.c                                 |   1 -
 drivers/phy/broadcom/Kconfig                       |   3 +-
 drivers/phy/lantiq/phy-lantiq-rcu-usb2.c           |   1 -
 drivers/phy/renesas/phy-rcar-gen3-usb2.c           |   2 +-
 drivers/phy/ti/phy-twl4030-usb.c                   |  29 ++++
 drivers/pinctrl/pinctrl-at91-pio4.c                |   8 +-
 drivers/pinctrl/pinctrl-at91.c                     |  28 ++--
 drivers/pinctrl/pinctrl-ingenic.c                  |   2 +-
 drivers/power/reset/at91-sama5d2_shdwc.c           |   3 +
 drivers/power/supply/ab8500_fg.c                   |  31 ++--
 drivers/power/supply/max8998_charger.c             |   2 +-
 drivers/power/supply/twl4030_charger.c             |  30 +++-
 drivers/remoteproc/da8xx_remoteproc.c              |   2 +-
 drivers/rtc/rtc-armada38x.c                        |  22 +--
 drivers/rtc/rtc-isl1208.c                          |  27 ++--
 drivers/rtc/rtc-mt6397.c                           |  13 +-
 drivers/rtc/rtc-pl030.c                            |  15 +-
 drivers/rtc/rtc-rv8803.c                           |   2 +-
 drivers/rtc/rtc-sysfs.c                            |   4 +-
 drivers/rtc/rtc-tx4939.c                           |   4 +-
 drivers/s390/crypto/ap_bus.c                       |  18 +--
 drivers/s390/net/qeth_core_main.c                  | 102 +++++++-------
 drivers/s390/net/qeth_l2_main.c                    |   3 +
 drivers/s390/net/qeth_l3_main.c                    |   3 +
 drivers/scsi/NCR5380.c                             | 156 ++++++++++++---------
 drivers/scsi/NCR5380.h                             |   2 +-
 drivers/scsi/libsas/sas_expander.c                 |  13 +-
 drivers/scsi/lpfc/lpfc_ct.c                        |   5 -
 drivers/scsi/lpfc/lpfc_hbadisc.c                   |   2 +-
 drivers/scsi/lpfc/lpfc_nportdisc.c                 |   3 +
 drivers/scsi/lpfc/lpfc_nvme.c                      |   2 +-
 drivers/scsi/lpfc/lpfc_nvmet.c                     |   7 +-
 drivers/scsi/lpfc/lpfc_sli.c                       |   6 +-
 drivers/scsi/pm8001/pm8001_hwi.c                   |   6 +
 drivers/scsi/pm8001/pm8001_sas.c                   |   9 +-
 drivers/scsi/pm8001/pm8001_sas.h                   |   1 +
 drivers/scsi/pm8001/pm80xx_hwi.c                   |  80 ++++++++++-
 drivers/scsi/pm8001/pm80xx_hwi.h                   |   3 +
 drivers/scsi/qla2xxx/qla_gs.c                      |  28 +++-
 drivers/scsi/qla2xxx/qla_init.c                    |  36 ++---
 drivers/scsi/qla2xxx/qla_iocb.c                    |  12 +-
 drivers/scsi/qla2xxx/qla_isr.c                     |  50 +++----
 drivers/scsi/qla2xxx/qla_os.c                      |  29 +++-
 drivers/scsi/qla2xxx/qla_target.c                  |   6 +
 drivers/scsi/scsi_lib.c                            |   3 +-
 drivers/scsi/sym53c8xx_2/sym_hipd.c                |  15 +-
 drivers/scsi/ufs/ufshcd.c                          |  53 ++++---
 drivers/slimbus/qcom-ngd-ctrl.c                    |  24 ++--
 drivers/soc/imx/gpc.c                              |   2 +-
 drivers/soc/qcom/apr.c                             |   4 +-
 drivers/soc/qcom/qcom-geni-se.c                    |  41 +++---
 drivers/soc/qcom/rpmh-rsc.c                        |   2 +
 drivers/soc/qcom/wcnss_ctrl.c                      |   2 +-
 drivers/soc/tegra/pmc.c                            |  55 +++++---
 drivers/soundwire/bus.c                            |   1 +
 drivers/soundwire/intel_init.c                     |   2 +-
 drivers/spi/spi-bcm63xx-hsspi.c                    |  20 ++-
 drivers/spi/spi-mt65xx.c                           |  37 ++---
 drivers/spi/spi-pic32.c                            |   4 +-
 drivers/staging/media/imx/imx-media-csi.c          |   5 +-
 drivers/tee/optee/core.c                           |   2 +-
 drivers/tty/serial/Kconfig                         |   1 +
 drivers/tty/serial/atmel_serial.c                  |  42 ++++--
 drivers/tty/serial/mxs-auart.c                     |   3 +-
 drivers/tty/serial/qcom_geni_serial.c              |  55 ++++----
 drivers/tty/serial/samsung.c                       |   8 ++
 drivers/tty/serial/xilinx_uartps.c                 |  41 ++----
 drivers/uio/uio_hv_generic.c                       |   5 +-
 drivers/usb/chipidea/otg.c                         |   9 +-
 drivers/usb/chipidea/usbmisc_imx.c                 |   2 +
 drivers/usb/class/usbtmc.c                         |  17 ++-
 drivers/usb/gadget/function/uvc_configfs.c         |  20 +++
 drivers/usb/gadget/function/uvc_video.c            |  32 +++--
 drivers/usb/host/xhci-mtk-sch.c                    |   4 +-
 drivers/usb/mtu3/mtu3_core.c                       |   4 +-
 drivers/usb/mtu3/mtu3_gadget.c                     |  22 +--
 drivers/vfio/pci/vfio_pci.c                        |   8 +-
 drivers/vfio/pci/vfio_pci_config.c                 |  31 +++-
 fs/btrfs/inode.c                                   |  15 ++
 fs/compat_ioctl.c                                  |  10 +-
 fs/ecryptfs/inode.c                                |  19 ++-
 fs/f2fs/data.c                                     |  35 ++---
 fs/f2fs/f2fs.h                                     |   3 +-
 fs/f2fs/file.c                                     |  63 +++++----
 fs/f2fs/node.c                                     |   5 +-
 fs/f2fs/recovery.c                                 |  17 +++
 fs/f2fs/segment.c                                  |   6 +-
 fs/f2fs/super.c                                    |  11 +-
 fs/fuse/control.c                                  |   4 +-
 fs/gfs2/rgrp.c                                     |   2 +-
 fs/kernfs/symlink.c                                |   5 +-
 fs/udf/super.c                                     |  65 ++++++++-
 include/crypto/chacha20.h                          |   3 +-
 include/linux/cpufeature.h                         |   2 +-
 include/linux/edac.h                               |   3 +-
 include/linux/fsl_ifc.h                            |   2 +
 include/linux/hyperv.h                             |   2 +-
 include/linux/intel-iommu.h                        |   6 +-
 include/linux/libfdt_env.h                         |   1 +
 include/linux/mlx5/driver.h                        |   5 +-
 include/linux/timekeeping32.h                      |  15 +-
 include/media/vsp1.h                               |   2 +-
 include/net/devlink.h                              |   3 +
 include/net/llc.h                                  |   1 +
 include/soc/tegra/pmc.h                            |   1 +
 include/trace/events/sched.h                       |  11 +-
 kernel/events/uprobes.c                            |   4 +-
 kernel/kprobes.c                                   |   8 +-
 kernel/sched/sched.h                               |   2 +-
 kernel/signal.c                                    |   4 +
 kernel/time/time.c                                 |  15 +-
 kernel/time/timekeeping.c                          |  24 ----
 lib/chacha20.c                                     |   6 +-
 mm/hugetlb_cgroup.c                                |   2 +-
 mm/memcontrol.c                                    |   2 +-
 mm/memfd.c                                         |   2 +-
 mm/mempolicy.c                                     |  14 +-
 net/bluetooth/l2cap_core.c                         |  10 ++
 net/core/devlink.c                                 |  39 +++++-
 net/core/rtnetlink.c                               |   2 +-
 net/ipv4/gre_demux.c                               |   7 +-
 net/ipv4/ip_gre.c                                  |   9 +-
 net/ipv4/ipmr.c                                    |   3 +-
 net/ipv4/netfilter/nf_nat_masquerade_ipv4.c        |  22 ++-
 net/ipv6/netfilter/nf_nat_masquerade_ipv6.c        |  19 ++-
 net/llc/llc_core.c                                 |   4 +-
 net/mac80211/mlme.c                                |  17 +--
 net/netfilter/nf_tables_api.c                      |   9 +-
 net/netfilter/nft_cmp.c                            |   6 +-
 net/netfilter/nft_reject.c                         |   6 +-
 net/wireless/reg.c                                 | 110 +++++++++++----
 samples/bpf/sockex2_kern.c                         |  11 +-
 samples/bpf/sockex3_kern.c                         |   8 +-
 samples/bpf/sockex3_user.c                         |   4 +-
 sound/core/oss/pcm_plugin.c                        |   4 +-
 sound/core/seq/seq_system.c                        |  18 ++-
 sound/pci/hda/patch_ca0132.c                       |   1 +
 sound/pci/intel8x0m.c                              |  20 +--
 sound/soc/amd/acp-da7219-max98357a.c               |   2 +-
 sound/soc/codecs/hdac_hdmi.c                       |   6 +
 sound/soc/codecs/rt5682.c                          |   5 +
 sound/soc/codecs/sgtl5000.c                        |   2 +-
 sound/soc/meson/axg-fifo.c                         |   2 +
 sound/soc/sh/rcar/rsnd.h                           |   1 +
 sound/soc/sh/rcar/ssi.c                            |   4 +-
 sound/soc/soc-dapm.c                               |   4 +-
 sound/soc/soc-pcm.c                                |   2 +-
 sound/usb/endpoint.c                               |   3 +
 sound/usb/mixer.c                                  |   4 +-
 sound/usb/quirks.c                                 |   4 +-
 sound/usb/validate.c                               |   6 +-
 .../testing/selftests/powerpc/tm/tm-unavailable.c  |   9 +-
 tools/testing/selftests/powerpc/tm/tm.h            |   9 ++
 524 files changed, 3933 insertions(+), 1921 deletions(-)
author maintainer
#457 lore raw
Quoted 44 lines · Chris Paterson

Hello Greg, all,

Quoted 8 lines

From: stable-owner at vger.kernel.org <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release (1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions of Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285/artifacts/file/output/4.19.85-rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o
3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o
3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_remove_one':
3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o
Quoted 1 line

I haven't tried to trace the issue further yet, sorry.

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

thanks,

greg k-h

#458 lore raw

Hi Greg,

Quoted 57 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 12:29

Quoted 6 lines · Chris Paterson

Hello Greg, all,

Quoted 4 lines

From: stable-owner at vger.kernel.org <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

Quoted 6 lines
Quoted 4 lines

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release

(1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions of Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Quoted 4 lines

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285/artifacts/file/output/4.19.85- rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Quoted 13 lines

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o
Quoted 2 lines

3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit

declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]

Quoted 5 lines
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o

3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_remove_one':

Quoted 1 line

3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit

declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]

Quoted 7 lines
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o
Quoted 4 lines
Quoted 1 line

I haven't tried to trace the issue further yet, sorry.

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

Looking through the commit history, the issue seems to be related to:
672cf82122be ("devlink: disallow reload operation during device cleanup")

I've reverted this commit and Linux 4.19.85-rc2 (af1bb7db before revert) will build with the configuration I'm using [2]. I haven't looked further yet though, sorry.

[2] https://gitlab.com/cip-project/cip-kernel/cip-kernel-config/raw/master/4.19.y-cip/x86/siemens_iot2000.config

Kind regards, Chris

Quoted 4 lines

thanks,

greg k-h

author maintainer
#459 lore raw
Quoted 64 lines · Chris Paterson

Hi Greg,

Quoted 57 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 12:29

Quoted 6 lines · Chris Paterson

Hello Greg, all,

Quoted 4 lines

From: stable-owner at vger.kernel.org <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

Quoted 6 lines
Quoted 4 lines

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release

(1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions of Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Quoted 4 lines

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285/artifacts/file/output/4.19.85- rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Quoted 13 lines

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o
Quoted 2 lines

3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit

declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]

Quoted 5 lines
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o

3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_remove_one':

Quoted 1 line

3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit

declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]

Quoted 7 lines
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o
Quoted 4 lines
Quoted 1 line

I haven't tried to trace the issue further yet, sorry.

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

Quoted 7 lines

Looking through the commit history, the issue seems to be related to:
672cf82122be ("devlink: disallow reload operation during device cleanup")

I've reverted this commit and Linux 4.19.85-rc2 (af1bb7db before revert) will build with the configuration I'm using [2]. I haven't looked further yet though, sorry.

[2] https://gitlab.com/cip-project/cip-kernel/cip-kernel-config/raw/master/4.19.y-cip/x86/siemens_iot2000.config

If you add:

	#include <net/devlink.h>

to the top of drivers/net/ethernet/mellanox/mlx4/main.c, does it fix the issue for you?

If so, I'll modify the file to have that, seems to be some sort of include file mess :(

thanks,

greg k-h

#460 lore raw
Quoted 78 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 15:49

Quoted 9 lines · Chris Paterson

Hi Greg,

Quoted 7 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 12:29

Quoted 3 lines · Chris Paterson

Hello Greg, all,

Quoted 1 line

From: stable-owner at vger.kernel.org <[email protected]>

On

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 7 lines

Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release

(1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions

of

Quoted 10 lines
Quoted 10 lines

Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Quoted 4 lines

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285/artifacts/file/output/4.19.85- rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Quoted 3 lines

Main error below:

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o

3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_init_one':

Quoted 21 lines
Quoted 21 lines
Quoted 1 line

3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit

declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]

Quoted 5 lines
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o

3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_remove_one':

Quoted 1 line

3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit

declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]

Quoted 8 lines
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o

I haven't tried to trace the issue further yet, sorry.

Quoted 7 lines
Quoted 2 lines

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

Looking through the commit history, the issue seems to be related to:
672cf82122be ("devlink: disallow reload operation during device cleanup")

I've reverted this commit and Linux 4.19.85-rc2 (af1bb7db before revert) will

build with the configuration I'm using [2].

Quoted 2 lines

I haven't looked further yet though, sorry.

Quoted 7 lines
Quoted 1 line

[2] https://gitlab.com/cip-project/cip-kernel/cip-kernel-

config/raw/master/4.19.y-cip/x86/siemens_iot2000.config

If you add:

	#include <net/devlink.h>

to the top of drivers/net/ethernet/mellanox/mlx4/main.c, does it fix the issue for you?

This is already defined:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/tree/drivers/net/ethernet/mellanox/mlx4/main.c?h=linux-4.19.y#n47

Kind regards, Chris

Quoted 7 lines

If so, I'll modify the file to have that, seems to be some sort of include file mess :(

thanks,

greg k-h

author maintainer
#461 lore raw
Quoted 81 lines · Chris Paterson
Quoted 81 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 15:49

Quoted 9 lines · Chris Paterson

Hi Greg,

Quoted 7 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 12:29

Quoted 3 lines · Chris Paterson

Hello Greg, all,

Quoted 1 line

From: stable-owner at vger.kernel.org <[email protected]>

On

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 7 lines

Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release

(1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions

of

Quoted 10 lines
Quoted 10 lines

Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Quoted 4 lines

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285/artifacts/file/output/4.19.85- rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Quoted 3 lines

Main error below:

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o

3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_init_one':

Quoted 21 lines
Quoted 21 lines
Quoted 1 line

3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit

declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]

Quoted 5 lines
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o

3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_remove_one':

Quoted 1 line

3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit

declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]

Quoted 8 lines
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o

I haven't tried to trace the issue further yet, sorry.

Quoted 7 lines
Quoted 2 lines

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

Looking through the commit history, the issue seems to be related to:
672cf82122be ("devlink: disallow reload operation during device cleanup")

I've reverted this commit and Linux 4.19.85-rc2 (af1bb7db before revert) will

build with the configuration I'm using [2].

Quoted 3 lines

I haven't looked further yet though, sorry.

[2] https://gitlab.com/cip-project/cip-kernel/cip-kernel-

config/raw/master/4.19.y-cip/x86/siemens_iot2000.config

Quoted 7 lines
Quoted 4 lines

If you add:

	#include <net/devlink.h>

to the top of drivers/net/ethernet/mellanox/mlx4/main.c, does it fix the issue for you?

This is already defined:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/tree/drivers/net/ethernet/mellanox/mlx4/main.c?h=linux-4.19.y#n47

Ah, ok, the issue is that CONFIG_NET_DEVLINK is not enabled, the driver now requires this. This was resolved by adding the dependancy to the driver itself, and then just punting and always enabling it over time.

We can backport part of f6b19b354d50 ("net: devlink: select NET_DEVLINK from drivers") if you want, but that feels messy.

For now, if you enable that option, does it build for you?

thanks,

greg k-h

#462 lore raw
Quoted 90 lines · Greg Kroah-Hartman
Quoted 81 lines · Chris Paterson
Quoted 81 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 15:49

Quoted 9 lines · Chris Paterson

Hi Greg,

Quoted 7 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 12:29

Quoted 3 lines · Chris Paterson

Hello Greg, all,

Quoted 1 line

From: stable-owner at vger.kernel.org <[email protected]>

On

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 7 lines

Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release

(1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions

of

Quoted 10 lines
Quoted 10 lines

Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Quoted 4 lines

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285/artifacts/file/output/4.19.85- rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Quoted 3 lines

Main error below:

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o

3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_init_one':

Quoted 21 lines
Quoted 21 lines
Quoted 1 line

3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit

declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]

Quoted 5 lines
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o

3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_remove_one':

Quoted 1 line

3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit

declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]

Quoted 8 lines
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o

I haven't tried to trace the issue further yet, sorry.

Quoted 7 lines
Quoted 2 lines

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

Looking through the commit history, the issue seems to be related to:
672cf82122be ("devlink: disallow reload operation during device cleanup")

I've reverted this commit and Linux 4.19.85-rc2 (af1bb7db before revert) will

build with the configuration I'm using [2].

Quoted 3 lines

I haven't looked further yet though, sorry.

[2] https://gitlab.com/cip-project/cip-kernel/cip-kernel-

config/raw/master/4.19.y-cip/x86/siemens_iot2000.config

Quoted 7 lines
Quoted 4 lines

If you add:

	#include <net/devlink.h>

to the top of drivers/net/ethernet/mellanox/mlx4/main.c, does it fix the issue for you?

This is already defined:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/tree/drivers/net/ethernet/mellanox/mlx4/main.c?h=linux-4.19.y#n47

Quoted 9 lines

Ah, ok, the issue is that CONFIG_NET_DEVLINK is not enabled, the driver now requires this. This was resolved by adding the dependancy to the driver itself, and then just punting and always enabling it over time.

We can backport part of f6b19b354d50 ("net: devlink: select NET_DEVLINK from drivers") if you want, but that feels messy.

For now, if you enable that option, does it build for you?

Selecting NET_DEVLINK manually fixes the problem, but at least for my part I was unable to find a means to define the dependency in the Kconfig file. I either get a recursive dependency or unmet direct dependencies.

FWIW, reverting the devlink patch fixes the compile problem.

Guenter

author maintainer
#463 lore raw
Quoted 98 lines · Guenter Roeck
Quoted 97 lines · Greg Kroah-Hartman
Quoted 81 lines · Chris Paterson
Quoted 81 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 15:49

Quoted 9 lines · Chris Paterson

Hi Greg,

Quoted 7 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 12:29

Quoted 3 lines · Chris Paterson

Hello Greg, all,

Quoted 1 line

From: stable-owner at vger.kernel.org <[email protected]>

On

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 7 lines

Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release

(1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions

of

Quoted 10 lines
Quoted 10 lines

Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Quoted 4 lines

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285/artifacts/file/output/4.19.85- rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Quoted 3 lines

Main error below:

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o

3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_init_one':

Quoted 21 lines
Quoted 21 lines
Quoted 1 line

3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit

declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]

Quoted 5 lines
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o

3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_remove_one':

Quoted 1 line

3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit

declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]

Quoted 8 lines
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o

I haven't tried to trace the issue further yet, sorry.

Quoted 7 lines
Quoted 2 lines

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

Looking through the commit history, the issue seems to be related to:
672cf82122be ("devlink: disallow reload operation during device cleanup")

I've reverted this commit and Linux 4.19.85-rc2 (af1bb7db before revert) will

build with the configuration I'm using [2].

Quoted 3 lines

I haven't looked further yet though, sorry.

[2] https://gitlab.com/cip-project/cip-kernel/cip-kernel-

config/raw/master/4.19.y-cip/x86/siemens_iot2000.config

Quoted 7 lines
Quoted 4 lines

If you add:

	#include <net/devlink.h>

to the top of drivers/net/ethernet/mellanox/mlx4/main.c, does it fix the issue for you?

This is already defined:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/tree/drivers/net/ethernet/mellanox/mlx4/main.c?h=linux-4.19.y#n47

Ah, ok, the issue is that CONFIG_NET_DEVLINK is not enabled, the driver now requires this. This was resolved by adding the dependancy to the driver itself, and then just punting and always enabling it over time.

We can backport part of f6b19b354d50 ("net: devlink: select NET_DEVLINK from drivers") if you want, but that feels messy.

Quoted 8 lines
Quoted 2 lines

For now, if you enable that option, does it build for you?

Selecting NET_DEVLINK manually fixes the problem, but at least for my part I was unable to find a means to define the dependency in the Kconfig file. I either get a recursive dependency or unmet direct dependencies.

FWIW, reverting the devlink patch fixes the compile problem.

Ok, I've now done just that, and pushed out a -rc4.

thanks,

greg k-h

#464 lore raw
Quoted 117 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 18:16

Quoted 8 lines · Guenter Roeck
Quoted 7 lines · Greg Kroah-Hartman
Quoted 6 lines · Chris Paterson
Quoted 6 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 15:49

Quoted 2 lines · Chris Paterson

Hi Greg,

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

From: Greg Kroah-Hartman <[email protected]>
Sent: 19 November 2019 12:29

Quoted 3 lines · Chris Paterson

Hello Greg, all,

Quoted 1 line

From: stable-owner at vger.kernel.org <stable-

owner at vger.kernel.org>

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

On

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a

response

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

to this one. If anyone has any issues with these being applied,

please

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

let me know.

I'm seeing some build issues with module compilation with this

release

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

(1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two

versions

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

of

Quoted 4 lines
Quoted 4 lines

Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Quoted 3 lines

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 1 line

[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-

/jobs/354591285/artifacts/file/output/4.19.85- rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Quoted 14 lines

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o

3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

'mlx4_init_one':

Quoted 1 line
Quoted 1 line
Quoted 1 line

3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error:

implicit

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]

Quoted 5 lines
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o

3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function

'mlx4_remove_one':

Quoted 1 line

3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error:

implicit

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]

Quoted 7 lines
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

I haven't tried to trace the issue further yet, sorry.

Any chance you can bisect this? I don't see any obvious reason why

this

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line

error should be happening, and it isn't showing up here :(

Looking through the commit history, the issue seems to be related to:
672cf82122be ("devlink: disallow reload operation during device

cleanup")

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I've reverted this commit and Linux 4.19.85-rc2 (af1bb7db before

revert) will

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

build with the configuration I'm using [2].

Quoted 3 lines

I haven't looked further yet though, sorry.

[2] https://gitlab.com/cip-project/cip-kernel/cip-kernel-

config/raw/master/4.19.y-cip/x86/siemens_iot2000.config

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

If you add:

	#include <net/devlink.h>

to the top of drivers/net/ethernet/mellanox/mlx4/main.c, does it fix the issue for you?

This is already defined:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-

rc.git/tree/drivers/net/ethernet/mellanox/mlx4/main.c?h=linux-4.19.y#n47

Quoted 11 lines
Quoted 10 lines

Ah, ok, the issue is that CONFIG_NET_DEVLINK is not enabled, the driver now requires this. This was resolved by adding the dependancy to the driver itself, and then just punting and always enabling it over time.

We can backport part of f6b19b354d50 ("net: devlink: select NET_DEVLINK from drivers") if you want, but that feels messy.

For now, if you enable that option, does it build for you?

Quoted 7 lines
Quoted 5 lines

Selecting NET_DEVLINK manually fixes the problem, but at least for my part I was unable to find a means to define the dependency in the Kconfig file. I either get a recursive dependency or unmet direct dependencies.

FWIW, reverting the devlink patch fixes the compile problem.

Ok, I've now done just that, and pushed out a -rc4.

Thanks Greg.

Linux 4.19.85-rc4 (824c9ada & d0112da1) works for me.

Kind regards, Chris

Quoted 4 lines

thanks,

greg k-h

author maintainer
#465 lore raw
Quoted 5 lines · Chris Paterson
Quoted 1 line

Ok, I've now done just that, and pushed out a -rc4.

Thanks Greg.

Linux 4.19.85-rc4 (824c9ada & d0112da1) works for me.

Wonderful, thanks for testing all of this.

greg k-h

#466 lore raw
In reply to Greg Kroah-Hartman
Quoted 3 lines · Greg Kroah-Hartman

Ok, I've now done just that, and pushed out a -rc4.

Results from Linaro?s test farm.
No regressions on arm64, arm, x86_64, and i386.

Summary
------------------------------------------------------------------------

kernel: 4.19.85-rc4
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: d0112da1f7e63d8c9a40263ced73eb673177a053
git describe: v4.19.84-420-gd0112da1f7e6
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.84-420-gd0112da1f7e6

No regressions (compared to build v4.19.84)

No fixes (compared to build v4.19.84)

Ran 23846 total tests in the following environments and test suites.

Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64

Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* ltp-fs-tests
* network-basic-tests
* ltp-open-posix-tests
* ssuite
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* kvm-unit-tests

Signature · 2 lines
Linaro LKFT
https://lkft.linaro.org
#467 lore raw
In reply to Greg Kroah-Hartman
Quoted 45 lines · Greg Kroah-Hartman
Quoted 44 lines · Chris Paterson

Hello Greg, all,

Quoted 8 lines

From: stable-owner at vger.kernel.org <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release (1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions of Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285/artifacts/file/output/4.19.85-rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o
3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o
3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_remove_one':
3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o
Quoted 5 lines
Quoted 1 line

I haven't tried to trace the issue further yet, sorry.

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

I see the problem as well, with powerpc:defconfig.

Underlying issue is that devlink_reload_disable() is only declared in the include file if CONFIG_NET_DEVLINK is enabled. There is no dummy otherwise. The dummy declarations which still exist in 4.19 were removed with commit f6b19b354d50c ("net: devlink: select NET_DEVLINK from drivers") in the upstream kernel.

Guenter

author maintainer
#468 lore raw
Quoted 51 lines · Guenter Roeck
Quoted 45 lines · Greg Kroah-Hartman
Quoted 44 lines · Chris Paterson

Hello Greg, all,

Quoted 8 lines

From: stable-owner at vger.kernel.org <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release (1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions of Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285/artifacts/file/output/4.19.85-rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o
3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o
3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_remove_one':
3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o
Quoted 5 lines
Quoted 1 line

I haven't tried to trace the issue further yet, sorry.

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

Quoted 7 lines

I see the problem as well, with powerpc:defconfig.

Underlying issue is that devlink_reload_disable() is only declared in the include file if CONFIG_NET_DEVLINK is enabled. There is no dummy otherwise. The dummy declarations which still exist in 4.19 were removed with commit f6b19b354d50c ("net: devlink: select NET_DEVLINK from drivers") in the upstream kernel.

Ok, let me take part of that patch and backport it. I'll push out a -rc3 now to hopefully resolve this issue.

thanks,

greg k-h

author maintainer
#469 lore raw
Quoted 54 lines · Greg Kroah-Hartman
Quoted 53 lines · Guenter Roeck
Quoted 45 lines · Greg Kroah-Hartman
Quoted 44 lines · Chris Paterson

Hello Greg, all,

Quoted 8 lines

From: stable-owner at vger.kernel.org <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 19 November 2019 05:13

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing some build issues with module compilation with this release (1b1960cc Linux 4.19.85-rc1), I also saw them with the previous two versions of Linux 4.19.85-rc1 (cd21ecdb and 1fd0ac64).

Full log available on GitLab [0]. Build conf [1].
[0] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285
[1] https://gitlab.com/cip-playground/linux-stable-rc-ci/-/jobs/354591285/artifacts/file/output/4.19.85-rc1_1b1960cc7/x86/siemens_iot2000.config/config/.config

Main error below:

3907   CC [M]  drivers/net/ethernet/mellanox/mlx4/main.o
3908   LD [M]  fs/ntfs/ntfs.o
3909   CC [M]  drivers/net/ethernet/intel/i40evf/i40e_txrx.o
3910   CC [M]  drivers/usb/musb/musb_core.o
3911   CC [M]  drivers/net/ethernet/nvidia/forcedeth.o
3912   CC [M]  fs/udf/balloc.o
3913   CC [M]  drivers/net/ethernet/intel/fm10k/fm10k_debugfs.o
3914   CC [M]  fs/udf/dir.o
3915   CC [M]  drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.o
3916   CC [M]  drivers/net/ethernet/intel/i40e/i40e_ptp.o
3917 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_init_one':
3918 drivers/net/ethernet/mellanox/mlx4/main.c:3985:2: error: implicit declaration of function 'devlink_reload_enable'; did you mean 'devlink_region_create'? [-Werror=implicit-function-declaration]
3919   devlink_reload_enable(devlink);
3920   ^~~~~~~~~~~~~~~~~~~~~
3921   devlink_region_create
3922   CC [M]  drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o
3923 drivers/net/ethernet/mellanox/mlx4/main.c: In function 'mlx4_remove_one':
3924 drivers/net/ethernet/mellanox/mlx4/main.c:4097:2: error: implicit declaration of function 'devlink_reload_disable'; did you mean 'devlink_region_destroy'? [-Werror=implicit-function-declaration]
3925   devlink_reload_disable(devlink);
3926   ^~~~~~~~~~~~~~~~~~~~~~
3927   devlink_region_destroy
3928   CC [M]  drivers/net/ethernet/packetengines/hamachi.o
3929   CC [M]  fs/udf/file.o
3930   LD [M]  drivers/net/ethernet/intel/fm10k/fm10k.o
Quoted 5 lines
Quoted 1 line

I haven't tried to trace the issue further yet, sorry.

Any chance you can bisect this? I don't see any obvious reason why this error should be happening, and it isn't showing up here :(

I see the problem as well, with powerpc:defconfig.

Quoted 8 lines
Quoted 5 lines

Underlying issue is that devlink_reload_disable() is only declared in the include file if CONFIG_NET_DEVLINK is enabled. There is no dummy otherwise. The dummy declarations which still exist in 4.19 were removed with commit f6b19b354d50c ("net: devlink: select NET_DEVLINK from drivers") in the upstream kernel.

Ok, let me take part of that patch and backport it. I'll push out a -rc3 now to hopefully resolve this issue.

Ok, that failed horribly :(

Let me work on this after dinner...

thanks,

greg k-h

maintainer
#470 lore raw
In reply to Greg Kroah-Hartman
Quoted 19 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.85-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------

...

Quoted 2 lines

Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: odroidc1: enable the SAR ADC

This commit is generating the following compilation error for ARM ...

arch/arm/boot/dts/meson8b-odroidc1.dtb: ERROR (phandle_references): /soc/cbus@c1100000/adc@8680: Reference to non-existent node or label "vcc_1v8"

ERROR: Input tree has errors, aborting (use -f to force output) scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/meson8b-odroidc1.dtb' failed make[1]: *** [arch/arm/boot/dts/meson8b-odroidc1.dtb] Error 2 arch/arm/Makefile:348: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

Cheers
Jon

Signature · 1 line
nvpublic
author maintainer
#471 lore raw
Quoted 29 lines · Jon Hunter
Quoted 19 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.85-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------

...

Quoted 2 lines

Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: odroidc1: enable the SAR ADC

This commit is generating the following compilation error for ARM ...

Quoted 7 lines

arch/arm/boot/dts/meson8b-odroidc1.dtb: ERROR (phandle_references): /soc/cbus@c1100000/adc@8680: Reference to non-existent node or label "vcc_1v8"

ERROR: Input tree has errors, aborting (use -f to force output) scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/meson8b-odroidc1.dtb' failed make[1]: *** [arch/arm/boot/dts/meson8b-odroidc1.dtb] Error 2 arch/arm/Makefile:348: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

Thanks, will go remove that patch.

greg k-h

author maintainer
#472 lore raw
Quoted 32 lines · Greg Kroah-Hartman
Quoted 31 lines · Jon Hunter
Quoted 19 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.85-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------

...

Quoted 2 lines

Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: odroidc1: enable the SAR ADC

This commit is generating the following compilation error for ARM ...

arch/arm/boot/dts/meson8b-odroidc1.dtb: ERROR (phandle_references): /soc/cbus@c1100000/adc@8680: Reference to non-existent node or label "vcc_1v8"

Quoted 7 lines
Quoted 5 lines

ERROR: Input tree has errors, aborting (use -f to force output) scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/meson8b-odroidc1.dtb' failed make[1]: *** [arch/arm/boot/dts/meson8b-odroidc1.dtb] Error 2 arch/arm/Makefile:348: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

Thanks, will go remove that patch.

-rc2 is out with that patch removed.

thanks,

greg k-h

maintainer
#473 lore raw
Quoted 39 lines · Greg Kroah-Hartman
Quoted 38 lines · Greg Kroah-Hartman
Quoted 36 lines · Jon Hunter
Quoted 19 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.85-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------

...

Quoted 2 lines

Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: odroidc1: enable the SAR ADC

This commit is generating the following compilation error for ARM ...

arch/arm/boot/dts/meson8b-odroidc1.dtb: ERROR (phandle_references): /soc/cbus@c1100000/adc@8680: Reference to non-existent node or label "vcc_1v8"

ERROR: Input tree has errors, aborting (use -f to force output) scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/meson8b-odroidc1.dtb' failed make[1]: *** [arch/arm/boot/dts/meson8b-odroidc1.dtb] Error 2 arch/arm/Makefile:348: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

Quoted 3 lines
Quoted 1 line

Thanks, will go remove that patch.

-rc2 is out with that patch removed.

All tests for Tegra are passing ...

Test results for stable-v4.19:

    12 builds:	12 pass, 0 fail
    22 boots:	22 pass, 0 fail
    32 tests:	32 pass, 0 fail

Linux version: 4.19.85-rc2-gaf1bb7db3102
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,

                tegra194-p2972-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra30-cardhu-a04

Cheers!
Jon

Signature · 1 line
nvpublic
author maintainer
#474 lore raw
Quoted 48 lines · Jon Hunter
Quoted 39 lines · Greg Kroah-Hartman
Quoted 38 lines · Greg Kroah-Hartman
Quoted 36 lines · Jon Hunter
Quoted 19 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.85-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------

...

Quoted 2 lines

Martin Blumenstingl <[email protected]>
ARM: dts: meson8b: odroidc1: enable the SAR ADC

This commit is generating the following compilation error for ARM ...

arch/arm/boot/dts/meson8b-odroidc1.dtb: ERROR (phandle_references): /soc/cbus@c1100000/adc@8680: Reference to non-existent node or label "vcc_1v8"

ERROR: Input tree has errors, aborting (use -f to force output) scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/meson8b-odroidc1.dtb' failed make[1]: *** [arch/arm/boot/dts/meson8b-odroidc1.dtb] Error 2 arch/arm/Makefile:348: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

Quoted 3 lines
Quoted 1 line

Thanks, will go remove that patch.

-rc2 is out with that patch removed.

All tests for Tegra are passing ...

Test results for stable-v4.19:

Quoted 9 lines
    12 builds:	12 pass, 0 fail
    22 boots:	22 pass, 0 fail
    32 tests:	32 pass, 0 fail

Linux version: 4.19.85-rc2-gaf1bb7db3102
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,

                tegra194-p2972-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra30-cardhu-a04

Great, thanks for testing this and 4.14.

greg k-h

#475 lore raw
In reply to Greg Kroah-Hartman
stable-rc/linux-4.19.y boot: 67 boots: 1 failed, 60 passed with 6 offline (v4.19.84-423-g1fd0ac6484bb)

stable-rc/linux-4.19.y boot: 67 boots: 1 failed, 60 passed with 6 offline (v4.19.84-423-g1fd0ac6484bb)

Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-4.19.y/kernel/v4.19.84-423-g1fd0ac6484bb/
Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-4.19.y/kernel/v4.19.84-423-g1fd0ac6484bb/

Tree: stable-rc
Branch: linux-4.19.y
Git Describe: v4.19.84-423-g1fd0ac6484bb
Git Commit: 1fd0ac6484bbc5a0a4e64547a3a27a510d647fc1
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Tested: 59 unique boards, 17 SoC families, 15 builds out of 206

Boot Regressions Detected:

arm:

    bcm2835_defconfig:
        gcc-8:
          bcm2835-rpi-b:
              lab-baylibre-seattle: new failure (last pass: v4.19.84)

    exynos_defconfig:
        gcc-8:
          exynos5422-odroidxu3:
              lab-baylibre: new failure (last pass: v4.19.84)

Boot Failure Detected:

arm:
exynos_defconfig:
gcc-8:
exynos5422-odroidxu3: 1 failed lab

Offline Platforms:

arm64:

    defconfig:
        gcc-8
            juno-r2: 1 offline lab
            mt7622-rfb1: 1 offline lab

arm:

    bcm2835_defconfig:
        gcc-8
            bcm2835-rpi-b: 1 offline lab

    sunxi_defconfig:
        gcc-8
            sun5i-r8-chip: 1 offline lab
            sun7i-a20-bananapi: 1 offline lab

    multi_v7_defconfig:
        gcc-8
            alpine-db: 1 offline lab

---
For more info write to <[email protected]>

#476 lore raw
In reply to Greg Kroah-Hartman
Quoted 8 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

For v4.19.84-420-gd0112da1f7e6:

Build results:

	total: 156 pass: 156 fail: 0
Qemu test results:
	total: 390 pass: 390 fail: 0

Guenter

author maintainer
#477 lore raw
Quoted 10 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.85 release. There are 422 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 21 Nov 2019 05:02:35 +0000. Anything received after that time might be too late.

Quoted 6 lines

For v4.19.84-420-gd0112da1f7e6:

Build results:

	total: 156 pass: 156 fail: 0
Qemu test results:
	total: 390 pass: 390 fail: 0

Great, thanks for testing this, and the others, and letting me know.

greg k-h