]> git.openfabrics.org - ~emulex/for-vlad/compat-rdma.git/commitdiff
linux-next-pending: Pull in cxgb4 fix.
authorSteve Wise <swise@opengridcomputing.com>
Tue, 22 Apr 2014 13:40:21 +0000 (08:40 -0500)
committerSteve Wise <swise@opengridcomputing.com>
Tue, 22 Apr 2014 13:40:21 +0000 (08:40 -0500)
Pull in these cxgb4 fixes from net/master:

commit 6f1d7210376727d090e04b8635e6dda4d7eb7b0c
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Tue Apr 15 14:22:34 2014 -0500

    cxgb4: use the correct max size for firmware flash

    The wrong max fw size was being used and causing false
    "too big" errors running ethtool -f.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit bfae23249955819a42aa6c23d93708c818eff5c9
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Mon Apr 14 14:22:43 2014 -0500

    cxgb4: Save the correct mac addr for hw-loopback connections in the L2T

    Hardware needs the local device mac address to support hw loopback for
    rdma loopback connections.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
linux-next-pending/0058-cxgb4--Save-the-correct-mac-addr-for-hw-loopback-connections-in-the-L2T.patch [new file with mode: 0644]
linux-next-pending/0059-cxgb4--use-the-correct-max-size-for-firmware-flash.patch [new file with mode: 0644]

diff --git a/linux-next-pending/0058-cxgb4--Save-the-correct-mac-addr-for-hw-loopback-connections-in-the-L2T.patch b/linux-next-pending/0058-cxgb4--Save-the-correct-mac-addr-for-hw-loopback-connections-in-the-L2T.patch
new file mode 100644 (file)
index 0000000..f0f0475
--- /dev/null
@@ -0,0 +1,34 @@
+commit bfae23249955819a42aa6c23d93708c818eff5c9
+Author: Steve Wise <swise@opengridcomputing.com>
+Date:   Mon Apr 14 14:22:43 2014 -0500
+
+    cxgb4: Save the correct mac addr for hw-loopback connections in the L2T
+    
+    Hardware needs the local device mac address to support hw loopback for
+    rdma loopback connections.
+    
+    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
+    Signed-off-by: David S. Miller <davem@davemloft.net>
+
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
+index 81e8402..8a96572 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c
++++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
+@@ -154,7 +154,7 @@ static int write_l2e(struct adapter *adap, struct l2t_entry *e, int sync)
+       req->params = htons(L2T_W_PORT(e->lport) | L2T_W_NOREPLY(!sync));
+       req->l2t_idx = htons(e->idx);
+       req->vlan = htons(e->vlan);
+-      if (e->neigh)
++      if (e->neigh && !(e->neigh->dev->flags & IFF_LOOPBACK))
+               memcpy(e->dmac, e->neigh->ha, sizeof(e->dmac));
+       memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac));
+@@ -394,6 +394,8 @@ struct l2t_entry *cxgb4_l2t_get(struct l2t_data *d, struct neighbour *neigh,
+       if (e) {
+               spin_lock(&e->lock);          /* avoid race with t4_l2t_free */
+               e->state = L2T_STATE_RESOLVING;
++              if (neigh->dev->flags & IFF_LOOPBACK)
++                      memcpy(e->dmac, physdev->dev_addr, sizeof(e->dmac));
+               memcpy(e->addr, addr, addr_len);
+               e->ifindex = ifidx;
+               e->hash = hash;
diff --git a/linux-next-pending/0059-cxgb4--use-the-correct-max-size-for-firmware-flash.patch b/linux-next-pending/0059-cxgb4--use-the-correct-max-size-for-firmware-flash.patch
new file mode 100644 (file)
index 0000000..008eac1
--- /dev/null
@@ -0,0 +1,25 @@
+commit 6f1d7210376727d090e04b8635e6dda4d7eb7b0c
+Author: Steve Wise <swise@opengridcomputing.com>
+Date:   Tue Apr 15 14:22:34 2014 -0500
+
+    cxgb4: use the correct max size for firmware flash
+    
+    The wrong max fw size was being used and causing false
+    "too big" errors running ethtool -f.
+    
+    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
+    Signed-off-by: David S. Miller <davem@davemloft.net>
+
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+index fb2fe65..bba6768 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
++++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+@@ -682,7 +682,7 @@ enum {
+       SF_RD_ID        = 0x9f,       /* read ID */
+       SF_ERASE_SECTOR = 0xd8,       /* erase sector */
+-      FW_MAX_SIZE = 512 * 1024,
++      FW_MAX_SIZE = 16 * SF_SEC_SIZE,
+ };
+ /**