From patchwork Sat May 13 23:24:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 93632 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6017023vqo; Sat, 13 May 2023 16:31:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Sf3p8dvJNHfQnSjs+mzjBVRMWD5CnERTznC678AzhX8CqAbtaSGH86jJKr6r0Y0omtmSc X-Received: by 2002:a17:902:d714:b0:1ad:f138:b2f1 with SMTP id w20-20020a170902d71400b001adf138b2f1mr5623223ply.26.1684020691399; Sat, 13 May 2023 16:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684020691; cv=none; d=google.com; s=arc-20160816; b=oNhl0ZBOXRpAhjL7rCSqmfxizr0XbokX1kZ+YfOy4P2hiELuEK3T/geBjMurSbmQOu 2yT8HINHiRXJPFvJx8s2zoCTNP03bHY/ptdu/lmu+tTkValGq5CKObZiIJfBdMno0GgS f1+/XToG+cNKkZIoWifvRTNhPBTgFbcnJFZTZdSdxEynJsUK0LLg4MAplTivKVge06as El5deOSgF0BrawKkRPKEqlfiRTw/IWtckQXMfCz1U4NTUWqwSOJ6LWvMMf5MPPnyGJaJ zKHejsCzuIC/Tx0A52T70JvLB3n7zXtWnFV4TW4fefGZr7y2gzQC9YPSst1kGjih7g4c 7mbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:date:cc:to:from:subject:message-id:dkim-signature :dkim-signature; bh=G5y6YLakH5E4z9Q8OVTJTBCniOMB7qtWV1dhX4qW4uU=; b=s1qF4lsR6O31ZelpLE7NVJVOfP+EpI0Q6aXAyhIU9m7sMTB9co9vr0/IEs70KjkHp5 9Wfj47RNWXFO0GFBU5BCm7geCORCM+p9tECxpRbk8lwK40YzPx19wNnfSmCEKP5P+fzq 08m6ny4n3kdejjCf9PpJVufM1EP06bh5VRG+kh1xnvA2zOWY18BJElInW6HvInffXX3U aoOCPvRaeTm89y7pid1mWQa96rLqEIT/c3y3g5aCohXz3+HtEECURDh1bfmZZ/ssz5aZ ItHpGy6W0rvMS3xn8TnvE3cJMb685SFIYjYLjn63nSNInXzZSNY70eueCwW+zIMipPau mxBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=LAQ64O6M; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=BCj4xvN+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j23-20020a170902759700b001adf26a9390si2940228pll.191.2023.05.13.16.31.10; Sat, 13 May 2023 16:31:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=LAQ64O6M; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=BCj4xvN+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231637AbjEMXYp (ORCPT + 99 others); Sat, 13 May 2023 19:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbjEMXYn (ORCPT ); Sat, 13 May 2023 19:24:43 -0400 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [IPv6:2607:fcd0:100:8a00::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29AE62705; Sat, 13 May 2023 16:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1684020274; bh=CHEQ/YBaCbARXpS/TDfKCrfT8E2waxS1oKfjBt76EYY=; h=Message-ID:Subject:From:To:Date:From; b=LAQ64O6M3yLJXUitiXEcLQn6vSNtQ8jlB0y9kgnXB80DQAQeaFwxVi/fipXLNvq5Q 36t9iwVmoKx1SCPunJV8rabwJ0MIiAd4Cz4Uq60na1VME0u4D6Q6IYW5g/krRyPr25 MWeWBWjJK6eufGZyLRcdHrkMQmRQn2i3YZ3BLX7I= Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 3DA441287A4F; Sat, 13 May 2023 19:24:34 -0400 (EDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavis, port 10024) with ESMTP id Pwx2-8NFW_C6; Sat, 13 May 2023 19:24:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1684020268; bh=CHEQ/YBaCbARXpS/TDfKCrfT8E2waxS1oKfjBt76EYY=; h=Message-ID:Subject:From:To:Date:From; b=BCj4xvN+DITc/lcqO15/TZ21+5XoYz2RbsPX4FYGM/+XnR6fZ5lknhY2c7W/ewhmu s8UNOPcv2myYCTrhpKPsf0azQJZzWmBkV0nuoqcCaT8VR4f33XUecnhh43rbSCJ1o2 krFiMc4VZBlOT+jooXnkWrycgvHz2PpjJlgwg5U8= Received: from [IPv6:2601:5c4:4302:c21::a774] (unknown [IPv6:2601:5c4:4302:c21::a774]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id ED1A3128799E; Sat, 13 May 2023 19:24:27 -0400 (EDT) Message-ID: <8742c73168b7be3fb8dd841e57656bcbc4fa2e06.camel@HansenPartnership.com> Subject: [GIT PULL] SCSI fixes for 6.4-rc1 From: James Bottomley To: Andrew Morton , Linus Torvalds Cc: linux-scsi , linux-kernel Date: Sat, 13 May 2023 19:24:24 -0400 User-Agent: Evolution 3.42.4 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765823680101024229?= X-GMAIL-MSGID: =?utf-8?q?1765823680101024229?= Single small fix for the UFS driver to fix a power management failure. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Keoseong Park (1): scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend And the diffstat: drivers/ufs/core/ufshcd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) With full diff below. James diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 17d7bb875fee..45fd374fe56c 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -9459,8 +9459,16 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) * that performance might be impacted. */ ret = ufshcd_urgent_bkops(hba); - if (ret) + if (ret) { + /* + * If return err in suspend flow, IO will hang. + * Trigger error handler and break suspend for + * error recovery. + */ + ufshcd_force_error_recovery(hba); + ret = -EBUSY; goto enable_scaling; + } } else { /* make sure that auto bkops is disabled */ ufshcd_disable_auto_bkops(hba);