summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/mc5.c
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2007-03-31 09:23:19 +0200
committerJeff Garzik <jeff@garzik.org>2007-04-04 04:31:09 +0200
commit8ac3ba68e25a73594646ec30b7c482b364644c92 (patch)
tree1c15afe834f8f86f8a6c0a2c5da217de4afb6664 /drivers/net/cxgb3/mc5.c
parentcxgb3 - Safeguard TCAM size usage (diff)
downloadlinux-8ac3ba68e25a73594646ec30b7c482b364644c92.tar.xz
linux-8ac3ba68e25a73594646ec30b7c482b364644c92.zip
cxgb3 - detect NIC only adapters
Differentiate NIC only adapters from RNICs. Initialize offload capabilities for RNICs only. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cxgb3/mc5.c')
-rw-r--r--drivers/net/cxgb3/mc5.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/mc5.c b/drivers/net/cxgb3/mc5.c
index 644d62ea86a6..84c1ffa8e2d3 100644
--- a/drivers/net/cxgb3/mc5.c
+++ b/drivers/net/cxgb3/mc5.c
@@ -328,6 +328,9 @@ int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters,
unsigned int tcam_size = mc5->tcam_size;
struct adapter *adap = mc5->adapter;
+ if (!tcam_size)
+ return 0;
+
if (nroutes > MAX_ROUTES || nroutes + nservers + nfilters > tcam_size)
return -EINVAL;