@@ -151,19 +151,19 @@ struct xpcs_compat {
151
151
int (* pma_config )(struct dw_xpcs * xpcs );
152
152
};
153
153
154
- struct xpcs_id {
154
+ struct dw_xpcs_desc {
155
155
u32 id ;
156
156
u32 mask ;
157
157
const struct xpcs_compat * compat ;
158
158
};
159
159
160
- static const struct xpcs_compat * xpcs_find_compat ( const struct xpcs_id * id ,
161
- phy_interface_t interface )
160
+ static const struct xpcs_compat *
161
+ xpcs_find_compat ( const struct dw_xpcs_desc * desc , phy_interface_t interface )
162
162
{
163
163
int i , j ;
164
164
165
165
for (i = 0 ; i < DW_XPCS_INTERFACE_MAX ; i ++ ) {
166
- const struct xpcs_compat * compat = & id -> compat [i ];
166
+ const struct xpcs_compat * compat = & desc -> compat [i ];
167
167
168
168
for (j = 0 ; j < compat -> num_interfaces ; j ++ )
169
169
if (compat -> interface [j ] == interface )
@@ -177,7 +177,7 @@ int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface)
177
177
{
178
178
const struct xpcs_compat * compat ;
179
179
180
- compat = xpcs_find_compat (xpcs -> id , interface );
180
+ compat = xpcs_find_compat (xpcs -> desc , interface );
181
181
if (!compat )
182
182
return - ENODEV ;
183
183
@@ -612,7 +612,7 @@ static int xpcs_validate(struct phylink_pcs *pcs, unsigned long *supported,
612
612
int i ;
613
613
614
614
xpcs = phylink_pcs_to_xpcs (pcs );
615
- compat = xpcs_find_compat (xpcs -> id , state -> interface );
615
+ compat = xpcs_find_compat (xpcs -> desc , state -> interface );
616
616
if (!compat )
617
617
return - EINVAL ;
618
618
@@ -633,7 +633,7 @@ void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces)
633
633
int i , j ;
634
634
635
635
for (i = 0 ; i < DW_XPCS_INTERFACE_MAX ; i ++ ) {
636
- const struct xpcs_compat * compat = & xpcs -> id -> compat [i ];
636
+ const struct xpcs_compat * compat = & xpcs -> desc -> compat [i ];
637
637
638
638
for (j = 0 ; j < compat -> num_interfaces ; j ++ )
639
639
__set_bit (compat -> interface [j ], interfaces );
@@ -853,7 +853,7 @@ int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
853
853
const struct xpcs_compat * compat ;
854
854
int ret ;
855
855
856
- compat = xpcs_find_compat (xpcs -> id , interface );
856
+ compat = xpcs_find_compat (xpcs -> desc , interface );
857
857
if (!compat )
858
858
return - ENODEV ;
859
859
@@ -1118,7 +1118,7 @@ static void xpcs_get_state(struct phylink_pcs *pcs,
1118
1118
const struct xpcs_compat * compat ;
1119
1119
int ret ;
1120
1120
1121
- compat = xpcs_find_compat (xpcs -> id , state -> interface );
1121
+ compat = xpcs_find_compat (xpcs -> desc , state -> interface );
1122
1122
if (!compat )
1123
1123
return ;
1124
1124
@@ -1341,7 +1341,7 @@ static const struct xpcs_compat nxp_sja1110_xpcs_compat[DW_XPCS_INTERFACE_MAX] =
1341
1341
},
1342
1342
};
1343
1343
1344
- static const struct xpcs_id xpcs_id_list [] = {
1344
+ static const struct dw_xpcs_desc xpcs_desc_list [] = {
1345
1345
{
1346
1346
.id = DW_XPCS_ID ,
1347
1347
.mask = DW_XPCS_ID_MASK ,
@@ -1395,18 +1395,18 @@ static int xpcs_init_id(struct dw_xpcs *xpcs)
1395
1395
1396
1396
xpcs_id = xpcs_get_id (xpcs );
1397
1397
1398
- for (i = 0 ; i < ARRAY_SIZE (xpcs_id_list ); i ++ ) {
1399
- const struct xpcs_id * entry = & xpcs_id_list [i ];
1398
+ for (i = 0 ; i < ARRAY_SIZE (xpcs_desc_list ); i ++ ) {
1399
+ const struct dw_xpcs_desc * desc = & xpcs_desc_list [i ];
1400
1400
1401
- if ((xpcs_id & entry -> mask ) != entry -> id )
1401
+ if ((xpcs_id & desc -> mask ) != desc -> id )
1402
1402
continue ;
1403
1403
1404
- xpcs -> id = entry ;
1404
+ xpcs -> desc = desc ;
1405
1405
1406
1406
break ;
1407
1407
}
1408
1408
1409
- if (!xpcs -> id )
1409
+ if (!xpcs -> desc )
1410
1410
return - ENODEV ;
1411
1411
1412
1412
ret = xpcs_dev_flag (xpcs );
@@ -1420,7 +1420,7 @@ static int xpcs_init_iface(struct dw_xpcs *xpcs, phy_interface_t interface)
1420
1420
{
1421
1421
const struct xpcs_compat * compat ;
1422
1422
1423
- compat = xpcs_find_compat (xpcs -> id , interface );
1423
+ compat = xpcs_find_compat (xpcs -> desc , interface );
1424
1424
if (!compat )
1425
1425
return - EINVAL ;
1426
1426
0 commit comments