| 13 | #define SFC_TBLS_U32_BITS (sizeof(uint32_t) * CHAR_BIT) |
| 14 | |
| 15 | int |
| 16 | sfc_tbls_attach(struct sfc_adapter *sa) |
| 17 | { |
| 18 | struct sfc_tbls *tables = &sa->hw_tables; |
| 19 | const struct sfc_mae *mae = &sa->mae; |
| 20 | const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic); |
| 21 | int rc; |
| 22 | |
| 23 | sfc_log_init(sa, "entry"); |
| 24 | |
| 25 | if (mae->status != SFC_MAE_STATUS_ADMIN || |
| 26 | !encp->enc_table_api_supported) { |
| 27 | tables->status = SFC_TBLS_STATUS_UNSUPPORTED; |
| 28 | return 0; |
| 29 | } |
| 30 | |
| 31 | tables->status = SFC_TBLS_STATUS_SUPPORTED; |
| 32 | |
| 33 | rc = sfc_tbl_meta_init(sa); |
| 34 | if (rc != 0) |
| 35 | return rc; |
| 36 | |
| 37 | sfc_log_init(sa, "done"); |
| 38 | |
| 39 | return 0; |
| 40 | } |
| 41 | |
| 42 | void |
| 43 | sfc_tbls_detach(struct sfc_adapter *sa) |
no test coverage detected