aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2010-02-17 01:41:21 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 16:35:37 -0500
commitc0c56955e7325ba2f910c760111457adc21ef0d4 (patch)
tree30aeef6b13f83e030508a0dd1564e49fe3e7ed82 /drivers/net/qlge
parent8ea7a37c5a312bfee51ff7f12f78efe4fbc901cc (diff)
qlge: Fix dropping of large non-TCP/UDP frames.
This was found with pings that were large enough to span multiple rx buffers. The split frame logic handles this case nicely. 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.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 2c052caee884..0541e777694d 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -2066,21 +2066,11 @@ static unsigned long ql_process_mac_rx_intr(struct ql_adapter *qdev,
2066 ql_process_mac_rx_page(qdev, rx_ring, ib_mac_rsp, 2066 ql_process_mac_rx_page(qdev, rx_ring, ib_mac_rsp,
2067 length, vlan_id); 2067 length, vlan_id);
2068 } else { 2068 } else {
2069 struct bq_desc *lbq_desc; 2069 /* Non-TCP/UDP large frames that span multiple buffers
2070 2070 * can be processed corrrectly by the split frame logic.
2071 /* Free small buffer that holds the IAL */ 2071 */
2072 lbq_desc = ql_get_curr_sbuf(rx_ring); 2072 ql_process_mac_split_rx_intr(qdev, rx_ring, ib_mac_rsp,
2073 netif_err(qdev, rx_err, qdev->ndev, 2073 vlan_id);
2074 "Dropping frame, len %d > mtu %d\n",
2075 length, qdev->ndev->mtu);
2076
2077 /* Unwind the large buffers for this frame. */
2078 while (length > 0) {
2079 lbq_desc = ql_get_curr_lchunk(qdev, rx_ring);
2080 length -= (length < rx_ring->lbq_buf_size) ?
2081 length : rx_ring->lbq_buf_size;
2082 put_page(lbq_desc->p.pg_chunk.page);
2083 }
2084 } 2074 }
2085 2075
2086 return (unsigned long)length; 2076 return (unsigned long)length;