lkml.org 
[lkml]   [2013]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RFC 60/77] qlcnic: Return -ENOSPC when not enough MSI-X vectors available
Date
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index c4c5023..c6018bb 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -620,7 +620,7 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
num_msix);
if (qlcnic_83xx_check(adapter)) {
if (err < (QLC_83XX_MINIMUM_VECTOR - tx_vector))
- return err;
+ return -ENOSPC;
err -= (max_tx_rings + 1);
num_msix = rounddown_pow_of_two(err);
num_msix += (max_tx_rings + 1);
@@ -636,6 +636,7 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
num_msix);
goto enable_msix;
}
+ err = -ENOSPC;
} else {
dev_info(&pdev->dev,
"Unable to allocate %d MSI-X interrupt vectors\n",
--
1.7.7.6


\
 
 \ /
  Last update: 2013-10-02 23:21    [W:0.541 / U:10.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site