diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2010-07-05 08:19:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-05 22:41:21 -0400 |
commit | fbc2ac336796ea686211ca411b23cb0527fca57d (patch) | |
tree | ce69f03ff8ed40d37a7f74b56db5a2e1cb79bdec /drivers/net/qlge | |
parent | 6d29b1ef311d96e737084032a4b080653015aedf (diff) |
qlge: Make adapter drop frame errors and pass up csum errors.
Statistics are available and the driver doesn't need the actual frame.
This TCP/UDP and IP headers checksum errors will still be passed to the
driver.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index a41b6b564042..dd9e86ca7c5a 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -574,6 +574,22 @@ static int ql_set_routing_reg(struct ql_adapter *qdev, u32 index, u32 mask, | |||
574 | (RT_IDX_ALL_ERR_SLOT << RT_IDX_IDX_SHIFT);/* index */ | 574 | (RT_IDX_ALL_ERR_SLOT << RT_IDX_IDX_SHIFT);/* index */ |
575 | break; | 575 | break; |
576 | } | 576 | } |
577 | case RT_IDX_IP_CSUM_ERR: /* Pass up IP CSUM error frames. */ | ||
578 | { | ||
579 | value = RT_IDX_DST_DFLT_Q | /* dest */ | ||
580 | RT_IDX_TYPE_NICQ | /* type */ | ||
581 | (RT_IDX_IP_CSUM_ERR_SLOT << | ||
582 | RT_IDX_IDX_SHIFT); /* index */ | ||
583 | break; | ||
584 | } | ||
585 | case RT_IDX_TU_CSUM_ERR: /* Pass up TCP/UDP CSUM error frames. */ | ||
586 | { | ||
587 | value = RT_IDX_DST_DFLT_Q | /* dest */ | ||
588 | RT_IDX_TYPE_NICQ | /* type */ | ||
589 | (RT_IDX_TCP_UDP_CSUM_ERR_SLOT << | ||
590 | RT_IDX_IDX_SHIFT); /* index */ | ||
591 | break; | ||
592 | } | ||
577 | case RT_IDX_BCAST: /* Pass up Broadcast frames to default Q. */ | 593 | case RT_IDX_BCAST: /* Pass up Broadcast frames to default Q. */ |
578 | { | 594 | { |
579 | value = RT_IDX_DST_DFLT_Q | /* dest */ | 595 | value = RT_IDX_DST_DFLT_Q | /* dest */ |
@@ -3587,10 +3603,20 @@ static int ql_route_initialize(struct ql_adapter *qdev) | |||
3587 | if (status) | 3603 | if (status) |
3588 | return status; | 3604 | return status; |
3589 | 3605 | ||
3590 | status = ql_set_routing_reg(qdev, RT_IDX_ALL_ERR_SLOT, RT_IDX_ERR, 1); | 3606 | status = ql_set_routing_reg(qdev, RT_IDX_IP_CSUM_ERR_SLOT, |
3607 | RT_IDX_IP_CSUM_ERR, 1); | ||
3608 | if (status) { | ||
3609 | netif_err(qdev, ifup, qdev->ndev, | ||
3610 | "Failed to init routing register " | ||
3611 | "for IP CSUM error packets.\n"); | ||
3612 | goto exit; | ||
3613 | } | ||
3614 | status = ql_set_routing_reg(qdev, RT_IDX_TCP_UDP_CSUM_ERR_SLOT, | ||
3615 | RT_IDX_TU_CSUM_ERR, 1); | ||
3591 | if (status) { | 3616 | if (status) { |
3592 | netif_err(qdev, ifup, qdev->ndev, | 3617 | netif_err(qdev, ifup, qdev->ndev, |
3593 | "Failed to init routing register for error packets.\n"); | 3618 | "Failed to init routing register " |
3619 | "for TCP/UDP CSUM error packets.\n"); | ||
3594 | goto exit; | 3620 | goto exit; |
3595 | } | 3621 | } |
3596 | status = ql_set_routing_reg(qdev, RT_IDX_BCAST_SLOT, RT_IDX_BCAST, 1); | 3622 | status = ql_set_routing_reg(qdev, RT_IDX_BCAST_SLOT, RT_IDX_BCAST, 1); |