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

cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB

In commit dc9daab2 ("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: default avatarPaul Bolle <pebolle@tiscal.nl>
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2caabb3d
...@@ -1229,6 +1229,28 @@ static const struct file_operations rss_vf_config_debugfs_fops = { ...@@ -1229,6 +1229,28 @@ static const struct file_operations rss_vf_config_debugfs_fops = {
.release = seq_release_private .release = seq_release_private
}; };
/**
* ethqset2pinfo - return port_info of an Ethernet Queue Set
* @adap: the adapter
* @qset: Ethernet Queue Set
*/
static inline struct port_info *ethqset2pinfo(struct adapter *adap, int qset)
{
int pidx;
for_each_port(adap, pidx) {
struct port_info *pi = adap2pinfo(adap, pidx);
if (qset >= pi->first_qset &&
qset < pi->first_qset + pi->nqsets)
return pi;
}
/* should never happen! */
BUG_ON(1);
return NULL;
}
static int sge_qinfo_show(struct seq_file *seq, void *v) static int sge_qinfo_show(struct seq_file *seq, void *v)
{ {
struct adapter *adap = seq->private; struct adapter *adap = seq->private;
...@@ -1272,7 +1294,7 @@ do { \ ...@@ -1272,7 +1294,7 @@ do { \
T("TxQ inuse:", q.in_use); T("TxQ inuse:", q.in_use);
T("TxQ CIDX:", q.cidx); T("TxQ CIDX:", q.cidx);
T("TxQ PIDX:", q.pidx); T("TxQ PIDX:", q.pidx);
#ifdef CONFIG_CXGB4_DCB #ifdef CONFIG_CHELSIO_T4_DCB
T("DCB Prio:", dcb_prio); T("DCB Prio:", dcb_prio);
S3("u", "DCB PGID:", S3("u", "DCB PGID:",
(ethqset2pinfo(adap, base_qset + i)->dcb.pgid >> (ethqset2pinfo(adap, base_qset + i)->dcb.pgid >>
......
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