From patchwork Thu Nov 23 16:01:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Saxena X-Patchwork-Id: 746740 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="clBhKzKA" Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35AF710E4 for ; Thu, 23 Nov 2023 07:49:32 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6cbbfdf72ecso1004073b3a.2 for ; Thu, 23 Nov 2023 07:49:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1700754572; x=1701359372; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=ai61vBC5oaCYcx6o+s8gmTglYCyGN/e5Befu1GbxtJ8=; b=clBhKzKA2Btd4GgFhrQbrt3pvz4ISGXxdOxGKtqHFlFDdbk5P0Xs6fzmyqYDK84wO3 FHxvj52YwSwDJBpeddY1LBzvZQOga5f+SqxfbtSIxh8Fiq2Q6QySsw0QywWmwOhAuS80 77KPnCM6IgHh6SfSKSkn8bQ+foKR6RXEhRsOQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700754572; x=1701359372; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ai61vBC5oaCYcx6o+s8gmTglYCyGN/e5Befu1GbxtJ8=; b=Cyzh1RIQICMXF3zV1TBPwIZ0pQNHUBzeMAiawtWOxQP9gHKeje1oN+OwbgbIVq1ubj yJS9tVUy7MmoriPjxhAHFCfQsNn/LXPcu3XzdTmnF7OjFj97mSwrw4n7ZmokHLmGCuBo 6jCHYyKmivhbPrOnWNqbfEkdQScOf+uWnXNP+65HRObTsKYp5wyPq6CP08Mx1voW0vFE m4OpFl+ijYgt+KwGuzO/24o2b3HqPmCD6rA55tvqCESxP6LS5Ywe3rp4xbIeSDDB+y2O YElJXRtVtIcetp8O4GxvHzRrl7UHtLJn3HUqev/bFEpwKGuHHTkza9Yy4PAF9a9drK/5 OTWg== X-Gm-Message-State: AOJu0YzB+9fUn5M6baRwfO0ma1u6R4pXYhlfGRf92oL9vSo7AvYPAxI1 sOBwMMjXohOXMTVT3A9cxfVVUA== X-Google-Smtp-Source: AGHT+IEbY7fM4JPW9UFWq3vtciOXlR1OJQS8G1VFYO2AlHj5hYdDvhUuL3cr6HYnQhdDBp5+E0Yc6g== X-Received: by 2002:a05:6a20:728f:b0:187:ee15:82dc with SMTP id o15-20020a056a20728f00b00187ee1582dcmr1376pzk.20.1700754572246; Thu, 23 Nov 2023 07:49:32 -0800 (PST) Received: from dhcp-10-123-20-95.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id k11-20020a056a00134b00b006cb98040658sm1368686pfu.34.2023.11.23.07.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:49:31 -0800 (PST) From: Sumit Saxena To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, chandrakanth.patil@broadcom.com, ranjan.kumar@broadcom.com, Sumit Saxena Subject: [PATCH 2/5] mpi3mr: Add PCI checks where SAS5116 diverges from SAS4116 Date: Thu, 23 Nov 2023 21:31:29 +0530 Message-Id: <20231123160132.4155-3-sumit.saxena@broadcom.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20231123160132.4155-1-sumit.saxena@broadcom.com> References: <20231123160132.4155-1-sumit.saxena@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Added PCI IDs checks for the cases where SAS5116 diverges from SAS4116 in behavior. Signed-off-by: Sumit Saxena --- drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 ++- drivers/scsi/mpi3mr/mpi3mr_os.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index f039f1d98647..0d148c39ebcc 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -1892,7 +1892,8 @@ static int mpi3mr_create_op_reply_q(struct mpi3mr_ioc *mrioc, u16 qidx) reply_qid = qidx + 1; op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD; - if (!mrioc->pdev->revision) + if ((mrioc->pdev->device == MPI3_MFGPAGE_DEVID_SAS4116) && + !mrioc->pdev->revision) op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD4K; op_reply_q->ci = 0; op_reply_q->ephase = 1; diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index a8d7dbf0159a..91a22e6e5c3f 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -5101,7 +5101,10 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id) mpi3mr_init_drv_cmd(&mrioc->evtack_cmds[i], MPI3MR_HOSTTAG_EVTACKCMD_MIN + i); - if (pdev->revision) + if ((pdev->device == MPI3_MFGPAGE_DEVID_SAS4116) && + !pdev->revision) + mrioc->enable_segqueue = false; + else mrioc->enable_segqueue = true; init_waitqueue_head(&mrioc->reset_waitq); From patchwork Thu Nov 23 16:01:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Saxena X-Patchwork-Id: 746739 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="R1V307qZ" Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E32C10C4 for ; Thu, 23 Nov 2023 07:49:39 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6cbe716b511so562780b3a.3 for ; Thu, 23 Nov 2023 07:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1700754579; x=1701359379; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=7q3doDZkbRt+Geoe7jEu+ki1UGPiFfjiq+uSgFfyMas=; b=R1V307qZrsic4DPKC3o6zRSJhS20eyXlnBVssKF31EAzGyj+mv4+dcAOgg1AEIfuTD H0ZvQrrEVF0xa2in4i6MlWdk39D+MCfoNaZ7zXxzv2+bikhlDna1Vu1K5yRUPtCphCoS IRS+cv/9c5T9KOS/s7zncal7Le65330mHkreo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700754579; x=1701359379; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7q3doDZkbRt+Geoe7jEu+ki1UGPiFfjiq+uSgFfyMas=; b=S4MGDlS1I7+G7imK6pYU1tfBwBDiooqPRXj+9t9GFaPNyqn18jv0uOC2xS6n2BW0tc Yo3/9eJzBWwj9a6+A0KlSHcg64Iw3g8U1CFmPGnTERsnwiyAlO7bCRowxuEFjkidwxM6 ceVZ4j9vBTdgbQ0JCeNA9tGJhenrJ8drlzzbp9vGuM6f0M0h1qpLttXXJqahkhCKIHPq 8koRSZHAlqFGSrh9LuiCm/S9XnmRqOVRJv++cCGHreBOGOe9iYVpzSZp8EoqsT2YMHCq Hw3F15RW3VIzSjRlRZxiyXtufZL6YzxNRENm3S4R44d38nDZH1KX2Mm37xKpXjLwXEMX hL0A== X-Gm-Message-State: AOJu0Yy89VrAYVdQH/CKMtZlmBngeRG1dzFq9KyAtlH4oP0u56/+eLzy OGnuqpCTnN8HeOxa/Jm/QlA53A== X-Google-Smtp-Source: AGHT+IE3sVQjB3/TRZ+xFhC3XarIBx7azD+5bOCj47C6Nk7LYMMM9OHh+v4yVLmfcf9trVizd8rRhw== X-Received: by 2002:a05:6a00:cd2:b0:690:c887:8cd8 with SMTP id b18-20020a056a000cd200b00690c8878cd8mr5961495pfv.32.1700754578676; Thu, 23 Nov 2023 07:49:38 -0800 (PST) Received: from dhcp-10-123-20-95.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id k11-20020a056a00134b00b006cb98040658sm1368686pfu.34.2023.11.23.07.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:49:37 -0800 (PST) From: Sumit Saxena To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, chandrakanth.patil@broadcom.com, ranjan.kumar@broadcom.com, Sumit Saxena Subject: [PATCH 4/5] mpi3mr: Add support for status reply descriptor Date: Thu, 23 Nov 2023 21:31:31 +0530 Message-Id: <20231123160132.4155-5-sumit.saxena@broadcom.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20231123160132.4155-1-sumit.saxena@broadcom.com> References: <20231123160132.4155-1-sumit.saxena@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Inform controller firmware that driver supports status reply descriptor. Signed-off-by: Sumit Saxena --- drivers/scsi/mpi3mr/mpi/mpi30_ioc.h | 1 + drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h index 1e4a60fc655f..0cb24fc03620 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h @@ -28,6 +28,7 @@ struct mpi3_ioc_init_request { __le64 driver_information_address; }; +#define MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED (0x04) #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_MASK (0x03) #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_NOT_USED (0x00) #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_SEPARATED (0x01) diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 0d148c39ebcc..1ad2f88e0528 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -3194,6 +3194,9 @@ static int mpi3mr_issue_iocinit(struct mpi3mr_ioc *mrioc) current_time = ktime_get_real(); iocinit_req.time_stamp = cpu_to_le64(ktime_to_ms(current_time)); + iocinit_req.msg_flags |= + MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED; + init_completion(&mrioc->init_cmds.done); retval = mpi3mr_admin_request_post(mrioc, &iocinit_req, sizeof(iocinit_req), 1);