From patchwork Tue Sep 1 15:10:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 264659 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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, 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 41865C433E6 for ; Tue, 1 Sep 2020 16:02:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2014D2078B for ; Tue, 1 Sep 2020 16:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598976135; bh=2naeV90/6QPcwClhBjGW6V0liFn96cP65u6M9DzPqM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FAXjzmiADQtwcXEvA2hJrWQ+ANP8AUH0SyIu1rI2i90EceOgkw+kdIWef5JQvZ89k qDP66ETtVnFQ3Xqk47JgPte9RJnY4AqEMIyg1rKYgs6hxtq9V8yJh4Ou+GHdhKgZAu lIqDbzqSIOZ09rmuw8hI0kXVyKazpenEZZV4Apbg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729998AbgIAQCM (ORCPT ); Tue, 1 Sep 2020 12:02:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:58452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731697AbgIAPnv (ORCPT ); Tue, 1 Sep 2020 11:43:51 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D4D32078B; Tue, 1 Sep 2020 15:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598975030; bh=2naeV90/6QPcwClhBjGW6V0liFn96cP65u6M9DzPqM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bw0gcW5aABuKVvGgFWx+7XLKbwj9NSEg9FFN+9Fkt80o7kL5y/rW+LTNQyUXR6ezY vaSzCxgesxCsE7Puz4wsnBjoQdY5gmsY4sSSEvGKO66Z4fh1Q0doeyVXcPsRjm3v7E fWQbThH2mXTAVICQQ7y3O3Ic1uvfHACzEiohLRN0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , Saurav Kashyap , Nilesh Javali , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.8 152/255] scsi: qla2xxx: Check if FW supports MQ before enabling Date: Tue, 1 Sep 2020 17:10:08 +0200 Message-Id: <20200901151007.973250752@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200901151000.800754757@linuxfoundation.org> References: <20200901151000.800754757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Saurav Kashyap [ Upstream commit dffa11453313a115157b19021cc2e27ea98e624c ] OS boot during Boot from SAN was stuck at dracut emergency shell after enabling NVMe driver parameter. For non-MQ support the driver was enabling MQ. Add a check to confirm if FW supports MQ. Link: https://lore.kernel.org/r/20200806111014.28434-9-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qla2xxx/qla_os.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 5c7c22d0fab4b..8b6803f4f2dc1 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -2017,6 +2017,11 @@ skip_pio: /* Determine queue resources */ ha->max_req_queues = ha->max_rsp_queues = 1; ha->msix_count = QLA_BASE_VECTORS; + + /* Check if FW supports MQ or not */ + if (!(ha->fw_attributes & BIT_6)) + goto mqiobase_exit; + if (!ql2xmqsupport || !ql2xnvmeenable || (!IS_QLA25XX(ha) && !IS_QLA81XX(ha))) goto mqiobase_exit;