From: Steve Siwinski <stevensiwinski@gmail.com>
To: mpi3mr-linuxdrv.pdl@broadcom.com
Cc: gustavoars@kernel.org, James.Bottomley@HansenPartnership.com,
kashyap.desai@broadcom.com, kees@kernel.org,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
martin.petersen@oracle.com, prayas.patel@broadcom.com,
ranjan.kumar@broadcom.com, sathya.prakash@broadcom.com,
sreekanth.reddy@broadcom.com, ssiwinski@atto.com,
sumit.saxena@broadcom.com, bgrove@atto.com, tdoedline@atto.com
Subject: [PATCH 1/2] scsi: mpi3mr: Add ATTO vendor support and disable firmware download
Date: Fri, 13 Jun 2025 16:29:40 -0400 [thread overview]
Message-ID: <20250613202941.62114-1-ssiwinski@atto.com> (raw)
Add support for ATTO HBAs by defining the ATTO vendor ID and adding an
entry to the PCI device ID table for SAS4116-based ATTO devices.
Since ATTO HBAs use specialized firmware, block firmware downloads
to ATTO devices via the MPI3_FUNCTION_CI_DOWNLOAD command and return
an error.
Signed-off-by: Steve Siwinski <ssiwinski@atto.com>
---
drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h | 1 +
drivers/scsi/mpi3mr/mpi3mr_app.c | 9 +++++++++
drivers/scsi/mpi3mr/mpi3mr_os.c | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h b/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h
index 96401eb7e231..314eb058c12d 100644
--- a/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h
+++ b/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h
@@ -206,6 +206,7 @@ struct mpi3_config_page_header {
#define MPI3_TEMP_SENSOR_LOCATION_OUTLET (0x2)
#define MPI3_TEMP_SENSOR_LOCATION_DRAM (0x3)
#define MPI3_MFGPAGE_VENDORID_BROADCOM (0x1000)
+#define MPI3_MFGPAGE_VENDORID_ATTO (0x117C)
#define MPI3_MFGPAGE_DEVID_SAS4116 (0x00a5)
#define MPI3_MFGPAGE_DEVID_SAS5116_MPI (0x00b3)
#define MPI3_MFGPAGE_DEVID_SAS5116_NVME (0x00b4)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index f36663613950..7e2d23204e6c 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -2691,6 +2691,15 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
goto out;
}
+ if (mrioc->pdev->subsystem_vendor == MPI3_MFGPAGE_VENDORID_ATTO &&
+ mpi_header->function == MPI3_FUNCTION_CI_DOWNLOAD) {
+ dprint_bsg_err(mrioc, "%s: Firmware download not supported for ATTO HBA.\n",
+ __func__);
+ rval = -EPERM;
+ mutex_unlock(&mrioc->bsg_cmds.mutex);
+ goto out;
+ }
+
if (mpi_header->function == MPI3_BSG_FUNCTION_NVME_ENCAPSULATED) {
nvme_fmt = mpi3mr_get_nvme_data_fmt(
(struct mpi3_nvme_encapsulated_request *)mpi_req);
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index ce444efd859e..12914400660a 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -5931,6 +5931,10 @@ static const struct pci_device_id mpi3mr_pci_id_table[] = {
PCI_DEVICE_SUB(MPI3_MFGPAGE_VENDORID_BROADCOM,
MPI3_MFGPAGE_DEVID_SAS5116_MPI_MGMT, PCI_ANY_ID, PCI_ANY_ID)
},
+ {
+ PCI_DEVICE_SUB(MPI3_MFGPAGE_VENDORID_ATTO,
+ MPI3_MFGPAGE_DEVID_SAS4116, PCI_ANY_ID, PCI_ANY_ID)
+ },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, mpi3mr_pci_id_table);
--
2.43.5
next reply other threads:[~2025-06-13 20:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 20:29 Steve Siwinski [this message]
2025-06-13 20:29 ` [PATCH 2/2] scsi: mpi3mr: Add initialization for ATTO 24Gb SAS HBAs Steve Siwinski
2025-06-14 6:44 ` ALOK TIWARI
2025-06-20 20:00 ` [PATCH v2 " Steve Siwinski
2025-06-14 12:50 ` [PATCH " kernel test robot
2025-06-14 14:03 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250613202941.62114-1-ssiwinski@atto.com \
--to=stevensiwinski@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bgrove@atto.com \
--cc=gustavoars@kernel.org \
--cc=kashyap.desai@broadcom.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mpi3mr-linuxdrv.pdl@broadcom.com \
--cc=prayas.patel@broadcom.com \
--cc=ranjan.kumar@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=ssiwinski@atto.com \
--cc=sumit.saxena@broadcom.com \
--cc=tdoedline@atto.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®