diff options
29 files changed, 288 insertions, 206 deletions
diff --git a/Documentation/arm/mem_alignment b/Documentation/arm/mem_alignment index d145ccca169a..c7c7a114c78c 100644 --- a/Documentation/arm/mem_alignment +++ b/Documentation/arm/mem_alignment | |||
@@ -24,7 +24,7 @@ real bad - it changes the behaviour of all unaligned instructions in user | |||
24 | space, and might cause programs to fail unexpectedly. | 24 | space, and might cause programs to fail unexpectedly. |
25 | 25 | ||
26 | To change the alignment trap behavior, simply echo a number into | 26 | To change the alignment trap behavior, simply echo a number into |
27 | /proc/sys/debug/alignment. The number is made up from various bits: | 27 | /proc/cpu/alignment. The number is made up from various bits: |
28 | 28 | ||
29 | bit behavior when set | 29 | bit behavior when set |
30 | --- ----------------- | 30 | --- ----------------- |
diff --git a/MAINTAINERS b/MAINTAINERS index 24741de12a39..09ed704f4dda 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1527,10 +1527,10 @@ W: http://ebtables.sourceforge.net/ | |||
1527 | S: Maintained | 1527 | S: Maintained |
1528 | 1528 | ||
1529 | ECRYPT FILE SYSTEM | 1529 | ECRYPT FILE SYSTEM |
1530 | P: Mike Halcrow, Phillip Hellewell | 1530 | P: Tyler Hicks, Dustin Kirkland |
1531 | M: mhalcrow@us.ibm.com, phillip@hellewell.homeip.net | 1531 | M: tyhicks@linux.vnet.ibm.com, kirkland@canonical.com |
1532 | L: ecryptfs-devel@lists.sourceforge.net | 1532 | L: ecryptfs-devel@lists.launchpad.net |
1533 | W: http://ecryptfs.sourceforge.net/ | 1533 | W: https://launchpad.net/ecryptfs |
1534 | S: Supported | 1534 | S: Supported |
1535 | 1535 | ||
1536 | EDAC-CORE | 1536 | EDAC-CORE |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 47ccec95f3e8..ef12794c3c68 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -630,7 +630,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
630 | return -ENOMEM; | 630 | return -ENOMEM; |
631 | 631 | ||
632 | sachip->clk = clk_get(me, "SA1111_CLK"); | 632 | sachip->clk = clk_get(me, "SA1111_CLK"); |
633 | if (!sachip->clk) { | 633 | if (IS_ERR(sachip->clk)) { |
634 | ret = PTR_ERR(sachip->clk); | 634 | ret = PTR_ERR(sachip->clk); |
635 | goto err_free; | 635 | goto err_free; |
636 | } | 636 | } |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index c74f766ffc12..23af3c972c9a 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -115,6 +115,8 @@ EXPORT_SYMBOL(__strnlen_user); | |||
115 | EXPORT_SYMBOL(__strncpy_from_user); | 115 | EXPORT_SYMBOL(__strncpy_from_user); |
116 | 116 | ||
117 | #ifdef CONFIG_MMU | 117 | #ifdef CONFIG_MMU |
118 | EXPORT_SYMBOL(copy_page); | ||
119 | |||
118 | EXPORT_SYMBOL(__copy_from_user); | 120 | EXPORT_SYMBOL(__copy_from_user); |
119 | EXPORT_SYMBOL(__copy_to_user); | 121 | EXPORT_SYMBOL(__copy_to_user); |
120 | EXPORT_SYMBOL(__clear_user); | 122 | EXPORT_SYMBOL(__clear_user); |
@@ -181,8 +183,6 @@ EXPORT_SYMBOL(_find_first_bit_be); | |||
181 | EXPORT_SYMBOL(_find_next_bit_be); | 183 | EXPORT_SYMBOL(_find_next_bit_be); |
182 | #endif | 184 | #endif |
183 | 185 | ||
184 | EXPORT_SYMBOL(copy_page); | ||
185 | |||
186 | #ifdef CONFIG_FUNCTION_TRACER | 186 | #ifdef CONFIG_FUNCTION_TRACER |
187 | EXPORT_SYMBOL(mcount); | 187 | EXPORT_SYMBOL(mcount); |
188 | #endif | 188 | #endif |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 57e6874d0b80..79abc4ddc0cf 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/personality.h> | 18 | #include <linux/personality.h> |
19 | #include <linux/kallsyms.h> | 19 | #include <linux/kallsyms.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/hardirq.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
23 | 24 | ||
diff --git a/arch/arm/mach-pxa/include/mach/reset.h b/arch/arm/mach-pxa/include/mach/reset.h index 7b8842cfa5fc..31e6a7b6ad80 100644 --- a/arch/arm/mach-pxa/include/mach/reset.h +++ b/arch/arm/mach-pxa/include/mach/reset.h | |||
@@ -12,9 +12,8 @@ extern void clear_reset_status(unsigned int mask); | |||
12 | 12 | ||
13 | /** | 13 | /** |
14 | * init_gpio_reset() - register GPIO as reset generator | 14 | * init_gpio_reset() - register GPIO as reset generator |
15 | * | 15 | * @gpio: gpio nr |
16 | * @gpio - gpio nr | 16 | * @output: set gpio as out/low instead of input during normal work |
17 | * @output - set gpio as out/low instead of input during normal work | ||
18 | */ | 17 | */ |
19 | extern int init_gpio_reset(int gpio, int output); | 18 | extern int init_gpio_reset(int gpio, int output); |
20 | 19 | ||
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 2df8d9facf57..22c9530e91e2 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/signal.h> | 12 | #include <linux/signal.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/hardirq.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/kprobes.h> | 16 | #include <linux/kprobes.h> |
16 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
diff --git a/arch/ia64/hp/sim/Kconfig b/arch/ia64/hp/sim/Kconfig index f92306bbedb8..8d513a8c5266 100644 --- a/arch/ia64/hp/sim/Kconfig +++ b/arch/ia64/hp/sim/Kconfig | |||
@@ -4,6 +4,7 @@ menu "HP Simulator drivers" | |||
4 | 4 | ||
5 | config HP_SIMETH | 5 | config HP_SIMETH |
6 | bool "Simulated Ethernet " | 6 | bool "Simulated Ethernet " |
7 | depends on NET | ||
7 | 8 | ||
8 | config HP_SIMSERIAL | 9 | config HP_SIMSERIAL |
9 | bool "Simulated serial driver support" | 10 | bool "Simulated serial driver support" |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 80119b3398e7..5c9cbfc14c4d 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -55,6 +55,8 @@ config GENERIC_HARDIRQS | |||
55 | 55 | ||
56 | config GENERIC_HARDIRQS_NO__DO_IRQ | 56 | config GENERIC_HARDIRQS_NO__DO_IRQ |
57 | def_bool y | 57 | def_bool y |
58 | depends on SUPERH32 && (!SH_DREAMCAST && !SH_SH4202_MICRODEV && \ | ||
59 | !SH_7751_SYSTEMH && !HD64461) | ||
58 | 60 | ||
59 | config GENERIC_IRQ_PROBE | 61 | config GENERIC_IRQ_PROBE |
60 | def_bool y | 62 | def_bool y |
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 25f531d892de..40e60fc2e596 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c | |||
@@ -824,32 +824,36 @@ static int __init toshiba_acpi_init(void) | |||
824 | toshiba_acpi_exit(); | 824 | toshiba_acpi_exit(); |
825 | return -ENOMEM; | 825 | return -ENOMEM; |
826 | } | 826 | } |
827 | } | ||
828 | 827 | ||
829 | /* Register input device for kill switch */ | 828 | /* Register input device for kill switch */ |
830 | toshiba_acpi.poll_dev = input_allocate_polled_device(); | 829 | toshiba_acpi.poll_dev = input_allocate_polled_device(); |
831 | if (!toshiba_acpi.poll_dev) { | 830 | if (!toshiba_acpi.poll_dev) { |
832 | printk(MY_ERR "unable to allocate kill-switch input device\n"); | 831 | printk(MY_ERR |
833 | toshiba_acpi_exit(); | 832 | "unable to allocate kill-switch input device\n"); |
834 | return -ENOMEM; | 833 | toshiba_acpi_exit(); |
835 | } | 834 | return -ENOMEM; |
836 | toshiba_acpi.poll_dev->private = &toshiba_acpi; | 835 | } |
837 | toshiba_acpi.poll_dev->poll = bt_poll_rfkill; | 836 | toshiba_acpi.poll_dev->private = &toshiba_acpi; |
838 | toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */ | 837 | toshiba_acpi.poll_dev->poll = bt_poll_rfkill; |
839 | 838 | toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */ | |
840 | toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name; | 839 | |
841 | toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST; | 840 | toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name; |
842 | toshiba_acpi.poll_dev->input->id.vendor = 0x0930; /* Toshiba USB ID */ | 841 | toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST; |
843 | set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit); | 842 | /* Toshiba USB ID */ |
844 | set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit); | 843 | toshiba_acpi.poll_dev->input->id.vendor = 0x0930; |
845 | input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE); | 844 | set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit); |
846 | input_sync(toshiba_acpi.poll_dev->input); | 845 | set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit); |
847 | 846 | input_report_switch(toshiba_acpi.poll_dev->input, | |
848 | ret = input_register_polled_device(toshiba_acpi.poll_dev); | 847 | SW_RFKILL_ALL, TRUE); |
849 | if (ret) { | 848 | input_sync(toshiba_acpi.poll_dev->input); |
850 | printk(MY_ERR "unable to register kill-switch input device\n"); | 849 | |
851 | toshiba_acpi_exit(); | 850 | ret = input_register_polled_device(toshiba_acpi.poll_dev); |
852 | return ret; | 851 | if (ret) { |
852 | printk(MY_ERR | ||
853 | "unable to register kill-switch input device\n"); | ||
854 | toshiba_acpi_exit(); | ||
855 | return ret; | ||
856 | } | ||
853 | } | 857 | } |
854 | 858 | ||
855 | return 0; | 859 | return 0; |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 5e2eb740df46..bc6695e3c848 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4050,17 +4050,70 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4050 | { "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ }, | 4050 | { "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ }, |
4051 | 4051 | ||
4052 | /* Seagate NCQ + FLUSH CACHE firmware bug */ | 4052 | /* Seagate NCQ + FLUSH CACHE firmware bug */ |
4053 | { "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ | | 4053 | { "ST31500341AS", "SD15", ATA_HORKAGE_NONCQ | |
4054 | ATA_HORKAGE_FIRMWARE_WARN }, | 4054 | ATA_HORKAGE_FIRMWARE_WARN }, |
4055 | { "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ | | 4055 | { "ST31500341AS", "SD16", ATA_HORKAGE_NONCQ | |
4056 | ATA_HORKAGE_FIRMWARE_WARN }, | 4056 | ATA_HORKAGE_FIRMWARE_WARN }, |
4057 | { "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ | | 4057 | { "ST31500341AS", "SD17", ATA_HORKAGE_NONCQ | |
4058 | ATA_HORKAGE_FIRMWARE_WARN }, | 4058 | ATA_HORKAGE_FIRMWARE_WARN }, |
4059 | { "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ | | 4059 | { "ST31500341AS", "SD18", ATA_HORKAGE_NONCQ | |
4060 | ATA_HORKAGE_FIRMWARE_WARN }, | 4060 | ATA_HORKAGE_FIRMWARE_WARN }, |
4061 | { "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ | | 4061 | { "ST31500341AS", "SD19", ATA_HORKAGE_NONCQ | |
4062 | ATA_HORKAGE_FIRMWARE_WARN }, | 4062 | ATA_HORKAGE_FIRMWARE_WARN }, |
4063 | { "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ | | 4063 | |
4064 | { "ST31000333AS", "SD15", ATA_HORKAGE_NONCQ | | ||
4065 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4066 | { "ST31000333AS", "SD16", ATA_HORKAGE_NONCQ | | ||
4067 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4068 | { "ST31000333AS", "SD17", ATA_HORKAGE_NONCQ | | ||
4069 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4070 | { "ST31000333AS", "SD18", ATA_HORKAGE_NONCQ | | ||
4071 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4072 | { "ST31000333AS", "SD19", ATA_HORKAGE_NONCQ | | ||
4073 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4074 | |||
4075 | { "ST3640623AS", "SD15", ATA_HORKAGE_NONCQ | | ||
4076 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4077 | { "ST3640623AS", "SD16", ATA_HORKAGE_NONCQ | | ||
4078 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4079 | { "ST3640623AS", "SD17", ATA_HORKAGE_NONCQ | | ||
4080 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4081 | { "ST3640623AS", "SD18", ATA_HORKAGE_NONCQ | | ||
4082 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4083 | { "ST3640623AS", "SD19", ATA_HORKAGE_NONCQ | | ||
4084 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4085 | |||
4086 | { "ST3640323AS", "SD15", ATA_HORKAGE_NONCQ | | ||
4087 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4088 | { "ST3640323AS", "SD16", ATA_HORKAGE_NONCQ | | ||
4089 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4090 | { "ST3640323AS", "SD17", ATA_HORKAGE_NONCQ | | ||
4091 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4092 | { "ST3640323AS", "SD18", ATA_HORKAGE_NONCQ | | ||
4093 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4094 | { "ST3640323AS", "SD19", ATA_HORKAGE_NONCQ | | ||
4095 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4096 | |||
4097 | { "ST3320813AS", "SD15", ATA_HORKAGE_NONCQ | | ||
4098 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4099 | { "ST3320813AS", "SD16", ATA_HORKAGE_NONCQ | | ||
4100 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4101 | { "ST3320813AS", "SD17", ATA_HORKAGE_NONCQ | | ||
4102 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4103 | { "ST3320813AS", "SD18", ATA_HORKAGE_NONCQ | | ||
4104 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4105 | { "ST3320813AS", "SD19", ATA_HORKAGE_NONCQ | | ||
4106 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4107 | |||
4108 | { "ST3320613AS", "SD15", ATA_HORKAGE_NONCQ | | ||
4109 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4110 | { "ST3320613AS", "SD16", ATA_HORKAGE_NONCQ | | ||
4111 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4112 | { "ST3320613AS", "SD17", ATA_HORKAGE_NONCQ | | ||
4113 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4114 | { "ST3320613AS", "SD18", ATA_HORKAGE_NONCQ | | ||
4115 | ATA_HORKAGE_FIRMWARE_WARN }, | ||
4116 | { "ST3320613AS", "SD19", ATA_HORKAGE_NONCQ | | ||
4064 | ATA_HORKAGE_FIRMWARE_WARN }, | 4117 | ATA_HORKAGE_FIRMWARE_WARN }, |
4065 | 4118 | ||
4066 | /* Blacklist entries taken from Silicon Image 3124/3132 | 4119 | /* Blacklist entries taken from Silicon Image 3124/3132 |
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index a098ba8eaab6..e0c4f05d7d57 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c | |||
@@ -183,7 +183,9 @@ static unsigned long hpt366_filter(struct ata_device *adev, unsigned long mask) | |||
183 | mask &= ~(0xF8 << ATA_SHIFT_UDMA); | 183 | mask &= ~(0xF8 << ATA_SHIFT_UDMA); |
184 | if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4)) | 184 | if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4)) |
185 | mask &= ~(0xF0 << ATA_SHIFT_UDMA); | 185 | mask &= ~(0xF0 << ATA_SHIFT_UDMA); |
186 | } | 186 | } else if (adev->class == ATA_DEV_ATAPI) |
187 | mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); | ||
188 | |||
187 | return ata_bmdma_mode_filter(adev, mask); | 189 | return ata_bmdma_mode_filter(adev, mask); |
188 | } | 190 | } |
189 | 191 | ||
@@ -211,11 +213,15 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed) | |||
211 | 213 | ||
212 | static int hpt36x_cable_detect(struct ata_port *ap) | 214 | static int hpt36x_cable_detect(struct ata_port *ap) |
213 | { | 215 | { |
214 | u8 ata66; | ||
215 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 216 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
217 | u8 ata66; | ||
216 | 218 | ||
219 | /* | ||
220 | * Each channel of pata_hpt366 occupies separate PCI function | ||
221 | * as the primary channel and bit1 indicates the cable type. | ||
222 | */ | ||
217 | pci_read_config_byte(pdev, 0x5A, &ata66); | 223 | pci_read_config_byte(pdev, 0x5A, &ata66); |
218 | if (ata66 & (1 << ap->port_no)) | 224 | if (ata66 & 2) |
219 | return ATA_CBL_PATA40; | 225 | return ATA_CBL_PATA40; |
220 | return ATA_CBL_PATA80; | 226 | return ATA_CBL_PATA80; |
221 | } | 227 | } |
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index d333ae22459c..79ef5fd928ae 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c | |||
@@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length, | |||
115 | return error; | 115 | return error; |
116 | } | 116 | } |
117 | 117 | ||
118 | #define OUI_FREECOM_TECHNOLOGIES_GMBH 0x0001db | ||
119 | |||
118 | static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci) | 120 | static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci) |
119 | { | 121 | { |
122 | /* Freecom FireWire Hard Drive firmware bug */ | ||
123 | if (be32_to_cpu(bus_info_data[3]) >> 8 == OUI_FREECOM_TECHNOLOGIES_GMBH) | ||
124 | return 0; | ||
125 | |||
120 | return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3; | 126 | return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3; |
121 | } | 127 | } |
122 | 128 | ||
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 523b9716a543..d115a6d30f29 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -1893,12 +1893,17 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
1893 | ctrl |= E1000_CTRL_PHY_RST; | 1893 | ctrl |= E1000_CTRL_PHY_RST; |
1894 | } | 1894 | } |
1895 | ret_val = e1000_acquire_swflag_ich8lan(hw); | 1895 | ret_val = e1000_acquire_swflag_ich8lan(hw); |
1896 | /* Whether or not the swflag was acquired, we need to reset the part */ | ||
1896 | hw_dbg(hw, "Issuing a global reset to ich8lan"); | 1897 | hw_dbg(hw, "Issuing a global reset to ich8lan"); |
1897 | ew32(CTRL, (ctrl | E1000_CTRL_RST)); | 1898 | ew32(CTRL, (ctrl | E1000_CTRL_RST)); |
1898 | msleep(20); | 1899 | msleep(20); |
1899 | 1900 | ||
1900 | /* release the swflag because it is not reset by hardware reset */ | 1901 | if (!ret_val) { |
1901 | e1000_release_swflag_ich8lan(hw); | 1902 | /* release the swflag because it is not reset by |
1903 | * hardware reset | ||
1904 | */ | ||
1905 | e1000_release_swflag_ich8lan(hw); | ||
1906 | } | ||
1902 | 1907 | ||
1903 | ret_val = e1000e_get_auto_rd_done(hw); | 1908 | ret_val = e1000e_get_auto_rd_done(hw); |
1904 | if (ret_val) { | 1909 | if (ret_val) { |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 1349e419673c..fed7eba65ead 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -1142,6 +1142,70 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1142 | return NETDEV_TX_OK; | 1142 | return NETDEV_TX_OK; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | static void gem_pcs_reset(struct gem *gp) | ||
1146 | { | ||
1147 | int limit; | ||
1148 | u32 val; | ||
1149 | |||
1150 | /* Reset PCS unit. */ | ||
1151 | val = readl(gp->regs + PCS_MIICTRL); | ||
1152 | val |= PCS_MIICTRL_RST; | ||
1153 | writel(val, gp->regs + PCS_MIICTRL); | ||
1154 | |||
1155 | limit = 32; | ||
1156 | while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) { | ||
1157 | udelay(100); | ||
1158 | if (limit-- <= 0) | ||
1159 | break; | ||
1160 | } | ||
1161 | if (limit <= 0) | ||
1162 | printk(KERN_WARNING "%s: PCS reset bit would not clear.\n", | ||
1163 | gp->dev->name); | ||
1164 | } | ||
1165 | |||
1166 | static void gem_pcs_reinit_adv(struct gem *gp) | ||
1167 | { | ||
1168 | u32 val; | ||
1169 | |||
1170 | /* Make sure PCS is disabled while changing advertisement | ||
1171 | * configuration. | ||
1172 | */ | ||
1173 | val = readl(gp->regs + PCS_CFG); | ||
1174 | val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO); | ||
1175 | writel(val, gp->regs + PCS_CFG); | ||
1176 | |||
1177 | /* Advertise all capabilities except assymetric | ||
1178 | * pause. | ||
1179 | */ | ||
1180 | val = readl(gp->regs + PCS_MIIADV); | ||
1181 | val |= (PCS_MIIADV_FD | PCS_MIIADV_HD | | ||
1182 | PCS_MIIADV_SP | PCS_MIIADV_AP); | ||
1183 | writel(val, gp->regs + PCS_MIIADV); | ||
1184 | |||
1185 | /* Enable and restart auto-negotiation, disable wrapback/loopback, | ||
1186 | * and re-enable PCS. | ||
1187 | */ | ||
1188 | val = readl(gp->regs + PCS_MIICTRL); | ||
1189 | val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE); | ||
1190 | val &= ~PCS_MIICTRL_WB; | ||
1191 | writel(val, gp->regs + PCS_MIICTRL); | ||
1192 | |||
1193 | val = readl(gp->regs + PCS_CFG); | ||
1194 | val |= PCS_CFG_ENABLE; | ||
1195 | writel(val, gp->regs + PCS_CFG); | ||
1196 | |||
1197 | /* Make sure serialink loopback is off. The meaning | ||
1198 | * of this bit is logically inverted based upon whether | ||
1199 | * you are in Serialink or SERDES mode. | ||
1200 | */ | ||
1201 | val = readl(gp->regs + PCS_SCTRL); | ||
1202 | if (gp->phy_type == phy_serialink) | ||
1203 | val &= ~PCS_SCTRL_LOOP; | ||
1204 | else | ||
1205 | val |= PCS_SCTRL_LOOP; | ||
1206 | writel(val, gp->regs + PCS_SCTRL); | ||
1207 | } | ||
1208 | |||
1145 | #define STOP_TRIES 32 | 1209 | #define STOP_TRIES 32 |
1146 | 1210 | ||
1147 | /* Must be invoked under gp->lock and gp->tx_lock. */ | 1211 | /* Must be invoked under gp->lock and gp->tx_lock. */ |
@@ -1168,6 +1232,9 @@ static void gem_reset(struct gem *gp) | |||
1168 | 1232 | ||
1169 | if (limit <= 0) | 1233 | if (limit <= 0) |
1170 | printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name); | 1234 | printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name); |
1235 | |||
1236 | if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes) | ||
1237 | gem_pcs_reinit_adv(gp); | ||
1171 | } | 1238 | } |
1172 | 1239 | ||
1173 | /* Must be invoked under gp->lock and gp->tx_lock. */ | 1240 | /* Must be invoked under gp->lock and gp->tx_lock. */ |
@@ -1324,7 +1391,7 @@ static int gem_set_link_modes(struct gem *gp) | |||
1324 | gp->phy_type == phy_serdes) { | 1391 | gp->phy_type == phy_serdes) { |
1325 | u32 pcs_lpa = readl(gp->regs + PCS_MIILP); | 1392 | u32 pcs_lpa = readl(gp->regs + PCS_MIILP); |
1326 | 1393 | ||
1327 | if (pcs_lpa & PCS_MIIADV_FD) | 1394 | if ((pcs_lpa & PCS_MIIADV_FD) || gp->phy_type == phy_serdes) |
1328 | full_duplex = 1; | 1395 | full_duplex = 1; |
1329 | speed = SPEED_1000; | 1396 | speed = SPEED_1000; |
1330 | } | 1397 | } |
@@ -1488,6 +1555,9 @@ static void gem_link_timer(unsigned long data) | |||
1488 | val = readl(gp->regs + PCS_MIISTAT); | 1555 | val = readl(gp->regs + PCS_MIISTAT); |
1489 | 1556 | ||
1490 | if ((val & PCS_MIISTAT_LS) != 0) { | 1557 | if ((val & PCS_MIISTAT_LS) != 0) { |
1558 | if (gp->lstate == link_up) | ||
1559 | goto restart; | ||
1560 | |||
1491 | gp->lstate = link_up; | 1561 | gp->lstate = link_up; |
1492 | netif_carrier_on(gp->dev); | 1562 | netif_carrier_on(gp->dev); |
1493 | (void)gem_set_link_modes(gp); | 1563 | (void)gem_set_link_modes(gp); |
@@ -1708,61 +1778,8 @@ static void gem_init_phy(struct gem *gp) | |||
1708 | if (gp->phy_mii.def && gp->phy_mii.def->ops->init) | 1778 | if (gp->phy_mii.def && gp->phy_mii.def->ops->init) |
1709 | gp->phy_mii.def->ops->init(&gp->phy_mii); | 1779 | gp->phy_mii.def->ops->init(&gp->phy_mii); |
1710 | } else { | 1780 | } else { |
1711 | u32 val; | 1781 | gem_pcs_reset(gp); |
1712 | int limit; | 1782 | gem_pcs_reinit_adv(gp); |
1713 | |||
1714 | /* Reset PCS unit. */ | ||
1715 | val = readl(gp->regs + PCS_MIICTRL); | ||
1716 | val |= PCS_MIICTRL_RST; | ||
1717 | writel(val, gp->regs + PCS_MIICTRL); | ||
1718 | |||
1719 | limit = 32; | ||
1720 | while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) { | ||
1721 | udelay(100); | ||
1722 | if (limit-- <= 0) | ||
1723 | break; | ||
1724 | } | ||
1725 | if (limit <= 0) | ||
1726 | printk(KERN_WARNING "%s: PCS reset bit would not clear.\n", | ||
1727 | gp->dev->name); | ||
1728 | |||
1729 | /* Make sure PCS is disabled while changing advertisement | ||
1730 | * configuration. | ||
1731 | */ | ||
1732 | val = readl(gp->regs + PCS_CFG); | ||
1733 | val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO); | ||
1734 | writel(val, gp->regs + PCS_CFG); | ||
1735 | |||
1736 | /* Advertise all capabilities except assymetric | ||
1737 | * pause. | ||
1738 | */ | ||
1739 | val = readl(gp->regs + PCS_MIIADV); | ||
1740 | val |= (PCS_MIIADV_FD | PCS_MIIADV_HD | | ||
1741 | PCS_MIIADV_SP | PCS_MIIADV_AP); | ||
1742 | writel(val, gp->regs + PCS_MIIADV); | ||
1743 | |||
1744 | /* Enable and restart auto-negotiation, disable wrapback/loopback, | ||
1745 | * and re-enable PCS. | ||
1746 | */ | ||
1747 | val = readl(gp->regs + PCS_MIICTRL); | ||
1748 | val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE); | ||
1749 | val &= ~PCS_MIICTRL_WB; | ||
1750 | writel(val, gp->regs + PCS_MIICTRL); | ||
1751 | |||
1752 | val = readl(gp->regs + PCS_CFG); | ||
1753 | val |= PCS_CFG_ENABLE; | ||
1754 | writel(val, gp->regs + PCS_CFG); | ||
1755 | |||
1756 | /* Make sure serialink loopback is off. The meaning | ||
1757 | * of this bit is logically inverted based upon whether | ||
1758 | * you are in Serialink or SERDES mode. | ||
1759 | */ | ||
1760 | val = readl(gp->regs + PCS_SCTRL); | ||
1761 | if (gp->phy_type == phy_serialink) | ||
1762 | val &= ~PCS_SCTRL_LOOP; | ||
1763 | else | ||
1764 | val |= PCS_SCTRL_LOOP; | ||
1765 | writel(val, gp->regs + PCS_SCTRL); | ||
1766 | } | 1783 | } |
1767 | 1784 | ||
1768 | /* Default aneg parameters */ | 1785 | /* Default aneg parameters */ |
@@ -2680,6 +2697,21 @@ static int gem_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
2680 | cmd->speed = 0; | 2697 | cmd->speed = 0; |
2681 | cmd->duplex = cmd->port = cmd->phy_address = | 2698 | cmd->duplex = cmd->port = cmd->phy_address = |
2682 | cmd->transceiver = cmd->autoneg = 0; | 2699 | cmd->transceiver = cmd->autoneg = 0; |
2700 | |||
2701 | /* serdes means usually a Fibre connector, with most fixed */ | ||
2702 | if (gp->phy_type == phy_serdes) { | ||
2703 | cmd->port = PORT_FIBRE; | ||
2704 | cmd->supported = (SUPPORTED_1000baseT_Half | | ||
2705 | SUPPORTED_1000baseT_Full | | ||
2706 | SUPPORTED_FIBRE | SUPPORTED_Autoneg | | ||
2707 | SUPPORTED_Pause | SUPPORTED_Asym_Pause); | ||
2708 | cmd->advertising = cmd->supported; | ||
2709 | cmd->transceiver = XCVR_INTERNAL; | ||
2710 | if (gp->lstate == link_up) | ||
2711 | cmd->speed = SPEED_1000; | ||
2712 | cmd->duplex = DUPLEX_FULL; | ||
2713 | cmd->autoneg = 1; | ||
2714 | } | ||
2683 | } | 2715 | } |
2684 | cmd->maxtxpkt = cmd->maxrxpkt = 0; | 2716 | cmd->maxtxpkt = cmd->maxrxpkt = 0; |
2685 | 2717 | ||
diff --git a/drivers/pcmcia/bfin_cf_pcmcia.c b/drivers/pcmcia/bfin_cf_pcmcia.c index bb7338863fb9..b59d4115d20f 100644 --- a/drivers/pcmcia/bfin_cf_pcmcia.c +++ b/drivers/pcmcia/bfin_cf_pcmcia.c | |||
@@ -334,6 +334,6 @@ static void __exit bfin_cf_exit(void) | |||
334 | module_init(bfin_cf_init); | 334 | module_init(bfin_cf_init); |
335 | module_exit(bfin_cf_exit); | 335 | module_exit(bfin_cf_exit); |
336 | 336 | ||
337 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>") | 337 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
338 | MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver"); | 338 | MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver"); |
339 | MODULE_LICENSE("GPL"); | 339 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c index d1812d32f47d..63f0de29aa14 100644 --- a/drivers/sh/maple/maple.c +++ b/drivers/sh/maple/maple.c | |||
@@ -827,7 +827,7 @@ static int __init maple_bus_init(void) | |||
827 | 827 | ||
828 | maple_queue_cache = | 828 | maple_queue_cache = |
829 | kmem_cache_create("maple_queue_cache", 0x400, 0, | 829 | kmem_cache_create("maple_queue_cache", 0x400, 0, |
830 | SLAB_POISON|SLAB_HWCACHE_ALIGN, NULL); | 830 | SLAB_HWCACHE_ALIGN, NULL); |
831 | 831 | ||
832 | if (!maple_queue_cache) | 832 | if (!maple_queue_cache) |
833 | goto cleanup_bothirqs; | 833 | goto cleanup_bothirqs; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9d77b1d7dca8..e26f54952892 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -319,6 +319,7 @@ enum | |||
319 | { | 319 | { |
320 | NAPI_STATE_SCHED, /* Poll is scheduled */ | 320 | NAPI_STATE_SCHED, /* Poll is scheduled */ |
321 | NAPI_STATE_DISABLE, /* Disable pending */ | 321 | NAPI_STATE_DISABLE, /* Disable pending */ |
322 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | ||
322 | }; | 323 | }; |
323 | 324 | ||
324 | extern void __napi_schedule(struct napi_struct *n); | 325 | extern void __napi_schedule(struct napi_struct *n); |
@@ -1497,6 +1498,12 @@ static inline void netif_rx_complete(struct net_device *dev, | |||
1497 | { | 1498 | { |
1498 | unsigned long flags; | 1499 | unsigned long flags; |
1499 | 1500 | ||
1501 | /* | ||
1502 | * don't let napi dequeue from the cpu poll list | ||
1503 | * just in case its running on a different cpu | ||
1504 | */ | ||
1505 | if (unlikely(test_bit(NAPI_STATE_NPSVC, &napi->state))) | ||
1506 | return; | ||
1500 | local_irq_save(flags); | 1507 | local_irq_save(flags); |
1501 | __netif_rx_complete(dev, napi); | 1508 | __netif_rx_complete(dev, napi); |
1502 | local_irq_restore(flags); | 1509 | local_irq_restore(flags); |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 3f9a60043a97..6e7ba16ff454 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -146,6 +146,8 @@ static inline void smp_send_reschedule(int cpu) { } | |||
146 | }) | 146 | }) |
147 | #define smp_call_function_mask(mask, func, info, wait) \ | 147 | #define smp_call_function_mask(mask, func, info, wait) \ |
148 | (up_smp_call_function(func, info)) | 148 | (up_smp_call_function(func, info)) |
149 | #define smp_call_function_many(mask, func, info, wait) \ | ||
150 | (up_smp_call_function(func, info)) | ||
149 | static inline void init_call_single_data(void) | 151 | static inline void init_call_single_data(void) |
150 | { | 152 | { |
151 | } | 153 | } |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index fe00b3b983a8..8185a0f09594 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -702,7 +702,7 @@ static int rebind_subsystems(struct cgroupfs_root *root, | |||
702 | * any child cgroups exist. This is theoretically supportable | 702 | * any child cgroups exist. This is theoretically supportable |
703 | * but involves complex error handling, so it's being left until | 703 | * but involves complex error handling, so it's being left until |
704 | * later */ | 704 | * later */ |
705 | if (!list_empty(&cgrp->children)) | 705 | if (root->number_of_cgroups > 1) |
706 | return -EBUSY; | 706 | return -EBUSY; |
707 | 707 | ||
708 | /* Process each subsystem */ | 708 | /* Process each subsystem */ |
diff --git a/mm/migrate.c b/mm/migrate.c index d8f07667fc80..037b0967c1e3 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -998,7 +998,7 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages, | |||
998 | unsigned long addr = (unsigned long)(*pages); | 998 | unsigned long addr = (unsigned long)(*pages); |
999 | struct vm_area_struct *vma; | 999 | struct vm_area_struct *vma; |
1000 | struct page *page; | 1000 | struct page *page; |
1001 | int err; | 1001 | int err = -EFAULT; |
1002 | 1002 | ||
1003 | vma = find_vma(mm, addr); | 1003 | vma = find_vma(mm, addr); |
1004 | if (!vma) | 1004 | if (!vma) |
@@ -535,7 +535,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, | |||
535 | struct kmem_cache *c; | 535 | struct kmem_cache *c; |
536 | 536 | ||
537 | c = slob_alloc(sizeof(struct kmem_cache), | 537 | c = slob_alloc(sizeof(struct kmem_cache), |
538 | flags, ARCH_KMALLOC_MINALIGN, -1); | 538 | GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1); |
539 | 539 | ||
540 | if (c) { | 540 | if (c) { |
541 | c->name = name; | 541 | c->name = name; |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 6c7af390be0a..dadac6281f20 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -133,9 +133,11 @@ static int poll_one_napi(struct netpoll_info *npinfo, | |||
133 | 133 | ||
134 | npinfo->rx_flags |= NETPOLL_RX_DROP; | 134 | npinfo->rx_flags |= NETPOLL_RX_DROP; |
135 | atomic_inc(&trapped); | 135 | atomic_inc(&trapped); |
136 | set_bit(NAPI_STATE_NPSVC, &napi->state); | ||
136 | 137 | ||
137 | work = napi->poll(napi, budget); | 138 | work = napi->poll(napi, budget); |
138 | 139 | ||
140 | clear_bit(NAPI_STATE_NPSVC, &napi->state); | ||
139 | atomic_dec(&trapped); | 141 | atomic_dec(&trapped); |
140 | npinfo->rx_flags &= ~NETPOLL_RX_DROP; | 142 | npinfo->rx_flags &= ~NETPOLL_RX_DROP; |
141 | 143 | ||
diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c index bea54a685109..8d489e746b21 100644 --- a/net/ipv4/netfilter/nf_nat_rule.c +++ b/net/ipv4/netfilter/nf_nat_rule.c | |||
@@ -61,7 +61,7 @@ static struct | |||
61 | static struct xt_table nat_table = { | 61 | static struct xt_table nat_table = { |
62 | .name = "nat", | 62 | .name = "nat", |
63 | .valid_hooks = NAT_VALID_HOOKS, | 63 | .valid_hooks = NAT_VALID_HOOKS, |
64 | .lock = __RW_LOCK_UNLOCKED(__nat_table.lock), | 64 | .lock = __RW_LOCK_UNLOCKED(nat_table.lock), |
65 | .me = THIS_MODULE, | 65 | .me = THIS_MODULE, |
66 | .af = AF_INET, | 66 | .af = AF_INET, |
67 | }; | 67 | }; |
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index 7cd22262de3a..a453aac91bd3 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c | |||
@@ -40,18 +40,14 @@ | |||
40 | 40 | ||
41 | #include "tcp_vegas.h" | 41 | #include "tcp_vegas.h" |
42 | 42 | ||
43 | /* Default values of the Vegas variables, in fixed-point representation | 43 | static int alpha = 2; |
44 | * with V_PARAM_SHIFT bits to the right of the binary point. | 44 | static int beta = 4; |
45 | */ | 45 | static int gamma = 1; |
46 | #define V_PARAM_SHIFT 1 | ||
47 | static int alpha = 2<<V_PARAM_SHIFT; | ||
48 | static int beta = 4<<V_PARAM_SHIFT; | ||
49 | static int gamma = 1<<V_PARAM_SHIFT; | ||
50 | 46 | ||
51 | module_param(alpha, int, 0644); | 47 | module_param(alpha, int, 0644); |
52 | MODULE_PARM_DESC(alpha, "lower bound of packets in network (scale by 2)"); | 48 | MODULE_PARM_DESC(alpha, "lower bound of packets in network"); |
53 | module_param(beta, int, 0644); | 49 | module_param(beta, int, 0644); |
54 | MODULE_PARM_DESC(beta, "upper bound of packets in network (scale by 2)"); | 50 | MODULE_PARM_DESC(beta, "upper bound of packets in network"); |
55 | module_param(gamma, int, 0644); | 51 | module_param(gamma, int, 0644); |
56 | MODULE_PARM_DESC(gamma, "limit on increase (scale by 2)"); | 52 | MODULE_PARM_DESC(gamma, "limit on increase (scale by 2)"); |
57 | 53 | ||
@@ -172,49 +168,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
172 | return; | 168 | return; |
173 | } | 169 | } |
174 | 170 | ||
175 | /* The key players are v_beg_snd_una and v_beg_snd_nxt. | ||
176 | * | ||
177 | * These are so named because they represent the approximate values | ||
178 | * of snd_una and snd_nxt at the beginning of the current RTT. More | ||
179 | * precisely, they represent the amount of data sent during the RTT. | ||
180 | * At the end of the RTT, when we receive an ACK for v_beg_snd_nxt, | ||
181 | * we will calculate that (v_beg_snd_nxt - v_beg_snd_una) outstanding | ||
182 | * bytes of data have been ACKed during the course of the RTT, giving | ||
183 | * an "actual" rate of: | ||
184 | * | ||
185 | * (v_beg_snd_nxt - v_beg_snd_una) / (rtt duration) | ||
186 | * | ||
187 | * Unfortunately, v_beg_snd_una is not exactly equal to snd_una, | ||
188 | * because delayed ACKs can cover more than one segment, so they | ||
189 | * don't line up nicely with the boundaries of RTTs. | ||
190 | * | ||
191 | * Another unfortunate fact of life is that delayed ACKs delay the | ||
192 | * advance of the left edge of our send window, so that the number | ||
193 | * of bytes we send in an RTT is often less than our cwnd will allow. | ||
194 | * So we keep track of our cwnd separately, in v_beg_snd_cwnd. | ||
195 | */ | ||
196 | |||
197 | if (after(ack, vegas->beg_snd_nxt)) { | 171 | if (after(ack, vegas->beg_snd_nxt)) { |
198 | /* Do the Vegas once-per-RTT cwnd adjustment. */ | 172 | /* Do the Vegas once-per-RTT cwnd adjustment. */ |
199 | u32 old_wnd, old_snd_cwnd; | ||
200 | |||
201 | |||
202 | /* Here old_wnd is essentially the window of data that was | ||
203 | * sent during the previous RTT, and has all | ||
204 | * been acknowledged in the course of the RTT that ended | ||
205 | * with the ACK we just received. Likewise, old_snd_cwnd | ||
206 | * is the cwnd during the previous RTT. | ||
207 | */ | ||
208 | old_wnd = (vegas->beg_snd_nxt - vegas->beg_snd_una) / | ||
209 | tp->mss_cache; | ||
210 | old_snd_cwnd = vegas->beg_snd_cwnd; | ||
211 | 173 | ||
212 | /* Save the extent of the current window so we can use this | 174 | /* Save the extent of the current window so we can use this |
213 | * at the end of the next RTT. | 175 | * at the end of the next RTT. |
214 | */ | 176 | */ |
215 | vegas->beg_snd_una = vegas->beg_snd_nxt; | ||
216 | vegas->beg_snd_nxt = tp->snd_nxt; | 177 | vegas->beg_snd_nxt = tp->snd_nxt; |
217 | vegas->beg_snd_cwnd = tp->snd_cwnd; | ||
218 | 178 | ||
219 | /* We do the Vegas calculations only if we got enough RTT | 179 | /* We do the Vegas calculations only if we got enough RTT |
220 | * samples that we can be reasonably sure that we got | 180 | * samples that we can be reasonably sure that we got |
@@ -252,22 +212,14 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
252 | * | 212 | * |
253 | * This is: | 213 | * This is: |
254 | * (actual rate in segments) * baseRTT | 214 | * (actual rate in segments) * baseRTT |
255 | * We keep it as a fixed point number with | ||
256 | * V_PARAM_SHIFT bits to the right of the binary point. | ||
257 | */ | 215 | */ |
258 | target_cwnd = ((u64)old_wnd * vegas->baseRTT); | 216 | target_cwnd = tp->snd_cwnd * vegas->baseRTT / rtt; |
259 | target_cwnd <<= V_PARAM_SHIFT; | ||
260 | do_div(target_cwnd, rtt); | ||
261 | 217 | ||
262 | /* Calculate the difference between the window we had, | 218 | /* Calculate the difference between the window we had, |
263 | * and the window we would like to have. This quantity | 219 | * and the window we would like to have. This quantity |
264 | * is the "Diff" from the Arizona Vegas papers. | 220 | * is the "Diff" from the Arizona Vegas papers. |
265 | * | ||
266 | * Again, this is a fixed point number with | ||
267 | * V_PARAM_SHIFT bits to the right of the binary | ||
268 | * point. | ||
269 | */ | 221 | */ |
270 | diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd; | 222 | diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT; |
271 | 223 | ||
272 | if (diff > gamma && tp->snd_ssthresh > 2 ) { | 224 | if (diff > gamma && tp->snd_ssthresh > 2 ) { |
273 | /* Going too fast. Time to slow down | 225 | /* Going too fast. Time to slow down |
@@ -282,16 +234,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
282 | * truncation robs us of full link | 234 | * truncation robs us of full link |
283 | * utilization. | 235 | * utilization. |
284 | */ | 236 | */ |
285 | tp->snd_cwnd = min(tp->snd_cwnd, | 237 | tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1); |
286 | ((u32)target_cwnd >> | ||
287 | V_PARAM_SHIFT)+1); | ||
288 | 238 | ||
289 | } else if (tp->snd_cwnd <= tp->snd_ssthresh) { | 239 | } else if (tp->snd_cwnd <= tp->snd_ssthresh) { |
290 | /* Slow start. */ | 240 | /* Slow start. */ |
291 | tcp_slow_start(tp); | 241 | tcp_slow_start(tp); |
292 | } else { | 242 | } else { |
293 | /* Congestion avoidance. */ | 243 | /* Congestion avoidance. */ |
294 | u32 next_snd_cwnd; | ||
295 | 244 | ||
296 | /* Figure out where we would like cwnd | 245 | /* Figure out where we would like cwnd |
297 | * to be. | 246 | * to be. |
@@ -300,26 +249,17 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
300 | /* The old window was too fast, so | 249 | /* The old window was too fast, so |
301 | * we slow down. | 250 | * we slow down. |
302 | */ | 251 | */ |
303 | next_snd_cwnd = old_snd_cwnd - 1; | 252 | tp->snd_cwnd--; |
304 | } else if (diff < alpha) { | 253 | } else if (diff < alpha) { |
305 | /* We don't have enough extra packets | 254 | /* We don't have enough extra packets |
306 | * in the network, so speed up. | 255 | * in the network, so speed up. |
307 | */ | 256 | */ |
308 | next_snd_cwnd = old_snd_cwnd + 1; | 257 | tp->snd_cwnd++; |
309 | } else { | 258 | } else { |
310 | /* Sending just as fast as we | 259 | /* Sending just as fast as we |
311 | * should be. | 260 | * should be. |
312 | */ | 261 | */ |
313 | next_snd_cwnd = old_snd_cwnd; | ||
314 | } | 262 | } |
315 | |||
316 | /* Adjust cwnd upward or downward, toward the | ||
317 | * desired value. | ||
318 | */ | ||
319 | if (next_snd_cwnd > tp->snd_cwnd) | ||
320 | tp->snd_cwnd++; | ||
321 | else if (next_snd_cwnd < tp->snd_cwnd) | ||
322 | tp->snd_cwnd--; | ||
323 | } | 263 | } |
324 | 264 | ||
325 | if (tp->snd_cwnd < 2) | 265 | if (tp->snd_cwnd < 2) |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 172438320eec..d0f54d18e19b 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -912,8 +912,13 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
912 | is invalid, but ndisc specs say nothing | 912 | is invalid, but ndisc specs say nothing |
913 | about it. It could be misconfiguration, or | 913 | about it. It could be misconfiguration, or |
914 | an smart proxy agent tries to help us :-) | 914 | an smart proxy agent tries to help us :-) |
915 | |||
916 | We should not print the error if NA has been | ||
917 | received from loopback - it is just our own | ||
918 | unsolicited advertisement. | ||
915 | */ | 919 | */ |
916 | ND_PRINTK1(KERN_WARNING | 920 | if (skb->pkt_type != PACKET_LOOPBACK) |
921 | ND_PRINTK1(KERN_WARNING | ||
917 | "ICMPv6 NA: someone advertises our address on %s!\n", | 922 | "ICMPv6 NA: someone advertises our address on %s!\n", |
918 | ifp->idev->dev->name); | 923 | ifp->idev->dev->name); |
919 | in6_ifa_put(ifp); | 924 | in6_ifa_put(ifp); |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 90c8506a0aac..8c0308032178 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -562,7 +562,6 @@ static int netlbl_unlhsh_remove_addr4(struct net *net, | |||
562 | const struct in_addr *mask, | 562 | const struct in_addr *mask, |
563 | struct netlbl_audit *audit_info) | 563 | struct netlbl_audit *audit_info) |
564 | { | 564 | { |
565 | int ret_val = 0; | ||
566 | struct netlbl_af4list *list_entry; | 565 | struct netlbl_af4list *list_entry; |
567 | struct netlbl_unlhsh_addr4 *entry; | 566 | struct netlbl_unlhsh_addr4 *entry; |
568 | struct audit_buffer *audit_buf; | 567 | struct audit_buffer *audit_buf; |
@@ -577,7 +576,7 @@ static int netlbl_unlhsh_remove_addr4(struct net *net, | |||
577 | if (list_entry != NULL) | 576 | if (list_entry != NULL) |
578 | entry = netlbl_unlhsh_addr4_entry(list_entry); | 577 | entry = netlbl_unlhsh_addr4_entry(list_entry); |
579 | else | 578 | else |
580 | ret_val = -ENOENT; | 579 | entry = NULL; |
581 | 580 | ||
582 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, | 581 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, |
583 | audit_info); | 582 | audit_info); |
@@ -588,19 +587,21 @@ static int netlbl_unlhsh_remove_addr4(struct net *net, | |||
588 | addr->s_addr, mask->s_addr); | 587 | addr->s_addr, mask->s_addr); |
589 | if (dev != NULL) | 588 | if (dev != NULL) |
590 | dev_put(dev); | 589 | dev_put(dev); |
591 | if (entry && security_secid_to_secctx(entry->secid, | 590 | if (entry != NULL && |
592 | &secctx, | 591 | security_secid_to_secctx(entry->secid, |
593 | &secctx_len) == 0) { | 592 | &secctx, &secctx_len) == 0) { |
594 | audit_log_format(audit_buf, " sec_obj=%s", secctx); | 593 | audit_log_format(audit_buf, " sec_obj=%s", secctx); |
595 | security_release_secctx(secctx, secctx_len); | 594 | security_release_secctx(secctx, secctx_len); |
596 | } | 595 | } |
597 | audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0); | 596 | audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0); |
598 | audit_log_end(audit_buf); | 597 | audit_log_end(audit_buf); |
599 | } | 598 | } |
600 | 599 | ||
601 | if (ret_val == 0) | 600 | if (entry == NULL) |
602 | call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4); | 601 | return -ENOENT; |
603 | return ret_val; | 602 | |
603 | call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4); | ||
604 | return 0; | ||
604 | } | 605 | } |
605 | 606 | ||
606 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 607 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
@@ -624,7 +625,6 @@ static int netlbl_unlhsh_remove_addr6(struct net *net, | |||
624 | const struct in6_addr *mask, | 625 | const struct in6_addr *mask, |
625 | struct netlbl_audit *audit_info) | 626 | struct netlbl_audit *audit_info) |
626 | { | 627 | { |
627 | int ret_val = 0; | ||
628 | struct netlbl_af6list *list_entry; | 628 | struct netlbl_af6list *list_entry; |
629 | struct netlbl_unlhsh_addr6 *entry; | 629 | struct netlbl_unlhsh_addr6 *entry; |
630 | struct audit_buffer *audit_buf; | 630 | struct audit_buffer *audit_buf; |
@@ -638,7 +638,7 @@ static int netlbl_unlhsh_remove_addr6(struct net *net, | |||
638 | if (list_entry != NULL) | 638 | if (list_entry != NULL) |
639 | entry = netlbl_unlhsh_addr6_entry(list_entry); | 639 | entry = netlbl_unlhsh_addr6_entry(list_entry); |
640 | else | 640 | else |
641 | ret_val = -ENOENT; | 641 | entry = NULL; |
642 | 642 | ||
643 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, | 643 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, |
644 | audit_info); | 644 | audit_info); |
@@ -649,19 +649,21 @@ static int netlbl_unlhsh_remove_addr6(struct net *net, | |||
649 | addr, mask); | 649 | addr, mask); |
650 | if (dev != NULL) | 650 | if (dev != NULL) |
651 | dev_put(dev); | 651 | dev_put(dev); |
652 | if (entry && security_secid_to_secctx(entry->secid, | 652 | if (entry != NULL && |
653 | &secctx, | 653 | security_secid_to_secctx(entry->secid, |
654 | &secctx_len) == 0) { | 654 | &secctx, &secctx_len) == 0) { |
655 | audit_log_format(audit_buf, " sec_obj=%s", secctx); | 655 | audit_log_format(audit_buf, " sec_obj=%s", secctx); |
656 | security_release_secctx(secctx, secctx_len); | 656 | security_release_secctx(secctx, secctx_len); |
657 | } | 657 | } |
658 | audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0); | 658 | audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0); |
659 | audit_log_end(audit_buf); | 659 | audit_log_end(audit_buf); |
660 | } | 660 | } |
661 | 661 | ||
662 | if (ret_val == 0) | 662 | if (entry == NULL) |
663 | call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6); | 663 | return -ENOENT; |
664 | return ret_val; | 664 | |
665 | call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6); | ||
666 | return 0; | ||
665 | } | 667 | } |
666 | #endif /* IPv6 */ | 668 | #endif /* IPv6 */ |
667 | 669 | ||
diff --git a/net/phonet/pep-gprs.c b/net/phonet/pep-gprs.c index 9978afbd9f2a..803eeef0aa85 100644 --- a/net/phonet/pep-gprs.c +++ b/net/phonet/pep-gprs.c | |||
@@ -155,12 +155,13 @@ static void gprs_data_ready(struct sock *sk, int len) | |||
155 | static void gprs_write_space(struct sock *sk) | 155 | static void gprs_write_space(struct sock *sk) |
156 | { | 156 | { |
157 | struct gprs_dev *dev = sk->sk_user_data; | 157 | struct gprs_dev *dev = sk->sk_user_data; |
158 | struct net_device *net = dev->net; | ||
158 | unsigned credits = pep_writeable(sk); | 159 | unsigned credits = pep_writeable(sk); |
159 | 160 | ||
160 | spin_lock_bh(&dev->tx_lock); | 161 | spin_lock_bh(&dev->tx_lock); |
161 | dev->tx_max = credits; | 162 | dev->tx_max = credits; |
162 | if (credits > skb_queue_len(&dev->tx_queue)) | 163 | if (credits > skb_queue_len(&dev->tx_queue) && netif_running(net)) |
163 | netif_wake_queue(dev->net); | 164 | netif_wake_queue(net); |
164 | spin_unlock_bh(&dev->tx_lock); | 165 | spin_unlock_bh(&dev->tx_lock); |
165 | } | 166 | } |
166 | 167 | ||
@@ -168,6 +169,23 @@ static void gprs_write_space(struct sock *sk) | |||
168 | * Network device callbacks | 169 | * Network device callbacks |
169 | */ | 170 | */ |
170 | 171 | ||
172 | static int gprs_open(struct net_device *dev) | ||
173 | { | ||
174 | struct gprs_dev *gp = netdev_priv(dev); | ||
175 | |||
176 | gprs_write_space(gp->sk); | ||
177 | return 0; | ||
178 | } | ||
179 | |||
180 | static int gprs_close(struct net_device *dev) | ||
181 | { | ||
182 | struct gprs_dev *gp = netdev_priv(dev); | ||
183 | |||
184 | netif_stop_queue(dev); | ||
185 | flush_work(&gp->tx_work); | ||
186 | return 0; | ||
187 | } | ||
188 | |||
171 | static int gprs_xmit(struct sk_buff *skb, struct net_device *net) | 189 | static int gprs_xmit(struct sk_buff *skb, struct net_device *net) |
172 | { | 190 | { |
173 | struct gprs_dev *dev = netdev_priv(net); | 191 | struct gprs_dev *dev = netdev_priv(net); |
@@ -254,6 +272,8 @@ static void gprs_setup(struct net_device *net) | |||
254 | net->tx_queue_len = 10; | 272 | net->tx_queue_len = 10; |
255 | 273 | ||
256 | net->destructor = free_netdev; | 274 | net->destructor = free_netdev; |
275 | net->open = gprs_open; | ||
276 | net->stop = gprs_close; | ||
257 | net->hard_start_xmit = gprs_xmit; /* mandatory */ | 277 | net->hard_start_xmit = gprs_xmit; /* mandatory */ |
258 | net->change_mtu = gprs_set_mtu; | 278 | net->change_mtu = gprs_set_mtu; |
259 | net->get_stats = gprs_get_stats; | 279 | net->get_stats = gprs_get_stats; |
@@ -318,7 +338,6 @@ int gprs_attach(struct sock *sk) | |||
318 | dev->sk = sk; | 338 | dev->sk = sk; |
319 | 339 | ||
320 | printk(KERN_DEBUG"%s: attached\n", net->name); | 340 | printk(KERN_DEBUG"%s: attached\n", net->name); |
321 | gprs_write_space(sk); /* kick off TX */ | ||
322 | return net->ifindex; | 341 | return net->ifindex; |
323 | 342 | ||
324 | out_rel: | 343 | out_rel: |
@@ -341,7 +360,5 @@ void gprs_detach(struct sock *sk) | |||
341 | 360 | ||
342 | printk(KERN_DEBUG"%s: detached\n", net->name); | 361 | printk(KERN_DEBUG"%s: detached\n", net->name); |
343 | unregister_netdev(net); | 362 | unregister_netdev(net); |
344 | flush_scheduled_work(); | ||
345 | sock_put(sk); | 363 | sock_put(sk); |
346 | skb_queue_purge(&dev->tx_queue); | ||
347 | } | 364 | } |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index a11959908d9a..98402f0efa47 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -46,9 +46,6 @@ | |||
46 | layering other disciplines. It does not need to do bandwidth | 46 | layering other disciplines. It does not need to do bandwidth |
47 | control either since that can be handled by using token | 47 | control either since that can be handled by using token |
48 | bucket or other rate control. | 48 | bucket or other rate control. |
49 | |||
50 | The simulator is limited by the Linux timer resolution | ||
51 | and will create packet bursts on the HZ boundary (1ms). | ||
52 | */ | 49 | */ |
53 | 50 | ||
54 | struct netem_sched_data { | 51 | struct netem_sched_data { |