aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-09-26 14:57:43 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-27 17:56:31 -0400
commit14d0263fea0613d4f83dc5e3ad4631f363d1689f (patch)
treeb8c9976416cb1c031f10de3ba4107b251f3b7850 /drivers/net/sky2.h
parent2bb8c26242c2393b097a993ffe9b003ec9b85395 (diff)
[PATCH] sky2: fragmented receive for large MTU
Use hardware support for chained receive to break up large frames into multiple pages. This avoids having to do a mult-page allocation that can fail on a busy system due to fragmented memory. For normal size MTU, this code behaves the same. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r--drivers/net/sky2.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index 403486a3831d..f66109a96d95 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -4,6 +4,8 @@
4#ifndef _SKY2_H 4#ifndef _SKY2_H
5#define _SKY2_H 5#define _SKY2_H
6 6
7#define ETH_JUMBO_MTU 9000 /* Maximum MTU supported */
8
7/* PCI device specific config registers */ 9/* PCI device specific config registers */
8enum { 10enum {
9 PCI_DEV_REG1 = 0x40, 11 PCI_DEV_REG1 = 0x40,
@@ -1779,7 +1781,9 @@ struct tx_ring_info {
1779 1781
1780struct rx_ring_info { 1782struct rx_ring_info {
1781 struct sk_buff *skb; 1783 struct sk_buff *skb;
1782 dma_addr_t mapaddr; 1784 dma_addr_t data_addr;
1785 DECLARE_PCI_UNMAP_ADDR(data_size);
1786 dma_addr_t frag_addr[ETH_JUMBO_MTU >> PAGE_SHIFT];
1783}; 1787};
1784 1788
1785struct sky2_port { 1789struct sky2_port {
@@ -1804,7 +1808,9 @@ struct sky2_port {
1804 u16 rx_next; /* next re to check */ 1808 u16 rx_next; /* next re to check */
1805 u16 rx_put; /* next le index to use */ 1809 u16 rx_put; /* next le index to use */
1806 u16 rx_pending; 1810 u16 rx_pending;
1807 u16 rx_bufsize; 1811 u16 rx_data_size;
1812 u16 rx_nfrags;
1813
1808#ifdef SKY2_VLAN_TAG_USED 1814#ifdef SKY2_VLAN_TAG_USED
1809 u16 rx_tag; 1815 u16 rx_tag;
1810 struct vlan_group *vlgrp; 1816 struct vlan_group *vlgrp;