1. 25 Oct, 2011 2 commits
    • Matt Burtch's avatar
      ARM: i.MX28: shift frac value in _CLK_SET_RATE · 590842f9
      Matt Burtch authored
      Noticed when setting SSP0 in clk_set_rate, _CLK_SET_RATE attempts to
      reset the clock divider for the SSP0 parent clock, in this case
      IO0FRAC. Bits 24-29 of HW_CLKCTRL_FRAC0 are cleared correctly, but
      when the new frac value is written the value isn't shifted up to write
      the correct bit-field.  This results in IO0FRAC being set to 0 and
      CPUFRAC being corrupted.
      
      This should occur when writing IO1FRAC, EMIFRAC in HW_CLKCTRL_FRAC0
      and GPMIFRAC, HSADCFRAC in HW_CLKCTRL_FRAC1.
      
      Tested on custom i.MX28 board with SSP0 SPI driver.
      Signed-off-by: default avatarMatt Burtch <matt@grid-net.com>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      590842f9
    • Paul Fertser's avatar
      plat-mxc: iomux-v3.h: implicitly enable pull-up/down when that's desired · 6571534b
      Paul Fertser authored
      To configure pads during the initialisation a set of special constants
      is used, e.g.
      #define MX25_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x3c4, 0x1cc, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_22K_UP)
      
      The problem is that no pull-up/down is getting activated unless both
      PAD_CTL_PUE (pull-up enable) and PAD_CTL_PKE (pull/keeper module
      enable) set. This is clearly stated in the i.MX25 datasheet and is
      confirmed by the measurements on hardware. This leads to some rather
      hard to understand bugs such as misdetecting an absent ethernet PHY (a
      real bug i had), unstable data transfer etc. This might affect mx25,
      mx35, mx50, mx51 and mx53 SoCs.
      
      It's reasonable to expect that if the pullup value is specified, the
      intention was to have it actually active, so we implicitly add the
      needed bits.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarPaul Fertser <fercerpav@gmail.com>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      6571534b
  2. 19 Sep, 2011 1 commit
  3. 27 Aug, 2011 1 commit
    • Arnaud Patard (Rtp)'s avatar
      MX5: fix clock usage · ce95d709
      Arnaud Patard (Rtp) authored
      While suspending, we're enabling a clock in ->suspend() but we're in atomic
      context, leading to this :
      
      [30803.667305] PM: late suspend of devices complete after 1.237 msecs
      [30803.667449] BUG: sleeping function called from invalid context at kernel/mutex.c:271
      [30803.667464] in_atomic(): 0, irqs_disabled(): 128, pid: 4941, name: pm-suspend
      [30803.667474] INFO: lockdep is turned off.
      [30803.667483] irq event stamp: 0
      [30803.667489] hardirqs last  enabled at (0): [<  (null)>]   (null)
      [30803.667503] hardirqs last disabled at (0): [<c001e4a8>] copy_process.part.48+0x1e0/0xa7c
      [30803.667543] softirqs last  enabled at (0): [<c001e4a8>] copy_process.part.48+0x1e0/0xa7c
      [30803.667562] softirqs last disabled at (0): [<  (null)>]   (null)
      [30803.667574] Backtrace:
      [30803.667611] [<c0010e00>] (dump_backtrace+0x0/0x110) from [<c0424c00>] (dump_stack+0x18/0x1c)
      [30803.667624]  r6:00000000 r5:00000000 r4:d9648000 r3:d9648000
      [30803.667652] [<c0424be8>] (dump_stack+0x0/0x1c) from [<c0424eec>] (__might_sleep.part.101+0x90/0xa8)
      [30803.667673] [<c0424e5c>] (__might_sleep.part.101+0x0/0xa8) from [<c001a5c4>] (__might_sleep+0x80/0x94)
      [30803.667686]  r4:c05d58c0
      [30803.667705] [<c001a544>] (__might_sleep+0x0/0x94) from [<c043230c>] (mutex_lock_nested+0x2c/0x30c)
      [30803.667735] [<c04322e0>] (mutex_lock_nested+0x0/0x30c) from [<c0017834>] (clk_enable+0x28/0x50)
      [30803.667747]  r8:c0438464 r7:00000003 r6:00000000 r5:00000000 r4:c05d2e98
      [30803.667780] [<c001780c>] (clk_enable+0x0/0x50) from [<c0017260>] (mx5_suspend_enter+0x1c/0x98)
      [30803.667792]  r4:00000003 r3:c060dfe0
      [30803.667821] [<c0017244>] (mx5_suspend_enter+0x0/0x98) from [<c0059b48>] (suspend_enter+0xec/0x15c)
      [30803.667833]  r4:00000003 r3:c0017244
      [30803.667856] [<c0059a5c>] (suspend_enter+0x0/0x15c) from [<c0059c4c>] (suspend_devices_and_enter+0x94/0x130)
      [30803.667868]  r6:00000000 r5:00000003 r4:c0c0af00 r3:00002710
      [30803.667897] [<c0059bb8>] (suspend_devices_and_enter+0x0/0x130) from [<c0059db0>] (enter_state+0xc8/0x130)
      [30803.667909]  r6:00000000 r5:00000003 r4:c05286e4
      [30803.667934] [<c0059ce8>] (enter_state+0x0/0x130) from [<c00592d4>] (state_store+0xac/0xc0)
      [30803.667945]  r6:00000003 r5:00000003 r4:df39d000 r3:00000003
      [30803.667978] [<c0059228>] (state_store+0x0/0xc0) from [<c01b0100>] (kobj_attr_store+0x1c/0x28)
      [30803.668009] [<c01b00e4>] (kobj_attr_store+0x0/0x28) from [<c00e435c>] (sysfs_write_file+0x88/0xbc)
      [30803.668032] [<c00e42d4>] (sysfs_write_file+0x0/0xbc) from [<c0091fa0>] (vfs_write+0xbc/0x138)
      [30803.668051] [<c0091ee4>] (vfs_write+0x0/0x138) from [<c0092204>] (sys_write+0x44/0x70)
      [30803.668062]  r8:00000000 r7:00000004 r6:00000003 r5:002694d0 r4:d966acc0
      [30803.668094] [<c00921c0>] (sys_write+0x0/0x70) from [<c000db00>] (ret_fast_syscall+0x0/0x3c)
      [30803.668106]  r9:d9648000 r8:c000dcc4 r6:00000001 r5:002694d0 r4:00000003
      [30803.669927] PM: early resume of devices complete after 0.972 msecs
      
      Just move the clk_enable/disable in ->prepare() and ->finish()
      Signed-off-by: default avatarArnaud Patard <arnaud.patard@rtp-net.org>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      ce95d709
  4. 22 Aug, 2011 6 commits
  5. 21 Aug, 2011 4 commits
  6. 20 Aug, 2011 4 commits
  7. 19 Aug, 2011 15 commits
    • Jiaying Zhang's avatar
      ext4: flush any pending end_io requests before DIO reads w/dioread_nolock · dccaf33f
      Jiaying Zhang authored
      There is a race between ext4 buffer write and direct_IO read with
      dioread_nolock mount option enabled. The problem is that we clear
      PageWriteback flag during end_io time but will do
      uninitialized-to-initialized extent conversion later with dioread_nolock.
      If an O_direct read request comes in during this period, ext4 will return
      zero instead of the recently written data.
      
      This patch checks whether there are any pending uninitialized-to-initialized
      extent conversion requests before doing O_direct read to close the race.
      Note that this is just a bandaid fix. The fundamental issue is that we
      clear PageWriteback flag before we really complete an IO, which is
      problem-prone. To fix the fundamental issue, we may need to implement an
      extent tree cache that we can use to look up pending to-be-converted extents.
      Signed-off-by: default avatarJiaying Zhang <jiayingz@google.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@kernel.org
      dccaf33f
    • Jesse Barnes's avatar
      drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge · b095cd0a
      Jesse Barnes authored
      Prior to Ivybridge, the GFX_MODE would default to 0x800, meaning that
      MI_FLUSH would flush the TLBs in addition to the rest of the caches
      indicated in the MI_FLUSH command.  However starting with Ivybridge, the
      register defaults to 0x2800 out of reset, meaning that to invalidate the
      TLB we need to use PIPE_CONTROL.  Since we're not doing that yet, go
      back to the old default so things work.
      
      v2: don't forget to actually *clear* the new bit
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Tested-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      b095cd0a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 5ccc3874
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.dk/linux-block: (23 commits)
        Revert "cfq: Remove special treatment for metadata rqs."
        block: fix flush machinery for stacking drivers with differring flush flags
        block: improve rq_affinity placement
        blktrace: add FLUSH/FUA support
        Move some REQ flags to the common bio/request area
        allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH
        xen/blkback: Make description more obvious.
        cfq-iosched: Add documentation about idling
        block: Make rq_affinity = 1 work as expected
        block: swim3: fix unterminated of_device_id table
        block/genhd.c: remove useless cast in diskstats_show()
        drivers/cdrom/cdrom.c: relax check on dvd manufacturer value
        drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse
        bsg-lib: add module.h include
        cfq-iosched: Reduce linked group count upon group destruction
        blk-throttle: correctly determine sync bio
        loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other
        loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices
        loop: add management interface for on-demand device allocation
        loop: replace linked list of allocated devices with an idr index
        ...
      5ccc3874
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · 0c3bef61
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
        PCI: OF: Don't crash when bridge parent is NULL.
        PCI: export pcie_bus_configure_settings symbol
        PCI: code and comments cleanup
        PCI: make cardbus-bridge resources optional
        PCI: make SRIOV resources optional
        PCI : ability to relocate assigned pci-resources
        PCI: honor child buses add_size in hot plug configuration
        PCI: Set PCI-E Max Payload Size on fabric
      0c3bef61
    • David Daney's avatar
      PCI: OF: Don't crash when bridge parent is NULL. · 69566dd8
      David Daney authored
      In pcibios_get_phb_of_node(), we will crash while booting if
      bus->bridge->parent is NULL.
      
      Check for this case and avoid dereferencing the NULL pointer.
      Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      69566dd8
    • Jens Axboe's avatar
      Revert "cfq: Remove special treatment for metadata rqs." · b53d1ed7
      Jens Axboe authored
      We have a kernel build regression since 3.1-rc1, which is about 10%
      regression. The kernel source is in an ext3 filesystem.
      Alex Shi bisect it to commit:
      commit a07405b7
      Author: Justin TerAvest <teravest@google.com>
      Date:   Sun Jul 10 22:09:19 2011 +0200
      
          cfq: Remove special treatment for metadata rqs.
      
      Apparently this is caused by lack metadata preemption, where ext3/ext4
      do use READ_META. I didn't see a way to fix the issue, so suggest
      reverting the patch.
      
      This reverts commit a07405b7.
      
      Reported-by: Alex Shi<alex.shi@intel.com>
      Reported-by: Shaohua Li<shaohua.li@intel.com>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      b53d1ed7
    • Takashi Iwai's avatar
      ALSA: usb-audio - Fix missing mixer dB information · 38b65190
      Takashi Iwai authored
      The recent fix for testing dB range at the mixer creation time seems
      to cause regressions in some devices.  In such devices, reading the dB
      info at probing time gives an error, thus both dBmin and dBmax are still
      zero, and TLV flag isn't set although the later read of dB info succeeds.
      
      This patch adds a workaround for such a case by assuming that the later
      read will succeed.  In future, a similar test should be performed in a
      case where a wrong dB range is seen even in the later read.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Cc: <stable@kernel.org>
      38b65190
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 01b88335
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: fix array bounds error setting up PCIC NMI trap
      01b88335
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 2c4ac99f
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        drivers/ata/sata_dwc_460ex.c: add missing kfree
        ata: Add iMX pata support
        pata_via: disable ATAPI DMA on AVERATEC 3200
        [libata] sata_sil: fix used-uninit warning
      2c4ac99f
    • Linus Torvalds's avatar
      Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 35a21b42
      Linus Torvalds authored
      * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4.1: Return NFS4ERR_BADSESSION to callbacks during session resets
        NFSv4.1: Fix the callback 'highest_used_slotid' behaviour
        pnfs-obj: Fix the comp_index != 0 case
        pnfs-obj: Bug when we are running out of bio
        nfs: add missing prefetch.h include
      35a21b42
    • Ian Campbell's avatar
      sparc: fix array bounds error setting up PCIC NMI trap · 4a0342ca
      Ian Campbell authored
        CC      arch/sparc/kernel/pcic.o
      arch/sparc/kernel/pcic.c: In function 'pcic_probe':
      arch/sparc/kernel/pcic.c:359:33: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:359:8: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:360:33: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:360:8: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:361:33: error: array subscript is above array bounds [-Werror=array-bounds]
      arch/sparc/kernel/pcic.c:361:8: error: array subscript is above array bounds [-Werror=array-bounds]
      cc1: all warnings being treated as errors
      
      I'm not particularly familiar with sparc but t_nmi (defined in head_32.S via
      the TRAP_ENTRY macro) and pcic_nmi_trap_patch (defined in entry.S) both appear
      to be 4 instructions long and I presume from the usage that instructions are
      int sized.
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a0342ca
    • Julia Lawall's avatar
      drivers/ata/sata_dwc_460ex.c: add missing kfree · a081da63
      Julia Lawall authored
      Currently, error handling code in this function calls the function
      sata_dwc_port_stop, but this function has essentially no effect if hsdevp
      has not been stored in ap, which is the case throughout this function.  The
      only effect is to print a debugging message including ap->print_id.
      
      The code is rewritten to not call sata_dwc_port_stop, but instead to jump
      to a local label that prints the original error message and the print_id
      information.  In the case where hsdevp has been already allocated (but not
      yet stored in ap), this value is freed as well.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @exists@
      local idexpression x;
      statement S,S1;
      expression E;
      identifier fl;
      expression *ptr != NULL;
      @@
      
      x = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...kfree(x)...+> }
           when any
           when != true x == NULL
      x->fl
      ...>
      (
      if (x == NULL) S1
      |
      if (...) { ... when != x
                     when forall
      (
       return \(0\|<+...x...+>\|ptr\);
      |
      * return ...;
      )
      }
      )
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
      a081da63
    • Arnaud Patard (Rtp)'s avatar
      ata: Add iMX pata support · e39c75cf
      Arnaud Patard (Rtp) authored
      Add basic support for pata on iMX. It has been tested only on imx51.
      SDMA support will probably be added later so this version supports only
      PIO.
      
      v2:
        - enable only when needed IORDY
        - use dev_get_drvdata
      v3:
        - add missing clk_put() calls
        - use platform_get_irq()
        - fix resume code to avoid disabling IORDY on resume
      v4:
        - Remove EXPERIMENTAL and switch to depends on ARCH_MXC
        - Use devm_kzalloc()
        - make clock a must-have
        - Use only 1 ioremap
      Signed-off-by: default avatarArnaud Patard <arnaud.patard@rtp-net.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      e39c75cf
    • Tejun Heo's avatar
      pata_via: disable ATAPI DMA on AVERATEC 3200 · 6d0e194d
      Tejun Heo authored
      On AVERATEC 3200, pata_via causes memory corruption with ATAPI DMA,
      which often leads to random kernel oops.  The cause of the problem is
      not well understood yet and only small subset of machines using the
      controller seem affected.  Blacklist ATAPI DMA on the machine.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11426Reported-and-tested-by: default avatarJim Bray <jimsantelmo@gmail.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
      6d0e194d
    • Jeff Garzik's avatar
      [libata] sata_sil: fix used-uninit warning · ebd1699e
      Jeff Garzik authored
      Init 'serror' to silence the following warning:
      
      drivers/ata/sata_sil.c: In function ‘sil_interrupt’:
      drivers/ata/sata_sil.c:453:14: warning: ‘serror’ may be used uninitialized in
      this function [-Wuninitialized]
      
      This is not a 'can never happen' but is nonetheless extremely unlikely.
      The easiest and cleanest warning fix is simply to init the var,
      rather than worry about marking the var uninit-ok.
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      ebd1699e
  8. 18 Aug, 2011 7 commits