1. 01 9月, 2013 4 次提交
  2. 31 8月, 2013 7 次提交
  3. 30 8月, 2013 11 次提交
  4. 29 8月, 2013 12 次提交
    • A
      spi: Use dev_get_drvdata at appropriate places · a1216394
      Axel Lin 提交于
      Use dev_get_drvdata() instead of platform_get_drvdata(to_platform_device(dev)).
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      a1216394
    • J
      spi: use dev_get_platdata() · 8074cf06
      Jingoo Han 提交于
      Use the wrapper function for retrieving the platform data instead of
      accessing dev->platform_data directly.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      8074cf06
    • A
      spi: nuc900: Fix mode_bits setting · 044d0bb6
      Axel Lin 提交于
      The code in nuc900_slave_select() supports handling SPI_CS_HIGH.
      Thus set SPI_CS_HIGH bit in master->mode_bits to make it work.
      Otherwise, spi_setup() will return unsupported mode bits error message if
      SPI_CS_HIGH is set in the mode field of struct spi_device.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      044d0bb6
    • J
      spi: simplify devm_request_mem_region/devm_ioremap · b3136f8f
      Julia Lawall 提交于
      Convert the composition of devm_request_mem_region and devm_ioremap to a
      single call to devm_ioremap_resource.  The associated call to
      platform_get_resource is also simplified and moved next to the new call to
      devm_ioremap_resource.
      
      This was done using a combination of the semantic patches
      devm_ioremap_resource.cocci and devm_request_and_ioremap.cocci, found in
      the scripts/coccinelle/api directory.
      
      This patch also removes the label exit_busy, to use the error code returned
      by the failing operation, rather than always -EBUSY.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      b3136f8f
    • L
      regmap: rbtree: Make cache_present bitmap per node · 3f4ff561
      Lars-Peter Clausen 提交于
      With devices which have a dense and small register map but placed at a large
      offset the global cache_present bitmap imposes a huge memory overhead. Making
      the cache_present per rbtree node avoids the issue and easily reduces the memory
      footprint by a factor of ten. For devices with a more sparse map or without a
      large base register offset the memory usage might increase slightly by a few
      bytes, but not significantly. E.g. for a device which has ~50 registers at
      offset 0x4000 the memory footprint of the register cache goes down form 2496
      bytes to 175 bytes.
      
      Moving the bitmap to a per node basis means that the handling of the bitmap is
      now cache implementation specific and can no longer be managed by the core. The
      regcache_sync_block() function is extended by a additional parameter so that the
      cache implementation can tell the core which registers in the block are set and
      which are not. The parameter is optional and if NULL the core assumes that all
      registers are set. The rbtree cache also needs to implement its own drop
      callback instead of relying on the core to handle this.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      3f4ff561
    • L
      regmap: rbtree: Reduce number of nodes, take 2 · 472fdec7
      Lars-Peter Clausen 提交于
      Support for reducing the number of nodes and memory consumption of the rbtree
      cache by allowing for small unused holes in the node's register cache block was
      initially added in commit 0c7ed856 ("regmap: Cut down on the average # of nodes
      in the rbtree cache"). But the commit had problems and so its effect was
      reverted again in commit 4e67fb5f ("regmap: rbtree: Fix overlapping rbnodes.").
      This patch brings the feature back of reducing the average number of nodes,
      which will speedup node look-up, while at the same time also reducing the memory
      usage of the rbtree cache. This patch takes a slightly different approach than
      the original patch though. It modifies the adjacent node look-up to not only
      consider nodes that are just one to the left or the right of the register but
      any node that falls in a certain range around the register. The range is
      calculated based on how much memory it would take to allocate a new node
      compared to how much memory it takes adding a set of unused registers to an
      existing node. E.g. if a node takes up 24 bytes and each register in a block
      uses 1 byte the range will be from the register address - 24 to the register
      address + 24. If we find a node that falls within this range it is cheaper or as
      expensive to add the register to the existing node and have a couple of unused
      registers in the node's cache compared to allocating a new node.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      472fdec7
    • L
      regmap: rbtree: Simplify adjacent node look-up · 194c753a
      Lars-Peter Clausen 提交于
      A register which is adjacent to a node will either be left to the first
      register or right to the last register. It will not be within the node's range,
      so there is no point in checking for each register cached by the node whether
      the new register is next to it. It is sufficient to check whether the register
      comes before the first register or after the last register of the node.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      194c753a
    • R
      drivers/base/memory.c: fix show_mem_removable() to handle missing sections · 21ea9f5a
      Russ Anderson 提交于
      "cat /sys/devices/system/memory/memory*/removable" crashed the system.
      
      The problem is that show_mem_removable() is passing a
      bad pfn to is_mem_section_removable(), which causes
      
          if (!node_online(page_to_nid(page)))
      
      to blow up.  Why is it passing in a bad pfn?
      
      The reason is that show_mem_removable() will loop sections_per_block
      times.  sections_per_block is 16, but mem->section_count is 8,
      indicating holes in this memory block.  Checking that the memory section
      is present before checking to see if the memory section is removable
      fixes the problem.
      
         harp5-sys:~ # cat /sys/devices/system/memory/memory*/removable
         0
         1
         1
         1
         1
         1
         1
         1
         1
         1
         1
         1
         1
         1
         BUG: unable to handle kernel paging request at ffffea00c3200000
         IP: [<ffffffff81117ed1>] is_pageblock_removable_nolock+0x1/0x90
         PGD 83ffd4067 PUD 37bdfce067 PMD 0
         Oops: 0000 [#1] SMP
         Modules linked in: autofs4 binfmt_misc rdma_ucm rdma_cm iw_cm ib_addr ib_srp scsi_transport_srp scsi_tgt ib_ipoib ib_cm ib_uverbs ib_umad iw_cxgb3 cxgb3 mdio mlx4_en mlx4_ib ib_sa mlx4_core ib_mthca ib_mad ib_core fuse nls_iso8859_1 nls_cp437 vfat fat joydev loop hid_generic usbhid hid hwperf(O) numatools(O) dm_mod iTCO_wdt ipv6 iTCO_vendor_support igb i2c_i801 ioatdma i2c_algo_bit ehci_pci pcspkr lpc_ich i2c_core ehci_hcd ptp sg mfd_core dca rtc_cmos pps_core mperf button xhci_hcd sd_mod crc_t10dif usbcore usb_common scsi_dh_emc scsi_dh_hp_sw scsi_dh_alua scsi_dh_rdac scsi_dh gru(O) xvma(O) xfs crc32c libcrc32c thermal sata_nv processor piix mptsas mptscsih scsi_transport_sas mptbase megaraid_sas fan thermal_sys hwmon ext3 jbd ata_piix ahci libahci libata scsi_mod
         CPU: 4 PID: 5991 Comm: cat Tainted: G           O 3.11.0-rc5-rja-uv+ #10
         Hardware name: SGI UV2000/ROMLEY, BIOS SGI UV 2000/3000 series BIOS 01/15/2013
         task: ffff88081f034580 ti: ffff880820022000 task.ti: ffff880820022000
         RIP: 0010:[<ffffffff81117ed1>]  [<ffffffff81117ed1>] is_pageblock_removable_nolock+0x1/0x90
         RSP: 0018:ffff880820023df8  EFLAGS: 00010287
         RAX: 0000000000040000 RBX: ffffea00c3200000 RCX: 0000000000000004
         RDX: ffffea00c30b0000 RSI: 00000000001c0000 RDI: ffffea00c3200000
         RBP: ffff880820023e38 R08: 0000000000000000 R09: 0000000000000001
         R10: 0000000000000000 R11: 0000000000000001 R12: ffffea00c33c0000
         R13: 0000160000000000 R14: 6db6db6db6db6db7 R15: 0000000000000001
         FS:  00007ffff7fb2700(0000) GS:ffff88083fc80000(0000) knlGS:0000000000000000
         CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
         CR2: ffffea00c3200000 CR3: 000000081b954000 CR4: 00000000000407e0
         Call Trace:
           show_mem_removable+0x41/0x70
           dev_attr_show+0x2a/0x60
           sysfs_read_file+0xf7/0x1c0
           vfs_read+0xc8/0x130
           SyS_read+0x5d/0xa0
           system_call_fastpath+0x16/0x1b
      Signed-off-by: NRuss Anderson <rja@sgi.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Reviewed-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      21ea9f5a
    • L
      net: xilinx: fix memleak · 282a1dff
      Libo Chen 提交于
      decrease device_node refcount np1 in err case.
      Signed-off-by: NLibo Chen <libo.chen@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      282a1dff
    • R
      net: usb: Add HP hs2434 device to ZLP exception table · 03803a59
      Rob Gardner 提交于
      This patch adds another entry (HP hs2434 Mobile Broadband) to the list
      of exceptional devices that require a zero length packet in order to
      function properly. This list was added in commit 844e88f0. The hs2434
      is manufactured by Sierra Wireless, who also produces the MC7710,
      which the ZLP exception list was created for in the first place. So
      hopefully it is just this one producer's devices that will need this
      workaround.
      
      Tested on a DM1-4310NR HP notebook, which does not function without this
      change.
      Signed-off-by: NRob Gardner <robmatic@gmail.com>
      Acked-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      03803a59
    • B
      net: stmmac: fixed the pbl setting with DT · 64c3b252
      Byungho An 提交于
      This patch fixed the pbl(programmable burst length) setting
      using DT. Even though the default pbl is 8, If there is no
      pbl property in device tree file, pbl is set 0 and it causes
      bandwidth degradation.
      Signed-off-by: NByungho An <bh74.an@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64c3b252
    • L
      regmap: debugfs: Fix continued read from registers file · 26ee4741
      Lars-Peter Clausen 提交于
      The regmap_debugfs_get_dump_start() function maps from a file offset to the
      register that can be found at that position in the file. This is done using a
      look-up table. Commit d6814a7d ("regmap: debugfs: Suppress cache for partial
      register files") added a check to bypass the look-up table for partial register
      files, since the offsets in that table are only correct for the full register
      file. The check incorrectly uses the file offset instead of the register base
      address and returns it. This will cause the file offset to be interpreted as a
      register address which will result in a incorrect output from the registers file
      for all reads except at position 0.
      
      The issue can easily be reproduced by doing small reads the registers file, e.g.
      `dd if=registers bs=10 count=5`.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org
      26ee4741
  5. 28 8月, 2013 6 次提交