Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1913727rwl; Fri, 24 Mar 2023 18:19:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZXvUsRIeRunkNDByED4oePoFSN1+TScbAN9V+zZrwowwF7y/y5NOUel7QG2y3D5fcWZSe6 X-Received: by 2002:a62:5501:0:b0:5ac:41d5:ded2 with SMTP id j1-20020a625501000000b005ac41d5ded2mr3913697pfb.1.1679707186578; Fri, 24 Mar 2023 18:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679707186; cv=none; d=google.com; s=arc-20160816; b=N+u/z88O+f76WY+VyHF5o/7uyItWhJViMxkqm0ML4dcOF59NeqTShY7x9frk1bns7F B7Rf/oyy19PJbak+pIuLfcRxPMi3nFuQGzY3Qe0jfAaAGKSENjbRLK6KHBrsreU5iEEV C590tuALmHWpHQsku9qwc2WYnqBdABFMw2cOj7TS9CWNCaQS5nwWgH+qKVIz3J6LXD2d HHWYvReU94DIPMwF9fstb1Gaj6qxkINJU7pKD3448GrPQcPdqHTScsqRubAxeT711orr 9twa3/a/HjCw3bPBbgbgOMxnnHoD53fOb2kSANeVa/NM3CfP5Pyq0wc2henmiuNZ3j9Z ZTLA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Z/jaitCuxlYdLTL5oF056Nwj2hIvUNCVrCEuwCO2Tfo=; b=YUZtFcmIrEc/29gMsZfh4i5vyHHI/5sboGEVl9+qy0qluA7sLdc9GH/3RRLN3ZQyMh +bgoWdZF5SwymKCKHYpCbjyEPEcJcHrCEw8MgwWIdNtXcZDJHDbaYs82KLRxZrbg2FF9 VQqu2Rb84+NwGRVAz4fD5qUMrK/5xLsi6f22H3+qsMvSzCdPYIR9Ex1E6LdxlCXJlcRg 0ViMtjyLT4Eh23pg1vi4LXYcHaXBQFus6wknW64kqLYdy66ufkq6zSlda9BUp0syfqRF lKC0raLVu366VQJIHJK1K6a5AWZ4c9zwqMbC6UriCEPLDUzCv7zWCkj7jfbgpvCdH8+q 2ZUw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b00502f0d2abc5si12158553pgb.725.2023.03.24.18.19.34; Fri, 24 Mar 2023 18:19:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232132AbjCYBTF (ORCPT + 99 others); Fri, 24 Mar 2023 21:19:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbjCYBSl (ORCPT ); Fri, 24 Mar 2023 21:18:41 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FD281A95B; Fri, 24 Mar 2023 18:18:39 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Pk1Rv2lNwz4f3v4Z; Sat, 25 Mar 2023 09:18:35 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP3 (Coremail) with SMTP id _Ch0CgCnUiDpSx5kmy0NFg--.49234S9; Sat, 25 Mar 2023 09:18:36 +0800 (CST) From: Ye Bin To: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ye Bin Subject: [PATCH 5/5] scsi: run queue after set host state from blocked to running Date: Sat, 25 Mar 2023 09:17:34 +0800 Message-Id: <20230325011734.507453-6-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230325011734.507453-1-yebin@huaweicloud.com> References: <20230325011734.507453-1-yebin@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _Ch0CgCnUiDpSx5kmy0NFg--.49234S9 X-Coremail-Antispam: 1UD129KBjvdXoWruryrGrW7KF1kCFy3Cr4fuFg_yoW3WFc_u3 y09F93K3yfta1rK395try5XF9Y9w4Fqa4kuF4YqFWS9w4jqFykt3yI9r98Zr4UuF4xAa17 Aw1kZ34IkF9rJjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbVAYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r126s 0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xG Y2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14 v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2 WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkE bVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbV WUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF 67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI42 IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF 0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxh VjvjDU0xZFpf9x07UZo7tUUUUU= X-CM-SenderInfo: p1hex046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 From: Ye Bin As when host is blocked, all request is blocked. After set the host state with running, e will need to ensure that these requests are started. Signed-off-by: Ye Bin --- drivers/scsi/scsi_sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 42c5936c7711..202d58f4f267 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -229,6 +229,9 @@ store_shost_state(struct device *dev, struct device_attribute *attr, } spin_unlock_irqrestore(shost->host_lock, flags); + if (old_state == SHOST_BLOCKED && state == SHOST_RUNNING) + scsi_run_host_queues(shost); + return count; } -- 2.31.1