From patchwork Wed Aug 10 13:19:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 73687 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp557723qga; Wed, 10 Aug 2016 12:21:10 -0700 (PDT) X-Received: by 10.66.127.10 with SMTP id nc10mr9826393pab.109.1470856870407; Wed, 10 Aug 2016 12:21:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k69si49766454pfa.207.2016.08.10.12.21.10 for ; Wed, 10 Aug 2016 12:21:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941353AbcHJTUu (ORCPT ); Wed, 10 Aug 2016 15:20:50 -0400 Received: from dfwrgout.huawei.com ([206.16.17.72]:35134 "EHLO dfwrgout.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933587AbcHJTUs (ORCPT ); Wed, 10 Aug 2016 15:20:48 -0400 X-Greylist: delayed 3602 seconds by postgrey-1.27 at vger.kernel.org; Wed, 10 Aug 2016 15:20:46 EDT Received: from 172.24.2.62 (EHLO szxga02-in.huawei.com) ([172.24.2.62]) by dfwrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DCL50079; Wed, 10 Aug 2016 11:14:36 -0500 (CDT) Received: from 172.24.1.36 (EHLO szxeml432-hub.china.huawei.com) ([172.24.1.36]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DLN22380; Wed, 10 Aug 2016 21:04:37 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by szxeml432-hub.china.huawei.com (10.82.67.209) with Microsoft SMTP Server id 14.3.235.1; Wed, 10 Aug 2016 21:04:29 +0800 From: John Garry To: , CC: , , , , , , John Garry Subject: [PATCH 2/8] hisi_sas: for internal abort in hisi_sas_dev_gone() Date: Wed, 10 Aug 2016 21:19:59 +0800 Message-ID: <1470835205-65684-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470835205-65684-1-git-send-email-john.garry@huawei.com> References: <1470835205-65684-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.0A020201.57AB2667.0140, 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: dfa6d56c2856e2084c02cd49ed7e67b4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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 | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index d30ece2..9540953 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -621,6 +621,8 @@ 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, 1, 0); + hisi_hba->hw->free_device(hisi_hba, sas_dev); device->lldd_dev = NULL; memset(sas_dev, 0, sizeof(*sas_dev));