Changeset 19332


Ignore:
Timestamp:
06/07/12 14:29:21 (12 months ago)
Author:
BrainSlayer
Message:

update to 3.4.2-rc1

Location:
src/linux/universal/linux-3.4
Files:
1 deleted
89 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.4/Makefile

    r19323 r19332  
    11VERSION = 3 
    22PATCHLEVEL = 4 
    3 SUBLEVEL = 1 
    4 EXTRAVERSION = 
     3SUBLEVEL = 2 
     4EXTRAVERSION = -rc1 
    55NAME = Saber-toothed Squirrel 
    66 
  • src/linux/universal/linux-3.4/arch/arm/mach-ixp4xx/common.c

    r19285 r19332  
    2929#include <linux/io.h> 
    3030#include <linux/export.h> 
     31#include <linux/gpio.h> 
    3132 
    3233#include <mach/udc.h> 
     
    108109}; 
    109110 
    110 int gpio_to_irq(int gpio) 
     111static int ixp4xx_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) 
    111112{ 
    112113        int irq; 
     
    118119        return -EINVAL; 
    119120} 
    120 EXPORT_SYMBOL(gpio_to_irq); 
    121121 
    122122int irq_to_gpio(unsigned int irq) 
     
    384384EXPORT_SYMBOL(ixp4xx_exp_bus_size); 
    385385 
     386static int ixp4xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) 
     387{ 
     388        gpio_line_config(gpio, IXP4XX_GPIO_IN); 
     389 
     390        return 0; 
     391} 
     392 
     393static int ixp4xx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, 
     394                                        int level) 
     395{ 
     396        gpio_line_set(gpio, level); 
     397        gpio_line_config(gpio, IXP4XX_GPIO_OUT); 
     398 
     399        return 0; 
     400} 
     401 
     402static int ixp4xx_gpio_get_value(struct gpio_chip *chip, unsigned gpio) 
     403{ 
     404        int value; 
     405 
     406        gpio_line_get(gpio, &value); 
     407 
     408        return value; 
     409} 
     410 
     411static void ixp4xx_gpio_set_value(struct gpio_chip *chip, unsigned gpio, 
     412                                  int value) 
     413{ 
     414        gpio_line_set(gpio, value); 
     415} 
     416 
     417static struct gpio_chip ixp4xx_gpio_chip = { 
     418        .label                  = "IXP4XX_GPIO_CHIP", 
     419        .direction_input        = ixp4xx_gpio_direction_input, 
     420        .direction_output       = ixp4xx_gpio_direction_output, 
     421        .get                    = ixp4xx_gpio_get_value, 
     422        .set                    = ixp4xx_gpio_set_value, 
     423        .to_irq                 = ixp4xx_gpio_to_irq, 
     424        .base                   = 0, 
     425        .ngpio                  = 16, 
     426}; 
     427 
    386428void __init ixp4xx_sys_init(void) 
    387429{ 
     
    389431 
    390432        platform_add_devices(ixp4xx_devices, ARRAY_SIZE(ixp4xx_devices)); 
     433 
     434        gpiochip_add(&ixp4xx_gpio_chip); 
    391435 
    392436        if (cpu_is_ixp46x()) { 
  • src/linux/universal/linux-3.4/arch/microblaze/Kconfig

    r19285 r19332  
    5858 
    5959config GENERIC_GPIO 
    60         def_bool y 
     60        bool 
    6161 
    6262config GENERIC_CSUM 
  • src/linux/universal/linux-3.4/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h

    r19285 r19332  
    33 
    44#include <linux/init.h> 
     5#include <bcm63xx_cpu.h> 
    56 
    67int __init bcm63xx_gpio_init(void); 
  • src/linux/universal/linux-3.4/arch/parisc/kernel/entry.S

    r19285 r19332  
    553553         * the from tlb entry (or nothing if only a to entry---for 
    554554         * clear_user_page_asm) */ 
    555         .macro          do_alias        spc,tmp,tmp1,va,pte,prot,fault 
     555        .macro          do_alias        spc,tmp,tmp1,va,pte,prot,fault,patype 
    556556        cmpib,COND(<>),n 0,\spc,\fault 
    557557        ldil            L%(TMPALIAS_MAP_START),\tmp 
     
    582582        cmpiclr,=       0x01,\tmp,%r0 
    583583        ldi             (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot 
    584 #ifdef CONFIG_64BIT 
     584.ifc \patype,20 
    585585        depd,z          \prot,8,7,\prot 
    586 #else 
     586.else 
     587.ifc \patype,11 
    587588        depw,z          \prot,8,7,\prot 
    588 #endif 
     589.else 
     590        .error "undefined PA type to do_alias" 
     591.endif 
     592.endif 
    589593        /* 
    590594         * OK, it is in the temp alias region, check whether "from" or "to". 
     
    11901194 
    11911195dtlb_check_alias_20w: 
    1192         do_alias        spc,t0,t1,va,pte,prot,dtlb_fault 
     1196        do_alias        spc,t0,t1,va,pte,prot,dtlb_fault,20 
    11931197 
    11941198        idtlbt          pte,prot 
     
    12141218 
    12151219nadtlb_check_alias_20w: 
    1216         do_alias        spc,t0,t1,va,pte,prot,nadtlb_emulate 
     1220        do_alias        spc,t0,t1,va,pte,prot,nadtlb_emulate,20 
    12171221 
    12181222        idtlbt          pte,prot 
     
    12461250 
    12471251dtlb_check_alias_11: 
    1248         do_alias        spc,t0,t1,va,pte,prot,dtlb_fault 
     1252        do_alias        spc,t0,t1,va,pte,prot,dtlb_fault,11 
    12491253 
    12501254        idtlba          pte,(va) 
     
    12781282 
    12791283nadtlb_check_alias_11: 
    1280         do_alias        spc,t0,t1,va,pte,prot,nadtlb_emulate 
     1284        do_alias        spc,t0,t1,va,pte,prot,nadtlb_emulate,11 
    12811285 
    12821286        idtlba          pte,(va) 
     
    13051309 
    13061310dtlb_check_alias_20: 
    1307         do_alias        spc,t0,t1,va,pte,prot,dtlb_fault 
     1311        do_alias        spc,t0,t1,va,pte,prot,dtlb_fault,20 
    13081312         
    13091313        idtlbt          pte,prot 
     
    13311335 
    13321336nadtlb_check_alias_20: 
    1333         do_alias        spc,t0,t1,va,pte,prot,nadtlb_emulate 
     1337        do_alias        spc,t0,t1,va,pte,prot,nadtlb_emulate,20 
    13341338 
    13351339        idtlbt          pte,prot 
     
    14581462 
    14591463naitlb_check_alias_20w: 
    1460         do_alias        spc,t0,t1,va,pte,prot,naitlb_fault 
     1464        do_alias        spc,t0,t1,va,pte,prot,naitlb_fault,20 
    14611465 
    14621466        iitlbt          pte,prot 
     
    15121516 
    15131517naitlb_check_alias_11: 
    1514         do_alias        spc,t0,t1,va,pte,prot,itlb_fault 
     1518        do_alias        spc,t0,t1,va,pte,prot,itlb_fault,11 
    15151519 
    15161520        iitlba          pte,(%sr0, va) 
     
    15581562 
    15591563naitlb_check_alias_20: 
    1560         do_alias        spc,t0,t1,va,pte,prot,naitlb_fault 
     1564        do_alias        spc,t0,t1,va,pte,prot,naitlb_fault,20 
    15611565 
    15621566        iitlbt          pte,prot 
  • src/linux/universal/linux-3.4/arch/parisc/kernel/vmlinux.lds.S

    r19285 r19332  
    5151 
    5252        _text = .;              /* Text and read-only data */ 
     53        .head ALIGN(16) : { 
     54                HEAD_TEXT 
     55        } = 0 
    5356        .text ALIGN(16) : { 
    54                 HEAD_TEXT 
    5557                TEXT_TEXT 
    5658                SCHED_TEXT 
     
    6668                *(.lock.text)           /* out-of-line lock text */ 
    6769                *(.gnu.warning) 
    68         } = 0 
     70        } 
    6971        /* End of text section */ 
    7072        _etext = .; 
  • src/linux/universal/linux-3.4/arch/x86/include/asm/pgtable-3level.h

    r19285 r19332  
    3131        ptep->pte_low = pte.pte_low; 
    3232} 
     33 
     34#define pmd_read_atomic pmd_read_atomic 
     35/* 
     36 * pte_offset_map_lock on 32bit PAE kernels was reading the pmd_t with 
     37 * a "*pmdp" dereference done by gcc. Problem is, in certain places 
     38 * where pte_offset_map_lock is called, concurrent page faults are 
     39 * allowed, if the mmap_sem is hold for reading. An example is mincore 
     40 * vs page faults vs MADV_DONTNEED. On the page fault side 
     41 * pmd_populate rightfully does a set_64bit, but if we're reading the 
     42 * pmd_t with a "*pmdp" on the mincore side, a SMP race can happen 
     43 * because gcc will not read the 64bit of the pmd atomically. To fix 
     44 * this all places running pmd_offset_map_lock() while holding the 
     45 * mmap_sem in read mode, shall read the pmdp pointer using this 
     46 * function to know if the pmd is null nor not, and in turn to know if 
     47 * they can run pmd_offset_map_lock or pmd_trans_huge or other pmd 
     48 * operations. 
     49 * 
     50 * Without THP if the mmap_sem is hold for reading, the 
     51 * pmd can only transition from null to not null while pmd_read_atomic runs. 
     52 * So there's no need of literally reading it atomically. 
     53 * 
     54 * With THP if the mmap_sem is hold for reading, the pmd can become 
     55 * THP or null or point to a pte (and in turn become "stable") at any 
     56 * time under pmd_read_atomic, so it's mandatory to read it atomically 
     57 * with cmpxchg8b. 
     58 */ 
     59#ifndef CONFIG_TRANSPARENT_HUGEPAGE 
     60static inline pmd_t pmd_read_atomic(pmd_t *pmdp) 
     61{ 
     62        pmdval_t ret; 
     63        u32 *tmp = (u32 *)pmdp; 
     64 
     65        ret = (pmdval_t) (*tmp); 
     66        if (ret) { 
     67                /* 
     68                 * If the low part is null, we must not read the high part 
     69                 * or we can end up with a partial pmd. 
     70                 */ 
     71                smp_rmb(); 
     72                ret |= ((pmdval_t)*(tmp + 1)) << 32; 
     73        } 
     74 
     75        return (pmd_t) { ret }; 
     76} 
     77#else /* CONFIG_TRANSPARENT_HUGEPAGE */ 
     78static inline pmd_t pmd_read_atomic(pmd_t *pmdp) 
     79{ 
     80        return (pmd_t) { atomic64_read((atomic64_t *)pmdp) }; 
     81} 
     82#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 
    3383 
    3484static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) 
  • src/linux/universal/linux-3.4/arch/x86/kernel/nmi.c

    r19285 r19332  
    492492        if (unlikely(is_debug_stack(regs->sp))) { 
    493493                debug_stack_set_zero(); 
    494                 __get_cpu_var(update_debug_stack) = 1; 
     494                this_cpu_write(update_debug_stack, 1); 
    495495        } 
    496496} 
     
    498498static inline void nmi_nesting_postprocess(void) 
    499499{ 
    500         if (unlikely(__get_cpu_var(update_debug_stack))) 
     500        if (unlikely(this_cpu_read(update_debug_stack))) { 
    501501                debug_stack_reset(); 
     502                this_cpu_write(update_debug_stack, 0); 
     503        } 
    502504} 
    503505#endif 
  • src/linux/universal/linux-3.4/arch/x86/kernel/ptrace.c

    r19285 r19332  
    12111211                                             0, sizeof(struct user_i387_struct), 
    12121212                                             datap); 
    1213  
    1214                 /* normal 64bit interface to access TLS data. 
    1215                    Works just like arch_prctl, except that the arguments 
    1216                    are reversed. */ 
    1217         case PTRACE_ARCH_PRCTL: 
    1218                 return do_arch_prctl(child, data, addr); 
    12191213 
    12201214        default: 
  • src/linux/universal/linux-3.4/arch/x86/xen/enlighten.c

    r19285 r19332  
    11071107 
    11081108        .read_msr = native_read_msr_safe, 
     1109        .rdmsr_regs = native_rdmsr_safe_regs, 
    11091110        .write_msr = xen_write_msr_safe, 
     1111        .wrmsr_regs = native_wrmsr_safe_regs, 
     1112 
    11101113        .read_tsc = native_read_tsc, 
    11111114        .read_pmc = native_read_pmc, 
  • src/linux/universal/linux-3.4/drivers/acpi/battery.c

    r19285 r19332  
    644644static void acpi_battery_refresh(struct acpi_battery *battery) 
    645645{ 
     646        int power_unit; 
     647 
    646648        if (!battery->bat.dev) 
    647649                return; 
    648650 
     651        power_unit = battery->power_unit; 
     652 
    649653        acpi_battery_get_info(battery); 
    650         /* The battery may have changed its reporting units. */ 
     654 
     655        if (power_unit == battery->power_unit) 
     656                return; 
     657 
     658        /* The battery has changed its reporting units. */ 
    651659        sysfs_remove_battery(battery); 
    652660        sysfs_add_battery(battery); 
  • src/linux/universal/linux-3.4/drivers/atm/solos-pci.c

    r19285 r19332  
    985985                                SKB_CB(skb)->dma_addr = pci_map_single(card->dev, skb->data, 
    986986                                                                       skb->len, PCI_DMA_TODEVICE); 
     987                                card->tx_skb[port] = skb; 
    987988                                iowrite32(SKB_CB(skb)->dma_addr, 
    988989                                          card->config_regs + TX_DMA_ADDR(port)); 
     
    11531154        } 
    11541155 
    1155         if (card->fpga_version >= DMA_SUPPORTED){ 
     1156        if (card->fpga_version >= DMA_SUPPORTED) { 
     1157                pci_set_master(dev); 
    11561158                card->using_dma = 1; 
    11571159        } else { 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/i915/intel_display.c

    r19314 r19332  
    83698369        I915_WRITE(GEN6_RP_CONTROL, 
    83708370                   GEN6_RP_MEDIA_TURBO | 
    8371                    GEN6_RP_MEDIA_HW_MODE | 
     8371                   GEN6_RP_MEDIA_HW_NORMAL_MODE | 
    83728372                   GEN6_RP_MEDIA_IS_GFX | 
    83738373                   GEN6_RP_ENABLE | 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/i915/intel_dp.c

    r19285 r19332  
    11491149        DRM_DEBUG_KMS("Turn eDP power off\n"); 
    11501150 
    1151         WARN(intel_dp->want_panel_vdd, "Cannot turn power off while VDD is on\n"); 
     1151        WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n"); 
    11521152 
    11531153        pp = ironlake_get_pp_control(dev_priv); 
    1154         pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | EDP_BLC_ENABLE); 
     1154        pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE); 
    11551155        I915_WRITE(PCH_PP_CONTROL, pp); 
    11561156        POSTING_READ(PCH_PP_CONTROL); 
     
    12601260        struct intel_dp *intel_dp = enc_to_intel_dp(encoder); 
    12611261 
     1262 
     1263        /* Make sure the panel is off before trying to change the mode. But also 
     1264         * ensure that we have vdd while we switch off the panel. */ 
     1265        ironlake_edp_panel_vdd_on(intel_dp); 
    12621266        ironlake_edp_backlight_off(intel_dp); 
    12631267        ironlake_edp_panel_off(intel_dp); 
    12641268 
    1265         /* Wake up the sink first */ 
    1266         ironlake_edp_panel_vdd_on(intel_dp); 
    12671269        intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); 
    12681270        intel_dp_link_down(intel_dp); 
    12691271        ironlake_edp_panel_vdd_off(intel_dp, false); 
    1270  
    1271         /* Make sure the panel is off before trying to 
    1272          * change the mode 
    1273          */ 
    12741272} 
    12751273 
     
    13031301 
    13041302        if (mode != DRM_MODE_DPMS_ON) { 
     1303                /* Switching the panel off requires vdd. */ 
     1304                ironlake_edp_panel_vdd_on(intel_dp); 
    13051305                ironlake_edp_backlight_off(intel_dp); 
    13061306                ironlake_edp_panel_off(intel_dp); 
    13071307 
    1308                 ironlake_edp_panel_vdd_on(intel_dp); 
    13091308                intel_dp_sink_dpms(intel_dp, mode); 
    13101309                intel_dp_link_down(intel_dp); 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/i915/intel_lvds.c

    r19285 r19332  
    748748        { 
    749749                .callback = intel_no_lvds_dmi_callback, 
     750                .ident = "Hewlett-Packard HP t5740e Thin Client", 
     751                .matches = { 
     752                        DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), 
     753                        DMI_MATCH(DMI_PRODUCT_NAME, "HP t5740e Thin Client"), 
     754                }, 
     755        }, 
     756        { 
     757                .callback = intel_no_lvds_dmi_callback, 
    750758                .ident = "Hewlett-Packard t5745", 
    751759                .matches = { 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/i915/intel_sdvo.c

    r19285 r19332  
    770770 
    771771        dtd->part2.dtd_flags = 0x18; 
     772        if (mode->flags & DRM_MODE_FLAG_INTERLACE) 
     773                dtd->part2.dtd_flags |= DTD_FLAG_INTERLACE; 
    772774        if (mode->flags & DRM_MODE_FLAG_PHSYNC) 
    773                 dtd->part2.dtd_flags |= 0x2; 
     775                dtd->part2.dtd_flags |= DTD_FLAG_HSYNC_POSITIVE; 
    774776        if (mode->flags & DRM_MODE_FLAG_PVSYNC) 
    775                 dtd->part2.dtd_flags |= 0x4; 
     777                dtd->part2.dtd_flags |= DTD_FLAG_VSYNC_POSITIVE; 
    776778 
    777779        dtd->part2.sdvo_flags = 0; 
     
    807809 
    808810        mode->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); 
    809         if (dtd->part2.dtd_flags & 0x2) 
     811        if (dtd->part2.dtd_flags & DTD_FLAG_INTERLACE) 
     812                mode->flags |= DRM_MODE_FLAG_INTERLACE; 
     813        if (dtd->part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE) 
    810814                mode->flags |= DRM_MODE_FLAG_PHSYNC; 
    811         if (dtd->part2.dtd_flags & 0x4) 
     815        if (dtd->part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE) 
    812816                mode->flags |= DRM_MODE_FLAG_PVSYNC; 
    813817} 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/i915/intel_sdvo_regs.h

    r19285 r19332  
    6161        u16 output_flags; 
    6262} __attribute__((packed)); 
     63 
     64/* Note: SDVO detailed timing flags match EDID misc flags. */ 
     65#define DTD_FLAG_HSYNC_POSITIVE (1 << 1) 
     66#define DTD_FLAG_VSYNC_POSITIVE (1 << 2) 
     67#define DTD_FLAG_INTERLACE      (1 << 7) 
    6368 
    6469/** This matches the EDID DTD structure, more or less */ 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/i915/intel_tv.c

    r19285 r19332  
    675675        }, 
    676676        { 
     677                .name       = "480p", 
     678                .clock          = 107520, 
     679                .refresh        = 59940, 
     680                .oversample     = TV_OVERSAMPLE_4X, 
     681                .component_only = 1, 
     682 
     683                .hsync_end      = 64,               .hblank_end         = 122, 
     684                .hblank_start   = 842,              .htotal             = 857, 
     685 
     686                .progressive    = true,             .trilevel_sync = false, 
     687 
     688                .vsync_start_f1 = 12,               .vsync_start_f2     = 12, 
     689                .vsync_len      = 12, 
     690 
     691                .veq_ena        = false, 
     692 
     693                .vi_end_f1      = 44,               .vi_end_f2          = 44, 
     694                .nbr_end        = 479, 
     695 
     696                .burst_ena      = false, 
     697 
     698                .filter_table = filter_table, 
     699        }, 
     700        { 
     701                .name       = "576p", 
     702                .clock          = 107520, 
     703                .refresh        = 50000, 
     704                .oversample     = TV_OVERSAMPLE_4X, 
     705                .component_only = 1, 
     706 
     707                .hsync_end      = 64,               .hblank_end         = 139, 
     708                .hblank_start   = 859,              .htotal             = 863, 
     709 
     710                .progressive    = true,             .trilevel_sync = false, 
     711 
     712                .vsync_start_f1 = 10,               .vsync_start_f2     = 10, 
     713                .vsync_len      = 10, 
     714 
     715                .veq_ena        = false, 
     716 
     717                .vi_end_f1      = 48,               .vi_end_f2          = 48, 
     718                .nbr_end        = 575, 
     719 
     720                .burst_ena      = false, 
     721 
     722                .filter_table = filter_table, 
     723        }, 
     724        { 
    677725                .name       = "720p@60Hz", 
    678726                .clock          = 148800, 
     
    11861234        I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_STATE_CHG_EN); 
    11871235        I915_WRITE(TV_CTL, save_tv_ctl); 
     1236        POSTING_READ(TV_CTL); 
     1237 
     1238        /* For unknown reasons the hw barfs if we don't do this vblank wait. */ 
     1239        intel_wait_for_vblank(intel_tv->base.base.dev, 
     1240                              to_intel_crtc(intel_tv->base.base.crtc)->pipe); 
    11881241 
    11891242        /* Restore interrupt config */ 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/evergreen.c

    r19285 r19332  
    10301030                WREG32(MC_VM_MD_L1_TLB1_CNTL, tmp); 
    10311031                WREG32(MC_VM_MD_L1_TLB2_CNTL, tmp); 
     1032                if ((rdev->family == CHIP_JUNIPER) || 
     1033                    (rdev->family == CHIP_CYPRESS) || 
     1034                    (rdev->family == CHIP_HEMLOCK) || 
     1035                    (rdev->family == CHIP_BARTS)) 
     1036                        WREG32(MC_VM_MD_L1_TLB3_CNTL, tmp); 
    10321037        } 
    10331038        WREG32(MC_VM_MB_L1_TLB0_CNTL, tmp); 
     
    21372142        if (rdev->flags & RADEON_IS_IGP) 
    21382143                rdev->config.evergreen.tile_config |= 1 << 4; 
    2139         else 
    2140                 rdev->config.evergreen.tile_config |= 
    2141                         ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4; 
     2144        else { 
     2145                if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) 
     2146                        rdev->config.evergreen.tile_config |= 1 << 4; 
     2147                else 
     2148                        rdev->config.evergreen.tile_config |= 0 << 4; 
     2149        } 
    21422150        rdev->config.evergreen.tile_config |= 
    21432151                ((mc_arb_ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT) << 8; 
     
    21712179                WREG32(GC_USER_RB_BACKEND_DISABLE, rb); 
    21722180                WREG32(CC_GC_SHADER_PIPE_CONFIG, sp); 
    2173         } 
    2174  
    2175         grbm_gfx_index |= SE_BROADCAST_WRITES; 
     2181        } 
     2182 
     2183        grbm_gfx_index = INSTANCE_BROADCAST_WRITES | SE_BROADCAST_WRITES; 
    21762184        WREG32(GRBM_GFX_INDEX, grbm_gfx_index); 
    21772185        WREG32(RLC_GFX_INDEX, grbm_gfx_index); 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/evergreend.h

    r19285 r19332  
    233233#define MC_VM_MD_L1_TLB1_CNTL                           0x2658 
    234234#define MC_VM_MD_L1_TLB2_CNTL                           0x265C 
     235#define MC_VM_MD_L1_TLB3_CNTL                           0x2698 
    235236 
    236237#define FUS_MC_VM_MD_L1_TLB0_CNTL                       0x265C 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/ni.c

    r19285 r19332  
    658658                rdev->config.cayman.max_tile_pipes = 2; 
    659659                if ((rdev->pdev->device == 0x9900) || 
    660                     (rdev->pdev->device == 0x9901)) { 
     660                    (rdev->pdev->device == 0x9901) || 
     661                    (rdev->pdev->device == 0x9905) || 
     662                    (rdev->pdev->device == 0x9906) || 
     663                    (rdev->pdev->device == 0x9907) || 
     664                    (rdev->pdev->device == 0x9908) || 
     665                    (rdev->pdev->device == 0x9909) || 
     666                    (rdev->pdev->device == 0x9910) || 
     667                    (rdev->pdev->device == 0x9917)) { 
    661668                        rdev->config.cayman.max_simds_per_se = 6; 
    662669                        rdev->config.cayman.max_backends_per_se = 2; 
    663670                } else if ((rdev->pdev->device == 0x9903) || 
    664                            (rdev->pdev->device == 0x9904)) { 
     671                           (rdev->pdev->device == 0x9904) || 
     672                           (rdev->pdev->device == 0x990A) || 
     673                           (rdev->pdev->device == 0x9913) || 
     674                           (rdev->pdev->device == 0x9918)) { 
    665675                        rdev->config.cayman.max_simds_per_se = 4; 
    666676                        rdev->config.cayman.max_backends_per_se = 2; 
    667                 } else if ((rdev->pdev->device == 0x9990) || 
    668                            (rdev->pdev->device == 0x9991)) { 
     677                } else if ((rdev->pdev->device == 0x9919) || 
     678                           (rdev->pdev->device == 0x9990) || 
     679                           (rdev->pdev->device == 0x9991) || 
     680                           (rdev->pdev->device == 0x9994) || 
     681                           (rdev->pdev->device == 0x99A0)) { 
    669682                        rdev->config.cayman.max_simds_per_se = 3; 
    670683                        rdev->config.cayman.max_backends_per_se = 1; 
     
    866879        /* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, 2 = 16 */ 
    867880        if (rdev->flags & RADEON_IS_IGP) 
    868                 rdev->config.evergreen.tile_config |= 1 << 4; 
    869         else 
    870                 rdev->config.cayman.tile_config |= 
    871                         ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4; 
     881                rdev->config.cayman.tile_config |= 1 << 4; 
     882        else { 
     883                if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) 
     884                        rdev->config.cayman.tile_config |= 1 << 4; 
     885                else 
     886                        rdev->config.cayman.tile_config |= 0 << 4; 
     887        } 
    872888        rdev->config.cayman.tile_config |= 
    873889                ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/r600_audio.c

    r19285 r19332  
    240240        struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 
    241241        struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; 
     242        struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); 
    242243        int base_rate = 48000; 
    243244 
     
    265266                WREG32(EVERGREEN_AUDIO_PLL1_UNK, 0x00000071); 
    266267 
    267                 /* Some magic trigger or src sel? */ 
    268                 WREG32_P(0x5ac, 0x01, ~0x77); 
     268                /* Select DTO source */ 
     269                WREG32(0x5ac, radeon_crtc->crtc_id); 
    269270        } else { 
    270271                switch (dig->dig_encoder) { 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/radeon_atombios.c

    r19285 r19332  
    445445        if ((dev->pdev->device == 0x9498) && 
    446446            (dev->pdev->subsystem_vendor == 0x1682) && 
    447             (dev->pdev->subsystem_device == 0x2452)) { 
     447            (dev->pdev->subsystem_device == 0x2452) && 
     448            (i2c_bus->valid == false) && 
     449            !(supported_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))) { 
    448450                struct radeon_device *rdev = dev->dev_private; 
    449451                *i2c_bus = radeon_lookup_i2c_gpio(rdev, 0x93); 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/radeon_cs.c

    r19285 r19332  
    159159} 
    160160 
     161/* XXX: note that this is called from the legacy UMS CS ioctl as well */ 
    161162int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data) 
    162163{ 
     
    253254        } 
    254255 
    255         if ((p->cs_flags & RADEON_CS_USE_VM) && 
    256             !p->rdev->vm_manager.enabled) { 
    257                 DRM_ERROR("VM not active on asic!\n"); 
    258                 return -EINVAL; 
    259         } 
    260  
    261         /* we only support VM on SI+ */ 
    262         if ((p->rdev->family >= CHIP_TAHITI) && 
    263             ((p->cs_flags & RADEON_CS_USE_VM) == 0)) { 
    264                 DRM_ERROR("VM required on SI+!\n"); 
    265                 return -EINVAL; 
    266         } 
    267  
    268         if (radeon_cs_get_ring(p, ring, priority)) 
    269                 return -EINVAL; 
    270  
     256        /* these are KMS only */ 
     257        if (p->rdev) { 
     258                if ((p->cs_flags & RADEON_CS_USE_VM) && 
     259                    !p->rdev->vm_manager.enabled) { 
     260                        DRM_ERROR("VM not active on asic!\n"); 
     261                        return -EINVAL; 
     262                } 
     263 
     264                /* we only support VM on SI+ */ 
     265                if ((p->rdev->family >= CHIP_TAHITI) && 
     266                    ((p->cs_flags & RADEON_CS_USE_VM) == 0)) { 
     267                        DRM_ERROR("VM required on SI+!\n"); 
     268                        return -EINVAL; 
     269                } 
     270 
     271                if (radeon_cs_get_ring(p, ring, priority)) 
     272                        return -EINVAL; 
     273        } 
    271274 
    272275        /* deal with non-vm */ 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/radeon_gart.c

    r19285 r19332  
    479479        mutex_lock(&vm->mutex); 
    480480        if (last_pfn > vm->last_pfn) { 
    481                 /* grow va space 32M by 32M */ 
    482                 unsigned align = ((32 << 20) >> 12) - 1; 
     481                /* release mutex and lock in right order */ 
     482                mutex_unlock(&vm->mutex); 
    483483                radeon_mutex_lock(&rdev->cs_mutex); 
    484                 radeon_vm_unbind_locked(rdev, vm); 
     484                mutex_lock(&vm->mutex); 
     485                /* and check again */ 
     486                if (last_pfn > vm->last_pfn) { 
     487                        /* grow va space 32M by 32M */ 
     488                        unsigned align = ((32 << 20) >> 12) - 1; 
     489                        radeon_vm_unbind_locked(rdev, vm); 
     490                        vm->last_pfn = (last_pfn + align) & ~align; 
     491                } 
    485492                radeon_mutex_unlock(&rdev->cs_mutex); 
    486                 vm->last_pfn = (last_pfn + align) & ~align; 
    487493        } 
    488494        head = &vm->va; 
     
    598604                return 0; 
    599605 
     606        radeon_mutex_lock(&rdev->cs_mutex); 
    600607        mutex_lock(&vm->mutex); 
    601         radeon_mutex_lock(&rdev->cs_mutex); 
    602608        radeon_vm_bo_update_pte(rdev, vm, bo, NULL); 
    603609        radeon_mutex_unlock(&rdev->cs_mutex); 
     
    644650        int r; 
    645651 
     652        radeon_mutex_lock(&rdev->cs_mutex); 
    646653        mutex_lock(&vm->mutex); 
    647  
    648         radeon_mutex_lock(&rdev->cs_mutex); 
    649654        radeon_vm_unbind_locked(rdev, vm); 
    650655        radeon_mutex_unlock(&rdev->cs_mutex); 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/rv770.c

    r19285 r19332  
    152152        WREG32(MC_VM_MD_L1_TLB1_CNTL, tmp); 
    153153        WREG32(MC_VM_MD_L1_TLB2_CNTL, tmp); 
     154        if (rdev->family == CHIP_RV740) 
     155                WREG32(MC_VM_MD_L1_TLB3_CNTL, tmp); 
    154156        WREG32(MC_VM_MB_L1_TLB0_CNTL, tmp); 
    155157        WREG32(MC_VM_MB_L1_TLB1_CNTL, tmp); 
     
    690692        if (rdev->family == CHIP_RV770) 
    691693                gb_tiling_config |= BANK_TILING(1); 
    692         else 
    693                 gb_tiling_config |= BANK_TILING((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT); 
     694        else { 
     695                if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) 
     696                        gb_tiling_config |= BANK_TILING(1); 
     697                else 
     698                        gb_tiling_config |= BANK_TILING(0); 
     699        } 
    694700        rdev->config.rv770.tiling_nbanks = 4 << ((gb_tiling_config >> 4) & 0x3); 
    695701        gb_tiling_config |= GROUP_SIZE((mc_arb_ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT); 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/radeon/rv770d.h

    r19285 r19332  
    175175#define MC_VM_MD_L1_TLB1_CNTL                           0x2658 
    176176#define MC_VM_MD_L1_TLB2_CNTL                           0x265C 
     177#define MC_VM_MD_L1_TLB3_CNTL                           0x2698 
    177178#define MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR              0x203C 
    178179#define MC_VM_SYSTEM_APERTURE_HIGH_ADDR                 0x2038 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/ttm/ttm_bo.c

    r19285 r19332  
    18221822                        (void) ttm_bo_cleanup_refs(bo, false, false, false); 
    18231823                        kref_put(&bo->list_kref, ttm_bo_release_list); 
     1824                        spin_lock(&glob->lru_lock); 
    18241825                        continue; 
    18251826                } 
  • src/linux/universal/linux-3.4/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c

    r19285 r19332  
    6767 
    6868        for (i = 0; i < num_pages; ++i) { 
    69                 if (VMW_PPN_SIZE > 4) 
     69                if (VMW_PPN_SIZE <= 4) 
    7070                        *cmd = page_to_pfn(*pages++); 
    7171                else 
  • src/linux/universal/linux-3.4/drivers/iommu/amd_iommu.c

    r19285 r19332  
    451451static void iommu_print_event(struct amd_iommu *iommu, void *__evt) 
    452452{ 
    453         u32 *event = __evt; 
    454         int type  = (event[1] >> EVENT_TYPE_SHIFT)  & EVENT_TYPE_MASK; 
    455         int devid = (event[0] >> EVENT_DEVID_SHIFT) & EVENT_DEVID_MASK; 
    456         int domid = (event[1] >> EVENT_DOMID_SHIFT) & EVENT_DOMID_MASK; 
    457         int flags = (event[1] >> EVENT_FLAGS_SHIFT) & EVENT_FLAGS_MASK; 
    458         u64 address = (u64)(((u64)event[3]) << 32) | event[2]; 
     453        int type, devid, domid, flags; 
     454        volatile u32 *event = __evt; 
     455        int count = 0; 
     456        u64 address; 
     457 
     458retry: 
     459        type    = (event[1] >> EVENT_TYPE_SHIFT)  & EVENT_TYPE_MASK; 
     460        devid   = (event[0] >> EVENT_DEVID_SHIFT) & EVENT_DEVID_MASK; 
     461        domid   = (event[1] >> EVENT_DOMID_SHIFT) & EVENT_DOMID_MASK; 
     462        flags   = (event[1] >> EVENT_FLAGS_SHIFT) & EVENT_FLAGS_MASK; 
     463        address = (u64)(((u64)event[3]) << 32) | event[2]; 
     464 
     465        if (type == 0) { 
     466                /* Did we hit the erratum? */ 
     467                if (++count == LOOP_TIMEOUT) { 
     468                        pr_err("AMD-Vi: No event written to event log\n"); 
     469                        return; 
     470                } 
     471                udelay(1); 
     472                goto retry; 
     473        } 
    459474 
    460475        printk(KERN_ERR "AMD-Vi: Event logged ["); 
     
    509524                printk(KERN_ERR "UNKNOWN type=0x%02x]\n", type); 
    510525        } 
     526 
     527        memset(__evt, 0, 4 * sizeof(u32)); 
    511528} 
    512529 
     
    531548} 
    532549 
    533 static void iommu_handle_ppr_entry(struct amd_iommu *iommu, u32 head) 
     550static void iommu_handle_ppr_entry(struct amd_iommu *iommu, u64 *raw) 
    534551{ 
    535552        struct amd_iommu_fault fault; 
    536         volatile u64 *raw; 
    537         int i; 
    538553 
    539554        INC_STATS_COUNTER(pri_requests); 
    540  
    541         raw = (u64 *)(iommu->ppr_log + head); 
    542  
    543         /* 
    544          * Hardware bug: Interrupt may arrive before the entry is written to 
    545          * memory. If this happens we need to wait for the entry to arrive. 
    546          */ 
    547         for (i = 0; i < LOOP_TIMEOUT; ++i) { 
    548                 if (PPR_REQ_TYPE(raw[0]) != 0) 
    549                         break; 
    550                 udelay(1); 
    551         } 
    552555 
    553556        if (PPR_REQ_TYPE(raw[0]) != PPR_REQ_FAULT) { 
     
    562565        fault.flags     = PPR_FLAGS(raw[0]); 
    563566 
    564         /* 
    565          * To detect the hardware bug we need to clear the entry 
    566          * to back to zero. 
    567          */ 
    568         raw[0] = raw[1] = 0; 
    569  
    570567        atomic_notifier_call_chain(&ppr_notifier, 0, &fault); 
    571568} 
     
    579576                return; 
    580577 
     578        /* enable ppr interrupts again */ 
     579        writel(MMIO_STATUS_PPR_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); 
     580 
    581581        spin_lock_irqsave(&iommu->lock, flags); 
    582582 
     
    585585 
    586586        while (head != tail) { 
    587  
    588                 /* Handle PPR entry */ 
    589                 iommu_handle_ppr_entry(iommu, head); 
    590  
    591                 /* Update and refresh ring-buffer state*/ 
     587                volatile u64 *raw; 
     588                u64 entry[2]; 
     589                int i; 
     590 
     591                raw = (u64 *)(iommu->ppr_log + head); 
     592 
     593                /* 
     594                 * Hardware bug: Interrupt may arrive before the entry is 
     595                 * written to memory. If this happens we need to wait for the 
     596                 * entry to arrive. 
     597                 */ 
     598                for (i = 0; i < LOOP_TIMEOUT; ++i) { 
     599                        if (PPR_REQ_TYPE(raw[0]) != 0) 
     600                                break; 
     601                        udelay(1); 
     602                } 
     603 
     604                /* Avoid memcpy function-call overhead */ 
     605                entry[0] = raw[0]; 
     606                entry[1] = raw[1]; 
     607 
     608                /* 
     609                 * To detect the hardware bug we need to clear the entry 
     610                 * back to zero. 
     611                 */ 
     612                raw[0] = raw[1] = 0UL; 
     613 
     614                /* Update head pointer of hardware ring-buffer */ 
    592615                head = (head + PPR_ENTRY_SIZE) % PPR_LOG_SIZE; 
    593616                writel(head, iommu->mmio_base + MMIO_PPR_HEAD_OFFSET); 
     617 
     618                /* 
     619                 * Release iommu->lock because ppr-handling might need to 
     620                 * re-aquire it 
     621                 */ 
     622                spin_unlock_irqrestore(&iommu->lock, flags); 
     623 
     624                /* Handle PPR entry */ 
     625                iommu_handle_ppr_entry(iommu, entry); 
     626 
     627                spin_lock_irqsave(&iommu->lock, flags); 
     628 
     629                /* Refresh ring-buffer information */ 
     630                head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET); 
    594631                tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET); 
    595632        } 
    596  
    597         /* enable ppr interrupts again */ 
    598         writel(MMIO_STATUS_PPR_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); 
    599633 
    600634        spin_unlock_irqrestore(&iommu->lock, flags); 
     
    20362070 
    20372071/* FIXME: Move this to PCI code */ 
    2038 #define PCI_PRI_TLP_OFF         (1 << 2) 
     2072#define PCI_PRI_TLP_OFF         (1 << 15) 
    20392073 
    20402074bool pci_pri_tlp_required(struct pci_dev *pdev) 
    20412075{ 
    2042         u16 control; 
     2076        u16 status; 
    20432077        int pos; 
    20442078 
     
    20472081                return false; 
    20482082 
    2049         pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control); 
    2050  
    2051         return (control & PCI_PRI_TLP_OFF) ? true : false; 
     2083        pci_read_config_word(pdev, pos + PCI_PRI_STATUS, &status); 
     2084 
     2085        return (status & PCI_PRI_TLP_OFF) ? true : false; 
    20522086} 
    20532087 
  • src/linux/universal/linux-3.4/drivers/iommu/amd_iommu_init.c

    r19285 r19332  
    10291029        if (!iommu->dev) 
    10301030                return 1; 
     1031 
     1032        iommu->root_pdev = pci_get_bus_and_slot(iommu->dev->bus->number, 
     1033                                                PCI_DEVFN(0, 0)); 
    10311034 
    10321035        iommu->cap_ptr = h->cap_ptr; 
     
    13241327        int i, j; 
    13251328        u32 ioc_feature_control; 
    1326         struct pci_dev *pdev = NULL; 
     1329        struct pci_dev *pdev = iommu->root_pdev; 
    13271330 
    13281331        /* RD890 BIOSes may not have completely reconfigured the iommu */ 
    1329         if (!is_rd890_iommu(iommu->dev)) 
     1332        if (!is_rd890_iommu(iommu->dev) || !pdev) 
    13301333                return; 
    13311334 
     
    13341337         * controlled by a register in the northbridge 
    13351338         */ 
    1336         pdev = pci_get_bus_and_slot(iommu->dev->bus->number, PCI_DEVFN(0, 0)); 
    1337  
    1338         if (!pdev) 
    1339                 return; 
    13401339 
    13411340        /* Select Northbridge indirect register 0x75 and enable writing */ 
     
    13461345        if (!(ioc_feature_control & 0x1)) 
    13471346                pci_write_config_dword(pdev, 0x64, ioc_feature_control | 1); 
    1348  
    1349         pci_dev_put(pdev); 
    13501347 
    13511348        /* Restore the iommu BAR */ 
  • src/linux/universal/linux-3.4/drivers/iommu/amd_iommu_types.h

    r19285 r19332  
    482482        struct pci_dev *dev; 
    483483 
     484        /* Cache pdev to root device for resume quirks */ 
     485        struct pci_dev *root_pdev; 
     486 
    484487        /* physical address of MMIO space */ 
    485488        u64 mmio_phys; 
  • src/linux/universal/linux-3.4/drivers/md/raid1.c

    r19285 r19332  
    25492549        spin_lock_init(&conf->device_lock); 
    25502550        rdev_for_each(rdev, mddev) { 
     2551                struct request_queue *q; 
    25512552                int disk_idx = rdev->raid_disk; 
    25522553                if (disk_idx >= mddev->raid_disks 
     
    25612562                        goto abort; 
    25622563                disk->rdev = rdev; 
     2564                q = bdev_get_queue(rdev->bdev); 
     2565                if (q->merge_bvec_fn) 
     2566                        mddev->merge_check_needed = 1; 
    25632567 
    25642568                disk->head_position = 0; 
  • src/linux/universal/linux-3.4/drivers/md/raid10.c

    r19285 r19332  
    33123312 
    33133313        rdev_for_each(rdev, mddev) { 
    3314  
     3314                struct request_queue *q; 
    33153315                disk_idx = rdev->raid_disk; 
    33163316                if (disk_idx >= conf->raid_disks 
     
    33283328                        disk->rdev = rdev; 
    33293329                } 
     3330                q = bdev_get_queue(rdev->bdev); 
     3331                if (q->merge_bvec_fn) 
     3332                        mddev->merge_check_needed = 1; 
    33303333 
    33313334                disk_stack_limits(mddev->gendisk, rdev->bdev, 
  • src/linux/universal/linux-3.4/drivers/mtd/Kconfig

    r19285 r19332  
    140140config MTD_OF_PARTS 
    141141        tristate "OpenFirmware partitioning information support" 
    142         default Y 
     142        default y 
    143143        depends on OF 
    144144        help 
  • src/linux/universal/linux-3.4/drivers/mtd/devices/block2mtd.c

    r19285 r19332  
    370370        dev->mtd._erase = block2mtd_erase; 
    371371        dev->mtd._write = block2mtd_write; 
    372         dev->mtd._writev = mtd_writev; 
    373372        dev->mtd._sync = block2mtd_sync; 
    374373        dev->mtd._read = block2mtd_read; 
  • src/linux/universal/linux-3.4/drivers/mtd/nand/mxc_nand.c

    r19285 r19332  
    12201220                this->ecc.layout = &nandv2_hw_eccoob_4k; 
    12211221 
    1222         /* second phase scan */ 
    1223         if (nand_scan_tail(mtd)) { 
    1224                 err = -ENXIO; 
    1225                 goto escan; 
    1226         } 
    1227  
    12281222        if (this->ecc.mode == NAND_ECC_HW) { 
    12291223                if (nfc_is_v1()) 
     
    12311225                else 
    12321226                        this->ecc.strength = (host->eccsize == 4) ? 4 : 8; 
     1227        } 
     1228 
     1229        /* second phase scan */ 
     1230        if (nand_scan_tail(mtd)) { 
     1231                err = -ENXIO; 
     1232                goto escan; 
    12331233        } 
    12341234 
  • src/linux/universal/linux-3.4/drivers/mtd/nand/nand_bbt.c

    r19285 r19332  
    325325                buf += mtd->oobsize + mtd->writesize; 
    326326                len -= mtd->writesize; 
     327                offs += mtd->writesize; 
    327328        } 
    328329        return 0; 
  • src/linux/universal/linux-3.4/drivers/net/ethernet/freescale/fec_mpc52xx.c

    r19285 r19332  
    438438                skb_put(rskb, length - 4);      /* length without CRC32 */ 
    439439                rskb->protocol = eth_type_trans(rskb, dev); 
    440                 if (!skb_defer_rx_timestamp(skb)) 
     440                if (!skb_defer_rx_timestamp(rskb)) 
    441441                        netif_rx(rskb); 
    442442 
  • src/linux/universal/linux-3.4/drivers/net/usb/asix.c

    r19285 r19332  
    3636#include <linux/usb/usbnet.h> 
    3737#include <linux/slab.h> 
     38#include <linux/if_vlan.h> 
    3839 
    3940#define DRIVER_VERSION "22-Dec-2011" 
     
    322323                } 
    323324 
    324                 if ((size > dev->net->mtu + ETH_HLEN) || 
     325                if ((size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) || 
    325326                    (size + offset > skb->len)) { 
    326327                        netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n", 
  • src/linux/universal/linux-3.4/drivers/net/wireless/ath/ath9k/xmit.c

    r19285 r19332  
    6565                                           struct ath_txq *txq, 
    6666                                           struct ath_atx_tid *tid, 
    67                                            struct sk_buff *skb); 
     67                                           struct sk_buff *skb, 
     68                                           bool dequeue); 
    6869 
    6970enum { 
     
    812813                bf = fi->bf; 
    813814                if (!fi->bf) 
    814                         bf = ath_tx_setup_buffer(sc, txq, tid, skb); 
     815                        bf = ath_tx_setup_buffer(sc, txq, tid, skb, true); 
    815816 
    816817                if (!bf) 
     
    17271728        } 
    17281729 
    1729         bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb); 
     1730        bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false); 
    17301731        if (!bf) 
    17311732                return; 
     
    17541755        bf = fi->bf; 
    17551756        if (!bf) 
    1756                 bf = ath_tx_setup_buffer(sc, txq, tid, skb); 
     1757                bf = ath_tx_setup_buffer(sc, txq, tid, skb, false); 
    17571758 
    17581759        if (!bf) 
     
    18151816                                           struct ath_txq *txq, 
    18161817                                           struct ath_atx_tid *tid, 
    1817                                            struct sk_buff *skb) 
     1818                                           struct sk_buff *skb, 
     1819                                           bool dequeue) 
    18181820{ 
    18191821        struct ath_common *common = ath9k_hw_common(sc->sc_ah); 
     
    18641866 
    18651867error: 
     1868        if (dequeue) 
     1869                __skb_unlink(skb, &tid->buf_q); 
    18661870        dev_kfree_skb_any(skb); 
    18671871        return NULL; 
     
    18941898                ath_tx_send_ampdu(sc, tid, skb, txctl); 
    18951899        } else { 
    1896                 bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb); 
     1900                bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false); 
    18971901                if (!bf) 
    18981902                        return; 
  • src/linux/universal/linux-3.4/drivers/net/wireless/iwlwifi/iwl-2000.c

    r19285 r19332  
    184184        .wd_timeout = IWL_DEF_WD_TIMEOUT, 
    185185        .max_event_log_size = 512, 
    186         .shadow_reg_enable = true, 
     186        .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 
    187187        .hd_v2 = true, 
    188188}; 
     
    203203        .wd_timeout = IWL_LONG_WD_TIMEOUT, 
    204204        .max_event_log_size = 512, 
    205         .shadow_reg_enable = true, 
     205        .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 
    206206        .hd_v2 = true, 
    207207}; 
  • src/linux/universal/linux-3.4/drivers/net/wireless/iwlwifi/iwl-6000.c

    r19323 r19332  
    283283        .wd_timeout = IWL_DEF_WD_TIMEOUT, 
    284284        .max_event_log_size = 512, 
    285         .shadow_reg_enable = true, 
     285        .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 
    286286}; 
    287287 
     
    300300        .wd_timeout = IWL_DEF_WD_TIMEOUT, 
    301301        .max_event_log_size = 1024, 
    302         .shadow_reg_enable = true, 
     302        .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 
    303303}; 
    304304 
     
    317317        .wd_timeout = IWL_LONG_WD_TIMEOUT, 
    318318        .max_event_log_size = 512, 
    319         .shadow_reg_enable = true, 
     319        .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 
    320320}; 
    321321 
  • src/linux/universal/linux-3.4/drivers/net/wireless/iwlwifi/iwl-agn-rs.c

    r19285 r19332  
    885885            (priv->bt_full_concurrent != full_concurrent)) { 
    886886                priv->bt_full_concurrent = full_concurrent; 
     887                priv->last_bt_traffic_load = priv->bt_traffic_load; 
    887888 
    888889                /* Update uCode's rate table. */ 
  • src/linux/universal/linux-3.4/drivers/net/wireless/wl1251/sdio.c

    r19285 r19332  
    261261 
    262262        if (wl->irq) { 
     263                irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); 
    263264                ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl); 
    264265                if (ret < 0) { 
     
    268269 
    269270                irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); 
    270                 disable_irq(wl->irq); 
    271271 
    272272                wl1251_sdio_ops.enable_irq = wl1251_enable_line_irq; 
  • src/linux/universal/linux-3.4/drivers/net/wireless/wl1251/spi.c

    r19285 r19332  
    282282        wl->use_eeprom = pdata->use_eeprom; 
    283283 
     284        irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); 
    284285        ret = request_irq(wl->irq, wl1251_irq, 0, DRIVER_NAME, wl); 
    285286        if (ret < 0) { 
     
    289290 
    290291        irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); 
    291  
    292         disable_irq(wl->irq); 
    293292 
    294293        ret = wl1251_init_ieee80211(wl); 
  • src/linux/universal/linux-3.4/drivers/scsi/scsi_lib.c

    r19285 r19332  
    13791379        struct scsi_device *sdev = q->queuedata; 
    13801380        struct Scsi_Host *shost; 
    1381         struct scsi_target *starget; 
    13821381 
    13831382        if (!sdev) 
     
    13851384 
    13861385        shost = sdev->host; 
    1387         starget = scsi_target(sdev); 
    1388  
    1389         if (scsi_host_in_recovery(shost) || scsi_host_is_busy(shost) || 
    1390             scsi_target_is_busy(starget) || scsi_device_is_busy(sdev)) 
     1386 
     1387        /* 
     1388         * Ignore host/starget busy state. 
     1389         * Since block layer does not have a concept of fairness across 
     1390         * multiple queues, congestion of host/starget needs to be handled 
     1391         * in SCSI layer. 
     1392         */ 
     1393        if (scsi_host_in_recovery(shost) || scsi_device_is_busy(sdev)) 
    13911394                return 1; 
    13921395 
  • src/linux/universal/linux-3.4/drivers/scsi/scsi_wait_scan.c

    r19285 r19332  
    1313#include <linux/module.h> 
    1414#include <linux/device.h> 
    15 #include <scsi/scsi_scan.h> 
     15#include "scsi_priv.h" 
    1616 
    1717static int __init wait_scan_init(void) 
  • src/linux/universal/linux-3.4/fs/attr.c

    r19285 r19332  
    177177        } 
    178178 
     179        if ((ia_valid & ATTR_SIZE) && IS_I_VERSION(inode)) { 
     180                if (attr->ia_size != inode->i_size) 
     181                        inode_inc_iversion(inode); 
     182        } 
     183 
    179184        if ((ia_valid & ATTR_MODE)) { 
    180185                umode_t amode = attr->ia_mode; 
  • src/linux/universal/linux-3.4/fs/cifs/cifsglob.h

    r19285 r19332  
    4444#define CIFS_MIN_RCV_POOL 4 
    4545 
     46#define MAX_REOPEN_ATT  5 /* these many maximum attempts to reopen a file */ 
    4647/* 
    4748 * default attribute cache timeout (jiffies) 
  • src/linux/universal/linux-3.4/fs/cifs/cifsproto.h

    r19285 r19332  
    193193extern int CIFSFindFirst(const int xid, struct cifs_tcon *tcon, 
    194194                const char *searchName, const struct nls_table *nls_codepage, 
    195                 __u16 *searchHandle, struct cifs_search_info *psrch_inf, 
     195                __u16 *searchHandle, __u16 search_flags, 
     196                struct cifs_search_info *psrch_inf, 
    196197                int map, const char dirsep); 
    197198 
    198199extern int CIFSFindNext(const int xid, struct cifs_tcon *tcon, 
    199                 __u16 searchHandle, struct cifs_search_info *psrch_inf); 
     200                __u16 searchHandle, __u16 search_flags, 
     201                struct cifs_search_info *psrch_inf); 
    200202 
    201203extern int CIFSFindClose(const int, struct cifs_tcon *tcon, 
  • src/linux/universal/linux-3.4/fs/cifs/cifssmb.c

    r19285 r19332  
    43454345              const char *searchName, 
    43464346              const struct nls_table *nls_codepage, 
    4347               __u16 *pnetfid, 
     4347              __u16 *pnetfid, __u16 search_flags, 
    43484348              struct cifs_search_info *psrch_inf, int remap, const char dirsep) 
    43494349{ 
     
    44174417                        ATTR_DIRECTORY); 
    44184418        pSMB->SearchCount = cpu_to_le16(CIFSMaxBufSize/sizeof(FILE_UNIX_INFO)); 
    4419         pSMB->SearchFlags = cpu_to_le16(CIFS_SEARCH_CLOSE_AT_END | 
    4420                 CIFS_SEARCH_RETURN_RESUME); 
     4419        pSMB->SearchFlags = cpu_to_le16(search_flags); 
    44214420        pSMB->InformationLevel = cpu_to_le16(psrch_inf->info_level); 
    44224421 
     
    44884487} 
    44894488 
    4490 int CIFSFindNext(const int xid, struct cifs_tcon *tcon, 
    4491                  __u16 searchHandle, struct cifs_search_info *psrch_inf) 
     4489int CIFSFindNext(const int xid, struct cifs_tcon *tcon, __u16 searchHandle, 
     4490                 __u16 search_flags, struct cifs_search_info *psrch_inf) 
    44924491{ 
    44934492        TRANSACTION2_FNEXT_REQ *pSMB = NULL; 
     
    45324531        pSMB->InformationLevel = cpu_to_le16(psrch_inf->info_level); 
    45334532        pSMB->ResumeKey = psrch_inf->resume_key; 
    4534         pSMB->SearchFlags = 
    4535               cpu_to_le16(CIFS_SEARCH_CLOSE_AT_END | CIFS_SEARCH_RETURN_RESUME); 
     4533        pSMB->SearchFlags = cpu_to_le16(search_flags); 
    45364534 
    45374535        name_len = psrch_inf->resume_name_len; 
  • src/linux/universal/linux-3.4/fs/cifs/file.c

    r19285 r19332  
    15401540                                        bool fsuid_only) 
    15411541{ 
    1542         struct cifsFileInfo *open_file; 
     1542        struct cifsFileInfo *open_file, *inv_file = NULL; 
    15431543        struct cifs_sb_info *cifs_sb; 
    15441544        bool any_available = false; 
    15451545        int rc; 
     1546        unsigned int refind = 0; 
    15461547 
    15471548        /* Having a null inode here (because mapping->host was set to zero by 
     
    15631564        spin_lock(&cifs_file_list_lock); 
    15641565refind_writable: 
     1566        if (refind > MAX_REOPEN_ATT) { 
     1567                spin_unlock(&cifs_file_list_lock); 
     1568                return NULL; 
     1569        } 
    15651570        list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { 
    15661571                if (!any_available && open_file->pid != current->tgid) 
     
    15691574                        continue; 
    15701575                if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { 
    1571                         cifsFileInfo_get(open_file); 
    1572  
    15731576                        if (!open_file->invalidHandle) { 
    15741577                                /* found a good writable file */ 
     1578                                cifsFileInfo_get(open_file); 
    15751579                                spin_unlock(&cifs_file_list_lock); 
    15761580                                return open_file; 
     1581                        } else { 
     1582                                if (!inv_file) 
     1583                                        inv_file = open_file; 
    15771584                        } 
    1578  
    1579                         spin_unlock(&cifs_file_list_lock); 
    1580  
    1581                         /* Had to unlock since following call can block */ 
    1582                         rc = cifs_reopen_file(open_file, false); 
    1583                         if (!rc) 
    1584                                 return open_file; 
    1585  
    1586                         /* if it fails, try another handle if possible */ 
    1587                         cFYI(1, "wp failed on reopen file"); 
    1588                         cifsFileInfo_put(open_file); 
    1589  
    1590                         spin_lock(&cifs_file_list_lock); 
    1591  
    1592                         /* else we simply continue to the next entry. Thus 
    1593                            we do not loop on reopen errors.  If we 
    1594                            can not reopen the file, for example if we 
    1595                            reconnected to a server with another client 
    1596                            racing to delete or lock the file we would not 
    1597                            make progress if we restarted before the beginning 
    1598                            of the loop here. */ 
    15991585                } 
    16001586        } 
     
    16041590                goto refind_writable; 
    16051591        } 
     1592 
     1593        if (inv_file) { 
     1594                any_available = false; 
     1595                cifsFileInfo_get(inv_file); 
     1596        } 
     1597 
    16061598        spin_unlock(&cifs_file_list_lock); 
     1599 
     1600        if (inv_file) { 
     1601                rc = cifs_reopen_file(inv_file, false); 
     1602                if (!rc) 
     1603                        return inv_file; 
     1604                else { 
     1605                        spin_lock(&cifs_file_list_lock); 
     1606                        list_move_tail(&inv_file->flist, 
     1607                                        &cifs_inode->openFileList); 
     1608                        spin_unlock(&cifs_file_list_lock); 
     1609                        cifsFileInfo_put(inv_file); 
     1610                        spin_lock(&cifs_file_list_lock); 
     1611                        ++refind; 
     1612                        goto refind_writable; 
     1613                } 
     1614        } 
     1615 
    16071616        return NULL; 
    16081617} 
  • src/linux/universal/linux-3.4/fs/cifs/readdir.c

    r19285 r19332  
    220220static int initiate_cifs_search(const int xid, struct file *file) 
    221221{ 
     222        __u16 search_flags; 
    222223        int rc = 0; 
    223224        char *full_path = NULL; 
     
    271272        } 
    272273 
     274        search_flags = CIFS_SEARCH_CLOSE_AT_END | CIFS_SEARCH_RETURN_RESUME; 
     275        if (backup_cred(cifs_sb)) 
     276                search_flags |= CIFS_SEARCH_BACKUP_SEARCH; 
     277 
    273278        rc = CIFSFindFirst(xid, pTcon, full_path, cifs_sb->local_nls, 
    274                 &cifsFile->netfid, &cifsFile->srch_inf, 
     279                &cifsFile->netfid, search_flags, &cifsFile->srch_inf, 
    275280                cifs_sb->mnt_cifs_flags & 
    276281                        CIFS_MOUNT_MAP_SPECIAL_CHR, CIFS_DIR_SEP(cifs_sb)); 
     
    503508        struct file *file, char **ppCurrentEntry, int *num_to_ret) 
    504509{ 
     510        __u16 search_flags; 
    505511        int rc = 0; 
    506512        int pos_in_buf = 0; 
     
    508514        loff_t index_to_find = file->f_pos; 
    509515        struct cifsFileInfo *cifsFile = file->private_data; 
     516        struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); 
    510517        /* check if index in the buffer */ 
    511518 
     
    561568        } 
    562569 
     570        search_flags = CIFS_SEARCH_CLOSE_AT_END | CIFS_SEARCH_RETURN_RESUME; 
     571        if (backup_cred(cifs_sb)) 
     572                search_flags |= CIFS_SEARCH_BACKUP_SEARCH; 
     573 
    563574        while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) && 
    564575              (rc == 0) && !cifsFile->srch_inf.endOfSearch) { 
    565576                cFYI(1, "calling findnext2"); 
    566                 rc = CIFSFindNext(xid, pTcon, cifsFile->netfid, 
     577                rc = CIFSFindNext(xid, pTcon, cifsFile->netfid, search_flags, 
    567578                                  &cifsFile->srch_inf); 
    568579                /* FindFirst/Next set last_entry to NULL on malformed reply */ 
  • src/linux/universal/linux-3.4/fs/exofs/super.c

    r19285 r19332  
    746746        sbi->one_comp.obj.id = 0; 
    747747        exofs_make_credential(sbi->one_comp.cred, &sbi->one_comp.obj); 
    748         sbi->oc.numdevs = 1; 
    749748        sbi->oc.single_comp = EC_SINGLE_COMP; 
    750749        sbi->oc.comps = &sbi->one_comp; 
     
    805804 
    806805                ore_comp_set_dev(&sbi->oc, 0, od); 
     806                sbi->oc.numdevs = 1; 
    807807        } 
    808808 
  • src/linux/universal/linux-3.4/fs/ext4/ialloc.c

    r19285 r19332  
    489489                grp = (parent_group + i) % ngroups; 
    490490                desc = ext4_get_group_desc(sb, grp, NULL); 
    491                 grp_free = ext4_free_inodes_count(sb, desc); 
    492                 if (desc && grp_free && grp_free >= avefreei) { 
    493                         *group = grp; 
    494                         return 0; 
     491                if (desc) { 
     492                        grp_free = ext4_free_inodes_count(sb, desc); 
     493                        if (grp_free && grp_free >= avefreei) { 
     494                                *group = grp; 
     495                                return 0; 
     496                        } 
    495497                } 
    496498        } 
  • src/linux/universal/linux-3.4/fs/ext4/ioctl.c

    r19285 r19332  
    3939                int err, migrate = 0; 
    4040                struct ext4_iloc iloc; 
    41                 unsigned int oldflags; 
     41                unsigned int oldflags, mask, i; 
    4242                unsigned int jflag; 
    4343 
     
    116116                        goto flags_err; 
    117117 
    118                 flags = flags & EXT4_FL_USER_MODIFIABLE; 
    119                 flags |= oldflags & ~EXT4_FL_USER_MODIFIABLE; 
     118                for (i = 0, mask = 1; i < 32; i++, mask <<= 1) { 
     119                        if (!(mask & EXT4_FL_USER_MODIFIABLE)) 
     120                                continue; 
     121                        if (mask & flags) 
     122                                ext4_set_inode_flag(inode, i); 
     123                        else 
     124                                ext4_clear_inode_flag(inode, i); 
     125                } 
    120126                ei->i_flags = flags; 
    121127 
  • src/linux/universal/linux-3.4/fs/ext4/mballoc.c

    r19285 r19332  
    25182518        struct kmem_cache *cachep = get_groupinfo_cache(sb->s_blocksize_bits); 
    25192519 
     2520        if (sbi->s_proc) 
     2521                remove_proc_entry("mb_groups", sbi->s_proc); 
     2522 
    25202523        if (sbi->s_group_info) { 
    25212524                for (i = 0; i < ngroups; i++) { 
     
    25652568 
    25662569        free_percpu(sbi->s_locality_groups); 
    2567         if (sbi->s_proc) 
    2568                 remove_proc_entry("mb_groups", sbi->s_proc); 
    25692570 
    25702571        return 0; 
     
    46374638                new_entry = kmem_cache_alloc(ext4_free_data_cachep, GFP_NOFS); 
    46384639                if (!new_entry) { 
     4640                        ext4_mb_unload_buddy(&e4b); 
    46394641                        err = -ENOMEM; 
    46404642                        goto error_return; 
  • src/linux/universal/linux-3.4/fs/ext4/namei.c

    r19285 r19332  
    10361036                if (!ext4_valid_inum(dir->i_sb, ino)) { 
    10371037                        EXT4_ERROR_INODE(dir, "bad inode number: %u", ino); 
     1038                        return ERR_PTR(-EIO); 
     1039                } 
     1040                if (unlikely(ino == dir->i_ino)) { 
     1041                        EXT4_ERROR_INODE(dir, "'%.*s' linked to parent dir", 
     1042                                         dentry->d_name.len, 
     1043                                         dentry->d_name.name); 
    10381044                        return ERR_PTR(-EIO); 
    10391045                } 
  • src/linux/universal/linux-3.4/fs/ext4/resize.c

    r19285 r19332  
    162162                goto out3; 
    163163 
     164        if (flexbg_size >= UINT_MAX / sizeof(struct ext4_new_flex_group_data)) 
     165                goto out2; 
    164166        flex_gd->count = flexbg_size; 
    165167 
  • src/linux/universal/linux-3.4/fs/ext4/super.c

    r19285 r19332  
    498498               sb->s_id, function, line, current->comm, &vaf); 
    499499        va_end(args); 
     500        save_error_info(sb, function, line); 
    500501 
    501502        ext4_handle_error(sb); 
     
    35933594        } 
    35943595 
    3595         ext4_setup_super(sb, es, sb->s_flags & MS_RDONLY); 
     3596        if (ext4_setup_super(sb, es, sb->s_flags & MS_RDONLY)) 
     3597                sb->s_flags |= MS_RDONLY; 
    35963598 
    35973599        /* determine the minimum size of new large inodes, if present */ 
  • src/linux/universal/linux-3.4/fs/namespace.c

    r19285 r19332  
    10741074                list_del_init(&p->mnt_list); 
    10751075                __touch_mnt_namespace(p->mnt_ns); 
     1076                if (p->mnt_ns) 
     1077                        __mnt_make_shortterm(p); 
    10761078                p->mnt_ns = NULL; 
    1077                 __mnt_make_shortterm(p); 
    10781079                list_del_init(&p->mnt_child); 
    10791080                if (mnt_has_parent(p)) { 
  • src/linux/universal/linux-3.4/fs/nfs/idmap.c

    r19285 r19332  
    641641        struct idmap *idmap = (struct idmap *)aux; 
    642642        struct key *key = cons->key; 
    643         int ret; 
     643        int ret = -ENOMEM; 
    644644 
    645645        /* msg and im are freed in idmap_pipe_destroy_msg */ 
    646646        msg = kmalloc(sizeof(*msg), GFP_KERNEL); 
    647         if (IS_ERR(msg)) { 
    648                 ret = PTR_ERR(msg); 
     647        if (!msg) 
    649648                goto out0; 
    650         } 
    651649 
    652650        im = kmalloc(sizeof(*im), GFP_KERNEL); 
    653         if (IS_ERR(im)) { 
    654                 ret = PTR_ERR(im); 
     651        if (!im) 
    655652                goto out1; 
    656         } 
    657653 
    658654        ret = nfs_idmap_prepare_message(key->description, im, msg); 
  • src/linux/universal/linux-3.4/fs/nfs/nfs4proc.c

    r19285 r19332  
    102102        case -NFS4ERR_BADNAME: 
    103103                return -EINVAL; 
     104        case -NFS4ERR_SHARE_DENIED: 
     105                return -EACCES; 
    104106        default: 
    105107                dprintk("%s could not handle NFSv4 error %d\n", 
  • src/linux/universal/linux-3.4/fs/proc/base.c

    r19285 r19332  
    18041804                        file = fcheck_files(files, fd); 
    18051805                        if (file) { 
    1806                                 unsigned i_mode, f_mode = file->f_mode; 
     1806                                unsigned f_mode = file->f_mode; 
    18071807 
    18081808                                rcu_read_unlock(); 
     
    18201820                                } 
    18211821 
    1822                                 i_mode = S_IFLNK; 
    1823                                 if (f_mode & FMODE_READ) 
    1824                                         i_mode |= S_IRUSR | S_IXUSR; 
    1825                                 if (f_mode & FMODE_WRITE) 
    1826                                         i_mode |= S_IWUSR | S_IXUSR; 
    1827                                 inode->i_mode = i_mode; 
     1822                                if (S_ISLNK(inode->i_mode)) { 
     1823                                        unsigned i_mode = S_IFLNK; 
     1824                                        if (f_mode & FMODE_READ) 
     1825                                                i_mode |= S_IRUSR | S_IXUSR; 
     1826                                        if (f_mode & FMODE_WRITE) 
     1827                                                i_mode |= S_IWUSR | S_IXUSR; 
     1828                                        inode->i_mode = i_mode; 
     1829                                } 
    18281830 
    18291831                                security_task_to_inode(task, inode); 
     
    18601862        ei->fd = fd; 
    18611863 
     1864        inode->i_mode = S_IFLNK; 
    18621865        inode->i_op = &proc_pid_link_inode_operations; 
    18631866        inode->i_size = 64; 
  • src/linux/universal/linux-3.4/fs/proc/task_mmu.c

    r19285 r19332  
    785785        /* find the first VMA at or above 'addr' */ 
    786786        vma = find_vma(walk->mm, addr); 
    787         if (pmd_trans_huge_lock(pmd, vma) == 1) { 
     787        if (vma && pmd_trans_huge_lock(pmd, vma) == 1) { 
    788788                for (; addr != end; addr += PAGE_SIZE) { 
    789789                        unsigned long offset; 
  • src/linux/universal/linux-3.4/include/asm-generic/pgtable.h

    r19285 r19332  
    447447#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 
    448448 
     449#ifndef pmd_read_atomic 
     450static inline pmd_t pmd_read_atomic(pmd_t *pmdp) 
     451{ 
     452        /* 
     453         * Depend on compiler for an atomic pmd read. NOTE: this is 
     454         * only going to work, if the pmdval_t isn't larger than 
     455         * an unsigned long. 
     456         */ 
     457        return *pmdp; 
     458} 
     459#endif 
     460 
    449461/* 
    450462 * This function is meant to be used by sites walking pagetables with 
     
    460472 * can return none anyway). The compiler level barrier() is critically 
    461473 * important to compute the two checks atomically on the same pmdval. 
     474 * 
     475 * For 32bit kernels with a 64bit large pmd_t this automatically takes 
     476 * care of reading the pmd atomically to avoid SMP race conditions 
     477 * against pmd_populate() when the mmap_sem is hold for reading by the 
     478 * caller (a special atomic read not done by "gcc" as in the generic 
     479 * version above, is also needed when THP is disabled because the page 
     480 * fault can populate the pmd from under us). 
    462481 */ 
    463482static inline int pmd_none_or_trans_huge_or_clear_bad(pmd_t *pmd) 
    464483{ 
    465         /* depend on compiler for an atomic pmd read */ 
    466         pmd_t pmdval = *pmd; 
     484        pmd_t pmdval = pmd_read_atomic(pmd); 
    467485        /* 
    468486         * The barrier will stabilize the pmdval in a register or on 
  • src/linux/universal/linux-3.4/include/drm/drm_pciids.h

    r19285 r19332  
    182182        {0x1002, 0x6748, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 
    183183        {0x1002, 0x6749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 
     184        {0x1002, 0x674A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 
    184185        {0x1002, 0x6750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 
    185186        {0x1002, 0x6751, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ 
     
    199200        {0x1002, 0x6768, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 
    200201        {0x1002, 0x6770, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 
     202        {0x1002, 0x6771, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 
    201203        {0x1002, 0x6772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 
    202204        {0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ 
     
    230232        {0x1002, 0x6828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ 
    231233        {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ 
     234        {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 
    232235        {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 
    233236        {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 
    234         {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ 
    235         {0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ 
     237        {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 
     238        {0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 
    236239        {0x1002, 0x6837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ 
    237240        {0x1002, 0x6838, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ 
     
    532535        {0x1002, 0x9647, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ 
    533536        {0x1002, 0x9648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ 
     537        {0x1002, 0x9649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ 
    534538        {0x1002, 0x964a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    535539        {0x1002, 0x964b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     
    551555        {0x1002, 0x9808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    552556        {0x1002, 0x9809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     557        {0x1002, 0x980A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    553558        {0x1002, 0x9900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    554559        {0x1002, 0x9901, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     
    562567        {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    563568        {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     569        {0x1002, 0x9910, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     570        {0x1002, 0x9913, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     571        {0x1002, 0x9917, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     572        {0x1002, 0x9918, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     573        {0x1002, 0x9919, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    564574        {0x1002, 0x9990, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    565575        {0x1002, 0x9991, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     
    567577        {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    568578        {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     579        {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     580        {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
     581        {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 
    569582        {0, 0, 0} 
    570583 
  • src/linux/universal/linux-3.4/include/linux/Kbuild

    r19285 r19332  
    230230header-y += kernel.h 
    231231header-y += kernelcapi.h 
     232header-y += kernel-page-flags.h 
    232233header-y += keyboard.h 
    233234header-y += keyctl.h 
  • src/linux/universal/linux-3.4/include/linux/kernel-page-flags.h

    r19285 r19332  
    3333#define KPF_THP                 22 
    3434 
     35#ifdef __KERNEL__ 
     36 
    3537/* kernel hacking assistances 
    3638 * WARNING: subject to change, never rely on them! 
     
    4547#define KPF_UNCACHED            39 
    4648 
     49#endif /* __KERNEL__ */ 
     50 
    4751#endif /* LINUX_KERNEL_PAGE_FLAGS_H */ 
  • src/linux/universal/linux-3.4/include/linux/radix-tree.h

    r19285 r19332  
    369369                        if (likely(*slot)) 
    370370                                return slot; 
    371                         if (flags & RADIX_TREE_ITER_CONTIG) 
     371                        if (flags & RADIX_TREE_ITER_CONTIG) { 
     372                                /* forbid switching to the next chunk */ 
     373                                iter->next_index = 0; 
    372374                                break; 
     375                        } 
    373376                } 
    374377        } 
  • src/linux/universal/linux-3.4/include/net/dst.h

    r19285 r19332  
    6161#define DST_NOPEER              0x0040 
    6262#define DST_FAKE_RTABLE         0x0080 
     63#define DST_XFRM_TUNNEL         0x0100 
    6364 
    6465        short                   error; 
  • src/linux/universal/linux-3.4/kernel/fork.c

    r19285 r19332  
    357357                charge = 0; 
    358358                if (mpnt->vm_flags & VM_ACCOUNT) { 
    359                         unsigned int len = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; 
     359                        unsigned long len; 
     360                        len = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; 
    360361                        if (security_vm_enough_memory_mm(oldmm, len)) /* sic */ 
    361362                                goto fail_nomem; 
  • src/linux/universal/linux-3.4/lib/radix-tree.c

    r19285 r19332  
    674674         * And we cannot overflow iter->next_index in a single step, 
    675675         * because RADIX_TREE_MAP_SHIFT < BITS_PER_LONG. 
     676         * 
     677         * This condition also used by radix_tree_next_slot() to stop 
     678         * contiguous iterating, and forbid swithing to the next chunk. 
    676679         */ 
    677680        index = iter->next_index; 
  • src/linux/universal/linux-3.4/mm/hugetlb.c

    r19285 r19332  
    21582158} 
    21592159 
     2160static void resv_map_put(struct vm_area_struct *vma) 
     2161{ 
     2162        struct resv_map *reservations = vma_resv_map(vma); 
     2163 
     2164        if (!reservations) 
     2165                return; 
     2166        kref_put(&reservations->refs, resv_map_release); 
     2167} 
     2168 
    21602169static void hugetlb_vm_op_close(struct vm_area_struct *vma) 
    21612170{ 
     
    21742183                        region_count(&reservations->regions, start, end); 
    21752184 
    2176                 kref_put(&reservations->refs, resv_map_release); 
     2185                resv_map_put(vma); 
    21772186 
    21782187                if (reserve) { 
     
    29913000        } 
    29923001 
    2993         if (chg < 0) 
    2994                 return chg; 
     3002        if (chg < 0) { 
     3003                ret = chg; 
     3004                goto out_err; 
     3005        } 
    29953006 
    29963007        /* There must be enough pages in the subpool for the mapping */ 
    2997         if (hugepage_subpool_get_pages(spool, chg)) 
    2998                 return -ENOSPC; 
     3008        if (hugepage_subpool_get_pages(spool, chg)) { 
     3009                ret = -ENOSPC; 
     3010                goto out_err; 
     3011        } 
    29993012 
    30003013        /* 
     
    30053018        if (ret < 0) { 
    30063019                hugepage_subpool_put_pages(spool, chg); 
    3007                 return ret; 
     3020                goto out_err; 
    30083021        } 
    30093022 
     
    30223035                region_add(&inode->i_mapping->private_list, from, to); 
    30233036        return 0; 
     3037out_err: 
     3038        if (vma) 
     3039                resv_map_put(vma); 
     3040        return ret; 
    30243041} 
    30253042 
  • src/linux/universal/linux-3.4/mm/slub.c

    r19285 r19332  
    15151515                counters = page->counters; 
    15161516                new.counters = counters; 
    1517                 if (mode) 
     1517                if (mode) { 
    15181518                        new.inuse = page->objects; 
     1519                        new.freelist = NULL; 
     1520                } else { 
     1521                        new.freelist = freelist; 
     1522                } 
    15191523 
    15201524                VM_BUG_ON(new.frozen); 
     
    15231527        } while (!__cmpxchg_double_slab(s, page, 
    15241528                        freelist, counters, 
    1525                         NULL, new.counters, 
     1529                        new.freelist, new.counters, 
    15261530                        "lock and freeze")); 
    15271531 
     
    15651569                        available =  page->objects - page->inuse; 
    15661570                } else { 
    1567                         page->freelist = t; 
    15681571                        available = put_cpu_partial(s, page, 0); 
    15691572                        stat(s, CPU_PARTIAL_NODE); 
  • src/linux/universal/linux-3.4/mm/vmalloc.c

    r19285 r19332  
    11861186        for (tmp = vmlist; tmp; tmp = tmp->next) { 
    11871187                va = kzalloc(sizeof(struct vmap_area), GFP_NOWAIT); 
    1188                 va->flags = tmp->flags | VM_VM_AREA; 
     1188                va->flags = VM_VM_AREA; 
    11891189                va->va_start = (unsigned long)tmp->addr; 
    11901190                va->va_end = va->va_start + tmp->size; 
     1191                va->vm = tmp; 
    11911192                __insert_vmap_area(va); 
    11921193        } 
  • src/linux/universal/linux-3.4/mm/vmscan.c

    r19285 r19332  
    723723 
    724724        if (referenced_ptes) { 
    725                 if (PageAnon(page)) 
     725                if (PageSwapBacked(page)) 
    726726                        return PAGEREF_ACTIVATE; 
    727727                /* 
  • src/linux/universal/linux-3.4/net/ipv4/esp4.c

    r19285 r19332  
    460460        u32 blksize = ALIGN(crypto_aead_blocksize(esp->aead), 4); 
    461461        u32 align = max_t(u32, blksize, esp->padlen); 
    462         u32 rem; 
    463  
    464         mtu -= x->props.header_len + crypto_aead_authsize(esp->aead); 
    465         rem = mtu & (align - 1); 
    466         mtu &= ~(align - 1); 
     462        unsigned int net_adj; 
    467463 
    468464        switch (x->props.mode) { 
     465        case XFRM_MODE_TRANSPORT: 
     466        case XFRM_MODE_BEET: 
     467                net_adj = sizeof(struct iphdr); 
     468                break; 
    469469        case XFRM_MODE_TUNNEL: 
     470                net_adj = 0; 
    470471                break; 
    471472        default: 
    472         case XFRM_MODE_TRANSPORT: 
    473                 /* The worst case */ 
    474                 mtu -= blksize - 4; 
    475                 mtu += min_t(u32, blksize - 4, rem); 
    476                 break; 
    477         case XFRM_MODE_BEET: 
    478                 /* The worst case. */ 
    479                 mtu += min_t(u32, IPV4_BEET_PHMAXLEN, rem); 
    480                 break; 
    481         } 
    482  
    483         return mtu - 2; 
     473                BUG(); 
     474        } 
     475 
     476        return ((mtu - x->props.header_len - crypto_aead_authsize(esp->aead) - 
     477                 net_adj) & ~(align - 1)) + (net_adj - 2); 
    484478} 
    485479 
  • src/linux/universal/linux-3.4/net/ipv4/fib_semantics.c

    r19285 r19332  
    146146        struct fib_info *fi = container_of(head, struct fib_info, rcu); 
    147147 
     148        change_nexthops(fi) { 
     149                if (nexthop_nh->nh_dev) 
     150                        dev_put(nexthop_nh->nh_dev); 
     151        } endfor_nexthops(fi); 
     152 
     153        release_net(fi->fib_net); 
    148154        if (fi->fib_metrics != (u32 *) dst_default_metrics) 
    149155                kfree(fi->fib_metrics); 
     
    157163                return; 
    158164        } 
    159         change_nexthops(fi) { 
    160                 if (nexthop_nh->nh_dev) 
    161                         dev_put(nexthop_nh->nh_dev); 
    162                 nexthop_nh->nh_dev = NULL; 
    163         } endfor_nexthops(fi); 
    164165        fib_info_cnt--; 
    165         release_net(fi->fib_net); 
    166166        call_rcu(&fi->rcu, free_fib_info_rcu); 
    167167} 
  • src/linux/universal/linux-3.4/net/ipv6/esp6.c

    r19285 r19332  
    412412        u32 blksize = ALIGN(crypto_aead_blocksize(esp->aead), 4); 
    413413        u32 align = max_t(u32, blksize, esp->padlen); 
    414         u32 rem; 
    415  
    416         mtu -= x->props.header_len + crypto_aead_authsize(esp->aead); 
    417         rem = mtu & (align - 1); 
    418         mtu &= ~(align - 1); 
    419  
    420         if (x->props.mode != XFRM_MODE_TUNNEL) { 
    421                 u32 padsize = ((blksize - 1) & 7) + 1; 
    422                 mtu -= blksize - padsize; 
    423                 mtu += min_t(u32, blksize - padsize, rem); 
    424         } 
    425  
    426         return mtu - 2; 
     414        unsigned int net_adj; 
     415 
     416        if (x->props.mode != XFRM_MODE_TUNNEL) 
     417                net_adj = sizeof(struct ipv6hdr); 
     418        else 
     419                net_adj = 0; 
     420 
     421        return ((mtu - x->props.header_len - crypto_aead_authsize(esp->aead) - 
     422                 net_adj) & ~(align - 1)) + (net_adj - 2); 
    427423} 
    428424 
  • src/linux/universal/linux-3.4/net/ipv6/ip6_output.c

    r19285 r19332  
    11841184} 
    11851185 
     1186static void ip6_append_data_mtu(int *mtu, 
     1187                                int *maxfraglen, 
     1188                                unsigned int fragheaderlen, 
     1189                                struct sk_buff *skb, 
     1190                                struct rt6_info *rt) 
     1191{ 
     1192        if (!(rt->dst.flags & DST_XFRM_TUNNEL)) { 
     1193                if (skb == NULL) { 
     1194                        /* first fragment, reserve header_len */ 
     1195                        *mtu = *mtu - rt->dst.header_len; 
     1196 
     1197                } else { 
     1198                        /* 
     1199                         * this fragment is not first, the headers 
     1200                         * space is regarded as data space. 
     1201                         */ 
     1202                        *mtu = dst_mtu(rt->dst.path); 
     1203                } 
     1204                *maxfraglen = ((*mtu - fragheaderlen) & ~7) 
     1205                              + fragheaderlen - sizeof(struct frag_hdr); 
     1206        } 
     1207} 
     1208 
    11861209int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, 
    11871210        int offset, int len, int odd, struct sk_buff *skb), 
     
    11931216        struct ipv6_pinfo *np = inet6_sk(sk); 
    11941217        struct inet_cork *cork; 
    1195         struct sk_buff *skb; 
     1218        struct sk_buff *skb, *skb_prev = NULL; 
    11961219        unsigned int maxfraglen, fragheaderlen; 
    11971220        int exthdrlen; 
     
    12511274                np->cork.hop_limit = hlimit; 
    12521275                np->cork.tclass = tclass; 
    1253                 mtu = np->pmtudisc == IPV6_PMTUDISC_PROBE ? 
    1254                       rt->dst.dev->mtu : dst_mtu(&rt->dst); 
     1276                if (rt->dst.flags & DST_XFRM_TUNNEL) 
     1277                        mtu = np->pmtudisc == IPV6_PMTUDISC_PROBE ? 
     1278                              rt->dst.dev->mtu : dst_mtu(&rt->dst); 
     1279                else 
     1280                        mtu = np->pmtudisc == IPV6_PMTUDISC_PROBE ? 
     1281                              rt->dst.dev->mtu : dst_mtu(rt->dst.path); 
    12551282                if (np->frag_size < mtu) { 
    12561283                        if (np->frag_size) 
     
    13481375                        unsigned int fraggap; 
    13491376                        unsigned int alloclen; 
    1350                         struct sk_buff *skb_prev; 
    13511377alloc_new_skb: 
    1352                         skb_prev = skb; 
    1353  
    13541378                        /* There's no room in the current skb */ 
    1355                         if (skb_prev) 
    1356                                 fraggap = skb_prev->len - maxfraglen; 
     1379                        if (skb) 
     1380                                fraggap = skb->len - maxfraglen; 
    13571381                        else 
    13581382                                fraggap = 0; 
     1383                        /* update mtu and maxfraglen if necessary */ 
     1384                        if (skb == NULL || skb_prev == NULL) 
     1385                                ip6_append_data_mtu(&mtu, &maxfraglen, 
     1386                                                    fragheaderlen, skb, rt); 
     1387 
     1388                        skb_prev = skb; 
    13591389 
    13601390                        /* 
     
    13631393                         */ 
    13641394                        datalen = length + fraggap; 
     1395 
    13651396                        if (datalen > (cork->length <= mtu && !(cork->flags & IPCORK_ALLFRAG) ? mtu : maxfraglen) - fragheaderlen) 
    1366                                 datalen = maxfraglen - fragheaderlen; 
    1367  
    1368                         fraglen = datalen + fragheaderlen; 
     1397                                datalen = maxfraglen - fragheaderlen - rt->dst.trailer_len; 
    13691398                        if ((flags & MSG_MORE) && 
    13701399                            !(rt->dst.dev->features&NETIF_F_SG)) 
     
    13751404                        alloclen += dst_exthdrlen; 
    13761405 
    1377                         /* 
    1378                          * The last fragment gets additional space at tail. 
    1379                          * Note: we overallocate on fragments with MSG_MODE 
    1380                          * because we have no idea if we're the last one. 
    1381                          */ 
    1382                         if (datalen == length + fraggap) 
    1383                                 alloclen += rt->dst.trailer_len; 
     1406                        if (datalen != length + fraggap) { 
     1407                                /* 
     1408                                 * this is not the last fragment, the trailer 
     1409                                 * space is regarded as data space. 
     1410                                 */ 
     1411                                datalen += rt->dst.trailer_len; 
     1412                        } 
     1413 
     1414                        alloclen += rt->dst.trailer_len; 
     1415                        fraglen = datalen + fragheaderlen; 
    13841416 
    13851417                        /* 
  • src/linux/universal/linux-3.4/net/l2tp/l2tp_ip.c

    r19285 r19332  
    252252        struct inet_sock *inet = inet_sk(sk); 
    253253        struct sockaddr_l2tpip *addr = (struct sockaddr_l2tpip *) uaddr; 
    254         int ret = -EINVAL; 
     254        int ret; 
    255255        int chk_addr_ret; 
     256 
     257        if (!sock_flag(sk, SOCK_ZAPPED)) 
     258                return -EINVAL; 
     259        if (addr_len < sizeof(struct sockaddr_l2tpip)) 
     260                return -EINVAL; 
     261        if (addr->l2tp_family != AF_INET) 
     262                return -EINVAL; 
    256263 
    257264        ret = -EADDRINUSE; 
     
    285292        write_unlock_bh(&l2tp_ip_lock); 
    286293        ret = 0; 
     294        sock_reset_flag(sk, SOCK_ZAPPED); 
     295 
    287296out: 
    288297        release_sock(sk); 
     
    305314        int oif, rc; 
    306315 
    307         rc = -EINVAL; 
     316        if (sock_flag(sk, SOCK_ZAPPED)) /* Must bind first - autobinding does not work */ 
     317                return -EINVAL; 
     318 
    308319        if (addr_len < sizeof(*lsa)) 
    309                 goto out; 
    310  
    311         rc = -EAFNOSUPPORT; 
     320                return -EINVAL; 
     321 
    312322        if (lsa->l2tp_family != AF_INET) 
    313                 goto out; 
     323                return -EAFNOSUPPORT; 
    314324 
    315325        lock_sock(sk); 
     
    363373        release_sock(sk); 
    364374        return rc; 
     375} 
     376 
     377static int l2tp_ip_disconnect(struct sock *sk, int flags) 
     378{ 
     379        if (sock_flag(sk, SOCK_ZAPPED)) 
     380                return 0; 
     381 
     382        return udp_disconnect(sk, flags); 
    365383} 
    366384 
     
    600618        .bind              = l2tp_ip_bind, 
    601619        .connect           = l2tp_ip_connect, 
    602         .disconnect        = udp_disconnect, 
     620        .disconnect        = l2tp_ip_disconnect, 
    603621        .ioctl             = udp_ioctl, 
    604622        .destroy           = l2tp_ip_destroy_sock, 
  • src/linux/universal/linux-3.4/net/mac80211/util.c

    r19285 r19332  
    13221322        } 
    13231323 
     1324        /* add back keys */ 
     1325        list_for_each_entry(sdata, &local->interfaces, list) 
     1326                if (ieee80211_sdata_running(sdata)) 
     1327                        ieee80211_enable_keys(sdata); 
     1328 
     1329 wake_up: 
    13241330        /* 
    13251331         * Clear the WLAN_STA_BLOCK_BA flag so new aggregation 
     
    13431349        } 
    13441350 
    1345         /* add back keys */ 
    1346         list_for_each_entry(sdata, &local->interfaces, list) 
    1347                 if (ieee80211_sdata_running(sdata)) 
    1348                         ieee80211_enable_keys(sdata); 
    1349  
    1350  wake_up: 
    13511351        ieee80211_wake_queues_by_reason(hw, 
    13521352                        IEEE80211_QUEUE_STOP_REASON_SUSPEND); 
  • src/linux/universal/linux-3.4/net/sunrpc/clnt.c

    r19285 r19332  
    12891289 
    12901290        switch (status) { 
     1291        case -ENOMEM: 
     1292                rpc_delay(task, HZ >> 2); 
    12911293        case -EAGAIN:   /* woken up; retry */ 
    12921294                task->tk_action = call_reserve; 
  • src/linux/universal/linux-3.4/net/sunrpc/xprt.c

    r19285 r19332  
    985985        switch (PTR_ERR(req)) { 
    986986        case -ENOMEM: 
    987                 rpc_delay(task, HZ >> 2); 
    988987                dprintk("RPC:       dynamic allocation of request slot " 
    989988                                "failed! Retrying\n"); 
     989                task->tk_status = -ENOMEM; 
    990990                break; 
    991991        case -EAGAIN: 
    992992                rpc_sleep_on(&xprt->backlog, task, NULL); 
    993993                dprintk("RPC:       waiting for request slot\n"); 
    994         } 
    995         task->tk_status = -EAGAIN; 
     994        default: 
     995                task->tk_status = -EAGAIN; 
     996        } 
    996997        return; 
    997998out_init_req: 
  • src/linux/universal/linux-3.4/net/xfrm/xfrm_policy.c

    r19285 r19332  
    19201920ok: 
    19211921        xfrm_pols_put(pols, drop_pols); 
     1922        if (dst && dst->xfrm && 
     1923            dst->xfrm->props.mode == XFRM_MODE_TUNNEL) 
     1924                dst->flags |= DST_XFRM_TUNNEL; 
    19221925        return dst; 
    19231926 
  • src/linux/universal/linux-3.4/sound/usb/pcm.c

    r19285 r19332  
    699699        int count = 0, needs_knot = 0; 
    700700        int err; 
     701 
     702        kfree(subs->rate_list.list); 
     703        subs->rate_list.list = NULL; 
    701704 
    702705        list_for_each_entry(fp, &subs->fmt_list, list) { 
  • src/linux/universal/linux-3.4/tools/vm/page-types.c

    r19285 r19332  
    3636#include <sys/statfs.h> 
    3737#include "../../include/linux/magic.h" 
     38#include "../../include/linux/kernel-page-flags.h" 
    3839 
    3940 
     
    7374#define KPF_BYTES               8 
    7475#define PROC_KPAGEFLAGS         "/proc/kpageflags" 
    75  
    76 /* copied from kpageflags_read() */ 
    77 #define KPF_LOCKED              0 
    78 #define KPF_ERROR               1 
    79 #define KPF_REFERENCED          2 
    80 #define KPF_UPTODATE            3 
    81 #define KPF_DIRTY               4 
    82 #define KPF_LRU                 5 
    83 #define KPF_ACTIVE              6 
    84 #define KPF_SLAB                7 
    85 #define KPF_WRITEBACK           8 
    86 #define KPF_RECLAIM             9 
    87 #define KPF_BUDDY               10 
    88  
    89 /* [11-20] new additions in 2.6.31 */ 
    90 #define KPF_MMAP                11 
    91 #define KPF_ANON                12 
    92 #define KPF_SWAPCACHE           13 
    93 #define KPF_SWAPBACKED          14 
    94 #define KPF_COMPOUND_HEAD       15 
    95 #define KPF_COMPOUND_TAIL       16 
    96 #define KPF_HUGE                17 
    97 #define KPF_UNEVICTABLE         18 
    98 #define KPF_HWPOISON            19 
    99 #define KPF_NOPAGE              20 
    100 #define KPF_KSM                 21 
    101 #define KPF_THP                 22 
    10276 
    10377/* [32-] kernel hacking assistances */ 
Note: See TracChangeset for help on using the changeset viewer.