From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C326CA9ECE for ; Thu, 31 Oct 2019 05:12:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A7AD2067D for ; Thu, 31 Oct 2019 05:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbfJaFMY (ORCPT ); Thu, 31 Oct 2019 01:12:24 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:29216 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbfJaFMY (ORCPT ); Thu, 31 Oct 2019 01:12:24 -0400 Received-SPF: Pass (esa6.microchip.iphmx.com: domain of viswas.g@microsemi.com designates 208.19.100.21 as permitted sender) identity=mailfrom; client-ip=208.19.100.21; receiver=esa6.microchip.iphmx.com; envelope-from="viswas.g@microsemi.com"; x-sender="viswas.g@microsemi.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:208.19.100.20 ip4:208.19.100.21 ip4:208.19.100.22 ip4:208.19.100.23 ip4:208.19.99.221 ip4:208.19.99.222 ip4:208.19.99.223 ip4:208.19.99.225 -all" Received-SPF: None (esa6.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@smtp.microsemi.com) identity=helo; client-ip=208.19.100.21; receiver=esa6.microchip.iphmx.com; envelope-from="viswas.g@microsemi.com"; x-sender="postmaster@smtp.microsemi.com"; x-conformance=spf_only Authentication-Results: esa6.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=viswas.g@microsemi.com; spf=None smtp.helo=postmaster@smtp.microsemi.com; dmarc=fail (p=none dis=none) d=microchip.com IronPort-SDR: L+J3pXJ3vArPIvWKsJy6vfNptP9e6w2bKDtY+3+d6np+348ggiUXYdMqBy7T0A3dN2f8aFd+lA pi/6X0x5NIvLTn2OF/MtoLGDS8dfjnCbWsyDxzMN+NVy9y3wz7cnUHiqQx7/Jft2K4Jy2EKTVY mjcEbeTl6ifa2ZveFm2X+l4wQueTTwtafJQaXckFzISwHCmIJTzKWMpEOLasRbO9PfMTv4gSRT CcTr+y4KukIma+t8lHwjiM0DMrAUWBSIjdKk8iQuERaDDlUm9ih5piMxjmozS3CilyHNjfWjDL 9PU= X-IronPort-AV: E=Sophos;i="5.68,250,1569308400"; d="scan'208";a="52279623" Received: from unknown (HELO smtp.microsemi.com) ([208.19.100.21]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 Oct 2019 22:12:04 -0700 Received: from AVMBX2.microsemi.net (10.100.34.32) by AVMBX1.microsemi.net (10.100.34.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Wed, 30 Oct 2019 22:12:02 -0700 Received: from localhost (10.41.130.49) by avmbx2.microsemi.net (10.100.34.32) with Microsoft SMTP Server id 15.1.1847.3 via Frontend Transport; Wed, 30 Oct 2019 22:12:01 -0700 From: Deepak Ukey To: CC: , , , , , , , , Subject: [PATCH 01/12] pm80xx : Fix for SATA device discovery. Date: Thu, 31 Oct 2019 10:42:30 +0530 Message-ID: <20191031051241.6762-2-deepak.ukey@microchip.com> X-Mailer: git-send-email 2.19.0-rc1 In-Reply-To: <20191031051241.6762-1-deepak.ukey@microchip.com> References: <20191031051241.6762-1-deepak.ukey@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: peter chang Driver was missing complete() call in mpi_sata_completion which result in SATA abort error handling is timing out. That causes the device to be left in the in_recovery state so subsequent commands sent to the device fail and the OS removes access to it. Signed-off-by: peter chang Signed-off-by: Deepak Ukey Signed-off-by: Viswas G --- drivers/scsi/pm8001/pm80xx_hwi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 73261902d75d..ee9c187d8caa 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c @@ -2382,6 +2382,8 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb) pm8001_printk("task 0x%p done with io_status 0x%x" " resp 0x%x stat 0x%x but aborted by upper layer!\n", t, status, ts->resp, ts->stat)); + if (t->slow_task) + complete(&t->slow_task->completion); pm8001_ccb_task_free(pm8001_ha, t, ccb, tag); } else { spin_unlock_irqrestore(&t->task_state_lock, flags); @@ -3130,8 +3132,10 @@ static int mpi_phy_start_resp(struct pm8001_hba_info *pm8001_ha, void *piomb) if (status == 0) { phy->phy_state = PHY_LINK_DOWN; if (pm8001_ha->flags == PM8001F_RUN_TIME && - phy->enable_completion != NULL) + phy->enable_completion != NULL) { complete(phy->enable_completion); + phy->enable_completion = NULL; + } } return 0; -- 2.16.3