diff options
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 3defe5d4f7d3..001344c0763e 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * aggregated as a single large packet | 44 | * aggregated as a single large packet |
45 | ************************************************************************/ | 45 | ************************************************************************/ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/module.h> | 47 | #include <linux/module.h> |
49 | #include <linux/types.h> | 48 | #include <linux/types.h> |
50 | #include <linux/errno.h> | 49 | #include <linux/errno.h> |
@@ -3960,7 +3959,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3960 | txdp->Control_2 = 0; | 3959 | txdp->Control_2 = 0; |
3961 | #ifdef NETIF_F_TSO | 3960 | #ifdef NETIF_F_TSO |
3962 | mss = skb_shinfo(skb)->gso_size; | 3961 | mss = skb_shinfo(skb)->gso_size; |
3963 | if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) { | 3962 | if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) { |
3964 | txdp->Control_1 |= TXD_TCP_LSO_EN; | 3963 | txdp->Control_1 |= TXD_TCP_LSO_EN; |
3965 | txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); | 3964 | txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); |
3966 | } | 3965 | } |
@@ -3980,7 +3979,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3980 | } | 3979 | } |
3981 | 3980 | ||
3982 | frg_len = skb->len - skb->data_len; | 3981 | frg_len = skb->len - skb->data_len; |
3983 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) { | 3982 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) { |
3984 | int ufo_size; | 3983 | int ufo_size; |
3985 | 3984 | ||
3986 | ufo_size = skb_shinfo(skb)->gso_size; | 3985 | ufo_size = skb_shinfo(skb)->gso_size; |
@@ -4009,7 +4008,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4009 | txdp->Host_Control = (unsigned long) skb; | 4008 | txdp->Host_Control = (unsigned long) skb; |
4010 | txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); | 4009 | txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); |
4011 | 4010 | ||
4012 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4011 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4013 | txdp->Control_1 |= TXD_UFO_EN; | 4012 | txdp->Control_1 |= TXD_UFO_EN; |
4014 | 4013 | ||
4015 | frg_cnt = skb_shinfo(skb)->nr_frags; | 4014 | frg_cnt = skb_shinfo(skb)->nr_frags; |
@@ -4024,12 +4023,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4024 | (sp->pdev, frag->page, frag->page_offset, | 4023 | (sp->pdev, frag->page, frag->page_offset, |
4025 | frag->size, PCI_DMA_TODEVICE); | 4024 | frag->size, PCI_DMA_TODEVICE); |
4026 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); | 4025 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); |
4027 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4026 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4028 | txdp->Control_1 |= TXD_UFO_EN; | 4027 | txdp->Control_1 |= TXD_UFO_EN; |
4029 | } | 4028 | } |
4030 | txdp->Control_1 |= TXD_GATHER_CODE_LAST; | 4029 | txdp->Control_1 |= TXD_GATHER_CODE_LAST; |
4031 | 4030 | ||
4032 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4031 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4033 | frg_cnt++; /* as Txd0 was used for inband header */ | 4032 | frg_cnt++; /* as Txd0 was used for inband header */ |
4034 | 4033 | ||
4035 | tx_fifo = mac_control->tx_FIFO_start[queue]; | 4034 | tx_fifo = mac_control->tx_FIFO_start[queue]; |
@@ -4043,7 +4042,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4043 | if (mss) | 4042 | if (mss) |
4044 | val64 |= TX_FIFO_SPECIAL_FUNC; | 4043 | val64 |= TX_FIFO_SPECIAL_FUNC; |
4045 | #endif | 4044 | #endif |
4046 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4045 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4047 | val64 |= TX_FIFO_SPECIAL_FUNC; | 4046 | val64 |= TX_FIFO_SPECIAL_FUNC; |
4048 | writeq(val64, &tx_fifo->List_Control); | 4047 | writeq(val64, &tx_fifo->List_Control); |
4049 | 4048 | ||
@@ -7021,6 +7020,9 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7021 | #ifdef NETIF_F_TSO | 7020 | #ifdef NETIF_F_TSO |
7022 | dev->features |= NETIF_F_TSO; | 7021 | dev->features |= NETIF_F_TSO; |
7023 | #endif | 7022 | #endif |
7023 | #ifdef NETIF_F_TSO6 | ||
7024 | dev->features |= NETIF_F_TSO6; | ||
7025 | #endif | ||
7024 | if (sp->device_type & XFRAME_II_DEVICE) { | 7026 | if (sp->device_type & XFRAME_II_DEVICE) { |
7025 | dev->features |= NETIF_F_UFO; | 7027 | dev->features |= NETIF_F_UFO; |
7026 | dev->features |= NETIF_F_HW_CSUM; | 7028 | dev->features |= NETIF_F_HW_CSUM; |