From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933538AbcHJSOz (ORCPT ); Wed, 10 Aug 2016 14:14:55 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:1075 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753098AbcHJSOo (ORCPT ); Wed, 10 Aug 2016 14:14:44 -0400 From: John Garry To: , CC: , , , , , , John Garry Subject: [PATCH 6/8] hisi_sas: fail tmf task prep when port detached Date: Wed, 10 Aug 2016 21:20:03 +0800 Message-ID: <1470835205-65684-7-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 Content-Type: text/plain X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.57AB266A.022F,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: cc175ac71883dcd6a91bb2f80c20a5ce Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the port is detached we cannot execute a TMF, as there can be no device attached to the port. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 6c82e07..af92b137 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -204,7 +204,7 @@ static int hisi_sas_task_prep(struct sas_task *task, struct hisi_hba *hisi_hba, return rc; } port = device->port->lldd_port; - if (port && !port->port_attached && !tmf) { + if (port && !port->port_attached) { if (sas_protocol_ata(task->task_proto)) { struct task_status_struct *ts = &task->task_status; -- 1.9.1