return 0;
}
+static u32 ksz88xx_get_phy_flags(struct dsa_switch *ds, int port)
+{
+ struct ksz_device *dev = ds->priv;
+
+ switch (dev->chip_id) {
+ case KSZ88X3_CHIP_ID:
+ /* Silicon Errata Sheet (DS80000830A):
+ * Port 1 does not work with LinkMD Cable-Testing.
+ * Port 1 does not respond to received PAUSE control frames.
+ */
+ if (!port)
+ return MICREL_KSZ8_P1_ERRATA;
+ break;
+ }
+
+ return 0;
+}
+
static int ksz8_switch_init(struct ksz_device *dev)
{
dev->cpu_port = fls(dev->info->cpu_ports) - 1;
const struct dsa_switch_ops ksz8463_switch_ops = {
.get_tag_protocol = ksz8463_get_tag_protocol,
.connect_tag_protocol = ksz8463_connect_tag_protocol,
- .get_phy_flags = ksz_get_phy_flags,
.setup = ksz8_setup,
.teardown = ksz_teardown,
.phy_read = ksz8463_phy_read16,
const struct dsa_switch_ops ksz87xx_switch_ops = {
.get_tag_protocol = ksz87xx_get_tag_protocol,
.connect_tag_protocol = ksz87xx_connect_tag_protocol,
- .get_phy_flags = ksz_get_phy_flags,
.setup = ksz8_setup,
.teardown = ksz_teardown,
.phy_read = ksz8_phy_read16,
const struct dsa_switch_ops ksz88xx_switch_ops = {
.get_tag_protocol = ksz88xx_get_tag_protocol,
.connect_tag_protocol = ksz88xx_connect_tag_protocol,
- .get_phy_flags = ksz_get_phy_flags,
+ .get_phy_flags = ksz88xx_get_phy_flags,
.setup = ksz8_setup,
.teardown = ksz_teardown,
.phy_read = ksz8_phy_read16,
const struct dsa_switch_ops ksz9477_switch_ops = {
.get_tag_protocol = ksz9477_get_tag_protocol,
.connect_tag_protocol = ksz9477_connect_tag_protocol,
- .get_phy_flags = ksz_get_phy_flags,
.setup = ksz9477_setup,
.teardown = ksz_teardown,
.phy_read = ksz9477_phy_read16,
}
}
-u32 ksz_get_phy_flags(struct dsa_switch *ds, int port)
-{
- struct ksz_device *dev = ds->priv;
-
- switch (dev->chip_id) {
- case KSZ88X3_CHIP_ID:
- /* Silicon Errata Sheet (DS80000830A):
- * Port 1 does not work with LinkMD Cable-Testing.
- * Port 1 does not respond to received PAUSE control frames.
- */
- if (!port)
- return MICREL_KSZ8_P1_ERRATA;
- break;
- }
-
- return 0;
-}
-
void ksz_phylink_mac_link_down(struct phylink_config *config,
unsigned int mode,
phy_interface_t interface)
void ksz_switch_shutdown(struct ksz_device *dev);
int ksz_handle_wake_reason(struct ksz_device *dev, int port);
-u32 ksz_get_phy_flags(struct dsa_switch *ds, int port);
-
int ksz_sset_count(struct dsa_switch *ds, int port, int sset);
void ksz_get_ethtool_stats(struct dsa_switch *ds, int port,
uint64_t *buf);
const struct dsa_switch_ops lan937x_switch_ops = {
.get_tag_protocol = lan937x_get_tag_protocol,
.connect_tag_protocol = lan937x_connect_tag_protocol,
- .get_phy_flags = ksz_get_phy_flags,
.setup = lan937x_setup,
.teardown = ksz_teardown,
.phy_read = lan937x_phy_read16,