]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.4
authorSasha Levin <sashal@kernel.org>
Mon, 5 Jul 2021 01:54:01 +0000 (21:54 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 5 Jul 2021 01:54:01 +0000 (21:54 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.4/drm-nouveau-fix-dma_address-check-for-cpu-gpu-sync.patch [new file with mode: 0644]
queue-5.4/gpio-amd8111-and-tqmx86-require-has_ioport_map.patch [new file with mode: 0644]
queue-5.4/scsi-sr-return-appropriate-error-code-when-disk-is-e.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/drm-nouveau-fix-dma_address-check-for-cpu-gpu-sync.patch b/queue-5.4/drm-nouveau-fix-dma_address-check-for-cpu-gpu-sync.patch
new file mode 100644 (file)
index 0000000..b3da30f
--- /dev/null
@@ -0,0 +1,47 @@
+From 7d9dad3d87094df6b74c98d0bcd8cb06b56d0a04 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 11 Jun 2021 14:34:50 +0200
+Subject: drm/nouveau: fix dma_address check for CPU/GPU sync
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+[ Upstream commit d330099115597bbc238d6758a4930e72b49ea9ba ]
+
+AGP for example doesn't have a dma_address array.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20210614110517.1624-1-christian.koenig@amd.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
+index f8015e0318d7..f7603be569fc 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
++++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
+@@ -542,7 +542,7 @@ nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
+       struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
+       int i;
+-      if (!ttm_dma)
++      if (!ttm_dma || !ttm_dma->dma_address)
+               return;
+       /* Don't waste time looping if the object is coherent */
+@@ -562,7 +562,7 @@ nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo)
+       struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
+       int i;
+-      if (!ttm_dma)
++      if (!ttm_dma || !ttm_dma->dma_address)
+               return;
+       /* Don't waste time looping if the object is coherent */
+-- 
+2.30.2
+
diff --git a/queue-5.4/gpio-amd8111-and-tqmx86-require-has_ioport_map.patch b/queue-5.4/gpio-amd8111-and-tqmx86-require-has_ioport_map.patch
new file mode 100644 (file)
index 0000000..cac4dc7
--- /dev/null
@@ -0,0 +1,45 @@
+From 82c94eaa0413b8701cb72059ab589c162f9a75b1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 25 Jun 2021 10:37:34 +0200
+Subject: gpio: AMD8111 and TQMX86 require HAS_IOPORT_MAP
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+[ Upstream commit c6414e1a2bd26b0071e2b9d6034621f705dfd4c0 ]
+
+Both of these drivers use ioport_map(), so they need to
+depend on HAS_IOPORT_MAP. Otherwise, they cannot be built
+even with COMPILE_TEST on architectures without an ioport
+implementation, such as ARCH=um.
+
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/Kconfig | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
+index f9263426af03..ae414045a750 100644
+--- a/drivers/gpio/Kconfig
++++ b/drivers/gpio/Kconfig
+@@ -1232,6 +1232,7 @@ config GPIO_TPS68470
+ config GPIO_TQMX86
+       tristate "TQ-Systems QTMX86 GPIO"
+       depends on MFD_TQMX86 || COMPILE_TEST
++      depends on HAS_IOPORT_MAP
+       select GPIOLIB_IRQCHIP
+       help
+         This driver supports GPIO on the TQMX86 IO controller.
+@@ -1299,6 +1300,7 @@ menu "PCI GPIO expanders"
+ config GPIO_AMD8111
+       tristate "AMD 8111 GPIO driver"
+       depends on X86 || COMPILE_TEST
++      depends on HAS_IOPORT_MAP
+       help
+         The AMD 8111 south bridge contains 32 GPIO pins which can be used.
+-- 
+2.30.2
+
diff --git a/queue-5.4/scsi-sr-return-appropriate-error-code-when-disk-is-e.patch b/queue-5.4/scsi-sr-return-appropriate-error-code-when-disk-is-e.patch
new file mode 100644 (file)
index 0000000..37e999c
--- /dev/null
@@ -0,0 +1,37 @@
+From 4e5676cc30aa45a998df2c3e5c4899ad44ed1c02 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 11 Jun 2021 17:44:02 +0800
+Subject: scsi: sr: Return appropriate error code when disk is ejected
+
+From: ManYi Li <limanyi@uniontech.com>
+
+[ Upstream commit 7dd753ca59d6c8cc09aa1ed24f7657524803c7f3 ]
+
+Handle a reported media event code of 3. This indicates that the media has
+been removed from the drive and user intervention is required to proceed.
+Return DISK_EVENT_EJECT_REQUEST in that case.
+
+Link: https://lore.kernel.org/r/20210611094402.23884-1-limanyi@uniontech.com
+Signed-off-by: ManYi Li <limanyi@uniontech.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/scsi/sr.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
+index 70a28f6fb1d0..2332b245b182 100644
+--- a/drivers/scsi/sr.c
++++ b/drivers/scsi/sr.c
+@@ -218,6 +218,8 @@ static unsigned int sr_get_events(struct scsi_device *sdev)
+               return DISK_EVENT_EJECT_REQUEST;
+       else if (med->media_event_code == 2)
+               return DISK_EVENT_MEDIA_CHANGE;
++      else if (med->media_event_code == 3)
++              return DISK_EVENT_EJECT_REQUEST;
+       return 0;
+ }
+-- 
+2.30.2
+
index 9cd77fc5f321651d66f6ac9a86df3c72ed9d7916..155220448dff033ea6a7e25a11d0cba5afbd8ad8 100644 (file)
@@ -1 +1,4 @@
 x86-efi-remove-unused-variables.patch
+scsi-sr-return-appropriate-error-code-when-disk-is-e.patch
+drm-nouveau-fix-dma_address-check-for-cpu-gpu-sync.patch
+gpio-amd8111-and-tqmx86-require-has_ioport_map.patch