aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 21:51:48 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 21:51:48 -0500
commit6f37ac793d6ba7b35d338f791974166f67fdd9ba (patch)
treece7e05fc4ede544021f4e395346a87f649f581f7 /drivers/net
parent2f1f53bdc6531696934f6ee7bbdfa2ab4f4f62a3 (diff)
parentd90bf5a976793edfa88d3bb2393f0231eb8ce1e5 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NET]: rt_check_expire() can take a long time, add a cond_resched() [ISDN] sc: Really, really fix warning [ISDN] sc: Fix sndpkt to have the correct number of arguments [TCP] FRTO: Clear frto_highmark only after process_frto that uses it [NET]: Remove notifier block from chain when register_netdevice_notifier fails [FS_ENET]: Fix module build. [TCP]: Make sure write_queue_from does not begin with NULL ptr [TCP]: Fix size calculation in sk_stream_alloc_pskb [S2IO]: Fixed memory leak when MSI-X vector allocation fails [BONDING]: Fix resource use after free [SYSCTL]: Fix warning for token-ring from sysctl checker [NET] random : secure_tcp_sequence_number should not assume CONFIG_KTIME_SCALAR [IWLWIFI]: Not correctly dealing with hotunplug. [TCP] FRTO: Plug potential LOST-bit leak [TCP] FRTO: Limit snd_cwnd if TCP was application limited [E1000]: Fix schedule while atomic when called from mii-tool. [NETX]: Fix build failure added by 2.6.24 statistics cleanup. [EP93xx_ETH]: Build fix after 2.6.24 NAPI changes. [PKT_SCHED]: Check subqueue status before calling hard_start_xmit
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/arm/ep93xx_eth.c2
-rw-r--r--drivers/net/bonding/bond_main.c4
-rw-r--r--drivers/net/e1000/e1000_main.c13
-rw-r--r--drivers/net/fs_enet/Kconfig11
-rw-r--r--drivers/net/fs_enet/Makefile15
-rw-r--r--drivers/net/netx-eth.c6
-rw-r--r--drivers/net/s2io.c110
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c3
8 files changed, 84 insertions, 80 deletions
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c
index 7f016f3d5bf0..91a6590d107b 100644
--- a/drivers/net/arm/ep93xx_eth.c
+++ b/drivers/net/arm/ep93xx_eth.c
@@ -417,7 +417,7 @@ static irqreturn_t ep93xx_irq(int irq, void *dev_id)
417 417
418 if (status & REG_INTSTS_RX) { 418 if (status & REG_INTSTS_RX) {
419 spin_lock(&ep->rx_lock); 419 spin_lock(&ep->rx_lock);
420 if (likely(__netif_rx_schedule_prep(dev, &ep->napi))) { 420 if (likely(netif_rx_schedule_prep(dev, &ep->napi))) {
421 wrl(ep, REG_INTEN, REG_INTEN_TX); 421 wrl(ep, REG_INTEN, REG_INTEN_TX);
422 __netif_rx_schedule(dev, &ep->napi); 422 __netif_rx_schedule(dev, &ep->napi);
423 } 423 }
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index a198404a3e36..423298c84a1d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1847,9 +1847,9 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
1847*/ 1847*/
1848void bond_destroy(struct bonding *bond) 1848void bond_destroy(struct bonding *bond)
1849{ 1849{
1850 unregister_netdevice(bond->dev);
1851 bond_deinit(bond->dev); 1850 bond_deinit(bond->dev);
1852 bond_destroy_sysfs_entry(bond); 1851 bond_destroy_sysfs_entry(bond);
1852 unregister_netdevice(bond->dev);
1853} 1853}
1854 1854
1855/* 1855/*
@@ -4475,8 +4475,8 @@ static void bond_free_all(void)
4475 bond_mc_list_destroy(bond); 4475 bond_mc_list_destroy(bond);
4476 /* Release the bonded slaves */ 4476 /* Release the bonded slaves */
4477 bond_release_all(bond_dev); 4477 bond_release_all(bond_dev);
4478 unregister_netdevice(bond_dev);
4479 bond_deinit(bond_dev); 4478 bond_deinit(bond_dev);
4479 unregister_netdevice(bond_dev);
4480 } 4480 }
4481 4481
4482#ifdef CONFIG_PROC_FS 4482#ifdef CONFIG_PROC_FS
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 72deff0d4d90..cf39473ef90a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4804,6 +4804,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
4804 spin_unlock_irqrestore(&adapter->stats_lock, flags); 4804 spin_unlock_irqrestore(&adapter->stats_lock, flags);
4805 return -EIO; 4805 return -EIO;
4806 } 4806 }
4807 spin_unlock_irqrestore(&adapter->stats_lock, flags);
4807 if (adapter->hw.media_type == e1000_media_type_copper) { 4808 if (adapter->hw.media_type == e1000_media_type_copper) {
4808 switch (data->reg_num) { 4809 switch (data->reg_num) {
4809 case PHY_CTRL: 4810 case PHY_CTRL:
@@ -4824,12 +4825,8 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
4824 DUPLEX_HALF; 4825 DUPLEX_HALF;
4825 retval = e1000_set_spd_dplx(adapter, 4826 retval = e1000_set_spd_dplx(adapter,
4826 spddplx); 4827 spddplx);
4827 if (retval) { 4828 if (retval)
4828 spin_unlock_irqrestore(
4829 &adapter->stats_lock,
4830 flags);
4831 return retval; 4829 return retval;
4832 }
4833 } 4830 }
4834 if (netif_running(adapter->netdev)) 4831 if (netif_running(adapter->netdev))
4835 e1000_reinit_locked(adapter); 4832 e1000_reinit_locked(adapter);
@@ -4838,11 +4835,8 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
4838 break; 4835 break;
4839 case M88E1000_PHY_SPEC_CTRL: 4836 case M88E1000_PHY_SPEC_CTRL:
4840 case M88E1000_EXT_PHY_SPEC_CTRL: 4837 case M88E1000_EXT_PHY_SPEC_CTRL:
4841 if (e1000_phy_reset(&adapter->hw)) { 4838 if (e1000_phy_reset(&adapter->hw))
4842 spin_unlock_irqrestore(
4843 &adapter->stats_lock, flags);
4844 return -EIO; 4839 return -EIO;
4845 }
4846 break; 4840 break;
4847 } 4841 }
4848 } else { 4842 } else {
@@ -4857,7 +4851,6 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
4857 break; 4851 break;
4858 } 4852 }
4859 } 4853 }
4860 spin_unlock_irqrestore(&adapter->stats_lock, flags);
4861 break; 4854 break;
4862 default: 4855 default:
4863 return -EOPNOTSUPP; 4856 return -EOPNOTSUPP;
diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig
index 2765e49e07df..562ea68ed99b 100644
--- a/drivers/net/fs_enet/Kconfig
+++ b/drivers/net/fs_enet/Kconfig
@@ -2,6 +2,7 @@ config FS_ENET
2 tristate "Freescale Ethernet Driver" 2 tristate "Freescale Ethernet Driver"
3 depends on CPM1 || CPM2 3 depends on CPM1 || CPM2
4 select MII 4 select MII
5 select PHYLIB
5 6
6config FS_ENET_HAS_SCC 7config FS_ENET_HAS_SCC
7 bool "Chip has an SCC usable for ethernet" 8 bool "Chip has an SCC usable for ethernet"
@@ -11,11 +12,19 @@ config FS_ENET_HAS_SCC
11config FS_ENET_HAS_FCC 12config FS_ENET_HAS_FCC
12 bool "Chip has an FCC usable for ethernet" 13 bool "Chip has an FCC usable for ethernet"
13 depends on FS_ENET && CPM2 14 depends on FS_ENET && CPM2
14 select MDIO_BITBANG
15 default y 15 default y
16 16
17config FS_ENET_HAS_FEC 17config FS_ENET_HAS_FEC
18 bool "Chip has an FEC usable for ethernet" 18 bool "Chip has an FEC usable for ethernet"
19 depends on FS_ENET && CPM1 19 depends on FS_ENET && CPM1
20 select FS_ENET_MDIO_FEC
20 default y 21 default y
21 22
23config FS_ENET_MDIO_FEC
24 tristate "MDIO driver for FEC"
25 depends on FS_ENET && CPM1
26
27config FS_ENET_MDIO_FCC
28 tristate "MDIO driver for FCC"
29 depends on FS_ENET && CPM2
30 select MDIO_BITBANG
diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
index 02d4dc18ba69..1ffbe0756a0c 100644
--- a/drivers/net/fs_enet/Makefile
+++ b/drivers/net/fs_enet/Makefile
@@ -4,7 +4,16 @@
4 4
5obj-$(CONFIG_FS_ENET) += fs_enet.o 5obj-$(CONFIG_FS_ENET) += fs_enet.o
6 6
7obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o 7fs_enet-$(CONFIG_FS_ENET_HAS_SCC) += mac-scc.o
8obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o 8fs_enet-$(CONFIG_FS_ENET_HAS_FEC) += mac-fec.o
9fs_enet-$(CONFIG_FS_ENET_HAS_FCC) += mac-fcc.o
9 10
10fs_enet-objs := fs_enet-main.o 11ifeq ($(CONFIG_PPC_CPM_NEW_BINDING),y)
12obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
13obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
14else
15fs_enet-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
16fs_enet-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
17endif
18
19fs_enet-objs := fs_enet-main.o $(fs_enet-m)
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c
index eb0aff787dfd..5267e031daa0 100644
--- a/drivers/net/netx-eth.c
+++ b/drivers/net/netx-eth.c
@@ -128,8 +128,8 @@ netx_eth_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
128 FIFO_PTR_FRAMELEN(len)); 128 FIFO_PTR_FRAMELEN(len));
129 129
130 ndev->trans_start = jiffies; 130 ndev->trans_start = jiffies;
131 dev->stats.tx_packets++; 131 ndev->stats.tx_packets++;
132 dev->stats.tx_bytes += skb->len; 132 ndev->stats.tx_bytes += skb->len;
133 133
134 netif_stop_queue(ndev); 134 netif_stop_queue(ndev);
135 spin_unlock_irq(&priv->lock); 135 spin_unlock_irq(&priv->lock);
@@ -155,7 +155,7 @@ static void netx_eth_receive(struct net_device *ndev)
155 if (unlikely(skb == NULL)) { 155 if (unlikely(skb == NULL)) {
156 printk(KERN_NOTICE "%s: Low memory, packet dropped.\n", 156 printk(KERN_NOTICE "%s: Low memory, packet dropped.\n",
157 ndev->name); 157 ndev->name);
158 dev->stats.rx_dropped++; 158 ndev->stats.rx_dropped++;
159 return; 159 return;
160 } 160 }
161 161
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index b8c0e7b4ca1c..632666706247 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -84,7 +84,7 @@
84#include "s2io.h" 84#include "s2io.h"
85#include "s2io-regs.h" 85#include "s2io-regs.h"
86 86
87#define DRV_VERSION "2.0.26.5" 87#define DRV_VERSION "2.0.26.6"
88 88
89/* S2io Driver name & version. */ 89/* S2io Driver name & version. */
90static char s2io_driver_name[] = "Neterion"; 90static char s2io_driver_name[] = "Neterion";
@@ -3775,6 +3775,40 @@ static int __devinit s2io_test_msi(struct s2io_nic *sp)
3775 3775
3776 return err; 3776 return err;
3777} 3777}
3778
3779static void remove_msix_isr(struct s2io_nic *sp)
3780{
3781 int i;
3782 u16 msi_control;
3783
3784 for (i = 0; i < MAX_REQUESTED_MSI_X; i++) {
3785 if (sp->s2io_entries[i].in_use ==
3786 MSIX_REGISTERED_SUCCESS) {
3787 int vector = sp->entries[i].vector;
3788 void *arg = sp->s2io_entries[i].arg;
3789 free_irq(vector, arg);
3790 }
3791 }
3792
3793 kfree(sp->entries);
3794 kfree(sp->s2io_entries);
3795 sp->entries = NULL;
3796 sp->s2io_entries = NULL;
3797
3798 pci_read_config_word(sp->pdev, 0x42, &msi_control);
3799 msi_control &= 0xFFFE; /* Disable MSI */
3800 pci_write_config_word(sp->pdev, 0x42, msi_control);
3801
3802 pci_disable_msix(sp->pdev);
3803}
3804
3805static void remove_inta_isr(struct s2io_nic *sp)
3806{
3807 struct net_device *dev = sp->dev;
3808
3809 free_irq(sp->pdev->irq, dev);
3810}
3811
3778/* ********************************************************* * 3812/* ********************************************************* *
3779 * Functions defined below concern the OS part of the driver * 3813 * Functions defined below concern the OS part of the driver *
3780 * ********************************************************* */ 3814 * ********************************************************* */
@@ -3809,28 +3843,9 @@ static int s2io_open(struct net_device *dev)
3809 int ret = s2io_enable_msi_x(sp); 3843 int ret = s2io_enable_msi_x(sp);
3810 3844
3811 if (!ret) { 3845 if (!ret) {
3812 u16 msi_control;
3813
3814 ret = s2io_test_msi(sp); 3846 ret = s2io_test_msi(sp);
3815
3816 /* rollback MSI-X, will re-enable during add_isr() */ 3847 /* rollback MSI-X, will re-enable during add_isr() */
3817 kfree(sp->entries); 3848 remove_msix_isr(sp);
3818 sp->mac_control.stats_info->sw_stat.mem_freed +=
3819 (MAX_REQUESTED_MSI_X *
3820 sizeof(struct msix_entry));
3821 kfree(sp->s2io_entries);
3822 sp->mac_control.stats_info->sw_stat.mem_freed +=
3823 (MAX_REQUESTED_MSI_X *
3824 sizeof(struct s2io_msix_entry));
3825 sp->entries = NULL;
3826 sp->s2io_entries = NULL;
3827
3828 pci_read_config_word(sp->pdev, 0x42, &msi_control);
3829 msi_control &= 0xFFFE; /* Disable MSI */
3830 pci_write_config_word(sp->pdev, 0x42, msi_control);
3831
3832 pci_disable_msix(sp->pdev);
3833
3834 } 3849 }
3835 if (ret) { 3850 if (ret) {
3836 3851
@@ -6719,15 +6734,22 @@ static int s2io_add_isr(struct s2io_nic * sp)
6719 } 6734 }
6720 } 6735 }
6721 if (err) { 6736 if (err) {
6737 remove_msix_isr(sp);
6722 DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration " 6738 DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration "
6723 "failed\n", dev->name, i); 6739 "failed\n", dev->name, i);
6724 DBG_PRINT(ERR_DBG, "Returned: %d\n", err); 6740 DBG_PRINT(ERR_DBG, "%s: defaulting to INTA\n",
6725 return -1; 6741 dev->name);
6742 sp->config.intr_type = INTA;
6743 break;
6726 } 6744 }
6727 sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS; 6745 sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS;
6728 } 6746 }
6729 printk("MSI-X-TX %d entries enabled\n",msix_tx_cnt); 6747 if (!err) {
6730 printk("MSI-X-RX %d entries enabled\n",msix_rx_cnt); 6748 printk(KERN_INFO "MSI-X-TX %d entries enabled\n",
6749 msix_tx_cnt);
6750 printk(KERN_INFO "MSI-X-RX %d entries enabled\n",
6751 msix_rx_cnt);
6752 }
6731 } 6753 }
6732 if (sp->config.intr_type == INTA) { 6754 if (sp->config.intr_type == INTA) {
6733 err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED, 6755 err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
@@ -6742,40 +6764,10 @@ static int s2io_add_isr(struct s2io_nic * sp)
6742} 6764}
6743static void s2io_rem_isr(struct s2io_nic * sp) 6765static void s2io_rem_isr(struct s2io_nic * sp)
6744{ 6766{
6745 struct net_device *dev = sp->dev; 6767 if (sp->config.intr_type == MSI_X)
6746 struct swStat *stats = &sp->mac_control.stats_info->sw_stat; 6768 remove_msix_isr(sp);
6747 6769 else
6748 if (sp->config.intr_type == MSI_X) { 6770 remove_inta_isr(sp);
6749 int i;
6750 u16 msi_control;
6751
6752 for (i=1; (sp->s2io_entries[i].in_use ==
6753 MSIX_REGISTERED_SUCCESS); i++) {
6754 int vector = sp->entries[i].vector;
6755 void *arg = sp->s2io_entries[i].arg;
6756
6757 synchronize_irq(vector);
6758 free_irq(vector, arg);
6759 }
6760
6761 kfree(sp->entries);
6762 stats->mem_freed +=
6763 (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry));
6764 kfree(sp->s2io_entries);
6765 stats->mem_freed +=
6766 (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry));
6767 sp->entries = NULL;
6768 sp->s2io_entries = NULL;
6769
6770 pci_read_config_word(sp->pdev, 0x42, &msi_control);
6771 msi_control &= 0xFFFE; /* Disable MSI */
6772 pci_write_config_word(sp->pdev, 0x42, msi_control);
6773
6774 pci_disable_msix(sp->pdev);
6775 } else {
6776 synchronize_irq(sp->pdev->irq);
6777 free_irq(sp->pdev->irq, dev);
6778 }
6779} 6771}
6780 6772
6781static void do_s2io_card_down(struct s2io_nic * sp, int do_io) 6773static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index be7c9f42a340..ee752f1e21dd 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4850,7 +4850,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
4850 if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) { 4850 if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) {
4851 /* Hardware disappeared */ 4851 /* Hardware disappeared */
4852 IWL_WARNING("HARDWARE GONE?? INTA == 0x%080x\n", inta); 4852 IWL_WARNING("HARDWARE GONE?? INTA == 0x%080x\n", inta);
4853 goto none; 4853 goto unplugged;
4854 } 4854 }
4855 4855
4856 IWL_DEBUG_ISR("ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", 4856 IWL_DEBUG_ISR("ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
@@ -4858,6 +4858,7 @@ static irqreturn_t iwl_isr(int irq, void *data)
4858 4858
4859 /* iwl_irq_tasklet() will service interrupts and re-enable them */ 4859 /* iwl_irq_tasklet() will service interrupts and re-enable them */
4860 tasklet_schedule(&priv->irq_tasklet); 4860 tasklet_schedule(&priv->irq_tasklet);
4861unplugged:
4861 spin_unlock(&priv->lock); 4862 spin_unlock(&priv->lock);
4862 4863
4863 return IRQ_HANDLED; 4864 return IRQ_HANDLED;