Commit 76b26694 authored by Ron Mercer's avatar Ron Mercer Committed by David S. Miller
Browse files

qlge: Fix RX multicast filter settings.



The addresses were being added to the filter properly, but were not
being enabled.  This adds enable bit to filter write.

Signed-off-by: default avatarRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e163d7f2
Loading
Loading
Loading
Loading
+39 −10
Original line number Original line Diff line number Diff line
@@ -320,6 +320,37 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,


	switch (type) {
	switch (type) {
	case MAC_ADDR_TYPE_MULTI_MAC:
	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:
	case MAC_ADDR_TYPE_CAM_MAC:
		{
		{
			u32 cam_output;
			u32 cam_output;
@@ -365,7 +396,6 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
			   and possibly the function id.  Right now we hardcode
			   and possibly the function id.  Right now we hardcode
			   the route field to NIC core.
			   the route field to NIC core.
			 */
			 */
			if (type == MAC_ADDR_TYPE_CAM_MAC) {
			cam_output = (CAM_OUT_ROUTE_NIC |
			cam_output = (CAM_OUT_ROUTE_NIC |
				      (qdev->
				      (qdev->
				       func << CAM_OUT_FUNC_SHIFT) |
				       func << CAM_OUT_FUNC_SHIFT) |
@@ -374,7 +404,6 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
				cam_output |= CAM_OUT_RV;
				cam_output |= CAM_OUT_RV;
			/* route to NIC core */
			/* route to NIC core */
			ql_write32(qdev, MAC_ADDR_DATA, cam_output);
			ql_write32(qdev, MAC_ADDR_DATA, cam_output);
			}
			break;
			break;
		}
		}
	case MAC_ADDR_TYPE_VLAN:
	case MAC_ADDR_TYPE_VLAN: