Copy the code and: - change ICE_AQC to LIBIE_AQC - change ice_aqc to libie_aqc - move definitions outside the structures
Showing the changes to include/linux/net (1 of 5 files). Show all
Unified · Split
| @@ -222,6 +222,94 @@ struct libie_aqc_list_caps_elem { · 221 unmodified lines | |||
| 222 | }; | 222 | }; |
| 223 | LIBIE_CHECK_STRUCT_LEN(32, libie_aqc_list_caps_elem); | 223 | LIBIE_CHECK_STRUCT_LEN(32, libie_aqc_list_caps_elem); |
| 224 | 224 | ||
| 225 | /* Admin Queue command opcodes */ | ||
| 226 | enum libie_adminq_opc { | ||
| 227 | /* FW Logging Commands */ | ||
| 228 | libie_aqc_opc_fw_logs_config = 0xFF30, | ||
| 229 | libie_aqc_opc_fw_logs_register = 0xFF31, | ||
| 230 | libie_aqc_opc_fw_logs_query = 0xFF32, | ||
| 231 | libie_aqc_opc_fw_logs_event = 0xFF33, | ||
| 232 | }; | ||
| 233 | |||
| 234 | enum libie_aqc_fw_logging_mod { | ||
| 235 | LIBIE_AQC_FW_LOG_ID_GENERAL = 0, | ||
| 236 | LIBIE_AQC_FW_LOG_ID_CTRL, | ||
| 237 | LIBIE_AQC_FW_LOG_ID_LINK, | ||
| 238 | LIBIE_AQC_FW_LOG_ID_LINK_TOPO, | ||
| 239 | LIBIE_AQC_FW_LOG_ID_DNL, | ||
| 240 | LIBIE_AQC_FW_LOG_ID_I2C, | ||
| 241 | LIBIE_AQC_FW_LOG_ID_SDP, | ||
| 242 | LIBIE_AQC_FW_LOG_ID_MDIO, | ||
| 243 | LIBIE_AQC_FW_LOG_ID_ADMINQ, | ||
| 244 | LIBIE_AQC_FW_LOG_ID_HDMA, | ||
| 245 | LIBIE_AQC_FW_LOG_ID_LLDP, | ||
| 246 | LIBIE_AQC_FW_LOG_ID_DCBX, | ||
| 247 | LIBIE_AQC_FW_LOG_ID_DCB, | ||
| 248 | LIBIE_AQC_FW_LOG_ID_XLR, | ||
| 249 | LIBIE_AQC_FW_LOG_ID_NVM, | ||
| 250 | LIBIE_AQC_FW_LOG_ID_AUTH, | ||
| 251 | LIBIE_AQC_FW_LOG_ID_VPD, | ||
| 252 | LIBIE_AQC_FW_LOG_ID_IOSF, | ||
| 253 | LIBIE_AQC_FW_LOG_ID_PARSER, | ||
| 254 | LIBIE_AQC_FW_LOG_ID_SW, | ||
| 255 | LIBIE_AQC_FW_LOG_ID_SCHEDULER, | ||
| 256 | LIBIE_AQC_FW_LOG_ID_TXQ, | ||
| 257 | LIBIE_AQC_FW_LOG_ID_RSVD, | ||
| 258 | LIBIE_AQC_FW_LOG_ID_POST, | ||
| 259 | LIBIE_AQC_FW_LOG_ID_WATCHDOG, | ||
| 260 | LIBIE_AQC_FW_LOG_ID_TASK_DISPATCH, | ||
| 261 | LIBIE_AQC_FW_LOG_ID_MNG, | ||
| 262 | LIBIE_AQC_FW_LOG_ID_SYNCE, | ||
| 263 | LIBIE_AQC_FW_LOG_ID_HEALTH, | ||
| 264 | LIBIE_AQC_FW_LOG_ID_TSDRV, | ||
| 265 | LIBIE_AQC_FW_LOG_ID_PFREG, | ||
| 266 | LIBIE_AQC_FW_LOG_ID_MDLVER, | ||
| 267 | LIBIE_AQC_FW_LOG_ID_MAX, | ||
| 268 | }; | ||
| 269 | |||
| 270 | /* Set FW Logging configuration (indirect 0xFF30) | ||
| 271 | * Register for FW Logging (indirect 0xFF31) | ||
| 272 | * Query FW Logging (indirect 0xFF32) | ||
| 273 | * FW Log Event (indirect 0xFF33) | ||
| 274 | */ | ||
| 275 | #define LIBIE_AQC_FW_LOG_CONF_UART_EN BIT(0) | ||
| 276 | #define LIBIE_AQC_FW_LOG_CONF_AQ_EN BIT(1) | ||
| 277 | #define LIBIE_AQC_FW_LOG_QUERY_REGISTERED BIT(2) | ||
| 278 | #define LIBIE_AQC_FW_LOG_CONF_SET_VALID BIT(3) | ||
| 279 | #define LIBIE_AQC_FW_LOG_AQ_REGISTER BIT(0) | ||
| 280 | #define LIBIE_AQC_FW_LOG_AQ_QUERY BIT(2) | ||
| 281 | |||
| 282 | #define LIBIE_AQC_FW_LOG_MIN_RESOLUTION (1) | ||
| 283 | #define LIBIE_AQC_FW_LOG_MAX_RESOLUTION (128) | ||
| 284 | |||
| 285 | struct libie_aqc_fw_log { | ||
| 286 | u8 cmd_flags; | ||
| 287 | |||
| 288 | u8 rsp_flag; | ||
| 289 | __le16 fw_rt_msb; | ||
| 290 | union { | ||
| 291 | struct { | ||
| 292 | __le32 fw_rt_lsb; | ||
| 293 | } sync; | ||
| 294 | struct { | ||
| 295 | __le16 log_resolution; | ||
| 296 | __le16 mdl_cnt; | ||
| 297 | } cfg; | ||
| 298 | } ops; | ||
| 299 | __le32 addr_high; | ||
| 300 | __le32 addr_low; | ||
| 301 | }; | ||
| 302 | |||
| 303 | /* Response Buffer for: | ||
| 304 | * Set Firmware Logging Configuration (0xFF30) | ||
| 305 | * Query FW Logging (0xFF32) | ||
| 306 | */ | ||
| 307 | struct libie_aqc_fw_log_cfg_resp { | ||
| 308 | __le16 module_identifier; | ||
| 309 | u8 log_level; | ||
| 310 | u8 rsvd0; | ||
| 311 | }; | ||
| 312 | |||
| 225 | /** | 313 | /** |
| 226 | * struct libie_aq_desc - Admin Queue (AQ) descriptor | 314 | * struct libie_aq_desc - Admin Queue (AQ) descriptor |
| 227 | * @flags: LIBIE_AQ_FLAG_* flags | 315 | * @flags: LIBIE_AQ_FLAG_* flags |
| @@ -253,6 +341,7 @@ struct libie_aq_desc { · 25 unmodified lines | |||
| 253 | struct libie_aqc_driver_ver driver_ver; | 341 | struct libie_aqc_driver_ver driver_ver; |
| 254 | struct libie_aqc_req_res res_owner; | 342 | struct libie_aqc_req_res res_owner; |
| 255 | struct libie_aqc_list_caps get_cap; | 343 | struct libie_aqc_list_caps get_cap; |
| 344 | struct libie_aqc_fw_log fw_log; | ||
| 256 | } params; | 345 | } params; |
| 257 | }; | 346 | }; |
| 258 | LIBIE_CHECK_STRUCT_LEN(32, libie_aq_desc); | 347 | LIBIE_CHECK_STRUCT_LEN(32, libie_aq_desc); |