diff options
author | Vipul Pandya <vipul@chelsio.com> | 2012-10-19 02:09:53 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-21 20:46:03 -0400 |
commit | 9a4da2cd99e4edfee1e48c5e2b4928eaefb56006 (patch) | |
tree | f2b22dd9f081bd537c8465e18662d621a64e25c1 /drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | |
parent | db0fe0b2f6bba2fda939737d063db2ae14c58d71 (diff) | |
download | lwn-9a4da2cd99e4edfee1e48c5e2b4928eaefb56006.tar.gz lwn-9a4da2cd99e4edfee1e48c5e2b4928eaefb56006.zip |
cxgb4: Remove unnecessary #ifdef condition
This patch also fixes the build failure caused due to removal of #ifdef
CONFIG_CHELSIO_T4_OFFLOAD condition
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index a4da893ac1e1..378988b5709a 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h @@ -251,6 +251,8 @@ struct adapter_params { unsigned char rev; /* chip revision */ unsigned char offload; + unsigned char bypass; + unsigned int ofldq_wr_cred; }; @@ -642,6 +644,23 @@ extern int dbfifo_int_thresh; #define for_each_port(adapter, iter) \ for (iter = 0; iter < (adapter)->params.nports; ++iter) +static inline int is_bypass(struct adapter *adap) +{ + return adap->params.bypass; +} + +static inline int is_bypass_device(int device) +{ + /* this should be set based upon device capabilities */ + switch (device) { + case 0x440b: + case 0x440c: + return 1; + default: + return 0; + } +} + static inline unsigned int core_ticks_per_usec(const struct adapter *adap) { return adap->params.vpd.cclk / 1000; |