forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2014-2015 Hisilicon Limited.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
84 */
95
106 #include <linux/acpi.h>
....@@ -28,7 +24,7 @@
2824 #include "hns_dsaf_rcb.h"
2925 #include "hns_dsaf_misc.h"
3026
31
-const static char *g_dsaf_mode_match[DSAF_MODE_MAX] = {
27
+static const char *g_dsaf_mode_match[DSAF_MODE_MAX] = {
3228 [DSAF_MODE_DISABLE_2PORT_64VM] = "2port-64vf",
3329 [DSAF_MODE_DISABLE_6PORT_0VM] = "6port-16rss",
3430 [DSAF_MODE_DISABLE_6PORT_16VM] = "6port-16vf",
....@@ -211,7 +207,7 @@
211207
212208 /**
213209 * hns_dsaf_sbm_link_sram_init_en - config dsaf_sbm_init_en
214
- * @dsaf_id: dsa fabric id
210
+ * @dsaf_dev: dsa fabric id
215211 */
216212 static void hns_dsaf_sbm_link_sram_init_en(struct dsaf_device *dsaf_dev)
217213 {
....@@ -220,8 +216,8 @@
220216
221217 /**
222218 * hns_dsaf_reg_cnt_clr_ce - config hns_dsaf_reg_cnt_clr_ce
223
- * @dsaf_id: dsa fabric id
224
- * @hns_dsaf_reg_cnt_clr_ce: config value
219
+ * @dsaf_dev: dsa fabric id
220
+ * @reg_cnt_clr_ce: config value
225221 */
226222 static void
227223 hns_dsaf_reg_cnt_clr_ce(struct dsaf_device *dsaf_dev, u32 reg_cnt_clr_ce)
....@@ -232,8 +228,8 @@
232228
233229 /**
234230 * hns_ppe_qid_cfg - config ppe qid
235
- * @dsaf_id: dsa fabric id
236
- * @pppe_qid_cfg: value array
231
+ * @dsaf_dev: dsa fabric id
232
+ * @qid_cfg: value array
237233 */
238234 static void
239235 hns_dsaf_ppe_qid_cfg(struct dsaf_device *dsaf_dev, u32 qid_cfg)
....@@ -289,8 +285,8 @@
289285
290286 /**
291287 * hns_dsaf_sw_port_type_cfg - cfg sw type
292
- * @dsaf_id: dsa fabric id
293
- * @psw_port_type: array
288
+ * @dsaf_dev: dsa fabric id
289
+ * @port_type: array
294290 */
295291 static void hns_dsaf_sw_port_type_cfg(struct dsaf_device *dsaf_dev,
296292 enum dsaf_sw_port_type port_type)
....@@ -307,8 +303,8 @@
307303
308304 /**
309305 * hns_dsaf_stp_port_type_cfg - cfg stp type
310
- * @dsaf_id: dsa fabric id
311
- * @pstp_port_type: array
306
+ * @dsaf_dev: dsa fabric id
307
+ * @port_type: array
312308 */
313309 static void hns_dsaf_stp_port_type_cfg(struct dsaf_device *dsaf_dev,
314310 enum dsaf_stp_port_type port_type)
....@@ -327,7 +323,7 @@
327323 (AE_IS_VER1((dev)->dsaf_ver) ? DSAF_SBM_NUM : DSAFV2_SBM_NUM)
328324 /**
329325 * hns_dsaf_sbm_cfg - config sbm
330
- * @dsaf_id: dsa fabric id
326
+ * @dsaf_dev: dsa fabric id
331327 */
332328 static void hns_dsaf_sbm_cfg(struct dsaf_device *dsaf_dev)
333329 {
....@@ -346,7 +342,7 @@
346342
347343 /**
348344 * hns_dsaf_sbm_cfg_mib_en - config sbm
349
- * @dsaf_id: dsa fabric id
345
+ * @dsaf_dev: dsa fabric id
350346 */
351347 static int hns_dsaf_sbm_cfg_mib_en(struct dsaf_device *dsaf_dev)
352348 {
....@@ -391,7 +387,7 @@
391387
392388 /**
393389 * hns_dsaf_sbm_bp_wl_cfg - config sbm
394
- * @dsaf_id: dsa fabric id
390
+ * @dsaf_dev: dsa fabric id
395391 */
396392 static void hns_dsaf_sbm_bp_wl_cfg(struct dsaf_device *dsaf_dev)
397393 {
....@@ -560,7 +556,7 @@
560556
561557 /**
562558 * hns_dsaf_voq_bp_all_thrd_cfg - voq
563
- * @dsaf_id: dsa fabric id
559
+ * @dsaf_dev: dsa fabric id
564560 */
565561 static void hns_dsaf_voq_bp_all_thrd_cfg(struct dsaf_device *dsaf_dev)
566562 {
....@@ -603,7 +599,7 @@
603599
604600 /**
605601 * hns_dsaf_tbl_tcam_data_cfg - tbl
606
- * @dsaf_id: dsa fabric id
602
+ * @dsaf_dev: dsa fabric id
607603 * @ptbl_tcam_data: addr
608604 */
609605 static void hns_dsaf_tbl_tcam_data_cfg(
....@@ -618,8 +614,8 @@
618614
619615 /**
620616 * dsaf_tbl_tcam_mcast_cfg - tbl
621
- * @dsaf_id: dsa fabric id
622
- * @ptbl_tcam_mcast: addr
617
+ * @dsaf_dev: dsa fabric id
618
+ * @mcast: addr
623619 */
624620 static void hns_dsaf_tbl_tcam_mcast_cfg(
625621 struct dsaf_device *dsaf_dev,
....@@ -652,8 +648,8 @@
652648
653649 /**
654650 * hns_dsaf_tbl_tcam_ucast_cfg - tbl
655
- * @dsaf_id: dsa fabric id
656
- * @ptbl_tcam_ucast: addr
651
+ * @dsaf_dev: dsa fabric id
652
+ * @tbl_tcam_ucast: addr
657653 */
658654 static void hns_dsaf_tbl_tcam_ucast_cfg(
659655 struct dsaf_device *dsaf_dev,
....@@ -678,8 +674,8 @@
678674
679675 /**
680676 * hns_dsaf_tbl_line_cfg - tbl
681
- * @dsaf_id: dsa fabric id
682
- * @ptbl_lin: addr
677
+ * @dsaf_dev: dsa fabric id
678
+ * @tbl_lin: addr
683679 */
684680 static void hns_dsaf_tbl_line_cfg(struct dsaf_device *dsaf_dev,
685681 struct dsaf_tbl_line_cfg *tbl_lin)
....@@ -699,7 +695,7 @@
699695
700696 /**
701697 * hns_dsaf_tbl_tcam_mcast_pul - tbl
702
- * @dsaf_id: dsa fabric id
698
+ * @dsaf_dev: dsa fabric id
703699 */
704700 static void hns_dsaf_tbl_tcam_mcast_pul(struct dsaf_device *dsaf_dev)
705701 {
....@@ -714,7 +710,7 @@
714710
715711 /**
716712 * hns_dsaf_tbl_line_pul - tbl
717
- * @dsaf_id: dsa fabric id
713
+ * @dsaf_dev: dsa fabric id
718714 */
719715 static void hns_dsaf_tbl_line_pul(struct dsaf_device *dsaf_dev)
720716 {
....@@ -729,7 +725,7 @@
729725
730726 /**
731727 * hns_dsaf_tbl_tcam_data_mcast_pul - tbl
732
- * @dsaf_id: dsa fabric id
728
+ * @dsaf_dev: dsa fabric id
733729 */
734730 static void hns_dsaf_tbl_tcam_data_mcast_pul(
735731 struct dsaf_device *dsaf_dev)
....@@ -747,7 +743,7 @@
747743
748744 /**
749745 * hns_dsaf_tbl_tcam_data_ucast_pul - tbl
750
- * @dsaf_id: dsa fabric id
746
+ * @dsaf_dev: dsa fabric id
751747 */
752748 static void hns_dsaf_tbl_tcam_data_ucast_pul(
753749 struct dsaf_device *dsaf_dev)
....@@ -772,8 +768,7 @@
772768
773769 /**
774770 * hns_dsaf_tbl_stat_en - tbl
775
- * @dsaf_id: dsa fabric id
776
- * @ptbl_stat_en: addr
771
+ * @dsaf_dev: dsa fabric id
777772 */
778773 static void hns_dsaf_tbl_stat_en(struct dsaf_device *dsaf_dev)
779774 {
....@@ -789,7 +784,7 @@
789784
790785 /**
791786 * hns_dsaf_rocee_bp_en - rocee back press enable
792
- * @dsaf_id: dsa fabric id
787
+ * @dsaf_dev: dsa fabric id
793788 */
794789 static void hns_dsaf_rocee_bp_en(struct dsaf_device *dsaf_dev)
795790 {
....@@ -856,9 +851,9 @@
856851
857852 /**
858853 * hns_dsaf_single_line_tbl_cfg - INT
859
- * @dsaf_id: dsa fabric id
860
- * @address:
861
- * @ptbl_line:
854
+ * @dsaf_dev: dsa fabric id
855
+ * @address: the address
856
+ * @ptbl_line: the line
862857 */
863858 static void hns_dsaf_single_line_tbl_cfg(
864859 struct dsaf_device *dsaf_dev,
....@@ -880,9 +875,10 @@
880875
881876 /**
882877 * hns_dsaf_tcam_uc_cfg - INT
883
- * @dsaf_id: dsa fabric id
884
- * @address,
885
- * @ptbl_tcam_data,
878
+ * @dsaf_dev: dsa fabric id
879
+ * @address: the address
880
+ * @ptbl_tcam_data: the data
881
+ * @ptbl_tcam_ucast: unicast
886882 */
887883 static void hns_dsaf_tcam_uc_cfg(
888884 struct dsaf_device *dsaf_dev, u32 address,
....@@ -908,7 +904,8 @@
908904 * @dsaf_dev: dsa fabric device struct pointer
909905 * @address: tcam index
910906 * @ptbl_tcam_data: tcam data struct pointer
911
- * @ptbl_tcam_mcast: tcam mask struct pointer, it must be null for HNSv1
907
+ * @ptbl_tcam_mask: tcam mask struct pointer, it must be null for HNSv1
908
+ * @ptbl_tcam_mcast: tcam data struct pointer
912909 */
913910 static void hns_dsaf_tcam_mc_cfg(
914911 struct dsaf_device *dsaf_dev, u32 address,
....@@ -937,8 +934,10 @@
937934 /**
938935 * hns_dsaf_tcam_uc_cfg_vague - INT
939936 * @dsaf_dev: dsa fabric device struct pointer
940
- * @address,
941
- * @ptbl_tcam_data,
937
+ * @address: the address
938
+ * @tcam_data: the data
939
+ * @tcam_mask: the mask
940
+ * @tcam_uc: the unicast data
942941 */
943942 static void hns_dsaf_tcam_uc_cfg_vague(struct dsaf_device *dsaf_dev,
944943 u32 address,
....@@ -964,10 +963,10 @@
964963 /**
965964 * hns_dsaf_tcam_mc_cfg_vague - INT
966965 * @dsaf_dev: dsa fabric device struct pointer
967
- * @address,
968
- * @ptbl_tcam_data,
969
- * @ptbl_tcam_mask
970
- * @ptbl_tcam_mcast
966
+ * @address: the address
967
+ * @tcam_data: the data
968
+ * @tcam_mask: the mask
969
+ * @tcam_mc: the multicast data
971970 */
972971 static void hns_dsaf_tcam_mc_cfg_vague(struct dsaf_device *dsaf_dev,
973972 u32 address,
....@@ -992,8 +991,8 @@
992991
993992 /**
994993 * hns_dsaf_tcam_mc_invld - INT
995
- * @dsaf_id: dsa fabric id
996
- * @address
994
+ * @dsaf_dev: dsa fabric id
995
+ * @address: the address
997996 */
998997 static void hns_dsaf_tcam_mc_invld(struct dsaf_device *dsaf_dev, u32 address)
999998 {
....@@ -1028,10 +1027,10 @@
10281027
10291028 /**
10301029 * hns_dsaf_tcam_uc_get - INT
1031
- * @dsaf_id: dsa fabric id
1032
- * @address
1033
- * @ptbl_tcam_data
1034
- * @ptbl_tcam_ucast
1030
+ * @dsaf_dev: dsa fabric id
1031
+ * @address: the address
1032
+ * @ptbl_tcam_data: the data
1033
+ * @ptbl_tcam_ucast: unicast
10351034 */
10361035 static void hns_dsaf_tcam_uc_get(
10371036 struct dsaf_device *dsaf_dev, u32 address,
....@@ -1081,10 +1080,10 @@
10811080
10821081 /**
10831082 * hns_dsaf_tcam_mc_get - INT
1084
- * @dsaf_id: dsa fabric id
1085
- * @address
1086
- * @ptbl_tcam_data
1087
- * @ptbl_tcam_ucast
1083
+ * @dsaf_dev: dsa fabric id
1084
+ * @address: the address
1085
+ * @ptbl_tcam_data: the data
1086
+ * @ptbl_tcam_mcast: tcam multicast data
10881087 */
10891088 static void hns_dsaf_tcam_mc_get(
10901089 struct dsaf_device *dsaf_dev, u32 address,
....@@ -1131,7 +1130,7 @@
11311130
11321131 /**
11331132 * hns_dsaf_tbl_line_init - INT
1134
- * @dsaf_id: dsa fabric id
1133
+ * @dsaf_dev: dsa fabric id
11351134 */
11361135 static void hns_dsaf_tbl_line_init(struct dsaf_device *dsaf_dev)
11371136 {
....@@ -1145,7 +1144,7 @@
11451144
11461145 /**
11471146 * hns_dsaf_tbl_tcam_init - INT
1148
- * @dsaf_id: dsa fabric id
1147
+ * @dsaf_dev: dsa fabric id
11491148 */
11501149 static void hns_dsaf_tbl_tcam_init(struct dsaf_device *dsaf_dev)
11511150 {
....@@ -1160,7 +1159,9 @@
11601159
11611160 /**
11621161 * hns_dsaf_pfc_en_cfg - dsaf pfc pause cfg
1163
- * @mac_cb: mac contrl block
1162
+ * @dsaf_dev: dsa fabric id
1163
+ * @mac_id: mac contrl block
1164
+ * @tc_en: traffic class
11641165 */
11651166 static void hns_dsaf_pfc_en_cfg(struct dsaf_device *dsaf_dev,
11661167 int mac_id, int tc_en)
....@@ -1213,8 +1214,7 @@
12131214
12141215 /**
12151216 * hns_dsaf_tbl_tcam_init - INT
1216
- * @dsaf_id: dsa fabric id
1217
- * @dsaf_mode
1217
+ * @dsaf_dev: dsa fabric id
12181218 */
12191219 static void hns_dsaf_comm_init(struct dsaf_device *dsaf_dev)
12201220 {
....@@ -1267,7 +1267,7 @@
12671267
12681268 /**
12691269 * hns_dsaf_inode_init - INT
1270
- * @dsaf_id: dsa fabric id
1270
+ * @dsaf_dev: dsa fabric id
12711271 */
12721272 static void hns_dsaf_inode_init(struct dsaf_device *dsaf_dev)
12731273 {
....@@ -1319,7 +1319,7 @@
13191319
13201320 /**
13211321 * hns_dsaf_sbm_init - INT
1322
- * @dsaf_id: dsa fabric id
1322
+ * @dsaf_dev: dsa fabric id
13231323 */
13241324 static int hns_dsaf_sbm_init(struct dsaf_device *dsaf_dev)
13251325 {
....@@ -1373,7 +1373,7 @@
13731373
13741374 /**
13751375 * hns_dsaf_tbl_init - INT
1376
- * @dsaf_id: dsa fabric id
1376
+ * @dsaf_dev: dsa fabric id
13771377 */
13781378 static void hns_dsaf_tbl_init(struct dsaf_device *dsaf_dev)
13791379 {
....@@ -1385,7 +1385,7 @@
13851385
13861386 /**
13871387 * hns_dsaf_voq_init - INT
1388
- * @dsaf_id: dsa fabric id
1388
+ * @dsaf_dev: dsa fabric id
13891389 */
13901390 static void hns_dsaf_voq_init(struct dsaf_device *dsaf_dev)
13911391 {
....@@ -1439,7 +1439,7 @@
14391439 /**
14401440 * hns_dsaf_init - init dsa fabric
14411441 * @dsaf_dev: dsa fabric device struct pointer
1442
- * retuen 0 - success , negative --fail
1442
+ * return 0 - success , negative --fail
14431443 */
14441444 static int hns_dsaf_init(struct dsaf_device *dsaf_dev)
14451445 {
....@@ -1602,8 +1602,6 @@
16021602 DSAF_TBL_TCAM_KEY_VLAN_S, vlan_id);
16031603 dsaf_set_field(mac_key->low.bits.port_vlan, DSAF_TBL_TCAM_KEY_PORT_M,
16041604 DSAF_TBL_TCAM_KEY_PORT_S, port);
1605
-
1606
- mac_key->low.bits.port_vlan = le16_to_cpu(mac_key->low.bits.port_vlan);
16071605 }
16081606
16091607 /**
....@@ -1663,8 +1661,8 @@
16631661 /* default config dvc to 0 */
16641662 mac_data.tbl_ucast_dvc = 0;
16651663 mac_data.tbl_ucast_out_port = mac_entry->port_num;
1666
- tcam_data.tbl_tcam_data_high = cpu_to_le32(mac_key.high.val);
1667
- tcam_data.tbl_tcam_data_low = cpu_to_le32(mac_key.low.val);
1664
+ tcam_data.tbl_tcam_data_high = mac_key.high.val;
1665
+ tcam_data.tbl_tcam_data_low = mac_key.low.val;
16681666
16691667 hns_dsaf_tcam_uc_cfg(dsaf_dev, entry_index, &tcam_data, &mac_data);
16701668
....@@ -1730,7 +1728,7 @@
17301728 u8 port_num, u8 *mask, u8 *addr)
17311729 {
17321730 if (MAC_IS_BROADCAST(addr))
1733
- memset(mask, 0xff, ETH_ALEN);
1731
+ eth_broadcast_addr(mask);
17341732 else
17351733 memcpy(mask, dsaf_dev->mac_cb[port_num]->mc_mask, ETH_ALEN);
17361734 }
....@@ -1786,9 +1784,6 @@
17861784 0xff,
17871785 mc_mask);
17881786
1789
- mask_key.high.val = le32_to_cpu(mask_key.high.val);
1790
- mask_key.low.val = le32_to_cpu(mask_key.low.val);
1791
-
17921787 pmask_key = (struct dsaf_tbl_tcam_data *)(&mask_key);
17931788 }
17941789
....@@ -1840,8 +1835,8 @@
18401835 dsaf_dev->ae_dev.name, mac_key.high.val,
18411836 mac_key.low.val, entry_index);
18421837
1843
- tcam_data.tbl_tcam_data_high = cpu_to_le32(mac_key.high.val);
1844
- tcam_data.tbl_tcam_data_low = cpu_to_le32(mac_key.low.val);
1838
+ tcam_data.tbl_tcam_data_high = mac_key.high.val;
1839
+ tcam_data.tbl_tcam_data_low = mac_key.low.val;
18451840
18461841 /* config mc entry with mask */
18471842 hns_dsaf_tcam_mc_cfg(dsaf_dev, entry_index, &tcam_data,
....@@ -1956,9 +1951,6 @@
19561951 /* config key mask */
19571952 hns_dsaf_set_mac_key(dsaf_dev, &mask_key, 0x00, 0xff, mc_mask);
19581953
1959
- mask_key.high.val = le32_to_cpu(mask_key.high.val);
1960
- mask_key.low.val = le32_to_cpu(mask_key.low.val);
1961
-
19621954 pmask_key = (struct dsaf_tbl_tcam_data *)(&mask_key);
19631955 }
19641956
....@@ -2012,8 +2004,8 @@
20122004 soft_mac_entry += entry_index;
20132005 soft_mac_entry->index = DSAF_INVALID_ENTRY_IDX;
20142006 } else { /* not zero, just del port, update */
2015
- tcam_data.tbl_tcam_data_high = cpu_to_le32(mac_key.high.val);
2016
- tcam_data.tbl_tcam_data_low = cpu_to_le32(mac_key.low.val);
2007
+ tcam_data.tbl_tcam_data_high = mac_key.high.val;
2008
+ tcam_data.tbl_tcam_data_low = mac_key.low.val;
20172009
20182010 hns_dsaf_tcam_mc_cfg(dsaf_dev, entry_index,
20192011 &tcam_data,
....@@ -2111,7 +2103,7 @@
21112103
21122104 /**
21132105 * hns_dsaf_free_dev - free dev mem
2114
- * @dev: struct device pointer
2106
+ * @dsaf_dev: struct device pointer
21152107 */
21162108 static void hns_dsaf_free_dev(struct dsaf_device *dsaf_dev)
21172109 {
....@@ -2120,9 +2112,9 @@
21202112
21212113 /**
21222114 * dsaf_pfc_unit_cnt - set pfc unit count
2123
- * @dsaf_id: dsa fabric id
2124
- * @pport_rate: value array
2125
- * @pdsaf_pfc_unit_cnt: value array
2115
+ * @dsaf_dev: dsa fabric id
2116
+ * @mac_id: id in use
2117
+ * @rate: value array
21262118 */
21272119 static void hns_dsaf_pfc_unit_cnt(struct dsaf_device *dsaf_dev, int mac_id,
21282120 enum dsaf_port_rate_mode rate)
....@@ -2151,8 +2143,9 @@
21512143
21522144 /**
21532145 * dsaf_port_work_rate_cfg - fifo
2154
- * @dsaf_id: dsa fabric id
2155
- * @xge_ge_work_mode
2146
+ * @dsaf_dev: dsa fabric id
2147
+ * @mac_id: mac contrl block
2148
+ * @rate_mode: value array
21562149 */
21572150 static void
21582151 hns_dsaf_port_work_rate_cfg(struct dsaf_device *dsaf_dev, int mac_id,
....@@ -2265,7 +2258,8 @@
22652258
22662259 /**
22672260 *hns_dsaf_get_regs - dump dsaf regs
2268
- *@dsaf_dev: dsaf device
2261
+ *@ddev: dsaf device
2262
+ *@port: port
22692263 *@data:data for value of regs
22702264 */
22712265 void hns_dsaf_get_regs(struct dsaf_device *ddev, u32 port, void *data)
....@@ -2702,6 +2696,7 @@
27022696
27032697 /**
27042698 *hns_dsaf_get_sset_count - get dsaf string set count
2699
+ *@dsaf_dev: dsaf device
27052700 *@stringset: type of values in data
27062701 *return dsaf string name count
27072702 */
....@@ -2723,6 +2718,7 @@
27232718 *@stringset:srting set index
27242719 *@data:strings name value
27252720 *@port:port index
2721
+ *@dsaf_dev: dsaf device
27262722 */
27272723 void hns_dsaf_get_strings(int stringset, u8 *data, int port,
27282724 struct dsaf_device *dsaf_dev)
....@@ -2955,7 +2951,7 @@
29552951 /**
29562952 * dsaf_probe - probo dsaf dev
29572953 * @pdev: dasf platform device
2958
- * retuen 0 - success , negative --fail
2954
+ * return 0 - success , negative --fail
29592955 */
29602956 static int hns_dsaf_probe(struct platform_device *pdev)
29612957 {
....@@ -3050,8 +3046,8 @@
30503046 /**
30513047 * hns_dsaf_roce_reset - reset dsaf and roce
30523048 * @dsaf_fwnode: Pointer to framework node for the dasf
3053
- * @enable: false - request reset , true - drop reset
3054
- * retuen 0 - success , negative -fail
3049
+ * @dereset: false - request reset , true - drop reset
3050
+ * return 0 - success , negative -fail
30553051 */
30563052 int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset)
30573053 {
....@@ -3061,7 +3057,7 @@
30613057 u32 sl;
30623058 u32 credit;
30633059 int i;
3064
- const u32 port_map[DSAF_ROCE_CREDIT_CHN][DSAF_ROCE_CHAN_MODE_NUM] = {
3060
+ static const u32 port_map[DSAF_ROCE_CREDIT_CHN][DSAF_ROCE_CHAN_MODE_NUM] = {
30653061 {DSAF_ROCE_PORT_0, DSAF_ROCE_PORT_0, DSAF_ROCE_PORT_0},
30663062 {DSAF_ROCE_PORT_1, DSAF_ROCE_PORT_0, DSAF_ROCE_PORT_0},
30673063 {DSAF_ROCE_PORT_2, DSAF_ROCE_PORT_1, DSAF_ROCE_PORT_0},
....@@ -3071,7 +3067,7 @@
30713067 {DSAF_ROCE_PORT_5, DSAF_ROCE_PORT_3, DSAF_ROCE_PORT_1},
30723068 {DSAF_ROCE_PORT_5, DSAF_ROCE_PORT_3, DSAF_ROCE_PORT_1},
30733069 };
3074
- const u32 sl_map[DSAF_ROCE_CREDIT_CHN][DSAF_ROCE_CHAN_MODE_NUM] = {
3070
+ static const u32 sl_map[DSAF_ROCE_CREDIT_CHN][DSAF_ROCE_CHAN_MODE_NUM] = {
30753071 {DSAF_ROCE_SL_0, DSAF_ROCE_SL_0, DSAF_ROCE_SL_0},
30763072 {DSAF_ROCE_SL_0, DSAF_ROCE_SL_1, DSAF_ROCE_SL_1},
30773073 {DSAF_ROCE_SL_0, DSAF_ROCE_SL_0, DSAF_ROCE_SL_2},