Skip to content

Commit d24e091

Browse files
Merge patch series "mpi3mr: Enhancements for mpi3mr"
Ranjan Kumar <ranjan.kumar@broadcom.com> says: Enhancements for mpi3mr driver Link: https://patch.msgid.link/20260116060719.32937-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 parents 15df721 + 943e904 commit d24e091

13 files changed

Lines changed: 478 additions & 40 deletions

drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* Copyright 2017-2023 Broadcom Inc. All rights reserved.
3+
* Copyright 2017-2026 Broadcom Inc. All rights reserved.
44
*/
55
#ifndef MPI30_CNFG_H
66
#define MPI30_CNFG_H 1
@@ -1037,6 +1037,7 @@ struct mpi3_io_unit_page5 {
10371037
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SATA_SSD_SHIFT (2)
10381038
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_SSD_MASK (0x0003)
10391039
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_SSD_SHIFT (0)
1040+
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_HDD_SPINDOWN_ENABLE (0x8000)
10401041
#define MPI3_IOUNIT5_FLAGS_SATAPUIS_MASK (0x0c)
10411042
#define MPI3_IOUNIT5_FLAGS_SATAPUIS_NOT_SUPPORTED (0x00)
10421043
#define MPI3_IOUNIT5_FLAGS_SATAPUIS_OS_CONTROLLED (0x04)
@@ -1074,7 +1075,8 @@ struct mpi3_io_unit_page8 {
10741075
u8 current_key_encryption_algo;
10751076
u8 key_digest_hash_algo;
10761077
union mpi3_version_union current_svn;
1077-
__le32 reserved14;
1078+
__le16 pending_svn_time;
1079+
__le16 reserved16;
10781080
__le32 current_key[128];
10791081
union mpi3_iounit8_digest digest[MPI3_IOUNIT8_DIGEST_MAX];
10801082
};
@@ -1406,6 +1408,7 @@ struct mpi3_driver_page1 {
14061408
};
14071409

14081410
#define MPI3_DRIVER1_PAGEVERSION (0x00)
1411+
#define MPI3_DRIVER1_FLAGS_DEVICE_SHUTDOWN_ON_UNLOAD_DISABLE (0x0001)
14091412
#ifndef MPI3_DRIVER2_TRIGGER_MAX
14101413
#define MPI3_DRIVER2_TRIGGER_MAX (1)
14111414
#endif
@@ -1561,7 +1564,9 @@ struct mpi3_security1_key_record {
15611564
u8 consumer;
15621565
__le16 key_data_size;
15631566
__le32 additional_key_data;
1564-
__le32 reserved08[2];
1567+
u8 library_version;
1568+
u8 reserved09[3];
1569+
__le32 reserved0c;
15651570
union mpi3_security1_key_data key_data;
15661571
};
15671572

@@ -1614,6 +1619,85 @@ struct mpi3_security_page2 {
16141619
u8 reserved9d[3];
16151620
struct mpi3_security2_trusted_root trusted_root[MPI3_SECURITY2_TRUSTED_ROOT_MAX];
16161621
};
1622+
1623+
struct mpi3_security_page3 {
1624+
struct mpi3_config_page_header header;
1625+
__le16 key_data_length;
1626+
__le16 reserved0a;
1627+
u8 key_number;
1628+
u8 reserved0d[3];
1629+
union mpi3_security_mac mac;
1630+
union mpi3_security_nonce nonce;
1631+
__le32 reserved90[12];
1632+
u8 flags;
1633+
u8 consumer;
1634+
__le16 key_data_size;
1635+
__le32 additional_key_data;
1636+
u8 library_version;
1637+
u8 reserved_c9[3];
1638+
__le32 reserved_cc;
1639+
u8 key_data[];
1640+
};
1641+
1642+
#define MPI3_SECURITY3_PAGEVERSION (0x00)
1643+
#define MPI3_SECURITY3_FLAGS_TYPE_MASK (0x0f)
1644+
#define MPI3_SECURITY3_FLAGS_TYPE_SHIFT (0)
1645+
#define MPI3_SECURITY3_FLAGS_TYPE_NOT_VALID (0)
1646+
#define MPI3_SECURITY3_FLAGS_TYPE_MLDSA_PRIVATE (1)
1647+
#define MPI3_SECURITY3_FLAGS_TYPE_MLDSA_PUBLIC (2)
1648+
struct mpi3_security_page10 {
1649+
struct mpi3_config_page_header header;
1650+
__le32 reserved08[2];
1651+
union mpi3_security_mac mac;
1652+
union mpi3_security_nonce nonce;
1653+
__le64 current_token_nonce;
1654+
__le64 previous_token_nonce;
1655+
__le32 reserved_a0[8];
1656+
u8 diagnostic_auth_id[64];
1657+
};
1658+
#define MPI3_SECURITY10_PAGEVERSION (0x00)
1659+
1660+
struct mpi3_security_page11 {
1661+
struct mpi3_config_page_header header;
1662+
u8 flags;
1663+
u8 reserved09[3];
1664+
__le32 reserved0c;
1665+
__le32 diagnostic_token_length;
1666+
__le32 reserved14[3];
1667+
u8 diagnostic_token[];
1668+
};
1669+
#define MPI3_SECURITY11_PAGEVERSION (0x00)
1670+
#define MPI3_SECURITY11_FLAGS_TOKEN_ENABLED (0x01)
1671+
1672+
struct mpi3_security12_diag_feature {
1673+
__le32 feature_identifier;
1674+
u8 feature_size;
1675+
u8 feature_type;
1676+
__le16 reserved06;
1677+
u8 status;
1678+
u8 section;
1679+
__le16 reserved0a;
1680+
__le32 reserved0c;
1681+
u8 feature_data[64];
1682+
};
1683+
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_MASK (0x03)
1684+
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_SHIFT (0)
1685+
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_UNKNOWN (0x00)
1686+
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_DISABLED (0x01)
1687+
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_ENABLED (0x02)
1688+
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_PROTECTED (0x00)
1689+
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_UNPROTECTED (0x01)
1690+
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_PAYLOAD (0x02)
1691+
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_SIGNATURE (0x03)
1692+
struct mpi3_security_page12 {
1693+
struct mpi3_config_page_header header;
1694+
__le32 reserved08[2];
1695+
u8 num_diag_features;
1696+
u8 reserved11[3];
1697+
__le32 reserved14[3];
1698+
struct mpi3_security12_diag_feature diag_feature[];
1699+
};
1700+
16171701
#define MPI3_SECURITY2_PAGEVERSION (0x00)
16181702
struct mpi3_sas_io_unit0_phy_data {
16191703
u8 io_unit_port;
@@ -2314,6 +2398,8 @@ struct mpi3_device0_sas_sata_format {
23142398
u8 attached_phy_identifier;
23152399
u8 max_port_connections;
23162400
u8 zone_group;
2401+
u8 reserved10[3];
2402+
u8 negotiated_link_rate;
23172403
};
23182404

23192405
#define MPI3_DEVICE0_SASSATA_FLAGS_WRITE_SAME_UNMAP_NCQ (0x0400)

drivers/scsi/mpi3mr/mpi/mpi30_image.h

Lines changed: 99 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* Copyright 2018-2023 Broadcom Inc. All rights reserved.
3+
* Copyright 2018-2026 Broadcom Inc. All rights reserved.
44
*/
55
#ifndef MPI30_IMAGE_H
66
#define MPI30_IMAGE_H 1
@@ -135,7 +135,7 @@ struct mpi3_ci_manifest_mpi {
135135
__le32 package_version_string_offset;
136136
__le32 package_build_date_string_offset;
137137
__le32 package_build_time_string_offset;
138-
__le32 reserved4c;
138+
__le32 diag_authorization_key_offset;
139139
__le32 diag_authorization_identifier[16];
140140
struct mpi3_ci_manifest_mpi_comp_image_ref component_image_ref[MPI3_CI_MANIFEST_MPI_MAX];
141141
};
@@ -148,16 +148,112 @@ struct mpi3_ci_manifest_mpi {
148148
#define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_GCA (0x50)
149149
#define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_POINT (0x60)
150150
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTHORIZATION (0x01)
151+
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_MASK (0x06)
152+
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_SHIFT (1)
153+
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_IDENTIFIER (0x00)
154+
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_KEY_OFFSET (0x02)
151155
#define MPI3_CI_MANIFEST_MPI_SUBSYSTEMID_IGNORED (0xffff)
152156
#define MPI3_CI_MANIFEST_MPI_PKG_VER_STR_OFF_UNSPECIFIED (0x00000000)
153157
#define MPI3_CI_MANIFEST_MPI_PKG_BUILD_DATE_STR_OFF_UNSPECIFIED (0x00000000)
154158
#define MPI3_CI_MANIFEST_MPI_PKG_BUILD_TIME_STR_OFF_UNSPECIFIED (0x00000000)
159+
160+
struct mpi3_sb_manifest_ci_digest {
161+
__le32 signature1;
162+
__le32 reserved04[2];
163+
u8 hash_algorithm;
164+
u8 reserved09[3];
165+
struct mpi3_comp_image_version component_image_version;
166+
__le32 component_image_version_string_offset;
167+
__le32 digest[16];
168+
};
169+
170+
struct mpi3_sb_manifest_ci_ref_element {
171+
u8 num_ci_digests;
172+
u8 reserved01[3];
173+
struct mpi3_sb_manifest_ci_digest ci_digest[];
174+
};
175+
176+
struct mpi3_sb_manifest_embedded_key_element {
177+
__le32 reserved00[3];
178+
u8 key_algorithm;
179+
u8 flags;
180+
__le16 public_key_size;
181+
__le32 start_tag;
182+
__le32 public_key[];
183+
};
184+
185+
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_MASK (0x03)
186+
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_STRT (0x00)
187+
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_K2GO (0x01)
188+
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_STARTTAG_STRT (0x54525453)
189+
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_STARTTAG_K2GO (0x4f47324b)
190+
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_ENDTAG_STOP (0x504f5453)
191+
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_ENDTAG_K2ST (0x5453324b)
192+
193+
struct mpi3_sb_manifest_diag_key_element {
194+
__le32 reserved00[3];
195+
u8 key_algorithm;
196+
u8 flags;
197+
__le16 public_key_size;
198+
__le32 public_key[];
199+
};
200+
201+
#define MPI3_SB_MANIFEST_DIAG_KEY_FLAGS_KEYINDEX_MASK (0x03)
202+
#define MPI3_SB_MANIFEST_DIAG_KEY_FLAGS_KEYSELECT_FW_KEY (0x04)
203+
union mpi3_sb_manifest_element_data {
204+
struct mpi3_sb_manifest_ci_ref_element ci_ref;
205+
struct mpi3_sb_manifest_embedded_key_element embed_key;
206+
struct mpi3_sb_manifest_diag_key_element diag_key;
207+
__le32 dword;
208+
};
209+
struct mpi3_sb_manifest_element {
210+
u8 manifest_element_form;
211+
u8 reserved01[3];
212+
union mpi3_sb_manifest_element_data form_specific[];
213+
};
214+
#define MPI3_SB_MANIFEST_ELEMENT_FORM_CI_REFS (0x01)
215+
#define MPI3_SB_MANIFEST_ELEMENT_FORM_EMBED_KEY (0x02)
216+
#define MPI3_SB_MANIFEST_ELEMENT_FORM_DIAG_KEY (0x03)
217+
struct mpi3_sb_manifest_mpi {
218+
u8 manifest_type;
219+
u8 reserved01[3];
220+
__le32 reserved04[3];
221+
u8 reserved10;
222+
u8 release_level;
223+
__le16 reserved12;
224+
__le16 reserved14;
225+
__le16 flags;
226+
__le32 reserved18[2];
227+
__le16 vendor_id;
228+
__le16 device_id;
229+
__le16 subsystem_vendor_id;
230+
__le16 subsystem_id;
231+
__le32 reserved28[2];
232+
union mpi3_version_union package_security_version;
233+
__le32 reserved34;
234+
struct mpi3_comp_image_version package_version;
235+
__le32 package_version_string_offset;
236+
__le32 package_build_date_string_offset;
237+
__le32 package_build_time_string_offset;
238+
__le32 component_image_references_offset;
239+
__le32 embedded_key0offset;
240+
__le32 embedded_key1offset;
241+
__le32 diag_authorization_key_offset;
242+
__le32 reserved5c[9];
243+
struct mpi3_sb_manifest_element manifest_elements[];
244+
};
245+
155246
union mpi3_ci_manifest {
156247
struct mpi3_ci_manifest_mpi mpi;
248+
struct mpi3_sb_manifest_mpi sb_mpi;
157249
__le32 dword[1];
158250
};
159251

160-
#define MPI3_CI_MANIFEST_TYPE_MPI (0x00)
252+
#define MPI3_SB_MANIFEST_APU_IMMEDIATE_DEFER_APU_ENABLE (0x01)
253+
254+
#define MPI3_CI_MANIFEST_TYPE_MPI (0x00)
255+
#define MPI3_CI_MANIFEST_TYPE_SB (0x01)
256+
161257
struct mpi3_extended_image_header {
162258
u8 image_type;
163259
u8 reserved01[3];

drivers/scsi/mpi3mr/mpi/mpi30_init.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
3+
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
44
*/
55
#ifndef MPI30_INIT_H
66
#define MPI30_INIT_H 1

drivers/scsi/mpi3mr/mpi/mpi30_ioc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ struct mpi3_event_data_diag_buffer_status_change {
661661
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_RELEASED (0x01)
662662
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_PAUSED (0x02)
663663
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_RESUMED (0x03)
664+
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_CLEARED (0x04)
664665
#define MPI3_PEL_LOCALE_FLAGS_NON_BLOCKING_BOOT_EVENT (0x0200)
665666
#define MPI3_PEL_LOCALE_FLAGS_BLOCKING_BOOT_EVENT (0x0100)
666667
#define MPI3_PEL_LOCALE_FLAGS_PCIE (0x0080)

drivers/scsi/mpi3mr/mpi/mpi30_pci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
3+
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
44
*
55
*/
66
#ifndef MPI30_PCI_H

drivers/scsi/mpi3mr/mpi/mpi30_sas.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
3+
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
44
*/
55
#ifndef MPI30_SAS_H
66
#define MPI30_SAS_H 1

drivers/scsi/mpi3mr/mpi/mpi30_tool.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* Copyright 2016-2024 Broadcom Inc. All rights reserved.
3+
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
44
*/
55
#ifndef MPI30_TOOL_H
66
#define MPI30_TOOL_H 1
77

88
#define MPI3_DIAG_BUFFER_TYPE_TRACE (0x01)
99
#define MPI3_DIAG_BUFFER_TYPE_FW (0x02)
1010
#define MPI3_DIAG_BUFFER_ACTION_RELEASE (0x01)
11+
#define MPI3_DIAG_BUFFER_ACTION_PAUSE (0x02)
12+
#define MPI3_DIAG_BUFFER_ACTION_RESUME (0x03)
13+
#define MPI3_DIAG_BUFFER_ACTION_CLEAR (0x04)
14+
1115

1216
#define MPI3_DIAG_BUFFER_POST_MSGFLAGS_SEGMENTED (0x01)
1317
struct mpi3_diag_buffer_post_request {

drivers/scsi/mpi3mr/mpi/mpi30_transport.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
3-
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
3+
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
44
*/
55
#ifndef MPI30_TRANSPORT_H
66
#define MPI30_TRANSPORT_H 1
@@ -18,7 +18,7 @@ union mpi3_version_union {
1818

1919
#define MPI3_VERSION_MAJOR (3)
2020
#define MPI3_VERSION_MINOR (0)
21-
#define MPI3_VERSION_UNIT (37)
21+
#define MPI3_VERSION_UNIT (39)
2222
#define MPI3_VERSION_DEV (0)
2323
#define MPI3_DEVHANDLE_INVALID (0xffff)
2424
struct mpi3_sysif_oper_queue_indexes {

drivers/scsi/mpi3mr/mpi3mr.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ extern struct list_head mrioc_list;
5656
extern int prot_mask;
5757
extern atomic64_t event_counter;
5858

59-
#define MPI3MR_DRIVER_VERSION "8.15.0.5.51"
60-
#define MPI3MR_DRIVER_RELDATE "18-November-2025"
59+
#define MPI3MR_DRIVER_VERSION "8.17.0.3.50"
60+
#define MPI3MR_DRIVER_RELDATE "09-January-2026"
6161

6262
#define MPI3MR_DRIVER_NAME "mpi3mr"
6363
#define MPI3MR_DRIVER_LICENSE "GPL"
@@ -643,6 +643,7 @@ struct mpi3mr_enclosure_node {
643643
* @dev_info: Device information bits
644644
* @phy_id: Phy identifier provided in device page 0
645645
* @attached_phy_id: Attached phy identifier provided in device page 0
646+
* @negotiated_link_rate: Negotiated link rate from device page 0
646647
* @sas_transport_attached: Is this device exposed to transport
647648
* @pend_sas_rphy_add: Flag to check device is in process of add
648649
* @hba_port: HBA port entry
@@ -654,6 +655,7 @@ struct tgt_dev_sas_sata {
654655
u16 dev_info;
655656
u8 phy_id;
656657
u8 attached_phy_id;
658+
u8 negotiated_link_rate;
657659
u8 sas_transport_attached;
658660
u8 pend_sas_rphy_add;
659661
struct mpi3mr_hba_port *hba_port;
@@ -1134,6 +1136,10 @@ struct scmd_priv {
11341136
* @default_qcount: Total Default queues
11351137
* @active_poll_qcount: Currently active poll queue count
11361138
* @requested_poll_qcount: User requested poll queue count
1139+
* @fault_during_init: Indicates a firmware fault occurred during initialization
1140+
* @saved_fault_code: Firmware fault code captured at the time of failure
1141+
* @saved_fault_info: Additional firmware-provided fault information
1142+
* @fwfault_counter: Count of firmware faults detected by the driver
11371143
* @bsg_dev: BSG device structure
11381144
* @bsg_queue: Request queue for BSG device
11391145
* @stop_bsgs: Stop BSG request flag
@@ -1336,6 +1342,10 @@ struct mpi3mr_ioc {
13361342
u16 default_qcount;
13371343
u16 active_poll_qcount;
13381344
u16 requested_poll_qcount;
1345+
u8 fault_during_init;
1346+
u32 saved_fault_code;
1347+
u32 saved_fault_info[3];
1348+
u64 fwfault_counter;
13391349

13401350
struct device bsg_dev;
13411351
struct request_queue *bsg_queue;
@@ -1506,7 +1516,7 @@ void mpi3mr_pel_get_seqnum_complete(struct mpi3mr_ioc *mrioc,
15061516
struct mpi3mr_drv_cmd *drv_cmd);
15071517
int mpi3mr_pel_get_seqnum_post(struct mpi3mr_ioc *mrioc,
15081518
struct mpi3mr_drv_cmd *drv_cmd);
1509-
void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
1519+
void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,
15101520
u16 event_data_size);
15111521
struct mpi3mr_enclosure_node *mpi3mr_enclosure_find_by_handle(
15121522
struct mpi3mr_ioc *mrioc, u16 handle);

0 commit comments

Comments
 (0)