qlge: Fix RX multicast filter settings.
authorRon Mercer <ron.mercer@qlogic.com>
Thu, 8 Oct 2009 09:54:40 +0000 (09:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Oct 2009 05:54:48 +0000 (22:54 -0700)
The addresses were being added to the filter properly, but were not
being enabled.  This adds enable bit to filter write.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c

index 20c074ce5d512c9352d6c67b5c55329443ad5f00..e1203bf080587ef5d59d364384dcd7cac2cf49e7 100644 (file)
@@ -320,6 +320,37 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
 
        switch (type) {
        case MAC_ADDR_TYPE_MULTI_MAC:
+               {
+                       u32 upper = (addr[0] << 8) | addr[1];
+                       u32 lower = (addr[2] << 24) | (addr[3] << 16) |
+                                       (addr[4] << 8) | (addr[5]);
+
+                       status =
+                               ql_wait_reg_rdy(qdev,
+                               MAC_ADDR_IDX, MAC_ADDR_MW, 0);
+                       if (status)
+                               goto exit;
+                       ql_write32(qdev, MAC_ADDR_IDX, (offset++) |
+                               (index << MAC_ADDR_IDX_SHIFT) |
+                               type | MAC_ADDR_E);
+                       ql_write32(qdev, MAC_ADDR_DATA, lower);
+                       status =
+                               ql_wait_reg_rdy(qdev,
+                               MAC_ADDR_IDX, MAC_ADDR_MW, 0);
+                       if (status)
+                               goto exit;
+                       ql_write32(qdev, MAC_ADDR_IDX, (offset++) |
+                               (index << MAC_ADDR_IDX_SHIFT) |
+                               type | MAC_ADDR_E);
+
+                       ql_write32(qdev, MAC_ADDR_DATA, upper);
+                       status =
+                               ql_wait_reg_rdy(qdev,
+                               MAC_ADDR_IDX, MAC_ADDR_MW, 0);
+                       if (status)
+                               goto exit;
+                       break;
+               }
        case MAC_ADDR_TYPE_CAM_MAC:
                {
                        u32 cam_output;
@@ -365,16 +396,14 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
                           and possibly the function id.  Right now we hardcode
                           the route field to NIC core.
                         */
-                       if (type == MAC_ADDR_TYPE_CAM_MAC) {
-                               cam_output = (CAM_OUT_ROUTE_NIC |
-                                             (qdev->
-                                              func << CAM_OUT_FUNC_SHIFT) |
-                                               (0 << CAM_OUT_CQ_ID_SHIFT));
-                               if (qdev->vlgrp)
-                                       cam_output |= CAM_OUT_RV;
-                               /* route to NIC core */
-                               ql_write32(qdev, MAC_ADDR_DATA, cam_output);
-                       }
+                       cam_output = (CAM_OUT_ROUTE_NIC |
+                                     (qdev->
+                                      func << CAM_OUT_FUNC_SHIFT) |
+                                       (0 << CAM_OUT_CQ_ID_SHIFT));
+                       if (qdev->vlgrp)
+                               cam_output |= CAM_OUT_RV;
+                       /* route to NIC core */
+                       ql_write32(qdev, MAC_ADDR_DATA, cam_output);
                        break;
                }
        case MAC_ADDR_TYPE_VLAN: