aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-30 18:40:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-30 18:40:17 -0400
commite37a72de84d27ee8bc0e7dbb5c2f1774ed306dbb (patch)
treef9da35cbd79b52a5bd08d4a0f960bde6af741da0 /drivers/net/s2io.c
parent93fdf10d4c28edaa1b9f80e7f9c3002359186d00 (diff)
parentf83ef8c0b58dac17211a4c0b6df0e2b1bd6637b1 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV6]: Added GSO support for TCPv6 [NET]: Generalise TSO-specific bits from skb_setup_caps [IPV6]: Added GSO support for TCPv6 [IPV6]: Remove redundant length check on input [NETFILTER]: SCTP conntrack: fix crash triggered by packet without chunks [TG3]: Update version and reldate [TG3]: Add TSO workaround using GSO [TG3]: Turn on hw fix for ASF problems [TG3]: Add rx BD workaround [TG3]: Add tg3_netif_stop() in vlan functions [TCP]: Reset gso_segs if packet is dodgy
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 25d289eaaa20..001344c0763e 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3959,7 +3959,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3959 txdp->Control_2 = 0; 3959 txdp->Control_2 = 0;
3960#ifdef NETIF_F_TSO 3960#ifdef NETIF_F_TSO
3961 mss = skb_shinfo(skb)->gso_size; 3961 mss = skb_shinfo(skb)->gso_size;
3962 if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) { 3962 if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) {
3963 txdp->Control_1 |= TXD_TCP_LSO_EN; 3963 txdp->Control_1 |= TXD_TCP_LSO_EN;
3964 txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); 3964 txdp->Control_1 |= TXD_TCP_LSO_MSS(mss);
3965 } 3965 }
@@ -3979,7 +3979,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3979 } 3979 }
3980 3980
3981 frg_len = skb->len - skb->data_len; 3981 frg_len = skb->len - skb->data_len;
3982 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) { 3982 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) {
3983 int ufo_size; 3983 int ufo_size;
3984 3984
3985 ufo_size = skb_shinfo(skb)->gso_size; 3985 ufo_size = skb_shinfo(skb)->gso_size;
@@ -4008,7 +4008,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4008 txdp->Host_Control = (unsigned long) skb; 4008 txdp->Host_Control = (unsigned long) skb;
4009 txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); 4009 txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len);
4010 4010
4011 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4011 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4012 txdp->Control_1 |= TXD_UFO_EN; 4012 txdp->Control_1 |= TXD_UFO_EN;
4013 4013
4014 frg_cnt = skb_shinfo(skb)->nr_frags; 4014 frg_cnt = skb_shinfo(skb)->nr_frags;
@@ -4023,12 +4023,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4023 (sp->pdev, frag->page, frag->page_offset, 4023 (sp->pdev, frag->page, frag->page_offset,
4024 frag->size, PCI_DMA_TODEVICE); 4024 frag->size, PCI_DMA_TODEVICE);
4025 txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); 4025 txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size);
4026 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4026 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4027 txdp->Control_1 |= TXD_UFO_EN; 4027 txdp->Control_1 |= TXD_UFO_EN;
4028 } 4028 }
4029 txdp->Control_1 |= TXD_GATHER_CODE_LAST; 4029 txdp->Control_1 |= TXD_GATHER_CODE_LAST;
4030 4030
4031 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4031 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4032 frg_cnt++; /* as Txd0 was used for inband header */ 4032 frg_cnt++; /* as Txd0 was used for inband header */
4033 4033
4034 tx_fifo = mac_control->tx_FIFO_start[queue]; 4034 tx_fifo = mac_control->tx_FIFO_start[queue];
@@ -4042,7 +4042,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4042 if (mss) 4042 if (mss)
4043 val64 |= TX_FIFO_SPECIAL_FUNC; 4043 val64 |= TX_FIFO_SPECIAL_FUNC;
4044#endif 4044#endif
4045 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4045 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4046 val64 |= TX_FIFO_SPECIAL_FUNC; 4046 val64 |= TX_FIFO_SPECIAL_FUNC;
4047 writeq(val64, &tx_fifo->List_Control); 4047 writeq(val64, &tx_fifo->List_Control);
4048 4048
@@ -7020,6 +7020,9 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7020#ifdef NETIF_F_TSO 7020#ifdef NETIF_F_TSO
7021 dev->features |= NETIF_F_TSO; 7021 dev->features |= NETIF_F_TSO;
7022#endif 7022#endif
7023#ifdef NETIF_F_TSO6
7024 dev->features |= NETIF_F_TSO6;
7025#endif
7023 if (sp->device_type & XFRAME_II_DEVICE) { 7026 if (sp->device_type & XFRAME_II_DEVICE) {
7024 dev->features |= NETIF_F_UFO; 7027 dev->features |= NETIF_F_UFO;
7025 dev->features |= NETIF_F_HW_CSUM; 7028 dev->features |= NETIF_F_HW_CSUM;