aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/cxlflash/superpipe.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c
index e99a0eba42fa..d2309afe8c49 100644
--- a/drivers/scsi/cxlflash/superpipe.c
+++ b/drivers/scsi/cxlflash/superpipe.c
@@ -1787,12 +1787,21 @@ static int cxlflash_disk_verify(struct scsi_device *sdev,
1787 * inquiry (i.e. the Unit attention is due to the WWN changing). 1787 * inquiry (i.e. the Unit attention is due to the WWN changing).
1788 */ 1788 */
1789 if (verify->hint & DK_CXLFLASH_VERIFY_HINT_SENSE) { 1789 if (verify->hint & DK_CXLFLASH_VERIFY_HINT_SENSE) {
1790 /* Can't hold mutex across process_sense/read_cap16,
1791 * since we could have an intervening EEH event.
1792 */
1793 ctxi->unavail = true;
1794 mutex_unlock(&ctxi->mutex);
1790 rc = process_sense(sdev, verify); 1795 rc = process_sense(sdev, verify);
1791 if (unlikely(rc)) { 1796 if (unlikely(rc)) {
1792 dev_err(dev, "%s: Failed to validate sense data (%d)\n", 1797 dev_err(dev, "%s: Failed to validate sense data (%d)\n",
1793 __func__, rc); 1798 __func__, rc);
1799 mutex_lock(&ctxi->mutex);
1800 ctxi->unavail = false;
1794 goto out; 1801 goto out;
1795 } 1802 }
1803 mutex_lock(&ctxi->mutex);
1804 ctxi->unavail = false;
1796 } 1805 }
1797 1806
1798 switch (gli->mode) { 1807 switch (gli->mode) {