diff options
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 19 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 29 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 3 |
3 files changed, 27 insertions, 24 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 { | |||
251 | unsigned char rev; /* chip revision */ | 251 | unsigned char rev; /* chip revision */ |
252 | unsigned char offload; | 252 | unsigned char offload; |
253 | 253 | ||
254 | unsigned char bypass; | ||
255 | |||
254 | unsigned int ofldq_wr_cred; | 256 | unsigned int ofldq_wr_cred; |
255 | }; | 257 | }; |
256 | 258 | ||
@@ -642,6 +644,23 @@ extern int dbfifo_int_thresh; | |||
642 | #define for_each_port(adapter, iter) \ | 644 | #define for_each_port(adapter, iter) \ |
643 | for (iter = 0; iter < (adapter)->params.nports; ++iter) | 645 | for (iter = 0; iter < (adapter)->params.nports; ++iter) |
644 | 646 | ||
647 | static inline int is_bypass(struct adapter *adap) | ||
648 | { | ||
649 | return adap->params.bypass; | ||
650 | } | ||
651 | |||
652 | static inline int is_bypass_device(int device) | ||
653 | { | ||
654 | /* this should be set based upon device capabilities */ | ||
655 | switch (device) { | ||
656 | case 0x440b: | ||
657 | case 0x440c: | ||
658 | return 1; | ||
659 | default: | ||
660 | return 0; | ||
661 | } | ||
662 | } | ||
663 | |||
645 | static inline unsigned int core_ticks_per_usec(const struct adapter *adap) | 664 | static inline unsigned int core_ticks_per_usec(const struct adapter *adap) |
646 | { | 665 | { |
647 | return adap->params.vpd.cclk / 1000; | 666 | return adap->params.vpd.cclk / 1000; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 604f4f87f550..c1cde11b0c6d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -3513,18 +3513,6 @@ static int adap_init0_no_config(struct adapter *adapter, int reset) | |||
3513 | if (ret < 0) | 3513 | if (ret < 0) |
3514 | goto bye; | 3514 | goto bye; |
3515 | 3515 | ||
3516 | #ifndef CONFIG_CHELSIO_T4_OFFLOAD | ||
3517 | /* | ||
3518 | * If we're a pure NIC driver then disable all offloading facilities. | ||
3519 | * This will allow the firmware to optimize aspects of the hardware | ||
3520 | * configuration which will result in improved performance. | ||
3521 | */ | ||
3522 | caps_cmd.ofldcaps = 0; | ||
3523 | caps_cmd.iscsicaps = 0; | ||
3524 | caps_cmd.rdmacaps = 0; | ||
3525 | caps_cmd.fcoecaps = 0; | ||
3526 | #endif | ||
3527 | |||
3528 | if (caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_VM)) { | 3516 | if (caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_VM)) { |
3529 | if (!vf_acls) | 3517 | if (!vf_acls) |
3530 | caps_cmd.niccaps ^= htons(FW_CAPS_CONFIG_NIC_VM); | 3518 | caps_cmd.niccaps ^= htons(FW_CAPS_CONFIG_NIC_VM); |
@@ -3745,6 +3733,7 @@ static int adap_init0(struct adapter *adap) | |||
3745 | u32 v, port_vec; | 3733 | u32 v, port_vec; |
3746 | enum dev_state state; | 3734 | enum dev_state state; |
3747 | u32 params[7], val[7]; | 3735 | u32 params[7], val[7]; |
3736 | struct fw_caps_config_cmd caps_cmd; | ||
3748 | int reset = 1, j; | 3737 | int reset = 1, j; |
3749 | 3738 | ||
3750 | /* | 3739 | /* |
@@ -3898,6 +3887,9 @@ static int adap_init0(struct adapter *adap) | |||
3898 | goto bye; | 3887 | goto bye; |
3899 | } | 3888 | } |
3900 | 3889 | ||
3890 | if (is_bypass_device(adap->pdev->device)) | ||
3891 | adap->params.bypass = 1; | ||
3892 | |||
3901 | /* | 3893 | /* |
3902 | * Grab some of our basic fundamental operating parameters. | 3894 | * Grab some of our basic fundamental operating parameters. |
3903 | */ | 3895 | */ |
@@ -3940,13 +3932,12 @@ static int adap_init0(struct adapter *adap) | |||
3940 | adap->tids.aftid_end = val[1]; | 3932 | adap->tids.aftid_end = val[1]; |
3941 | } | 3933 | } |
3942 | 3934 | ||
3943 | #ifdef CONFIG_CHELSIO_T4_OFFLOAD | ||
3944 | /* | 3935 | /* |
3945 | * Get device capabilities so we can determine what resources we need | 3936 | * Get device capabilities so we can determine what resources we need |
3946 | * to manage. | 3937 | * to manage. |
3947 | */ | 3938 | */ |
3948 | memset(&caps_cmd, 0, sizeof(caps_cmd)); | 3939 | memset(&caps_cmd, 0, sizeof(caps_cmd)); |
3949 | caps_cmd.op_to_write = htonl(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | | 3940 | caps_cmd.op_to_write = htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | |
3950 | FW_CMD_REQUEST | FW_CMD_READ); | 3941 | FW_CMD_REQUEST | FW_CMD_READ); |
3951 | caps_cmd.retval_len16 = htonl(FW_LEN16(caps_cmd)); | 3942 | caps_cmd.retval_len16 = htonl(FW_LEN16(caps_cmd)); |
3952 | ret = t4_wr_mbox(adap, adap->mbox, &caps_cmd, sizeof(caps_cmd), | 3943 | ret = t4_wr_mbox(adap, adap->mbox, &caps_cmd, sizeof(caps_cmd), |
@@ -3991,15 +3982,6 @@ static int adap_init0(struct adapter *adap) | |||
3991 | adap->vres.ddp.size = val[4] - val[3] + 1; | 3982 | adap->vres.ddp.size = val[4] - val[3] + 1; |
3992 | adap->params.ofldq_wr_cred = val[5]; | 3983 | adap->params.ofldq_wr_cred = val[5]; |
3993 | 3984 | ||
3994 | params[0] = FW_PARAM_PFVF(ETHOFLD_START); | ||
3995 | params[1] = FW_PARAM_PFVF(ETHOFLD_END); | ||
3996 | ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, | ||
3997 | params, val); | ||
3998 | if ((val[0] != val[1]) && (ret >= 0)) { | ||
3999 | adap->tids.uotid_base = val[0]; | ||
4000 | adap->tids.nuotids = val[1] - val[0] + 1; | ||
4001 | } | ||
4002 | |||
4003 | adap->params.offload = 1; | 3985 | adap->params.offload = 1; |
4004 | } | 3986 | } |
4005 | if (caps_cmd.rdmacaps) { | 3987 | if (caps_cmd.rdmacaps) { |
@@ -4048,7 +4030,6 @@ static int adap_init0(struct adapter *adap) | |||
4048 | } | 4030 | } |
4049 | #undef FW_PARAM_PFVF | 4031 | #undef FW_PARAM_PFVF |
4050 | #undef FW_PARAM_DEV | 4032 | #undef FW_PARAM_DEV |
4051 | #endif /* CONFIG_CHELSIO_T4_OFFLOAD */ | ||
4052 | 4033 | ||
4053 | /* | 4034 | /* |
4054 | * These are finalized by FW initialization, load their values now. | 4035 | * These are finalized by FW initialization, load their values now. |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h index 1b899fea1a91..39bec73ff87c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | |||
@@ -102,6 +102,9 @@ struct tid_info { | |||
102 | unsigned int ftid_base; | 102 | unsigned int ftid_base; |
103 | unsigned int aftid_base; | 103 | unsigned int aftid_base; |
104 | unsigned int aftid_end; | 104 | unsigned int aftid_end; |
105 | /* Server filter region */ | ||
106 | unsigned int sftid_base; | ||
107 | unsigned int nsftids; | ||
105 | 108 | ||
106 | spinlock_t atid_lock ____cacheline_aligned_in_smp; | 109 | spinlock_t atid_lock ____cacheline_aligned_in_smp; |
107 | union aopen_entry *afree; | 110 | union aopen_entry *afree; |