14 Dec, 2017

1 commit

  • …th in 'rio_dma_transfer()'

    [ Upstream commit b1402dcb5643b7a27d46a05edd7491d49ba0e248 ]

    If 'dma_map_sg()', we should branch to the existing error handling path
    to free some resources before returning.

    Link: http://lkml.kernel.org/r/61292a4f369229eee03394247385e955027283f8.1505687047.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
    Cc: Matt Porter <mporter@kernel.crashing.org>
    Cc: Alexandre Bounine <alexandre.bounine@idt.com>
    Cc: Lorenzo Stoakes <lstoakes@gmail.com>
    Cc: Jesper Nilsson <jesper.nilsson@axis.com>
    Cc: Christian K_nig <christian.koenig@amd.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    Christophe JAILLET
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

04 Oct, 2017

1 commit

  • Locking of config and doorbell operations should be done only if the
    underlying hardware requires it.

    This patch removes the global spinlocks from the rapidio subsystem and
    moves them to the mport drivers (fsl_rio and tsi721), only to the
    necessary places. For example, local config space read and write
    operations (lcread/lcwrite) are atomic in all existing drivers, so there
    should be no need for locking, while the cread/cwrite operations which
    generate maintenance transactions need to be synchronized with a lock.

    Later, each driver could chose to use a per-port lock instead of a
    global one, or even more granular locking.

    Link: http://lkml.kernel.org/r/20170824113023.GD50104@nokia.com
    Signed-off-by: Ioan Nicu
    Signed-off-by: Frank Kunz
    Acked-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Nicholas Piggin
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ioan Nicu
     

05 May, 2017

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big set of new char/misc driver drivers and features for
    4.12-rc1.

    There's lots of new drivers added this time around, new firmware
    drivers from Google, more auxdisplay drivers, extcon drivers, fpga
    drivers, and a bunch of other driver updates. Nothing major, except if
    you happen to have the hardware for these drivers, and then you will
    be happy :)

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (136 commits)
    firmware: google memconsole: Fix return value check in platform_memconsole_init()
    firmware: Google VPD: Fix return value check in vpd_platform_init()
    goldfish_pipe: fix build warning about using too much stack.
    goldfish_pipe: An implementation of more parallel pipe
    fpga fr br: update supported version numbers
    fpga: region: release FPGA region reference in error path
    fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe()
    mei: drop the TODO from samples
    firmware: Google VPD sysfs driver
    firmware: Google VPD: import lib_vpd source files
    misc: lkdtm: Add volatile to intentional NULL pointer reference
    eeprom: idt_89hpesx: Add OF device ID table
    misc: ds1682: Add OF device ID table
    misc: tsl2550: Add OF device ID table
    w1: Remove unneeded use of assert() and remove w1_log.h
    w1: Use kernel common min() implementation
    uio_mf624: Align memory regions to page size and set correct offsets
    uio_mf624: Refactor memory info initialization
    uio: Allow handling of non page-aligned memory regions
    hangcheck-timer: Fix typo in comment
    ...

    Linus Torvalds
     

01 Apr, 2017

