diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:51:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:51:48 -0500 |
commit | 6f37ac793d6ba7b35d338f791974166f67fdd9ba (patch) | |
tree | ce7e05fc4ede544021f4e395346a87f649f581f7 | |
parent | 2f1f53bdc6531696934f6ee7bbdfa2ab4f4f62a3 (diff) | |
parent | d90bf5a976793edfa88d3bb2393f0231eb8ce1e5 (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
-rw-r--r-- | drivers/char/random.c | 6 | ||||
-rw-r--r-- | drivers/isdn/sc/card.h | 2 | ||||
-rw-r--r-- | drivers/isdn/sc/packet.c | 2 | ||||
-rw-r--r-- | drivers/isdn/sc/shmem.c | 2 | ||||
-rw-r--r-- | drivers/net/arm/ep93xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 13 | ||||
-rw-r--r-- | drivers/net/fs_enet/Kconfig | 11 | ||||
-rw-r--r-- | drivers/net/fs_enet/Makefile | 15 | ||||
-rw-r--r-- | drivers/net/netx-eth.c | 6 | ||||
-rw-r--r-- | drivers/net/s2io.c | 110 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 3 | ||||
-rw-r--r-- | include/net/sock.h | 10 | ||||
-rw-r--r-- | kernel/sysctl_check.c | 2 | ||||
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/ipv4/route.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 16 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 5 |
18 files changed, 118 insertions, 96 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index 1756b1f7cb72..5fee05661823 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1494,7 +1494,7 @@ __u32 secure_tcpv6_sequence_number(__be32 *saddr, __be32 *daddr, | |||
1494 | seq = twothirdsMD4Transform((const __u32 *)daddr, hash) & HASH_MASK; | 1494 | seq = twothirdsMD4Transform((const __u32 *)daddr, hash) & HASH_MASK; |
1495 | seq += keyptr->count; | 1495 | seq += keyptr->count; |
1496 | 1496 | ||
1497 | seq += ktime_get_real().tv64; | 1497 | seq += ktime_to_ns(ktime_get_real()); |
1498 | 1498 | ||
1499 | return seq; | 1499 | return seq; |
1500 | } | 1500 | } |
@@ -1556,7 +1556,7 @@ __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, | |||
1556 | * overlaps less than one time per MSL (2 minutes). | 1556 | * overlaps less than one time per MSL (2 minutes). |
1557 | * Choosing a clock of 64 ns period is OK. (period of 274 s) | 1557 | * Choosing a clock of 64 ns period is OK. (period of 274 s) |
1558 | */ | 1558 | */ |
1559 | seq += ktime_get_real().tv64 >> 6; | 1559 | seq += ktime_to_ns(ktime_get_real()) >> 6; |
1560 | #if 0 | 1560 | #if 0 |
1561 | printk("init_seq(%lx, %lx, %d, %d) = %d\n", | 1561 | printk("init_seq(%lx, %lx, %d, %d) = %d\n", |
1562 | saddr, daddr, sport, dport, seq); | 1562 | saddr, daddr, sport, dport, seq); |
@@ -1616,7 +1616,7 @@ u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, | |||
1616 | seq = half_md4_transform(hash, keyptr->secret); | 1616 | seq = half_md4_transform(hash, keyptr->secret); |
1617 | seq |= ((u64)keyptr->count) << (32 - HASH_BITS); | 1617 | seq |= ((u64)keyptr->count) << (32 - HASH_BITS); |
1618 | 1618 | ||
1619 | seq += ktime_get_real().tv64; | 1619 | seq += ktime_to_ns(ktime_get_real()); |
1620 | seq &= (1ull << 48) - 1; | 1620 | seq &= (1ull << 48) - 1; |
1621 | #if 0 | 1621 | #if 0 |
1622 | printk("dccp init_seq(%lx, %lx, %d, %d) = %d\n", | 1622 | printk("dccp init_seq(%lx, %lx, %d, %d) = %d\n", |
diff --git a/drivers/isdn/sc/card.h b/drivers/isdn/sc/card.h index 5992f63c383e..0120bcf88311 100644 --- a/drivers/isdn/sc/card.h +++ b/drivers/isdn/sc/card.h | |||
@@ -109,7 +109,7 @@ void memcpy_fromshmem(int card, void *dest, const void *src, size_t n); | |||
109 | int get_card_from_id(int driver); | 109 | int get_card_from_id(int driver); |
110 | int indicate_status(int card, int event, ulong Channel, char *Data); | 110 | int indicate_status(int card, int event, ulong Channel, char *Data); |
111 | irqreturn_t interrupt_handler(int interrupt, void *cardptr); | 111 | irqreturn_t interrupt_handler(int interrupt, void *cardptr); |
112 | int sndpkt(int devId, int channel, struct sk_buff *data); | 112 | int sndpkt(int devId, int channel, int ack, struct sk_buff *data); |
113 | void rcvpkt(int card, RspMessage *rcvmsg); | 113 | void rcvpkt(int card, RspMessage *rcvmsg); |
114 | int command(isdn_ctrl *cmd); | 114 | int command(isdn_ctrl *cmd); |
115 | int reset(int card); | 115 | int reset(int card); |
diff --git a/drivers/isdn/sc/packet.c b/drivers/isdn/sc/packet.c index 92016a2608e9..5ff6ae868440 100644 --- a/drivers/isdn/sc/packet.c +++ b/drivers/isdn/sc/packet.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include "message.h" | 20 | #include "message.h" |
21 | #include "card.h" | 21 | #include "card.h" |
22 | 22 | ||
23 | int sndpkt(int devId, int channel, struct sk_buff *data) | 23 | int sndpkt(int devId, int channel, int ack, struct sk_buff *data) |
24 | { | 24 | { |
25 | LLData ReqLnkWrite; | 25 | LLData ReqLnkWrite; |
26 | int status; | 26 | int status; |
diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index e0331e0094f1..712220cef139 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c | |||
@@ -50,7 +50,7 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n) | |||
50 | 50 | ||
51 | outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80, | 51 | outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80, |
52 | sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]); | 52 | sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]); |
53 | memcpy_toio(sc_adapter[card]->rambase + dest_rem, src, n); | 53 | memcpy_toio((void __iomem *)(sc_adapter[card]->rambase + dest_rem), src, n); |
54 | spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); | 54 | spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); |
55 | pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename, | 55 | pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename, |
56 | ((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80); | 56 | ((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80); |
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 | */ |
1848 | void bond_destroy(struct bonding *bond) | 1848 | void 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 | ||
6 | config FS_ENET_HAS_SCC | 7 | config 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 | |||
11 | config FS_ENET_HAS_FCC | 12 | config 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 | ||
17 | config FS_ENET_HAS_FEC | 17 | config 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 | ||
23 | config FS_ENET_MDIO_FEC | ||
24 | tristate "MDIO driver for FEC" | ||
25 | depends on FS_ENET && CPM1 | ||
26 | |||
27 | config 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 | ||
5 | obj-$(CONFIG_FS_ENET) += fs_enet.o | 5 | obj-$(CONFIG_FS_ENET) += fs_enet.o |
6 | 6 | ||
7 | obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o | 7 | fs_enet-$(CONFIG_FS_ENET_HAS_SCC) += mac-scc.o |
8 | obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o | 8 | fs_enet-$(CONFIG_FS_ENET_HAS_FEC) += mac-fec.o |
9 | fs_enet-$(CONFIG_FS_ENET_HAS_FCC) += mac-fcc.o | ||
9 | 10 | ||
10 | fs_enet-objs := fs_enet-main.o | 11 | ifeq ($(CONFIG_PPC_CPM_NEW_BINDING),y) |
12 | obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o | ||
13 | obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o | ||
14 | else | ||
15 | fs_enet-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o | ||
16 | fs_enet-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o | ||
17 | endif | ||
18 | |||
19 | fs_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. */ |
90 | static char s2io_driver_name[] = "Neterion"; | 90 | static 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 | |||
3779 | static 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 | |||
3805 | static 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 | } |
6743 | static void s2io_rem_isr(struct s2io_nic * sp) | 6765 | static 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 | ||
6781 | static void do_s2io_card_down(struct s2io_nic * sp, int do_io) | 6773 | static 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); |
4861 | unplugged: | ||
4861 | spin_unlock(&priv->lock); | 4862 | spin_unlock(&priv->lock); |
4862 | 4863 | ||
4863 | return IRQ_HANDLED; | 4864 | return IRQ_HANDLED; |
diff --git a/include/net/sock.h b/include/net/sock.h index 5504fb9fa88a..567e468d7492 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1235,14 +1235,16 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1235 | gfp_t gfp) | 1235 | gfp_t gfp) |
1236 | { | 1236 | { |
1237 | struct sk_buff *skb; | 1237 | struct sk_buff *skb; |
1238 | int hdr_len; | ||
1239 | 1238 | ||
1240 | hdr_len = SKB_DATA_ALIGN(sk->sk_prot->max_header); | 1239 | skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp); |
1241 | skb = alloc_skb_fclone(size + hdr_len, gfp); | ||
1242 | if (skb) { | 1240 | if (skb) { |
1243 | skb->truesize += mem; | 1241 | skb->truesize += mem; |
1244 | if (sk_stream_wmem_schedule(sk, skb->truesize)) { | 1242 | if (sk_stream_wmem_schedule(sk, skb->truesize)) { |
1245 | skb_reserve(skb, hdr_len); | 1243 | /* |
1244 | * Make sure that we have exactly size bytes | ||
1245 | * available to the caller, no more, no less. | ||
1246 | */ | ||
1247 | skb_reserve(skb, skb_tailroom(skb) - size); | ||
1246 | return skb; | 1248 | return skb; |
1247 | } | 1249 | } |
1248 | __kfree_skb(skb); | 1250 | __kfree_skb(skb); |
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 5a2f2b2bf888..4abc6d2306f4 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c | |||
@@ -738,7 +738,7 @@ static struct trans_ctl_table trans_net_table[] = { | |||
738 | { NET_ROSE, "rose", trans_net_rose_table }, | 738 | { NET_ROSE, "rose", trans_net_rose_table }, |
739 | { NET_IPV6, "ipv6", trans_net_ipv6_table }, | 739 | { NET_IPV6, "ipv6", trans_net_ipv6_table }, |
740 | { NET_X25, "x25", trans_net_x25_table }, | 740 | { NET_X25, "x25", trans_net_x25_table }, |
741 | { NET_TR, "tr", trans_net_tr_table }, | 741 | { NET_TR, "token-ring", trans_net_tr_table }, |
742 | { NET_DECNET, "decnet", trans_net_decnet_table }, | 742 | { NET_DECNET, "decnet", trans_net_decnet_table }, |
743 | /* NET_ECONET not used */ | 743 | /* NET_ECONET not used */ |
744 | { NET_SCTP, "sctp", trans_net_sctp_table }, | 744 | { NET_SCTP, "sctp", trans_net_sctp_table }, |
diff --git a/net/core/dev.c b/net/core/dev.c index dd40b35bb006..86d62611f2fc 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1171,6 +1171,8 @@ rollback: | |||
1171 | nb->notifier_call(nb, NETDEV_UNREGISTER, dev); | 1171 | nb->notifier_call(nb, NETDEV_UNREGISTER, dev); |
1172 | } | 1172 | } |
1173 | } | 1173 | } |
1174 | |||
1175 | raw_notifier_chain_unregister(&netdev_chain, nb); | ||
1174 | goto unlock; | 1176 | goto unlock; |
1175 | } | 1177 | } |
1176 | 1178 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 45651834e1e2..1bff9ed349ff 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -578,6 +578,9 @@ static void rt_check_expire(struct work_struct *work) | |||
578 | i = (i + 1) & rt_hash_mask; | 578 | i = (i + 1) & rt_hash_mask; |
579 | rthp = &rt_hash_table[i].chain; | 579 | rthp = &rt_hash_table[i].chain; |
580 | 580 | ||
581 | if (need_resched()) | ||
582 | cond_resched(); | ||
583 | |||
581 | if (*rthp == NULL) | 584 | if (*rthp == NULL) |
582 | continue; | 585 | continue; |
583 | spin_lock_bh(rt_hash_lock_addr(i)); | 586 | spin_lock_bh(rt_hash_lock_addr(i)); |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 20c9440ab85e..0f0c1c9829a1 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1269,6 +1269,9 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1269 | if (before(TCP_SKB_CB(ack_skb)->ack_seq, prior_snd_una - tp->max_window)) | 1269 | if (before(TCP_SKB_CB(ack_skb)->ack_seq, prior_snd_una - tp->max_window)) |
1270 | return 0; | 1270 | return 0; |
1271 | 1271 | ||
1272 | if (!tp->packets_out) | ||
1273 | goto out; | ||
1274 | |||
1272 | /* SACK fastpath: | 1275 | /* SACK fastpath: |
1273 | * if the only SACK change is the increase of the end_seq of | 1276 | * if the only SACK change is the increase of the end_seq of |
1274 | * the first block then only apply that SACK block | 1277 | * the first block then only apply that SACK block |
@@ -1515,6 +1518,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1515 | (!tp->frto_highmark || after(tp->snd_una, tp->frto_highmark))) | 1518 | (!tp->frto_highmark || after(tp->snd_una, tp->frto_highmark))) |
1516 | tcp_update_reordering(sk, tp->fackets_out - reord, 0); | 1519 | tcp_update_reordering(sk, tp->fackets_out - reord, 0); |
1517 | 1520 | ||
1521 | out: | ||
1522 | |||
1518 | #if FASTRETRANS_DEBUG > 0 | 1523 | #if FASTRETRANS_DEBUG > 0 |
1519 | BUG_TRAP((int)tp->sacked_out >= 0); | 1524 | BUG_TRAP((int)tp->sacked_out >= 0); |
1520 | BUG_TRAP((int)tp->lost_out >= 0); | 1525 | BUG_TRAP((int)tp->lost_out >= 0); |
@@ -1669,6 +1674,9 @@ void tcp_enter_frto(struct sock *sk) | |||
1669 | } | 1674 | } |
1670 | tcp_verify_left_out(tp); | 1675 | tcp_verify_left_out(tp); |
1671 | 1676 | ||
1677 | /* Too bad if TCP was application limited */ | ||
1678 | tp->snd_cwnd = min(tp->snd_cwnd, tcp_packets_in_flight(tp) + 1); | ||
1679 | |||
1672 | /* Earlier loss recovery underway (see RFC4138; Appendix B). | 1680 | /* Earlier loss recovery underway (see RFC4138; Appendix B). |
1673 | * The last condition is necessary at least in tp->frto_counter case. | 1681 | * The last condition is necessary at least in tp->frto_counter case. |
1674 | */ | 1682 | */ |
@@ -1701,6 +1709,8 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag) | |||
1701 | tcp_for_write_queue(skb, sk) { | 1709 | tcp_for_write_queue(skb, sk) { |
1702 | if (skb == tcp_send_head(sk)) | 1710 | if (skb == tcp_send_head(sk)) |
1703 | break; | 1711 | break; |
1712 | |||
1713 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST; | ||
1704 | /* | 1714 | /* |
1705 | * Count the retransmission made on RTO correctly (only when | 1715 | * Count the retransmission made on RTO correctly (only when |
1706 | * waiting for the first ACK and did not get it)... | 1716 | * waiting for the first ACK and did not get it)... |
@@ -1714,7 +1724,7 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag) | |||
1714 | } else { | 1724 | } else { |
1715 | if (TCP_SKB_CB(skb)->sacked & TCPCB_RETRANS) | 1725 | if (TCP_SKB_CB(skb)->sacked & TCPCB_RETRANS) |
1716 | tp->undo_marker = 0; | 1726 | tp->undo_marker = 0; |
1717 | TCP_SKB_CB(skb)->sacked &= ~(TCPCB_LOST|TCPCB_SACKED_RETRANS); | 1727 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; |
1718 | } | 1728 | } |
1719 | 1729 | ||
1720 | /* Don't lost mark skbs that were fwd transmitted after RTO */ | 1730 | /* Don't lost mark skbs that were fwd transmitted after RTO */ |
@@ -3103,11 +3113,11 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag) | |||
3103 | /* See if we can take anything off of the retransmit queue. */ | 3113 | /* See if we can take anything off of the retransmit queue. */ |
3104 | flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets); | 3114 | flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets); |
3105 | 3115 | ||
3116 | if (tp->frto_counter) | ||
3117 | frto_cwnd = tcp_process_frto(sk, flag); | ||
3106 | /* Guarantee sacktag reordering detection against wrap-arounds */ | 3118 | /* Guarantee sacktag reordering detection against wrap-arounds */ |
3107 | if (before(tp->frto_highmark, tp->snd_una)) | 3119 | if (before(tp->frto_highmark, tp->snd_una)) |
3108 | tp->frto_highmark = 0; | 3120 | tp->frto_highmark = 0; |
3109 | if (tp->frto_counter) | ||
3110 | frto_cwnd = tcp_process_frto(sk, flag); | ||
3111 | 3121 | ||
3112 | if (tcp_ack_is_dubious(sk, flag)) { | 3122 | if (tcp_ack_is_dubious(sk, flag)) { |
3113 | /* Advance CWND, if state allows this. */ | 3123 | /* Advance CWND, if state allows this. */ |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index fa1a6f45dc41..e595e6570ce0 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -134,7 +134,7 @@ static inline int qdisc_restart(struct net_device *dev) | |||
134 | { | 134 | { |
135 | struct Qdisc *q = dev->qdisc; | 135 | struct Qdisc *q = dev->qdisc; |
136 | struct sk_buff *skb; | 136 | struct sk_buff *skb; |
137 | int ret; | 137 | int ret = NETDEV_TX_BUSY; |
138 | 138 | ||
139 | /* Dequeue packet */ | 139 | /* Dequeue packet */ |
140 | if (unlikely((skb = dev_dequeue_skb(dev, q)) == NULL)) | 140 | if (unlikely((skb = dev_dequeue_skb(dev, q)) == NULL)) |
@@ -145,7 +145,8 @@ static inline int qdisc_restart(struct net_device *dev) | |||
145 | spin_unlock(&dev->queue_lock); | 145 | spin_unlock(&dev->queue_lock); |
146 | 146 | ||
147 | HARD_TX_LOCK(dev, smp_processor_id()); | 147 | HARD_TX_LOCK(dev, smp_processor_id()); |
148 | ret = dev_hard_start_xmit(skb, dev); | 148 | if (!netif_subqueue_stopped(dev, skb)) |
149 | ret = dev_hard_start_xmit(skb, dev); | ||
149 | HARD_TX_UNLOCK(dev); | 150 | HARD_TX_UNLOCK(dev); |
150 | 151 | ||
151 | spin_lock(&dev->queue_lock); | 152 | spin_lock(&dev->queue_lock); |