diff --git a/patches.suse/scsi-smartpqi-Add-controller-cache-flush-during-rmmo.patch b/patches.suse/scsi-smartpqi-Add-controller-cache-flush-during-rmmo.patch new file mode 100644 index 0000000..1a40df6 --- /dev/null +++ b/patches.suse/scsi-smartpqi-Add-controller-cache-flush-during-rmmo.patch @@ -0,0 +1,45 @@ +From: Gilbert Wu +Date: Tue, 8 Nov 2022 13:22:03 -0600 +Subject: scsi: smartpqi: Add controller cache flush during rmmod +Patch-mainline: v6.2-rc1 +Git-commit: 14063fb625c4541f48ff0dc7ae005b0d5a159c3f +References: bsc#1207315 + +Add in a call to flush the controller cache during driver removal. + +Reviewed-by: Scott Benesh +Reviewed-by: Mike Mcgowan +Reviewed-by: Kevin Barnett +Signed-off-by: Gilbert Wu +Signed-off-by: Don Brace +Link: https://lore.kernel.org/r/166793532388.322537.878022136408270892.stgit@brunhilda +Signed-off-by: Martin K. Petersen +Acked-by: Martin Wilck +--- + drivers/scsi/smartpqi/smartpqi_init.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/scsi/smartpqi/smartpqi_init.c ++++ b/drivers/scsi/smartpqi/smartpqi_init.c +@@ -9040,6 +9040,7 @@ static void pqi_pci_remove(struct pci_de + { + struct pqi_ctrl_info *ctrl_info; + u16 vendor_id; ++ int rc; + + ctrl_info = pci_get_drvdata(pci_dev); + if (!ctrl_info) +@@ -9051,6 +9052,13 @@ static void pqi_pci_remove(struct pci_de + else + ctrl_info->ctrl_removal_state = PQI_CTRL_GRACEFUL_REMOVAL; + ++ if (ctrl_info->ctrl_removal_state == PQI_CTRL_GRACEFUL_REMOVAL) { ++ rc = pqi_flush_cache(ctrl_info, RESTART); ++ if (rc) ++ dev_err(&pci_dev->dev, ++ "unable to flush controller cache during remove\n"); ++ } ++ + pqi_remove_ctrl(ctrl_info); + } + diff --git a/series.conf b/series.conf index 0563d2e..35dc316 100644 --- a/series.conf +++ b/series.conf @@ -36436,6 +36436,7 @@ patches.suse/scsi-smartpqi-Correct-max-LUN-number.patch patches.suse/scsi-smartpqi-Change-sysfs-raid_level-attribute-to-N.patch patches.suse/scsi-smartpqi-Correct-device-removal-for-multi-actua.patch + patches.suse/scsi-smartpqi-Add-controller-cache-flush-during-rmmo.patch patches.suse/scsi-scsi_debug-Fix-a-warning-in-resp_write_scat.patch patches.suse/scsi-lpfc-Use-memset_startat-helper.patch patches.suse/scsi-lpfc-Fix-WQ-CQ-EQ-resource-check.patch