Lines Matching refs:port

594 	/* Replicated per number of ports (7), register size 4 per port */
967 int port;
1022 for (port = 0; port < felix->info->num_ports; port++) {
1023 struct ocelot_port *ocelot_port = ocelot->ports[port];
1026 if (dsa_is_unused_port(felix->ds, port))
1032 phylink_pcs = lynx_pcs_create_mdiodev(felix->imdio, port);
1036 felix->pcs[port] = phylink_pcs;
1038 dev_info(dev, "Found PCS at internal MDIO address %d\n", port);
1047 int port;
1049 for (port = 0; port < ocelot->num_phys_ports; port++) {
1050 struct phylink_pcs *phylink_pcs = felix->pcs[port];
1063 * available for one packet to be transmitted, otherwise the port tc will hang.
1144 static void vsc9959_port_qmaxsdu_set(struct ocelot *ocelot, int port, int tc,
1150 port);
1154 port);
1158 port);
1162 port);
1166 port);
1170 port);
1174 port);
1178 port);
1183 static u32 vsc9959_port_qmaxsdu_get(struct ocelot *ocelot, int port, int tc)
1186 case 0: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_0, port);
1187 case 1: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_1, port);
1188 case 2: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_2, port);
1189 case 3: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_3, port);
1190 case 4: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_4, port);
1191 case 5: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_5, port);
1192 case 6: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_6, port);
1193 case 7: return ocelot_read_rix(ocelot, QSYS_QMAXSDU_CFG_7, port);
1211 * dropping, such that these won't hang the port, as they will never be sent.
1213 static void vsc9959_tas_guard_bands_update(struct ocelot *ocelot, int port)
1215 struct ocelot_port *ocelot_port = ocelot->ports[port];
1216 struct ocelot_mm_state *mm = &ocelot->mm[port];
1230 val = ocelot_read_rix(ocelot, QSYS_TAG_CONFIG, port);
1262 /* Preemptible TCs don't need to pass a full MTU, the port will
1265 val = ocelot_read_rix(ocelot, QSYS_PREEMPTION_CFG, port);
1271 "port %d: max frame size %d needs %llu ps, %llu ps for mPackets at speed %d\n",
1272 port, maxlen, needed_bit_time_ps, needed_min_frag_time_ps,
1293 "port %d tc %d min gate len %llu"
1295 port, tc, min_gate_len[tc]);
1327 "port %d tc %d min gate length %llu"
1331 port, tc, min_gate_len[tc], maxlen, speed,
1335 vsc9959_port_qmaxsdu_set(ocelot, port, tc, max_sdu);
1338 ocelot_write_rix(ocelot, maxlen, QSYS_PORT_MAX_SDU, port);
1343 static void vsc9959_sched_speed_set(struct ocelot *ocelot, int port,
1346 struct ocelot_port *ocelot_port = ocelot->ports[port];
1372 QSYS_TAG_CONFIG, port);
1375 vsc9959_tas_guard_bands_update(ocelot, port);
1417 static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port,
1420 struct ocelot_port *ocelot_port = ocelot->ports[port];
1428 ocelot_port_mqprio(ocelot, port, &taprio->mqprio);
1430 QSYS_TAG_CONFIG, port);
1435 vsc9959_tas_guard_bands_update(ocelot, port);
1444 ret = ocelot_port_mqprio(ocelot, port, &taprio->mqprio);
1466 * operate on the port number.
1468 ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port) |
1490 QSYS_TAG_CONFIG, port);
1518 vsc9959_tas_guard_bands_update(ocelot, port);
1526 ocelot_port_mqprio(ocelot, port, &taprio->mqprio);
1538 int port;
1543 for (port = 0; port < ocelot->num_phys_ports; port++) {
1544 ocelot_port = ocelot->ports[port];
1550 QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port),
1556 QSYS_TAG_CONFIG, port);
1577 QSYS_TAG_CONFIG, port);
1582 static int vsc9959_qos_port_cbs_set(struct dsa_switch *ds, int port,
1586 int port_ix = port * 8 + cbs_qopt->queue;
1650 static int vsc9959_qos_port_mqprio(struct ocelot *ocelot, int port,
1656 ret = ocelot_port_mqprio(ocelot, port, mqprio);
1662 static int vsc9959_port_setup_tc(struct dsa_switch *ds, int port,
1672 return vsc9959_qos_port_tas_set(ocelot, port, type_data);
1674 return vsc9959_qos_port_mqprio(ocelot, port, type_data);
1676 return vsc9959_qos_port_cbs_set(ds, port, type_data);
1694 int port;
2230 static int vsc9959_psfp_filter_add(struct ocelot *ocelot, int port,
2302 stream.ports = BIT(port);
2303 stream.port = port;
2313 if (stream_entry->ports & BIT(port)) {
2315 "The stream is added on this port");
2320 if (stream_entry->ports != BIT(stream_entry->port)) {
2327 stream_entry->ports |= BIT(port);
2339 if (stream_entry->port > port) {
2419 stream_entry->ports = BIT(stream_entry->port);
2519 /* When using cut-through forwarding and the egress port runs at a higher data
2520 * rate than the ingress port, the packet currently under transmission would
2532 int tc, port, other_port;
2536 for (port = 0; port < ocelot->num_phys_ports; port++) {
2537 struct ocelot_port *ocelot_port = ocelot->ports[port];
2538 struct ocelot_mm_state *mm = &ocelot->mm[port];
2547 if (dsa_is_cpu_port(ds, port)) {
2548 /* Ocelot switches forward from the NPI port towards
2549 * any port, regardless of it being in the NPI port's
2554 mask = ocelot_get_bridge_fwd_mask(ocelot, port);
2555 mask &= ~BIT(port);
2560 port);
2564 * up, of this source port's forwarding domain.
2580 * traffic classes, since these would hang the port for some
2587 if (vsc9959_port_qmaxsdu_get(ocelot, port, tc))
2592 tmp = ocelot_read_rix(ocelot, ANA_CUT_THRU_CFG, port);
2597 "port %d fwd mask 0x%lx speed %d min_speed %d, %s cut-through forwarding on TC mask 0x%x\n",
2598 port, mask, ocelot_port->speed, min_speed,
2601 ocelot_write_rix(ocelot, val, ANA_CUT_THRU_CFG, port);
2648 * notification and MAC Merge status change on each port.