From patchwork Sat Mar 25 01:17:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Bin X-Patchwork-Id: 74806 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp141482vqo; Fri, 24 Mar 2023 18:44:27 -0700 (PDT) X-Google-Smtp-Source: AKy350bcL8fnY6uUH/nLriGZ8dWeMB8O2JndtrmqjhhR45DB1mGI5rMpOu+nxg73+uU+B0TixHSE X-Received: by 2002:aa7:dd57:0:b0:501:fd71:7e11 with SMTP id o23-20020aa7dd57000000b00501fd717e11mr4971161edw.20.1679708667202; Fri, 24 Mar 2023 18:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679708667; cv=none; d=google.com; s=arc-20160816; b=CGVw4bhmwnKsTo6TjHcIg99G0ms48EU5ZHduvDJz85ZC/4bX3EtYmlV45+FF5rc1Oc Qe85rvrzjwpXk3iXWzNrY/L4iusimzxAfJ5PbtA63cPxTesFzWlFZXunKlmYfKtSK1ms I9ATZ1IYZWycEEjvEhN7cN06wvsPrEKITSQ3Yji8SszW0AciWjV5K578NwPbG27Vt2j6 ykz9mE/0+DyMv/X6JoYosr2SRwjSZc4ydm5tbvB2qHnTzx4mX168BGTqwwt2PXHQ0eYE nrAqexRXkQ/x8bmcrmG40Co24liD7ko5XAD/v8aeOIYsaLn2aN5gjrN+tV5ihNEWzI3r wheg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020aa7d284000000b004fe9bb8eb0asi21463027edq.587.2023.03.24.18.43.57; Fri, 24 Mar 2023 18:44:27 -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 S232147AbjCYBTG (ORCPT + 99 others); Fri, 24 Mar 2023 21:19:06 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761302195462322250?= X-GMAIL-MSGID: =?utf-8?q?1761302195462322250?= 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; }