Skip to content

Commit 3051fa6

Browse files
Hariprasad Shenaidavem330
authored andcommitted
cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB
In commit dc9daab ("cxgb4: Added support in debugfs to dump sge_qinfo") a preprocessor check for CONFIG_CXGB4_DCB got added, which should have been CONFIG_CHELSIO_T4_DCB. After adding the right preprocessor, build fails due to missing function ethqset2pinfo. Fixing that as well. V2: Updated description since the patch also fixes build failure Reported-by: Paul Bolle <[email protected]> Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2caabb3 commit 3051fa6

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,28 @@ static const struct file_operations rss_vf_config_debugfs_fops = {
12291229
.release = seq_release_private
12301230
};
12311231

1232+
/**
1233+
* ethqset2pinfo - return port_info of an Ethernet Queue Set
1234+
* @adap: the adapter
1235+
* @qset: Ethernet Queue Set
1236+
*/
1237+
static inline struct port_info *ethqset2pinfo(struct adapter *adap, int qset)
1238+
{
1239+
int pidx;
1240+
1241+
for_each_port(adap, pidx) {
1242+
struct port_info *pi = adap2pinfo(adap, pidx);
1243+
1244+
if (qset >= pi->first_qset &&
1245+
qset < pi->first_qset + pi->nqsets)
1246+
return pi;
1247+
}
1248+
1249+
/* should never happen! */
1250+
BUG_ON(1);
1251+
return NULL;
1252+
}
1253+
12321254
static int sge_qinfo_show(struct seq_file *seq, void *v)
12331255
{
12341256
struct adapter *adap = seq->private;
@@ -1272,7 +1294,7 @@ do { \
12721294
T("TxQ inuse:", q.in_use);
12731295
T("TxQ CIDX:", q.cidx);
12741296
T("TxQ PIDX:", q.pidx);
1275-
#ifdef CONFIG_CXGB4_DCB
1297+
#ifdef CONFIG_CHELSIO_T4_DCB
12761298
T("DCB Prio:", dcb_prio);
12771299
S3("u", "DCB PGID:",
12781300
(ethqset2pinfo(adap, base_qset + i)->dcb.pgid >>

0 commit comments

Comments
 (0)