diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
tree | 2624a44924c625c367f3cebf937853b9da2de282 /drivers/net/s2io.c | |
parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 3defe5d4f7d3..c6b77acb35ef 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> |
@@ -3762,7 +3761,7 @@ static int s2io_open(struct net_device *dev) | |||
3762 | /* After proper initialization of H/W, register ISR */ | 3761 | /* After proper initialization of H/W, register ISR */ |
3763 | if (sp->intr_type == MSI) { | 3762 | if (sp->intr_type == MSI) { |
3764 | err = request_irq((int) sp->pdev->irq, s2io_msi_handle, | 3763 | err = request_irq((int) sp->pdev->irq, s2io_msi_handle, |
3765 | SA_SHIRQ, sp->name, dev); | 3764 | IRQF_SHARED, sp->name, dev); |
3766 | if (err) { | 3765 | if (err) { |
3767 | DBG_PRINT(ERR_DBG, "%s: MSI registration \ | 3766 | DBG_PRINT(ERR_DBG, "%s: MSI registration \ |
3768 | failed\n", dev->name); | 3767 | failed\n", dev->name); |
@@ -3800,7 +3799,7 @@ failed\n", dev->name, i); | |||
3800 | } | 3799 | } |
3801 | } | 3800 | } |
3802 | if (sp->intr_type == INTA) { | 3801 | if (sp->intr_type == INTA) { |
3803 | err = request_irq((int) sp->pdev->irq, s2io_isr, SA_SHIRQ, | 3802 | err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED, |
3804 | sp->name, dev); | 3803 | sp->name, dev); |
3805 | if (err) { | 3804 | if (err) { |
3806 | DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", | 3805 | DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", |
@@ -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; |