• Home
  • Raw
  • Download

Lines Matching refs:mc5

123 static int init_mask_data_array(struct mc5 *mc5, u32 mask_array_base,  in init_mask_data_array()  argument
128 struct adapter *adap = mc5->adapter; in init_mask_data_array()
134 unsigned int size72 = mc5->tcam_size; in init_mask_data_array()
137 if (mc5->mode == MC5_MODE_144_BIT) { in init_mask_data_array()
154 mc5->mode == MC5_MODE_144_BIT ? in init_mask_data_array()
163 static int init_idt52100(struct mc5 *mc5) in init_idt52100() argument
166 struct adapter *adap = mc5->adapter; in init_idt52100()
221 return init_mask_data_array(mc5, IDT_MSKARY_BASE_ADR0, in init_idt52100()
227 static int init_idt43102(struct mc5 *mc5) in init_idt43102() argument
230 struct adapter *adap = mc5->adapter; in init_idt43102()
281 return init_mask_data_array(mc5, IDT4_MSKARY_BASE_ADR0, in init_idt43102()
288 static inline void mc5_dbgi_mode_enable(const struct mc5 *mc5) in mc5_dbgi_mode_enable() argument
290 t3_write_reg(mc5->adapter, A_MC5_DB_CONFIG, in mc5_dbgi_mode_enable()
291 V_TMMODE(mc5->mode == MC5_MODE_72_BIT) | F_DBGIEN); in mc5_dbgi_mode_enable()
295 static void mc5_dbgi_mode_disable(const struct mc5 *mc5) in mc5_dbgi_mode_disable() argument
297 t3_write_reg(mc5->adapter, A_MC5_DB_CONFIG, in mc5_dbgi_mode_disable()
298 V_TMMODE(mc5->mode == MC5_MODE_72_BIT) | in mc5_dbgi_mode_disable()
299 V_COMPEN(mc5->mode == MC5_MODE_72_BIT) | in mc5_dbgi_mode_disable()
300 V_PRTYEN(mc5->parity_enabled) | F_MBUSEN); in mc5_dbgi_mode_disable()
307 int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters, in t3_mc5_init() argument
312 unsigned int tcam_size = mc5->tcam_size; in t3_mc5_init()
313 struct adapter *adap = mc5->adapter; in t3_mc5_init()
323 cfg |= V_TMMODE(mc5->mode == MC5_MODE_72_BIT) | F_TMRST; in t3_mc5_init()
336 mc5->parity_enabled = 1; in t3_mc5_init()
342 mc5_dbgi_mode_enable(mc5); in t3_mc5_init()
344 switch (mc5->part_type) { in t3_mc5_init()
346 err = init_idt52100(mc5); in t3_mc5_init()
349 err = init_idt43102(mc5); in t3_mc5_init()
352 CH_ERR(adap, "Unsupported TCAM type %d\n", mc5->part_type); in t3_mc5_init()
357 mc5_dbgi_mode_disable(mc5); in t3_mc5_init()
367 void t3_mc5_intr_handler(struct mc5 *mc5) in t3_mc5_intr_handler() argument
369 struct adapter *adap = mc5->adapter; in t3_mc5_intr_handler()
372 if ((cause & F_PARITYERR) && mc5->parity_enabled) { in t3_mc5_intr_handler()
374 mc5->stats.parity_err++; in t3_mc5_intr_handler()
379 mc5->stats.reqq_parity_err++; in t3_mc5_intr_handler()
384 mc5->stats.dispq_parity_err++; in t3_mc5_intr_handler()
388 mc5->stats.active_rgn_full++; in t3_mc5_intr_handler()
390 mc5->stats.nfa_srch_err++; in t3_mc5_intr_handler()
392 mc5->stats.unknown_cmd++; in t3_mc5_intr_handler()
394 mc5->stats.del_act_empty++; in t3_mc5_intr_handler()
401 void t3_mc5_prep(struct adapter *adapter, struct mc5 *mc5, int mode) in t3_mc5_prep() argument
413 mc5->adapter = adapter; in t3_mc5_prep()
414 mc5->mode = (unsigned char)mode; in t3_mc5_prep()
415 mc5->part_type = (unsigned char)G_TMTYPE(cfg); in t3_mc5_prep()
417 mc5->part_type |= 4; in t3_mc5_prep()
419 mc5->tcam_size = tcam_part_size[G_TMPARTSIZE(cfg)]; in t3_mc5_prep()
421 mc5->tcam_size /= 2; in t3_mc5_prep()