|
@@ -3844,7 +3844,7 @@ static int adap_init0(struct adapter *adap)
|
|
}
|
|
}
|
|
|
|
|
|
/* Allocate the memory for the vaious egress queue bitmaps
|
|
/* Allocate the memory for the vaious egress queue bitmaps
|
|
- * ie starving_fl and txq_maperr.
|
|
|
|
|
|
+ * ie starving_fl, txq_maperr and blocked_fl.
|
|
*/
|
|
*/
|
|
adap->sge.starving_fl = kcalloc(BITS_TO_LONGS(adap->sge.egr_sz),
|
|
adap->sge.starving_fl = kcalloc(BITS_TO_LONGS(adap->sge.egr_sz),
|
|
sizeof(long), GFP_KERNEL);
|
|
sizeof(long), GFP_KERNEL);
|
|
@@ -3860,6 +3860,15 @@ static int adap_init0(struct adapter *adap)
|
|
goto bye;
|
|
goto bye;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_DEBUG_FS
|
|
|
|
+ adap->sge.blocked_fl = kcalloc(BITS_TO_LONGS(adap->sge.egr_sz),
|
|
|
|
+ sizeof(long), GFP_KERNEL);
|
|
|
|
+ if (!adap->sge.blocked_fl) {
|
|
|
|
+ ret = -ENOMEM;
|
|
|
|
+ goto bye;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
params[0] = FW_PARAM_PFVF(CLIP_START);
|
|
params[0] = FW_PARAM_PFVF(CLIP_START);
|
|
params[1] = FW_PARAM_PFVF(CLIP_END);
|
|
params[1] = FW_PARAM_PFVF(CLIP_END);
|
|
ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, params, val);
|
|
ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, params, val);
|
|
@@ -4072,6 +4081,9 @@ bye:
|
|
kfree(adap->sge.ingr_map);
|
|
kfree(adap->sge.ingr_map);
|
|
kfree(adap->sge.starving_fl);
|
|
kfree(adap->sge.starving_fl);
|
|
kfree(adap->sge.txq_maperr);
|
|
kfree(adap->sge.txq_maperr);
|
|
|
|
+#ifdef CONFIG_DEBUG_FS
|
|
|
|
+ kfree(adap->sge.blocked_fl);
|
|
|
|
+#endif
|
|
if (ret != -ETIMEDOUT && ret != -EIO)
|
|
if (ret != -ETIMEDOUT && ret != -EIO)
|
|
t4_fw_bye(adap, adap->mbox);
|
|
t4_fw_bye(adap, adap->mbox);
|
|
return ret;
|
|
return ret;
|
|
@@ -4515,6 +4527,9 @@ static void free_some_resources(struct adapter *adapter)
|
|
kfree(adapter->sge.ingr_map);
|
|
kfree(adapter->sge.ingr_map);
|
|
kfree(adapter->sge.starving_fl);
|
|
kfree(adapter->sge.starving_fl);
|
|
kfree(adapter->sge.txq_maperr);
|
|
kfree(adapter->sge.txq_maperr);
|
|
|
|
+#ifdef CONFIG_DEBUG_FS
|
|
|
|
+ kfree(adapter->sge.blocked_fl);
|
|
|
|
+#endif
|
|
disable_msi(adapter);
|
|
disable_msi(adapter);
|
|
|
|
|
|
for_each_port(adapter, i)
|
|
for_each_port(adapter, i)
|
|
@@ -4661,6 +4676,9 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
|
|
|
setup_memwin(adapter);
|
|
setup_memwin(adapter);
|
|
err = adap_init0(adapter);
|
|
err = adap_init0(adapter);
|
|
|
|
+#ifdef CONFIG_DEBUG_FS
|
|
|
|
+ bitmap_zero(adapter->sge.blocked_fl, adapter->sge.egr_sz);
|
|
|
|
+#endif
|
|
setup_memwin_rdma(adapter);
|
|
setup_memwin_rdma(adapter);
|
|
if (err)
|
|
if (err)
|
|
goto out_unmap_bar;
|
|
goto out_unmap_bar;
|