Lines Matching full:entry
20 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_fid_read() argument
29 entry->fid = val & MV88E6352_G1_VTU_FID_MASK; in mv88e6xxx_g1_vtu_fid_read()
35 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_fid_write() argument
37 u16 val = entry->fid & MV88E6352_G1_VTU_FID_MASK; in mv88e6xxx_g1_vtu_fid_write()
45 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_sid_read() argument
54 entry->sid = val & MV88E6352_G1_VTU_SID_MASK; in mv88e6xxx_g1_vtu_sid_read()
60 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_sid_write() argument
62 u16 val = entry->sid & MV88E6352_G1_VTU_SID_MASK; in mv88e6xxx_g1_vtu_sid_write()
91 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_vid_read() argument
100 entry->vid = val & 0xfff; in mv88e6xxx_g1_vtu_vid_read()
103 entry->vid |= 0x1000; in mv88e6xxx_g1_vtu_vid_read()
105 entry->valid = !!(val & MV88E6XXX_G1_VTU_VID_VALID); in mv88e6xxx_g1_vtu_vid_read()
111 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_vid_write() argument
113 u16 val = entry->vid & 0xfff; in mv88e6xxx_g1_vtu_vid_write()
115 if (entry->vid & 0x1000) in mv88e6xxx_g1_vtu_vid_write()
118 if (entry->valid) in mv88e6xxx_g1_vtu_vid_write()
147 struct mv88e6xxx_vtu_entry *entry) in mv88e6185_g1_vtu_data_read() argument
161 entry->member[i] = (regs[i / 4] >> member_offset) & 0x3; in mv88e6185_g1_vtu_data_read()
168 struct mv88e6xxx_vtu_entry *entry) in mv88e6185_g1_stu_data_read() argument
182 entry->state[i] = (regs[i / 4] >> state_offset) & 0x3; in mv88e6185_g1_stu_data_read()
189 struct mv88e6xxx_vtu_entry *entry) in mv88e6185_g1_vtu_data_write() argument
199 regs[i / 4] |= (entry->member[i] & 0x3) << member_offset; in mv88e6185_g1_vtu_data_write()
200 regs[i / 4] |= (entry->state[i] & 0x3) << state_offset; in mv88e6185_g1_vtu_data_write()
269 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_stu_getnext() argument
273 err = mv88e6xxx_g1_vtu_sid_write(chip, entry); in mv88e6xxx_g1_vtu_stu_getnext()
281 err = mv88e6xxx_g1_vtu_sid_read(chip, entry); in mv88e6xxx_g1_vtu_stu_getnext()
285 return mv88e6xxx_g1_vtu_vid_read(chip, entry); in mv88e6xxx_g1_vtu_stu_getnext()
311 struct mv88e6xxx_vtu_entry *entry) in mv88e6xxx_g1_vtu_getnext() argument
324 * write the VID only once, when the entry is given as invalid. in mv88e6xxx_g1_vtu_getnext()
326 if (!entry->valid) { in mv88e6xxx_g1_vtu_getnext()
327 err = mv88e6xxx_g1_vtu_vid_write(chip, entry); in mv88e6xxx_g1_vtu_getnext()
336 return mv88e6xxx_g1_vtu_vid_read(chip, entry); in mv88e6xxx_g1_vtu_getnext()
340 struct mv88e6xxx_vtu_entry *entry) in mv88e6250_g1_vtu_getnext() argument
345 err = mv88e6xxx_g1_vtu_getnext(chip, entry); in mv88e6250_g1_vtu_getnext()
349 if (entry->valid) { in mv88e6250_g1_vtu_getnext()
350 err = mv88e6185_g1_vtu_data_read(chip, entry); in mv88e6250_g1_vtu_getnext()
354 err = mv88e6185_g1_stu_data_read(chip, entry); in mv88e6250_g1_vtu_getnext()
365 entry->fid = val & 0x000f; in mv88e6250_g1_vtu_getnext()
366 entry->fid |= (val & 0x0300) >> 4; in mv88e6250_g1_vtu_getnext()
373 struct mv88e6xxx_vtu_entry *entry) in mv88e6185_g1_vtu_getnext() argument
378 err = mv88e6xxx_g1_vtu_getnext(chip, entry); in mv88e6185_g1_vtu_getnext()
382 if (entry->valid) { in mv88e6185_g1_vtu_getnext()
383 err = mv88e6185_g1_vtu_data_read(chip, entry); in mv88e6185_g1_vtu_getnext()
387 err = mv88e6185_g1_stu_data_read(chip, entry); in mv88e6185_g1_vtu_getnext()
398 entry->fid = val & 0x000f; in mv88e6185_g1_vtu_getnext()
399 entry->fid |= (val & 0x0f00) >> 4; in mv88e6185_g1_vtu_getnext()
406 struct mv88e6xxx_vtu_entry *entry) in mv88e6352_g1_vtu_getnext() argument
411 err = mv88e6xxx_g1_vtu_getnext(chip, entry); in mv88e6352_g1_vtu_getnext()
415 if (entry->valid) { in mv88e6352_g1_vtu_getnext()
416 err = mv88e6185_g1_vtu_data_read(chip, entry); in mv88e6352_g1_vtu_getnext()
420 err = mv88e6xxx_g1_vtu_fid_read(chip, entry); in mv88e6352_g1_vtu_getnext()
425 err = mv88e6xxx_g1_vtu_stu_get(chip, entry); in mv88e6352_g1_vtu_getnext()
429 err = mv88e6185_g1_stu_data_read(chip, entry); in mv88e6352_g1_vtu_getnext()
438 struct mv88e6xxx_vtu_entry *entry) in mv88e6390_g1_vtu_getnext() argument
443 err = mv88e6xxx_g1_vtu_getnext(chip, entry); in mv88e6390_g1_vtu_getnext()
447 if (entry->valid) { in mv88e6390_g1_vtu_getnext()
448 err = mv88e6390_g1_vtu_data_read(chip, entry->member); in mv88e6390_g1_vtu_getnext()
453 err = mv88e6xxx_g1_vtu_stu_get(chip, entry); in mv88e6390_g1_vtu_getnext()
457 err = mv88e6390_g1_vtu_data_read(chip, entry->state); in mv88e6390_g1_vtu_getnext()
461 err = mv88e6xxx_g1_vtu_fid_read(chip, entry); in mv88e6390_g1_vtu_getnext()
470 struct mv88e6xxx_vtu_entry *entry) in mv88e6250_g1_vtu_loadpurge() argument
479 err = mv88e6xxx_g1_vtu_vid_write(chip, entry); in mv88e6250_g1_vtu_loadpurge()
483 if (entry->valid) { in mv88e6250_g1_vtu_loadpurge()
484 err = mv88e6185_g1_vtu_data_write(chip, entry); in mv88e6250_g1_vtu_loadpurge()
491 op |= entry->fid & 0x000f; in mv88e6250_g1_vtu_loadpurge()
492 op |= (entry->fid & 0x0030) << 4; in mv88e6250_g1_vtu_loadpurge()
499 struct mv88e6xxx_vtu_entry *entry) in mv88e6185_g1_vtu_loadpurge() argument
508 err = mv88e6xxx_g1_vtu_vid_write(chip, entry); in mv88e6185_g1_vtu_loadpurge()
512 if (entry->valid) { in mv88e6185_g1_vtu_loadpurge()
513 err = mv88e6185_g1_vtu_data_write(chip, entry); in mv88e6185_g1_vtu_loadpurge()
520 op |= entry->fid & 0x000f; in mv88e6185_g1_vtu_loadpurge()
521 op |= (entry->fid & 0x00f0) << 4; in mv88e6185_g1_vtu_loadpurge()
528 struct mv88e6xxx_vtu_entry *entry) in mv88e6352_g1_vtu_loadpurge() argument
536 err = mv88e6xxx_g1_vtu_vid_write(chip, entry); in mv88e6352_g1_vtu_loadpurge()
540 if (entry->valid) { in mv88e6352_g1_vtu_loadpurge()
542 err = mv88e6185_g1_vtu_data_write(chip, entry); in mv88e6352_g1_vtu_loadpurge()
546 err = mv88e6xxx_g1_vtu_sid_write(chip, entry); in mv88e6352_g1_vtu_loadpurge()
550 /* Load STU entry */ in mv88e6352_g1_vtu_loadpurge()
556 err = mv88e6xxx_g1_vtu_fid_write(chip, entry); in mv88e6352_g1_vtu_loadpurge()
561 /* Load/Purge VTU entry */ in mv88e6352_g1_vtu_loadpurge()
566 struct mv88e6xxx_vtu_entry *entry) in mv88e6390_g1_vtu_loadpurge() argument
574 err = mv88e6xxx_g1_vtu_vid_write(chip, entry); in mv88e6390_g1_vtu_loadpurge()
578 if (entry->valid) { in mv88e6390_g1_vtu_loadpurge()
580 err = mv88e6390_g1_vtu_data_write(chip, entry->state); in mv88e6390_g1_vtu_loadpurge()
584 err = mv88e6xxx_g1_vtu_sid_write(chip, entry); in mv88e6390_g1_vtu_loadpurge()
588 /* Load STU entry */ in mv88e6390_g1_vtu_loadpurge()
595 err = mv88e6390_g1_vtu_data_write(chip, entry->member); in mv88e6390_g1_vtu_loadpurge()
599 err = mv88e6xxx_g1_vtu_fid_write(chip, entry); in mv88e6390_g1_vtu_loadpurge()
604 /* Load/Purge VTU entry */ in mv88e6390_g1_vtu_loadpurge()
622 struct mv88e6xxx_vtu_entry entry; in mv88e6xxx_g1_vtu_prob_irq_thread_fn() local
637 err = mv88e6xxx_g1_vtu_vid_read(chip, &entry); in mv88e6xxx_g1_vtu_prob_irq_thread_fn()
645 entry.vid, spid); in mv88e6xxx_g1_vtu_prob_irq_thread_fn()
651 entry.vid, spid); in mv88e6xxx_g1_vtu_prob_irq_thread_fn()