aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-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 3defe5d4f7d3..74764694c64f 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3960,7 +3960,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3960 txdp->Control_2 = 0; 3960 txdp->Control_2 = 0;
3961#ifdef NETIF_F_TSO 3961#ifdef NETIF_F_TSO
3962 mss = skb_shinfo(skb)->gso_size; 3962 mss = skb_shinfo(skb)->gso_size;
3963 if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) { 3963 if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) {
3964 txdp->Control_1 |= TXD_TCP_LSO_EN; 3964 txdp->Control_1 |= TXD_TCP_LSO_EN;
3965 txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); 3965 txdp->Control_1 |= TXD_TCP_LSO_MSS(mss);
3966 } 3966 }
@@ -3980,7 +3980,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3980 } 3980 }
3981 3981
3982 frg_len = skb->len - skb->data_len; 3982 frg_len = skb->len - skb->data_len;
3983 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) { 3983 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) {
3984 int ufo_size; 3984 int ufo_size;
3985 3985
3986 ufo_size = skb_shinfo(skb)->gso_size; 3986 ufo_size = skb_shinfo(skb)->gso_size;
@@ -4009,7 +4009,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4009 txdp->Host_Control = (unsigned long) skb; 4009 txdp->Host_Control = (unsigned long) skb;
4010 txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); 4010 txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len);
4011 4011
4012 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4012 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4013 txdp->Control_1 |= TXD_UFO_EN; 4013 txdp->Control_1 |= TXD_UFO_EN;
4014 4014
4015 frg_cnt = skb_shinfo(skb)->nr_frags; 4015 frg_cnt = skb_shinfo(skb)->nr_frags;
@@ -4024,12 +4024,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4024 (sp->pdev, frag->page, frag->page_offset, 4024 (sp->pdev, frag->page, frag->page_offset,
4025 frag->size, PCI_DMA_TODEVICE); 4025 frag->size, PCI_DMA_TODEVICE);
4026 txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); 4026 txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size);
4027 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4027 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4028 txdp->Control_1 |= TXD_UFO_EN; 4028 txdp->Control_1 |= TXD_UFO_EN;
4029 } 4029 }
4030 txdp->Control_1 |= TXD_GATHER_CODE_LAST; 4030 txdp->Control_1 |= TXD_GATHER_CODE_LAST;
4031 4031
4032 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4032 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4033 frg_cnt++; /* as Txd0 was used for inband header */ 4033 frg_cnt++; /* as Txd0 was used for inband header */
4034 4034
4035 tx_fifo = mac_control->tx_FIFO_start[queue]; 4035 tx_fifo = mac_control->tx_FIFO_start[queue];
@@ -4043,7 +4043,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4043 if (mss) 4043 if (mss)
4044 val64 |= TX_FIFO_SPECIAL_FUNC; 4044 val64 |= TX_FIFO_SPECIAL_FUNC;
4045#endif 4045#endif
4046 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4046 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4047 val64 |= TX_FIFO_SPECIAL_FUNC; 4047 val64 |= TX_FIFO_SPECIAL_FUNC;
4048 writeq(val64, &tx_fifo->List_Control); 4048 writeq(val64, &tx_fifo->List_Control);
4049 4049
@@ -7021,6 +7021,9 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7021#ifdef NETIF_F_TSO 7021#ifdef NETIF_F_TSO
7022 dev->features |= NETIF_F_TSO; 7022 dev->features |= NETIF_F_TSO;
7023#endif 7023#endif
7024#ifdef NETIF_F_TSO6
7025 dev->features |= NETIF_F_TSO6;
7026#endif
7024 if (sp->device_type & XFRAME_II_DEVICE) { 7027 if (sp->device_type & XFRAME_II_DEVICE) {
7025 dev->features |= NETIF_F_UFO; 7028 dev->features |= NETIF_F_UFO;
7026 dev->features |= NETIF_F_HW_CSUM; 7029 dev->features |= NETIF_F_HW_CSUM;