From patchwork Mon Mar 11 11:35:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjan Kumar X-Patchwork-Id: 779602 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (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 36B213BBCC for ; Mon, 11 Mar 2024 11:37:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710157075; cv=none; b=iaYSMvJ4rb6ibgcBYbLCnfTpxM8YJbmSwe0CFiV4aLcnq6LveW1jhv//1Y1j0XdcH8yw8fayFYsQtjI7Su+qeYEUm1TAkGtwe2TX9AffTUDP2wxLpuymCRexTRtTiQsrgiq0FqSFHAwj0QaFkP54BafAVZ/EVnE8EWbzAiVY6mo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710157075; c=relaxed/simple; bh=4aGpEiGH4GDYheB2y3FhjUhDWb4acjzTqXg97OmvRJ8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=uv3n8ntMlh4xyZCLvVqRisRW109sGzO7JJgyMKfxHYgQGK4LILT9nLIjvFuoZ0QPnObNBrwp8dKeOidH1b2Qvo33v/oFEMqtKXxXyMxk0xMW9PemA85xUq2OxNTTxlbImotNk72yK1/h2jAJlv6CPu3ayVoFyJTAnduIjp9fwzQ= 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=RH37HvAD; arc=none smtp.client-ip=209.85.215.172 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="RH37HvAD" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-5cedfc32250so2476346a12.0 for ; Mon, 11 Mar 2024 04:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1710157072; x=1710761872; 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=EO+SGdF5JEz3n1UyVEO64Cw3h3Iw4o56G5P1Q+JtWXE=; b=RH37HvAD+cR/rYS15Zsv2ldhsF3mb3pF+LXVRgk59FmGZHGvRSFrvu5EoLYnfCvZIh NnCx7KMQOWtXxR1ADxS+kj1BDwiOaDtJf4lyFWWwSeEay2s3TAUBUmBxm/SPZH6zRp6V n8rG/6Kpqk1aI1E5DGG9gl46J/fQF1ohEJOeo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710157072; x=1710761872; 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=EO+SGdF5JEz3n1UyVEO64Cw3h3Iw4o56G5P1Q+JtWXE=; b=vVcGXejEnh+SGgol9b+TDl6AWLqNuOpx92WevFbK3Dr0zMbrZfTvKyzCRTdcwgzC7+ c6uFrihDpQFNTIpETIZC+Y/TqVt9Xh88w1o/X8G2HV833aJWaVIWXb2Cr46Nh41Gxv6y c8KRZliaPvvSf7BDP206oPMdEENxWzv//ckEbFZLVebE5BxeB/M7N68mU+goHx33O6ot PZhb8WnqCjLGmPdqqJHkTuEhrHCuNqnRuLqjTWqNdkNDYqTxzWdz/My35WbWb92lvn/2 lmGd4wKP/BROAtVaXIgoOsOXU22qwZBRDkqRNe6Ib78lzscb9AQkcnf7lxnJ24O6ze+m qJ2g== X-Gm-Message-State: AOJu0YzDCEB94NsPcUHhwiRvKuA+U72ULkC3X3cPZItCKN6UVEVDHjUe 8wTihuRKu9h6oWAOILigRZiWqCgVICNt61MQNvyr6O/p7cr/N+dwpVxdrxo/4sh/jvBi4VCTiqX c+kGmoLhGTTeM1Xh+jwLbwWNwkFTvE3k5eoYQC99ImcUY1wL1MnIWRxp76Et0cjwU3mec0iGD8w 3nm7DGwcSuVNHBBpO1gqpF7o1xzeBJAD1H/GC3B7YMuLQpiA== X-Google-Smtp-Source: AGHT+IFusrPVhaI7XDInxHrwajnmEFukSuIgtU2NniuFsm2rwayuVcqTTs3aOxjJsby6JxfbauzplA== X-Received: by 2002:a17:90b:38d1:b0:29b:fd48:f1ab with SMTP id nn17-20020a17090b38d100b0029bfd48f1abmr1964430pjb.29.1710157072218; Mon, 11 Mar 2024 04:37:52 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id ay3-20020a17090b030300b0029ba5f434a8sm3982655pjb.26.2024.03.11.04.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:37:51 -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 v3 4/7] mpi3mr: Set the WriteSame Divert Capability in the IOCInit MPI Request Date: Mon, 11 Mar 2024 17:05:11 +0530 Message-Id: <20240311113514.108795-5-ranjan.kumar@broadcom.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240311113514.108795-1-ranjan.kumar@broadcom.com> References: <20240311113514.108795-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..6ce75366dd8a 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,