From patchwork Mon Jun 4 10:45:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10446313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ECAE0600CA for ; Mon, 4 Jun 2018 10:45:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD8982876C for ; Mon, 4 Jun 2018 10:45:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D233128BEF; Mon, 4 Jun 2018 10:45:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 777E82876C for ; Mon, 4 Jun 2018 10:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216AbeFDKpd (ORCPT ); Mon, 4 Jun 2018 06:45:33 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:40942 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751930AbeFDKpc (ORCPT ); Mon, 4 Jun 2018 06:45:32 -0400 Received: by mail-qk0-f195.google.com with SMTP id r66-v6so24601257qkr.7 for ; Mon, 04 Jun 2018 03:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RXDfgfkFeN3UyfVM2tnl5jCeRu2/0/hP5Zonl9yhyr4=; b=alqqxzMWYp8G8Ouo/kaDMuW9ZbAHwJ1FPcH/cNtMLmzQFYQ2Eye59B9BFz1LYCcyoE 2DJnbrgxkljj7hfREEvfBILkInCQDs5pyJJD699suFXl0HaiRG4bnhcemRQjVFdzT3xR h5juyBsVtJMa/uF7PHTE55PEW9DuVlrFhElFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RXDfgfkFeN3UyfVM2tnl5jCeRu2/0/hP5Zonl9yhyr4=; b=IAbfUj9Wxj8kf/ILj9uYT6oMTVI3sIgIWBCAjWCQBlXW5EP8BSsQC+QoRVcj9T8gI6 fPhw6Vd9rz8s6EGqPgaG6457z1KEjc8aEycCebLxcNwkTDm8xyZifS1bRnsI3PBQ5V+I UCXMkiLqJio4cqwxAWbCp1h6pQ81PQNu9zJX/Me1QFzvwFCkG28mpgL05gXBNgPIXXjD ZYVCRam/58s1DGvbQ/UMVEkSpm6tbibgclgf+lqjbjS1E1UG6U7eJDmefboPLDJ6ZexO uAPUCQYxImzabCyZGAzmd85M3MQ6+nwoUTITjWkd8sILMA3hRWgiyn80FK9NYM/q1HsY p9SQ== X-Gm-Message-State: APt69E1Hb5cJB64fwSfKyu21IJ3D0I3eYZNn51DjNKrrLBoSdAFVKxaL KW0LednlEelj5CgDpbkrQv9XvC1W X-Google-Smtp-Source: ADUXVKKPmHbQcb9gX9P9JrEMT9O+a7+u4dXYPTmRF58z3eJhQH80MBrrd0q7LyJrnDONB0xvPelW3g== X-Received: by 2002:a37:e103:: with SMTP id c3-v6mr15905731qkm.69.1528109131142; Mon, 04 Jun 2018 03:45:31 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id n21-v6sm7660500qtc.38.2018.06.04.03.45.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 03:45:30 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH 2/5] megaraid_sas: Update controller info during resume Date: Mon, 4 Jun 2018 03:45:10 -0700 Message-Id: <1528109113-1512-3-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1528109113-1512-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1528109113-1512-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a possibility that firmware on the controller was upgraded before system was suspended. During resume, driver needs to read updated controller properties. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 6b2b615846e7..0f47d2bb8ce4 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -6790,6 +6790,9 @@ megasas_resume(struct pci_dev *pdev) goto fail_init_mfi; } + if (megasas_get_ctrl_info(instance) != DCMD_SUCCESS) + goto fail_init_mfi; + tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet, (unsigned long)instance);