1. 17 Jan, 2013 7 commits
    • Gabor Juhos's avatar
      ath9k: ar9003: fix OTP register offsets for AR9340 · 46bea30a
      Gabor Juhos authored
      commit b3cd8021 upstream.
      
      Trying to access the OTP memory on the AR9340
      causes a data bus error like this:
      
        Data bus error, epc == 86e84164, ra == 86e84164
        Oops[#1]:
        Cpu 0
        $ 0   : 00000000 00000061 deadc0de 00000000
        $ 4   : b8115f18 00015f18 00000007 00000004
        $ 8   : 00000001 7c7c3c7c 7c7c7c7c 7c7c7c7c
        $12   : 7c7c3c7c 001f0041 00000000 7c7c7c3c
        $16   : 86ee0000 00015f18 00000000 00000007
        $20   : 00000004 00000064 00000004 86d71c44
        $24   : 00000000 86e6ca00
        $28   : 86d70000 86d71b20 86ece0c0 86e84164
        Hi    : 00000000
        Lo    : 00000064
        epc   : 86e84164 ath9k_hw_wait+0x58/0xb0 [ath9k_hw]
            Tainted: G           O
        ra    : 86e84164 ath9k_hw_wait+0x58/0xb0 [ath9k_hw]
        Status: 1100d403    KERNEL EXL IE
        Cause : 4080801c
        PrId  : 0001974c (MIPS 74Kc)
        Modules linked in: ath9k(O+) ath9k_common(O) ath9k_hw(O) ath(O) ar934x_nfc
        mac80211(O) usbcore usb_common scsi_mod nls_base nand nand_ecc nand_ids
        crc_ccitt cfg80211(O) compat(O) arc4 aes_generic crypto_blkcipher cryptomgr
        aead crypto_hash crypto_algapi ledtrig_timer ledtrig_default_on leds_gpio
        Process insmod (pid: 459, threadinfo=86d70000, task=87942140, tls=779ac440)
        Stack : 802fb500 000200da 804db150 804e0000 87816130 86ee0000 00010000 86d71b88
                86d71bc0 00000004 00000003 86e9fcd0 80305300 0002c0d0 86e74c50 800b4c20
                000003e8 00000001 00000000 86ee0000 000003ff 86e9fd64 80305300 80123938
                fffffffc 00000004 000058bc 00000000 86ea0000 86ee0000 000001ff 878d6000
                99999999 86e9fdc0 86ee0fcc 86e9e664 0000c0d0 86ee0000 0000700000007000
                ...
        Call Trace:
        [<86e84164>] ath9k_hw_wait+0x58/0xb0 [ath9k_hw]
        [<86e9fcd0>] ath9k_hw_setup_statusring+0x16b8/0x1c7c [ath9k_hw]
      
        Code: 0000a812  0040f809  00000000 <00531024> 1054000b  24020001  0c05b5dc  2404000a  26520001
      
      The cause of the error is that the OTP register
      offsets are different on the AR9340 than the
      actually used values.
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      46bea30a
    • Felix Fietkau's avatar
      Revert "ath9k_hw: Update AR9003 high_power tx gain table" · ae172f61
      Felix Fietkau authored
      commit 9c170e06 upstream.
      
      This reverts commit f74b9d36.
      
      Turns out reverting commit a240dc7b
      "ath9k_hw: Updated AR9003 tx gain table for 5GHz" was not enough to
      bring the tx power back to normal levels on devices like the
      Buffalo WZR-HP-G450H, this one needs to be reverted as well.
      
      This revert improves tx power by ~10 db on that device
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Cc: rmanohar@qca.qualcomm.com
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ae172f61
    • Laura Abbott's avatar
      mm: use aligned zone start for pfn_to_bitidx calculation · da0e14f0
      Laura Abbott authored
      commit c060f943 upstream.
      
      The current calculation in pfn_to_bitidx assumes that (pfn -
      zone->zone_start_pfn) >> pageblock_order will return the same bit for
      all pfn in a pageblock.  If zone_start_pfn is not aligned to
      pageblock_nr_pages, this may not always be correct.
      
      Consider the following with pageblock order = 10, zone start 2MB:
      
        pfn     | pfn - zone start | (pfn - zone start) >> page block order
        ----------------------------------------------------------------
        0x26000 | 0x25e00	   |  0x97
        0x26100 | 0x25f00	   |  0x97
        0x26200 | 0x26000	   |  0x98
        0x26300 | 0x26100	   |  0x98
      
      This means that calling {get,set}_pageblock_migratetype on a single page
      will not set the migratetype for the full block.  Fix this by rounding
      down zone_start_pfn when doing the bitidx calculation.
      
      For our use case, the effects of this bug were mostly tied to the fact
      that CMA allocations would either take a long time or fail to happen.
      Depending on the driver using CMA, this could result in anything from
      visual glitches to application failures.
      Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
      Acked-by: default avatarMel Gorman <mgorman@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      da0e14f0
    • Jason Liu's avatar
      mm: compaction: fix echo 1 > compact_memory return error issue · 63c54425
      Jason Liu authored
      commit 7964c06d upstream.
      
      when run the folloing command under shell, it will return error
      
        sh/$ echo 1 > /proc/sys/vm/compact_memory
        sh/$ sh: write error: Bad address
      
      After strace, I found the following log:
      
        ...
        write(1, "1\n", 2)               = 3
        write(1, "", 4294967295)         = -1 EFAULT (Bad address)
        write(2, "echo: write error: Bad address\n", 31echo: write error: Bad address
        ) = 31
      
      This tells system return 3(COMPACT_COMPLETE) after write data to
      compact_memory.
      
      The fix is to make the system just return 0 instead 3(COMPACT_COMPLETE)
      from sysctl_compaction_handler after compaction_nodes finished.
      Signed-off-by: default avatarJason Liu <r64343@freescale.com>
      Suggested-by: default avatarDavid Rientjes <rientjes@google.com>
      Acked-by: default avatarMel Gorman <mgorman@suse.de>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      63c54425
    • Sebastian Ott's avatar
      s390/cio: fix pgid reserved check · 2c77bb37
      Sebastian Ott authored
      commit d99e79ec upstream.
      
      The check to whom a device is reserved is done by checking the path
      state of the affected channel paths. If it turns out that one path is
      flagged as reserved by someone else the whole device is marked as such.
      
      However the meaning of the RESVD_ELSE bit is that the addressed device
      is reserved to a different pathgroup (and not reserved to a different
      LPAR). If we do this test on a path which is currently not a member of
      the pathgroup we could erroneously mark the device as reserved to
      someone else.
      
      To fix this collect the reserved state for all potential members of the
      pathgroup and only mark the device as reserved if all of those potential
      members have the RESVD_ELSE bit set.
      Acked-by: default avatarPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
      Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2c77bb37
    • Shan Hai's avatar
      powerpc/vdso: Remove redundant locking in update_vsyscall_tz() · aea63e00
      Shan Hai authored
      commit ce73ec6d upstream.
      
      The locking in update_vsyscall_tz() is not only unnecessary because the vdso
      code copies the data unproteced in __kernel_gettimeofday() but also
      introduces a hard to reproduce race condition between update_vsyscall()
      and update_vsyscall_tz(), which causes user space process to loop
      forever in vdso code.
      
      The following patch removes the locking from update_vsyscall_tz().
      
      Locking is not only unnecessary because the vdso code copies the data
      unprotected in __kernel_gettimeofday() but also erroneous because updating
      the tb_update_count is not atomic and introduces a hard to reproduce race
      condition between update_vsyscall() and update_vsyscall_tz(), which further
      causes user space process to loop forever in vdso code.
      
      The below scenario describes the race condition,
      x==0	Boot CPU			other CPU
      	proc_P: x==0
      	    timer interrupt
      		update_vsyscall
      x==1		    x++;sync		settimeofday
      					    update_vsyscall_tz
      x==2						x++;sync
      x==3		    sync;x++
      						sync;x++
      	proc_P: x==3 (loops until x becomes even)
      
      Because the ++ operator would be implemented as three instructions and not
      atomic on powerpc.
      
      A similar change was made for x86 in commit 6c260d58
      ("x86: vdso: Remove bogus locking in update_vsyscall_tz")
      Signed-off-by: default avatarShan Hai <shan.hai@windriver.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aea63e00
    • Anton Blanchard's avatar
      powerpc: Fix CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n build · dc22f2dc
      Anton Blanchard authored
      commit 11ee7e99 upstream.
      
      If we build a kernel with CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n,
      the kernel fails when we run at a non zero offset. It turns out
      we were incorrectly wrapping some of the relocatable kernel code
      with CONFIG_CRASH_DUMP.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dc22f2dc
  2. 11 Jan, 2013 33 commits