@@ -121,7 +121,7 @@ struct ib_gid_table {
121
121
u32 default_gid_indices ;
122
122
};
123
123
124
- static void dispatch_gid_change_event (struct ib_device * ib_dev , u8 port )
124
+ static void dispatch_gid_change_event (struct ib_device * ib_dev , u32 port )
125
125
{
126
126
struct ib_event event ;
127
127
@@ -197,7 +197,7 @@ int ib_cache_gid_parse_type_str(const char *buf)
197
197
}
198
198
EXPORT_SYMBOL (ib_cache_gid_parse_type_str );
199
199
200
- static struct ib_gid_table * rdma_gid_table (struct ib_device * device , u8 port )
200
+ static struct ib_gid_table * rdma_gid_table (struct ib_device * device , u32 port )
201
201
{
202
202
return device -> port_data [port ].cache .gid ;
203
203
}
@@ -237,10 +237,10 @@ static void put_gid_ndev(struct rcu_head *head)
237
237
static void free_gid_entry_locked (struct ib_gid_table_entry * entry )
238
238
{
239
239
struct ib_device * device = entry -> attr .device ;
240
- u8 port_num = entry -> attr .port_num ;
240
+ u32 port_num = entry -> attr .port_num ;
241
241
struct ib_gid_table * table = rdma_gid_table (device , port_num );
242
242
243
- dev_dbg (& device -> dev , "%s port=%d index=%d gid %pI6\n" , __func__ ,
243
+ dev_dbg (& device -> dev , "%s port=%u index=%d gid %pI6\n" , __func__ ,
244
244
port_num , entry -> attr .index , entry -> attr .gid .raw );
245
245
246
246
write_lock_irq (& table -> rwlock );
@@ -282,7 +282,7 @@ static void free_gid_work(struct work_struct *work)
282
282
struct ib_gid_table_entry * entry =
283
283
container_of (work , struct ib_gid_table_entry , del_work );
284
284
struct ib_device * device = entry -> attr .device ;
285
- u8 port_num = entry -> attr .port_num ;
285
+ u32 port_num = entry -> attr .port_num ;
286
286
struct ib_gid_table * table = rdma_gid_table (device , port_num );
287
287
288
288
mutex_lock (& table -> lock );
@@ -379,15 +379,15 @@ static int add_roce_gid(struct ib_gid_table_entry *entry)
379
379
* @ix: GID entry index to delete
380
380
*
381
381
*/
382
- static void del_gid (struct ib_device * ib_dev , u8 port ,
382
+ static void del_gid (struct ib_device * ib_dev , u32 port ,
383
383
struct ib_gid_table * table , int ix )
384
384
{
385
385
struct roce_gid_ndev_storage * ndev_storage ;
386
386
struct ib_gid_table_entry * entry ;
387
387
388
388
lockdep_assert_held (& table -> lock );
389
389
390
- dev_dbg (& ib_dev -> dev , "%s port=%d index=%d gid %pI6\n" , __func__ , port ,
390
+ dev_dbg (& ib_dev -> dev , "%s port=%u index=%d gid %pI6\n" , __func__ , port ,
391
391
ix , table -> data_vec [ix ]-> attr .gid .raw );
392
392
393
393
write_lock_irq (& table -> rwlock );
@@ -543,7 +543,7 @@ static void make_default_gid(struct net_device *dev, union ib_gid *gid)
543
543
addrconf_ifid_eui48 (& gid -> raw [8 ], dev );
544
544
}
545
545
546
- static int __ib_cache_gid_add (struct ib_device * ib_dev , u8 port ,
546
+ static int __ib_cache_gid_add (struct ib_device * ib_dev , u32 port ,
547
547
union ib_gid * gid , struct ib_gid_attr * attr ,
548
548
unsigned long mask , bool default_gid )
549
549
{
@@ -587,7 +587,7 @@ static int __ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
587
587
return ret ;
588
588
}
589
589
590
- int ib_cache_gid_add (struct ib_device * ib_dev , u8 port ,
590
+ int ib_cache_gid_add (struct ib_device * ib_dev , u32 port ,
591
591
union ib_gid * gid , struct ib_gid_attr * attr )
592
592
{
593
593
unsigned long mask = GID_ATTR_FIND_MASK_GID |
@@ -598,7 +598,7 @@ int ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
598
598
}
599
599
600
600
static int
601
- _ib_cache_gid_del (struct ib_device * ib_dev , u8 port ,
601
+ _ib_cache_gid_del (struct ib_device * ib_dev , u32 port ,
602
602
union ib_gid * gid , struct ib_gid_attr * attr ,
603
603
unsigned long mask , bool default_gid )
604
604
{
@@ -627,7 +627,7 @@ _ib_cache_gid_del(struct ib_device *ib_dev, u8 port,
627
627
return ret ;
628
628
}
629
629
630
- int ib_cache_gid_del (struct ib_device * ib_dev , u8 port ,
630
+ int ib_cache_gid_del (struct ib_device * ib_dev , u32 port ,
631
631
union ib_gid * gid , struct ib_gid_attr * attr )
632
632
{
633
633
unsigned long mask = GID_ATTR_FIND_MASK_GID |
@@ -638,7 +638,7 @@ int ib_cache_gid_del(struct ib_device *ib_dev, u8 port,
638
638
return _ib_cache_gid_del (ib_dev , port , gid , attr , mask , false);
639
639
}
640
640
641
- int ib_cache_gid_del_all_netdev_gids (struct ib_device * ib_dev , u8 port ,
641
+ int ib_cache_gid_del_all_netdev_gids (struct ib_device * ib_dev , u32 port ,
642
642
struct net_device * ndev )
643
643
{
644
644
struct ib_gid_table * table ;
@@ -683,7 +683,7 @@ const struct ib_gid_attr *
683
683
rdma_find_gid_by_port (struct ib_device * ib_dev ,
684
684
const union ib_gid * gid ,
685
685
enum ib_gid_type gid_type ,
686
- u8 port , struct net_device * ndev )
686
+ u32 port , struct net_device * ndev )
687
687
{
688
688
int local_index ;
689
689
struct ib_gid_table * table ;
@@ -734,7 +734,7 @@ EXPORT_SYMBOL(rdma_find_gid_by_port);
734
734
*
735
735
*/
736
736
const struct ib_gid_attr * rdma_find_gid_by_filter (
737
- struct ib_device * ib_dev , const union ib_gid * gid , u8 port ,
737
+ struct ib_device * ib_dev , const union ib_gid * gid , u32 port ,
738
738
bool (* filter )(const union ib_gid * gid , const struct ib_gid_attr * ,
739
739
void * ),
740
740
void * context )
@@ -818,7 +818,7 @@ static void release_gid_table(struct ib_device *device,
818
818
kfree (table );
819
819
}
820
820
821
- static void cleanup_gid_table_port (struct ib_device * ib_dev , u8 port ,
821
+ static void cleanup_gid_table_port (struct ib_device * ib_dev , u32 port ,
822
822
struct ib_gid_table * table )
823
823
{
824
824
int i ;
@@ -834,7 +834,7 @@ static void cleanup_gid_table_port(struct ib_device *ib_dev, u8 port,
834
834
mutex_unlock (& table -> lock );
835
835
}
836
836
837
- void ib_cache_gid_set_default_gid (struct ib_device * ib_dev , u8 port ,
837
+ void ib_cache_gid_set_default_gid (struct ib_device * ib_dev , u32 port ,
838
838
struct net_device * ndev ,
839
839
unsigned long gid_type_mask ,
840
840
enum ib_cache_gid_default_mode mode )
@@ -867,7 +867,7 @@ void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,
867
867
}
868
868
}
869
869
870
- static void gid_table_reserve_default (struct ib_device * ib_dev , u8 port ,
870
+ static void gid_table_reserve_default (struct ib_device * ib_dev , u32 port ,
871
871
struct ib_gid_table * table )
872
872
{
873
873
unsigned int i ;
@@ -884,7 +884,7 @@ static void gid_table_reserve_default(struct ib_device *ib_dev, u8 port,
884
884
885
885
static void gid_table_release_one (struct ib_device * ib_dev )
886
886
{
887
- unsigned int p ;
887
+ u32 p ;
888
888
889
889
rdma_for_each_port (ib_dev , p ) {
890
890
release_gid_table (ib_dev , ib_dev -> port_data [p ].cache .gid );
@@ -895,7 +895,7 @@ static void gid_table_release_one(struct ib_device *ib_dev)
895
895
static int _gid_table_setup_one (struct ib_device * ib_dev )
896
896
{
897
897
struct ib_gid_table * table ;
898
- unsigned int rdma_port ;
898
+ u32 rdma_port ;
899
899
900
900
rdma_for_each_port (ib_dev , rdma_port ) {
901
901
table = alloc_gid_table (
@@ -915,7 +915,7 @@ static int _gid_table_setup_one(struct ib_device *ib_dev)
915
915
916
916
static void gid_table_cleanup_one (struct ib_device * ib_dev )
917
917
{
918
- unsigned int p ;
918
+ u32 p ;
919
919
920
920
rdma_for_each_port (ib_dev , p )
921
921
cleanup_gid_table_port (ib_dev , p ,
@@ -950,7 +950,7 @@ static int gid_table_setup_one(struct ib_device *ib_dev)
950
950
* Returns 0 on success or appropriate error code.
951
951
*
952
952
*/
953
- int rdma_query_gid (struct ib_device * device , u8 port_num ,
953
+ int rdma_query_gid (struct ib_device * device , u32 port_num ,
954
954
int index , union ib_gid * gid )
955
955
{
956
956
struct ib_gid_table * table ;
@@ -1014,7 +1014,7 @@ const struct ib_gid_attr *rdma_find_gid(struct ib_device *device,
1014
1014
unsigned long mask = GID_ATTR_FIND_MASK_GID |
1015
1015
GID_ATTR_FIND_MASK_GID_TYPE ;
1016
1016
struct ib_gid_attr gid_attr_val = {.ndev = ndev , .gid_type = gid_type };
1017
- unsigned int p ;
1017
+ u32 p ;
1018
1018
1019
1019
if (ndev )
1020
1020
mask |= GID_ATTR_FIND_MASK_NETDEV ;
@@ -1043,7 +1043,7 @@ const struct ib_gid_attr *rdma_find_gid(struct ib_device *device,
1043
1043
EXPORT_SYMBOL (rdma_find_gid );
1044
1044
1045
1045
int ib_get_cached_pkey (struct ib_device * device ,
1046
- u8 port_num ,
1046
+ u32 port_num ,
1047
1047
int index ,
1048
1048
u16 * pkey )
1049
1049
{
@@ -1069,9 +1069,8 @@ int ib_get_cached_pkey(struct ib_device *device,
1069
1069
}
1070
1070
EXPORT_SYMBOL (ib_get_cached_pkey );
1071
1071
1072
- int ib_get_cached_subnet_prefix (struct ib_device * device ,
1073
- u8 port_num ,
1074
- u64 * sn_pfx )
1072
+ int ib_get_cached_subnet_prefix (struct ib_device * device , u32 port_num ,
1073
+ u64 * sn_pfx )
1075
1074
{
1076
1075
unsigned long flags ;
1077
1076
@@ -1086,10 +1085,8 @@ int ib_get_cached_subnet_prefix(struct ib_device *device,
1086
1085
}
1087
1086
EXPORT_SYMBOL (ib_get_cached_subnet_prefix );
1088
1087
1089
- int ib_find_cached_pkey (struct ib_device * device ,
1090
- u8 port_num ,
1091
- u16 pkey ,
1092
- u16 * index )
1088
+ int ib_find_cached_pkey (struct ib_device * device , u32 port_num ,
1089
+ u16 pkey , u16 * index )
1093
1090
{
1094
1091
struct ib_pkey_cache * cache ;
1095
1092
unsigned long flags ;
@@ -1132,10 +1129,8 @@ int ib_find_cached_pkey(struct ib_device *device,
1132
1129
}
1133
1130
EXPORT_SYMBOL (ib_find_cached_pkey );
1134
1131
1135
- int ib_find_exact_cached_pkey (struct ib_device * device ,
1136
- u8 port_num ,
1137
- u16 pkey ,
1138
- u16 * index )
1132
+ int ib_find_exact_cached_pkey (struct ib_device * device , u32 port_num ,
1133
+ u16 pkey , u16 * index )
1139
1134
{
1140
1135
struct ib_pkey_cache * cache ;
1141
1136
unsigned long flags ;
@@ -1169,9 +1164,7 @@ int ib_find_exact_cached_pkey(struct ib_device *device,
1169
1164
}
1170
1165
EXPORT_SYMBOL (ib_find_exact_cached_pkey );
1171
1166
1172
- int ib_get_cached_lmc (struct ib_device * device ,
1173
- u8 port_num ,
1174
- u8 * lmc )
1167
+ int ib_get_cached_lmc (struct ib_device * device , u32 port_num , u8 * lmc )
1175
1168
{
1176
1169
unsigned long flags ;
1177
1170
int ret = 0 ;
@@ -1187,8 +1180,7 @@ int ib_get_cached_lmc(struct ib_device *device,
1187
1180
}
1188
1181
EXPORT_SYMBOL (ib_get_cached_lmc );
1189
1182
1190
- int ib_get_cached_port_state (struct ib_device * device ,
1191
- u8 port_num ,
1183
+ int ib_get_cached_port_state (struct ib_device * device , u32 port_num ,
1192
1184
enum ib_port_state * port_state )
1193
1185
{
1194
1186
unsigned long flags ;
@@ -1222,7 +1214,7 @@ EXPORT_SYMBOL(ib_get_cached_port_state);
1222
1214
* code.
1223
1215
*/
1224
1216
const struct ib_gid_attr *
1225
- rdma_get_gid_attr (struct ib_device * device , u8 port_num , int index )
1217
+ rdma_get_gid_attr (struct ib_device * device , u32 port_num , int index )
1226
1218
{
1227
1219
const struct ib_gid_attr * attr = ERR_PTR (- ENODATA );
1228
1220
struct ib_gid_table * table ;
@@ -1263,7 +1255,7 @@ ssize_t rdma_query_gid_table(struct ib_device *device,
1263
1255
const struct ib_gid_attr * gid_attr ;
1264
1256
ssize_t num_entries = 0 , ret ;
1265
1257
struct ib_gid_table * table ;
1266
- unsigned int port_num , i ;
1258
+ u32 port_num , i ;
1267
1259
struct net_device * ndev ;
1268
1260
unsigned long flags ;
1269
1261
@@ -1361,7 +1353,7 @@ struct net_device *rdma_read_gid_attr_ndev_rcu(const struct ib_gid_attr *attr)
1361
1353
container_of (attr , struct ib_gid_table_entry , attr );
1362
1354
struct ib_device * device = entry -> attr .device ;
1363
1355
struct net_device * ndev = ERR_PTR (- EINVAL );
1364
- u8 port_num = entry -> attr .port_num ;
1356
+ u32 port_num = entry -> attr .port_num ;
1365
1357
struct ib_gid_table * table ;
1366
1358
unsigned long flags ;
1367
1359
bool valid ;
@@ -1441,7 +1433,7 @@ int rdma_read_gid_l2_fields(const struct ib_gid_attr *attr,
1441
1433
EXPORT_SYMBOL (rdma_read_gid_l2_fields );
1442
1434
1443
1435
static int config_non_roce_gid_cache (struct ib_device * device ,
1444
- u8 port , int gid_tbl_len )
1436
+ u32 port , int gid_tbl_len )
1445
1437
{
1446
1438
struct ib_gid_attr gid_attr = {};
1447
1439
struct ib_gid_table * table ;
@@ -1472,7 +1464,7 @@ static int config_non_roce_gid_cache(struct ib_device *device,
1472
1464
}
1473
1465
1474
1466
static int
1475
- ib_cache_update (struct ib_device * device , u8 port , bool enforce_security )
1467
+ ib_cache_update (struct ib_device * device , u32 port , bool enforce_security )
1476
1468
{
1477
1469
struct ib_port_attr * tprops = NULL ;
1478
1470
struct ib_pkey_cache * pkey_cache = NULL , * old_pkey_cache ;
@@ -1621,7 +1613,7 @@ EXPORT_SYMBOL(ib_dispatch_event);
1621
1613
1622
1614
int ib_cache_setup_one (struct ib_device * device )
1623
1615
{
1624
- unsigned int p ;
1616
+ u32 p ;
1625
1617
int err ;
1626
1618
1627
1619
rwlock_init (& device -> cache_lock );
@@ -1641,7 +1633,7 @@ int ib_cache_setup_one(struct ib_device *device)
1641
1633
1642
1634
void ib_cache_release_one (struct ib_device * device )
1643
1635
{
1644
- unsigned int p ;
1636
+ u32 p ;
1645
1637
1646
1638
/*
1647
1639
* The release function frees all the cache elements.
0 commit comments