Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2705381rdb; Fri, 22 Sep 2023 06:26:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXkC2k5enJPHcijhHq34dw5oBLtQEjqURbmy/5VmiyvbTof5FXQ97yA0Yk5mRfX/BAyhIa X-Received: by 2002:a05:6a00:4785:b0:68f:cdb8:ae33 with SMTP id dh5-20020a056a00478500b0068fcdb8ae33mr3243023pfb.10.1695389193523; Fri, 22 Sep 2023 06:26:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695389193; cv=none; d=google.com; s=arc-20160816; b=x6wDAU7+5fOPD3IE5bZAgWpUgrTZHFhQ6YErlAI6O6itmDzDCprwWMcr5j6IzHBQQF HAXHZKE1CIxYH8ZlW4auuOeFAA4G8q27ucAAL75/Q7MtfVU0zdngpcagJkC01azQeZJv Qc2gwPMbtdsusB+pOEcPWyCXGwLJ0DtnZQzDdowTOOMh96iFa2yDVHVfm4KWWuwS6ODP 05BNAcHhSbqpXXl9iqTA0M7SVuAZ95C4mBwgM1OTtSJOn5EtHgUxCWvka6WowV4amLkQ zAFA/HtXLVgezcxFCSBOQ610qWzGio2fBLSfasAOtNyuLnJ3jkvGNfwhCBdsDIrI64SU CV/A== 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 :message-id:date:subject:cc:to:from; bh=Ul98dWChgbGXAeuKeTz/JCCJM6QD53jMy6Tpds+GJZg=; fh=czI/RuS43lIcejQG7heSpqlilKbUywFjC/3GVjzlias=; b=GpiGHaiOZqm8mTPQ7qOnoqV6EpM1N5ZVAVNQROACrwwh5vYHgfV59qmLPls8GILOrw 29k0PjUrWtuJrzXcPb837aMm8W10pe+/VoISJR59kDfohHAsDKTyuC6sFDIzePxcTxSS Wok5lpDcBy2nIu0Dkh/RXq7ydCY0TpoW/rxB+nRQWCD3v2efqbrkjEuNoVVYVk2MobdK GbjQeVfgfelT/zsFRoIoQgdXKNKQgHAoAFhcsbv2GaIFhjkdNROQoLpcaou295Ialz0z UTPA0sIOm23RduHU7RD+/6DCzrULzVxvheqJrOW4O7hpa7RCdXzoo+BD7n9YanwJjvE+ 3mZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b13-20020a056a000ccd00b00690f74dd2ccsi4022461pfv.69.2023.09.22.06.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 06:26:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3827E809503A; Fri, 22 Sep 2023 02:37:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233099AbjIVJhG (ORCPT + 99 others); Fri, 22 Sep 2023 05:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231503AbjIVJhF (ORCPT ); Fri, 22 Sep 2023 05:37:05 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0CF4199; Fri, 22 Sep 2023 02:36:59 -0700 (PDT) Received: from kwepemm000012.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RsRtx0WslzrRtM; Fri, 22 Sep 2023 17:34:49 +0800 (CST) Received: from build.huawei.com (10.175.101.6) by kwepemm000012.china.huawei.com (7.193.23.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 22 Sep 2023 17:36:57 +0800 From: Wenchao Hao To: "James E . J . Bottomley" , "Martin K . Petersen" , , CC: , , Wenchao Hao Subject: [PATCH 0/2] Fix two issue between removing device and error handle Date: Fri, 22 Sep 2023 17:36:34 +0800 Message-ID: <20230922093636.2645961-1-haowenchao2@huawei.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000012.china.huawei.com (7.193.23.142) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 02:37:15 -0700 (PDT) I am testing SCSI error handle with my previous scsi_debug error injection patches, and found two issue when removing device and error handler happened together. The first patch fix IO hang because scsi_eh_flush_done_q() would retry command if the device is in SDEV_CANCEL state; The second patch fix the issue which device's eh_device_reset_handler not called in recovery when device is in removing progress. Wenchao Hao (2): scsi: core: scsi_device_online() return false if state is SDEV_CANCEL scsi: scsi_error: Fix device reset is not triggered drivers/infiniband/ulp/srp/ib_srp.c | 2 +- drivers/message/fusion/mptctl.c | 6 ++-- drivers/message/fusion/mptsas.c | 8 ++--- drivers/message/fusion/mptspi.c | 6 ++-- drivers/s390/scsi/zfcp_fsf.c | 4 +-- drivers/s390/scsi/zfcp_scsi.c | 2 +- drivers/scsi/arm/acornscsi.c | 2 +- drivers/scsi/arm/fas216.c | 4 +-- drivers/scsi/bfa/bfad_im.c | 4 +-- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/lpfc/lpfc_scsi.c | 4 +-- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 4 +-- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 16 ++++----- drivers/scsi/myrb.c | 2 +- drivers/scsi/myrs.c | 2 +- drivers/scsi/scsi.c | 37 ++++++++++++--------- drivers/scsi/scsi_debug.c | 2 +- drivers/scsi/scsi_error.c | 12 +++---- drivers/scsi/scsi_lib.c | 6 ++-- drivers/scsi/scsi_scan.c | 2 +- drivers/scsi/scsi_transport_srp.c | 2 +- drivers/scsi/ses.c | 2 +- drivers/scsi/storvsc_drv.c | 2 +- drivers/scsi/virtio_scsi.c | 2 +- drivers/ufs/core/ufshcd.c | 4 +-- include/scsi/scsi_device.h | 15 ++++++--- 28 files changed, 85 insertions(+), 73 deletions(-) -- 2.32.0