]> git.baikalelectronics.ru Git - kernel.git/commitdiff
qed: configure ll2 RoCE v1/v2 flavor correctly
authorRam Amrani <Ram.Amrani@cavium.com>
Wed, 9 Nov 2016 20:48:43 +0000 (22:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Nov 2016 17:55:20 +0000 (12:55 -0500)
Currently RoCE v2 won't operate with RDMA CM due to missing setting of
the roce-flavour in the ll2 configuration.
This patch properly sets the flavour, and deletes incorrect HSI
that doesn't [yet] exist.

Fixes: b1772d9ff7cf ("qed: Add RoCE ll2 & GSI support")
Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_hsi.h
drivers/net/ethernet/qlogic/qed/qed_ll2.c

index 72eee29c677f153e6ed65fbf0d57436abbe87f84..2777d5bb4380104cd4f1fcaf99ab4608b41de13f 100644 (file)
@@ -727,9 +727,6 @@ struct core_tx_bd_flags {
 #define CORE_TX_BD_FLAGS_L4_PROTOCOL_SHIFT     6
 #define CORE_TX_BD_FLAGS_L4_PSEUDO_CSUM_MODE_MASK      0x1
 #define CORE_TX_BD_FLAGS_L4_PSEUDO_CSUM_MODE_SHIFT 7
-#define CORE_TX_BD_FLAGS_ROCE_FLAV_MASK                0x1
-#define CORE_TX_BD_FLAGS_ROCE_FLAV_SHIFT       12
-
 };
 
 struct core_tx_bd {
index 63e1a1b0ef8ef0392ba2e2f427a02ec7e5ebc73b..f95385cbbd40248d79513ad083f8c56232b70aee 100644 (file)
@@ -1119,6 +1119,7 @@ static void qed_ll2_prepare_tx_packet_set_bd(struct qed_hwfn *p_hwfn,
        start_bd->bd_flags.as_bitfield |= CORE_TX_BD_FLAGS_START_BD_MASK <<
            CORE_TX_BD_FLAGS_START_BD_SHIFT;
        SET_FIELD(start_bd->bitfield0, CORE_TX_BD_NBDS, num_of_bds);
+       SET_FIELD(start_bd->bitfield0, CORE_TX_BD_ROCE_FLAV, type);
        DMA_REGPAIR_LE(start_bd->addr, first_frag);
        start_bd->nbytes = cpu_to_le16(first_frag_len);