diff options
42 files changed, 232 insertions, 85 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 826b6e14831..e7848a0d99e 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -315,6 +315,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 315 | aic79xx= [HW,SCSI] | 315 | aic79xx= [HW,SCSI] |
| 316 | See Documentation/scsi/aic79xx.txt. | 316 | See Documentation/scsi/aic79xx.txt. |
| 317 | 317 | ||
| 318 | alignment= [KNL,ARM] | ||
| 319 | Allow the default userspace alignment fault handler | ||
| 320 | behaviour to be specified. Bit 0 enables warnings, | ||
| 321 | bit 1 enables fixups, and bit 2 sends a segfault. | ||
| 322 | |||
| 318 | amd_iommu= [HW,X86-84] | 323 | amd_iommu= [HW,X86-84] |
| 319 | Pass parameters to the AMD IOMMU driver in the system. | 324 | Pass parameters to the AMD IOMMU driver in the system. |
| 320 | Possible values are: | 325 | Possible values are: |
diff --git a/MAINTAINERS b/MAINTAINERS index 8ed3d0a8b3f..c95f727236e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -616,10 +616,10 @@ M: Richard Purdie <rpurdie@rpsys.net> | |||
| 616 | S: Maintained | 616 | S: Maintained |
| 617 | 617 | ||
| 618 | ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE | 618 | ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE |
| 619 | M: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 619 | M: Paulius Zaleckas <paulius.zaleckas@gmail.com> |
| 620 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 620 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 621 | T: git git://gitorious.org/linux-gemini/mainline.git | 621 | T: git git://gitorious.org/linux-gemini/mainline.git |
| 622 | S: Maintained | 622 | S: Odd Fixes |
| 623 | F: arch/arm/mach-gemini/ | 623 | F: arch/arm/mach-gemini/ |
| 624 | 624 | ||
| 625 | ARM/EBSA110 MACHINE SUPPORT | 625 | ARM/EBSA110 MACHINE SUPPORT |
| @@ -641,9 +641,9 @@ T: topgit git://git.openezx.org/openezx.git | |||
| 641 | F: arch/arm/mach-pxa/ezx.c | 641 | F: arch/arm/mach-pxa/ezx.c |
| 642 | 642 | ||
| 643 | ARM/FARADAY FA526 PORT | 643 | ARM/FARADAY FA526 PORT |
| 644 | M: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 644 | M: Paulius Zaleckas <paulius.zaleckas@gmail.com> |
| 645 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 645 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 646 | S: Maintained | 646 | S: Odd Fixes |
| 647 | F: arch/arm/mm/*-fa* | 647 | F: arch/arm/mm/*-fa* |
| 648 | 648 | ||
| 649 | ARM/FOOTBRIDGE ARCHITECTURE | 649 | ARM/FOOTBRIDGE ARCHITECTURE |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index c77d2fa1f6e..8113bb5fb66 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
| @@ -42,7 +42,8 @@ | |||
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ | 44 | #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ |
| 45 | defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) | 45 | defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) || \ |
| 46 | defined(CONFIG_CPU_ARM1026) | ||
| 46 | # define MULTI_CACHE 1 | 47 | # define MULTI_CACHE 1 |
| 47 | #endif | 48 | #endif |
| 48 | 49 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c6c57b640b6..621acad8ea4 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
| @@ -102,6 +102,7 @@ struct cpu_cache_fns cpu_cache; | |||
| 102 | #endif | 102 | #endif |
| 103 | #ifdef CONFIG_OUTER_CACHE | 103 | #ifdef CONFIG_OUTER_CACHE |
| 104 | struct outer_cache_fns outer_cache; | 104 | struct outer_cache_fns outer_cache; |
| 105 | EXPORT_SYMBOL(outer_cache); | ||
| 105 | #endif | 106 | #endif |
| 106 | 107 | ||
| 107 | struct stack { | 108 | struct stack { |
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c index e7263854bc7..fe3bd5ac8b1 100644 --- a/arch/arm/mach-gemini/gpio.c +++ b/arch/arm/mach-gemini/gpio.c | |||
| @@ -86,7 +86,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type) | |||
| 86 | unsigned int reg_both, reg_level, reg_type; | 86 | unsigned int reg_both, reg_level, reg_type; |
| 87 | 87 | ||
| 88 | reg_type = __raw_readl(base + GPIO_INT_TYPE); | 88 | reg_type = __raw_readl(base + GPIO_INT_TYPE); |
| 89 | reg_level = __raw_readl(base + GPIO_INT_BOTH_EDGE); | 89 | reg_level = __raw_readl(base + GPIO_INT_LEVEL); |
| 90 | reg_both = __raw_readl(base + GPIO_INT_BOTH_EDGE); | 90 | reg_both = __raw_readl(base + GPIO_INT_BOTH_EDGE); |
| 91 | 91 | ||
| 92 | switch (type) { | 92 | switch (type) { |
| @@ -117,7 +117,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type) | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | __raw_writel(reg_type, base + GPIO_INT_TYPE); | 119 | __raw_writel(reg_type, base + GPIO_INT_TYPE); |
| 120 | __raw_writel(reg_level, base + GPIO_INT_BOTH_EDGE); | 120 | __raw_writel(reg_level, base + GPIO_INT_LEVEL); |
| 121 | __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE); | 121 | __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE); |
| 122 | 122 | ||
| 123 | gpio_ack_irq(irq); | 123 | gpio_ack_irq(irq); |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 5fedc50c58e..5fef73f4743 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
| @@ -961,16 +961,14 @@ static void __init omap_mux_init_list(struct omap_mux *superset) | |||
| 961 | while (superset->reg_offset != OMAP_MUX_TERMINATOR) { | 961 | while (superset->reg_offset != OMAP_MUX_TERMINATOR) { |
| 962 | struct omap_mux *entry; | 962 | struct omap_mux *entry; |
| 963 | 963 | ||
| 964 | #ifndef CONFIG_OMAP_MUX | 964 | #ifdef CONFIG_OMAP_MUX |
| 965 | /* Skip pins that are not muxed as GPIO by bootloader */ | 965 | if (!superset->muxnames || !superset->muxnames[0]) { |
| 966 | if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) { | ||
| 967 | superset++; | 966 | superset++; |
| 968 | continue; | 967 | continue; |
| 969 | } | 968 | } |
| 970 | #endif | 969 | #else |
| 971 | 970 | /* Skip pins that are not muxed as GPIO by bootloader */ | |
| 972 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) | 971 | if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) { |
| 973 | if (!superset->muxnames || !superset->muxnames[0]) { | ||
| 974 | superset++; | 972 | superset++; |
| 975 | continue; | 973 | continue; |
| 976 | } | 974 | } |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index b270d6228fe..62820eda84d 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
| 12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
| 13 | */ | 13 | */ |
| 14 | #include <linux/moduleparam.h> | ||
| 14 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
| 15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 16 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| @@ -77,6 +78,8 @@ static unsigned long ai_dword; | |||
| 77 | static unsigned long ai_multi; | 78 | static unsigned long ai_multi; |
| 78 | static int ai_usermode; | 79 | static int ai_usermode; |
| 79 | 80 | ||
| 81 | core_param(alignment, ai_usermode, int, 0600); | ||
| 82 | |||
| 80 | #define UM_WARN (1 << 0) | 83 | #define UM_WARN (1 << 0) |
| 81 | #define UM_FIXUP (1 << 1) | 84 | #define UM_FIXUP (1 << 1) |
| 82 | #define UM_SIGNAL (1 << 2) | 85 | #define UM_SIGNAL (1 << 2) |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 5a79fc6ee81..31c2f4c30a9 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | # | 12 | # |
| 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
| 14 | # | 14 | # |
| 15 | # Last update: Thu Jan 28 22:15:54 2010 | 15 | # Last update: Sat Feb 20 14:16:15 2010 |
| 16 | # | 16 | # |
| 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
| 18 | # | 18 | # |
| @@ -2257,7 +2257,7 @@ oratisalog MACH_ORATISALOG ORATISALOG 2268 | |||
| 2257 | oratismadi MACH_ORATISMADI ORATISMADI 2269 | 2257 | oratismadi MACH_ORATISMADI ORATISMADI 2269 |
| 2258 | oratisot16 MACH_ORATISOT16 ORATISOT16 2270 | 2258 | oratisot16 MACH_ORATISOT16 ORATISOT16 2270 |
| 2259 | oratisdesk MACH_ORATISDESK ORATISDESK 2271 | 2259 | oratisdesk MACH_ORATISDESK ORATISDESK 2271 |
| 2260 | v2_ca9 MACH_V2P_CA9 V2P_CA9 2272 | 2260 | vexpress MACH_VEXPRESS VEXPRESS 2272 |
| 2261 | sintexo MACH_SINTEXO SINTEXO 2273 | 2261 | sintexo MACH_SINTEXO SINTEXO 2273 |
| 2262 | cm3389 MACH_CM3389 CM3389 2274 | 2262 | cm3389 MACH_CM3389 CM3389 2274 |
| 2263 | omap3_cio MACH_OMAP3_CIO OMAP3_CIO 2275 | 2263 | omap3_cio MACH_OMAP3_CIO OMAP3_CIO 2275 |
| @@ -2636,3 +2636,45 @@ hw90240 MACH_HW90240 HW90240 2648 | |||
| 2636 | dm365_leopard MACH_DM365_LEOPARD DM365_LEOPARD 2649 | 2636 | dm365_leopard MACH_DM365_LEOPARD DM365_LEOPARD 2649 |
| 2637 | mityomapl138 MACH_MITYOMAPL138 MITYOMAPL138 2650 | 2637 | mityomapl138 MACH_MITYOMAPL138 MITYOMAPL138 2650 |
| 2638 | scat110 MACH_SCAT110 SCAT110 2651 | 2638 | scat110 MACH_SCAT110 SCAT110 2651 |
| 2639 | acer_a1 MACH_ACER_A1 ACER_A1 2652 | ||
| 2640 | cmcontrol MACH_CMCONTROL CMCONTROL 2653 | ||
| 2641 | pelco_lamar MACH_PELCO_LAMAR PELCO_LAMAR 2654 | ||
| 2642 | rfp43 MACH_RFP43 RFP43 2655 | ||
| 2643 | sk86r0301 MACH_SK86R0301 SK86R0301 2656 | ||
| 2644 | ctpxa MACH_CTPXA CTPXA 2657 | ||
| 2645 | epb_arm9_a MACH_EPB_ARM9_A EPB_ARM9_A 2658 | ||
| 2646 | guruplug MACH_GURUPLUG GURUPLUG 2659 | ||
| 2647 | spear310 MACH_SPEAR310 SPEAR310 2660 | ||
| 2648 | spear320 MACH_SPEAR320 SPEAR320 2661 | ||
| 2649 | robotx MACH_ROBOTX ROBOTX 2662 | ||
| 2650 | lsxhl MACH_LSXHL LSXHL 2663 | ||
| 2651 | smartlite MACH_SMARTLITE SMARTLITE 2664 | ||
| 2652 | cws2 MACH_CWS2 CWS2 2665 | ||
| 2653 | m619 MACH_M619 M619 2666 | ||
| 2654 | smartview MACH_SMARTVIEW SMARTVIEW 2667 | ||
| 2655 | lsa_salsa MACH_LSA_SALSA LSA_SALSA 2668 | ||
| 2656 | kizbox MACH_KIZBOX KIZBOX 2669 | ||
| 2657 | htccharmer MACH_HTCCHARMER HTCCHARMER 2670 | ||
| 2658 | guf_neso_lt MACH_GUF_NESO_LT GUF_NESO_LT 2671 | ||
| 2659 | pm9g45 MACH_PM9G45 PM9G45 2672 | ||
| 2660 | htcpanther MACH_HTCPANTHER HTCPANTHER 2673 | ||
| 2661 | htcpanther_cdma MACH_HTCPANTHER_CDMA HTCPANTHER_CDMA 2674 | ||
| 2662 | reb01 MACH_REB01 REB01 2675 | ||
| 2663 | aquila MACH_AQUILA AQUILA 2676 | ||
| 2664 | spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677 | ||
| 2665 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | ||
| 2666 | surf7x30 MACH_SURF7X30 SURF7X30 2679 | ||
| 2667 | micro2440 MACH_MICRO2440 MICRO2440 2680 | ||
| 2668 | am2440 MACH_AM2440 AM2440 2681 | ||
| 2669 | tq2440 MACH_TQ2440 TQ2440 2682 | ||
| 2670 | lpc2478oem MACH_LPC2478OEM LPC2478OEM 2683 | ||
| 2671 | ak880x MACH_AK880X AK880X 2684 | ||
| 2672 | cobra3530 MACH_COBRA3530 COBRA3530 2685 | ||
| 2673 | pmppb MACH_PMPPB PMPPB 2686 | ||
| 2674 | u6715 MACH_U6715 U6715 2687 | ||
| 2675 | axar1500_sender MACH_AXAR1500_SENDER AXAR1500_SENDER 2688 | ||
| 2676 | g30_dvb MACH_G30_DVB G30_DVB 2689 | ||
| 2677 | vc088x MACH_VC088X VC088X 2690 | ||
| 2678 | mioa702 MACH_MIOA702 MIOA702 2691 | ||
| 2679 | hpmin MACH_HPMIN HPMIN 2692 | ||
| 2680 | ak880xak MACH_AK880XAK AK880XAK 2693 | ||
diff --git a/arch/sparc/kernel/kstack.h b/arch/sparc/kernel/kstack.h index 4248d969272..5247283d1c0 100644 --- a/arch/sparc/kernel/kstack.h +++ b/arch/sparc/kernel/kstack.h | |||
| @@ -11,6 +11,10 @@ static inline bool kstack_valid(struct thread_info *tp, unsigned long sp) | |||
| 11 | { | 11 | { |
| 12 | unsigned long base = (unsigned long) tp; | 12 | unsigned long base = (unsigned long) tp; |
| 13 | 13 | ||
| 14 | /* Stack pointer must be 16-byte aligned. */ | ||
| 15 | if (sp & (16UL - 1)) | ||
| 16 | return false; | ||
| 17 | |||
| 14 | if (sp >= (base + sizeof(struct thread_info)) && | 18 | if (sp >= (base + sizeof(struct thread_info)) && |
| 15 | sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf))) | 19 | sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf))) |
| 16 | return true; | 20 | return true; |
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index 4c26eb59e74..53a58b34984 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c | |||
| @@ -105,7 +105,7 @@ static unsigned long of_bus_sbus_get_flags(const u32 *addr, unsigned long flags) | |||
| 105 | 105 | ||
| 106 | static int of_bus_ambapp_match(struct device_node *np) | 106 | static int of_bus_ambapp_match(struct device_node *np) |
| 107 | { | 107 | { |
| 108 | return !strcmp(np->name, "ambapp"); | 108 | return !strcmp(np->type, "ambapp"); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | static void of_bus_ambapp_count_cells(struct device_node *child, | 111 | static void of_bus_ambapp_count_cells(struct device_node *child, |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 539e83f8e08..592b03d8516 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
| @@ -247,6 +247,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
| 247 | struct pci_bus *bus, int devfn) | 247 | struct pci_bus *bus, int devfn) |
| 248 | { | 248 | { |
| 249 | struct dev_archdata *sd; | 249 | struct dev_archdata *sd; |
| 250 | struct pci_slot *slot; | ||
| 250 | struct of_device *op; | 251 | struct of_device *op; |
| 251 | struct pci_dev *dev; | 252 | struct pci_dev *dev; |
| 252 | const char *type; | 253 | const char *type; |
| @@ -286,6 +287,11 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
| 286 | dev->dev.bus = &pci_bus_type; | 287 | dev->dev.bus = &pci_bus_type; |
| 287 | dev->devfn = devfn; | 288 | dev->devfn = devfn; |
| 288 | dev->multifunction = 0; /* maybe a lie? */ | 289 | dev->multifunction = 0; /* maybe a lie? */ |
| 290 | set_pcie_port_type(dev); | ||
| 291 | |||
| 292 | list_for_each_entry(slot, &dev->bus->slots, list) | ||
| 293 | if (PCI_SLOT(dev->devfn) == slot->number) | ||
| 294 | dev->slot = slot; | ||
| 289 | 295 | ||
| 290 | dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); | 296 | dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); |
| 291 | dev->device = of_getintprop_default(node, "device-id", 0xffff); | 297 | dev->device = of_getintprop_default(node, "device-id", 0xffff); |
| @@ -322,6 +328,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
| 322 | 328 | ||
| 323 | dev->current_state = 4; /* unknown power state */ | 329 | dev->current_state = 4; /* unknown power state */ |
| 324 | dev->error_state = pci_channel_io_normal; | 330 | dev->error_state = pci_channel_io_normal; |
| 331 | dev->dma_mask = 0xffffffff; | ||
| 325 | 332 | ||
| 326 | if (!strcmp(node->name, "pci")) { | 333 | if (!strcmp(node->name, "pci")) { |
| 327 | /* a PCI-PCI bridge */ | 334 | /* a PCI-PCI bridge */ |
diff --git a/arch/sparc/kernel/tsb.S b/arch/sparc/kernel/tsb.S index 8c91d9b29a2..db15d123f05 100644 --- a/arch/sparc/kernel/tsb.S +++ b/arch/sparc/kernel/tsb.S | |||
| @@ -191,10 +191,12 @@ tsb_dtlb_load: | |||
| 191 | 191 | ||
| 192 | tsb_itlb_load: | 192 | tsb_itlb_load: |
| 193 | /* Executable bit must be set. */ | 193 | /* Executable bit must be set. */ |
| 194 | 661: andcc %g5, _PAGE_EXEC_4U, %g0 | 194 | 661: sethi %hi(_PAGE_EXEC_4U), %g4 |
| 195 | .section .sun4v_1insn_patch, "ax" | 195 | andcc %g5, %g4, %g0 |
| 196 | .section .sun4v_2insn_patch, "ax" | ||
| 196 | .word 661b | 197 | .word 661b |
| 197 | andcc %g5, _PAGE_EXEC_4V, %g0 | 198 | andcc %g5, _PAGE_EXEC_4V, %g0 |
| 199 | nop | ||
| 198 | .previous | 200 | .previous |
| 199 | 201 | ||
| 200 | be,pn %xcc, tsb_do_fault | 202 | be,pn %xcc, tsb_do_fault |
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 6d5a711c2e9..75bcf35a093 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c | |||
| @@ -1428,9 +1428,12 @@ static void r700_gfx_init(struct drm_device *dev, | |||
| 1428 | 1428 | ||
| 1429 | gb_tiling_config |= R600_BANK_SWAPS(1); | 1429 | gb_tiling_config |= R600_BANK_SWAPS(1); |
| 1430 | 1430 | ||
| 1431 | backend_map = r700_get_tile_pipe_to_backend_map(dev_priv->r600_max_tile_pipes, | 1431 | if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV740) |
| 1432 | dev_priv->r600_max_backends, | 1432 | backend_map = 0x28; |
| 1433 | (0xff << dev_priv->r600_max_backends) & 0xff); | 1433 | else |
| 1434 | backend_map = r700_get_tile_pipe_to_backend_map(dev_priv->r600_max_tile_pipes, | ||
| 1435 | dev_priv->r600_max_backends, | ||
| 1436 | (0xff << dev_priv->r600_max_backends) & 0xff); | ||
| 1434 | gb_tiling_config |= R600_BACKEND_MAP(backend_map); | 1437 | gb_tiling_config |= R600_BACKEND_MAP(backend_map); |
| 1435 | 1438 | ||
| 1436 | cc_gc_shader_pipe_config = | 1439 | cc_gc_shader_pipe_config = |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 2dcda611587..4d8831548a5 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
| @@ -206,6 +206,15 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, | |||
| 206 | *connector_type = DRM_MODE_CONNECTOR_DVID; | 206 | *connector_type = DRM_MODE_CONNECTOR_DVID; |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | /* Asrock RS600 board lists the DVI port as HDMI */ | ||
| 210 | if ((dev->pdev->device == 0x7941) && | ||
| 211 | (dev->pdev->subsystem_vendor == 0x1849) && | ||
| 212 | (dev->pdev->subsystem_device == 0x7941)) { | ||
| 213 | if ((*connector_type == DRM_MODE_CONNECTOR_HDMIA) && | ||
| 214 | (supported_device == ATOM_DEVICE_DFP3_SUPPORT)) | ||
| 215 | *connector_type = DRM_MODE_CONNECTOR_DVID; | ||
| 216 | } | ||
| 217 | |||
| 209 | /* a-bit f-i90hd - ciaranm on #radeonhd - this board has no DVI */ | 218 | /* a-bit f-i90hd - ciaranm on #radeonhd - this board has no DVI */ |
| 210 | if ((dev->pdev->device == 0x7941) && | 219 | if ((dev->pdev->device == 0x7941) && |
| 211 | (dev->pdev->subsystem_vendor == 0x147b) && | 220 | (dev->pdev->subsystem_vendor == 0x147b) && |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 23818854001..65f81942f39 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
| @@ -780,7 +780,7 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect | |||
| 780 | * connected and the DVI port disconnected. If the edid doesn't | 780 | * connected and the DVI port disconnected. If the edid doesn't |
| 781 | * say HDMI, vice versa. | 781 | * say HDMI, vice versa. |
| 782 | */ | 782 | */ |
| 783 | if (radeon_connector->shared_ddc && connector_status_connected) { | 783 | if (radeon_connector->shared_ddc && (ret == connector_status_connected)) { |
| 784 | struct drm_device *dev = connector->dev; | 784 | struct drm_device *dev = connector->dev; |
| 785 | struct drm_connector *list_connector; | 785 | struct drm_connector *list_connector; |
| 786 | struct radeon_connector *list_radeon_connector; | 786 | struct radeon_connector *list_radeon_connector; |
| @@ -1060,8 +1060,7 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
| 1060 | return; | 1060 | return; |
| 1061 | } | 1061 | } |
| 1062 | if (radeon_connector->ddc_bus && i2c_bus->valid) { | 1062 | if (radeon_connector->ddc_bus && i2c_bus->valid) { |
| 1063 | if (memcmp(&radeon_connector->ddc_bus->rec, i2c_bus, | 1063 | if (radeon_connector->ddc_bus->rec.i2c_id == i2c_bus->i2c_id) { |
| 1064 | sizeof(struct radeon_i2c_bus_rec)) == 0) { | ||
| 1065 | radeon_connector->shared_ddc = true; | 1064 | radeon_connector->shared_ddc = true; |
| 1066 | shared_ddc = true; | 1065 | shared_ddc = true; |
| 1067 | } | 1066 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index e13785282a8..c57ad606504 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h | |||
| @@ -106,9 +106,10 @@ | |||
| 106 | * 1.29- R500 3D cmd buffer support | 106 | * 1.29- R500 3D cmd buffer support |
| 107 | * 1.30- Add support for occlusion queries | 107 | * 1.30- Add support for occlusion queries |
| 108 | * 1.31- Add support for num Z pipes from GET_PARAM | 108 | * 1.31- Add support for num Z pipes from GET_PARAM |
| 109 | * 1.32- fixes for rv740 setup | ||
| 109 | */ | 110 | */ |
| 110 | #define DRIVER_MAJOR 1 | 111 | #define DRIVER_MAJOR 1 |
| 111 | #define DRIVER_MINOR 31 | 112 | #define DRIVER_MINOR 32 |
| 112 | #define DRIVER_PATCHLEVEL 0 | 113 | #define DRIVER_PATCHLEVEL 0 |
| 113 | 114 | ||
| 114 | enum radeon_cp_microcode_version { | 115 | enum radeon_cp_microcode_version { |
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 694799f6fac..6579eb4c1f2 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
| @@ -100,6 +100,8 @@ void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib **ib) | |||
| 100 | if (tmp == NULL) { | 100 | if (tmp == NULL) { |
| 101 | return; | 101 | return; |
| 102 | } | 102 | } |
| 103 | if (!tmp->fence->emited) | ||
| 104 | radeon_fence_unref(&tmp->fence); | ||
| 103 | mutex_lock(&rdev->ib_pool.mutex); | 105 | mutex_lock(&rdev->ib_pool.mutex); |
| 104 | tmp->free = true; | 106 | tmp->free = true; |
| 105 | mutex_unlock(&rdev->ib_pool.mutex); | 107 | mutex_unlock(&rdev->ib_pool.mutex); |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 5943d561fd1..03021674d09 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
| @@ -549,9 +549,12 @@ static void rv770_gpu_init(struct radeon_device *rdev) | |||
| 549 | 549 | ||
| 550 | gb_tiling_config |= BANK_SWAPS(1); | 550 | gb_tiling_config |= BANK_SWAPS(1); |
| 551 | 551 | ||
| 552 | backend_map = r700_get_tile_pipe_to_backend_map(rdev->config.rv770.max_tile_pipes, | 552 | if (rdev->family == CHIP_RV740) |
| 553 | rdev->config.rv770.max_backends, | 553 | backend_map = 0x28; |
| 554 | (0xff << rdev->config.rv770.max_backends) & 0xff); | 554 | else |
| 555 | backend_map = r700_get_tile_pipe_to_backend_map(rdev->config.rv770.max_tile_pipes, | ||
| 556 | rdev->config.rv770.max_backends, | ||
| 557 | (0xff << rdev->config.rv770.max_backends) & 0xff); | ||
| 555 | gb_tiling_config |= BACKEND_MAP(backend_map); | 558 | gb_tiling_config |= BACKEND_MAP(backend_map); |
| 556 | 559 | ||
| 557 | cc_gc_shader_pipe_config = | 560 | cc_gc_shader_pipe_config = |
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index e2123af7775..3d47a2c1232 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c | |||
| @@ -196,14 +196,15 @@ EXPORT_SYMBOL(ttm_tt_populate); | |||
| 196 | 196 | ||
| 197 | #ifdef CONFIG_X86 | 197 | #ifdef CONFIG_X86 |
| 198 | static inline int ttm_tt_set_page_caching(struct page *p, | 198 | static inline int ttm_tt_set_page_caching(struct page *p, |
| 199 | enum ttm_caching_state c_state) | 199 | enum ttm_caching_state c_old, |
| 200 | enum ttm_caching_state c_new) | ||
| 200 | { | 201 | { |
| 201 | int ret = 0; | 202 | int ret = 0; |
| 202 | 203 | ||
| 203 | if (PageHighMem(p)) | 204 | if (PageHighMem(p)) |
| 204 | return 0; | 205 | return 0; |
| 205 | 206 | ||
| 206 | if (get_page_memtype(p) != -1) { | 207 | if (c_old != tt_cached) { |
| 207 | /* p isn't in the default caching state, set it to | 208 | /* p isn't in the default caching state, set it to |
| 208 | * writeback first to free its current memtype. */ | 209 | * writeback first to free its current memtype. */ |
| 209 | 210 | ||
| @@ -212,16 +213,17 @@ static inline int ttm_tt_set_page_caching(struct page *p, | |||
| 212 | return ret; | 213 | return ret; |
| 213 | } | 214 | } |
| 214 | 215 | ||
| 215 | if (c_state == tt_wc) | 216 | if (c_new == tt_wc) |
| 216 | ret = set_memory_wc((unsigned long) page_address(p), 1); | 217 | ret = set_memory_wc((unsigned long) page_address(p), 1); |
| 217 | else if (c_state == tt_uncached) | 218 | else if (c_new == tt_uncached) |
| 218 | ret = set_pages_uc(p, 1); | 219 | ret = set_pages_uc(p, 1); |
| 219 | 220 | ||
| 220 | return ret; | 221 | return ret; |
| 221 | } | 222 | } |
| 222 | #else /* CONFIG_X86 */ | 223 | #else /* CONFIG_X86 */ |
| 223 | static inline int ttm_tt_set_page_caching(struct page *p, | 224 | static inline int ttm_tt_set_page_caching(struct page *p, |
| 224 | enum ttm_caching_state c_state) | 225 | enum ttm_caching_state c_old, |
| 226 | enum ttm_caching_state c_new) | ||
| 225 | { | 227 | { |
| 226 | return 0; | 228 | return 0; |
| 227 | } | 229 | } |
| @@ -254,7 +256,9 @@ static int ttm_tt_set_caching(struct ttm_tt *ttm, | |||
| 254 | for (i = 0; i < ttm->num_pages; ++i) { | 256 | for (i = 0; i < ttm->num_pages; ++i) { |
| 255 | cur_page = ttm->pages[i]; | 257 | cur_page = ttm->pages[i]; |
| 256 | if (likely(cur_page != NULL)) { | 258 | if (likely(cur_page != NULL)) { |
| 257 | ret = ttm_tt_set_page_caching(cur_page, c_state); | 259 | ret = ttm_tt_set_page_caching(cur_page, |
| 260 | ttm->caching_state, | ||
| 261 | c_state); | ||
| 258 | if (unlikely(ret != 0)) | 262 | if (unlikely(ret != 0)) |
| 259 | goto out_err; | 263 | goto out_err; |
| 260 | } | 264 | } |
| @@ -268,7 +272,7 @@ out_err: | |||
| 268 | for (j = 0; j < i; ++j) { | 272 | for (j = 0; j < i; ++j) { |
| 269 | cur_page = ttm->pages[j]; | 273 | cur_page = ttm->pages[j]; |
| 270 | if (likely(cur_page != NULL)) { | 274 | if (likely(cur_page != NULL)) { |
| 271 | (void)ttm_tt_set_page_caching(cur_page, | 275 | (void)ttm_tt_set_page_caching(cur_page, c_state, |
| 272 | ttm->caching_state); | 276 | ttm->caching_state); |
| 273 | } | 277 | } |
| 274 | } | 278 | } |
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index 24b56dc5459..2f6cf69ecb3 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c | |||
| @@ -961,7 +961,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, | |||
| 961 | remaining -= 7; | 961 | remaining -= 7; |
| 962 | pr_devel("client 0x%p called 'target'\n", priv); | 962 | pr_devel("client 0x%p called 'target'\n", priv); |
| 963 | /* if target is default */ | 963 | /* if target is default */ |
| 964 | if (!strncmp(kbuf, "default", 7)) | 964 | if (!strncmp(curr_pos, "default", 7)) |
| 965 | pdev = pci_dev_get(vga_default_device()); | 965 | pdev = pci_dev_get(vga_default_device()); |
| 966 | else { | 966 | else { |
| 967 | if (!vga_pci_str_to_vars(curr_pos, remaining, | 967 | if (!vga_pci_str_to_vars(curr_pos, remaining, |
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 1b249897c9f..465295b1d14 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
| @@ -112,11 +112,13 @@ config DVB_USB_CXUSB | |||
| 112 | select DVB_MT352 if !DVB_FE_CUSTOMISE | 112 | select DVB_MT352 if !DVB_FE_CUSTOMISE |
| 113 | select DVB_ZL10353 if !DVB_FE_CUSTOMISE | 113 | select DVB_ZL10353 if !DVB_FE_CUSTOMISE |
| 114 | select DVB_DIB7000P if !DVB_FE_CUSTOMISE | 114 | select DVB_DIB7000P if !DVB_FE_CUSTOMISE |
| 115 | select DVB_LGS8GL5 if !DVB_FE_CUSTOMISE | ||
| 116 | select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE | 115 | select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE |
| 116 | select DVB_ATBM8830 if !DVB_FE_CUSTOMISE | ||
| 117 | select DVB_LGS8GXX if !DVB_FE_CUSTOMISE | ||
| 117 | select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMISE | 118 | select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMISE |
| 118 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE | 119 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE |
| 119 | select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE | 120 | select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE |
| 121 | select MEDIA_TUNER_MAX2165 if !MEDIA_TUNER_CUSTOMISE | ||
| 120 | help | 122 | help |
| 121 | Say Y here to support the Conexant USB2.0 hybrid reference design. | 123 | Say Y here to support the Conexant USB2.0 hybrid reference design. |
| 122 | Currently, only DVB and ATSC modes are supported, analog mode | 124 | Currently, only DVB and ATSC modes are supported, analog mode |
diff --git a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c index 3051b64aa17..445fa106806 100644 --- a/drivers/media/dvb/frontends/l64781.c +++ b/drivers/media/dvb/frontends/l64781.c | |||
| @@ -192,8 +192,8 @@ static int apply_frontend_param (struct dvb_frontend* fe, struct dvb_frontend_pa | |||
| 192 | spi_bias *= qam_tab[p->constellation]; | 192 | spi_bias *= qam_tab[p->constellation]; |
| 193 | spi_bias /= p->code_rate_HP + 1; | 193 | spi_bias /= p->code_rate_HP + 1; |
| 194 | spi_bias /= (guard_tab[p->guard_interval] + 32); | 194 | spi_bias /= (guard_tab[p->guard_interval] + 32); |
| 195 | spi_bias *= 1000ULL; | 195 | spi_bias *= 1000; |
| 196 | spi_bias /= 1000ULL + ppm/1000; | 196 | spi_bias /= 1000 + ppm/1000; |
| 197 | spi_bias *= p->code_rate_HP; | 197 | spi_bias *= p->code_rate_HP; |
| 198 | 198 | ||
| 199 | val0x04 = (p->transmission_mode << 2) | p->guard_interval; | 199 | val0x04 = (p->transmission_mode << 2) | p->guard_interval; |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 3182a406bdd..ae08b077fd0 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
| @@ -4461,6 +4461,7 @@ static int __devinit bttv_probe(struct pci_dev *dev, | |||
| 4461 | request_modules(btv); | 4461 | request_modules(btv); |
| 4462 | } | 4462 | } |
| 4463 | 4463 | ||
| 4464 | init_bttv_i2c_ir(btv); | ||
| 4464 | bttv_input_init(btv); | 4465 | bttv_input_init(btv); |
| 4465 | 4466 | ||
| 4466 | /* everything is fine */ | 4467 | /* everything is fine */ |
diff --git a/drivers/media/video/bt8xx/bttv-i2c.c b/drivers/media/video/bt8xx/bttv-i2c.c index 63aa31a041e..407fa61e4cd 100644 --- a/drivers/media/video/bt8xx/bttv-i2c.c +++ b/drivers/media/video/bt8xx/bttv-i2c.c | |||
| @@ -388,7 +388,12 @@ int __devinit init_bttv_i2c(struct bttv *btv) | |||
| 388 | if (0 == btv->i2c_rc && i2c_scan) | 388 | if (0 == btv->i2c_rc && i2c_scan) |
| 389 | do_i2c_scan(btv->c.v4l2_dev.name, &btv->i2c_client); | 389 | do_i2c_scan(btv->c.v4l2_dev.name, &btv->i2c_client); |
| 390 | 390 | ||
| 391 | /* Instantiate the IR receiver device, if present */ | 391 | return btv->i2c_rc; |
| 392 | } | ||
| 393 | |||
| 394 | /* Instantiate the I2C IR receiver device, if present */ | ||
| 395 | void __devinit init_bttv_i2c_ir(struct bttv *btv) | ||
| 396 | { | ||
| 392 | if (0 == btv->i2c_rc) { | 397 | if (0 == btv->i2c_rc) { |
| 393 | struct i2c_board_info info; | 398 | struct i2c_board_info info; |
| 394 | /* The external IR receiver is at i2c address 0x34 (0x35 for | 399 | /* The external IR receiver is at i2c address 0x34 (0x35 for |
| @@ -408,7 +413,6 @@ int __devinit init_bttv_i2c(struct bttv *btv) | |||
| 408 | strlcpy(info.type, "ir_video", I2C_NAME_SIZE); | 413 | strlcpy(info.type, "ir_video", I2C_NAME_SIZE); |
| 409 | i2c_new_probed_device(&btv->c.i2c_adap, &info, addr_list); | 414 | i2c_new_probed_device(&btv->c.i2c_adap, &info, addr_list); |
| 410 | } | 415 | } |
| 411 | return btv->i2c_rc; | ||
| 412 | } | 416 | } |
| 413 | 417 | ||
| 414 | int __devexit fini_bttv_i2c(struct bttv *btv) | 418 | int __devexit fini_bttv_i2c(struct bttv *btv) |
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h index a1d0e9c9f28..6cccc2a17ee 100644 --- a/drivers/media/video/bt8xx/bttvp.h +++ b/drivers/media/video/bt8xx/bttvp.h | |||
| @@ -279,6 +279,7 @@ extern unsigned int bttv_debug; | |||
| 279 | extern unsigned int bttv_gpio; | 279 | extern unsigned int bttv_gpio; |
| 280 | extern void bttv_gpio_tracking(struct bttv *btv, char *comment); | 280 | extern void bttv_gpio_tracking(struct bttv *btv, char *comment); |
| 281 | extern int init_bttv_i2c(struct bttv *btv); | 281 | extern int init_bttv_i2c(struct bttv *btv); |
| 282 | extern void init_bttv_i2c_ir(struct bttv *btv); | ||
| 282 | extern int fini_bttv_i2c(struct bttv *btv); | 283 | extern int fini_bttv_i2c(struct bttv *btv); |
| 283 | 284 | ||
| 284 | #define bttv_printk if (bttv_verbose) printk | 285 | #define bttv_printk if (bttv_verbose) printk |
diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c index fc4dd604572..7438f8d775b 100644 --- a/drivers/media/video/mt9t112.c +++ b/drivers/media/video/mt9t112.c | |||
| @@ -514,7 +514,7 @@ static int mt9t112_init_pll(const struct i2c_client *client) | |||
| 514 | /* poll to verify out of standby. Must Poll this bit */ | 514 | /* poll to verify out of standby. Must Poll this bit */ |
| 515 | for (i = 0; i < 100; i++) { | 515 | for (i = 0; i < 100; i++) { |
| 516 | mt9t112_reg_read(data, client, 0x0018); | 516 | mt9t112_reg_read(data, client, 0x0018); |
| 517 | if (0x4000 & data) | 517 | if (!(0x4000 & data)) |
| 518 | break; | 518 | break; |
| 519 | 519 | ||
| 520 | mdelay(10); | 520 | mdelay(10); |
diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c index 50b415e07ed..f7f7e04cf48 100644 --- a/drivers/media/video/pwc/pwc-ctrl.c +++ b/drivers/media/video/pwc/pwc-ctrl.c | |||
| @@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) | |||
| 753 | buf[0] = 0xff; /* fixed */ | 753 | buf[0] = 0xff; /* fixed */ |
| 754 | 754 | ||
| 755 | ret = send_control_msg(pdev, | 755 | ret = send_control_msg(pdev, |
| 756 | SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf)); | 756 | SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1); |
| 757 | 757 | ||
| 758 | if (!mode && ret >= 0) { | 758 | if (!mode && ret >= 0) { |
| 759 | if (value < 0) | 759 | if (value < 0) |
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c index bf0b96af533..5712fddd72f 100644 --- a/drivers/net/sfc/falcon_boards.c +++ b/drivers/net/sfc/falcon_boards.c | |||
| @@ -29,6 +29,15 @@ | |||
| 29 | #define FALCON_BOARD_SFN4111T 0x51 | 29 | #define FALCON_BOARD_SFN4111T 0x51 |
| 30 | #define FALCON_BOARD_SFN4112F 0x52 | 30 | #define FALCON_BOARD_SFN4112F 0x52 |
| 31 | 31 | ||
| 32 | /* Board temperature is about 15°C above ambient when air flow is | ||
| 33 | * limited. */ | ||
| 34 | #define FALCON_BOARD_TEMP_BIAS 15 | ||
| 35 | |||
| 36 | /* SFC4000 datasheet says: 'The maximum permitted junction temperature | ||
| 37 | * is 125°C; the thermal design of the environment for the SFC4000 | ||
| 38 | * should aim to keep this well below 100°C.' */ | ||
| 39 | #define FALCON_JUNC_TEMP_MAX 90 | ||
| 40 | |||
| 32 | /***************************************************************************** | 41 | /***************************************************************************** |
| 33 | * Support for LM87 sensor chip used on several boards | 42 | * Support for LM87 sensor chip used on several boards |
| 34 | */ | 43 | */ |
| @@ -548,16 +557,16 @@ fail_hwmon: | |||
| 548 | static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */ | 557 | static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */ |
| 549 | 558 | ||
| 550 | static const u8 sfe4002_lm87_regs[] = { | 559 | static const u8 sfe4002_lm87_regs[] = { |
| 551 | LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ | 560 | LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */ |
| 552 | LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ | 561 | LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */ |
| 553 | LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ | 562 | LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */ |
| 554 | LM87_IN_LIMITS(3, 0xb0, 0xc9), /* 5V: 4.6-5.2V */ | 563 | LM87_IN_LIMITS(3, 0xac, 0xd4), /* 5V: 5.0V +/- 10% */ |
| 555 | LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ | 564 | LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */ |
| 556 | LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ | 565 | LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */ |
| 557 | LM87_AIN_LIMITS(0, 0xa0, 0xb2), /* AIN1: 1.66V +/- 5% */ | 566 | LM87_AIN_LIMITS(0, 0x98, 0xbb), /* AIN1: 1.66V +/- 10% */ |
| 558 | LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ | 567 | LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */ |
| 559 | LM87_TEMP_INT_LIMITS(10, 60), /* board */ | 568 | LM87_TEMP_INT_LIMITS(0, 80 + FALCON_BOARD_TEMP_BIAS), |
| 560 | LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ | 569 | LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX), |
| 561 | 0 | 570 | 0 |
| 562 | }; | 571 | }; |
| 563 | 572 | ||
| @@ -619,14 +628,14 @@ static int sfe4002_init(struct efx_nic *efx) | |||
| 619 | static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */ | 628 | static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */ |
| 620 | 629 | ||
| 621 | static const u8 sfn4112f_lm87_regs[] = { | 630 | static const u8 sfn4112f_lm87_regs[] = { |
| 622 | LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ | 631 | LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */ |
| 623 | LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ | 632 | LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */ |
| 624 | LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ | 633 | LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */ |
| 625 | LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ | 634 | LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */ |
| 626 | LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ | 635 | LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */ |
| 627 | LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ | 636 | LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */ |
| 628 | LM87_TEMP_INT_LIMITS(10, 60), /* board */ | 637 | LM87_TEMP_INT_LIMITS(0, 60 + FALCON_BOARD_TEMP_BIAS), |
| 629 | LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ | 638 | LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX), |
| 630 | 0 | 639 | 0 |
| 631 | }; | 640 | }; |
| 632 | 641 | ||
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index 9f035b9f035..f66b3da6ddf 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
| @@ -127,7 +127,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
| 127 | efx_dword_t reg; | 127 | efx_dword_t reg; |
| 128 | 128 | ||
| 129 | /* Check for a reboot atomically with respect to efx_mcdi_copyout() */ | 129 | /* Check for a reboot atomically with respect to efx_mcdi_copyout() */ |
| 130 | rc = efx_mcdi_poll_reboot(efx); | 130 | rc = -efx_mcdi_poll_reboot(efx); |
| 131 | if (rc) | 131 | if (rc) |
| 132 | goto out; | 132 | goto out; |
| 133 | 133 | ||
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 47754260228..9e71ac61114 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c | |||
| @@ -2516,7 +2516,7 @@ int fas216_eh_device_reset(struct scsi_cmnd *SCpnt) | |||
| 2516 | if (info->scsi.phase == PHASE_IDLE) | 2516 | if (info->scsi.phase == PHASE_IDLE) |
| 2517 | fas216_kick(info); | 2517 | fas216_kick(info); |
| 2518 | 2518 | ||
| 2519 | mod_timer(&info->eh_timer, 30 * HZ); | 2519 | mod_timer(&info->eh_timer, jiffies + 30 * HZ); |
| 2520 | spin_unlock_irqrestore(&info->host_lock, flags); | 2520 | spin_unlock_irqrestore(&info->host_lock, flags); |
| 2521 | 2521 | ||
| 2522 | /* | 2522 | /* |
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 10be9f36a4c..2f47ae7cce9 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
| @@ -2009,6 +2009,8 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp) | |||
| 2009 | fcoe_interface_cleanup(fcoe); | 2009 | fcoe_interface_cleanup(fcoe); |
| 2010 | rtnl_unlock(); | 2010 | rtnl_unlock(); |
| 2011 | fcoe_if_destroy(fcoe->ctlr.lp); | 2011 | fcoe_if_destroy(fcoe->ctlr.lp); |
| 2012 | module_put(THIS_MODULE); | ||
| 2013 | |||
| 2012 | out_putdev: | 2014 | out_putdev: |
| 2013 | dev_put(netdev); | 2015 | dev_put(netdev); |
| 2014 | out_nodev: | 2016 | out_nodev: |
| @@ -2059,6 +2061,11 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp) | |||
| 2059 | } | 2061 | } |
| 2060 | #endif | 2062 | #endif |
| 2061 | 2063 | ||
| 2064 | if (!try_module_get(THIS_MODULE)) { | ||
| 2065 | rc = -EINVAL; | ||
| 2066 | goto out_nomod; | ||
| 2067 | } | ||
| 2068 | |||
| 2062 | rtnl_lock(); | 2069 | rtnl_lock(); |
| 2063 | netdev = fcoe_if_to_netdev(buffer); | 2070 | netdev = fcoe_if_to_netdev(buffer); |
| 2064 | if (!netdev) { | 2071 | if (!netdev) { |
| @@ -2099,17 +2106,24 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp) | |||
| 2099 | if (!fcoe_link_ok(lport)) | 2106 | if (!fcoe_link_ok(lport)) |
| 2100 | fcoe_ctlr_link_up(&fcoe->ctlr); | 2107 | fcoe_ctlr_link_up(&fcoe->ctlr); |
| 2101 | 2108 | ||
| 2102 | rc = 0; | ||
| 2103 | out_free: | ||
| 2104 | /* | 2109 | /* |
| 2105 | * Release from init in fcoe_interface_create(), on success lport | 2110 | * Release from init in fcoe_interface_create(), on success lport |
| 2106 | * should be holding a reference taken in fcoe_if_create(). | 2111 | * should be holding a reference taken in fcoe_if_create(). |
| 2107 | */ | 2112 | */ |
| 2108 | fcoe_interface_put(fcoe); | 2113 | fcoe_interface_put(fcoe); |
| 2114 | dev_put(netdev); | ||
| 2115 | rtnl_unlock(); | ||
| 2116 | mutex_unlock(&fcoe_config_mutex); | ||
| 2117 | |||
| 2118 | return 0; | ||
| 2119 | out_free: | ||
| 2120 | fcoe_interface_put(fcoe); | ||
| 2109 | out_putdev: | 2121 | out_putdev: |
| 2110 | dev_put(netdev); | 2122 | dev_put(netdev); |
| 2111 | out_nodev: | 2123 | out_nodev: |
| 2112 | rtnl_unlock(); | 2124 | rtnl_unlock(); |
| 2125 | module_put(THIS_MODULE); | ||
| 2126 | out_nomod: | ||
| 2113 | mutex_unlock(&fcoe_config_mutex); | 2127 | mutex_unlock(&fcoe_config_mutex); |
| 2114 | return rc; | 2128 | return rc; |
| 2115 | } | 2129 | } |
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 9823291395a..511cb6b371e 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
| @@ -1187,7 +1187,7 @@ static void fcoe_ctlr_timeout(unsigned long arg) | |||
| 1187 | next_timer = fip->ctlr_ka_time; | 1187 | next_timer = fip->ctlr_ka_time; |
| 1188 | 1188 | ||
| 1189 | if (time_after_eq(jiffies, fip->port_ka_time)) { | 1189 | if (time_after_eq(jiffies, fip->port_ka_time)) { |
| 1190 | fip->port_ka_time += jiffies + | 1190 | fip->port_ka_time = jiffies + |
| 1191 | msecs_to_jiffies(FIP_VN_KA_PERIOD); | 1191 | msecs_to_jiffies(FIP_VN_KA_PERIOD); |
| 1192 | fip->send_port_ka = 1; | 1192 | fip->send_port_ka = 1; |
| 1193 | } | 1193 | } |
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 19d711cb938..7f4364770e4 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
| @@ -1890,7 +1890,7 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, | |||
| 1890 | fc_exch_setup_hdr(ep, fp, ep->f_ctl); | 1890 | fc_exch_setup_hdr(ep, fp, ep->f_ctl); |
| 1891 | sp->cnt++; | 1891 | sp->cnt++; |
| 1892 | 1892 | ||
| 1893 | if (ep->xid <= lport->lro_xid) | 1893 | if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) |
| 1894 | fc_fcp_ddp_setup(fr_fsp(fp), ep->xid); | 1894 | fc_fcp_ddp_setup(fr_fsp(fp), ep->xid); |
| 1895 | 1895 | ||
| 1896 | if (unlikely(lport->tt.frame_send(lport, fp))) | 1896 | if (unlikely(lport->tt.frame_send(lport, fp))) |
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 881d5dfe8c7..6fde2fabfd9 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
| @@ -298,9 +298,6 @@ void fc_fcp_ddp_setup(struct fc_fcp_pkt *fsp, u16 xid) | |||
| 298 | { | 298 | { |
| 299 | struct fc_lport *lport; | 299 | struct fc_lport *lport; |
| 300 | 300 | ||
| 301 | if (!fsp) | ||
| 302 | return; | ||
| 303 | |||
| 304 | lport = fsp->lp; | 301 | lport = fsp->lp; |
| 305 | if ((fsp->req_flags & FC_SRB_READ) && | 302 | if ((fsp->req_flags & FC_SRB_READ) && |
| 306 | (lport->lro_enabled) && (lport->tt.ddp_setup)) { | 303 | (lport->lro_enabled) && (lport->tt.ddp_setup)) { |
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 0b165024a21..7ec8ce75007 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
| @@ -1800,7 +1800,8 @@ int fc_lport_bsg_request(struct fc_bsg_job *job) | |||
| 1800 | u32 did; | 1800 | u32 did; |
| 1801 | 1801 | ||
| 1802 | job->reply->reply_payload_rcv_len = 0; | 1802 | job->reply->reply_payload_rcv_len = 0; |
| 1803 | rsp->resid_len = job->reply_payload.payload_len; | 1803 | if (rsp) |
| 1804 | rsp->resid_len = job->reply_payload.payload_len; | ||
| 1804 | 1805 | ||
| 1805 | mutex_lock(&lport->lp_mutex); | 1806 | mutex_lock(&lport->lp_mutex); |
| 1806 | 1807 | ||
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 02300523b23..97923bb0776 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
| @@ -623,7 +623,7 @@ static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
| 623 | 623 | ||
| 624 | tov = ntohl(plp->fl_csp.sp_e_d_tov); | 624 | tov = ntohl(plp->fl_csp.sp_e_d_tov); |
| 625 | if (ntohs(plp->fl_csp.sp_features) & FC_SP_FT_EDTR) | 625 | if (ntohs(plp->fl_csp.sp_features) & FC_SP_FT_EDTR) |
| 626 | tov /= 1000; | 626 | tov /= 1000000; |
| 627 | if (tov > rdata->e_d_tov) | 627 | if (tov > rdata->e_d_tov) |
| 628 | rdata->e_d_tov = tov; | 628 | rdata->e_d_tov = tov; |
| 629 | csp_seq = ntohs(plp->fl_csp.sp_tot_seq); | 629 | csp_seq = ntohs(plp->fl_csp.sp_tot_seq); |
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c index db6856c138f..4ad87fd74dd 100644 --- a/drivers/scsi/libiscsi_tcp.c +++ b/drivers/scsi/libiscsi_tcp.c | |||
| @@ -992,12 +992,10 @@ static struct iscsi_r2t_info *iscsi_tcp_get_curr_r2t(struct iscsi_task *task) | |||
| 992 | if (r2t == NULL) { | 992 | if (r2t == NULL) { |
| 993 | if (kfifo_out(&tcp_task->r2tqueue, | 993 | if (kfifo_out(&tcp_task->r2tqueue, |
| 994 | (void *)&tcp_task->r2t, sizeof(void *)) != | 994 | (void *)&tcp_task->r2t, sizeof(void *)) != |
| 995 | sizeof(void *)) { | 995 | sizeof(void *)) |
| 996 | WARN_ONCE(1, "unexpected fifo state"); | ||
| 997 | r2t = NULL; | 996 | r2t = NULL; |
| 998 | } | 997 | else |
| 999 | 998 | r2t = tcp_task->r2t; | |
| 1000 | r2t = tcp_task->r2t; | ||
| 1001 | } | 999 | } |
| 1002 | spin_unlock_bh(&session->lock); | 1000 | spin_unlock_bh(&session->lock); |
| 1003 | } | 1001 | } |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 708ea3157b6..d9b8ca5116b 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
| @@ -3781,6 +3781,7 @@ static int megasas_mgmt_compat_ioctl_fw(struct file *file, unsigned long arg) | |||
| 3781 | compat_alloc_user_space(sizeof(struct megasas_iocpacket)); | 3781 | compat_alloc_user_space(sizeof(struct megasas_iocpacket)); |
| 3782 | int i; | 3782 | int i; |
| 3783 | int error = 0; | 3783 | int error = 0; |
| 3784 | compat_uptr_t ptr; | ||
| 3784 | 3785 | ||
| 3785 | if (clear_user(ioc, sizeof(*ioc))) | 3786 | if (clear_user(ioc, sizeof(*ioc))) |
| 3786 | return -EFAULT; | 3787 | return -EFAULT; |
| @@ -3793,9 +3794,22 @@ static int megasas_mgmt_compat_ioctl_fw(struct file *file, unsigned long arg) | |||
| 3793 | copy_in_user(&ioc->sge_count, &cioc->sge_count, sizeof(u32))) | 3794 | copy_in_user(&ioc->sge_count, &cioc->sge_count, sizeof(u32))) |
| 3794 | return -EFAULT; | 3795 | return -EFAULT; |
| 3795 | 3796 | ||
| 3796 | for (i = 0; i < MAX_IOCTL_SGE; i++) { | 3797 | /* |
| 3797 | compat_uptr_t ptr; | 3798 | * The sense_ptr is used in megasas_mgmt_fw_ioctl only when |
| 3799 | * sense_len is not null, so prepare the 64bit value under | ||
| 3800 | * the same condition. | ||
| 3801 | */ | ||
| 3802 | if (ioc->sense_len) { | ||
| 3803 | void __user **sense_ioc_ptr = | ||
| 3804 | (void __user **)(ioc->frame.raw + ioc->sense_off); | ||
| 3805 | compat_uptr_t *sense_cioc_ptr = | ||
| 3806 | (compat_uptr_t *)(cioc->frame.raw + cioc->sense_off); | ||
| 3807 | if (get_user(ptr, sense_cioc_ptr) || | ||
| 3808 | put_user(compat_ptr(ptr), sense_ioc_ptr)) | ||
| 3809 | return -EFAULT; | ||
| 3810 | } | ||
| 3798 | 3811 | ||
| 3812 | for (i = 0; i < MAX_IOCTL_SGE; i++) { | ||
| 3799 | if (get_user(ptr, &cioc->sgl[i].iov_base) || | 3813 | if (get_user(ptr, &cioc->sgl[i].iov_base) || |
| 3800 | put_user(compat_ptr(ptr), &ioc->sgl[i].iov_base) || | 3814 | put_user(compat_ptr(ptr), &ioc->sgl[i].iov_base) || |
| 3801 | copy_in_user(&ioc->sgl[i].iov_len, | 3815 | copy_in_user(&ioc->sgl[i].iov_len, |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index ab94335b4bb..6816be6c3f7 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/include/asm-arm/hardware/amba.h | 2 | * linux/include/amba/bus.h |
| 3 | * | ||
| 4 | * This device type deals with ARM PrimeCells and anything else that | ||
| 5 | * presents a proper CID (0xB105F00D) at the end of the I/O register | ||
| 6 | * region or that is derived from a PrimeCell. | ||
| 3 | * | 7 | * |
| 4 | * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved. | 8 | * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved. |
| 5 | * | 9 | * |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index fbc1c7472c5..099c753c421 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
| @@ -410,7 +410,8 @@ static ssize_t wireless_show(struct device *d, char *buf, | |||
| 410 | const struct iw_statistics *iw; | 410 | const struct iw_statistics *iw; |
| 411 | ssize_t ret = -EINVAL; | 411 | ssize_t ret = -EINVAL; |
| 412 | 412 | ||
| 413 | rtnl_lock(); | 413 | if (!rtnl_trylock()) |
| 414 | return restart_syscall(); | ||
| 414 | if (dev_isalive(dev)) { | 415 | if (dev_isalive(dev)) { |
| 415 | iw = get_wireless_stats(dev); | 416 | iw = get_wireless_stats(dev); |
| 416 | if (iw) | 417 | if (iw) |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 040c4f05b65..26dec2be961 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
| @@ -1317,14 +1317,19 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write, | |||
| 1317 | { | 1317 | { |
| 1318 | int *valp = ctl->data; | 1318 | int *valp = ctl->data; |
| 1319 | int val = *valp; | 1319 | int val = *valp; |
| 1320 | loff_t pos = *ppos; | ||
| 1320 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); | 1321 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
| 1321 | 1322 | ||
| 1322 | if (write && *valp != val) { | 1323 | if (write && *valp != val) { |
| 1323 | struct net *net = ctl->extra2; | 1324 | struct net *net = ctl->extra2; |
| 1324 | 1325 | ||
| 1325 | if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) { | 1326 | if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) { |
| 1326 | if (!rtnl_trylock()) | 1327 | if (!rtnl_trylock()) { |
| 1328 | /* Restore the original values before restarting */ | ||
| 1329 | *valp = val; | ||
| 1330 | *ppos = pos; | ||
| 1327 | return restart_syscall(); | 1331 | return restart_syscall(); |
| 1332 | } | ||
| 1328 | if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) { | 1333 | if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) { |
| 1329 | inet_forward_change(net); | 1334 | inet_forward_change(net); |
| 1330 | } else if (*valp) { | 1335 | } else if (*valp) { |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index de7a194a64a..143791da062 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -502,8 +502,11 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) | |||
| 502 | if (p == &net->ipv6.devconf_dflt->forwarding) | 502 | if (p == &net->ipv6.devconf_dflt->forwarding) |
| 503 | return 0; | 503 | return 0; |
| 504 | 504 | ||
| 505 | if (!rtnl_trylock()) | 505 | if (!rtnl_trylock()) { |
| 506 | /* Restore the original values before restarting */ | ||
| 507 | *p = old; | ||
| 506 | return restart_syscall(); | 508 | return restart_syscall(); |
| 509 | } | ||
| 507 | 510 | ||
| 508 | if (p == &net->ipv6.devconf_all->forwarding) { | 511 | if (p == &net->ipv6.devconf_all->forwarding) { |
| 509 | __s32 newf = net->ipv6.devconf_all->forwarding; | 512 | __s32 newf = net->ipv6.devconf_all->forwarding; |
| @@ -4028,12 +4031,15 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, | |||
| 4028 | { | 4031 | { |
| 4029 | int *valp = ctl->data; | 4032 | int *valp = ctl->data; |
| 4030 | int val = *valp; | 4033 | int val = *valp; |
| 4034 | loff_t pos = *ppos; | ||
| 4031 | int ret; | 4035 | int ret; |
| 4032 | 4036 | ||
| 4033 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); | 4037 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
| 4034 | 4038 | ||
| 4035 | if (write) | 4039 | if (write) |
| 4036 | ret = addrconf_fixup_forwarding(ctl, valp, val); | 4040 | ret = addrconf_fixup_forwarding(ctl, valp, val); |
| 4041 | if (ret) | ||
| 4042 | *ppos = pos; | ||
| 4037 | return ret; | 4043 | return ret; |
| 4038 | } | 4044 | } |
| 4039 | 4045 | ||
| @@ -4075,8 +4081,11 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int old) | |||
| 4075 | if (p == &net->ipv6.devconf_dflt->disable_ipv6) | 4081 | if (p == &net->ipv6.devconf_dflt->disable_ipv6) |
| 4076 | return 0; | 4082 | return 0; |
| 4077 | 4083 | ||
| 4078 | if (!rtnl_trylock()) | 4084 | if (!rtnl_trylock()) { |
| 4085 | /* Restore the original values before restarting */ | ||
| 4086 | *p = old; | ||
| 4079 | return restart_syscall(); | 4087 | return restart_syscall(); |
| 4088 | } | ||
| 4080 | 4089 | ||
| 4081 | if (p == &net->ipv6.devconf_all->disable_ipv6) { | 4090 | if (p == &net->ipv6.devconf_all->disable_ipv6) { |
| 4082 | __s32 newf = net->ipv6.devconf_all->disable_ipv6; | 4091 | __s32 newf = net->ipv6.devconf_all->disable_ipv6; |
| @@ -4095,12 +4104,15 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write, | |||
| 4095 | { | 4104 | { |
| 4096 | int *valp = ctl->data; | 4105 | int *valp = ctl->data; |
| 4097 | int val = *valp; | 4106 | int val = *valp; |
| 4107 | loff_t pos = *ppos; | ||
| 4098 | int ret; | 4108 | int ret; |
| 4099 | 4109 | ||
| 4100 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); | 4110 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
| 4101 | 4111 | ||
| 4102 | if (write) | 4112 | if (write) |
| 4103 | ret = addrconf_disable_ipv6(ctl, valp, val); | 4113 | ret = addrconf_disable_ipv6(ctl, valp, val); |
| 4114 | if (ret) | ||
| 4115 | *ppos = pos; | ||
| 4104 | return ret; | 4116 | return ret; |
| 4105 | } | 4117 | } |
| 4106 | 4118 | ||
