Commit 6ec1dfb5 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'net-dsa-microchip-make-ksz8795-driver-more-versatile'

Michael Grzeschik says:

====================
net: dsa: microchip: make ksz8795 driver more versatile

This series changes the ksz8795 driver to use more dynamic variables
instead of static defines. The purpose is to prepare the driver to
be used with other microchip switches with a similar layout.
====================

Link: https://lore.kernel.org/r/20201201204506.13473-1-m.grzeschik@pengutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 9693e08f 02ffbb02
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
static const struct { static const struct {
char string[ETH_GSTRING_LEN]; char string[ETH_GSTRING_LEN];
} mib_names[TOTAL_SWITCH_COUNTER_NUM] = { } mib_names[] = {
{ "rx_hi" }, { "rx_hi" },
{ "rx_undersize" }, { "rx_undersize" },
{ "rx_fragments" }, { "rx_fragments" },
...@@ -125,7 +125,7 @@ static void ksz8795_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, ...@@ -125,7 +125,7 @@ static void ksz8795_r_mib_cnt(struct ksz_device *dev, int port, u16 addr,
u8 check; u8 check;
int loop; int loop;
ctrl_addr = addr + SWITCH_COUNTER_NUM * port; ctrl_addr = addr + dev->reg_mib_cnt * port;
ctrl_addr |= IND_ACC_TABLE(TABLE_MIB | TABLE_READ); ctrl_addr |= IND_ACC_TABLE(TABLE_MIB | TABLE_READ);
mutex_lock(&dev->alu_mutex); mutex_lock(&dev->alu_mutex);
...@@ -156,7 +156,7 @@ static void ksz8795_r_mib_pkt(struct ksz_device *dev, int port, u16 addr, ...@@ -156,7 +156,7 @@ static void ksz8795_r_mib_pkt(struct ksz_device *dev, int port, u16 addr,
u8 check; u8 check;
int loop; int loop;
addr -= SWITCH_COUNTER_NUM; addr -= dev->reg_mib_cnt;
ctrl_addr = (KS_MIB_TOTAL_RX_1 - KS_MIB_TOTAL_RX_0) * port; ctrl_addr = (KS_MIB_TOTAL_RX_1 - KS_MIB_TOTAL_RX_0) * port;
ctrl_addr += addr + KS_MIB_TOTAL_RX_0; ctrl_addr += addr + KS_MIB_TOTAL_RX_0;
ctrl_addr |= IND_ACC_TABLE(TABLE_MIB | TABLE_READ); ctrl_addr |= IND_ACC_TABLE(TABLE_MIB | TABLE_READ);
...@@ -418,8 +418,8 @@ static void ksz8795_r_vlan_entries(struct ksz_device *dev, u16 addr) ...@@ -418,8 +418,8 @@ static void ksz8795_r_vlan_entries(struct ksz_device *dev, u16 addr)
int i; int i;
ksz8795_r_table(dev, TABLE_VLAN, addr, &data); ksz8795_r_table(dev, TABLE_VLAN, addr, &data);
addr *= 4; addr *= dev->phy_port_cnt;
for (i = 0; i < 4; i++) { for (i = 0; i < dev->phy_port_cnt; i++) {
dev->vlan_cache[addr + i].table[0] = (u16)data; dev->vlan_cache[addr + i].table[0] = (u16)data;
data >>= VLAN_TABLE_S; data >>= VLAN_TABLE_S;
} }
...@@ -433,7 +433,7 @@ static void ksz8795_r_vlan_table(struct ksz_device *dev, u16 vid, u16 *vlan) ...@@ -433,7 +433,7 @@ static void ksz8795_r_vlan_table(struct ksz_device *dev, u16 vid, u16 *vlan)
u64 buf; u64 buf;
data = (u16 *)&buf; data = (u16 *)&buf;
addr = vid / 4; addr = vid / dev->phy_port_cnt;
index = vid & 3; index = vid & 3;
ksz8795_r_table(dev, TABLE_VLAN, addr, &buf); ksz8795_r_table(dev, TABLE_VLAN, addr, &buf);
*vlan = data[index]; *vlan = data[index];
...@@ -447,7 +447,7 @@ static void ksz8795_w_vlan_table(struct ksz_device *dev, u16 vid, u16 vlan) ...@@ -447,7 +447,7 @@ static void ksz8795_w_vlan_table(struct ksz_device *dev, u16 vid, u16 vlan)
u64 buf; u64 buf;
data = (u16 *)&buf; data = (u16 *)&buf;
addr = vid / 4; addr = vid / dev->phy_port_cnt;
index = vid & 3; index = vid & 3;
ksz8795_r_table(dev, TABLE_VLAN, addr, &buf); ksz8795_r_table(dev, TABLE_VLAN, addr, &buf);
data[index] = vlan; data[index] = vlan;
...@@ -654,9 +654,10 @@ static enum dsa_tag_protocol ksz8795_get_tag_protocol(struct dsa_switch *ds, ...@@ -654,9 +654,10 @@ static enum dsa_tag_protocol ksz8795_get_tag_protocol(struct dsa_switch *ds,
static void ksz8795_get_strings(struct dsa_switch *ds, int port, static void ksz8795_get_strings(struct dsa_switch *ds, int port,
u32 stringset, uint8_t *buf) u32 stringset, uint8_t *buf)
{ {
struct ksz_device *dev = ds->priv;
int i; int i;
for (i = 0; i < TOTAL_SWITCH_COUNTER_NUM; i++) { for (i = 0; i < dev->mib_cnt; i++) {
memcpy(buf + i * ETH_GSTRING_LEN, mib_names[i].string, memcpy(buf + i * ETH_GSTRING_LEN, mib_names[i].string,
ETH_GSTRING_LEN); ETH_GSTRING_LEN);
} }
...@@ -691,12 +692,12 @@ static void ksz8795_port_stp_state_set(struct dsa_switch *ds, int port, ...@@ -691,12 +692,12 @@ static void ksz8795_port_stp_state_set(struct dsa_switch *ds, int port,
switch (state) { switch (state) {
case BR_STATE_DISABLED: case BR_STATE_DISABLED:
data |= PORT_LEARN_DISABLE; data |= PORT_LEARN_DISABLE;
if (port < SWITCH_PORT_NUM) if (port < dev->phy_port_cnt)
member = 0; member = 0;
break; break;
case BR_STATE_LISTENING: case BR_STATE_LISTENING:
data |= (PORT_RX_ENABLE | PORT_LEARN_DISABLE); data |= (PORT_RX_ENABLE | PORT_LEARN_DISABLE);
if (port < SWITCH_PORT_NUM && if (port < dev->phy_port_cnt &&
p->stp_state == BR_STATE_DISABLED) p->stp_state == BR_STATE_DISABLED)
member = dev->host_mask | p->vid_member; member = dev->host_mask | p->vid_member;
break; break;
...@@ -720,7 +721,7 @@ static void ksz8795_port_stp_state_set(struct dsa_switch *ds, int port, ...@@ -720,7 +721,7 @@ static void ksz8795_port_stp_state_set(struct dsa_switch *ds, int port,
break; break;
case BR_STATE_BLOCKING: case BR_STATE_BLOCKING:
data |= PORT_LEARN_DISABLE; data |= PORT_LEARN_DISABLE;
if (port < SWITCH_PORT_NUM && if (port < dev->phy_port_cnt &&
p->stp_state == BR_STATE_DISABLED) p->stp_state == BR_STATE_DISABLED)
member = dev->host_mask | p->vid_member; member = dev->host_mask | p->vid_member;
break; break;
...@@ -750,17 +751,17 @@ static void ksz8795_port_stp_state_set(struct dsa_switch *ds, int port, ...@@ -750,17 +751,17 @@ static void ksz8795_port_stp_state_set(struct dsa_switch *ds, int port,
static void ksz8795_flush_dyn_mac_table(struct ksz_device *dev, int port) static void ksz8795_flush_dyn_mac_table(struct ksz_device *dev, int port)
{ {
u8 learn[TOTAL_PORT_NUM]; u8 learn[DSA_MAX_PORTS];
int first, index, cnt; int first, index, cnt;
struct ksz_port *p; struct ksz_port *p;
if ((uint)port < TOTAL_PORT_NUM) { if ((uint)port < dev->port_cnt) {
first = port; first = port;
cnt = port + 1; cnt = port + 1;
} else { } else {
/* Flush all ports. */ /* Flush all ports. */
first = 0; first = 0;
cnt = dev->mib_port_cnt; cnt = dev->port_cnt;
} }
for (index = first; index < cnt; index++) { for (index = first; index < cnt; index++) {
p = &dev->ports[index]; p = &dev->ports[index];
...@@ -992,8 +993,6 @@ static void ksz8795_config_cpu_port(struct dsa_switch *ds) ...@@ -992,8 +993,6 @@ static void ksz8795_config_cpu_port(struct dsa_switch *ds)
u8 remote; u8 remote;
int i; int i;
ds->num_ports = dev->port_cnt + 1;
/* Switch marks the maximum frame with extra byte as oversize. */ /* Switch marks the maximum frame with extra byte as oversize. */
ksz_cfg(dev, REG_SW_CTRL_2, SW_LEGAL_PACKET_DISABLE, true); ksz_cfg(dev, REG_SW_CTRL_2, SW_LEGAL_PACKET_DISABLE, true);
ksz_cfg(dev, S_TAIL_TAG_CTRL, SW_TAIL_TAG_ENABLE, true); ksz_cfg(dev, S_TAIL_TAG_CTRL, SW_TAIL_TAG_ENABLE, true);
...@@ -1005,7 +1004,7 @@ static void ksz8795_config_cpu_port(struct dsa_switch *ds) ...@@ -1005,7 +1004,7 @@ static void ksz8795_config_cpu_port(struct dsa_switch *ds)
ksz8795_port_setup(dev, dev->cpu_port, true); ksz8795_port_setup(dev, dev->cpu_port, true);
dev->member = dev->host_mask; dev->member = dev->host_mask;
for (i = 0; i < SWITCH_PORT_NUM; i++) { for (i = 0; i < dev->phy_port_cnt; i++) {
p = &dev->ports[i]; p = &dev->ports[i];
/* Initialize to non-zero so that ksz_cfg_port_member() will /* Initialize to non-zero so that ksz_cfg_port_member() will
...@@ -1016,7 +1015,7 @@ static void ksz8795_config_cpu_port(struct dsa_switch *ds) ...@@ -1016,7 +1015,7 @@ static void ksz8795_config_cpu_port(struct dsa_switch *ds)
ksz8795_port_stp_state_set(ds, i, BR_STATE_DISABLED); ksz8795_port_stp_state_set(ds, i, BR_STATE_DISABLED);
/* Last port may be disabled. */ /* Last port may be disabled. */
if (i == dev->port_cnt) if (i == dev->phy_port_cnt)
break; break;
p->on = 1; p->on = 1;
p->phy = 1; p->phy = 1;
...@@ -1085,7 +1084,7 @@ static int ksz8795_setup(struct dsa_switch *ds) ...@@ -1085,7 +1084,7 @@ static int ksz8795_setup(struct dsa_switch *ds)
(BROADCAST_STORM_VALUE * (BROADCAST_STORM_VALUE *
BROADCAST_STORM_PROT_RATE) / 100); BROADCAST_STORM_PROT_RATE) / 100);
for (i = 0; i < VLAN_TABLE_ENTRIES; i++) for (i = 0; i < (dev->num_vlans / 4); i++)
ksz8795_r_vlan_entries(dev, i); ksz8795_r_vlan_entries(dev, i);
/* Setup STP address for STP operation. */ /* Setup STP address for STP operation. */
...@@ -1150,10 +1149,6 @@ static int ksz8795_switch_detect(struct ksz_device *dev) ...@@ -1150,10 +1149,6 @@ static int ksz8795_switch_detect(struct ksz_device *dev)
(id2 != CHIP_ID_94 && id2 != CHIP_ID_95)) (id2 != CHIP_ID_94 && id2 != CHIP_ID_95))
return -ENODEV; return -ENODEV;
dev->mib_port_cnt = TOTAL_PORT_NUM;
dev->phy_port_cnt = SWITCH_PORT_NUM;
dev->port_cnt = SWITCH_PORT_NUM;
if (id2 == CHIP_ID_95) { if (id2 == CHIP_ID_95) {
u8 val; u8 val;
...@@ -1162,17 +1157,12 @@ static int ksz8795_switch_detect(struct ksz_device *dev) ...@@ -1162,17 +1157,12 @@ static int ksz8795_switch_detect(struct ksz_device *dev)
if (val & PORT_FIBER_MODE) if (val & PORT_FIBER_MODE)
id2 = 0x65; id2 = 0x65;
} else if (id2 == CHIP_ID_94) { } else if (id2 == CHIP_ID_94) {
dev->port_cnt--;
dev->last_port = dev->port_cnt;
id2 = 0x94; id2 = 0x94;
} }
id16 &= ~0xff; id16 &= ~0xff;
id16 |= id2; id16 |= id2;
dev->chip_id = id16; dev->chip_id = id16;
dev->cpu_port = dev->mib_port_cnt - 1;
dev->host_mask = BIT(dev->cpu_port);
return 0; return 0;
} }
...@@ -1194,7 +1184,7 @@ static const struct ksz_chip_data ksz8795_switch_chips[] = { ...@@ -1194,7 +1184,7 @@ static const struct ksz_chip_data ksz8795_switch_chips[] = {
.num_alus = 0, .num_alus = 0,
.num_statics = 8, .num_statics = 8,
.cpu_ports = 0x10, /* can be configured as cpu port */ .cpu_ports = 0x10, /* can be configured as cpu port */
.port_cnt = 4, /* total physical port count */ .port_cnt = 5, /* total cpu and user ports */
}, },
{ {
.chip_id = 0x8794, .chip_id = 0x8794,
...@@ -1203,7 +1193,7 @@ static const struct ksz_chip_data ksz8795_switch_chips[] = { ...@@ -1203,7 +1193,7 @@ static const struct ksz_chip_data ksz8795_switch_chips[] = {
.num_alus = 0, .num_alus = 0,
.num_statics = 8, .num_statics = 8,
.cpu_ports = 0x10, /* can be configured as cpu port */ .cpu_ports = 0x10, /* can be configured as cpu port */
.port_cnt = 3, /* total physical port count */ .port_cnt = 4, /* total cpu and user ports */
}, },
{ {
.chip_id = 0x8765, .chip_id = 0x8765,
...@@ -1212,7 +1202,7 @@ static const struct ksz_chip_data ksz8795_switch_chips[] = { ...@@ -1212,7 +1202,7 @@ static const struct ksz_chip_data ksz8795_switch_chips[] = {
.num_alus = 0, .num_alus = 0,
.num_statics = 8, .num_statics = 8,
.cpu_ports = 0x10, /* can be configured as cpu port */ .cpu_ports = 0x10, /* can be configured as cpu port */
.port_cnt = 4, /* total physical port count */ .port_cnt = 5, /* total cpu and user ports */
}, },
}; };
...@@ -1244,27 +1234,32 @@ static int ksz8795_switch_init(struct ksz_device *dev) ...@@ -1244,27 +1234,32 @@ static int ksz8795_switch_init(struct ksz_device *dev)
dev->port_mask = BIT(dev->port_cnt) - 1; dev->port_mask = BIT(dev->port_cnt) - 1;
dev->port_mask |= dev->host_mask; dev->port_mask |= dev->host_mask;
dev->reg_mib_cnt = SWITCH_COUNTER_NUM; dev->reg_mib_cnt = KSZ8795_COUNTER_NUM;
dev->mib_cnt = TOTAL_SWITCH_COUNTER_NUM; dev->mib_cnt = ARRAY_SIZE(mib_names);
dev->phy_port_cnt = dev->port_cnt - 1;
dev->cpu_port = dev->port_cnt - 1;
dev->host_mask = BIT(dev->cpu_port);
i = dev->mib_port_cnt; dev->ports = devm_kzalloc(dev->dev,
dev->ports = devm_kzalloc(dev->dev, sizeof(struct ksz_port) * i, dev->port_cnt * sizeof(struct ksz_port),
GFP_KERNEL); GFP_KERNEL);
if (!dev->ports) if (!dev->ports)
return -ENOMEM; return -ENOMEM;
for (i = 0; i < dev->mib_port_cnt; i++) { for (i = 0; i < dev->port_cnt; i++) {
mutex_init(&dev->ports[i].mib.cnt_mutex); mutex_init(&dev->ports[i].mib.cnt_mutex);
dev->ports[i].mib.counters = dev->ports[i].mib.counters =
devm_kzalloc(dev->dev, devm_kzalloc(dev->dev,
sizeof(u64) * sizeof(u64) *
(TOTAL_SWITCH_COUNTER_NUM + 1), (dev->mib_cnt + 1),
GFP_KERNEL); GFP_KERNEL);
if (!dev->ports[i].mib.counters) if (!dev->ports[i].mib.counters)
return -ENOMEM; return -ENOMEM;
} }
/* set the real number of ports */ /* set the real number of ports */
dev->ds->num_ports = dev->port_cnt + 1; dev->ds->num_ports = dev->port_cnt;
return 0; return 0;
} }
......
...@@ -846,16 +846,7 @@ ...@@ -846,16 +846,7 @@
#define KS_PRIO_IN_REG 4 #define KS_PRIO_IN_REG 4
#define TOTAL_PORT_NUM 5
/* Host port can only be last of them. */
#define SWITCH_PORT_NUM (TOTAL_PORT_NUM - 1)
#define KSZ8795_COUNTER_NUM 0x20 #define KSZ8795_COUNTER_NUM 0x20
#define TOTAL_KSZ8795_COUNTER_NUM (KSZ8795_COUNTER_NUM + 4)
#define SWITCH_COUNTER_NUM KSZ8795_COUNTER_NUM
#define TOTAL_SWITCH_COUNTER_NUM TOTAL_KSZ8795_COUNTER_NUM
/* Common names used by other drivers */ /* Common names used by other drivers */
...@@ -998,7 +989,6 @@ ...@@ -998,7 +989,6 @@
#define TAIL_TAG_OVERRIDE BIT(6) #define TAIL_TAG_OVERRIDE BIT(6)
#define TAIL_TAG_LOOKUP BIT(7) #define TAIL_TAG_LOOKUP BIT(7)
#define VLAN_TABLE_ENTRIES (4096 / 4)
#define FID_ENTRIES 128 #define FID_ENTRIES 128
#endif #endif
...@@ -478,7 +478,7 @@ static void ksz9477_flush_dyn_mac_table(struct ksz_device *dev, int port) ...@@ -478,7 +478,7 @@ static void ksz9477_flush_dyn_mac_table(struct ksz_device *dev, int port)
SW_FLUSH_OPTION_M << SW_FLUSH_OPTION_S, SW_FLUSH_OPTION_M << SW_FLUSH_OPTION_S,
SW_FLUSH_OPTION_DYN_MAC << SW_FLUSH_OPTION_S); SW_FLUSH_OPTION_DYN_MAC << SW_FLUSH_OPTION_S);
if (port < dev->mib_port_cnt) { if (port < dev->port_cnt) {
/* flush individual port */ /* flush individual port */
ksz_pread8(dev, port, P_STP_CTRL, &data); ksz_pread8(dev, port, P_STP_CTRL, &data);
if (!(data & PORT_LEARN_DISABLE)) if (!(data & PORT_LEARN_DISABLE))
...@@ -1267,8 +1267,6 @@ static void ksz9477_config_cpu_port(struct dsa_switch *ds) ...@@ -1267,8 +1267,6 @@ static void ksz9477_config_cpu_port(struct dsa_switch *ds)
struct ksz_port *p; struct ksz_port *p;
int i; int i;
ds->num_ports = dev->port_cnt;
for (i = 0; i < dev->port_cnt; i++) { for (i = 0; i < dev->port_cnt; i++) {
if (dsa_is_cpu_port(ds, i) && (dev->cpu_ports & (1 << i))) { if (dsa_is_cpu_port(ds, i) && (dev->cpu_ports & (1 << i))) {
phy_interface_t interface; phy_interface_t interface;
...@@ -1319,7 +1317,7 @@ static void ksz9477_config_cpu_port(struct dsa_switch *ds) ...@@ -1319,7 +1317,7 @@ static void ksz9477_config_cpu_port(struct dsa_switch *ds)
dev->member = dev->host_mask; dev->member = dev->host_mask;
for (i = 0; i < dev->mib_port_cnt; i++) { for (i = 0; i < dev->port_cnt; i++) {
if (i == dev->cpu_port) if (i == dev->cpu_port)
continue; continue;
p = &dev->ports[i]; p = &dev->ports[i];
...@@ -1446,7 +1444,6 @@ static int ksz9477_switch_detect(struct ksz_device *dev) ...@@ -1446,7 +1444,6 @@ static int ksz9477_switch_detect(struct ksz_device *dev)
return ret; return ret;
/* Number of ports can be reduced depending on chip. */ /* Number of ports can be reduced depending on chip. */
dev->mib_port_cnt = TOTAL_PORT_NUM;
dev->phy_port_cnt = 5; dev->phy_port_cnt = 5;
/* Default capability is gigabit capable. */ /* Default capability is gigabit capable. */
...@@ -1463,7 +1460,6 @@ static int ksz9477_switch_detect(struct ksz_device *dev) ...@@ -1463,7 +1460,6 @@ static int ksz9477_switch_detect(struct ksz_device *dev)
/* Chip does not support gigabit. */ /* Chip does not support gigabit. */
if (data8 & SW_QW_ABLE) if (data8 & SW_QW_ABLE)
dev->features &= ~GBIT_SUPPORT; dev->features &= ~GBIT_SUPPORT;
dev->mib_port_cnt = 3;
dev->phy_port_cnt = 2; dev->phy_port_cnt = 2;
} else { } else {
dev_info(dev->dev, "Found KSZ9477 or compatible\n"); dev_info(dev->dev, "Found KSZ9477 or compatible\n");
...@@ -1566,12 +1562,12 @@ static int ksz9477_switch_init(struct ksz_device *dev) ...@@ -1566,12 +1562,12 @@ static int ksz9477_switch_init(struct ksz_device *dev)
dev->reg_mib_cnt = SWITCH_COUNTER_NUM; dev->reg_mib_cnt = SWITCH_COUNTER_NUM;
dev->mib_cnt = TOTAL_SWITCH_COUNTER_NUM; dev->mib_cnt = TOTAL_SWITCH_COUNTER_NUM;
i = dev->mib_port_cnt; dev->ports = devm_kzalloc(dev->dev,
dev->ports = devm_kzalloc(dev->dev, sizeof(struct ksz_port) * i, dev->port_cnt * sizeof(struct ksz_port),
GFP_KERNEL); GFP_KERNEL);
if (!dev->ports) if (!dev->ports)
return -ENOMEM; return -ENOMEM;
for (i = 0; i < dev->mib_port_cnt; i++) { for (i = 0; i < dev->port_cnt; i++) {
mutex_init(&dev->ports[i].mib.cnt_mutex); mutex_init(&dev->ports[i].mib.cnt_mutex);
dev->ports[i].mib.counters = dev->ports[i].mib.counters =
devm_kzalloc(dev->dev, devm_kzalloc(dev->dev,
......
...@@ -72,7 +72,7 @@ static void ksz_mib_read_work(struct work_struct *work) ...@@ -72,7 +72,7 @@ static void ksz_mib_read_work(struct work_struct *work)
struct ksz_port *p; struct ksz_port *p;
int i; int i;
for (i = 0; i < dev->mib_port_cnt; i++) { for (i = 0; i < dev->port_cnt; i++) {
if (dsa_is_unused_port(dev->ds, i)) if (dsa_is_unused_port(dev->ds, i))
continue; continue;
...@@ -103,7 +103,7 @@ void ksz_init_mib_timer(struct ksz_device *dev) ...@@ -103,7 +103,7 @@ void ksz_init_mib_timer(struct ksz_device *dev)
INIT_DELAYED_WORK(&dev->mib_read, ksz_mib_read_work); INIT_DELAYED_WORK(&dev->mib_read, ksz_mib_read_work);
for (i = 0; i < dev->mib_port_cnt; i++) for (i = 0; i < dev->port_cnt; i++)
dev->dev_ops->port_init_cnt(dev, i); dev->dev_ops->port_init_cnt(dev, i);
} }
EXPORT_SYMBOL_GPL(ksz_init_mib_timer); EXPORT_SYMBOL_GPL(ksz_init_mib_timer);
......
...@@ -71,8 +71,6 @@ struct ksz_device { ...@@ -71,8 +71,6 @@ struct ksz_device {
int port_cnt; int port_cnt;
int reg_mib_cnt; int reg_mib_cnt;
int mib_cnt; int mib_cnt;
int mib_port_cnt;
int last_port; /* ports after that not used */
phy_interface_t compat_interface; phy_interface_t compat_interface;
u32 regs_size; u32 regs_size;
bool phy_errata_9477; bool phy_errata_9477;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment