51 #define HAL_FWREV_ZERO (0ull)
52 #define HAL_FWREV_MAX (~0ull)
54 #define SLI4_ASIC_TYPE_ANY 0
55 #define SLI4_ASIC_REV_ANY 0
187 for (p = fwrev_string, i = 0; *p && (i < 4); i ++) {
188 v[i] = ocs_strtoul(p, 0, 0);
189 while(*p && *p !=
'.') {
201 return HAL_FWREV(v[0], v[1], v[2], v[3]);
221 (w->
fwrev_low <= hal->workaround.fwrev) &&
257 for (i = 0, w = hal_workarounds; i < ARRAY_SIZE(hal_workarounds); i++, w++) {
262 ocs_log_debug(hal->
os,
"Override: test: %d\n", w->
value);
267 ocs_log_debug(hal->
os,
"HAL Workaround: retain TSEND IO length\n");
274 ocs_log_debug(hal->
os,
"HAL Workaround: override max_qentries: %d\n", w->
value);
283 ocs_log_debug(hal->
os,
"HAL Workaround: override RQ max_qentries: %d\n", w->
value);
290 ocs_log_debug(hal->
os,
"HAL Workaround: set WQE count method=%d\n", w->
value);
296 ocs_log_debug(hal->
os,
"HAL Workaround: set RQE count method=%d\n", w->
value);
302 ocs_log_debug(hal->
os,
"HAL Workaround: use unreg'd RPI if rnode->indicator == 0xFFFF\n");
310 ocs_log_err(hal->
os,
"sli_resource_alloc unregistered RPI failed\n");
315 ocs_log_debug(hal->
os,
"HAL Workaround: disable AR on T10-PI TSEND\n");
319 ocs_log_debug(hal->
os,
"HAL Workaround: disable set_dump_loc\n");
323 ocs_log_debug(hal->
os,
"HAL Workaround: use DIF quarantine\n");
327 ocs_log_debug(hal->
os,
"HAL Workaround: use DIF secondary xri\n");
331 ocs_log_debug(hal->
os,
"HAL Workaround: override FCFI in SRB\n");
336 ocs_log_debug(hal->
os,
"HAL Workaround: fw version is below the minimum for this driver\n");
340 ocs_log_debug(hal->
os,
"HAL Workaround: SGLC misreported - chaining is enabled\n");
344 ocs_log_debug(hal->
os,
"HAL Workaround: not SEND_FRAME capable - disabled\n");
hal_workaround_e workaround
uint8_t use_unregistered_rpi
Internal workaround structure instance.
uint16_t count_method[SLI_QTYPE_MAX]
#define OCS_MIN_FW_VER_LANCER
int32_t sli_resource_alloc(sli4_t *sli4, sli4_resource_e rtype, uint32_t *rid, uint32_t *index)
Allocate SLI Port resources.
static hal_workaround_t hal_workarounds[]
hal_workaround_e
Internal definition of workarounds.
void sli_calc_max_qentries(sli4_t *sli4)
Calculate max queue entries.
struct sli4_t::@47 config
uint32_t unregistered_rid
uint8_t fw_version_too_low
sli4_asic_type_e asic_type
#define SLI4_ASIC_REV_ANY
#define SLI4_ASIC_TYPE_ANY
static int32_t ocs_hal_workaround_match(ocs_hal_t *hal, hal_workaround_t *w)
Function prototypes.
uint8_t disable_ar_tgt_dif
uint8_t retain_tsend_io_length
void ocs_hal_workaround_setup(struct ocs_hal_s *hal)
Setup HAL runtime workarounds.
ocs_hal_workaround_t workaround
#define OCS_MIN_FW_VER_SKYHAWK
uint32_t unregistered_index
uint32_t num_qentries[SLI_QTYPE_MAX]
uint8_t use_dif_quarantine
static uint64_t parse_fw_version(const char *fwrev_string)
Parse the firmware version (name)
uint8_t ignore_send_frame
#define HAL_FWREV(a, b, c, d)
pack fw revision values into a single uint64_t