From: Varun Prakash Date: Thu, 1 Dec 2016 14:58:27 +0000 (+0530) Subject: scsi: cxgb4i: use cxgb4_tp_smt_idx() to get smt_idx X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0eed8ab7379faba26f9d85a5904b8292dc4d8b9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git scsi: cxgb4i: use cxgb4_tp_smt_idx() to get smt_idx cxgb4_tp_smt_idx() is defined in cxgb4 driver, it returns smt_idx for T4,T5,T6 adapters. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index 9e6f647ff1c1..ffcae8519881 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c @@ -1452,8 +1452,8 @@ static int init_act_open(struct cxgbi_sock *csk) csk->mtu = dst_mtu(csk->dst); cxgb4_best_mtu(lldi->mtus, csk->mtu, &csk->mss_idx); csk->tx_chan = cxgb4_port_chan(ndev); - /* SMT two entries per row */ - csk->smac_idx = ((cxgb4_port_viid(ndev) & 0x7F)) << 1; + csk->smac_idx = cxgb4_tp_smt_idx(lldi->adapter_type, + cxgb4_port_viid(ndev)); step = lldi->ntxq / lldi->nchan; csk->txq_idx = cxgb4_port_idx(ndev) * step; step = lldi->nrxq / lldi->nchan;