1. 02 9月, 2014 2 次提交
    • M
      i2c: at91: add bound checking on SMBus block length bytes · 75b81f33
      Marek Roszko 提交于
      The driver was not bound checking the received length byte to ensure it was within the
      the buffer size that is allocated for SMBus blocks. This resulted in buffer overflows
      whenever an invalid length byte was received.
      It also failed to ensure the length byte was not zero. If it received zero, it would end up
      in an infinite loop as the at91_twi_read_next_byte function returned immediately without
      allowing RHR to be read to clear the RXRDY interrupt.
      
      Tested agaisnt a SMBus compliant battery.
      Signed-off-by: NMarek Roszko <mark.roszko@gmail.com>
      Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      75b81f33
    • S
      i2c: at91: Fix a race condition during signal handling in at91_do_twi_xfer. · 6721f28a
      Simon Lindgren 提交于
      There is a race condition in at91_do_twi_xfer when signals arrive.
      If a signal is recieved while waiting for a transfer to complete
      wait_for_completion_interruptible_timeout() will return -ERESTARTSYS.
      This is not handled correctly resulting in interrupts still being
      enabled and a transfer being in flight when we return.
      
      Symptoms include a range of oopses and bus lockups. Oopses can happen
      when the transfer completes because the interrupt handler will corrupt
      the stack. If a new transfer is started before the interrupt fires
      the controller will start a new transfer in the middle of the old one,
      resulting in confused slaves and a locked bus.
      
      To avoid this, use wait_for_completion_io_timeout instead so that we
      don't have to deal with gracefully shutting down the transfer and
      disabling the interrupts.
      Signed-off-by: NSimon Lindgren <simon@aqwary.com>
      Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      6721f28a
  2. 02 8月, 2014 1 次提交
  3. 17 7月, 2014 1 次提交
    • W
      i2c: i2c-at91: Drop class based scanning to improve bootup time · b850579a
      Wolfram Sang 提交于
      This driver has been flagged to drop class based instantiation. The removal
      improves boot-up time and is unneeded for embedded controllers. Users have been
      warned to switch for some time now, so we can actually do the removal. Keep the
      DEPRECATED flag, so the core can inform users that the behaviour finally
      changed now. After another transition period, this flag can go, too.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      b850579a
  4. 12 3月, 2014 1 次提交
  5. 06 3月, 2014 1 次提交
  6. 16 1月, 2014 1 次提交
  7. 15 11月, 2013 1 次提交
  8. 23 8月, 2013 1 次提交
    • W
      i2c: move OF helpers into the core · 687b81d0
      Wolfram Sang 提交于
      I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
      that it is much cleaner to have this in the core. This also removes a
      circular dependency between the helpers and the core, and so we can
      finally register child nodes in the core instead of doing this manually
      in each driver. So, fix the drivers and documentation, too.
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      687b81d0
  9. 16 4月, 2013 1 次提交
  10. 02 4月, 2013 1 次提交
  11. 29 3月, 2013 1 次提交
  12. 11 2月, 2013 1 次提交
  13. 28 1月, 2013 1 次提交
  14. 25 1月, 2013 1 次提交
  15. 23 12月, 2012 1 次提交
  16. 25 11月, 2012 3 次提交
  17. 14 11月, 2012 2 次提交
  18. 12 9月, 2012 3 次提交
  19. 12 7月, 2012 1 次提交
  20. 13 1月, 2012 1 次提交
  21. 22 5月, 2010 1 次提交
  22. 17 6月, 2009 1 次提交
    • L
      i2c: Use resource_size macro · c6ffddea
      Linus Walleij 提交于
      This replace all instances in the i2c busses tree of
      res->end - res->start + 1 with the handy macro resource_size(res)
      from ioport.h (coming in from platform_device.h).
      
      This was created with a simple
      sed -i -e 's/\([a-z]*\)->end *- *[a-z]*->start *+ *1/resource_size(\1)/g'
      
      Then manually replacing the PXA redefiniton of the same kind
      of macro manually. Recompiled some ARM defconfigs I could find to
      make a rough test so it shouldn't break anything, though I
      couldn't see exactly which configs you need for all the drivers.
      Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      c6ffddea
  23. 07 1月, 2009 1 次提交
  24. 24 8月, 2008 1 次提交
  25. 07 8月, 2008 1 次提交
  26. 23 4月, 2008 1 次提交
  27. 15 1月, 2008 1 次提交
  28. 11 5月, 2007 2 次提交
  29. 03 5月, 2007 1 次提交
    • J
      PCI: Cleanup the includes of <linux/pci.h> · 6473d160
      Jean Delvare 提交于
      I noticed that many source files include <linux/pci.h> while they do
      not appear to need it. Here is an attempt to clean it all up.
      
      In order to find all possibly affected files, I searched for all
      files including <linux/pci.h> but without any other occurence of "pci"
      or "PCI". I removed the include statement from all of these, then I
      compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
      false positives manually.
      
      My tests covered 66% of the affected files, so there could be false
      positives remaining. Untested files are:
      
      arch/alpha/kernel/err_common.c
      arch/alpha/kernel/err_ev6.c
      arch/alpha/kernel/err_ev7.c
      arch/ia64/sn/kernel/huberror.c
      arch/ia64/sn/kernel/xpnet.c
      arch/m68knommu/kernel/dma.c
      arch/mips/lib/iomap.c
      arch/powerpc/platforms/pseries/ras.c
      arch/ppc/8260_io/enet.c
      arch/ppc/8260_io/fcc_enet.c
      arch/ppc/8xx_io/enet.c
      arch/ppc/syslib/ppc4xx_sgdma.c
      arch/sh64/mach-cayman/iomap.c
      arch/xtensa/kernel/xtensa_ksyms.c
      arch/xtensa/platform-iss/setup.c
      drivers/i2c/busses/i2c-at91.c
      drivers/i2c/busses/i2c-mpc.c
      drivers/media/video/saa711x.c
      drivers/misc/hdpuftrs/hdpu_cpustate.c
      drivers/misc/hdpuftrs/hdpu_nexus.c
      drivers/net/au1000_eth.c
      drivers/net/fec_8xx/fec_main.c
      drivers/net/fec_8xx/fec_mii.c
      drivers/net/fs_enet/fs_enet-main.c
      drivers/net/fs_enet/mac-fcc.c
      drivers/net/fs_enet/mac-fec.c
      drivers/net/fs_enet/mac-scc.c
      drivers/net/fs_enet/mii-bitbang.c
      drivers/net/fs_enet/mii-fec.c
      drivers/net/ibm_emac/ibm_emac_core.c
      drivers/net/lasi_82596.c
      drivers/parisc/hppb.c
      drivers/sbus/sbus.c
      drivers/video/g364fb.c
      drivers/video/platinumfb.c
      drivers/video/stifb.c
      drivers/video/valkyriefb.c
      include/asm-arm/arch-ixp4xx/dma.h
      sound/oss/au1550_ac97.c
      
      I would welcome test reports for these files. I am fine with removing
      the untested files from the patch if the general opinion is that these
      changes aren't safe. The tested part would still be nice to have.
      
      Note that this patch depends on another header fixup patch I submitted
      to LKML yesterday:
        [PATCH] scatterlist.h needs types.h
        http://lkml.org/lkml/2007/3/01/141Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6473d160
  30. 11 12月, 2006 1 次提交