Lines Matching refs:err
44 int i, err; in mv88e6185_g1_wait_ppu_disabled() local
47 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, &state); in mv88e6185_g1_wait_ppu_disabled()
48 if (err) in mv88e6185_g1_wait_ppu_disabled()
49 return err; in mv88e6185_g1_wait_ppu_disabled()
65 int i, err; in mv88e6185_g1_wait_ppu_polling() local
68 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, &state); in mv88e6185_g1_wait_ppu_polling()
69 if (err) in mv88e6185_g1_wait_ppu_polling()
70 return err; in mv88e6185_g1_wait_ppu_polling()
86 int i, err; in mv88e6352_g1_wait_ppu_polling() local
89 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, &state); in mv88e6352_g1_wait_ppu_polling()
90 if (err) in mv88e6352_g1_wait_ppu_polling()
91 return err; in mv88e6352_g1_wait_ppu_polling()
107 int err; in mv88e6xxx_g1_wait_init_ready() local
114 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, &val); in mv88e6xxx_g1_wait_init_ready()
115 if (err) in mv88e6xxx_g1_wait_init_ready()
116 return err; in mv88e6xxx_g1_wait_init_ready()
137 int err; in mv88e6xxx_g1_set_switch_mac() local
140 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_MAC_01, reg); in mv88e6xxx_g1_set_switch_mac()
141 if (err) in mv88e6xxx_g1_set_switch_mac()
142 return err; in mv88e6xxx_g1_set_switch_mac()
145 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_MAC_23, reg); in mv88e6xxx_g1_set_switch_mac()
146 if (err) in mv88e6xxx_g1_set_switch_mac()
147 return err; in mv88e6xxx_g1_set_switch_mac()
150 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_MAC_45, reg); in mv88e6xxx_g1_set_switch_mac()
151 if (err) in mv88e6xxx_g1_set_switch_mac()
152 return err; in mv88e6xxx_g1_set_switch_mac()
162 int err; in mv88e6185_g1_reset() local
167 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &val); in mv88e6185_g1_reset()
168 if (err) in mv88e6185_g1_reset()
169 return err; in mv88e6185_g1_reset()
174 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, val); in mv88e6185_g1_reset()
175 if (err) in mv88e6185_g1_reset()
176 return err; in mv88e6185_g1_reset()
178 err = mv88e6xxx_g1_wait_init_ready(chip); in mv88e6185_g1_reset()
179 if (err) in mv88e6185_g1_reset()
180 return err; in mv88e6185_g1_reset()
188 int err; in mv88e6352_g1_reset() local
191 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &val); in mv88e6352_g1_reset()
192 if (err) in mv88e6352_g1_reset()
193 return err; in mv88e6352_g1_reset()
197 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, val); in mv88e6352_g1_reset()
198 if (err) in mv88e6352_g1_reset()
199 return err; in mv88e6352_g1_reset()
201 err = mv88e6xxx_g1_wait_init_ready(chip); in mv88e6352_g1_reset()
202 if (err) in mv88e6352_g1_reset()
203 return err; in mv88e6352_g1_reset()
211 int err; in mv88e6185_g1_ppu_enable() local
213 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &val); in mv88e6185_g1_ppu_enable()
214 if (err) in mv88e6185_g1_ppu_enable()
215 return err; in mv88e6185_g1_ppu_enable()
219 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, val); in mv88e6185_g1_ppu_enable()
220 if (err) in mv88e6185_g1_ppu_enable()
221 return err; in mv88e6185_g1_ppu_enable()
229 int err; in mv88e6185_g1_ppu_disable() local
231 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &val); in mv88e6185_g1_ppu_disable()
232 if (err) in mv88e6185_g1_ppu_disable()
233 return err; in mv88e6185_g1_ppu_disable()
237 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, val); in mv88e6185_g1_ppu_disable()
238 if (err) in mv88e6185_g1_ppu_disable()
239 return err; in mv88e6185_g1_ppu_disable()
256 int err; in mv88e6085_g1_ip_pri_map() local
259 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_0, 0x0000); in mv88e6085_g1_ip_pri_map()
260 if (err) in mv88e6085_g1_ip_pri_map()
261 return err; in mv88e6085_g1_ip_pri_map()
263 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_1, 0x0000); in mv88e6085_g1_ip_pri_map()
264 if (err) in mv88e6085_g1_ip_pri_map()
265 return err; in mv88e6085_g1_ip_pri_map()
267 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_2, 0x5555); in mv88e6085_g1_ip_pri_map()
268 if (err) in mv88e6085_g1_ip_pri_map()
269 return err; in mv88e6085_g1_ip_pri_map()
271 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_3, 0x5555); in mv88e6085_g1_ip_pri_map()
272 if (err) in mv88e6085_g1_ip_pri_map()
273 return err; in mv88e6085_g1_ip_pri_map()
275 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_4, 0xaaaa); in mv88e6085_g1_ip_pri_map()
276 if (err) in mv88e6085_g1_ip_pri_map()
277 return err; in mv88e6085_g1_ip_pri_map()
279 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_5, 0xaaaa); in mv88e6085_g1_ip_pri_map()
280 if (err) in mv88e6085_g1_ip_pri_map()
281 return err; in mv88e6085_g1_ip_pri_map()
283 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_6, 0xffff); in mv88e6085_g1_ip_pri_map()
284 if (err) in mv88e6085_g1_ip_pri_map()
285 return err; in mv88e6085_g1_ip_pri_map()
287 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_IP_PRI_7, 0xffff); in mv88e6085_g1_ip_pri_map()
288 if (err) in mv88e6085_g1_ip_pri_map()
289 return err; in mv88e6085_g1_ip_pri_map()
308 int err; in mv88e6095_g1_set_egress_port() local
310 err = mv88e6xxx_g1_read(chip, MV88E6185_G1_MONITOR_CTL, ®); in mv88e6095_g1_set_egress_port()
311 if (err) in mv88e6095_g1_set_egress_port()
312 return err; in mv88e6095_g1_set_egress_port()
330 int err; in mv88e6095_g1_set_cpu_port() local
332 err = mv88e6xxx_g1_read(chip, MV88E6185_G1_MONITOR_CTL, ®); in mv88e6095_g1_set_cpu_port()
333 if (err) in mv88e6095_g1_set_cpu_port()
334 return err; in mv88e6095_g1_set_cpu_port()
355 int err; in mv88e6390_g1_set_egress_port() local
358 err = mv88e6390_g1_monitor_write(chip, ptr, port); in mv88e6390_g1_set_egress_port()
359 if (err) in mv88e6390_g1_set_egress_port()
360 return err; in mv88e6390_g1_set_egress_port()
363 err = mv88e6390_g1_monitor_write(chip, ptr, port); in mv88e6390_g1_set_egress_port()
364 if (err) in mv88e6390_g1_set_egress_port()
365 return err; in mv88e6390_g1_set_egress_port()
380 int err; in mv88e6390_g1_mgmt_rsvd2cpu() local
384 err = mv88e6390_g1_monitor_write(chip, ptr, 0xff); in mv88e6390_g1_mgmt_rsvd2cpu()
385 if (err) in mv88e6390_g1_mgmt_rsvd2cpu()
386 return err; in mv88e6390_g1_mgmt_rsvd2cpu()
390 err = mv88e6390_g1_monitor_write(chip, ptr, 0xff); in mv88e6390_g1_mgmt_rsvd2cpu()
391 if (err) in mv88e6390_g1_mgmt_rsvd2cpu()
392 return err; in mv88e6390_g1_mgmt_rsvd2cpu()
396 err = mv88e6390_g1_monitor_write(chip, ptr, 0xff); in mv88e6390_g1_mgmt_rsvd2cpu()
397 if (err) in mv88e6390_g1_mgmt_rsvd2cpu()
398 return err; in mv88e6390_g1_mgmt_rsvd2cpu()
402 err = mv88e6390_g1_monitor_write(chip, ptr, 0xff); in mv88e6390_g1_mgmt_rsvd2cpu()
403 if (err) in mv88e6390_g1_mgmt_rsvd2cpu()
404 return err; in mv88e6390_g1_mgmt_rsvd2cpu()
415 int err; in mv88e6xxx_g1_ctl2_mask() local
417 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL2, ®); in mv88e6xxx_g1_ctl2_mask()
418 if (err) in mv88e6xxx_g1_ctl2_mask()
419 return err; in mv88e6xxx_g1_ctl2_mask()
477 int err; in mv88e6095_g1_stats_set_histogram() local
479 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STATS_OP, &val); in mv88e6095_g1_stats_set_histogram()
480 if (err) in mv88e6095_g1_stats_set_histogram()
481 return err; in mv88e6095_g1_stats_set_histogram()
485 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_STATS_OP, val); in mv88e6095_g1_stats_set_histogram()
487 return err; in mv88e6095_g1_stats_set_histogram()
492 int err; in mv88e6xxx_g1_stats_snapshot() local
495 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_STATS_OP, in mv88e6xxx_g1_stats_snapshot()
499 if (err) in mv88e6xxx_g1_stats_snapshot()
500 return err; in mv88e6xxx_g1_stats_snapshot()
515 int err; in mv88e6390_g1_stats_snapshot() local
520 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_STATS_OP, in mv88e6390_g1_stats_snapshot()
523 if (err) in mv88e6390_g1_stats_snapshot()
524 return err; in mv88e6390_g1_stats_snapshot()
534 int err; in mv88e6xxx_g1_stats_read() local
538 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_STATS_OP, in mv88e6xxx_g1_stats_read()
541 if (err) in mv88e6xxx_g1_stats_read()
544 err = mv88e6xxx_g1_stats_wait(chip); in mv88e6xxx_g1_stats_read()
545 if (err) in mv88e6xxx_g1_stats_read()
548 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STATS_COUNTER_32, ®); in mv88e6xxx_g1_stats_read()
549 if (err) in mv88e6xxx_g1_stats_read()
554 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STATS_COUNTER_01, ®); in mv88e6xxx_g1_stats_read()
555 if (err) in mv88e6xxx_g1_stats_read()
563 int err; in mv88e6xxx_g1_stats_clear() local
566 err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STATS_OP, &val); in mv88e6xxx_g1_stats_clear()
567 if (err) in mv88e6xxx_g1_stats_clear()
568 return err; in mv88e6xxx_g1_stats_clear()
572 err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_STATS_OP, val); in mv88e6xxx_g1_stats_clear()
573 if (err) in mv88e6xxx_g1_stats_clear()
574 return err; in mv88e6xxx_g1_stats_clear()