From patchwork Tue May 14 14:28:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjan Kumar X-Patchwork-Id: 796847 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 5F20615FCE7 for ; Tue, 14 May 2024 14:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715697117; cv=none; b=OtUnBgAAaQkWrJZ5O4dPEZrkcF7ByDVLz4Q5b8yGa009LIsNPdhzdp7O3DqoJLJNZeLhWrIuNA0bdnMkIzMRcBHKuOYgGmeXVZzZ3cmsKw4zobdifFYylfMrCD3pI1CmeY+M14Noi5m6LSwlEXjb3qFjM5Pg04++hQBbKW+t4fI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715697117; c=relaxed/simple; bh=fE4e3WKe8MF5hoCpvL28TMOFXk3YjvasogS8BOKoNBU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=B+unBX3ScKVPKwSmSag+XREssJUlHBVO2spoy4j/UpllNgQGORPlDfYzq1lpzQOjpmzmhOszV2mzeFZ1wwQ1eGkdTvxSxqcRAtnZ3aUFT8gzqeYSROzxvkLm1N9gDCQn2R8G/ArWjUosAOa99HH1FXXYhRHn2aymjKndF4nP6zo= 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=JLOerwAq; arc=none smtp.client-ip=209.85.210.169 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="JLOerwAq" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6f4e59081e6so2956106b3a.3 for ; Tue, 14 May 2024 07:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1715697115; x=1716301915; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=tBZTCYx1Tp12pnpldz1GJb6ZxDfYMwNbhnzhn81OyTw=; b=JLOerwAqOoJC9LESzisYa7oYr2y8GJi8bU1SRdSjmoO9EJyv0itW72XuXjdQ51mqaT rKiRouic/1bL7sVCcinMAum660N6KHVZ0VXCr+VGNtk9yhC5LkG1aYikPyeclLmsz0mw cUhNkJlRFrZ6rGrF7w8PEDJJWWR2cGI7UERaY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715697115; x=1716301915; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tBZTCYx1Tp12pnpldz1GJb6ZxDfYMwNbhnzhn81OyTw=; b=iypK3Rv3cfuj7eBVPJby4ry1PWBpnjWlNujJ2uOtmY9/rDEV+pfZWR7VCvJ4zPgW3O p9uuEHICZMSAXEfU2Kt+CHMbBMjsOCr8XF+km7/AF9uUJobn3FVj8Awm3td/PhdfX1JB G61/wklzffeaH6Bto+ioZCyOvFDX3u+d7oU0eoblHqSuYWuzyh9VD7uYsaSIqvodpTox Vlxjf9lZOKypOHGyKuV/BCVh+BEN9YAAXp3Ufb3ajtInuAnWCLBbU2GSNKwiyK3uPqdw F/tUf+RN1Ii4HlcpM8MMk3XcN0+1mOdG0A05Nm2924yjPMzgz0vU8gXWIPBCuWDp78kG wEIQ== X-Gm-Message-State: AOJu0Yz2R3gH1GafvNQtKVnX9ez7fOVShQuI4bg1Hh8ldePhgeJoOTeD MBEE1d9GmGgZlDCrrNcKXUcyzl52CaTV73k40OJ9je+OYirmstkeHZYZ4LgzvVSsYBEQjTR8ViJ Mv3UzFPSvQJLyRatlQgXDPN1gMMSCjSxhZ9n8fwrDzIr8ysd0UwCsS5mbFLMWviAtylYr6G9b0j aK+/1KAJ0vXdh5cl+i+KKFj+6Tp1MNG4pXDigyWGs0DVvywA== X-Google-Smtp-Source: AGHT+IEuFMAwrYkH2je/EplUp6tX3U3E3KoTO5HQVBdqlTuFKTZ9gkd4FPNteKneDxLZdIdn5OWgAA== X-Received: by 2002:a05:6a20:2d2a:b0:1af:f2c5:118a with SMTP id adf61e73a8af0-1aff2c51408mr7396141637.61.1715697114429; Tue, 14 May 2024 07:31:54 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-63560731046sm7849104a12.67.2024.05.14.07.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 07:31:52 -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 v1 0/6] mpi3mr: Host diag buffer support Date: Tue, 14 May 2024 19:58:52 +0530 Message-Id: <20240514142858.51992-1-ranjan.kumar@broadcom.com> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The controllers managed by mpi3mr driver requires system memory to save hardware and firmware diagnostic information, this patch set enhances the drivers to provide host memory to the controller for diagnostic information. This patch set also provides driver changes to push kernel messages into the diagnostic buffers reserved for the driver, so that the information will be available as part of debug data fetched from the controller. In addition, support for configuring automatic diagnostic information is added in the driver. Ranjan Kumar (6): mpi3mr: HDB allocation and posting for hardware and Firmware buffers mpi3mr: Driver buffer allocation and posting mpi3mr: Dump driver and dmesg logs into driver diag buffer mpi3mr: Trigger support mpi3mr: Ioctl support for HDB mpi3mr: Update driver version to 8.9.1.0.50 drivers/scsi/mpi3mr/mpi/mpi30_tool.h | 59 ++ drivers/scsi/mpi3mr/mpi3mr.h | 162 +++- drivers/scsi/mpi3mr/mpi3mr_app.c | 1078 ++++++++++++++++++++++++++ drivers/scsi/mpi3mr/mpi3mr_fw.c | 552 ++++++++++++- drivers/scsi/mpi3mr/mpi3mr_os.c | 113 +++ include/uapi/scsi/scsi_bsg_mpi3mr.h | 3 +- 6 files changed, 1956 insertions(+), 11 deletions(-) create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_tool.h