Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git] / drivers / net / ethernet / chelsio / cxgb4 / cxgb4_debugfs.c
index 9a96b01..ee3aab5 100644 (file)
@@ -3048,6 +3048,9 @@ static int sge_queue_entries(const struct adapter *adap)
        int tot_uld_entries = 0;
        int i;
 
+       if (!is_uld(adap))
+               goto lld_only;
+
        mutex_lock(&uld_mutex);
        for (i = 0; i < CXGB4_TX_MAX; i++)
                tot_uld_entries += sge_qinfo_uld_txq_entries(adap, i);
@@ -3058,6 +3061,7 @@ static int sge_queue_entries(const struct adapter *adap)
        }
        mutex_unlock(&uld_mutex);
 
+lld_only:
        return DIV_ROUND_UP(adap->sge.ethqsets, 4) +
               (adap->sge.eohw_txq ? DIV_ROUND_UP(adap->sge.eoqsets, 4) : 0) +
               tot_uld_entries +