diff options
| author | Hariprasad Shenai <hariprasad@chelsio.com> | 2015-01-29 22:19:27 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-02-02 01:38:00 -0500 |
| commit | 3051fa617a3bb753185341a2040eaa454a54669e (patch) | |
| tree | 77dd4be731ab21e7bce1ebd87902ee91fa66303b /drivers/net/ethernet/chelsio | |
| parent | 2caabb3d2e600373b83588789896fe5a8831bbb1 (diff) | |
cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB
In commit dc9daab226aa ("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 <pebolle@tiscal.nl>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio')
| -rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c index 47c0869f34ca..61c000a08ebb 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | |||
| @@ -1229,6 +1229,28 @@ static const struct file_operations rss_vf_config_debugfs_fops = { | |||
| 1229 | .release = seq_release_private | 1229 | .release = seq_release_private |
| 1230 | }; | 1230 | }; |
| 1231 | 1231 | ||
| 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 | |||
| 1232 | static int sge_qinfo_show(struct seq_file *seq, void *v) | 1254 | static int sge_qinfo_show(struct seq_file *seq, void *v) |
| 1233 | { | 1255 | { |
| 1234 | struct adapter *adap = seq->private; | 1256 | struct adapter *adap = seq->private; |
| @@ -1272,7 +1294,7 @@ do { \ | |||
| 1272 | T("TxQ inuse:", q.in_use); | 1294 | T("TxQ inuse:", q.in_use); |
| 1273 | T("TxQ CIDX:", q.cidx); | 1295 | T("TxQ CIDX:", q.cidx); |
| 1274 | T("TxQ PIDX:", q.pidx); | 1296 | T("TxQ PIDX:", q.pidx); |
| 1275 | #ifdef CONFIG_CXGB4_DCB | 1297 | #ifdef CONFIG_CHELSIO_T4_DCB |
| 1276 | T("DCB Prio:", dcb_prio); | 1298 | T("DCB Prio:", dcb_prio); |
| 1277 | S3("u", "DCB PGID:", | 1299 | S3("u", "DCB PGID:", |
| 1278 | (ethqset2pinfo(adap, base_qset + i)->dcb.pgid >> | 1300 | (ethqset2pinfo(adap, base_qset + i)->dcb.pgid >> |
