diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-10-08 05:54:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-09 01:54:48 -0400 |
commit | 76b26694cc9eb8c7ea1004b0601a5953cfa57b89 (patch) | |
tree | 5ac3e93827c1b8dec2f421d7d0d27f359c14a4fc /drivers/net | |
parent | e163d7f2775624fcd7d21a060e18171fe006106d (diff) |
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: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 20c074ce5d51..e1203bf08058 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -320,6 +320,37 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type, | |||
320 | 320 | ||
321 | switch (type) { | 321 | switch (type) { |
322 | case MAC_ADDR_TYPE_MULTI_MAC: | 322 | case MAC_ADDR_TYPE_MULTI_MAC: |
323 | { | ||
324 | u32 upper = (addr[0] << 8) | addr[1]; | ||
325 | u32 lower = (addr[2] << 24) | (addr[3] << 16) | | ||
326 | (addr[4] << 8) | (addr[5]); | ||
327 | |||
328 | status = | ||
329 | ql_wait_reg_rdy(qdev, | ||
330 | MAC_ADDR_IDX, MAC_ADDR_MW, 0); | ||
331 | if (status) | ||
332 | goto exit; | ||
333 | ql_write32(qdev, MAC_ADDR_IDX, (offset++) | | ||
334 | (index << MAC_ADDR_IDX_SHIFT) | | ||
335 | type | MAC_ADDR_E); | ||
336 | ql_write32(qdev, MAC_ADDR_DATA, lower); | ||
337 | status = | ||
338 | ql_wait_reg_rdy(qdev, | ||
339 | MAC_ADDR_IDX, MAC_ADDR_MW, 0); | ||
340 | if (status) | ||
341 | goto exit; | ||
342 | ql_write32(qdev, MAC_ADDR_IDX, (offset++) | | ||
343 | (index << MAC_ADDR_IDX_SHIFT) | | ||
344 | type | MAC_ADDR_E); | ||
345 | |||
346 | ql_write32(qdev, MAC_ADDR_DATA, upper); | ||
347 | status = | ||
348 | ql_wait_reg_rdy(qdev, | ||
349 | MAC_ADDR_IDX, MAC_ADDR_MW, 0); | ||
350 | if (status) | ||
351 | goto exit; | ||
352 | break; | ||
353 | } | ||
323 | case MAC_ADDR_TYPE_CAM_MAC: | 354 | case MAC_ADDR_TYPE_CAM_MAC: |
324 | { | 355 | { |
325 | u32 cam_output; | 356 | u32 cam_output; |
@@ -365,16 +396,14 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type, | |||
365 | and possibly the function id. Right now we hardcode | 396 | and possibly the function id. Right now we hardcode |
366 | the route field to NIC core. | 397 | the route field to NIC core. |
367 | */ | 398 | */ |
368 | if (type == MAC_ADDR_TYPE_CAM_MAC) { | 399 | cam_output = (CAM_OUT_ROUTE_NIC | |
369 | cam_output = (CAM_OUT_ROUTE_NIC | | 400 | (qdev-> |
370 | (qdev-> | 401 | func << CAM_OUT_FUNC_SHIFT) | |
371 | func << CAM_OUT_FUNC_SHIFT) | | 402 | (0 << CAM_OUT_CQ_ID_SHIFT)); |
372 | (0 << CAM_OUT_CQ_ID_SHIFT)); | 403 | if (qdev->vlgrp) |
373 | if (qdev->vlgrp) | 404 | cam_output |= CAM_OUT_RV; |
374 | cam_output |= CAM_OUT_RV; | 405 | /* route to NIC core */ |
375 | /* route to NIC core */ | 406 | ql_write32(qdev, MAC_ADDR_DATA, cam_output); |
376 | ql_write32(qdev, MAC_ADDR_DATA, cam_output); | ||
377 | } | ||
378 | break; | 407 | break; |
379 | } | 408 | } |
380 | case MAC_ADDR_TYPE_VLAN: | 409 | case MAC_ADDR_TYPE_VLAN: |