|
28 | 28 | #include <net/switchdev.h> |
29 | 29 |
|
30 | 30 | #include "ksz_common.h" |
| 31 | +#include "ksz_dcb.h" |
31 | 32 | #include "ksz_ptp.h" |
32 | 33 | #include "ksz8.h" |
33 | 34 | #include "ksz9477.h" |
@@ -2411,6 +2412,10 @@ static int ksz_setup(struct dsa_switch *ds) |
2411 | 2412 | goto out_ptp_clock_unregister; |
2412 | 2413 | } |
2413 | 2414 |
|
| 2415 | + ret = ksz_dcb_init(dev); |
| 2416 | + if (ret) |
| 2417 | + goto out_ptp_clock_unregister; |
| 2418 | + |
2414 | 2419 | /* start switch */ |
2415 | 2420 | regmap_update_bits(ksz_regmap_8(dev), regs[S_START_CTRL], |
2416 | 2421 | SW_START, SW_START); |
@@ -2739,7 +2744,7 @@ static int ksz_port_setup(struct dsa_switch *ds, int port) |
2739 | 2744 | * there is no need to do anything. |
2740 | 2745 | */ |
2741 | 2746 |
|
2742 | | - return 0; |
| 2747 | + return ksz_dcb_init_port(dev, port); |
2743 | 2748 | } |
2744 | 2749 |
|
2745 | 2750 | void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state) |
@@ -3982,6 +3987,11 @@ static const struct dsa_switch_ops ksz_switch_ops = { |
3982 | 3987 | .port_setup_tc = ksz_setup_tc, |
3983 | 3988 | .get_mac_eee = ksz_get_mac_eee, |
3984 | 3989 | .set_mac_eee = ksz_set_mac_eee, |
| 3990 | + .port_get_default_prio = ksz_port_get_default_prio, |
| 3991 | + .port_set_default_prio = ksz_port_set_default_prio, |
| 3992 | + .port_get_dscp_prio = ksz_port_get_dscp_prio, |
| 3993 | + .port_get_apptrust = ksz_port_get_apptrust, |
| 3994 | + .port_set_apptrust = ksz_port_set_apptrust, |
3985 | 3995 | }; |
3986 | 3996 |
|
3987 | 3997 | struct ksz_device *ksz_switch_alloc(struct device *base, void *priv) |
|
0 commit comments