summary refs log tree commit diff
path: root/drivers/scsi/mpt3sas
diff options
context:
space:
mode:
authorBradley Grove <bgrove@attotech.com>2022-08-05 13:46:09 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2022-08-31 23:39:57 -0400
commitf45fadde91ec892fdc453e3df9469e9457152526 (patch)
tree66ac083429e4b06803df5253e89eed8f8b11929e /drivers/scsi/mpt3sas
parent91cf186aa1bfea06c7438b16eb40a612a4c3b87a (diff)
downloadlinux-f45fadde91ec892fdc453e3df9469e9457152526.tar.gz
scsi: mpt3sas: Disable MPI2_FUNCTION_FW_DOWNLOAD for ATTO devices
Disable firmware download for ATTO devices where it is not supported.

Link: https://lore.kernel.org/r/20220805174609.14830-2-bgrove@attotech.com
Co-developed-by: Rob Crispo <rcrispo@attotech.com>
Signed-off-by: Rob Crispo <rcrispo@attotech.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas')
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_ctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 84c87c2c3e7e..c47da95b9789 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -948,6 +948,14 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
 		break;
 	}
 	case MPI2_FUNCTION_FW_DOWNLOAD:
+	{
+		if (ioc->pdev->vendor == MPI2_MFGPAGE_VENDORID_ATTO) {
+			ioc_info(ioc, "Firmware download not supported for ATTO HBA.\n");
+			ret = -EPERM;
+			break;
+		}
+		fallthrough;
+	}
 	case MPI2_FUNCTION_FW_UPLOAD:
 	{
 		ioc->build_sg(ioc, psge, data_out_dma, data_out_sz, data_in_dma,