Lines Matching full:dat1
569 static int lan9303_alr_make_entry_raw(struct lan9303 *chip, u32 dat0, u32 dat1) in lan9303_alr_make_entry_raw() argument
572 lan9303_write_switch_reg(chip, LAN9303_SWE_ALR_WR_DAT_1, dat1); in lan9303_alr_make_entry_raw()
581 typedef int alr_loop_cb_t(struct lan9303 *chip, u32 dat0, u32 dat1,
594 u32 dat0, dat1; in lan9303_alr_loop() local
598 lan9303_read_switch_reg(chip, LAN9303_SWE_ALR_RD_DAT_1, &dat1); in lan9303_alr_loop()
599 if (dat1 & LAN9303_ALR_DAT1_END_OF_TABL) in lan9303_alr_loop()
602 alrport = (dat1 & LAN9303_ALR_DAT1_PORT_MASK) >> in lan9303_alr_loop()
606 ret = cb(chip, dat0, dat1, portmap, ctx); in lan9303_alr_loop()
619 static void alr_reg_to_mac(u32 dat0, u32 dat1, u8 mac[6]) in alr_reg_to_mac() argument
625 mac[4] = (dat1 >> 0) & 0xff; in alr_reg_to_mac()
626 mac[5] = (dat1 >> 8) & 0xff; in alr_reg_to_mac()
635 u32 dat1, int portmap, void *ctx) in alr_loop_cb_del_port_learned() argument
640 if (((BIT(port) & portmap) == 0) || (dat1 & LAN9303_ALR_DAT1_STATIC)) in alr_loop_cb_del_port_learned()
644 dat1 &= ~LAN9303_ALR_DAT1_VALID; /* delete entry */ in alr_loop_cb_del_port_learned()
645 lan9303_alr_make_entry_raw(chip, dat0, dat1); in alr_loop_cb_del_port_learned()
657 u32 dat1, int portmap, void *ctx) in alr_loop_cb_fdb_port_dump() argument
666 alr_reg_to_mac(dat0, dat1, mac); in alr_loop_cb_fdb_port_dump()
667 is_static = !!(dat1 & LAN9303_ALR_DAT1_STATIC); in alr_loop_cb_fdb_port_dump()
675 u32 dat0, dat1, alr_port; in lan9303_alr_set_entry() local
678 dat1 = LAN9303_ALR_DAT1_STATIC; in lan9303_alr_set_entry()
680 dat1 |= LAN9303_ALR_DAT1_VALID; in lan9303_alr_set_entry()
683 dat1 |= LAN9303_ALR_DAT1_AGE_OVERRID; in lan9303_alr_set_entry()
686 dat1 &= ~LAN9303_ALR_DAT1_PORT_MASK; in lan9303_alr_set_entry()
687 dat1 |= alr_port << LAN9303_ALR_DAT1_PORT_BITOFFS; in lan9303_alr_set_entry()
695 dat1 |= (mac[4] << 0); in lan9303_alr_set_entry()
696 dat1 |= (mac[5] << 8); in lan9303_alr_set_entry()
698 lan9303_alr_make_entry_raw(chip, dat0, dat1); in lan9303_alr_set_entry()