1 commit

  • kbuild test robot reported a non-static variable name collision between
    a staging driver and a RapidIO driver, with a generic variable name of
    'dbg_level'.

    Both drivers should be changed so that they don't use this generic
    public variable name. This patch fixes the RapidIO driver but does not
    change the user interface (name) for the module parameter.

    drivers/staging/built-in.o:(.bss+0x109d0): multiple definition of `dbg_level'
    drivers/rapidio/built-in.o:(.bss+0x16c): first defined here

    Link: http://lkml.kernel.org/r/ab527fc5-aa3c-4b07-5d48-eef5de703192@infradead.org
    Signed-off-by: Randy Dunlap
    Reported-by: kbuild test robot
    Cc: Greg Kroah-Hartman
    Cc: Matt Porter
    Cc: Alexandre Bounine
    Cc: Jérémy Lefaure
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

21 Mar, 2017

1 commit

  • This driver did not originally set kobj.parent so it likely had
    potential a use after free bug which this patch fixes.

    We convert from device_register to device_initialize/cdev_device_add.
    While we are at it we use put_device instead of kfree (as recommended
    by the device_initialize documentation). We also remove an unnecessary
    extra get_device from the code.

    Signed-off-by: Logan Gunthorpe
    Signed-off-by: Greg Kroah-Hartman

    Logan Gunthorpe
     

17 Mar, 2017

1 commit

  • Instead of creating switch-specific attributes by hand, implement
    is_visible() method of attribute group and hide them when dealing with
    non-switch devices. This will ensure that all attributes are created
    together, before userspace gets notified of new device.

    Also, remove rio-sysfs.c from list of files that are scanned when compiling
    RapiodIO documentations as it no longer has any structured comments, and
    leaving it in leads to warning when building docs.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

28 Feb, 2017

1 commit

  • Moving from get_user_pages() to get_user_pages_unlocked() simplifies the
    code and takes advantage of VM_FAULT_RETRY functionality when faulting
    in pages.

    Link: http://lkml.kernel.org/r/20170103205024.6704-1-lstoakes@gmail.com
    Signed-off-by: Lorenzo Stoakes
    Acked-by: Alexandre Bounine
    Cc: Matt Porter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lorenzo Stoakes
     

19 Oct, 2016

1 commit

  • This removes the 'write' and 'force' from get_user_pages() and replaces
    them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers
    as use of this flag can result in surprising behaviour (and hence bugs)
    within the mm subsystem.

    Signed-off-by: Lorenzo Stoakes
    Acked-by: Christian König
    Acked-by: Jesper Nilsson
    Acked-by: Michal Hocko
    Reviewed-by: Jan Kara
    Signed-off-by: Linus Torvalds

    Lorenzo Stoakes
     

12 Oct, 2016

1 commit

  • Fix coccinelle warning about duplicating existing memdup_user function.

    Link: http://lkml.kernel.org/r/20160811151737.20140-1-alexandre.bounine@idt.com
    Link: https://lkml.org/lkml/2016/8/11/29
    Signed-off-by: Alexandre Bounine
    Reported-by: kbuild test robot
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

20 Sep, 2016

1 commit

  • As reported by Alexey Khoroshilov (https://lkml.org/lkml/2016/9/9/737):
    riocm_send_close() is called from rio_cm_shutdown() under
    spin_lock_bh(idr_lock), but riocm_send_close() uses a GFP_KERNEL
    allocation.

    Fix by taking riocm_send_close() outside of spinlock protected code.

    [akpm@linux-foundation.org: remove unneeded `if (!list_empty())']
    Link: http://lkml.kernel.org/r/20160915175402.10122-1-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Reported-by: Alexey Khoroshilov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

02 Sep, 2016

1 commit

  • Fix incorrect condition to identify involvment of a address translation
    mechanism.

    This bug results in NULL pointer kernel crash dump in cases when mapping
    of inbound RapidIO address range is requested within existing aprture.

    Link: http://lkml.kernel.org/r/20160901173144.2983-1-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Cc: [4.6+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

11 Aug, 2016

1 commit

  • Original patch: https://lkml.org/lkml/2016/8/4/32

    If riocm_ch_alloc() fails then we end up dereferencing the error
    pointer.

    The problem is that we're not unwinding in the reverse order from how we
    allocate things so it gets confusing. I've changed this around so now
    "ch" is NULL when we are done with it after we call riocm_put_channel().
    That way we can check if it's NULL and avoid calling riocm_put_channel()
    on it twice.

    I renamed err_nodev to err_put_new_ch so that it better reflects what
    the goto does.

    Then because we had flipping things around, it means we don't neeed to
    initialize the pointers to NULL and we can remove an if statement and
    pull things in an indent level.

    Link: http://lkml.kernel.org/r/20160805152406.20713-1-alexandre.bounine@idt.com
    Signed-off-by: Dan Carpenter
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

03 Aug, 2016

