diff options
author | Kip Macy <kmacy@FreeBSD.org> | 2008-07-18 06:12:31 +0000 |
---|---|---|
committer | Kip Macy <kmacy@FreeBSD.org> | 2008-07-18 06:12:31 +0000 |
commit | 4af83c8cff85c89629e629b6becbf9712fa691c0 (patch) | |
tree | 0904a30ac51f99eda3f17170bbf2119832932eca /sys/dev/cxgb/common/cxgb_mc5.c | |
parent | 7a4e8171ba27654229c949ad4dd1e296fc837757 (diff) |
Notes
Diffstat (limited to 'sys/dev/cxgb/common/cxgb_mc5.c')
-rw-r--r-- | sys/dev/cxgb/common/cxgb_mc5.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/cxgb/common/cxgb_mc5.c b/sys/dev/cxgb/common/cxgb_mc5.c index 0e40aca8880e0..6f1537c680843 100644 --- a/sys/dev/cxgb/common/cxgb_mc5.c +++ b/sys/dev/cxgb/common/cxgb_mc5.c @@ -326,9 +326,16 @@ static void mc5_dbgi_mode_disable(const struct mc5 *mc5) V_PRTYEN(mc5->parity_enabled) | F_MBUSEN); } -/* - * Initialization that requires the OS and protocol layers to already - * be intialized goes here. +/** + * t3_mc5_init - initialize MC5 and the TCAM + * @mc5: the MC5 handle + * @nservers: desired number the TCP servers (listening ports) + * @nfilters: desired number of HW filters (classifiers) + * @nroutes: desired number of routes + * + * Initialize MC5 and the TCAM and partition the TCAM for the requested + * number of servers, filters, and routes. The number of routes is + * typically 0 except for specialized uses of the T3 adapters. */ int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters, unsigned int nroutes) @@ -344,7 +351,7 @@ int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters, if (nroutes > MAX_ROUTES || nroutes + nservers + nfilters > tcam_size) return -EINVAL; - if (nfilters && adap->params.rev < T3_REV_C) + if (nfilters) mc5->parity_enabled = 0; /* Reset the TCAM */ @@ -420,7 +427,7 @@ int t3_read_mc5_range(const struct mc5 *mc5, unsigned int start, } mc5_dbgi_mode_disable(mc5); - return 0; + return err; } #define MC5_INT_FATAL (F_PARITYERR | F_REQQPARERR | F_DISPQPARERR) @@ -465,7 +472,6 @@ void t3_mc5_intr_handler(struct mc5 *mc5) t3_write_reg(adap, A_MC5_DB_INT_CAUSE, cause); } - /** * t3_mc5_prep - initialize the SW state for MC5 * @adapter: the adapter |