@@ -67,7 +67,7 @@ static struct phy_device *phydevs[PHY_MAX_ADDR];
67
67
static enum dsa_tag_protocol dsa_loop_get_protocol (struct dsa_switch * ds ,
68
68
int port )
69
69
{
70
- dev_dbg (ds -> dev , "%s\n" , __func__ );
70
+ dev_dbg (ds -> dev , "%s: port: %d \n" , __func__ , port );
71
71
72
72
return DSA_TAG_PROTO_NONE ;
73
73
}
@@ -124,8 +124,6 @@ static int dsa_loop_phy_read(struct dsa_switch *ds, int port, int regnum)
124
124
struct mii_bus * bus = ps -> bus ;
125
125
int ret ;
126
126
127
- dev_dbg (ds -> dev , "%s\n" , __func__ );
128
-
129
127
ret = mdiobus_read_nested (bus , ps -> port_base + port , regnum );
130
128
if (ret < 0 )
131
129
ps -> ports [port ].mib [DSA_LOOP_PHY_READ_ERR ].val ++ ;
@@ -142,8 +140,6 @@ static int dsa_loop_phy_write(struct dsa_switch *ds, int port,
142
140
struct mii_bus * bus = ps -> bus ;
143
141
int ret ;
144
142
145
- dev_dbg (ds -> dev , "%s\n" , __func__ );
146
-
147
143
ret = mdiobus_write_nested (bus , ps -> port_base + port , regnum , value );
148
144
if (ret < 0 )
149
145
ps -> ports [port ].mib [DSA_LOOP_PHY_WRITE_ERR ].val ++ ;
@@ -156,27 +152,31 @@ static int dsa_loop_phy_write(struct dsa_switch *ds, int port,
156
152
static int dsa_loop_port_bridge_join (struct dsa_switch * ds , int port ,
157
153
struct net_device * bridge )
158
154
{
159
- dev_dbg (ds -> dev , "%s\n" , __func__ );
155
+ dev_dbg (ds -> dev , "%s: port: %d, bridge: %s\n" ,
156
+ __func__ , port , bridge -> name );
160
157
161
158
return 0 ;
162
159
}
163
160
164
161
static void dsa_loop_port_bridge_leave (struct dsa_switch * ds , int port ,
165
162
struct net_device * bridge )
166
163
{
167
- dev_dbg (ds -> dev , "%s\n" , __func__ );
164
+ dev_dbg (ds -> dev , "%s: port: %d, bridge: %s\n" ,
165
+ __func__ , port , bridge -> name );
168
166
}
169
167
170
168
static void dsa_loop_port_stp_state_set (struct dsa_switch * ds , int port ,
171
169
u8 state )
172
170
{
173
- dev_dbg (ds -> dev , "%s\n" , __func__ );
171
+ dev_dbg (ds -> dev , "%s: port: %d, state: %d\n" ,
172
+ __func__ , port , state );
174
173
}
175
174
176
175
static int dsa_loop_port_vlan_filtering (struct dsa_switch * ds , int port ,
177
176
bool vlan_filtering )
178
177
{
179
- dev_dbg (ds -> dev , "%s\n" , __func__ );
178
+ dev_dbg (ds -> dev , "%s: port: %d, vlan_filtering: %d\n" ,
179
+ __func__ , port , vlan_filtering );
180
180
181
181
return 0 ;
182
182
}
@@ -188,7 +188,8 @@ dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port,
188
188
struct dsa_loop_priv * ps = ds -> priv ;
189
189
struct mii_bus * bus = ps -> bus ;
190
190
191
- dev_dbg (ds -> dev , "%s\n" , __func__ );
191
+ dev_dbg (ds -> dev , "%s: port: %d, vlan: %d-%d" ,
192
+ __func__ , port , vlan -> vid_begin , vlan -> vid_end );
192
193
193
194
/* Just do a sleeping operation to make lockdep checks effective */
194
195
mdiobus_read (bus , ps -> port_base + port , MII_BMSR );
@@ -209,8 +210,6 @@ static void dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,
209
210
struct dsa_loop_vlan * vl ;
210
211
u16 vid ;
211
212
212
- dev_dbg (ds -> dev , "%s\n" , __func__ );
213
-
214
213
/* Just do a sleeping operation to make lockdep checks effective */
215
214
mdiobus_read (bus , ps -> port_base + port , MII_BMSR );
216
215
@@ -222,6 +221,9 @@ static void dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,
222
221
vl -> untagged |= BIT (port );
223
222
else
224
223
vl -> untagged &= ~BIT (port );
224
+
225
+ dev_dbg (ds -> dev , "%s: port: %d vlan: %d, %stagged, pvid: %d\n" ,
226
+ __func__ , port , vid , untagged ? "un" : "" , pvid );
225
227
}
226
228
227
229
if (pvid )
@@ -237,8 +239,6 @@ static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,
237
239
struct dsa_loop_vlan * vl ;
238
240
u16 vid , pvid = ps -> pvid ;
239
241
240
- dev_dbg (ds -> dev , "%s\n" , __func__ );
241
-
242
242
/* Just do a sleeping operation to make lockdep checks effective */
243
243
mdiobus_read (bus , ps -> port_base + port , MII_BMSR );
244
244
@@ -251,6 +251,9 @@ static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,
251
251
252
252
if (pvid == vid )
253
253
pvid = 1 ;
254
+
255
+ dev_dbg (ds -> dev , "%s: port: %d vlan: %d, %stagged, pvid: %d\n" ,
256
+ __func__ , port , vid , untagged ? "un" : "" , pvid );
254
257
}
255
258
ps -> pvid = pvid ;
256
259
0 commit comments