From patchwork Tue Dec 1 12:39:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghava Aditya Renukunta X-Patchwork-Id: 7740331 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 273139F39D for ; Tue, 1 Dec 2015 19:34:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 609F220698 for ; Tue, 1 Dec 2015 19:34:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EFC92041E for ; Tue, 1 Dec 2015 19:34:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754046AbbLATeb (ORCPT ); Tue, 1 Dec 2015 14:34:31 -0500 Received: from bby1mta02.pmc-sierra.com ([216.241.235.117]:48252 "EHLO bby1mta02.pmc-sierra.bc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753760AbbLATeV (ORCPT ); Tue, 1 Dec 2015 14:34:21 -0500 Received: from bby1mta02.pmc-sierra.bc.ca (localhost.pmc-sierra.bc.ca [127.0.0.1]) by localhost (Postfix) with SMTP id 7F5888E04DD; Tue, 1 Dec 2015 11:34:21 -0800 (PST) Received: from smtp.pmcs.com (bby1cas01.pmc-sierra.internal [216.241.227.142]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by bby1mta02.pmc-sierra.bc.ca (Postfix) with ESMTP id 6B2C38E04CE; Tue, 1 Dec 2015 11:34:21 -0800 (PST) Received: from localhost (216.241.227.4) by bby1cas01.pmc-sierra.internal (216.241.227.142) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 1 Dec 2015 11:34:21 -0800 From: Raghava Aditya Renukunta To: , CC: , , , , , , Subject: [PATCH 07/10] aacraid: Fix AIF triggered IOP_RESET Date: Tue, 1 Dec 2015 04:39:45 -0800 Message-ID: <1448973589-9216-8-git-send-email-RaghavaAditya.Renukunta@pmcs.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448973589-9216-1-git-send-email-RaghavaAditya.Renukunta@pmcs.com> References: <1448973589-9216-1-git-send-email-RaghavaAditya.Renukunta@pmcs.com> MIME-Version: 1.0 X-Originating-IP: [216.241.227.4] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pmcs.com; h=from:to:cc:subject:date:message-id:in-reply-to:references:mime-version:content-type; s=default; bh=JU6UtxIOGt4Sz1Px9vZ/q4TPjsAqmYooHrtmAj/+WUY=; b=GGV9ETbKohFeZZfJE4ISUOlidLBSvvgNJJxYpY49ALgiAXxx/BGjmDEqy0S+z3lPyd/xtdK5e0XGK4I/W0PUzRyumXRk5xpcQzQoryXrO2VqkcD8f14/6nT3Bu1Rxan7F3uu7kYdNifkz+0yIbKJGk34cgqYVAFxDmh5gPtxunk= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIM_SIGNED,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Raghava Aditya Renukunta while driver removal is in progress or PCI shutdown is invoked, driver kills AIF aacraid thread, but IOCTL requests from the management tools re-start AIF thread leading to IOP_RESET. Fixed by setting adapter_shutdown flag when PCI shutdown is invoked. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 6912efd..3a4dbe7 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1454,6 +1454,7 @@ static int aac_suspend(struct pci_dev *pdev, pm_message_t state) struct aac_dev *aac = (struct aac_dev *)shost->hostdata; scsi_block_requests(shost); + aac->adapter_shutdown = 1; aac_send_shutdown(aac); aac_release_resources(aac);