From patchwork Wed Mar 13 10:07:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjan Kumar X-Patchwork-Id: 780263 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA33639852 for ; Wed, 13 Mar 2024 10:10:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710324637; cv=none; b=Oz1evBSavE8HlcKC/L7RUoPc4imTRXNItnhvgZI1FZQf3XkMXMr5/vJCZSSKhdJwe51fpsEdY9BMR6Yu7zWKUJ6nZTQL9qqILpWAhhQMqNp+ITVBWmx2BfXr9IAFpTaAKq5As5wq8jaErtm68OACp0dexomw6bggMokL6b0sFuY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710324637; c=relaxed/simple; bh=7FtlTpo7AlnGXAc/0e7puLHutyeSinEkcAv4qN8/hI4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ZrC2kmBBr/sxEo8+OUs+zcEznhuxmbrUmDfugzUkEecGK3PXVqNLK1E1jdJHud1LkCI/WxQbtn1nJyJck3fFXaIL6fmwmX8NMJ4VNkDcJavjPLm+aIA1jl38HpcpBzGpp4qgFjqNo0LPy10x1BiG8mofTVJFDKeXcth9oTgDEak= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=cm4E5hnJ; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="cm4E5hnJ" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6e649a2548cso4538574b3a.3 for ; Wed, 13 Mar 2024 03:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1710324635; x=1710929435; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=oY+lSWH84MMz8yUW4hYja/GRAZ4UVCdFbjZpT8K0aTU=; b=cm4E5hnJyiKhKj99UvTiMX+4ZIXBDEJ1Amvwmj0gh69TdgWzl8GNzBINRtGHjDPS/W giQ0tLrCsNBjGutuYldiIphkK9HHfjaHS8tZtwFTZrlK/idRrqbaQ9IaGxXEVnCyNBAs P/dpESbE6IAwOS6CLZhw6FUNGrOAAqGj+U/No= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710324635; x=1710929435; h=mime-version: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=oY+lSWH84MMz8yUW4hYja/GRAZ4UVCdFbjZpT8K0aTU=; b=rSW39mZQWLXztG9HDHOCOTIAJEXtaWFkm4Zz1axYpeVItDPhLd6QxIrqPOIHTyG3UI hB+GCR3VHl42L4quIHLfCg/Ad1LAENvrUVqeLKIxg/gQniPixtcklkmQz72Mds/PmBWD gTKYrtQLRtTv6PajCPUCQBp8TXoQC37EC5e5spl5Hcxoom5ON2f5VtCNfKbc9PGVUBgN bsMXasJd/gRrqfnsIZhnEc5JAPFyUj+8VLttufn0K9XfxMopEy4YZMuM9k6SaxgFy0t9 5wBx/DA5rODWbpDrzPBRPWYMNskxLA68So5dXolpvOFAnsB1o/CGSMSIgLk7GkfbqOvD XCOg== X-Gm-Message-State: AOJu0Yx1BtGOgauLy2r/ubOO4+Mk/WjnqEJycJfpjvZWSCxqmFiSzN1b 1cq+UF1FerIi0IzhUcd/0lMvA8UDEeCz5CKbxaWghbolUctIsVlgvyrYpvW9ARFVEgg+4o5ZHGg Qgh4FbWyMeKELXCI6wtsUXfFZVO2JcAt2fSVuorGRMWfRItzrcldlOR8ZkLfQ4WznvrVym3i4KC mvHgPT61VpRy0YqUJLHqH/s0zdA2iZOv5ctCJjFMgNndypRw== X-Google-Smtp-Source: AGHT+IG3+GwJnOWKE6oT3KdKlXr41bFNEtkSSYiWoy1n1Q1hWxW6hFQ5XJt9KpRPeohkMtJj446r+w== X-Received: by 2002:a05:6a21:2d06:b0:1a2:f4fd:b1fd with SMTP id tw6-20020a056a212d0600b001a2f4fdb1fdmr2947090pzb.39.1710324634506; Wed, 13 Mar 2024 03:10:34 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id j18-20020a056a00175200b006e5af565b1dsm7570337pfc.201.2024.03.13.03.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 03:10:33 -0700 (PDT) From: Ranjan Kumar To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: rajsekhar.chundru@broadcom.com, sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, chandrakanth.patil@broadcom.com, prayas.patel@broadcom.com, Ranjan Kumar Subject: [PATCH v4 4/7] mpi3mr: Set the WriteSame Divert Capability in the IOCInit MPI Request Date: Wed, 13 Mar 2024 15:37:43 +0530 Message-Id: <20240313100746.128951-5-ranjan.kumar@broadcom.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240313100746.128951-1-ranjan.kumar@broadcom.com> References: <20240313100746.128951-1-ranjan.kumar@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Driver is modified to set the Write Same Divert Capability bit in the IOCInit message for the firmware to know that the driver is capable of diverting certain write same commands as defined by the MPI specification. Signed-off-by: Ranjan Kumar Signed-off-by: Sathya Prakash --- drivers/scsi/mpi3mr/mpi/mpi30_ioc.h | 2 +- drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h index 0cb24fc03620..85b91583bacf 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h @@ -27,7 +27,7 @@ struct mpi3_ioc_init_request { __le64 sense_buffer_free_queue_address; __le64 driver_information_address; }; - +#define MPI3_IOCINIT_MSGFLAGS_WRITESAMEDIVERT_SUPPORTED (0x08) #define MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED (0x04) #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_MASK (0x03) #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_NOT_USED (0x00) diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index a21fbff60b59..ae0e2c6cd2af 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -3302,6 +3302,8 @@ static int mpi3mr_issue_iocinit(struct mpi3mr_ioc *mrioc) iocinit_req.msg_flags |= MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED; + iocinit_req.msg_flags |= + MPI3_IOCINIT_MSGFLAGS_WRITESAMEDIVERT_SUPPORTED; init_completion(&mrioc->init_cmds.done); retval = mpi3mr_admin_request_post(mrioc, &iocinit_req,