diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_qp.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 09dc3614cf2c..f5081bfde6db 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -31,8 +31,6 @@ | |||
31 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | 31 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
32 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 32 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
33 | * SOFTWARE. | 33 | * SOFTWARE. |
34 | * | ||
35 | * $Id: mthca_qp.c 1355 2004-12-17 15:23:43Z roland $ | ||
36 | */ | 34 | */ |
37 | 35 | ||
38 | #include <linux/string.h> | 36 | #include <linux/string.h> |
@@ -850,23 +848,6 @@ out: | |||
850 | return err; | 848 | return err; |
851 | } | 849 | } |
852 | 850 | ||
853 | static const struct ib_qp_attr dummy_init_attr = { .port_num = 1 }; | ||
854 | static const int dummy_init_attr_mask[] = { | ||
855 | [IB_QPT_UD] = (IB_QP_PKEY_INDEX | | ||
856 | IB_QP_PORT | | ||
857 | IB_QP_QKEY), | ||
858 | [IB_QPT_UC] = (IB_QP_PKEY_INDEX | | ||
859 | IB_QP_PORT | | ||
860 | IB_QP_ACCESS_FLAGS), | ||
861 | [IB_QPT_RC] = (IB_QP_PKEY_INDEX | | ||
862 | IB_QP_PORT | | ||
863 | IB_QP_ACCESS_FLAGS), | ||
864 | [IB_QPT_SMI] = (IB_QP_PKEY_INDEX | | ||
865 | IB_QP_QKEY), | ||
866 | [IB_QPT_GSI] = (IB_QP_PKEY_INDEX | | ||
867 | IB_QP_QKEY), | ||
868 | }; | ||
869 | |||
870 | int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, | 851 | int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, |
871 | struct ib_udata *udata) | 852 | struct ib_udata *udata) |
872 | { | 853 | { |
@@ -928,15 +909,6 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, | |||
928 | goto out; | 909 | goto out; |
929 | } | 910 | } |
930 | 911 | ||
931 | if (cur_state == IB_QPS_RESET && new_state == IB_QPS_ERR) { | ||
932 | err = __mthca_modify_qp(ibqp, &dummy_init_attr, | ||
933 | dummy_init_attr_mask[ibqp->qp_type], | ||
934 | IB_QPS_RESET, IB_QPS_INIT); | ||
935 | if (err) | ||
936 | goto out; | ||
937 | cur_state = IB_QPS_INIT; | ||
938 | } | ||
939 | |||
940 | err = __mthca_modify_qp(ibqp, attr, attr_mask, cur_state, new_state); | 912 | err = __mthca_modify_qp(ibqp, attr, attr_mask, cur_state, new_state); |
941 | 913 | ||
942 | out: | 914 | out: |
@@ -1277,10 +1249,10 @@ static int mthca_set_qp_size(struct mthca_dev *dev, struct ib_qp_cap *cap, | |||
1277 | return -EINVAL; | 1249 | return -EINVAL; |
1278 | 1250 | ||
1279 | /* | 1251 | /* |
1280 | * For MLX transport we need 2 extra S/G entries: | 1252 | * For MLX transport we need 2 extra send gather entries: |
1281 | * one for the header and one for the checksum at the end | 1253 | * one for the header and one for the checksum at the end |
1282 | */ | 1254 | */ |
1283 | if (qp->transport == MLX && cap->max_recv_sge + 2 > dev->limits.max_sg) | 1255 | if (qp->transport == MLX && cap->max_send_sge + 2 > dev->limits.max_sg) |
1284 | return -EINVAL; | 1256 | return -EINVAL; |
1285 | 1257 | ||
1286 | if (mthca_is_memfree(dev)) { | 1258 | if (mthca_is_memfree(dev)) { |