12 commits

  • Add RapidIO switch driver for IDT Gen3 switch devices: RXS1632 and
    RXS2448.

    [alexandre.bounine@idt.com: fixup for original driver patch]
    Link: http://lkml.kernel.org/r/1469137596-18241-1-git-send-email-alexandre.bounine@idt.com
    Link: http://lkml.kernel.org/r/1469125134-16523-14-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Implement changes made in RapidIO specification rev.3 to LP-Serial Physical
    Layer register definitions:

    - use per-port register offset calculations based on LP-Serial Extended
    Features Block (EFB) Register Map type (I or II) with different
    per-port offset step (0x20 vs 0x40 respectfully).

    - remove deprecated Parallel Physical layer definitions and related
    code.

    [alexandre.bounine@idt.com: fix DocBook warning for gen3 update]
    Link: http://lkml.kernel.org/r/1469191173-19338-1-git-send-email-alexandre.bounine@idt.com
    Link: http://lkml.kernel.org/r/1469125134-16523-12-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Current definition of map_inb() mport operations callback uses u32 type
    to specify required inbound window (IBW) size. This is limiting factor
    because existing hardware - tsi721 and fsl_rio, both support IBW size up
    to 16GB.

    Changing type of size parameter to u64 to allow IBW size configurations
    larger than 4GB.

    [alexandre.bounine@idt.com: remove compiler warning about size of constant]
    Link: http://lkml.kernel.org/r/20160802184856.2566-1-alexandre.bounine@idt.com
    Link: http://lkml.kernel.org/r/1469125134-16523-11-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Benjamin Herrenschmidt
    Cc: Michael Ellerman
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Fix lockdep warning during device probing: move sysfs initialization out
    of code protected by a spin lock.

    Link: http://lkml.kernel.org/r/1469125134-16523-10-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add checking for error code returned by HW-specific mbox open routines.
    Ensure that resources are properly release if failed.

    This patch is applicable to kernel versions starting from v2.6.15.

    Link: http://lkml.kernel.org/r/1469125134-16523-9-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add advancing transfer queue immediately from transfer submit call. DMA
    performance improvement: This will start transfer without waiting for
    'issue_pending' command if there is no DMA transfer in progress.

    Link: http://lkml.kernel.org/r/1469125134-16523-8-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add module parameter to allow load time configuration of available
    RapidIO messaging mailboxes (MBOX1 - MBOX4).

    Having a messaging MBOX selector mask allows to define which MBOXes are
    controlled by the mport device driver and reserve some of them for
    direct use by other drivers.

    Link: http://lkml.kernel.org/r/1469125134-16523-7-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add PCIe Maximum Read Request Size (MRRS) adjustment parameter to allow
    users to override configuration register value set during PCIe bus
    initialization.

    Performance of Tsi721 device as PCIe bus master can be improved if MRRS
    is set to its maximum value (4096 bytes). Some platforms have
    limitations for supported MRRS and therefore the default value should be
    preserved, unless it is known that given platform supports full set of
    MRRS values defined by PCI Express specification.

    Link: http://lkml.kernel.org/r/1469125134-16523-6-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add module parameters to allow load time configuration of DMA channels.

    Depending on application, performance of DMA data transfers can benefit
    from adjusted sizes of buffer descriptor ring and/or transaction
    requests queue.

    Having HW DMA channel selector mask allows to define which channels
    (from seven available) are controlled by the mport device driver and
    reserve some of them for direct use by other drivers.

    Link: http://lkml.kernel.org/r/1469125134-16523-5-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Update return value description for rio_dma_prep_... functions to
    include error-valued pointer that can be returned by HW mport device
    drivers. Return values from these functions must be checked using
    IS_ERR_OR_NULL macro.

    This patch is applicable to kernel versions starting from v4.6-rc1.

    Link: http://lkml.kernel.org/r/1469125134-16523-4-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Patch series "RapidIO subsystem updates".

    This set of patches contains RapidIO subsystem fixes and updates that
    have been made since kernel v4.6. The most significant update brings
    changes related to the latest revision of RapidIO specification
    (rev.3.x) and introduction of next generation of RapidIO switches by IDT
    (RXS1632 and RXS2448).

    This patch (of 13):

    This is RapidIO part of the original patch submitted by Joe Perches.
    (see: https://lkml.org/lkml/2016/3/5/19)

    Since commit 3cab1e711297 ("lib/vsprintf: refactor duplicate code
    to special_hex_number()") %pa uses have been output with a 0x prefix.

    These 0x prefixes in the formats are unnecessary.

    Link: http://lkml.kernel.org/r/1469125134-16523-2-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Joe Perches
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add channelized messaging driver to support native RapidIO messaging
    exchange between multiple senders/recipients on devices that use kernel
    RapidIO subsystem services.

    This device driver is the result of collaboration within the RapidIO.org
    Software Task Group (STG) between Texas Instruments, Prodrive
    Technologies, Nokia Networks, BAE and IDT. Additional input was
    received from other members of RapidIO.org.

    The objective was to create a character mode driver interface which
    exposes messaging capabilities of RapidIO endpoint devices (mports)
    directly to applications, in a manner that allows the numerous and
    varied RapidIO implementations to interoperate.

    This char mode device driver allows user-space applications to setup
    messaging communication channels using single shared RapidIO messaging
    mailbox.

    By default this driver uses RapidIO MBOX_1 (MBOX_0 is reserved for use by
    RIONET Ethernet emulation driver).

    [weiyj.lk@gmail.com: rapidio/rio_cm: fix return value check in riocm_init()]
    Link: http://lkml.kernel.org/r/1469198221-21970-1-git-send-email-alexandre.bounine@idt.com
    Link: http://lkml.kernel.org/r/1468952862-18056-1-git-send-email-alexandre.bounine@idt.com
    Signed-off-by: Alexandre Bounine
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

06 May, 2016

1 commit

  • Fix problems in uapi definitions reported by Gabriel Laskar: (see
    https://lkml.org/lkml/2016/4/5/205 for details)

    - move public header file rio_mport_cdev.h to include/uapi/linux directory
    - change types in data structures passed as IOCTL parameters
    - improve parameter checking in some IOCTL service routines

    Signed-off-by: Alexandre Bounine
    Reported-by: Gabriel Laskar
    Tested-by: Barry Wood
    Cc: Gabriel Laskar
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

29 Apr, 2016

1 commit

  • The change fixes improper check for a returned error value by
    class_create() function, which on error returns ERR_PTR() value, thus the
    original check always results in a dead code on error path.

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Alexandre Bounine
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vladimir Zapolskiy
     

03 Apr, 2016

1 commit

  • Commit d4edcf0d5695 ("mm/gup: Switch all callers of get_user_pages() to
    not pass tsk/mm") switched get_user_pages() callers to the simpler model
    where they no longer pass in the thread and mm pointer. But since then
    we've merged changes to a few drivers that re-introduce use of the old
    interface. Let's fix them up.

    They continued to work fine (thanks to the truly disgusting macros
    introduced in commit cde70140fed8: "mm/gup: Overload get_user_pages()
    functions"), but cause unnecessary build noise.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

23 Mar, 2016

12 commits

  • Add mport character device driver to provide user space interface to
    basic RapidIO subsystem operations.

    See included Documentation/rapidio/mport_cdev.txt for more details.

    [akpm@linux-foundation.org: fix printk warning on i386]
    [dan.carpenter@oracle.com: mport_cdev: fix some error codes]
    Signed-off-by: Alexandre Bounine
    Signed-off-by: Dan Carpenter
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add DMA channel re-initialization after an error to avoid termination of
    all pending transfer requests.

    Signed-off-by: Alexandre Bounine
    Reported-by: Barry Wood
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Fix synchronization issues found during testing using multiple DMA
    transfer requests to the same channel:

    - lost MSI-X interrupt notifications
    - non-synchronized attempts to start DMA channel HW resulting in error
    message from the driver
    - cookie tracking/update race conditions resulting in incorrect DMA
    transfer status report

    Signed-off-by: Alexandre Bounine
    Reported-by: Barry Wood
    Tested-by: Barry Wood
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Barry Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Switch to returning error-valued pointer instead of simple NULL pointer.
    This allows to properly identify situation when request queue is full
    and therefore gives to upper layer an option to retry operation later.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Replace "all-or-nothing" debug output with controlled debug output using
    functional block masks. This allows run time control of debug messages
    through 'dbg_level' module parameter.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add device-specific callback functions to support outbound windows
    mapping and release.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add RapidIO controller (mport) outbound window configuration operations.

    This patch is a part of the original patch submitted by Li Yang:

    https://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/071210.html

    For some reason the original part was not applied to mainline code
    tree. The inbound window mapping part has been applied later during
    tsi721 mport driver submission. Now goes the second part with
    corresponding HW support.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • - Add spinlock protection into outbound message queuing routine.

    - Change outbound message interrupt handler to avoid deadlock when
    calling registered callback routine.

    - Allow infinite retries for outbound messages to avoid retry threshold
    error signaling in systems with nodes that have slow message receive
    queue processing.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add new Port Write handler registration interfaces that attach PW
    handlers to local mport device objects. This is different from old
    interface that attaches PW callback to individual RapidIO device. The
    new interfaces are intended for use for common event handling (e.g.
    hot-plug notifications) while the old interface is available for
    individual device drivers.

    This patch is based on patch proposed by Andre van Herk but preserves
    existing per-device interface and adds lock protection for list
    handling.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Make rio_pw_enable() routine available to other RapidIO drivers.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Make function rio_local_set_device_id() common for all components of
    RapidIO subsystem.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add lock protection around doorbell list handling to prevent list
    corruption on SMP platforms.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Aurelien Jacquiot
    Cc: Andre van Herk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine