Skip to content

Commit 3da1110

Browse files
Varun PrakashNicholas Bellinger
authored andcommitted
target/cxgbit: use cxgb4_tp_smt_idx() to get smt idx
cxgb4_tp_smt_idx() returns smt idx for T4,T5,T6 adapters. Signed-off-by: Varun Prakash <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
1 parent 9a584bf commit 3da1110

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/target/iscsi/cxgbit/cxgbit_cm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip,
872872
goto out;
873873
csk->mtu = ndev->mtu;
874874
csk->tx_chan = cxgb4_port_chan(ndev);
875-
csk->smac_idx = (cxgb4_port_viid(ndev) & 0x7F) << 1;
875+
csk->smac_idx = cxgb4_tp_smt_idx(cdev->lldi.adapter_type,
876+
cxgb4_port_viid(ndev));
876877
step = cdev->lldi.ntxq /
877878
cdev->lldi.nchan;
878879
csk->txq_idx = cxgb4_port_idx(ndev) * step;
@@ -907,7 +908,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip,
907908
port_id = cxgb4_port_idx(ndev);
908909
csk->mtu = dst_mtu(dst);
909910
csk->tx_chan = cxgb4_port_chan(ndev);
910-
csk->smac_idx = (cxgb4_port_viid(ndev) & 0x7F) << 1;
911+
csk->smac_idx = cxgb4_tp_smt_idx(cdev->lldi.adapter_type,
912+
cxgb4_port_viid(ndev));
911913
step = cdev->lldi.ntxq /
912914
cdev->lldi.nports;
913915
csk->txq_idx = (port_id * step) +

0 commit comments

Comments
 (0)