From patchwork Wed Aug 24 11:05:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 74575 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp245859qga; Wed, 24 Aug 2016 03:48:20 -0700 (PDT) X-Received: by 10.66.182.232 with SMTP id eh8mr4349877pac.146.1472035699918; Wed, 24 Aug 2016 03:48:19 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63si9129621pfj.289.2016.08.24.03.48.19; Wed, 24 Aug 2016 03:48:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932508AbcHXKsO (ORCPT + 27 others); Wed, 24 Aug 2016 06:48:14 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:51440 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751044AbcHXKsN (ORCPT ); Wed, 24 Aug 2016 06:48:13 -0400 Received: from 172.24.1.136 (EHLO szxeml428-hub.china.huawei.com) ([172.24.1.136]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DPY58411; Wed, 24 Aug 2016 18:48:04 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by szxeml428-hub.china.huawei.com (10.82.67.183) with Microsoft SMTP Server id 14.3.235.1; Wed, 24 Aug 2016 18:47:57 +0800 From: John Garry To: , CC: , , , , , , John Garry Subject: [PATCH v2 2/8] hisi_sas: add internal abort in hisi_sas_dev_gone() Date: Wed, 24 Aug 2016 19:05:48 +0800 Message-ID: <1472036754-156813-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472036754-156813-1-git-send-email-john.garry@huawei.com> References: <1472036754-156813-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0204.57BD7B66.009C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8eebf2a6a6590f45883833f791224764 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Execute an internal abort for that device when it is removed, so that commands for that device are not processed. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 763c6c5..c4e59cd 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -621,6 +621,9 @@ static void hisi_sas_dev_gone(struct domain_device *device) dev_info(dev, "found dev[%lld:%x] is gone\n", sas_dev->device_id, sas_dev->dev_type); + hisi_sas_internal_task_abort(hisi_hba, device, + HISI_SAS_INT_ABT_DEV, 0); + hisi_hba->hw->free_device(hisi_hba, sas_dev); device->lldd_dev = NULL; memset(sas_dev, 0, sizeof(*sas_dev));