1. 08 Jan, 2014 8 commits
  2. 20 Dec, 2013 4 commits
    • Frank Haverkamp's avatar
      GenWQE: Accidently casting to u32 where u64 is required · a45a0258
      Frank Haverkamp authored
      Fix a casting to u32 where u64 would be appropriate.
      The bad casting made the driver unusable.
      Signed-off-by: default avatarFrank Haverkamp <haver@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a45a0258
    • Aaro Koskinen's avatar
      uio: fix devm_request_irq usage · 632fefaf
      Aaro Koskinen authored
      Commit e6789cd3 (uio: Simplify uio error
      path by using devres functions) converted uio to use devm_request_irq().
      This introduced a change in behaviour since the IRQ is associated with
      the parent device instead of the created UIO device. The IRQ will remain
      active after uio_unregister_device() is called, and some drivers will
      crash because of this. The patch fixes this.
      Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@nsn.com>
      Cc: stable <stable@vger.kernel.org> # 3.13
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      632fefaf
    • Frank Haverkamp's avatar
      GenWQE: Replace dynamic_hex_dump with print_hex_dump_debug · 65861ab4
      Frank Haverkamp authored
      As requested by Greg, replacing the hexdump function from dynamic_debug.h
      with one defined in printk.h. I hope I picked the right one.
      Signed-off-by: default avatarFrank Haverkamp <haver@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      65861ab4
    • Frank Haverkamp's avatar
      GenWQE: Fix endian issues detected by sparse · 58d66ce7
      Frank Haverkamp authored
      Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for
      endian issues. Sparse found a couple of those. Most of them were caused
      by not correctly handling __be64/32 and __u64/32. Those I was able to
      fix with appropriate castings.
      
      One more serious issue was the ATS entry in struct genwqe_ddcb_cmd.
      The kernel expected it in big-endian, but the type was defined __u64.
      I decided that it is better to keep the interface consistent using
      host endian byte-odering instead of having a mixture. With this change
      the kernel likes to see host endian byte order for the ATS entry. That
      would have been an interface change, if someone would have used the
      driver already. Since this is not the case, I hope it is ok to fix it
      now.
      
      For the genqwe_readq/writeq/readl/writel functions I enforced the casts.
      
      It still complains, as far as I can see, about some copy_to/from_user()
      usages:
      
        CHECK   char-misc/drivers/misc/genwqe/card_dev.c
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
        CC [M]  drivers/misc/genwqe/card_dev.o
        CHECK   char-misc/drivers/misc/genwqe/card_ddcb.c
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
        CC [M]  drivers/misc/genwqe/card_ddcb.o
        LD [M]  drivers/misc/genwqe/genwqe_card.o
      
      I appreciate some help from you to figure out what is causig those, and
      making a proposal how to fix them.
      
      I included the missing header file to fix the
      implicit-function-declaration warning when using dynamic_hex_dump.
      Signed-off-by: default avatarFrank Haverkamp <haver@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      58d66ce7
  3. 19 Dec, 2013 28 commits