Commit e9faeab8 authored by Hariprasad Shenai's avatar Hariprasad Shenai Committed by David S. Miller

cxgb4: Update Congestion Channel map for T6 adapter

Updating Congestion Channel/Priority Map in Congestion Manager Context
for T6. In T6 port 0 is mapped to channel 0 and port 1 is mapped to
channel 1. For 2 port T4/T5 adapter, port 0 is mapped to channel 0,1 and
port 1 is mapped to channel 2,3
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 676d6a75
...@@ -5316,7 +5316,14 @@ unsigned int t4_get_mps_bg_map(struct adapter *adap, int idx) ...@@ -5316,7 +5316,14 @@ unsigned int t4_get_mps_bg_map(struct adapter *adap, int idx)
if (n == 0) if (n == 0)
return idx == 0 ? 0xf : 0; return idx == 0 ? 0xf : 0;
if (n == 1) /* In T6 (which is a 2 port card),
* port 0 is mapped to channel 0 and port 1 is mapped to channel 1.
* For 2 port T4/T5 adapter,
* port 0 is mapped to channel 0 and 1,
* port 1 is mapped to channel 2 and 3.
*/
if ((n == 1) &&
(CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5))
return idx < 2 ? (3 << (2 * idx)) : 0; return idx < 2 ? (3 << (2 * idx)) : 0;
return 1 << idx; return 1 << idx;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment