]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cxgb4: LE-Workaround is not atomic in firmware
authorKumar Sanghvi <kumaras@chelsio.com>
Tue, 18 Feb 2014 12:26:11 +0000 (17:56 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Feb 2014 21:23:01 +0000 (16:23 -0500)
The LE workaround in firmware is not atomic and fw_ofld_connection_wrs must not interleave.
Therefore, when the workaround is enabled, we need to send all ctrlq WRs on a single ctrl queue.

Based on original work by Santosh Rastapur <santosh@chelsio.com>

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/sge.c

index 47ffa64fcf19e89a495191252006cb21eb40d993..23dbe28f8aca1135587c29c8014a28c7dc733a2e 100644 (file)
@@ -1467,8 +1467,12 @@ static inline int ofld_send(struct adapter *adap, struct sk_buff *skb)
 {
        unsigned int idx = skb_txq(skb);
 
-       if (unlikely(is_ctrl_pkt(skb)))
+       if (unlikely(is_ctrl_pkt(skb))) {
+               /* Single ctrl queue is a requirement for LE workaround path */
+               if (adap->tids.nsftids)
+                       idx = 0;
                return ctrl_xmit(&adap->sge.ctrlq[idx], skb);
+       }
        return ofld_xmit(&adap->sge.ofldtxq[idx], skb);
 }