Patchwork [RFC,25/77] cxgb4: Return -ENOSPC when not enough MSI-X vectors available

login
register
mail settings
Submitter Alexander Gordeev
Date Oct. 2, 2013, 10:48 a.m.
Message ID <3c7f347b79afdce03af1fadf4f50f7906979ee94.1380703262.git.agordeev@redhat.com>
Download mbox | patch
Permalink /patch/280068/
State RFC
Headers show

Comments

Alexander Gordeev - Oct. 2, 2013, 10:48 a.m.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index c73cabd..9425bc6 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -5732,9 +5732,11 @@  static int enable_msix(struct adapter *adap)
 		}
 		for (i = 0; i < want; ++i)
 			adap->msix_info[i].vec = entries[i].vector;
-	} else if (err > 0)
+	} else if (err > 0) {
 		dev_info(adap->pdev_dev,
 			 "only %d MSI-X vectors left, not using MSI-X\n", err);
+		err = -ENOSPC;
+	}
 	return err;
 }