target/cxgbit: Use T6 specific macro to set the force bit
authorVarun Prakash <varun@chelsio.com>
Tue, 24 Jan 2017 11:37:02 +0000 (17:07 +0530)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 9 Feb 2017 08:39:05 +0000 (00:39 -0800)
For T6 adapters use T6 specific macro to set the force bit.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
drivers/target/iscsi/cxgbit/cxgbit_target.c

index a267173f59972f174947578935189b1e474dc94b..21fc2fe1fc10c6d4e5cba43ad2084d88828da46d 100644 (file)
@@ -1349,6 +1349,10 @@ struct cpl_tx_data {
 #define TX_FORCE_S     13
 #define TX_FORCE_V(x)  ((x) << TX_FORCE_S)
 
+#define T6_TX_FORCE_S          20
+#define T6_TX_FORCE_V(x)       ((x) << T6_TX_FORCE_S)
+#define T6_TX_FORCE_F          T6_TX_FORCE_V(1U)
+
 enum {
        ULP_TX_MEM_READ = 2,
        ULP_TX_MEM_WRITE = 3,
index e183e0bdd3bf85ce42bd898aebdb482261714cc3..8ae399dfe84f16d4aec85d231bb505ca8494a49b 100644 (file)
@@ -162,12 +162,14 @@ cxgbit_tx_data_wr(struct cxgbit_sock *csk, struct sk_buff *skb, u32 dlen,
                  u32 len, u32 credits, u32 compl)
 {
        struct fw_ofld_tx_data_wr *req;
+       const struct cxgb4_lld_info *lldi = &csk->com.cdev->lldi;
        u32 submode = cxgbit_skcb_submode(skb);
        u32 wr_ulp_mode = 0;
        u32 hdr_size = sizeof(*req);
        u32 opcode = FW_OFLD_TX_DATA_WR;
        u32 immlen = 0;
-       u32 force = TX_FORCE_V(!submode);
+       u32 force = is_t5(lldi->adapter_type) ? TX_FORCE_V(!submode) :
+                   T6_TX_FORCE_F;
 
        if (cxgbit_skcb_flags(skb) & SKCBF_TX_ISO) {
                opcode = FW_ISCSI_TX_DATA_WR;