From: Sasha Levin Date: Sun, 24 Jan 2021 15:36:34 +0000 (-0500) Subject: Fixes for 4.4 X-Git-Tag: v4.19.171~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d354a311fbfb777bd048ab1341167aabdd33c0b;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.4 Signed-off-by: Sasha Levin --- diff --git a/queue-4.4/asoc-intel-haswell-add-missing-pm_ops.patch b/queue-4.4/asoc-intel-haswell-add-missing-pm_ops.patch new file mode 100644 index 00000000000..469f5d227d9 --- /dev/null +++ b/queue-4.4/asoc-intel-haswell-add-missing-pm_ops.patch @@ -0,0 +1,36 @@ +From 6a4952724d09226e76fa2f9f6cda3926a54daaff Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 17 Dec 2020 11:54:01 +0100 +Subject: ASoC: Intel: haswell: Add missing pm_ops + +From: Cezary Rojewski + +[ 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 +Link: https://lore.kernel.org/r/20201217105401.27865-1-cezary.rojewski@intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + 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 de955c2e8c4e3..a0e67d5f59683 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.4/drm-nouveau-bios-fix-issue-shadowing-expansion-roms.patch b/queue-4.4/drm-nouveau-bios-fix-issue-shadowing-expansion-roms.patch new file mode 100644 index 00000000000..33f3e6d4526 --- /dev/null +++ b/queue-4.4/drm-nouveau-bios-fix-issue-shadowing-expansion-roms.patch @@ -0,0 +1,50 @@ +From 6b2c038665e3b8c220cc448687dcc02b293e47f9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 13 Jan 2021 17:12:52 +1000 +Subject: drm/nouveau/bios: fix issue shadowing expansion ROMs + +From: Ben Skeggs + +[ 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 +Signed-off-by: Sasha Levin +--- + 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.4/drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch b/queue-4.4/drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch new file mode 100644 index 00000000000..bc56100cf70 --- /dev/null +++ b/queue-4.4/drm-nouveau-i2c-gm200-increase-width-of-aux-semaphor.patch @@ -0,0 +1,55 @@ +From 00f83045fcd86fcce929bf1cf37e1522d3adfc64 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 13 Jan 2021 17:12:52 +1000 +Subject: drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields + +From: Ben Skeggs + +[ Upstream commit ba6e9ab0fcf3d76e3952deb12b5f993991621d9c ] + +Noticed while debugging GA102. + +Signed-off-by: Ben Skeggs +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm204.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm204.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm204.c +index 7cac8fe372b6b..a3cede8df4fd9 100644 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm204.c ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm204.c +@@ -33,7 +33,7 @@ static void + gm204_i2c_aux_fini(struct gm204_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 @@ gm204_i2c_aux_init(struct gm204_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 @@ gm204_i2c_aux_init(struct gm204_i2c_aux *aux) + gm204_i2c_aux_fini(aux); + return -EBUSY; + } +- } while ((ctrl & 0x03000000) != urep); ++ } while ((ctrl & 0x07000000) != urep); + + return 0; + } +-- +2.27.0 + diff --git a/queue-4.4/scsi-ufs-correct-the-lun-used-in-eh_device_reset_han.patch b/queue-4.4/scsi-ufs-correct-the-lun-used-in-eh_device_reset_han.patch new file mode 100644 index 00000000000..fb3a6725599 --- /dev/null +++ b/queue-4.4/scsi-ufs-correct-the-lun-used-in-eh_device_reset_han.patch @@ -0,0 +1,65 @@ +From d4a1a1f1130ab7ddf44bac937b638747b5354c64 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Reviewed-by: Stanley Chu +Signed-off-by: Can Guo +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +--- + 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 e37f6db0dd156..5e1d922e9a6ff 100644 +--- a/drivers/scsi/ufs/ufshcd.c ++++ b/drivers/scsi/ufs/ufshcd.c +@@ -3818,19 +3818,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; +@@ -3839,7 +3836,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 + diff --git a/queue-4.4/series b/queue-4.4/series index 908c113532b..1490fe3cb01 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -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