Lines Matching refs:mc5

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