From patchwork Wed Dec 21 09:25:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yangxingui X-Patchwork-Id: 3172 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp3426799wrn; Wed, 21 Dec 2022 01:33:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXvuEuyaEpyecnwzixamRFq4hJDSgyP4zFobMs8qHgeMaFnd0IKe8Vgt3fZNd4bwTs0LN18X X-Received: by 2002:a17:907:8b12:b0:78d:f457:1062 with SMTP id sz18-20020a1709078b1200b0078df4571062mr854341ejc.31.1671615219266; Wed, 21 Dec 2022 01:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671615219; cv=none; d=google.com; s=arc-20160816; b=sgyxNMjoISbbRehABaAIssdh4nVfrQFN4LJ7X8TIeeUqQdkO7UUipaw27c0BF8KB1w cbQQnOOY/NZUL8BYDmptOzkKGfWnbtahflCZqMmBbblR9LIQ2Mr7I3NbOwfS7yraa6HR S3SaU5QupDjlELwMtu1hviBM0qo6Cq+n5InA0xBqETNvcdmODYdt565U+XU5iMXPno9S OSriCAJvHfAh9HOdJVQu/GRQcOUhcyVNLrC/rJJVYBTr24VvxLBAVber4VqOR/BAJZ1g 04Oy16l0En6RFyMsOeOhJfzbsPeVfEb0Yg5CGukgkGMhXtEvuBUhbSsQRuECny3/ZLqY tEAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=pYrcSo3Hc7X3xYEAVqtq//LPByEiamB6+13BCPVmShY=; b=e9hGJqK7Hqx3c55QNed9APi4f+q5H98NV02kYuFfEQwjPVxKdKUFtJVnkVPnN0JSfQ /XhdN9DHT3sdPoIcHsjcglAoogdz8UGwOIBdUOoE3Y5O/OtfPQtM6LNiHEkozWQZjxMY hXvZ8d86HQWC+zwKXL5uKtHpKYZPYZ8oZkD0KDB1UBNbwOPuIBe9xJp1nGbszTP1MniS 6m9f5LsigaROJZQZbnyv4mbahg2IOLlaadpNZRt0JPtPk/9KirzrqrNU2q96+lPV3894 Naz6innLm4+w4LvWpRRA1sxMx97Jnu5CiDr5B+qO2OxNwIovthO8CyTCsvVA7/zTYRYj m9rg== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk40-20020a1709077fa800b007c090dba7bcsi3291952ejc.210.2022.12.21.01.33.15; Wed, 21 Dec 2022 01:33:39 -0800 (PST) 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234537AbiLUJcD (ORCPT + 99 others); Wed, 21 Dec 2022 04:32:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233998AbiLUJbx (ORCPT ); Wed, 21 Dec 2022 04:31:53 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C96318385; Wed, 21 Dec 2022 01:31:49 -0800 (PST) Received: from dggpemm500012.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NcSlG55HvzqT5Y; Wed, 21 Dec 2022 17:27:22 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by dggpemm500012.china.huawei.com (7.185.36.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 21 Dec 2022 17:31:47 +0800 From: Xingui Yang To: , , CC: , , , , , Subject: [PATCH v3 0/3] Directly kick-off EH when device removed with active IO Date: Wed, 21 Dec 2022 09:25:11 +0000 Message-ID: <20221221092514.4091-1-yangxingui@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500012.china.huawei.com (7.185.36.89) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752815600457090605?= X-GMAIL-MSGID: =?utf-8?q?1752815600457090605?= The following patches solve the age-old problem - that is, EH eventually kicking in only after 30 seconds when a disk is removed with active IO. This series add a new libsas API - sas_device_task_abort() - to abort device active io and define a interface lldd_device_task_abort() for LLDD to implement. Changes since v2: - Support both for sas and sata device - Add a new libsas API - LLDD implement lldd_device_task_abort() Xingui Yang (3): scsi: libsas: Add sas_device_task_abort() scsi: libsas: Directly kick-off EH when device removed with active IO scsi: hisi_sas: Implement lldd_device_task_abort() drivers/scsi/hisi_sas/hisi_sas_main.c | 19 +++++++++++++++++++ drivers/scsi/libsas/sas_discover.c | 3 +++ drivers/scsi/libsas/sas_scsi_host.c | 9 +++++++++ include/scsi/libsas.h | 2 ++ 4 files changed, 33 insertions(+)