]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.9
authorSasha Levin <sashal@kernel.org>
Sun, 24 Jan 2021 15:36:34 +0000 (10:36 -0500)
committerSasha Levin <sashal@kernel.org>
Sun, 24 Jan 2021 15:36:34 +0000 (10:36 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.9/asoc-intel-haswell-add-missing-pm_ops.patch [new file with mode: 0644]
queue-4.9/drm-nouveau-bios-fix-issue-shadowing-expansion-roms.patch [new file with mode: 0644]
queue-4.9/drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch [new file with mode: 0644]
queue-4.9/scsi-ufs-correct-the-lun-used-in-eh_device_reset_han.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/asoc-intel-haswell-add-missing-pm_ops.patch b/queue-4.9/asoc-intel-haswell-add-missing-pm_ops.patch
new file mode 100644 (file)
index 0000000..1f88696
--- /dev/null
@@ -0,0 +1,36 @@
+From 9d5387dbdbfcbebad9fa6d7222d2252a520572ed Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 17 Dec 2020 11:54:01 +0100
+Subject: ASoC: Intel: haswell: Add missing pm_ops
+
+From: Cezary Rojewski <cezary.rojewski@intel.com>
+
+[ Upstream commit bb224c3e3e41d940612d4cc9573289cdbd5cb8f5 ]
+
+haswell machine board is missing pm_ops what prevents it from undergoing
+suspend-resume procedure successfully. Assign default snd_soc_pm_ops so
+this is no longer the case.
+
+Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
+Link: https://lore.kernel.org/r/20201217105401.27865-1-cezary.rojewski@intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/intel/boards/haswell.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c
+index 11d0cc2b0e390..060da95770416 100644
+--- a/sound/soc/intel/boards/haswell.c
++++ b/sound/soc/intel/boards/haswell.c
+@@ -197,6 +197,7 @@ static struct platform_driver haswell_audio = {
+       .probe = haswell_audio_probe,
+       .driver = {
+               .name = "haswell-audio",
++              .pm = &snd_soc_pm_ops,
+       },
+ };
+-- 
+2.27.0
+
diff --git a/queue-4.9/drm-nouveau-bios-fix-issue-shadowing-expansion-roms.patch b/queue-4.9/drm-nouveau-bios-fix-issue-shadowing-expansion-roms.patch
new file mode 100644 (file)
index 0000000..cd4eb6b
--- /dev/null
@@ -0,0 +1,50 @@
+From 7b0151ea097a9edc75a371553fef949d59dbc88d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 13 Jan 2021 17:12:52 +1000
+Subject: drm/nouveau/bios: fix issue shadowing expansion ROMs
+
+From: Ben Skeggs <bskeggs@redhat.com>
+
+[ Upstream commit 402a89660e9dc880710b12773076a336c9dab3d7 ]
+
+This issue has generally been covered up by the presence of additional
+expansion ROMs after the ones we're interested in, with header fetches
+of subsequent images loading enough of the ROM to hide the issue.
+
+Noticed on GA102, which lacks a type 0x70 image compared to TU102,.
+
+[  906.364197] nouveau 0000:09:00.0: bios: 00000000: type 00, 65024 bytes
+[  906.381205] nouveau 0000:09:00.0: bios: 0000fe00: type 03, 91648 bytes
+[  906.405213] nouveau 0000:09:00.0: bios: 00026400: type e0, 22016 bytes
+[  906.410984] nouveau 0000:09:00.0: bios: 0002ba00: type e0, 366080 bytes
+
+vs
+
+[   22.961901] nouveau 0000:09:00.0: bios: 00000000: type 00, 60416 bytes
+[   22.984174] nouveau 0000:09:00.0: bios: 0000ec00: type 03, 71168 bytes
+[   23.010446] nouveau 0000:09:00.0: bios: 00020200: type e0, 48128 bytes
+[   23.028220] nouveau 0000:09:00.0: bios: 0002be00: type e0, 140800 bytes
+[   23.080196] nouveau 0000:09:00.0: bios: 0004e400: type 70, 7168 bytes
+
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
+index 7deb81b6dbac6..4b571cc6bc70f 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
+@@ -75,7 +75,7 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd)
+       nvkm_debug(subdev, "%08x: type %02x, %d bytes\n",
+                  image.base, image.type, image.size);
+-      if (!shadow_fetch(bios, mthd, image.size)) {
++      if (!shadow_fetch(bios, mthd, image.base + image.size)) {
+               nvkm_debug(subdev, "%08x: fetch failed\n", image.base);
+               return 0;
+       }
+-- 
+2.27.0
+
diff --git a/queue-4.9/drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch b/queue-4.9/drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch
new file mode 100644 (file)
index 0000000..7874bc4
--- /dev/null
@@ -0,0 +1,55 @@
+From 3ede8a6c1d04b06d1625b9f17dde5ee7f407483b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 13 Jan 2021 17:12:52 +1000
+Subject: drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields
+
+From: Ben Skeggs <bskeggs@redhat.com>
+
+[ Upstream commit ba6e9ab0fcf3d76e3952deb12b5f993991621d9c ]
+
+Noticed while debugging GA102.
+
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
+index a5783f4d972e3..c49795e779be4 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
+@@ -33,7 +33,7 @@ static void
+ gm200_i2c_aux_fini(struct gm200_i2c_aux *aux)
+ {
+       struct nvkm_device *device = aux->base.pad->i2c->subdev.device;
+-      nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00310000, 0x00000000);
++      nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00710000, 0x00000000);
+ }
+ static int
+@@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)
+                       AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl);
+                       return -EBUSY;
+               }
+-      } while (ctrl & 0x03010000);
++      } while (ctrl & 0x07010000);
+       /* set some magic, and wait up to 1ms for it to appear */
+-      nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00300000, ureq);
++      nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00700000, ureq);
+       timeout = 1000;
+       do {
+               ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50));
+@@ -67,7 +67,7 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)
+                       gm200_i2c_aux_fini(aux);
+                       return -EBUSY;
+               }
+-      } while ((ctrl & 0x03000000) != urep);
++      } while ((ctrl & 0x07000000) != urep);
+       return 0;
+ }
+-- 
+2.27.0
+
diff --git a/queue-4.9/scsi-ufs-correct-the-lun-used-in-eh_device_reset_han.patch b/queue-4.9/scsi-ufs-correct-the-lun-used-in-eh_device_reset_han.patch
new file mode 100644 (file)
index 0000000..0ea7083
--- /dev/null
@@ -0,0 +1,65 @@
+From d01fd1c0e59f389327ef35b2efbb532cc4a83a58 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 28 Dec 2020 04:04:36 -0800
+Subject: scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback
+
+From: Can Guo <cang@codeaurora.org>
+
+[ Upstream commit 35fc4cd34426c242ab015ef280853b7bff101f48 ]
+
+Users can initiate resets to specific SCSI device/target/host through
+IOCTL. When this happens, the SCSI cmd passed to eh_device/target/host
+_reset_handler() callbacks is initialized with a request whose tag is -1.
+In this case it is not right for eh_device_reset_handler() callback to
+count on the LUN get from hba->lrb[-1]. Fix it by getting LUN from the SCSI
+device associated with the SCSI cmd.
+
+Link: https://lore.kernel.org/r/1609157080-26283-1-git-send-email-cang@codeaurora.org
+Reviewed-by: Avri Altman <avri.altman@wdc.com>
+Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
+Signed-off-by: Can Guo <cang@codeaurora.org>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/scsi/ufs/ufshcd.c | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
+index ad80e4223c2d3..a767d942bfca5 100644
+--- a/drivers/scsi/ufs/ufshcd.c
++++ b/drivers/scsi/ufs/ufshcd.c
+@@ -4552,19 +4552,16 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
+ {
+       struct Scsi_Host *host;
+       struct ufs_hba *hba;
+-      unsigned int tag;
+       u32 pos;
+       int err;
+-      u8 resp = 0xF;
+-      struct ufshcd_lrb *lrbp;
++      u8 resp = 0xF, lun;
+       unsigned long flags;
+       host = cmd->device->host;
+       hba = shost_priv(host);
+-      tag = cmd->request->tag;
+-      lrbp = &hba->lrb[tag];
+-      err = ufshcd_issue_tm_cmd(hba, lrbp->lun, 0, UFS_LOGICAL_RESET, &resp);
++      lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun);
++      err = ufshcd_issue_tm_cmd(hba, lun, 0, UFS_LOGICAL_RESET, &resp);
+       if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) {
+               if (!err)
+                       err = resp;
+@@ -4573,7 +4570,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
+       /* clear the commands that were pending for corresponding LUN */
+       for_each_set_bit(pos, &hba->outstanding_reqs, hba->nutrs) {
+-              if (hba->lrb[pos].lun == lrbp->lun) {
++              if (hba->lrb[pos].lun == lun) {
+                       err = ufshcd_clear_cmd(hba, pos);
+                       if (err)
+                               break;
+-- 
+2.27.0
+
index 908c113532bb2df24cbb08ac2fc47065ead416c5..1490fe3cb01979a1e9649ecf798ef482e2dedcba 100644 (file)
@@ -2,3 +2,7 @@ alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch
 alsa-hda-via-add-minimum-mute-flag.patch
 acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch
 dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch
+asoc-intel-haswell-add-missing-pm_ops.patch
+scsi-ufs-correct-the-lun-used-in-eh_device_reset_han.patch
+drm-nouveau-bios-fix-issue-shadowing-expansion-roms.patch
+drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch