2 * Copyright (C) 2013 Realtek Semiconductor Corp.
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
11 * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $
13 * Purpose : RTL8367C switch high-level API for RTL8367C
14 * Feature : Flow control related functions
18 #include <rtl8367c_asicdrv_fc.h>
20 * rtl8367c_setAsicFlowControlSelect
22 * Set system flow control type
24 * select - System flow control type 1: Ingress flow control 0:Egress flow control
29 * RT_ERR_SMI - SMI access error
33 ret_t
rtl8367c_setAsicFlowControlSelect(rtk_uint32 select
)
35 return rtl8367c_setAsicRegBit(RTL8367C_REG_FLOWCTRL_CTRL0
, RTL8367C_FLOWCTRL_TYPE_OFFSET
, select
);
38 * rtl8367c_getAsicFlowControlSelect
40 * Get system flow control type
42 * pSelect - System flow control type 1: Ingress flow control 0:Egress flow control
47 * RT_ERR_SMI - SMI access error
51 ret_t
rtl8367c_getAsicFlowControlSelect(rtk_uint32
*pSelect
)
53 return rtl8367c_getAsicRegBit(RTL8367C_REG_FLOWCTRL_CTRL0
, RTL8367C_FLOWCTRL_TYPE_OFFSET
, pSelect
);
56 * rtl8367c_setAsicFlowControlJumboMode
58 * Set Jumbo threhsold for flow control
60 * enabled - Jumbo mode flow control 1: Enable 0:Disable
65 * RT_ERR_SMI - SMI access error
69 ret_t
rtl8367c_setAsicFlowControlJumboMode(rtk_uint32 enabled
)
71 return rtl8367c_setAsicRegBit(RTL8367C_REG_FLOWCTRL_JUMBO_SIZE
, RTL8367C_JUMBO_MODE_OFFSET
, enabled
);
74 * rtl8367c_getAsicFlowControlJumboMode
76 * Get Jumbo threhsold for flow control
78 * pEnabled - Jumbo mode flow control 1: Enable 0:Disable
83 * RT_ERR_SMI - SMI access error
87 ret_t
rtl8367c_getAsicFlowControlJumboMode(rtk_uint32
* pEnabled
)
89 return rtl8367c_getAsicRegBit(RTL8367C_REG_FLOWCTRL_JUMBO_SIZE
, RTL8367C_JUMBO_MODE_OFFSET
, pEnabled
);
92 * rtl8367c_setAsicFlowControlJumboModeSize
94 * Set Jumbo size for Jumbo mode flow control
96 * size - Jumbo size 0:3Kbytes 1:4Kbytes 2:6Kbytes 3:9Kbytes
100 * RT_ERR_OK - Success
101 * RT_ERR_SMI - SMI access error
102 * RT_ERR_OUT_OF_RANGE - input parameter out of range
106 ret_t
rtl8367c_setAsicFlowControlJumboModeSize(rtk_uint32 size
)
108 if(size
>= FC_JUMBO_SIZE_END
)
109 return RT_ERR_OUT_OF_RANGE
;
111 return rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SIZE
, RTL8367C_JUMBO_SIZE_MASK
, size
);
114 * rtl8367c_getAsicFlowControlJumboModeSize
116 * Get Jumbo size for Jumbo mode flow control
118 * pSize - Jumbo size 0:3Kbytes 1:4Kbytes 2:6Kbytes 3:9Kbytes
122 * RT_ERR_OK - Success
123 * RT_ERR_SMI - SMI access error
127 ret_t
rtl8367c_getAsicFlowControlJumboModeSize(rtk_uint32
* pSize
)
129 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SIZE
, RTL8367C_JUMBO_SIZE_MASK
, pSize
);
133 * rtl8367c_setAsicFlowControlQueueEgressEnable
135 * Set flow control ability for each queue
137 * port - Physical port number (0~7)
139 * enabled - 1: enabled, 0: disabled
143 * RT_ERR_OK - Success
144 * RT_ERR_SMI - SMI access error
145 * RT_ERR_PORT_ID - Invalid port number
146 * RT_ERR_QUEUE_ID - Invalid queue id
150 ret_t
rtl8367c_setAsicFlowControlQueueEgressEnable(rtk_uint32 port
, rtk_uint32 qid
, rtk_uint32 enabled
)
152 if(port
> RTL8367C_PORTIDMAX
)
153 return RT_ERR_PORT_ID
;
155 if(qid
> RTL8367C_QIDMAX
)
156 return RT_ERR_QUEUE_ID
;
158 return rtl8367c_setAsicRegBit(RTL8367C_FLOWCRTL_EGRESS_QUEUE_ENABLE_REG(port
), RTL8367C_FLOWCRTL_EGRESS_QUEUE_ENABLE_REG_OFFSET(port
)+ qid
, enabled
);
161 * rtl8367c_getAsicFlowControlQueueEgressEnable
163 * Get flow control ability for each queue
165 * port - Physical port number (0~7)
167 * pEnabled - 1: enabled, 0: disabled
171 * RT_ERR_OK - Success
172 * RT_ERR_SMI - SMI access error
173 * RT_ERR_PORT_ID - Invalid port number
174 * RT_ERR_QUEUE_ID - Invalid queue id
178 ret_t
rtl8367c_getAsicFlowControlQueueEgressEnable(rtk_uint32 port
, rtk_uint32 qid
, rtk_uint32
* pEnabled
)
180 if(port
> RTL8367C_PORTIDMAX
)
181 return RT_ERR_PORT_ID
;
183 if(qid
> RTL8367C_QIDMAX
)
184 return RT_ERR_QUEUE_ID
;
186 return rtl8367c_getAsicRegBit(RTL8367C_FLOWCRTL_EGRESS_QUEUE_ENABLE_REG(port
), RTL8367C_FLOWCRTL_EGRESS_QUEUE_ENABLE_REG_OFFSET(port
)+ qid
, pEnabled
);
189 * rtl8367c_setAsicFlowControlDropAll
191 * Set system-based drop parameters
193 * dropall - Whole system drop threshold
197 * RT_ERR_OK - Success
198 * RT_ERR_SMI - SMI access error
199 * RT_ERR_OUT_OF_RANGE - input parameter out of range
203 ret_t
rtl8367c_setAsicFlowControlDropAll(rtk_uint32 dropall
)
205 if(dropall
>= RTL8367C_PAGE_NUMBER
)
206 return RT_ERR_OUT_OF_RANGE
;
208 return rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_CTRL0
, RTL8367C_DROP_ALL_THRESHOLD_MASK
, dropall
);
211 * rtl8367c_getAsicFlowControlDropAll
213 * Get system-based drop parameters
215 * pDropall - Whole system drop threshold
219 * RT_ERR_OK - Success
220 * RT_ERR_SMI - SMI access error
224 ret_t
rtl8367c_getAsicFlowControlDropAll(rtk_uint32
* pDropall
)
226 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_CTRL0
, RTL8367C_DROP_ALL_THRESHOLD_MASK
, pDropall
);
229 * rtl8367c_setAsicFlowControlPauseAll
231 * Set system-based all ports enable flow control parameters
233 * threshold - Whole system pause all threshold
237 * RT_ERR_OK - Success
238 * RT_ERR_SMI - SMI access error
239 * RT_ERR_OUT_OF_RANGE - input parameter out of range
243 ret_t
rtl8367c_setAsicFlowControlPauseAllThreshold(rtk_uint32 threshold
)
245 if(threshold
>= RTL8367C_PAGE_NUMBER
)
246 return RT_ERR_OUT_OF_RANGE
;
248 return rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_ALL_ON
, RTL8367C_FLOWCTRL_ALL_ON_THRESHOLD_MASK
, threshold
);
251 * rtl8367c_getAsicFlowControlPauseAllThreshold
253 * Get system-based all ports enable flow control parameters
255 * pThreshold - Whole system pause all threshold
259 * RT_ERR_OK - Success
260 * RT_ERR_SMI - SMI access error
264 ret_t
rtl8367c_getAsicFlowControlPauseAllThreshold(rtk_uint32
*pThreshold
)
266 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_ALL_ON
, RTL8367C_FLOWCTRL_ALL_ON_THRESHOLD_MASK
, pThreshold
);
269 * rtl8367c_setAsicFlowControlSystemThreshold
271 * Set system-based flow control parameters
273 * onThreshold - Flow control turn ON threshold
274 * offThreshold - Flow control turn OFF threshold
278 * RT_ERR_OK - Success
279 * RT_ERR_SMI - SMI access error
280 * RT_ERR_OUT_OF_RANGE - input parameter out of range
284 ret_t
rtl8367c_setAsicFlowControlSystemThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
288 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
289 return RT_ERR_OUT_OF_RANGE
;
291 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_SYS_OFF
, RTL8367C_FLOWCTRL_SYS_OFF_MASK
, offThreshold
);
293 if(retVal
!= RT_ERR_OK
)
296 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_SYS_ON
, RTL8367C_FLOWCTRL_SYS_ON_MASK
, onThreshold
);
301 * rtl8367c_getAsicFlowControlSystemThreshold
303 * Get system-based flow control parameters
305 * pOnThreshold - Flow control turn ON threshold
306 * pOffThreshold - Flow control turn OFF threshold
310 * RT_ERR_OK - Success
311 * RT_ERR_SMI - SMI access error
315 ret_t
rtl8367c_getAsicFlowControlSystemThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
319 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_SYS_OFF
, RTL8367C_FLOWCTRL_SYS_OFF_MASK
, pOffThreshold
);
321 if(retVal
!= RT_ERR_OK
)
324 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_SYS_ON
, RTL8367C_FLOWCTRL_SYS_ON_MASK
, pOnThreshold
);
329 * rtl8367c_setAsicFlowControlSharedThreshold
331 * Set share-based flow control parameters
333 * onThreshold - Flow control turn ON threshold
334 * offThreshold - Flow control turn OFF threshold
338 * RT_ERR_OK - Success
339 * RT_ERR_SMI - SMI access error
340 * RT_ERR_OUT_OF_RANGE - input parameter out of range
344 ret_t
rtl8367c_setAsicFlowControlSharedThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
348 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
349 return RT_ERR_OUT_OF_RANGE
;
351 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_SHARE_OFF
, RTL8367C_FLOWCTRL_SHARE_OFF_MASK
, offThreshold
);
353 if(retVal
!= RT_ERR_OK
)
356 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_SHARE_ON
, RTL8367C_FLOWCTRL_SHARE_ON_MASK
, onThreshold
);
361 * rtl8367c_getAsicFlowControlSharedThreshold
363 * Get share-based flow control parameters
365 * pOnThreshold - Flow control turn ON threshold
366 * pOffThreshold - Flow control turn OFF threshold
370 * RT_ERR_OK - Success
371 * RT_ERR_SMI - SMI access error
375 ret_t
rtl8367c_getAsicFlowControlSharedThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
379 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_SHARE_OFF
, RTL8367C_FLOWCTRL_SHARE_OFF_MASK
, pOffThreshold
);
381 if(retVal
!= RT_ERR_OK
)
384 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_SHARE_ON
, RTL8367C_FLOWCTRL_SHARE_ON_MASK
, pOnThreshold
);
389 * rtl8367c_setAsicFlowControlPortThreshold
391 * Set Port-based flow control parameters
393 * onThreshold - Flow control turn ON threshold
394 * offThreshold - Flow control turn OFF threshold
398 * RT_ERR_OK - Success
399 * RT_ERR_SMI - SMI access error
400 * RT_ERR_OUT_OF_RANGE - input parameter out of range
404 ret_t
rtl8367c_setAsicFlowControlPortThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
408 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
409 return RT_ERR_OUT_OF_RANGE
;
411 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_OFF
, RTL8367C_FLOWCTRL_PORT_OFF_MASK
, offThreshold
);
413 if(retVal
!= RT_ERR_OK
)
416 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_ON
, RTL8367C_FLOWCTRL_PORT_ON_MASK
, onThreshold
);
421 * rtl8367c_getAsicFlowControlPortThreshold
423 * Get Port-based flow control parameters
425 * pOnThreshold - Flow control turn ON threshold
426 * pOffThreshold - Flow control turn OFF threshold
430 * RT_ERR_OK - Success
431 * RT_ERR_SMI - SMI access error
435 ret_t
rtl8367c_getAsicFlowControlPortThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
439 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_OFF
, RTL8367C_FLOWCTRL_PORT_OFF_MASK
, pOffThreshold
);
441 if(retVal
!= RT_ERR_OK
)
444 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_ON
, RTL8367C_FLOWCTRL_PORT_ON_MASK
, pOnThreshold
);
449 * rtl8367c_setAsicFlowControlPortPrivateThreshold
451 * Set Port-private-based flow control parameters
453 * onThreshold - Flow control turn ON threshold
454 * offThreshold - Flow control turn OFF threshold
458 * RT_ERR_OK - Success
459 * RT_ERR_SMI - SMI access error
460 * RT_ERR_OUT_OF_RANGE - input parameter out of range
464 ret_t
rtl8367c_setAsicFlowControlPortPrivateThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
468 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
469 return RT_ERR_OUT_OF_RANGE
;
471 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_PRIVATE_OFF
, RTL8367C_FLOWCTRL_PORT_PRIVATE_OFF_MASK
, offThreshold
);
473 if(retVal
!= RT_ERR_OK
)
476 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_PRIVATE_ON
, RTL8367C_FLOWCTRL_PORT_PRIVATE_ON_MASK
, onThreshold
);
481 * rtl8367c_getAsicFlowControlPortPrivateThreshold
483 * Get Port-private-based flow control parameters
485 * pOnThreshold - Flow control turn ON threshold
486 * pOffThreshold - Flow control turn OFF threshold
490 * RT_ERR_OK - Success
491 * RT_ERR_SMI - SMI access error
495 ret_t
rtl8367c_getAsicFlowControlPortPrivateThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
499 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_PRIVATE_OFF
, RTL8367C_FLOWCTRL_PORT_PRIVATE_OFF_MASK
, pOffThreshold
);
501 if(retVal
!= RT_ERR_OK
)
504 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_PRIVATE_ON
, RTL8367C_FLOWCTRL_PORT_PRIVATE_ON_MASK
, pOnThreshold
);
509 * rtl8367c_setAsicFlowControlSystemDropThreshold
511 * Set system-based drop parameters
513 * onThreshold - Drop turn ON threshold
514 * offThreshold - Drop turn OFF threshold
518 * RT_ERR_OK - Success
519 * RT_ERR_SMI - SMI access error
520 * RT_ERR_OUT_OF_RANGE - input parameter out of range
524 ret_t
rtl8367c_setAsicFlowControlSystemDropThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
528 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
529 return RT_ERR_OUT_OF_RANGE
;
531 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SYS_OFF
, RTL8367C_FLOWCTRL_FCOFF_SYS_OFF_MASK
, offThreshold
);
533 if(retVal
!= RT_ERR_OK
)
536 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SYS_ON
, RTL8367C_FLOWCTRL_FCOFF_SYS_ON_MASK
, onThreshold
);
541 * rtl8367c_getAsicFlowControlSystemDropThreshold
543 * Get system-based drop parameters
545 * pOnThreshold - Drop turn ON threshold
546 * pOffThreshold - Drop turn OFF threshold
550 * RT_ERR_OK - Success
551 * RT_ERR_SMI - SMI access error
555 ret_t
rtl8367c_getAsicFlowControlSystemDropThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
559 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SYS_OFF
, RTL8367C_FLOWCTRL_FCOFF_SYS_OFF_MASK
, pOffThreshold
);
561 if(retVal
!= RT_ERR_OK
)
564 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SYS_ON
, RTL8367C_FLOWCTRL_FCOFF_SYS_ON_MASK
, pOnThreshold
);
569 * rtl8367c_setAsicFlowControlSharedDropThreshold
571 * Set share-based fdrop parameters
573 * onThreshold - Drop turn ON threshold
574 * offThreshold - Drop turn OFF threshold
578 * RT_ERR_OK - Success
579 * RT_ERR_SMI - SMI access error
580 * RT_ERR_OUT_OF_RANGE - input parameter out of range
584 ret_t
rtl8367c_setAsicFlowControlSharedDropThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
588 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
589 return RT_ERR_OUT_OF_RANGE
;
591 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SHARE_OFF
, RTL8367C_FLOWCTRL_FCOFF_SHARE_OFF_MASK
, offThreshold
);
592 if(retVal
!= RT_ERR_OK
)
595 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SHARE_ON
, RTL8367C_FLOWCTRL_FCOFF_SHARE_ON_MASK
, onThreshold
);
600 * rtl8367c_getAsicFlowControlSharedDropThreshold
602 * Get share-based fdrop parameters
604 * pOnThreshold - Drop turn ON threshold
605 * pOffThreshold - Drop turn OFF threshold
609 * RT_ERR_OK - Success
610 * RT_ERR_SMI - SMI access error
614 ret_t
rtl8367c_getAsicFlowControlSharedDropThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
618 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SHARE_OFF
, RTL8367C_FLOWCTRL_FCOFF_SHARE_OFF_MASK
, pOffThreshold
);
619 if(retVal
!= RT_ERR_OK
)
622 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_SHARE_ON
, RTL8367C_FLOWCTRL_FCOFF_SHARE_ON_MASK
, pOnThreshold
);
627 * rtl8367c_setAsicFlowControlPortDropThreshold
629 * Set Port-based drop parameters
631 * onThreshold - Drop turn ON threshold
632 * offThreshold - Drop turn OFF threshold
636 * RT_ERR_OK - Success
637 * RT_ERR_SMI - SMI access error
638 * RT_ERR_OUT_OF_RANGE - input parameter out of range
642 ret_t
rtl8367c_setAsicFlowControlPortDropThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
646 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
647 return RT_ERR_OUT_OF_RANGE
;
649 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_OFF
, RTL8367C_FLOWCTRL_FCOFF_PORT_OFF_MASK
, offThreshold
);
651 if(retVal
!= RT_ERR_OK
)
654 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_ON
, RTL8367C_FLOWCTRL_FCOFF_PORT_ON_MASK
, onThreshold
);
659 * rtl8367c_getAsicFlowControlPortDropThreshold
661 * Get Port-based drop parameters
663 * pOnThreshold - Drop turn ON threshold
664 * pOffThreshold - Drop turn OFF threshold
668 * RT_ERR_OK - Success
669 * RT_ERR_SMI - SMI access error
673 ret_t
rtl8367c_getAsicFlowControlPortDropThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
677 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_OFF
, RTL8367C_FLOWCTRL_FCOFF_PORT_OFF_MASK
, pOffThreshold
);
678 if(retVal
!= RT_ERR_OK
)
681 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_ON
, RTL8367C_FLOWCTRL_FCOFF_PORT_ON_MASK
, pOnThreshold
);
686 * rtl8367c_setAsicFlowControlPortPrivateDropThreshold
688 * Set Port-private-based drop parameters
690 * onThreshold - Drop turn ON threshold
691 * offThreshold - Drop turn OFF threshold
695 * RT_ERR_OK - Success
696 * RT_ERR_SMI - SMI access error
697 * RT_ERR_OUT_OF_RANGE - input parameter out of range
701 ret_t
rtl8367c_setAsicFlowControlPortPrivateDropThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
705 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
706 return RT_ERR_OUT_OF_RANGE
;
708 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_PRIVATE_OFF
, RTL8367C_FLOWCTRL_FCOFF_PORT_PRIVATE_OFF_MASK
, offThreshold
);
710 if(retVal
!= RT_ERR_OK
)
713 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_PRIVATE_ON
, RTL8367C_FLOWCTRL_FCOFF_PORT_PRIVATE_ON_MASK
, onThreshold
);
718 * rtl8367c_getAsicFlowControlPortPrivateDropThreshold
720 * Get Port-private-based drop parameters
722 * pOnThreshold - Drop turn ON threshold
723 * pOffThreshold - Drop turn OFF threshold
727 * RT_ERR_OK - Success
728 * RT_ERR_SMI - SMI access error
732 ret_t
rtl8367c_getAsicFlowControlPortPrivateDropThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
736 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_PRIVATE_OFF
, RTL8367C_FLOWCTRL_FCOFF_PORT_PRIVATE_OFF_MASK
, pOffThreshold
);
737 if(retVal
!= RT_ERR_OK
)
740 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_FCOFF_PORT_PRIVATE_ON
, RTL8367C_FLOWCTRL_FCOFF_PORT_PRIVATE_ON_MASK
, pOnThreshold
);
745 * rtl8367c_setAsicFlowControlSystemJumboThreshold
747 * Set Jumbo system-based flow control parameters
749 * onThreshold - Flow control turn ON threshold
750 * offThreshold - Flow control turn OFF threshold
754 * RT_ERR_OK - Success
755 * RT_ERR_SMI - SMI access error
756 * RT_ERR_OUT_OF_RANGE - input parameter out of range
760 ret_t
rtl8367c_setAsicFlowControlSystemJumboThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
764 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
765 return RT_ERR_OUT_OF_RANGE
;
767 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SYS_OFF
, RTL8367C_FLOWCTRL_JUMBO_SYS_OFF_MASK
, offThreshold
);
769 if(retVal
!= RT_ERR_OK
)
772 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SYS_ON
, RTL8367C_FLOWCTRL_JUMBO_SYS_ON_MASK
, onThreshold
);
777 * rtl8367c_getAsicFlowControlSystemJumboThreshold
779 * Get Jumbo system-based flow control parameters
781 * pOnThreshold - Flow control turn ON threshold
782 * pOffThreshold - Flow control turn OFF threshold
786 * RT_ERR_OK - Success
787 * RT_ERR_SMI - SMI access error
791 ret_t
rtl8367c_getAsicFlowControlSystemJumboThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
795 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SYS_OFF
, RTL8367C_FLOWCTRL_JUMBO_SYS_OFF_MASK
, pOffThreshold
);
797 if(retVal
!= RT_ERR_OK
)
800 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SYS_ON
, RTL8367C_FLOWCTRL_JUMBO_SYS_ON_MASK
, pOnThreshold
);
805 * rtl8367c_setAsicFlowControlSharedJumboThreshold
807 * Set Jumbo share-based flow control parameters
809 * onThreshold - Flow control turn ON threshold
810 * offThreshold - Flow control turn OFF threshold
814 * RT_ERR_OK - Success
815 * RT_ERR_SMI - SMI access error
816 * RT_ERR_OUT_OF_RANGE - input parameter out of range
820 ret_t
rtl8367c_setAsicFlowControlSharedJumboThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
824 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
825 return RT_ERR_OUT_OF_RANGE
;
827 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SHARE_OFF
, RTL8367C_FLOWCTRL_JUMBO_SHARE_OFF_MASK
, offThreshold
);
829 if(retVal
!= RT_ERR_OK
)
832 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SHARE_ON
, RTL8367C_FLOWCTRL_JUMBO_SHARE_ON_MASK
, onThreshold
);
837 * rtl8367c_getAsicFlowControlSharedJumboThreshold
839 * Get Jumbo share-based flow control parameters
841 * pOnThreshold - Flow control turn ON threshold
842 * pOffThreshold - Flow control turn OFF threshold
846 * RT_ERR_OK - Success
847 * RT_ERR_SMI - SMI access error
851 ret_t
rtl8367c_getAsicFlowControlSharedJumboThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
855 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SHARE_OFF
, RTL8367C_FLOWCTRL_JUMBO_SHARE_OFF_MASK
, pOffThreshold
);
857 if(retVal
!= RT_ERR_OK
)
860 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_SHARE_ON
, RTL8367C_FLOWCTRL_JUMBO_SHARE_ON_MASK
, pOnThreshold
);
865 * rtl8367c_setAsicFlowControlPortJumboThreshold
867 * Set Jumbo Port-based flow control parameters
869 * onThreshold - Flow control turn ON threshold
870 * offThreshold - Flow control turn OFF threshold
874 * RT_ERR_OK - Success
875 * RT_ERR_SMI - SMI access error
876 * RT_ERR_OUT_OF_RANGE - input parameter out of range
880 ret_t
rtl8367c_setAsicFlowControlPortJumboThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
884 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
885 return RT_ERR_OUT_OF_RANGE
;
887 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_OFF
, RTL8367C_FLOWCTRL_JUMBO_PORT_OFF_MASK
, offThreshold
);
889 if(retVal
!= RT_ERR_OK
)
892 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_ON
, RTL8367C_FLOWCTRL_JUMBO_PORT_ON_MASK
, onThreshold
);
897 * rtl8367c_getAsicFlowControlPortJumboThreshold
899 * Get Jumbo Port-based flow control parameters
901 * pOnThreshold - Flow control turn ON threshold
902 * pOffThreshold - Flow control turn OFF threshold
906 * RT_ERR_OK - Success
907 * RT_ERR_SMI - SMI access error
911 ret_t
rtl8367c_getAsicFlowControlPortJumboThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
915 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_OFF
, RTL8367C_FLOWCTRL_JUMBO_PORT_OFF_MASK
, pOffThreshold
);
917 if(retVal
!= RT_ERR_OK
)
920 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_ON
, RTL8367C_FLOWCTRL_JUMBO_PORT_ON_MASK
, pOnThreshold
);
925 * rtl8367c_setAsicFlowControlPortPrivateJumboThreshold
927 * Set Jumbo Port-private-based flow control parameters
929 * onThreshold - Flow control turn ON threshold
930 * offThreshold - Flow control turn OFF threshold
934 * RT_ERR_OK - Success
935 * RT_ERR_SMI - SMI access error
936 * RT_ERR_OUT_OF_RANGE - input parameter out of range
940 ret_t
rtl8367c_setAsicFlowControlPortPrivateJumboThreshold(rtk_uint32 onThreshold
, rtk_uint32 offThreshold
)
944 if((onThreshold
>= RTL8367C_PAGE_NUMBER
) || (offThreshold
>= RTL8367C_PAGE_NUMBER
))
945 return RT_ERR_OUT_OF_RANGE
;
947 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_PRIVATE_OFF
, RTL8367C_FLOWCTRL_JUMBO_PORT_PRIVATE_OFF_MASK
, offThreshold
);
949 if(retVal
!= RT_ERR_OK
)
952 retVal
= rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_PRIVATE_ON
, RTL8367C_FLOWCTRL_JUMBO_PORT_PRIVATE_ON_MASK
, onThreshold
);
957 * rtl8367c_getAsicFlowControlPortPrivateJumboThreshold
959 * Get Jumbo Port-private-based flow control parameters
961 * pOnThreshold - Flow control turn ON threshold
962 * pOffThreshold - Flow control turn OFF threshold
966 * RT_ERR_OK - Success
967 * RT_ERR_SMI - SMI access error
971 ret_t
rtl8367c_getAsicFlowControlPortPrivateJumboThreshold(rtk_uint32
*pOnThreshold
, rtk_uint32
*pOffThreshold
)
975 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_PRIVATE_OFF
, RTL8367C_FLOWCTRL_JUMBO_PORT_PRIVATE_OFF_MASK
, pOffThreshold
);
977 if(retVal
!= RT_ERR_OK
)
980 retVal
= rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_JUMBO_PORT_PRIVATE_ON
, RTL8367C_FLOWCTRL_JUMBO_PORT_PRIVATE_ON_MASK
, pOnThreshold
);
988 * rtl8367c_setAsicEgressFlowControlQueueDropThreshold
990 * Set Queue-based egress flow control turn on or ingress flow control drop on threshold
993 * threshold - Queue-based flown control/drop turn ON threshold
997 * RT_ERR_OK - Success
998 * RT_ERR_SMI - SMI access error
999 * RT_ERR_OUT_OF_RANGE - input parameter out of range
1000 * RT_ERR_QUEUE_ID - Invalid queue id
1004 ret_t
rtl8367c_setAsicEgressFlowControlQueueDropThreshold(rtk_uint32 qid
, rtk_uint32 threshold
)
1006 if( threshold
>= RTL8367C_PAGE_NUMBER
)
1007 return RT_ERR_OUT_OF_RANGE
;
1009 if(qid
> RTL8367C_QIDMAX
)
1010 return RT_ERR_QUEUE_ID
;
1012 return rtl8367c_setAsicRegBits(RTL8367C_FLOWCTRL_QUEUE_DROP_ON_REG(qid
), RTL8367C_FLOWCTRL_QUEUE_DROP_ON_MASK
, threshold
);
1015 * rtl8367c_getAsicEgressFlowControlQueueDropThreshold
1017 * Get Queue-based egress flow control turn on or ingress flow control drop on threshold
1019 * qid - The queue id
1020 * pThreshold - Queue-based flown control/drop turn ON threshold
1024 * RT_ERR_OK - Success
1025 * RT_ERR_SMI - SMI access error
1026 * RT_ERR_QUEUE_ID - Invalid queue id
1030 ret_t
rtl8367c_getAsicEgressFlowControlQueueDropThreshold(rtk_uint32 qid
, rtk_uint32
*pThreshold
)
1032 if(qid
> RTL8367C_QIDMAX
)
1033 return RT_ERR_QUEUE_ID
;
1035 return rtl8367c_getAsicRegBits(RTL8367C_FLOWCTRL_QUEUE_DROP_ON_REG(qid
), RTL8367C_FLOWCTRL_QUEUE_DROP_ON_MASK
, pThreshold
);
1038 * rtl8367c_setAsicEgressFlowControlPortDropThreshold
1040 * Set port-based egress flow control turn on or ingress flow control drop on threshold
1042 * port - Physical port number (0~7)
1043 * threshold - Queue-based flown control/drop turn ON threshold
1047 * RT_ERR_OK - Success
1048 * RT_ERR_SMI - SMI access error
1049 * RT_ERR_PORT_ID - Invalid port number
1050 * RT_ERR_OUT_OF_RANGE - input parameter out of range
1054 ret_t
rtl8367c_setAsicEgressFlowControlPortDropThreshold(rtk_uint32 port
, rtk_uint32 threshold
)
1056 if(port
> RTL8367C_PORTIDMAX
)
1057 return RT_ERR_PORT_ID
;
1059 if(threshold
>= RTL8367C_PAGE_NUMBER
)
1060 return RT_ERR_OUT_OF_RANGE
;
1062 return rtl8367c_setAsicRegBits(RTL8367C_FLOWCTRL_PORT_DROP_ON_REG(port
), RTL8367C_FLOWCTRL_PORT_DROP_ON_MASK
, threshold
);
1065 * rtl8367c_setAsicEgressFlowControlPortDropThreshold
1067 * Set port-based egress flow control turn on or ingress flow control drop on threshold
1069 * port - Physical port number (0~7)
1070 * pThreshold - Queue-based flown control/drop turn ON threshold
1074 * RT_ERR_OK - Success
1075 * RT_ERR_SMI - SMI access error
1076 * RT_ERR_PORT_ID - Invalid port number
1080 ret_t
rtl8367c_getAsicEgressFlowControlPortDropThreshold(rtk_uint32 port
, rtk_uint32
*pThreshold
)
1082 if(port
> RTL8367C_PORTIDMAX
)
1083 return RT_ERR_PORT_ID
;
1085 return rtl8367c_getAsicRegBits(RTL8367C_FLOWCTRL_PORT_DROP_ON_REG(port
), RTL8367C_FLOWCTRL_PORT_DROP_ON_MASK
, pThreshold
);
1088 * rtl8367c_setAsicEgressFlowControlPortDropGap
1090 * Set port-based egress flow control turn off or ingress flow control drop off gap
1092 * gap - Flow control/drop turn OFF threshold = turn ON threshold - gap
1096 * RT_ERR_OK - Success
1097 * RT_ERR_SMI - SMI access error
1098 * RT_ERR_OUT_OF_RANGE - input parameter out of range
1102 ret_t
rtl8367c_setAsicEgressFlowControlPortDropGap(rtk_uint32 gap
)
1104 if(gap
>= RTL8367C_PAGE_NUMBER
)
1105 return RT_ERR_OUT_OF_RANGE
;
1107 return rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_GAP
, RTL8367C_FLOWCTRL_PORT_GAP_MASK
, gap
);
1110 * rtl8367c_getAsicEgressFlowControlPortDropGap
1112 * Get port-based egress flow control turn off or ingress flow control drop off gap
1114 * pGap - Flow control/drop turn OFF threshold = turn ON threshold - gap
1118 * RT_ERR_OK - Success
1119 * RT_ERR_SMI - SMI access error
1123 ret_t
rtl8367c_getAsicEgressFlowControlPortDropGap(rtk_uint32
*pGap
)
1125 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT_GAP
, RTL8367C_FLOWCTRL_PORT_GAP_MASK
, pGap
);
1128 * rtl8367c_setAsicEgressFlowControlQueueDropGap
1130 * Set Queue-based egress flow control turn off or ingress flow control drop off gap
1132 * gap - Flow control/drop turn OFF threshold = turn ON threshold - gap
1136 * RT_ERR_OK - Success
1137 * RT_ERR_SMI - SMI access error
1138 * RT_ERR_OUT_OF_RANGE - input parameter out of range
1142 ret_t
rtl8367c_setAsicEgressFlowControlQueueDropGap(rtk_uint32 gap
)
1144 if(gap
>= RTL8367C_PAGE_NUMBER
)
1145 return RT_ERR_OUT_OF_RANGE
;
1147 return rtl8367c_setAsicRegBits(RTL8367C_REG_FLOWCTRL_QUEUE_GAP
, RTL8367C_FLOWCTRL_QUEUE_GAP_MASK
, gap
);
1150 * rtl8367c_getAsicEgressFlowControlQueueDropGap
1152 * Get Queue-based egress flow control turn off or ingress flow control drop off gap
1154 * pGap - Flow control/drop turn OFF threshold = turn ON threshold - gap
1158 * RT_ERR_OK - Success
1159 * RT_ERR_SMI - SMI access error
1163 ret_t
rtl8367c_getAsicEgressFlowControlQueueDropGap(rtk_uint32
*pGap
)
1165 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_QUEUE_GAP
, RTL8367C_FLOWCTRL_QUEUE_GAP_MASK
, pGap
);
1168 * rtl8367c_getAsicEgressQueueEmptyPortMask
1170 * Get queue empty port mask
1172 * pPortmask - Queue empty port mask
1176 * RT_ERR_OK - Success
1177 * RT_ERR_SMI - SMI access error
1181 ret_t
rtl8367c_getAsicEgressQueueEmptyPortMask(rtk_uint32
*pPortmask
)
1183 return rtl8367c_getAsicReg(RTL8367C_REG_PORT_QEMPTY
, pPortmask
);
1186 * rtl8367c_getAsicTotalPage
1188 * Get system total page usage number
1190 * pPageCount - page usage number
1194 * RT_ERR_OK - Success
1195 * RT_ERR_SMI - SMI access error
1199 ret_t
rtl8367c_getAsicTotalPage(rtk_uint32
*pPageCount
)
1201 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_TOTAL_PAGE_COUNTER
, RTL8367C_FLOWCTRL_TOTAL_PAGE_COUNTER_MASK
, pPageCount
);
1204 * rtl8367c_getAsicPulbicPage
1206 * Get system public page usage number
1208 * pPageCount - page usage number
1212 * RT_ERR_OK - Success
1213 * RT_ERR_SMI - SMI access error
1217 ret_t
rtl8367c_getAsicPulbicPage(rtk_uint32
*pPageCount
)
1219 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PUBLIC_PAGE_COUNTER
, RTL8367C_FLOWCTRL_PUBLIC_PAGE_COUNTER_MASK
, pPageCount
);
1222 * rtl8367c_getAsicMaxTotalPage
1224 * Get system total page max usage number
1226 * pPageCount - page usage number
1230 * RT_ERR_OK - Success
1231 * RT_ERR_SMI - SMI access error
1235 ret_t
rtl8367c_getAsicMaxTotalPage(rtk_uint32
*pPageCount
)
1237 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_TOTAL_PAGE_MAX
, RTL8367C_FLOWCTRL_TOTAL_PAGE_MAX_MASK
, pPageCount
);
1240 * rtl8367c_getAsicPulbicPage
1242 * Get system public page max usage number
1244 * pPageCount - page usage number
1248 * RT_ERR_OK - Success
1249 * RT_ERR_SMI - SMI access error
1253 ret_t
rtl8367c_getAsicMaxPulbicPage(rtk_uint32
*pPageCount
)
1255 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PUBLIC_PAGE_MAX
, RTL8367C_FLOWCTRL_PUBLIC_PAGE_MAX_MASK
, pPageCount
);
1258 * rtl8367c_getAsicPortPage
1260 * Get per-port page usage number
1262 * port - Physical port number (0~7)
1263 * pPageCount - page usage number
1267 * RT_ERR_OK - Success
1268 * RT_ERR_SMI - SMI access error
1269 * RT_ERR_PORT_ID - Invalid port number
1273 ret_t
rtl8367c_getAsicPortPage(rtk_uint32 port
, rtk_uint32
*pPageCount
)
1275 if(port
> RTL8367C_PORTIDMAX
)
1276 return RT_ERR_PORT_ID
;
1279 return rtl8367c_getAsicRegBits(RTL8367C_FLOWCTRL_PORT_PAGE_COUNTER_REG(port
), RTL8367C_FLOWCTRL_PORT_PAGE_COUNTER_MASK
, pPageCount
);
1281 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT8_PAGE_COUNTER
+port
- 8, RTL8367C_FLOWCTRL_PORT_PAGE_COUNTER_MASK
, pPageCount
);
1284 * rtl8367c_getAsicPortPage
1286 * Get per-port page max usage number
1288 * port - Physical port number (0~7)
1289 * pPageCount - page usage number
1293 * RT_ERR_OK - Success
1294 * RT_ERR_SMI - SMI access error
1295 * RT_ERR_PORT_ID - Invalid port number
1299 ret_t
rtl8367c_getAsicPortPageMax(rtk_uint32 port
, rtk_uint32
*pPageCount
)
1301 if(port
> RTL8367C_PORTIDMAX
)
1302 return RT_ERR_PORT_ID
;
1304 return rtl8367c_getAsicRegBits(RTL8367C_FLOWCTRL_PORT_PAGE_MAX_REG(port
), RTL8367C_FLOWCTRL_PORT_PAGE_MAX_MASK
, pPageCount
);
1306 return rtl8367c_getAsicRegBits(RTL8367C_REG_FLOWCTRL_PORT0_PAGE_MAX
+port
-8, RTL8367C_FLOWCTRL_PORT_PAGE_MAX_MASK
, pPageCount
);
1312 * rtl8367c_setAsicFlowControlEgressPortIndep
1314 * Set per-port egress flow control independent
1316 * port - Physical port number (0~7)
1317 * enabled - Egress port flow control usage 1:enable 0:disable.
1321 * RT_ERR_OK - Success
1322 * RT_ERR_SMI - SMI access error
1323 * RT_ERR_PORT_ID - Invalid port number
1327 ret_t
rtl8367c_setAsicFlowControlEgressPortIndep(rtk_uint32 port
, rtk_uint32 enable
)
1329 if(port
> RTL8367C_PORTIDMAX
)
1330 return RT_ERR_PORT_ID
;
1332 return rtl8367c_setAsicRegBit(RTL8367C_REG_PORT0_MISC_CFG
+ (port
*0x20), RTL8367C_PORT0_MISC_CFG_FLOWCTRL_INDEP_OFFSET
,enable
);
1336 * rtl8367c_getAsicFlowControlEgressPortIndep
1338 * Get per-port egress flow control independent
1340 * port - Physical port number (0~7)
1341 * enabled - Egress port flow control usage 1:enable 0:disable.
1345 * RT_ERR_OK - Success
1346 * RT_ERR_SMI - SMI access error
1347 * RT_ERR_PORT_ID - Invalid port number
1351 ret_t
rtl8367c_getAsicFlowControlEgressPortIndep(rtk_uint32 port
, rtk_uint32
*pEnable
)
1353 return rtl8367c_getAsicRegBit(RTL8367C_REG_PORT0_MISC_CFG
+ (port
*0x20),RTL8367C_PORT0_MISC_CFG_FLOWCTRL_INDEP_OFFSET
,pEnable
);