@@ -30,6 +30,7 @@ struct mpi3_ioc_init_request {
3030#define MPI3_IOCINIT_MSGFLAGS_WRITESAMEDIVERT_SUPPORTED (0x08)
3131#define MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED (0x04)
3232#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_MASK (0x03)
33+ #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_SHIFT (0)
3334#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_NOT_USED (0x00)
3435#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_SEPARATED (0x01)
3536#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_INLINE (0x02)
@@ -40,6 +41,7 @@ struct mpi3_ioc_init_request {
4041#define MPI3_WHOINIT_MANUFACTURER (0x04)
4142
4243#define MPI3_IOCINIT_DRIVERCAP_OSEXPOSURE_MASK (0x00000003)
44+ #define MPI3_IOCINIT_DRIVERCAP_OSEXPOSURE_SHIFT (0)
4345#define MPI3_IOCINIT_DRIVERCAP_OSEXPOSURE_NO_GUIDANCE (0x00000000)
4446#define MPI3_IOCINIT_DRIVERCAP_OSEXPOSURE_NO_SPECIAL (0x00000001)
4547#define MPI3_IOCINIT_DRIVERCAP_OSEXPOSURE_REPORT_AS_HDD (0x00000002)
@@ -111,9 +113,11 @@ struct mpi3_ioc_facts_data {
111113 __le32 diag_tty_size ;
112114};
113115#define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_MASK (0x80000000)
116+ #define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_SHIFT (31)
114117#define MPI3_IOCFACTS_CAPABILITY_SUPERVISOR_IOC (0x00000000)
115118#define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_IOC (0x80000000)
116119#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_MASK (0x00000600)
120+ #define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_SHIFT (9)
117121#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_FIXED_THRESHOLD (0x00000000)
118122#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_OUTSTANDING_IO (0x00000200)
119123#define MPI3_IOCFACTS_CAPABILITY_COMPLETE_RESET_SUPPORTED (0x00000100)
@@ -134,6 +138,7 @@ struct mpi3_ioc_facts_data {
134138#define MPI3_IOCFACTS_EXCEPT_SAS_DISABLED (0x1000)
135139#define MPI3_IOCFACTS_EXCEPT_SAFE_MODE (0x0800)
136140#define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_MASK (0x0700)
141+ #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_SHIFT (8)
137142#define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_NONE (0x0000)
138143#define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_LOCAL_VIA_MGMT (0x0100)
139144#define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_EXT_VIA_MGMT (0x0200)
@@ -149,6 +154,7 @@ struct mpi3_ioc_facts_data {
149154#define MPI3_IOCFACTS_EXCEPT_BLOCKING_BOOT_EVENT (0x0004)
150155#define MPI3_IOCFACTS_EXCEPT_SECURITY_SELFTEST_FAILURE (0x0002)
151156#define MPI3_IOCFACTS_EXCEPT_BOOTSTAT_MASK (0x0001)
157+ #define MPI3_IOCFACTS_EXCEPT_BOOTSTAT_SHIFT (0)
152158#define MPI3_IOCFACTS_EXCEPT_BOOTSTAT_PRIMARY (0x0000)
153159#define MPI3_IOCFACTS_EXCEPT_BOOTSTAT_SECONDARY (0x0001)
154160#define MPI3_IOCFACTS_PROTOCOL_SAS (0x0010)
@@ -161,10 +167,12 @@ struct mpi3_ioc_facts_data {
161167#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000ff00)
162168#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8)
163169#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_MASK (0x00000030)
170+ #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_SHIFT (4)
164171#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_NOT_STARTED (0x00000000)
165172#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_IN_PROGRESS (0x00000010)
166173#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_COMPLETE (0x00000020)
167174#define MPI3_IOCFACTS_FLAGS_PERSONALITY_MASK (0x0000000f)
175+ #define MPI3_IOCFACTS_FLAGS_PERSONALITY_SHIFT (0)
168176#define MPI3_IOCFACTS_FLAGS_PERSONALITY_EHBA (0x00000000)
169177#define MPI3_IOCFACTS_FLAGS_PERSONALITY_RAID_DDR (0x00000002)
170178#define MPI3_IOCFACTS_IO_THROTTLE_DATA_LENGTH_NOT_REQUIRED (0x0000)
@@ -204,6 +212,7 @@ struct mpi3_create_request_queue_request {
204212};
205213
206214#define MPI3_CREATE_REQUEST_QUEUE_FLAGS_SEGMENTED_MASK (0x80)
215+ #define MPI3_CREATE_REQUEST_QUEUE_FLAGS_SEGMENTED_SHIFT (7)
207216#define MPI3_CREATE_REQUEST_QUEUE_FLAGS_SEGMENTED_SEGMENTED (0x80)
208217#define MPI3_CREATE_REQUEST_QUEUE_FLAGS_SEGMENTED_CONTIGUOUS (0x00)
209218#define MPI3_CREATE_REQUEST_QUEUE_SIZE_MINIMUM (2)
@@ -237,10 +246,12 @@ struct mpi3_create_reply_queue_request {
237246};
238247
239248#define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_MASK (0x80)
249+ #define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_SHIFT (7)
240250#define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_SEGMENTED (0x80)
241251#define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_CONTIGUOUS (0x00)
242252#define MPI3_CREATE_REPLY_QUEUE_FLAGS_COALESCE_DISABLE (0x02)
243253#define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_MASK (0x01)
254+ #define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_SHIFT (0)
244255#define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_DISABLE (0x00)
245256#define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_ENABLE (0x01)
246257#define MPI3_CREATE_REPLY_QUEUE_SIZE_MINIMUM (2)
@@ -326,9 +337,11 @@ struct mpi3_event_notification_reply {
326337};
327338
328339#define MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_MASK (0x01)
340+ #define MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_SHIFT (0)
329341#define MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_REQUIRED (0x01)
330342#define MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_NOT_REQUIRED (0x00)
331343#define MPI3_EVENT_NOTIFY_MSGFLAGS_EVENT_ORIGINALITY_MASK (0x02)
344+ #define MPI3_EVENT_NOTIFY_MSGFLAGS_EVENT_ORIGINALITY_SHIFT (1)
332345#define MPI3_EVENT_NOTIFY_MSGFLAGS_EVENT_ORIGINALITY_ORIGINAL (0x00)
333346#define MPI3_EVENT_NOTIFY_MSGFLAGS_EVENT_ORIGINALITY_REPLAY (0x02)
334347struct mpi3_event_data_gpio_interrupt {
@@ -461,9 +474,6 @@ struct mpi3_event_data_sas_notify_primitive {
461474#define MPI3_EVENT_NOTIFY_PRIMITIVE_POWER_LOSS_EXPECTED (0x02)
462475#define MPI3_EVENT_NOTIFY_PRIMITIVE_RESERVED1 (0x03)
463476#define MPI3_EVENT_NOTIFY_PRIMITIVE_RESERVED2 (0x04)
464- #ifndef MPI3_EVENT_SAS_TOPO_PHY_COUNT
465- #define MPI3_EVENT_SAS_TOPO_PHY_COUNT (1)
466- #endif
467477struct mpi3_event_sas_topo_phy_entry {
468478 __le16 attached_dev_handle ;
469479 u8 link_rate ;
@@ -490,6 +500,7 @@ struct mpi3_event_sas_topo_phy_entry {
490500#define MPI3_EVENT_SAS_TOPO_PHY_STATUS_NO_EXIST (0x40)
491501#define MPI3_EVENT_SAS_TOPO_PHY_STATUS_VACANT (0x80)
492502#define MPI3_EVENT_SAS_TOPO_PHY_RC_MASK (0x0f)
503+ #define MPI3_EVENT_SAS_TOPO_PHY_RC_SHIFT (0)
493504#define MPI3_EVENT_SAS_TOPO_PHY_RC_TARG_NOT_RESPONDING (0x02)
494505#define MPI3_EVENT_SAS_TOPO_PHY_RC_PHY_CHANGED (0x03)
495506#define MPI3_EVENT_SAS_TOPO_PHY_RC_NO_CHANGE (0x04)
@@ -504,7 +515,7 @@ struct mpi3_event_data_sas_topology_change_list {
504515 u8 start_phy_num ;
505516 u8 exp_status ;
506517 u8 io_unit_port ;
507- struct mpi3_event_sas_topo_phy_entry phy_entry [MPI3_EVENT_SAS_TOPO_PHY_COUNT ] ;
518+ struct mpi3_event_sas_topo_phy_entry phy_entry [] __counted_by ( num_entries ) ;
508519};
509520
510521#define MPI3_EVENT_SAS_TOPO_ES_NO_EXPANDER (0x00)
@@ -553,9 +564,6 @@ struct mpi3_event_data_pcie_enumeration {
553564#define MPI3_EVENT_PCIE_ENUM_ES_MAX_SWITCHES_EXCEED (0x40000000)
554565#define MPI3_EVENT_PCIE_ENUM_ES_MAX_DEVICES_EXCEED (0x20000000)
555566#define MPI3_EVENT_PCIE_ENUM_ES_RESOURCES_EXHAUSTED (0x10000000)
556- #ifndef MPI3_EVENT_PCIE_TOPO_PORT_COUNT
557- #define MPI3_EVENT_PCIE_TOPO_PORT_COUNT (1)
558- #endif
559567struct mpi3_event_pcie_topo_port_entry {
560568 __le16 attached_dev_handle ;
561569 u8 port_status ;
@@ -572,13 +580,15 @@ struct mpi3_event_pcie_topo_port_entry {
572580#define MPI3_EVENT_PCIE_TOPO_PS_DELAY_NOT_RESPONDING (0x05)
573581#define MPI3_EVENT_PCIE_TOPO_PS_RESPONDING (0x06)
574582#define MPI3_EVENT_PCIE_TOPO_PI_LANES_MASK (0xf0)
583+ #define MPI3_EVENT_PCIE_TOPO_PI_LANES_SHIFT (4)
575584#define MPI3_EVENT_PCIE_TOPO_PI_LANES_UNKNOWN (0x00)
576585#define MPI3_EVENT_PCIE_TOPO_PI_LANES_1 (0x10)
577586#define MPI3_EVENT_PCIE_TOPO_PI_LANES_2 (0x20)
578587#define MPI3_EVENT_PCIE_TOPO_PI_LANES_4 (0x30)
579588#define MPI3_EVENT_PCIE_TOPO_PI_LANES_8 (0x40)
580589#define MPI3_EVENT_PCIE_TOPO_PI_LANES_16 (0x50)
581590#define MPI3_EVENT_PCIE_TOPO_PI_RATE_MASK (0x0f)
591+ #define MPI3_EVENT_PCIE_TOPO_PI_RATE_SHIFT (0)
582592#define MPI3_EVENT_PCIE_TOPO_PI_RATE_UNKNOWN (0x00)
583593#define MPI3_EVENT_PCIE_TOPO_PI_RATE_DISABLED (0x01)
584594#define MPI3_EVENT_PCIE_TOPO_PI_RATE_2_5 (0x02)
@@ -596,7 +606,7 @@ struct mpi3_event_data_pcie_topology_change_list {
596606 u8 switch_status ;
597607 u8 io_unit_port ;
598608 __le32 reserved0c ;
599- struct mpi3_event_pcie_topo_port_entry port_entry [MPI3_EVENT_PCIE_TOPO_PORT_COUNT ] ;
609+ struct mpi3_event_pcie_topo_port_entry port_entry [] __counted_by ( num_entries ) ;
600610};
601611
602612#define MPI3_EVENT_PCIE_TOPO_SS_NO_PCIE_SWITCH (0x00)
@@ -887,6 +897,7 @@ struct mpi3_pel_req_action_acknowledge {
887897};
888898
889899#define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_MASK (0x03)
900+ #define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_SHIFT (0)
890901#define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_NO_GUIDANCE (0x00)
891902#define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_CONTINUE_OP (0x01)
892903#define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_TRANSITION_TO_FAULT (0x02)
@@ -930,6 +941,7 @@ struct mpi3_ci_download_request {
930941#define MPI3_CI_DOWNLOAD_MSGFLAGS_FORCE_FMC_ENABLE (0x40)
931942#define MPI3_CI_DOWNLOAD_MSGFLAGS_SIGNED_NVDATA (0x20)
932943#define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_MASK (0x03)
944+ #define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_SHIFT (0)
933945#define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_FAST (0x00)
934946#define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_MEDIUM (0x01)
935947#define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_SLOW (0x02)
@@ -959,6 +971,7 @@ struct mpi3_ci_download_reply {
959971#define MPI3_CI_DOWNLOAD_FLAGS_OFFLINE_ACTIVATION_REQUIRED (0x20)
960972#define MPI3_CI_DOWNLOAD_FLAGS_KEY_UPDATE_PENDING (0x10)
961973#define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_MASK (0x0e)
974+ #define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_SHIFT (1)
962975#define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_NOT_NEEDED (0x00)
963976#define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_AWAITING (0x02)
964977#define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_ONLINE_PENDING (0x04)
@@ -982,9 +995,11 @@ struct mpi3_ci_upload_request {
982995};
983996
984997#define MPI3_CI_UPLOAD_MSGFLAGS_LOCATION_MASK (0x01)
998+ #define MPI3_CI_UPLOAD_MSGFLAGS_LOCATION_SHIFT (0)
985999#define MPI3_CI_UPLOAD_MSGFLAGS_LOCATION_PRIMARY (0x00)
9861000#define MPI3_CI_UPLOAD_MSGFLAGS_LOCATION_SECONDARY (0x01)
9871001#define MPI3_CI_UPLOAD_MSGFLAGS_FORMAT_MASK (0x02)
1002+ #define MPI3_CI_UPLOAD_MSGFLAGS_FORMAT_SHIFT (1)
9881003#define MPI3_CI_UPLOAD_MSGFLAGS_FORMAT_FLASH (0x00)
9891004#define MPI3_CI_UPLOAD_MSGFLAGS_FORMAT_EXECUTABLE (0x02)
9901005#define MPI3_CTRL_OP_FORCE_FULL_DISCOVERY (0x01)
0 commit comments