diff options
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 604f4f87f550..0df1284df497 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -3416,16 +3416,6 @@ static int adap_init0_config(struct adapter *adapter, int reset) | |||
3416 | finicsum, cfcsum); | 3416 | finicsum, cfcsum); |
3417 | 3417 | ||
3418 | /* | 3418 | /* |
3419 | * If we're a pure NIC driver then disable all offloading facilities. | ||
3420 | * This will allow the firmware to optimize aspects of the hardware | ||
3421 | * configuration which will result in improved performance. | ||
3422 | */ | ||
3423 | caps_cmd.ofldcaps = 0; | ||
3424 | caps_cmd.iscsicaps = 0; | ||
3425 | caps_cmd.rdmacaps = 0; | ||
3426 | caps_cmd.fcoecaps = 0; | ||
3427 | |||
3428 | /* | ||
3429 | * And now tell the firmware to use the configuration we just loaded. | 3419 | * And now tell the firmware to use the configuration we just loaded. |
3430 | */ | 3420 | */ |
3431 | caps_cmd.op_to_write = | 3421 | caps_cmd.op_to_write = |
@@ -3513,18 +3503,6 @@ static int adap_init0_no_config(struct adapter *adapter, int reset) | |||
3513 | if (ret < 0) | 3503 | if (ret < 0) |
3514 | goto bye; | 3504 | goto bye; |
3515 | 3505 | ||
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)) { | 3506 | if (caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_VM)) { |
3529 | if (!vf_acls) | 3507 | if (!vf_acls) |
3530 | caps_cmd.niccaps ^= htons(FW_CAPS_CONFIG_NIC_VM); | 3508 | caps_cmd.niccaps ^= htons(FW_CAPS_CONFIG_NIC_VM); |
@@ -3745,6 +3723,7 @@ static int adap_init0(struct adapter *adap) | |||
3745 | u32 v, port_vec; | 3723 | u32 v, port_vec; |
3746 | enum dev_state state; | 3724 | enum dev_state state; |
3747 | u32 params[7], val[7]; | 3725 | u32 params[7], val[7]; |
3726 | struct fw_caps_config_cmd caps_cmd; | ||
3748 | int reset = 1, j; | 3727 | int reset = 1, j; |
3749 | 3728 | ||
3750 | /* | 3729 | /* |
@@ -3898,6 +3877,9 @@ static int adap_init0(struct adapter *adap) | |||
3898 | goto bye; | 3877 | goto bye; |
3899 | } | 3878 | } |
3900 | 3879 | ||
3880 | if (is_bypass_device(adap->pdev->device)) | ||
3881 | adap->params.bypass = 1; | ||
3882 | |||
3901 | /* | 3883 | /* |
3902 | * Grab some of our basic fundamental operating parameters. | 3884 | * Grab some of our basic fundamental operating parameters. |
3903 | */ | 3885 | */ |
@@ -3940,13 +3922,12 @@ static int adap_init0(struct adapter *adap) | |||
3940 | adap->tids.aftid_end = val[1]; | 3922 | adap->tids.aftid_end = val[1]; |
3941 | } | 3923 | } |
3942 | 3924 | ||
3943 | #ifdef CONFIG_CHELSIO_T4_OFFLOAD | ||
3944 | /* | 3925 | /* |
3945 | * Get device capabilities so we can determine what resources we need | 3926 | * Get device capabilities so we can determine what resources we need |
3946 | * to manage. | 3927 | * to manage. |
3947 | */ | 3928 | */ |
3948 | memset(&caps_cmd, 0, sizeof(caps_cmd)); | 3929 | memset(&caps_cmd, 0, sizeof(caps_cmd)); |
3949 | caps_cmd.op_to_write = htonl(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | | 3930 | caps_cmd.op_to_write = htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | |
3950 | FW_CMD_REQUEST | FW_CMD_READ); | 3931 | FW_CMD_REQUEST | FW_CMD_READ); |
3951 | caps_cmd.retval_len16 = htonl(FW_LEN16(caps_cmd)); | 3932 | caps_cmd.retval_len16 = htonl(FW_LEN16(caps_cmd)); |
3952 | ret = t4_wr_mbox(adap, adap->mbox, &caps_cmd, sizeof(caps_cmd), | 3933 | ret = t4_wr_mbox(adap, adap->mbox, &caps_cmd, sizeof(caps_cmd), |
@@ -3991,15 +3972,6 @@ static int adap_init0(struct adapter *adap) | |||
3991 | adap->vres.ddp.size = val[4] - val[3] + 1; | 3972 | adap->vres.ddp.size = val[4] - val[3] + 1; |
3992 | adap->params.ofldq_wr_cred = val[5]; | 3973 | adap->params.ofldq_wr_cred = val[5]; |
3993 | 3974 | ||
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; | 3975 | adap->params.offload = 1; |
4004 | } | 3976 | } |
4005 | if (caps_cmd.rdmacaps) { | 3977 | if (caps_cmd.rdmacaps) { |
@@ -4048,7 +4020,6 @@ static int adap_init0(struct adapter *adap) | |||
4048 | } | 4020 | } |
4049 | #undef FW_PARAM_PFVF | 4021 | #undef FW_PARAM_PFVF |
4050 | #undef FW_PARAM_DEV | 4022 | #undef FW_PARAM_DEV |
4051 | #endif /* CONFIG_CHELSIO_T4_OFFLOAD */ | ||
4052 | 4023 | ||
4053 | /* | 4024 | /* |
4054 | * These are finalized by FW initialization, load their values now. | 4025 | * These are finalized by FW initialization, load their values now. |