kernel: bump 5.15 to 5.15.33
Deleted (upstreamed): generic/backport-5.15/350-v5.18-MIPS-pgalloc-fix-memory-leak-caused-by-pgd_free.patch [1] generic/backport-5.15/730-v5.16-hv-utils-add-PTP_1588_CLOCK-to-Kconfig-to-fix-build.patch [2] generic/pending-5.15/850-0014-PCI-aardvark-Fix-reading-PCI_EXP_RTSTA_PME-bit-on-em.patch [3] generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch [4] Manually rebased: generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch ramips/patches-5.15/710-at803x.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=d29cda15cab086d82d692de016f7249545d4b6b4 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=d5aad7d63b1b5c1f3c4b69e12c05e7c7d196fae8 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=ed750e22e44366e264bcdf7b1cf0713f08f7980a [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=0fe94b84c43cfea867e1721606185e8686d7d32f Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [Refresh patches again] [Remove generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
		 Rui Salvaterra
					Rui Salvaterra
				
			
				
					committed by
					
						 Hauke Mehrtens
						Hauke Mehrtens
					
				
			
			
				
	
			
			
			 Hauke Mehrtens
						Hauke Mehrtens
					
				
			
						parent
						
							5a09eb17c2
						
					
				
				
					commit
					be381a7ac7
				
			| @@ -1,2 +1,2 @@ | |||||||
| LINUX_VERSION-5.15 = .32 | LINUX_VERSION-5.15 = .33 | ||||||
| LINUX_KERNEL_HASH-5.15.32 = 1463cdfa223088610dd65d3eadeffa44ec49746091b8ae8ddac6f3070d17df86 | LINUX_KERNEL_HASH-5.15.33 = c30a17e6090f9ebf2d8ff58cd6c92c7324b1f4a8b3aa6a7f68850310af05a9c4 | ||||||
|   | |||||||
| @@ -90,7 +90,7 @@ it on BCM4708 family. | |||||||
|  /* |  /* | ||||||
|   * Reset a halted HC. |   * Reset a halted HC. | ||||||
|   * |   * | ||||||
| @@ -607,10 +650,20 @@ static int xhci_init(struct usb_hcd *hcd | @@ -605,10 +648,20 @@ static int xhci_init(struct usb_hcd *hcd | ||||||
|   |   | ||||||
|  static int xhci_run_finished(struct xhci_hcd *xhci) |  static int xhci_run_finished(struct xhci_hcd *xhci) | ||||||
|  { |  { | ||||||
| @@ -114,7 +114,7 @@ it on BCM4708 family. | |||||||
|  	xhci->shared_hcd->state = HC_STATE_RUNNING; |  	xhci->shared_hcd->state = HC_STATE_RUNNING; | ||||||
|  	xhci->cmd_ring_state = CMD_RING_STATE_RUNNING; |  	xhci->cmd_ring_state = CMD_RING_STATE_RUNNING; | ||||||
|   |   | ||||||
| @@ -620,6 +673,10 @@ static int xhci_run_finished(struct xhci | @@ -618,6 +671,10 @@ static int xhci_run_finished(struct xhci | ||||||
|  	xhci_dbg_trace(xhci, trace_xhci_dbg_init, |  	xhci_dbg_trace(xhci, trace_xhci_dbg_init, | ||||||
|  			"Finished xhci_run for USB3 roothub"); |  			"Finished xhci_run for USB3 roothub"); | ||||||
|  	return 0; |  	return 0; | ||||||
| @@ -127,7 +127,7 @@ it on BCM4708 family. | |||||||
|  /* |  /* | ||||||
| --- a/drivers/usb/host/xhci.h | --- a/drivers/usb/host/xhci.h | ||||||
| +++ b/drivers/usb/host/xhci.h | +++ b/drivers/usb/host/xhci.h | ||||||
| @@ -1900,6 +1900,7 @@ struct xhci_hcd { | @@ -1903,6 +1903,7 @@ struct xhci_hcd { | ||||||
|  #define XHCI_NO_SOFT_RETRY	BIT_ULL(40) |  #define XHCI_NO_SOFT_RETRY	BIT_ULL(40) | ||||||
|  #define XHCI_BROKEN_D3COLD	BIT_ULL(41) |  #define XHCI_BROKEN_D3COLD	BIT_ULL(41) | ||||||
|  #define XHCI_EP_CTX_BROKEN_DCS	BIT_ULL(42) |  #define XHCI_EP_CTX_BROKEN_DCS	BIT_ULL(42) | ||||||
|   | |||||||
| @@ -1,48 +0,0 @@ | |||||||
| From 7f297c70bebd20f3e02c9b6046e4e5e71d38ffe9 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Yaliang Wang <Yaliang.Wang@windriver.com> |  | ||||||
| Date: Thu, 10 Mar 2022 19:31:16 +0800 |  | ||||||
| Subject: [PATCH] MIPS: pgalloc: fix memory leak caused by pgd_free() |  | ||||||
|  |  | ||||||
| pgd page is freed by generic implementation pgd_free() since commit |  | ||||||
| f9cb654cb550 ("asm-generic: pgalloc: provide generic pgd_free()"), |  | ||||||
| however, there are scenarios that the system uses more than one page as |  | ||||||
| the pgd table, in such cases the generic implementation pgd_free() won't |  | ||||||
| be applicable anymore. For example, when PAGE_SIZE_4KB is enabled and |  | ||||||
| MIPS_VA_BITS_48 is not enabled in a 64bit system, the macro "PGD_ORDER" |  | ||||||
| will be set as "1", which will cause allocating two pages as the pgd |  | ||||||
| table. Well, at the same time, the generic implementation pgd_free() |  | ||||||
| just free one pgd page, which will result in the memory leak. |  | ||||||
|  |  | ||||||
| The memory leak can be easily detected by executing shell command: |  | ||||||
| "while true; do ls > /dev/null; grep MemFree /proc/meminfo; done" |  | ||||||
|  |  | ||||||
| Fixes: f9cb654cb550 ("asm-generic: pgalloc: provide generic pgd_free()") |  | ||||||
| Signed-off-by: Yaliang Wang <Yaliang.Wang@windriver.com> |  | ||||||
| Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> |  | ||||||
| (cherry picked from commit 2bc5bab9a763d520937e4f3fe8df51c6a1eceb97) |  | ||||||
| --- |  | ||||||
|  arch/mips/include/asm/pgalloc.h | 6 ++++++ |  | ||||||
|  1 file changed, 6 insertions(+) |  | ||||||
|  |  | ||||||
| --- a/arch/mips/include/asm/pgalloc.h |  | ||||||
| +++ b/arch/mips/include/asm/pgalloc.h |  | ||||||
| @@ -15,6 +15,7 @@ |  | ||||||
|   |  | ||||||
|  #define __HAVE_ARCH_PMD_ALLOC_ONE |  | ||||||
|  #define __HAVE_ARCH_PUD_ALLOC_ONE |  | ||||||
| +#define __HAVE_ARCH_PGD_FREE |  | ||||||
|  #include <asm-generic/pgalloc.h> |  | ||||||
|   |  | ||||||
|  static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, |  | ||||||
| @@ -48,6 +49,11 @@ static inline void pud_populate(struct m |  | ||||||
|  extern void pgd_init(unsigned long page); |  | ||||||
|  extern pgd_t *pgd_alloc(struct mm_struct *mm); |  | ||||||
|   |  | ||||||
| +static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) |  | ||||||
| +{ |  | ||||||
| +	free_pages((unsigned long)pgd, PGD_ORDER); |  | ||||||
| +} |  | ||||||
| + |  | ||||||
|  #define __pte_free_tlb(tlb,pte,address)			\ |  | ||||||
|  do {							\ |  | ||||||
|  	pgtable_pte_page_dtor(pte);			\ |  | ||||||
| @@ -16,11 +16,9 @@ Link: https://lore.kernel.org/linux-mtd/20220320100001.247905-2-gch981213@gmail. | |||||||
|  drivers/mtd/nand/spi/gigadevice.c | 10 +++++++++- |  drivers/mtd/nand/spi/gigadevice.c | 10 +++++++++- | ||||||
|  1 file changed, 9 insertions(+), 1 deletion(-) |  1 file changed, 9 insertions(+), 1 deletion(-) | ||||||
|  |  | ||||||
| diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c |  | ||||||
| index 1dd1c5898093..da77ab20296e 100644 |  | ||||||
| --- a/drivers/mtd/nand/spi/gigadevice.c | --- a/drivers/mtd/nand/spi/gigadevice.c | ||||||
| +++ b/drivers/mtd/nand/spi/gigadevice.c | +++ b/drivers/mtd/nand/spi/gigadevice.c | ||||||
| @@ -39,6 +39,14 @@ static SPINAND_OP_VARIANTS(read_cache_variants_f, | @@ -39,6 +39,14 @@ static SPINAND_OP_VARIANTS(read_cache_va | ||||||
|  		SPINAND_PAGE_READ_FROM_CACHE_OP_3A(true, 0, 1, NULL, 0), |  		SPINAND_PAGE_READ_FROM_CACHE_OP_3A(true, 0, 1, NULL, 0), | ||||||
|  		SPINAND_PAGE_READ_FROM_CACHE_OP_3A(false, 0, 0, NULL, 0)); |  		SPINAND_PAGE_READ_FROM_CACHE_OP_3A(false, 0, 0, NULL, 0)); | ||||||
|   |   | ||||||
| @@ -35,7 +33,7 @@ index 1dd1c5898093..da77ab20296e 100644 | |||||||
|  static SPINAND_OP_VARIANTS(write_cache_variants, |  static SPINAND_OP_VARIANTS(write_cache_variants, | ||||||
|  		SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), |  		SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), | ||||||
|  		SPINAND_PROG_LOAD(true, 0, NULL, 0)); |  		SPINAND_PROG_LOAD(true, 0, NULL, 0)); | ||||||
| @@ -339,7 +347,7 @@ static const struct spinand_info gigadevice_spinand_table[] = { | @@ -339,7 +347,7 @@ static const struct spinand_info gigadev | ||||||
|  		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x51), |  		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x51), | ||||||
|  		     NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1), |  		     NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1), | ||||||
|  		     NAND_ECCREQ(4, 512), |  		     NAND_ECCREQ(4, 512), | ||||||
| @@ -44,6 +42,3 @@ index 1dd1c5898093..da77ab20296e 100644 | |||||||
|  					      &write_cache_variants, |  					      &write_cache_variants, | ||||||
|  					      &update_cache_variants), |  					      &update_cache_variants), | ||||||
|  		     SPINAND_HAS_QE_BIT, |  		     SPINAND_HAS_QE_BIT, | ||||||
| --  |  | ||||||
| 2.35.1 |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -17,11 +17,9 @@ Link: https://lore.kernel.org/linux-mtd/20220320100001.247905-3-gch981213@gmail. | |||||||
|  drivers/mtd/nand/spi/gigadevice.c | 30 ++++++++++++++++++++++++++++++ |  drivers/mtd/nand/spi/gigadevice.c | 30 ++++++++++++++++++++++++++++++ | ||||||
|  1 file changed, 30 insertions(+) |  1 file changed, 30 insertions(+) | ||||||
|  |  | ||||||
| diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c |  | ||||||
| index da77ab20296e..85a61d3d8467 100644 |  | ||||||
| --- a/drivers/mtd/nand/spi/gigadevice.c | --- a/drivers/mtd/nand/spi/gigadevice.c | ||||||
| +++ b/drivers/mtd/nand/spi/gigadevice.c | +++ b/drivers/mtd/nand/spi/gigadevice.c | ||||||
| @@ -333,6 +333,36 @@ static const struct spinand_info gigadevice_spinand_table[] = { | @@ -333,6 +333,36 @@ static const struct spinand_info gigadev | ||||||
|  		     SPINAND_HAS_QE_BIT, |  		     SPINAND_HAS_QE_BIT, | ||||||
|  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, |  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, | ||||||
|  				     gd5fxgq4uexxg_ecc_get_status)), |  				     gd5fxgq4uexxg_ecc_get_status)), | ||||||
| @@ -58,6 +56,3 @@ index da77ab20296e..85a61d3d8467 100644 | |||||||
|  	SPINAND_INFO("GD5F1GQ4UFxxG", |  	SPINAND_INFO("GD5F1GQ4UFxxG", | ||||||
|  		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE, 0xb1, 0x48), |  		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE, 0xb1, 0x48), | ||||||
|  		     NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1), |  		     NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1), | ||||||
| --  |  | ||||||
| 2.35.1 |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -12,11 +12,9 @@ Link: https://lore.kernel.org/linux-mtd/20220320100001.247905-4-gch981213@gmail. | |||||||
|  drivers/mtd/nand/spi/gigadevice.c | 10 ++++++++++ |  drivers/mtd/nand/spi/gigadevice.c | 10 ++++++++++ | ||||||
|  1 file changed, 10 insertions(+) |  1 file changed, 10 insertions(+) | ||||||
|  |  | ||||||
| diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c |  | ||||||
| index 85a61d3d8467..d519bb85f0e7 100644 |  | ||||||
| --- a/drivers/mtd/nand/spi/gigadevice.c | --- a/drivers/mtd/nand/spi/gigadevice.c | ||||||
| +++ b/drivers/mtd/nand/spi/gigadevice.c | +++ b/drivers/mtd/nand/spi/gigadevice.c | ||||||
| @@ -383,6 +383,16 @@ static const struct spinand_info gigadevice_spinand_table[] = { | @@ -383,6 +383,16 @@ static const struct spinand_info gigadev | ||||||
|  		     SPINAND_HAS_QE_BIT, |  		     SPINAND_HAS_QE_BIT, | ||||||
|  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, |  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, | ||||||
|  				     gd5fxgq5xexxg_ecc_get_status)), |  				     gd5fxgq5xexxg_ecc_get_status)), | ||||||
| @@ -33,6 +31,3 @@ index 85a61d3d8467..d519bb85f0e7 100644 | |||||||
|  }; |  }; | ||||||
|   |   | ||||||
|  static const struct spinand_manufacturer_ops gigadevice_spinand_manuf_ops = { |  static const struct spinand_manufacturer_ops gigadevice_spinand_manuf_ops = { | ||||||
| --  |  | ||||||
| 2.35.1 |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,11 +18,9 @@ Link: https://lore.kernel.org/linux-mtd/20220320100001.247905-5-gch981213@gmail. | |||||||
|  drivers/mtd/nand/spi/gigadevice.c | 48 +++++++++++++++++++++++++++++++ |  drivers/mtd/nand/spi/gigadevice.c | 48 +++++++++++++++++++++++++++++++ | ||||||
|  1 file changed, 48 insertions(+) |  1 file changed, 48 insertions(+) | ||||||
|  |  | ||||||
| diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c |  | ||||||
| index d519bb85f0e7..fcd1c4e474a2 100644 |  | ||||||
| --- a/drivers/mtd/nand/spi/gigadevice.c | --- a/drivers/mtd/nand/spi/gigadevice.c | ||||||
| +++ b/drivers/mtd/nand/spi/gigadevice.c | +++ b/drivers/mtd/nand/spi/gigadevice.c | ||||||
| @@ -47,6 +47,14 @@ static SPINAND_OP_VARIANTS(read_cache_variants_1gq5, | @@ -47,6 +47,14 @@ static SPINAND_OP_VARIANTS(read_cache_va | ||||||
|  		SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0), |  		SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0), | ||||||
|  		SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); |  		SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); | ||||||
|   |   | ||||||
| @@ -37,10 +35,12 @@ index d519bb85f0e7..fcd1c4e474a2 100644 | |||||||
|  static SPINAND_OP_VARIANTS(write_cache_variants, |  static SPINAND_OP_VARIANTS(write_cache_variants, | ||||||
|  		SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), |  		SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), | ||||||
|  		SPINAND_PROG_LOAD(true, 0, NULL, 0)); |  		SPINAND_PROG_LOAD(true, 0, NULL, 0)); | ||||||
| @@ -393,6 +401,46 @@ static const struct spinand_info gigadevice_spinand_table[] = { | @@ -391,6 +399,46 @@ static const struct spinand_info gigadev | ||||||
|  |  					      &write_cache_variants, | ||||||
|  |  					      &update_cache_variants), | ||||||
|  		     SPINAND_HAS_QE_BIT, |  		     SPINAND_HAS_QE_BIT, | ||||||
|  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, | +		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, | ||||||
|  				     gd5fxgq5xexxg_ecc_get_status)), | +				     gd5fxgq5xexxg_ecc_get_status)), | ||||||
| +	SPINAND_INFO("GD5F2GQ5UExxG", | +	SPINAND_INFO("GD5F2GQ5UExxG", | ||||||
| +		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x52), | +		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x52), | ||||||
| +		     NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1), | +		     NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1), | ||||||
| @@ -79,11 +79,6 @@ index d519bb85f0e7..fcd1c4e474a2 100644 | |||||||
| +					      &write_cache_variants, | +					      &write_cache_variants, | ||||||
| +					      &update_cache_variants), | +					      &update_cache_variants), | ||||||
| +		     SPINAND_HAS_QE_BIT, | +		     SPINAND_HAS_QE_BIT, | ||||||
| +		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, |  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, | ||||||
| +				     gd5fxgq5xexxg_ecc_get_status)), |  				     gd5fxgq5xexxg_ecc_get_status)), | ||||||
|  }; |  }; | ||||||
|   |  | ||||||
|  static const struct spinand_manufacturer_ops gigadevice_spinand_manuf_ops = { |  | ||||||
| --  |  | ||||||
| 2.35.1 |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -20,11 +20,9 @@ Link: https://lore.kernel.org/linux-mtd/20220320100001.247905-6-gch981213@gmail. | |||||||
|  drivers/mtd/nand/spi/gigadevice.c | 60 +++++++++++++++++++++++++++++++ |  drivers/mtd/nand/spi/gigadevice.c | 60 +++++++++++++++++++++++++++++++ | ||||||
|  1 file changed, 60 insertions(+) |  1 file changed, 60 insertions(+) | ||||||
|  |  | ||||||
| diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c |  | ||||||
| index fcd1c4e474a2..6b043e24855f 100644 |  | ||||||
| --- a/drivers/mtd/nand/spi/gigadevice.c | --- a/drivers/mtd/nand/spi/gigadevice.c | ||||||
| +++ b/drivers/mtd/nand/spi/gigadevice.c | +++ b/drivers/mtd/nand/spi/gigadevice.c | ||||||
| @@ -441,6 +441,66 @@ static const struct spinand_info gigadevice_spinand_table[] = { | @@ -441,6 +441,66 @@ static const struct spinand_info gigadev | ||||||
|  		     SPINAND_HAS_QE_BIT, |  		     SPINAND_HAS_QE_BIT, | ||||||
|  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, |  		     SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout, | ||||||
|  				     gd5fxgq5xexxg_ecc_get_status)), |  				     gd5fxgq5xexxg_ecc_get_status)), | ||||||
| @@ -91,6 +89,3 @@ index fcd1c4e474a2..6b043e24855f 100644 | |||||||
|  }; |  }; | ||||||
|   |   | ||||||
|  static const struct spinand_manufacturer_ops gigadevice_spinand_manuf_ops = { |  static const struct spinand_manufacturer_ops gigadevice_spinand_manuf_ops = { | ||||||
| --  |  | ||||||
| 2.35.1 |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,46 +0,0 @@ | |||||||
| From fba2153a200716c1fec1eafda7356bb347589efb Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Randy Dunlap <rdunlap@infradead.org> |  | ||||||
| Date: Thu, 25 Nov 2021 18:33:16 -0800 |  | ||||||
| Subject: [PATCH] hv: utils: add PTP_1588_CLOCK to Kconfig to fix build |  | ||||||
|  |  | ||||||
| The hyperv utilities use PTP clock interfaces and should depend a |  | ||||||
| a kconfig symbol such that they will be built as a loadable module or |  | ||||||
| builtin so that linker errors do not happen. |  | ||||||
|  |  | ||||||
| Prevents these build errors: |  | ||||||
|  |  | ||||||
| ld: drivers/hv/hv_util.o: in function `hv_timesync_deinit': |  | ||||||
| hv_util.c:(.text+0x37d): undefined reference to `ptp_clock_unregister' |  | ||||||
| ld: drivers/hv/hv_util.o: in function `hv_timesync_init': |  | ||||||
| hv_util.c:(.text+0x738): undefined reference to `ptp_clock_register' |  | ||||||
|  |  | ||||||
| References: https://lore.kernel.org/stable/20220328093115.7486-1-ynezz@true.cz/T/#u |  | ||||||
| Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source") |  | ||||||
| Signed-off-by: Randy Dunlap <rdunlap@infradead.org> |  | ||||||
| Reported-by: kernel test robot <lkp@intel.com> |  | ||||||
| Cc: Arnd Bergmann <arnd@arndb.de> |  | ||||||
| Cc: "K. Y. Srinivasan" <kys@microsoft.com> |  | ||||||
| Cc: Haiyang Zhang <haiyangz@microsoft.com> |  | ||||||
| Cc: Stephen Hemminger <sthemmin@microsoft.com> |  | ||||||
| Cc: Wei Liu <wei.liu@kernel.org> |  | ||||||
| Cc: Dexuan Cui <decui@microsoft.com> |  | ||||||
| Cc: linux-hyperv@vger.kernel.org |  | ||||||
| Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |  | ||||||
| Reviewed-by: Michael Kelley <mikelley@microsoft.com> |  | ||||||
| Link: https://lore.kernel.org/r/20211126023316.25184-1-rdunlap@infradead.org |  | ||||||
| Signed-off-by: Wei Liu <wei.liu@kernel.org> |  | ||||||
| (cherry picked from commit 1dc2f2b81a6a9895da59f3915760f6c0c3074492) |  | ||||||
| --- |  | ||||||
|  drivers/hv/Kconfig | 1 + |  | ||||||
|  1 file changed, 1 insertion(+) |  | ||||||
|  |  | ||||||
| --- a/drivers/hv/Kconfig |  | ||||||
| +++ b/drivers/hv/Kconfig |  | ||||||
| @@ -18,6 +18,7 @@ config HYPERV_TIMER |  | ||||||
|  config HYPERV_UTILS |  | ||||||
|  	tristate "Microsoft Hyper-V Utilities driver" |  | ||||||
|  	depends on HYPERV && CONNECTOR && NLS |  | ||||||
| +	depends on PTP_1588_CLOCK_OPTIONAL |  | ||||||
|  	help |  | ||||||
|  	  Select this option to enable the Hyper-V Utilities. |  | ||||||
|   |  | ||||||
| @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  |  | ||||||
| --- a/drivers/net/phy/at803x.c | --- a/drivers/net/phy/at803x.c | ||||||
| +++ b/drivers/net/phy/at803x.c | +++ b/drivers/net/phy/at803x.c | ||||||
| @@ -1420,6 +1420,19 @@ static struct phy_driver at803x_driver[] | @@ -1412,6 +1412,19 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_sset_count = at803x_get_sset_count, |  	.get_sset_count = at803x_get_sset_count, | ||||||
|  	.get_strings = at803x_get_strings, |  	.get_strings = at803x_get_strings, | ||||||
|  	.get_stats = at803x_get_stats, |  	.get_stats = at803x_get_stats, | ||||||
| @@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  }, }; |  }, }; | ||||||
|   |   | ||||||
|  module_phy_driver(at803x_driver); |  module_phy_driver(at803x_driver); | ||||||
| @@ -1430,6 +1443,8 @@ static struct mdio_device_id __maybe_unu | @@ -1422,6 +1435,8 @@ static struct mdio_device_id __maybe_unu | ||||||
|  	{ PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) }, |  	{ PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) }, | ||||||
|  	{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, |  	{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, | ||||||
|  	{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, |  	{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  #define QCA8337_PHY_ID				0x004dd036 |  #define QCA8337_PHY_ID				0x004dd036 | ||||||
|  #define QCA8K_PHY_ID_MASK			0xffffffff |  #define QCA8K_PHY_ID_MASK			0xffffffff | ||||||
|   |   | ||||||
| @@ -1421,10 +1422,23 @@ static struct phy_driver at803x_driver[] | @@ -1413,10 +1414,23 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_strings = at803x_get_strings, |  	.get_strings = at803x_get_strings, | ||||||
|  	.get_stats = at803x_get_stats, |  	.get_stats = at803x_get_stats, | ||||||
|  }, { |  }, { | ||||||
| @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  	/* PHY_GBIT_FEATURES */ |  	/* PHY_GBIT_FEATURES */ | ||||||
|  	.probe = at803x_probe, |  	.probe = at803x_probe, | ||||||
|  	.flags = PHY_IS_INTERNAL, |  	.flags = PHY_IS_INTERNAL, | ||||||
| @@ -1444,7 +1458,8 @@ static struct mdio_device_id __maybe_unu | @@ -1436,7 +1450,8 @@ static struct mdio_device_id __maybe_unu | ||||||
|  	{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, |  	{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, | ||||||
|  	{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, |  	{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, | ||||||
|  	{ PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) }, |  	{ PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) }, | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  |  | ||||||
| --- a/drivers/net/phy/at803x.c | --- a/drivers/net/phy/at803x.c | ||||||
| +++ b/drivers/net/phy/at803x.c | +++ b/drivers/net/phy/at803x.c | ||||||
| @@ -1421,6 +1421,8 @@ static struct phy_driver at803x_driver[] | @@ -1413,6 +1413,8 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_sset_count = at803x_get_sset_count, |  	.get_sset_count = at803x_get_sset_count, | ||||||
|  	.get_strings = at803x_get_strings, |  	.get_strings = at803x_get_strings, | ||||||
|  	.get_stats = at803x_get_stats, |  	.get_stats = at803x_get_stats, | ||||||
| @@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  }, { |  }, { | ||||||
|  	/* QCA8327-A from switch QCA8327-AL1A */ |  	/* QCA8327-A from switch QCA8327-AL1A */ | ||||||
|  	.phy_id = QCA8327_A_PHY_ID, |  	.phy_id = QCA8327_A_PHY_ID, | ||||||
| @@ -1434,6 +1436,8 @@ static struct phy_driver at803x_driver[] | @@ -1426,6 +1428,8 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_sset_count = at803x_get_sset_count, |  	.get_sset_count = at803x_get_sset_count, | ||||||
|  	.get_strings = at803x_get_strings, |  	.get_strings = at803x_get_strings, | ||||||
|  	.get_stats = at803x_get_stats, |  	.get_stats = at803x_get_stats, | ||||||
| @@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  }, { |  }, { | ||||||
|  	/* QCA8327-B from switch QCA8327-BL1A */ |  	/* QCA8327-B from switch QCA8327-BL1A */ | ||||||
|  	.phy_id = QCA8327_B_PHY_ID, |  	.phy_id = QCA8327_B_PHY_ID, | ||||||
| @@ -1447,6 +1451,8 @@ static struct phy_driver at803x_driver[] | @@ -1439,6 +1443,8 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_sset_count = at803x_get_sset_count, |  	.get_sset_count = at803x_get_sset_count, | ||||||
|  	.get_strings = at803x_get_strings, |  	.get_strings = at803x_get_strings, | ||||||
|  	.get_stats = at803x_get_stats, |  	.get_stats = at803x_get_stats, | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  |  | ||||||
| --- a/drivers/net/phy/at803x.c | --- a/drivers/net/phy/at803x.c | ||||||
| +++ b/drivers/net/phy/at803x.c | +++ b/drivers/net/phy/at803x.c | ||||||
| @@ -1410,47 +1410,47 @@ static struct phy_driver at803x_driver[] | @@ -1402,47 +1402,47 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.config_aneg		= at803x_config_aneg, |  	.config_aneg		= at803x_config_aneg, | ||||||
|  }, { |  }, { | ||||||
|  	/* QCA8337 */ |  	/* QCA8337 */ | ||||||
|   | |||||||
| @@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|   |   | ||||||
|  #define AT803X_DEBUG_REG_1F			0x1F |  #define AT803X_DEBUG_REG_1F			0x1F | ||||||
|  #define AT803X_DEBUG_PLL_ON			BIT(2) |  #define AT803X_DEBUG_PLL_ON			BIT(2) | ||||||
| @@ -1312,6 +1317,58 @@ static int qca83xx_config_init(struct ph | @@ -1304,6 +1309,58 @@ static int qca83xx_config_init(struct ph | ||||||
|  	return 0; |  	return 0; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -96,7 +96,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  static struct phy_driver at803x_driver[] = { |  static struct phy_driver at803x_driver[] = { | ||||||
|  { |  { | ||||||
|  	/* Qualcomm Atheros AR8035 */ |  	/* Qualcomm Atheros AR8035 */ | ||||||
| @@ -1421,8 +1478,8 @@ static struct phy_driver at803x_driver[] | @@ -1413,8 +1470,8 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_sset_count		= at803x_get_sset_count, |  	.get_sset_count		= at803x_get_sset_count, | ||||||
|  	.get_strings		= at803x_get_strings, |  	.get_strings		= at803x_get_strings, | ||||||
|  	.get_stats		= at803x_get_stats, |  	.get_stats		= at803x_get_stats, | ||||||
| @@ -107,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  }, { |  }, { | ||||||
|  	/* QCA8327-A from switch QCA8327-AL1A */ |  	/* QCA8327-A from switch QCA8327-AL1A */ | ||||||
|  	.phy_id			= QCA8327_A_PHY_ID, |  	.phy_id			= QCA8327_A_PHY_ID, | ||||||
| @@ -1436,8 +1493,8 @@ static struct phy_driver at803x_driver[] | @@ -1428,8 +1485,8 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_sset_count		= at803x_get_sset_count, |  	.get_sset_count		= at803x_get_sset_count, | ||||||
|  	.get_strings		= at803x_get_strings, |  	.get_strings		= at803x_get_strings, | ||||||
|  	.get_stats		= at803x_get_stats, |  	.get_stats		= at803x_get_stats, | ||||||
| @@ -118,7 +118,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  }, { |  }, { | ||||||
|  	/* QCA8327-B from switch QCA8327-BL1A */ |  	/* QCA8327-B from switch QCA8327-BL1A */ | ||||||
|  	.phy_id			= QCA8327_B_PHY_ID, |  	.phy_id			= QCA8327_B_PHY_ID, | ||||||
| @@ -1451,8 +1508,8 @@ static struct phy_driver at803x_driver[] | @@ -1443,8 +1500,8 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.get_sset_count		= at803x_get_sset_count, |  	.get_sset_count		= at803x_get_sset_count, | ||||||
|  	.get_strings		= at803x_get_strings, |  	.get_strings		= at803x_get_strings, | ||||||
|  	.get_stats		= at803x_get_stats, |  	.get_stats		= at803x_get_stats, | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  #define AT803X_DEBUG_RX_CLK_DLY_EN		BIT(15) |  #define AT803X_DEBUG_RX_CLK_DLY_EN		BIT(15) | ||||||
|   |   | ||||||
|  #define AT803X_DEBUG_REG_5			0x05 |  #define AT803X_DEBUG_REG_5			0x05 | ||||||
| @@ -1314,9 +1316,37 @@ static int qca83xx_config_init(struct ph | @@ -1306,9 +1308,37 @@ static int qca83xx_config_init(struct ph | ||||||
|  		break; |  		break; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  static int qca83xx_resume(struct phy_device *phydev) |  static int qca83xx_resume(struct phy_device *phydev) | ||||||
|  { |  { | ||||||
|  	int ret, val; |  	int ret, val; | ||||||
| @@ -1471,6 +1501,7 @@ static struct phy_driver at803x_driver[] | @@ -1463,6 +1493,7 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.phy_id_mask		= QCA8K_PHY_ID_MASK, |  	.phy_id_mask		= QCA8K_PHY_ID_MASK, | ||||||
|  	.name			= "Qualcomm Atheros 8337 internal PHY", |  	.name			= "Qualcomm Atheros 8337 internal PHY", | ||||||
|  	/* PHY_GBIT_FEATURES */ |  	/* PHY_GBIT_FEATURES */ | ||||||
| @@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  	.probe			= at803x_probe, |  	.probe			= at803x_probe, | ||||||
|  	.flags			= PHY_IS_INTERNAL, |  	.flags			= PHY_IS_INTERNAL, | ||||||
|  	.config_init		= qca83xx_config_init, |  	.config_init		= qca83xx_config_init, | ||||||
| @@ -1486,6 +1517,7 @@ static struct phy_driver at803x_driver[] | @@ -1478,6 +1509,7 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.phy_id_mask		= QCA8K_PHY_ID_MASK, |  	.phy_id_mask		= QCA8K_PHY_ID_MASK, | ||||||
|  	.name			= "Qualcomm Atheros 8327-A internal PHY", |  	.name			= "Qualcomm Atheros 8327-A internal PHY", | ||||||
|  	/* PHY_GBIT_FEATURES */ |  	/* PHY_GBIT_FEATURES */ | ||||||
| @@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  	.probe			= at803x_probe, |  	.probe			= at803x_probe, | ||||||
|  	.flags			= PHY_IS_INTERNAL, |  	.flags			= PHY_IS_INTERNAL, | ||||||
|  	.config_init		= qca83xx_config_init, |  	.config_init		= qca83xx_config_init, | ||||||
| @@ -1501,6 +1533,7 @@ static struct phy_driver at803x_driver[] | @@ -1493,6 +1525,7 @@ static struct phy_driver at803x_driver[] | ||||||
|  	.phy_id_mask		= QCA8K_PHY_ID_MASK, |  	.phy_id_mask		= QCA8K_PHY_ID_MASK, | ||||||
|  	.name			= "Qualcomm Atheros 8327-B internal PHY", |  	.name			= "Qualcomm Atheros 8327-B internal PHY", | ||||||
|  	/* PHY_GBIT_FEATURES */ |  	/* PHY_GBIT_FEATURES */ | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  |  | ||||||
| --- a/drivers/net/phy/at803x.c | --- a/drivers/net/phy/at803x.c | ||||||
| +++ b/drivers/net/phy/at803x.c | +++ b/drivers/net/phy/at803x.c | ||||||
| @@ -1325,6 +1325,9 @@ static int qca83xx_config_init(struct ph | @@ -1317,6 +1317,9 @@ static int qca83xx_config_init(struct ph | ||||||
|  		at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, |  		at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, | ||||||
|  				      QCA8327_DEBUG_MANU_CTRL_EN, 0); |  				      QCA8327_DEBUG_MANU_CTRL_EN, 0); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  				     AT803X_DEBUG_TX_CLK_DLY_EN, 0); |  				     AT803X_DEBUG_TX_CLK_DLY_EN, 0); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -1300,9 +1300,9 @@ static int qca83xx_config_init(struct ph | @@ -1292,9 +1292,9 @@ static int qca83xx_config_init(struct ph | ||||||
|  	switch (switch_revision) { |  	switch (switch_revision) { | ||||||
|  	case 1: |  	case 1: | ||||||
|  		/* For 100M waveform */ |  		/* For 100M waveform */ | ||||||
| @@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  		break; |  		break; | ||||||
|   |   | ||||||
|  	case 2: |  	case 2: | ||||||
| @@ -1310,8 +1310,8 @@ static int qca83xx_config_init(struct ph | @@ -1302,8 +1302,8 @@ static int qca83xx_config_init(struct ph | ||||||
|  		fallthrough; |  		fallthrough; | ||||||
|  	case 4: |  	case 4: | ||||||
|  		phy_write_mmd(phydev, MDIO_MMD_PCS, MDIO_AZ_DEBUG, 0x803f); |  		phy_write_mmd(phydev, MDIO_MMD_PCS, MDIO_AZ_DEBUG, 0x803f); | ||||||
| @@ -92,7 +92,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  		at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3C, 0x6000); |  		at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3C, 0x6000); | ||||||
|  		break; |  		break; | ||||||
|  	} |  	} | ||||||
| @@ -1322,7 +1322,7 @@ static int qca83xx_config_init(struct ph | @@ -1314,7 +1314,7 @@ static int qca83xx_config_init(struct ph | ||||||
|  	 */ |  	 */ | ||||||
|  	if (phydev->drv->phy_id == QCA8327_A_PHY_ID || |  	if (phydev->drv->phy_id == QCA8327_A_PHY_ID || | ||||||
|  	    phydev->drv->phy_id == QCA8327_B_PHY_ID) |  	    phydev->drv->phy_id == QCA8327_B_PHY_ID) | ||||||
| @@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  				      QCA8327_DEBUG_MANU_CTRL_EN, 0); |  				      QCA8327_DEBUG_MANU_CTRL_EN, 0); | ||||||
|   |   | ||||||
|  	/* Following original QCA sourcecode set port to prefer master */ |  	/* Following original QCA sourcecode set port to prefer master */ | ||||||
| @@ -1340,12 +1340,12 @@ static void qca83xx_link_change_notify(s | @@ -1332,12 +1332,12 @@ static void qca83xx_link_change_notify(s | ||||||
|  	/* Set DAC Amplitude adjustment to +6% for 100m on link running */ |  	/* Set DAC Amplitude adjustment to +6% for 100m on link running */ | ||||||
|  	if (phydev->state == PHY_RUNNING) { |  	if (phydev->state == PHY_RUNNING) { | ||||||
|  		if (phydev->speed == SPEED_100) |  		if (phydev->speed == SPEED_100) | ||||||
| @@ -116,7 +116,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> | |||||||
|  				      QCA8327_DEBUG_MANU_CTRL_EN, 0); |  				      QCA8327_DEBUG_MANU_CTRL_EN, 0); | ||||||
|  	} |  	} | ||||||
|  } |  } | ||||||
| @@ -1392,7 +1392,7 @@ static int qca83xx_suspend(struct phy_de | @@ -1384,7 +1384,7 @@ static int qca83xx_suspend(struct phy_de | ||||||
|  		phy_modify(phydev, MII_BMCR, mask, 0); |  		phy_modify(phydev, MII_BMCR, mask, 0); | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -874,8 +874,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru | @@ -876,8 +876,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru | ||||||
|   |   | ||||||
|  	case PCI_EXP_DEVCAP: |  	case PCI_EXP_DEVCAP: | ||||||
|  	case PCI_EXP_DEVCTL: |  	case PCI_EXP_DEVCTL: | ||||||
| @@ -35,7 +35,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  	default: |  	default: | ||||||
|  		return PCI_BRIDGE_EMUL_NOT_HANDLED; |  		return PCI_BRIDGE_EMUL_NOT_HANDLED; | ||||||
|  	} |  	} | ||||||
| @@ -889,10 +894,6 @@ advk_pci_bridge_emul_pcie_conf_write(str | @@ -891,10 +896,6 @@ advk_pci_bridge_emul_pcie_conf_write(str | ||||||
|  	struct advk_pcie *pcie = bridge->data; |  	struct advk_pcie *pcie = bridge->data; | ||||||
|   |   | ||||||
|  	switch (reg) { |  	switch (reg) { | ||||||
| @@ -46,7 +46,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  	case PCI_EXP_LNKCTL: |  	case PCI_EXP_LNKCTL: | ||||||
|  		advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg); |  		advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg); | ||||||
|  		if (new & PCI_EXP_LNKCTL_RL) |  		if (new & PCI_EXP_LNKCTL_RL) | ||||||
| @@ -914,6 +915,12 @@ advk_pci_bridge_emul_pcie_conf_write(str | @@ -916,6 +917,12 @@ advk_pci_bridge_emul_pcie_conf_write(str | ||||||
|  		advk_writel(pcie, new, PCIE_ISR0_REG); |  		advk_writel(pcie, new, PCIE_ISR0_REG); | ||||||
|  		break; |  		break; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|   |   | ||||||
|  	/* Enable summary interrupt for GIC SPI source */ |  	/* Enable summary interrupt for GIC SPI source */ | ||||||
|  	reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK); |  	reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK); | ||||||
| @@ -1392,7 +1394,7 @@ static void advk_pcie_handle_msi(struct | @@ -1393,7 +1395,7 @@ static void advk_pcie_handle_msi(struct | ||||||
|   |   | ||||||
|  	msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG); |  	msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG); | ||||||
|  	msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG); |  	msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG); | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1688,11 +1688,13 @@ static int advk_pcie_remove(struct platf | @@ -1685,11 +1685,13 @@ static int advk_pcie_remove(struct platf | ||||||
|  	struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); |  	struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); | ||||||
|  	int i; |  	int i; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1686,6 +1686,7 @@ static int advk_pcie_remove(struct platf | @@ -1683,6 +1683,7 @@ static int advk_pcie_remove(struct platf | ||||||
|  { |  { | ||||||
|  	struct advk_pcie *pcie = platform_get_drvdata(pdev); |  	struct advk_pcie *pcie = platform_get_drvdata(pdev); | ||||||
|  	struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); |  	struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); | ||||||
| @@ -27,7 +27,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  	int i; |  	int i; | ||||||
|   |   | ||||||
|  	/* Remove PCI bus with all devices */ |  	/* Remove PCI bus with all devices */ | ||||||
| @@ -1694,6 +1695,11 @@ static int advk_pcie_remove(struct platf | @@ -1691,6 +1692,11 @@ static int advk_pcie_remove(struct platf | ||||||
|  	pci_remove_root_bus(bridge->bus); |  	pci_remove_root_bus(bridge->bus); | ||||||
|  	pci_unlock_rescan_remove(); |  	pci_unlock_rescan_remove(); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1700,6 +1700,27 @@ static int advk_pcie_remove(struct platf | @@ -1697,6 +1697,27 @@ static int advk_pcie_remove(struct platf | ||||||
|  	val &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); |  	val &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); | ||||||
|  	advk_writel(pcie, val, PCIE_CORE_CMD_STATUS_REG); |  	advk_writel(pcie, val, PCIE_CORE_CMD_STATUS_REG); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1725,6 +1725,9 @@ static int advk_pcie_remove(struct platf | @@ -1722,6 +1722,9 @@ static int advk_pcie_remove(struct platf | ||||||
|  	advk_pcie_remove_msi_irq_domain(pcie); |  	advk_pcie_remove_msi_irq_domain(pcie); | ||||||
|  	advk_pcie_remove_irq_domain(pcie); |  	advk_pcie_remove_irq_domain(pcie); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1728,6 +1728,10 @@ static int advk_pcie_remove(struct platf | @@ -1725,6 +1725,10 @@ static int advk_pcie_remove(struct platf | ||||||
|  	/* Free config space for emulated root bridge */ |  	/* Free config space for emulated root bridge */ | ||||||
|  	pci_bridge_emul_cleanup(&pcie->bridge); |  	pci_bridge_emul_cleanup(&pcie->bridge); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1732,6 +1732,11 @@ static int advk_pcie_remove(struct platf | @@ -1729,6 +1729,11 @@ static int advk_pcie_remove(struct platf | ||||||
|  	if (pcie->reset_gpio) |  	if (pcie->reset_gpio) | ||||||
|  		gpiod_set_value_cansleep(pcie->reset_gpio, 1); |  		gpiod_set_value_cansleep(pcie->reset_gpio, 1); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1741,6 +1741,9 @@ static int advk_pcie_remove(struct platf | @@ -1738,6 +1738,9 @@ static int advk_pcie_remove(struct platf | ||||||
|  	for (i = 0; i < OB_WIN_COUNT; i++) |  	for (i = 0; i < OB_WIN_COUNT; i++) | ||||||
|  		advk_pcie_disable_ob_win(pcie, i); |  		advk_pcie_disable_ob_win(pcie, i); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -806,7 +806,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
| +#endif /* _XT_FLOWOFFLOAD_H */ | +#endif /* _XT_FLOWOFFLOAD_H */ | ||||||
| --- a/include/net/netfilter/nf_flow_table.h | --- a/include/net/netfilter/nf_flow_table.h | ||||||
| +++ b/include/net/netfilter/nf_flow_table.h | +++ b/include/net/netfilter/nf_flow_table.h | ||||||
| @@ -273,6 +273,10 @@ void nf_flow_table_free(struct nf_flowta | @@ -275,6 +275,10 @@ void nf_flow_table_free(struct nf_flowta | ||||||
|   |   | ||||||
|  void flow_offload_teardown(struct flow_offload *flow); |  void flow_offload_teardown(struct flow_offload *flow); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|   */ |   */ | ||||||
| --- a/include/linux/skbuff.h | --- a/include/linux/skbuff.h | ||||||
| +++ b/include/linux/skbuff.h | +++ b/include/linux/skbuff.h | ||||||
| @@ -2761,6 +2761,10 @@ static inline int pskb_trim(struct sk_bu | @@ -2771,6 +2771,10 @@ static inline int pskb_trim(struct sk_bu | ||||||
|  	return (len < skb->len) ? __pskb_trim(skb, len) : 0; |  	return (len < skb->len) ? __pskb_trim(skb, len) : 0; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -82,7 +82,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  /** |  /** | ||||||
|   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer |   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer | ||||||
|   *	@skb: buffer to alter |   *	@skb: buffer to alter | ||||||
| @@ -2911,16 +2915,6 @@ static inline struct sk_buff *dev_alloc_ | @@ -2921,16 +2925,6 @@ static inline struct sk_buff *dev_alloc_ | ||||||
|  } |  } | ||||||
|   |   | ||||||
|   |   | ||||||
|   | |||||||
| @@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
| +MODULE_LICENSE("GPL"); | +MODULE_LICENSE("GPL"); | ||||||
| --- a/kernel/sched/core.c | --- a/kernel/sched/core.c | ||||||
| +++ b/kernel/sched/core.c | +++ b/kernel/sched/core.c | ||||||
| @@ -4174,6 +4174,7 @@ int wake_up_state(struct task_struct *p, | @@ -4175,6 +4175,7 @@ int wake_up_state(struct task_struct *p, | ||||||
|  { |  { | ||||||
|  	return try_to_wake_up(p, state, 0); |  	return try_to_wake_up(p, state, 0); | ||||||
|  } |  } | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  |  | ||||||
| --- a/lib/vsprintf.c | --- a/lib/vsprintf.c | ||||||
| +++ b/lib/vsprintf.c | +++ b/lib/vsprintf.c | ||||||
| @@ -984,8 +984,10 @@ char *symbol_string(char *buf, char *end | @@ -1001,8 +1001,10 @@ char *symbol_string(char *buf, char *end | ||||||
|  		    struct printf_spec spec, const char *fmt) |  		    struct printf_spec spec, const char *fmt) | ||||||
|  { |  { | ||||||
|  	unsigned long value; |  	unsigned long value; | ||||||
| @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
|  	if (fmt[1] == 'R') |  	if (fmt[1] == 'R') | ||||||
| @@ -1006,8 +1008,14 @@ char *symbol_string(char *buf, char *end | @@ -1023,8 +1025,14 @@ char *symbol_string(char *buf, char *end | ||||||
|   |   | ||||||
|  	return string_nocheck(buf, end, sym, spec); |  	return string_nocheck(buf, end, sym, spec); | ||||||
|  #else |  #else | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org> | |||||||
|  |  | ||||||
| --- a/drivers/mtd/ubi/build.c | --- a/drivers/mtd/ubi/build.c | ||||||
| +++ b/drivers/mtd/ubi/build.c | +++ b/drivers/mtd/ubi/build.c | ||||||
| @@ -1191,6 +1191,73 @@ static struct mtd_info * __init open_mtd | @@ -1184,6 +1184,73 @@ static struct mtd_info * __init open_mtd | ||||||
|  	return mtd; |  	return mtd; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -82,7 +82,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org> | |||||||
|  static int __init ubi_init(void) |  static int __init ubi_init(void) | ||||||
|  { |  { | ||||||
|  	int err, i, k; |  	int err, i, k; | ||||||
| @@ -1274,6 +1341,12 @@ static int __init ubi_init(void) | @@ -1267,6 +1334,12 @@ static int __init ubi_init(void) | ||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|   | |||||||
| @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|   |   | ||||||
|  		if (ret < 0) |  		if (ret < 0) | ||||||
|  			goto out; |  			goto out; | ||||||
| @@ -565,6 +571,17 @@ full_scan: | @@ -567,6 +573,17 @@ full_scan: | ||||||
|  			return err; |  			return err; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	/* |  	/* | ||||||
|  	 * Get the required data from the packet. |  	 * Get the required data from the packet. | ||||||
|  	 */ |  	 */ | ||||||
| @@ -1151,7 +1154,7 @@ int nf_conntrack_tcp_packet(struct nf_co | @@ -1160,7 +1163,7 @@ int nf_conntrack_tcp_packet(struct nf_co | ||||||
|  		 IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED && |  		 IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED && | ||||||
|  		 timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK]) |  		 timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK]) | ||||||
|  		timeout = timeouts[TCP_CONNTRACK_UNACK]; |  		timeout = timeouts[TCP_CONNTRACK_UNACK]; | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  |  | ||||||
| --- a/include/linux/skbuff.h | --- a/include/linux/skbuff.h | ||||||
| +++ b/include/linux/skbuff.h | +++ b/include/linux/skbuff.h | ||||||
| @@ -2727,7 +2727,7 @@ static inline int pskb_network_may_pull( | @@ -2737,7 +2737,7 @@ static inline int pskb_network_may_pull( | ||||||
|   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) |   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) | ||||||
|   */ |   */ | ||||||
|  #ifndef NET_SKB_PAD |  #ifndef NET_SKB_PAD | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> | |||||||
|  |  | ||||||
| --- a/drivers/net/dsa/mv88e6xxx/chip.c | --- a/drivers/net/dsa/mv88e6xxx/chip.c | ||||||
| +++ b/drivers/net/dsa/mv88e6xxx/chip.c | +++ b/drivers/net/dsa/mv88e6xxx/chip.c | ||||||
| @@ -6319,6 +6319,7 @@ static int mv88e6xxx_register_switch(str | @@ -6320,6 +6320,7 @@ static int mv88e6xxx_register_switch(str | ||||||
|  	ds->ops = &mv88e6xxx_switch_ops; |  	ds->ops = &mv88e6xxx_switch_ops; | ||||||
|  	ds->ageing_time_min = chip->info->age_time_coeff; |  	ds->ageing_time_min = chip->info->age_time_coeff; | ||||||
|  	ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; |  	ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | |||||||
|  /* |  /* | ||||||
|   * The Mellanox Tavor device gives false positive parity errors.  Disable |   * The Mellanox Tavor device gives false positive parity errors.  Disable | ||||||
|   * parity error reporting. |   * parity error reporting. | ||||||
| @@ -3351,6 +3352,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I | @@ -3363,6 +3364,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I | ||||||
|  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); |  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); | ||||||
|  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); |  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); | ||||||
|   |   | ||||||
| @@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | |||||||
|  /* |  /* | ||||||
|   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. |   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. | ||||||
|   * To work around this, query the size it should be configured to by the |   * To work around this, query the size it should be configured to by the | ||||||
| @@ -3376,6 +3379,8 @@ static void quirk_intel_ntb(struct pci_d | @@ -3388,6 +3391,8 @@ static void quirk_intel_ntb(struct pci_d | ||||||
|  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb); |  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb); | ||||||
|  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); |  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); | ||||||
|   |   | ||||||
| @@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | |||||||
|  /* |  /* | ||||||
|   * Some BIOS implementations leave the Intel GPU interrupts enabled, even |   * Some BIOS implementations leave the Intel GPU interrupts enabled, even | ||||||
|   * though no one is handling them (e.g., if the i915 driver is never |   * though no one is handling them (e.g., if the i915 driver is never | ||||||
| @@ -3414,6 +3419,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN | @@ -3426,6 +3431,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN | ||||||
|  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); |  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); | ||||||
|  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); |  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  /* PIO registers base address and register offsets */ |  /* PIO registers base address and register offsets */ | ||||||
|  #define PIO_BASE_ADDR				0x4000 |  #define PIO_BASE_ADDR				0x4000 | ||||||
|  #define PIO_CTRL				(PIO_BASE_ADDR + 0x0) |  #define PIO_CTRL				(PIO_BASE_ADDR + 0x0) | ||||||
| @@ -959,7 +955,7 @@ static int advk_sw_pci_bridge_init(struc | @@ -961,7 +957,7 @@ static int advk_sw_pci_bridge_init(struc | ||||||
|  	bridge->conf.pref_mem_limit = cpu_to_le16(PCI_PREF_RANGE_TYPE_64); |  	bridge->conf.pref_mem_limit = cpu_to_le16(PCI_PREF_RANGE_TYPE_64); | ||||||
|   |   | ||||||
|  	/* Support interrupt A for MSI feature */ |  	/* Support interrupt A for MSI feature */ | ||||||
|   | |||||||
| @@ -1,57 +0,0 @@ | |||||||
| From a29a7d01cd778854e08108461cba321a63d98871 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org> |  | ||||||
| Date: Fri, 2 Jul 2021 16:39:47 +0200 |  | ||||||
| Subject: [PATCH] PCI: aardvark: Fix reading MSI interrupt number |  | ||||||
| MIME-Version: 1.0 |  | ||||||
| Content-Type: text/plain; charset=UTF-8 |  | ||||||
| Content-Transfer-Encoding: 8bit |  | ||||||
|  |  | ||||||
| In advk_pcie_handle_msi() the authors expect that when bit i in the W1C |  | ||||||
| register PCIE_MSI_STATUS_REG is cleared, the PCIE_MSI_PAYLOAD_REG is |  | ||||||
| updated to contain the MSI number corresponding to index i. |  | ||||||
|  |  | ||||||
| Experiments show that this is not so, and instead PCIE_MSI_PAYLOAD_REG |  | ||||||
| always contains the number of the last received MSI, overall. |  | ||||||
|  |  | ||||||
| Do not read PCIE_MSI_PAYLOAD_REG register for determining MSI interrupt |  | ||||||
| number. Since Aardvark already forbids more than 32 interrupts and uses |  | ||||||
| own allocated hwirq numbers, the msi_idx already corresponds to the |  | ||||||
| received MSI number. |  | ||||||
|  |  | ||||||
| Fixes: 8c39d710363c ("PCI: aardvark: Add Aardvark PCI host controller driver") |  | ||||||
| Signed-off-by: Pali Rohár <pali@kernel.org> |  | ||||||
| Signed-off-by: Marek Behún <kabel@kernel.org> |  | ||||||
| --- |  | ||||||
|  drivers/pci/controller/pci-aardvark.c | 13 ++++++------- |  | ||||||
|  1 file changed, 6 insertions(+), 7 deletions(-) |  | ||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c |  | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c |  | ||||||
| @@ -1386,7 +1386,7 @@ static void advk_pcie_remove_irq_domain( |  | ||||||
|  static void advk_pcie_handle_msi(struct advk_pcie *pcie) |  | ||||||
|  { |  | ||||||
|  	u32 msi_val, msi_mask, msi_status, msi_idx; |  | ||||||
| -	u16 msi_data; |  | ||||||
| +	int virq; |  | ||||||
|   |  | ||||||
|  	msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG); |  | ||||||
|  	msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG); |  | ||||||
| @@ -1396,13 +1396,12 @@ static void advk_pcie_handle_msi(struct |  | ||||||
|  		if (!(BIT(msi_idx) & msi_status)) |  | ||||||
|  			continue; |  | ||||||
|   |  | ||||||
| -		/* |  | ||||||
| -		 * msi_idx contains bits [4:0] of the msi_data and msi_data |  | ||||||
| -		 * contains 16bit MSI interrupt number |  | ||||||
| -		 */ |  | ||||||
|  		advk_writel(pcie, BIT(msi_idx), PCIE_MSI_STATUS_REG); |  | ||||||
| -		msi_data = advk_readl(pcie, PCIE_MSI_PAYLOAD_REG) & PCIE_MSI_DATA_MASK; |  | ||||||
| -		generic_handle_irq(msi_data); |  | ||||||
| +		virq = irq_find_mapping(pcie->msi_inner_domain, msi_idx); |  | ||||||
| +		if (virq) |  | ||||||
| +			generic_handle_irq(virq); |  | ||||||
| +		else |  | ||||||
| +			dev_err_ratelimited(&pcie->pdev->dev, "unexpected MSI 0x%02x\n", msi_idx); |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
|  	advk_writel(pcie, PCIE_ISR0_MSI_INT_PENDING, |  | ||||||
| @@ -32,7 +32,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1182,7 +1182,7 @@ static void advk_msi_irq_compose_msi_msg | @@ -1184,7 +1184,7 @@ static void advk_msi_irq_compose_msi_msg | ||||||
|   |   | ||||||
|  	msg->address_lo = lower_32_bits(msi_msg); |  	msg->address_lo = lower_32_bits(msi_msg); | ||||||
|  	msg->address_hi = upper_32_bits(msi_msg); |  	msg->address_hi = upper_32_bits(msi_msg); | ||||||
| @@ -41,7 +41,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  static int advk_msi_set_affinity(struct irq_data *irq_data, |  static int advk_msi_set_affinity(struct irq_data *irq_data, | ||||||
| @@ -1199,15 +1199,11 @@ static int advk_msi_irq_domain_alloc(str | @@ -1201,15 +1201,11 @@ static int advk_msi_irq_domain_alloc(str | ||||||
|  	int hwirq, i; |  	int hwirq, i; | ||||||
|   |   | ||||||
|  	mutex_lock(&pcie->msi_used_lock); |  	mutex_lock(&pcie->msi_used_lock); | ||||||
| @@ -61,7 +61,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|   |   | ||||||
|  	for (i = 0; i < nr_irqs; i++) |  	for (i = 0; i < nr_irqs; i++) | ||||||
|  		irq_domain_set_info(domain, virq + i, hwirq + i, |  		irq_domain_set_info(domain, virq + i, hwirq + i, | ||||||
| @@ -1225,7 +1221,7 @@ static void advk_msi_irq_domain_free(str | @@ -1227,7 +1223,7 @@ static void advk_msi_irq_domain_free(str | ||||||
|  	struct advk_pcie *pcie = domain->host_data; |  	struct advk_pcie *pcie = domain->host_data; | ||||||
|   |   | ||||||
|  	mutex_lock(&pcie->msi_used_lock); |  	mutex_lock(&pcie->msi_used_lock); | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  	struct irq_domain *irq_domain; |  	struct irq_domain *irq_domain; | ||||||
|  	struct irq_chip irq_chip; |  	struct irq_chip irq_chip; | ||||||
|  	raw_spinlock_t irq_lock; |  	raw_spinlock_t irq_lock; | ||||||
| @@ -1434,21 +1435,26 @@ static void advk_pcie_handle_int(struct | @@ -1432,21 +1433,26 @@ static void advk_pcie_handle_int(struct | ||||||
|  	} |  	} | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -68,7 +68,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie) |  static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie) | ||||||
| @@ -1515,7 +1521,7 @@ static int advk_pcie_probe(struct platfo | @@ -1513,7 +1519,7 @@ static int advk_pcie_probe(struct platfo | ||||||
|  	struct advk_pcie *pcie; |  	struct advk_pcie *pcie; | ||||||
|  	struct pci_host_bridge *bridge; |  	struct pci_host_bridge *bridge; | ||||||
|  	struct resource_entry *entry; |  	struct resource_entry *entry; | ||||||
| @@ -77,7 +77,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|   |   | ||||||
|  	bridge = devm_pci_alloc_host_bridge(dev, sizeof(struct advk_pcie)); |  	bridge = devm_pci_alloc_host_bridge(dev, sizeof(struct advk_pcie)); | ||||||
|  	if (!bridge) |  	if (!bridge) | ||||||
| @@ -1601,17 +1607,9 @@ static int advk_pcie_probe(struct platfo | @@ -1599,17 +1605,9 @@ static int advk_pcie_probe(struct platfo | ||||||
|  	if (IS_ERR(pcie->base)) |  	if (IS_ERR(pcie->base)) | ||||||
|  		return PTR_ERR(pcie->base); |  		return PTR_ERR(pcie->base); | ||||||
|   |   | ||||||
| @@ -98,7 +98,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|   |   | ||||||
|  	pcie->reset_gpio = devm_gpiod_get_from_of_node(dev, dev->of_node, |  	pcie->reset_gpio = devm_gpiod_get_from_of_node(dev, dev->of_node, | ||||||
|  						       "reset-gpios", 0, |  						       "reset-gpios", 0, | ||||||
| @@ -1660,11 +1658,14 @@ static int advk_pcie_probe(struct platfo | @@ -1658,11 +1656,14 @@ static int advk_pcie_probe(struct platfo | ||||||
|  		return ret; |  		return ret; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -113,7 +113,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  		advk_pcie_remove_msi_irq_domain(pcie); |  		advk_pcie_remove_msi_irq_domain(pcie); | ||||||
|  		advk_pcie_remove_irq_domain(pcie); |  		advk_pcie_remove_irq_domain(pcie); | ||||||
|  		return ret; |  		return ret; | ||||||
| @@ -1712,6 +1713,9 @@ static int advk_pcie_remove(struct platf | @@ -1710,6 +1711,9 @@ static int advk_pcie_remove(struct platf | ||||||
|  	advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG); |  	advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG); | ||||||
|  	advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG); |  	advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1431,7 +1431,9 @@ static void advk_pcie_handle_int(struct | @@ -1429,7 +1429,9 @@ static void advk_pcie_handle_int(struct | ||||||
|  		advk_writel(pcie, PCIE_ISR1_INTX_ASSERT(i), |  		advk_writel(pcie, PCIE_ISR1_INTX_ASSERT(i), | ||||||
|  			    PCIE_ISR1_REG); |  			    PCIE_ISR1_REG); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  	struct msi_domain_info msi_domain_info; |  	struct msi_domain_info msi_domain_info; | ||||||
|  	DECLARE_BITMAP(msi_used, MSI_IRQ_NUM); |  	DECLARE_BITMAP(msi_used, MSI_IRQ_NUM); | ||||||
|  	struct mutex msi_used_lock; |  	struct mutex msi_used_lock; | ||||||
| @@ -1192,6 +1190,12 @@ static int advk_msi_set_affinity(struct | @@ -1194,6 +1192,12 @@ static int advk_msi_set_affinity(struct | ||||||
|  	return -EINVAL; |  	return -EINVAL; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -47,7 +47,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  static int advk_msi_irq_domain_alloc(struct irq_domain *domain, |  static int advk_msi_irq_domain_alloc(struct irq_domain *domain, | ||||||
|  				     unsigned int virq, |  				     unsigned int virq, | ||||||
|  				     unsigned int nr_irqs, void *args) |  				     unsigned int nr_irqs, void *args) | ||||||
| @@ -1208,7 +1212,7 @@ static int advk_msi_irq_domain_alloc(str | @@ -1210,7 +1214,7 @@ static int advk_msi_irq_domain_alloc(str | ||||||
|   |   | ||||||
|  	for (i = 0; i < nr_irqs; i++) |  	for (i = 0; i < nr_irqs; i++) | ||||||
|  		irq_domain_set_info(domain, virq + i, hwirq + i, |  		irq_domain_set_info(domain, virq + i, hwirq + i, | ||||||
| @@ -56,7 +56,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  				    domain->host_data, handle_simple_irq, |  				    domain->host_data, handle_simple_irq, | ||||||
|  				    NULL, NULL); |  				    NULL, NULL); | ||||||
|   |   | ||||||
| @@ -1278,29 +1282,23 @@ static const struct irq_domain_ops advk_ | @@ -1280,29 +1284,23 @@ static const struct irq_domain_ops advk_ | ||||||
|  	.xlate = irq_domain_xlate_onecell, |  	.xlate = irq_domain_xlate_onecell, | ||||||
|  }; |  }; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  	DECLARE_BITMAP(msi_used, MSI_IRQ_NUM); |  	DECLARE_BITMAP(msi_used, MSI_IRQ_NUM); | ||||||
|  	struct mutex msi_used_lock; |  	struct mutex msi_used_lock; | ||||||
|  	u16 msi_msg; |  	u16 msi_msg; | ||||||
| @@ -1286,20 +1285,20 @@ static struct irq_chip advk_msi_irq_chip | @@ -1288,20 +1287,20 @@ static struct irq_chip advk_msi_irq_chip | ||||||
|  	.name = "advk-MSI", |  	.name = "advk-MSI", | ||||||
|  }; |  }; | ||||||
|   |   | ||||||
| @@ -52,7 +52,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  	msi_msg_phys = virt_to_phys(&pcie->msi_msg); |  	msi_msg_phys = virt_to_phys(&pcie->msi_msg); | ||||||
|   |   | ||||||
|  	advk_writel(pcie, lower_32_bits(msi_msg_phys), |  	advk_writel(pcie, lower_32_bits(msi_msg_phys), | ||||||
| @@ -1315,7 +1314,8 @@ static int advk_pcie_init_msi_irq_domain | @@ -1317,7 +1316,8 @@ static int advk_pcie_init_msi_irq_domain | ||||||
|   |   | ||||||
|  	pcie->msi_domain = |  	pcie->msi_domain = | ||||||
|  		pci_msi_create_irq_domain(of_node_to_fwnode(node), |  		pci_msi_create_irq_domain(of_node_to_fwnode(node), | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1294,7 +1294,6 @@ static struct msi_domain_info advk_msi_d | @@ -1296,7 +1296,6 @@ static struct msi_domain_info advk_msi_d | ||||||
|  static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie) |  static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie) | ||||||
|  { |  { | ||||||
|  	struct device *dev = &pcie->pdev->dev; |  	struct device *dev = &pcie->pdev->dev; | ||||||
| @@ -29,7 +29,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  	phys_addr_t msi_msg_phys; |  	phys_addr_t msi_msg_phys; | ||||||
|   |   | ||||||
|  	mutex_init(&pcie->msi_used_lock); |  	mutex_init(&pcie->msi_used_lock); | ||||||
| @@ -1313,7 +1312,7 @@ static int advk_pcie_init_msi_irq_domain | @@ -1315,7 +1314,7 @@ static int advk_pcie_init_msi_irq_domain | ||||||
|  		return -ENOMEM; |  		return -ENOMEM; | ||||||
|   |   | ||||||
|  	pcie->msi_domain = |  	pcie->msi_domain = | ||||||
|   | |||||||
| @@ -43,7 +43,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|   |   | ||||||
|  	/* Unmask summary MSI interrupt */ |  	/* Unmask summary MSI interrupt */ | ||||||
|  	reg = advk_readl(pcie, PCIE_ISR0_MASK_REG); |  	reg = advk_readl(pcie, PCIE_ISR0_MASK_REG); | ||||||
| @@ -1191,10 +1190,52 @@ static int advk_msi_set_affinity(struct | @@ -1193,10 +1192,52 @@ static int advk_msi_set_affinity(struct | ||||||
|  	return -EINVAL; |  	return -EINVAL; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -96,7 +96,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  }; |  }; | ||||||
|   |   | ||||||
|  static int advk_msi_irq_domain_alloc(struct irq_domain *domain, |  static int advk_msi_irq_domain_alloc(struct irq_domain *domain, | ||||||
| @@ -1284,7 +1325,9 @@ static const struct irq_domain_ops advk_ | @@ -1286,7 +1327,9 @@ static const struct irq_domain_ops advk_ | ||||||
|  }; |  }; | ||||||
|   |   | ||||||
|  static struct irq_chip advk_msi_irq_chip = { |  static struct irq_chip advk_msi_irq_chip = { | ||||||
| @@ -107,7 +107,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  }; |  }; | ||||||
|   |   | ||||||
|  static struct msi_domain_info advk_msi_domain_info = { |  static struct msi_domain_info advk_msi_domain_info = { | ||||||
| @@ -1298,6 +1341,7 @@ static int advk_pcie_init_msi_irq_domain | @@ -1300,6 +1343,7 @@ static int advk_pcie_init_msi_irq_domain | ||||||
|  	struct device *dev = &pcie->pdev->dev; |  	struct device *dev = &pcie->pdev->dev; | ||||||
|  	phys_addr_t msi_msg_phys; |  	phys_addr_t msi_msg_phys; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -56,7 +56,7 @@ Cc: stable@vger.kernel.org # f21a8b1b6837 ("PCI: aardvark: Move to MSI handling | |||||||
|  	/* Enable MSI */ |  	/* Enable MSI */ | ||||||
|  	reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG); |  	reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG); | ||||||
|  	reg |= PCIE_CORE_CTRL2_MSI_ENABLE; |  	reg |= PCIE_CORE_CTRL2_MSI_ENABLE; | ||||||
| @@ -1177,10 +1182,10 @@ static void advk_msi_irq_compose_msi_msg | @@ -1179,10 +1184,10 @@ static void advk_msi_irq_compose_msi_msg | ||||||
|  					 struct msi_msg *msg) |  					 struct msi_msg *msg) | ||||||
|  { |  { | ||||||
|  	struct advk_pcie *pcie = irq_data_get_irq_chip_data(data); |  	struct advk_pcie *pcie = irq_data_get_irq_chip_data(data); | ||||||
| @@ -70,7 +70,7 @@ Cc: stable@vger.kernel.org # f21a8b1b6837 ("PCI: aardvark: Move to MSI handling | |||||||
|  	msg->data = data->hwirq; |  	msg->data = data->hwirq; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -1339,18 +1344,10 @@ static struct msi_domain_info advk_msi_d | @@ -1341,18 +1346,10 @@ static struct msi_domain_info advk_msi_d | ||||||
|  static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie) |  static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie) | ||||||
|  { |  { | ||||||
|  	struct device *dev = &pcie->pdev->dev; |  	struct device *dev = &pcie->pdev->dev; | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1337,7 +1337,7 @@ static struct irq_chip advk_msi_irq_chip | @@ -1339,7 +1339,7 @@ static struct irq_chip advk_msi_irq_chip | ||||||
|   |   | ||||||
|  static struct msi_domain_info advk_msi_domain_info = { |  static struct msi_domain_info advk_msi_domain_info = { | ||||||
|  	.flags	= MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | |  	.flags	= MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | | ||||||
|   | |||||||
| @@ -78,7 +78,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  		if (mask & (PCI_BRIDGE_CTL_BUS_RESET << 16)) { |  		if (mask & (PCI_BRIDGE_CTL_BUS_RESET << 16)) { | ||||||
|  			u32 val = advk_readl(pcie, PCIE_CORE_CTRL1_REG); |  			u32 val = advk_readl(pcie, PCIE_CORE_CTRL1_REG); | ||||||
|  			if (new & (PCI_BRIDGE_CTL_BUS_RESET << 16)) |  			if (new & (PCI_BRIDGE_CTL_BUS_RESET << 16)) | ||||||
| @@ -1459,6 +1480,18 @@ static void advk_pcie_handle_int(struct | @@ -1457,6 +1478,18 @@ static void advk_pcie_handle_int(struct | ||||||
|  	isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); |  	isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); | ||||||
|  	isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); |  	isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -1,44 +0,0 @@ | |||||||
| From 5f354992eeef9a51c67796dc9f7f578d3584baa2 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org> |  | ||||||
| Date: Wed, 8 Dec 2021 05:57:54 +0100 |  | ||||||
| Subject: [PATCH] PCI: aardvark: Fix reading PCI_EXP_RTSTA_PME bit on emulated |  | ||||||
|  bridge |  | ||||||
| MIME-Version: 1.0 |  | ||||||
| Content-Type: text/plain; charset=UTF-8 |  | ||||||
| Content-Transfer-Encoding: 8bit |  | ||||||
|  |  | ||||||
| The emulated bridge returns incorrect value for PCI_EXP_RTSTA register |  | ||||||
| during readout in advk_pci_bridge_emul_pcie_conf_read() function: the |  | ||||||
| correct bit is BIT(16), but we are setting BIT(23), because the code |  | ||||||
| does |  | ||||||
|   *value = (isr0 & PCIE_MSG_PM_PME_MASK) << 16 |  | ||||||
| where |  | ||||||
|   PCIE_MSG_PM_PME_MASK |  | ||||||
| is |  | ||||||
|   BIT(7). |  | ||||||
|  |  | ||||||
| The code should probably have been something like |  | ||||||
|   *value = (!!(isr0 & PCIE_MSG_PM_PME_MASK)) << 16, |  | ||||||
| but we are better of using an if() and using the proper macro for this |  | ||||||
| bit. |  | ||||||
|  |  | ||||||
| Fixes: 8a3ebd8de328 ("PCI: aardvark: Implement emulated root PCI bridge config space") |  | ||||||
| Signed-off-by: Pali Rohár <pali@kernel.org> |  | ||||||
| Signed-off-by: Marek Behún <kabel@kernel.org> |  | ||||||
| --- |  | ||||||
|  drivers/pci/controller/pci-aardvark.c | 4 +++- |  | ||||||
|  1 file changed, 3 insertions(+), 1 deletion(-) |  | ||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c |  | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c |  | ||||||
| @@ -867,7 +867,9 @@ advk_pci_bridge_emul_pcie_conf_read(stru |  | ||||||
|  	case PCI_EXP_RTSTA: { |  | ||||||
|  		u32 isr0 = advk_readl(pcie, PCIE_ISR0_REG); |  | ||||||
|  		u32 msglog = advk_readl(pcie, PCIE_MSG_LOG_REG); |  | ||||||
| -		*value = (isr0 & PCIE_MSG_PM_PME_MASK) << 16 | (msglog >> 16); |  | ||||||
| +		*value = msglog >> 16; |  | ||||||
| +		if (isr0 & PCIE_MSG_PM_PME_MASK) |  | ||||||
| +			*value |= PCI_EXP_RTSTA_PME; |  | ||||||
|  		return PCI_BRIDGE_EMUL_HANDLED; |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| @@ -25,7 +25,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1484,6 +1484,18 @@ static void advk_pcie_handle_int(struct | @@ -1480,6 +1480,18 @@ static void advk_pcie_handle_int(struct | ||||||
|  	isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); |  	isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); | ||||||
|  	isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); |  	isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -147,7 +147,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  static void advk_pcie_handle_msi(struct advk_pcie *pcie) |  static void advk_pcie_handle_msi(struct advk_pcie *pcie) | ||||||
|  { |  { | ||||||
|  	u32 msi_val, msi_mask, msi_status, msi_idx; |  	u32 msi_val, msi_mask, msi_status, msi_idx; | ||||||
| @@ -1484,17 +1503,9 @@ static void advk_pcie_handle_int(struct | @@ -1480,17 +1497,9 @@ static void advk_pcie_handle_int(struct | ||||||
|  	isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); |  	isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); | ||||||
|  	isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); |  	isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -86,7 +86,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  static void advk_pcie_handle_pme(struct advk_pcie *pcie) |  static void advk_pcie_handle_pme(struct advk_pcie *pcie) | ||||||
|  { |  { | ||||||
|  	u32 requester = advk_readl(pcie, PCIE_MSG_LOG_REG) >> 16; |  	u32 requester = advk_readl(pcie, PCIE_MSG_LOG_REG) >> 16; | ||||||
| @@ -1458,7 +1497,7 @@ static void advk_pcie_handle_pme(struct | @@ -1457,7 +1496,7 @@ static void advk_pcie_handle_pme(struct | ||||||
|  		if (!(le16_to_cpu(pcie->bridge.pcie_conf.rootctl) & PCI_EXP_RTCTL_PMEIE)) |  		if (!(le16_to_cpu(pcie->bridge.pcie_conf.rootctl) & PCI_EXP_RTCTL_PMEIE)) | ||||||
|  			return; |  			return; | ||||||
|   |   | ||||||
| @@ -94,8 +94,8 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
| +		if (generic_handle_domain_irq(pcie->rp_irq_domain, 0) == -EINVAL) | +		if (generic_handle_domain_irq(pcie->rp_irq_domain, 0) == -EINVAL) | ||||||
|  			dev_err_ratelimited(&pcie->pdev->dev, "unhandled PME IRQ\n"); |  			dev_err_ratelimited(&pcie->pdev->dev, "unhandled PME IRQ\n"); | ||||||
|  	} |  	} | ||||||
|   |  } | ||||||
| @@ -1515,7 +1554,7 @@ static void advk_pcie_handle_int(struct | @@ -1509,7 +1548,7 @@ static void advk_pcie_handle_int(struct | ||||||
|  		 * Aardvark HW returns zero for PCI_ERR_ROOT_AER_IRQ, so use |  		 * Aardvark HW returns zero for PCI_ERR_ROOT_AER_IRQ, so use | ||||||
|  		 * PCIe interrupt 0 |  		 * PCIe interrupt 0 | ||||||
|  		 */ |  		 */ | ||||||
| @@ -104,7 +104,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  			dev_err_ratelimited(&pcie->pdev->dev, "unhandled ERR IRQ\n"); |  			dev_err_ratelimited(&pcie->pdev->dev, "unhandled ERR IRQ\n"); | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -1560,6 +1599,21 @@ static void advk_pcie_irq_handler(struct | @@ -1553,6 +1592,21 @@ static void advk_pcie_irq_handler(struct | ||||||
|  	chained_irq_exit(chip, desc); |  	chained_irq_exit(chip, desc); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -126,7 +126,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie) |  static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie) | ||||||
|  { |  { | ||||||
|  	phy_power_off(pcie->phy); |  	phy_power_off(pcie->phy); | ||||||
| @@ -1761,14 +1815,24 @@ static int advk_pcie_probe(struct platfo | @@ -1754,14 +1808,24 @@ static int advk_pcie_probe(struct platfo | ||||||
|  		return ret; |  		return ret; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -151,7 +151,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  		advk_pcie_remove_msi_irq_domain(pcie); |  		advk_pcie_remove_msi_irq_domain(pcie); | ||||||
|  		advk_pcie_remove_irq_domain(pcie); |  		advk_pcie_remove_irq_domain(pcie); | ||||||
|  		return ret; |  		return ret; | ||||||
| @@ -1820,6 +1884,7 @@ static int advk_pcie_remove(struct platf | @@ -1813,6 +1877,7 @@ static int advk_pcie_remove(struct platf | ||||||
|  	irq_set_chained_handler_and_data(pcie->irq, NULL, NULL); |  	irq_set_chained_handler_and_data(pcie->irq, NULL, NULL); | ||||||
|   |   | ||||||
|  	/* Remove IRQ domains */ |  	/* Remove IRQ domains */ | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1612,7 +1612,7 @@ static int advk_pcie_map_irq(const struc | @@ -1605,7 +1605,7 @@ static int advk_pcie_map_irq(const struc | ||||||
|  		return of_irq_parse_and_map_pci(dev, slot, pin); |  		return of_irq_parse_and_map_pci(dev, slot, pin); | ||||||
|  } |  } | ||||||
|   |   | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> | |||||||
|  |  | ||||||
| --- a/drivers/pci/controller/pci-aardvark.c | --- a/drivers/pci/controller/pci-aardvark.c | ||||||
| +++ b/drivers/pci/controller/pci-aardvark.c | +++ b/drivers/pci/controller/pci-aardvark.c | ||||||
| @@ -1629,9 +1629,7 @@ static int advk_pcie_enable_phy(struct a | @@ -1622,9 +1622,7 @@ static int advk_pcie_enable_phy(struct a | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	ret = phy_power_on(pcie->phy); |  	ret = phy_power_on(pcie->phy); | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| --- a/drivers/firmware/qcom_scm.c | --- a/drivers/firmware/qcom_scm.c | ||||||
| +++ b/drivers/firmware/qcom_scm.c | +++ b/drivers/firmware/qcom_scm.c | ||||||
| @@ -1339,6 +1339,7 @@ static const struct of_device_id qcom_sc | @@ -1333,6 +1333,7 @@ static const struct of_device_id qcom_sc | ||||||
|  							     SCM_HAS_BUS_CLK) |  							     SCM_HAS_BUS_CLK) | ||||||
|  	}, |  	}, | ||||||
|  	{ .compatible = "qcom,scm-ipq4019" }, |  	{ .compatible = "qcom,scm-ipq4019" }, | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ | |||||||
|  	}, |  	}, | ||||||
|  	[PORT_NPCM] = { |  	[PORT_NPCM] = { | ||||||
|  		.name		= "Nuvoton 16550", |  		.name		= "Nuvoton 16550", | ||||||
| @@ -2746,6 +2746,11 @@ serial8250_do_set_termios(struct uart_po | @@ -2764,6 +2764,11 @@ serial8250_do_set_termios(struct uart_po | ||||||
|  	unsigned long flags; |  	unsigned long flags; | ||||||
|  	unsigned int baud, quot, frac = 0; |  	unsigned int baud, quot, frac = 0; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -118,23 +118,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> | |||||||
|  	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); |  	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); | ||||||
|  	if (!priv) |  	if (!priv) | ||||||
|  		return -ENOMEM; |  		return -ENOMEM; | ||||||
| @@ -674,6 +748,7 @@ static int at803x_probe(struct phy_devic | @@ -693,6 +767,7 @@ static int at803x_get_features(struct ph | ||||||
|  			return ret; |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| +#if 0 |  | ||||||
|  	/* Some bootloaders leave the fiber page selected. |  | ||||||
|  	 * Switch to the copper page, as otherwise we read |  | ||||||
|  	 * the PHY capabilities from the fiber side. |  | ||||||
| @@ -685,6 +760,7 @@ static int at803x_probe(struct phy_devic |  | ||||||
|  		if (ret) |  | ||||||
|  			goto err; |  | ||||||
|  	} |  | ||||||
| +#endif |  | ||||||
|   |  | ||||||
|  	return 0; |  | ||||||
|   |  | ||||||
| @@ -711,6 +787,7 @@ static int at803x_get_features(struct ph |  | ||||||
|  	if (err) |  	if (err) | ||||||
|  		return err; |  		return err; | ||||||
|   |   | ||||||
| @@ -142,7 +126,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> | |||||||
|  	if (phydev->drv->phy_id != ATH8031_PHY_ID) |  	if (phydev->drv->phy_id != ATH8031_PHY_ID) | ||||||
|  		return 0; |  		return 0; | ||||||
|   |   | ||||||
| @@ -728,6 +805,7 @@ static int at803x_get_features(struct ph | @@ -710,6 +785,7 @@ static int at803x_get_features(struct ph | ||||||
|  	 */ |  	 */ | ||||||
|  	linkmode_clear_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, |  	linkmode_clear_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, | ||||||
|  			   phydev->supported); |  			   phydev->supported); | ||||||
| @@ -150,7 +134,23 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> | |||||||
|  	return 0; |  	return 0; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -933,6 +1011,10 @@ static int at803x_read_status(struct phy | @@ -775,6 +851,7 @@ static int at803x_config_init(struct phy | ||||||
|  |  { | ||||||
|  |  	int ret; | ||||||
|  |   | ||||||
|  | +#if 0 | ||||||
|  |  	if (phydev->drv->phy_id == ATH8031_PHY_ID) { | ||||||
|  |  		/* Some bootloaders leave the fiber page selected. | ||||||
|  |  		 * Switch to the copper page, as otherwise we read | ||||||
|  | @@ -790,6 +867,7 @@ static int at803x_config_init(struct phy | ||||||
|  |  		if (ret < 0) | ||||||
|  |  			return ret; | ||||||
|  |  	} | ||||||
|  | +#endif | ||||||
|  |   | ||||||
|  |  	/* The RX and TX delay default is: | ||||||
|  |  	 *   after HW reset: RX delay enabled and TX delay disabled | ||||||
|  | @@ -925,6 +1003,10 @@ static int at803x_read_status(struct phy | ||||||
|  { |  { | ||||||
|  	int ss, err, old_link = phydev->link; |  	int ss, err, old_link = phydev->link; | ||||||
|   |   | ||||||
| @@ -161,7 +161,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> | |||||||
|  	/* Update the link, but return if there was an error */ |  	/* Update the link, but return if there was an error */ | ||||||
|  	err = genphy_update_link(phydev); |  	err = genphy_update_link(phydev); | ||||||
|  	if (err) |  	if (err) | ||||||
| @@ -1033,6 +1115,12 @@ static int at803x_config_aneg(struct phy | @@ -1025,6 +1107,12 @@ static int at803x_config_aneg(struct phy | ||||||
|  { |  { | ||||||
|  	int ret; |  	int ret; | ||||||
|   |   | ||||||
| @@ -174,7 +174,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com> | |||||||
|  	ret = at803x_config_mdix(phydev, phydev->mdix_ctrl); |  	ret = at803x_config_mdix(phydev, phydev->mdix_ctrl); | ||||||
|  	if (ret < 0) |  	if (ret < 0) | ||||||
|  		return ret; |  		return ret; | ||||||
| @@ -1445,6 +1533,7 @@ static struct phy_driver at803x_driver[] | @@ -1437,6 +1525,7 @@ static struct phy_driver at803x_driver[] | ||||||
|  	/* Qualcomm Atheros AR8031/AR8033 */ |  	/* Qualcomm Atheros AR8031/AR8033 */ | ||||||
|  	PHY_ID_MATCH_EXACT(ATH8031_PHY_ID), |  	PHY_ID_MATCH_EXACT(ATH8031_PHY_ID), | ||||||
|  	.name			= "Qualcomm Atheros AR8031/AR8033", |  	.name			= "Qualcomm Atheros AR8031/AR8033", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user