19 Feb, 2015

1 commit

  • Pull dmaengine updates from Vinod Koul:
    "This update brings:

    - the big cleanup up by Maxime for device control and slave
    capabilities. This makes the API much cleaner.

    - new IMG MDC driver by Andrew

    - new Renesas R-Car Gen2 DMA Controller driver by Laurent along with
    bunch of fixes on rcar drivers

    - odd fixes and updates spread over driver"

    * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (130 commits)
    dmaengine: pl330: add DMA_PAUSE feature
    dmaengine: pl330: improve pl330_tx_status() function
    dmaengine: rcar-dmac: Disable channel 0 when using IOMMU
    dmaengine: rcar-dmac: Work around descriptor mode IOMMU errata
    dmaengine: rcar-dmac: Allocate hardware descriptors with DMAC device
    dmaengine: rcar-dmac: Fix oops due to unintialized list in error ISR
    dmaengine: rcar-dmac: Fix spinlock issues in interrupt
    dmaenegine: edma: fix sparse warnings
    dmaengine: rcar-dmac: Fix uninitialized variable usage
    dmaengine: shdmac: extend PM methods
    dmaengine: shdmac: use SET_RUNTIME_PM_OPS()
    dmaengine: pl330: fix bug that cause start the same descs in cyclic
    dmaengine: at_xdmac: allow muliple dwidths when doing slave transfers
    dmaengine: at_xdmac: simplify channel configuration stuff
    dmaengine: at_xdmac: introduce save_cc field
    dmaengine: at_xdmac: wait for in-progress transaction to complete after pausing a channel
    ioat: fail self-test if wait_for_completion times out
    dmaengine: dw: define DW_DMA_MAX_NR_MASTERS
    dmaengine: dw: amend description of dma_dev field
    dmatest: move src_off, dst_off, len inside loop
    ...

    Linus Torvalds
     

27 Jan, 2015

1 commit


22 Dec, 2014

1 commit


13 Aug, 2014

1 commit

  • We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
    meet kernel coding style guidelines. This issue was reported by checkpatch.

    A simplified version of the semantic patch that makes this change is as
    follows (http://coccinelle.lip6.fr/):

    //

    @@
    identifier i;
    declarer name DEFINE_PCI_DEVICE_TABLE;
    initializer z;
    @@

    - DEFINE_PCI_DEVICE_TABLE(i)
    + const struct pci_device_id i[]
    = z;

    //

    [bhelgaas: add semantic patch]
    Signed-off-by: Benoit Taine
    Signed-off-by: Bjorn Helgaas

    Benoit Taine
     

09 Aug, 2014

2 commits

  • Rework Tsi721 RapidIO DMA engine support to allow handling data
    scatter/gather lists longer than number of hardware buffer descriptors in
    the DMA channel's descriptor list.

    The current implementation of Tsi721 DMA transfers requires that number of
    entries in a scatter/gather list provided by a caller of
    dmaengine_prep_rio_sg() should not exceed number of allocated hardware
    buffer descriptors.

    This patch removes the limitation by processing long scatter/gather lists
    by sections that can be transferred using hardware descriptor ring of
    configured size. It also introduces a module parameter
    "dma_desc_per_channel" to allow run-time configuration of Tsi721 hardware
    buffer descriptor rings.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Stef van Os
    Cc: Vinod Koul
    Cc: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add RapidIO DMA interface routines that directly use reference to the mport
    device object and/or target device destination ID as parameters.
    This allows to perform RapidIO DMA transfer requests by modules that do not
    have an access to the RapidIO device list.

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

    Alexandre Bounine
     

31 Jul, 2014

1 commit

  • This is a bug fix for the situation when function tsi721_desc_get() fails
    to obtain a free transaction descriptor.

    The bug usually results in a memory access crash dump when data transfer
    scatter-gather list has more entries than size of hardware buffer
    descriptors ring. This fix ensures that error is properly returned to a
    caller instead of an invalid entry.

    This patch is applicable to kernel versions starting from v3.5.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Stef van Os
    Cc: Vinod Koul
    Cc: Dan Williams
    Cc: [3.5+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

07 Jun, 2014

1 commit

  • As result of deprecation of MSI-X/MSI enablement functions
    pci_enable_msix() and pci_enable_msi_block() all drivers using these two
    interfaces need to be updated to use the new pci_enable_msi_range() or
    pci_enable_msi_exact() and pci_enable_msix_range() or
    pci_enable_msix_exact() interfaces.

    The patch has no runtime effect.

    Signed-off-by: Alexander Gordeev
    Cc: Matt Porter
    Acked-by: Alexandre Bounine
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Gordeev
     

08 Apr, 2014

2 commits

  • This patch removes an artificial RapidIO bus root device and establishes
    actual device hierarchy by providing reference to real parent devices.
    It also introduces device class for RapidIO controller devices (on-chip
    or an eternal bridge, known as "mport").

    Existing implementation was sufficient for SoC-based platforms that have
    a single RapidIO controller. With introduction of devices using
    multiple RapidIO controllers and PCIe-to-RapidIO bridges the old scheme
    is very limiting or does not work at all. The implemented changes allow
    to properly reference platform's local RapidIO mport devices and provide
    device details needed for upper layers.

    This change to RapidIO device hierarchy does not break any known
    existing kernel or user space interfaces.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Stef van Os
    Cc: Jerry Jacobs
    Cc: Arno Tiemersma
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Combine SG entries describing single contiguous memory block into one
    Tsi721 BDMA descriptor. This reduces number of hardware descriptors
    required for large data transfers and improves performance on the PCIe
    side by reducing number of descriptor fetch requests.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

04 Mar, 2014

1 commit

  • This patch is a modification of the patch originally proposed by
    Xiaotian Feng : https://lkml.org/lkml/2012/11/5/413
    This new version disables DMA channel interrupts and ensures that the
    tasklet wil not be scheduled again before calling tasklet_kill().

    Unfortunately the updated patch was not released at that time due to
    planned rework of Tsi721 mport driver to use threaded interrupts (which
    has yet to happen). Recently the issue was reported again:
    https://lkml.org/lkml/2014/2/19/762.

    Description from the original Xiaotian's patch:

    "Some drivers use tasklet_disable in device remove/release process,
    tasklet_disable will inc tasklet->count and return. If the tasklet is
    not handled yet under some softirq pressure, the tasklet will be
    placed on the tasklet_vec, never have a chance to be excuted. This
    might lead to a heavy loaded ksoftirqd, wakeup with pending_softirq,
    but tasklet is disabled. tasklet_kill should be used in this case."

    This patch is applicable to kernel versions starting from v3.5.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Xiaotian Feng
    Reviewed-by: Thomas Gleixner
    Cc: Mike Galbraith
    Cc: [3.5+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

17 Oct, 2013

1 commit


27 Sep, 2013

1 commit


01 Aug, 2013

1 commit

  • We're freeing the list iterator so we can't move to the next entry.
    Since there is only one matching mport_id, we can just break after
    finding it.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Ryan Mallon
    Acked-by: Alexandre Bounine
    Cc: Matt Porter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

14 Jul, 2013

1 commit

  • Pull MIPS updates from Ralf Baechle:
    "MIPS updates:

    - All the things that didn't make 3.10.
    - Removes the Windriver PPMC platform. Nobody will miss it.
    - Remove a workaround from kernel/irq/irqdomain.c which was there
    exclusivly for MIPS. Patch by Grant Likely.
    - More small improvments for the SEAD 3 platform
    - Improvments on the BMIPS / SMP support for the BCM63xx series.
    - Various cleanups of dead leftovers.
    - Platform support for the Cavium Octeon-based EdgeRouter Lite.

    Two large KVM patchsets didn't make it for this pull request because
    their respective authors are vacationing"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (124 commits)
    MIPS: Kconfig: Add missing MODULES dependency to VPE_LOADER
    MIPS: BCM63xx: CLK: Add dummy clk_{set,round}_rate() functions
    MIPS: SEAD3: Disable L2 cache on SEAD-3.
    MIPS: BCM63xx: Enable second core SMP on BCM6328 if available
    MIPS: BCM63xx: Add SMP support to prom.c
    MIPS: define write{b,w,l,q}_relaxed
    MIPS: Expose missing pci_io{map,unmap} declarations
    MIPS: Malta: Update GCMP detection.
    Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET"
    MIPS: APSP: Remove
    SSB: Kconfig: Amend SSB_EMBEDDED dependencies
    MIPS: microMIPS: Fix improper definition of ISA exception bit.
    MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.
    MIPS: Declare emulate_load_store_microMIPS as a static function.
    MIPS: Fix typos and cleanup comment
    MIPS: Cleanup indentation and whitespace
    MIPS: BMIPS: support booting from physical CPU other than 0
    MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS
    MIPS: GIC: Fix gic_set_affinity infinite loop
    MIPS: Don't save/restore OCTEON wide multiplier state on syscalls.
    ...

    Linus Torvalds
     

04 Jul, 2013

8 commits

  • Change endpoint device name format to use a component tag value instead of
    device destination ID.

    RapidIO specification defines a component tag to be a unique identifier
    for devices in a network. RapidIO switches already use component tag as
    part of their device name and also use it for device identification when
    processing error management event notifications.

    Forming an endpoint's device name using its component tag instead of
    destination ID allows to keep sysfs device directories unchanged in case
    if a routing process dynamically changes endpoint's destination ID as a
    result of route optimization.

    This change should not affect any existing users because a valid device
    destination ID always should be obtained by reading "destid" attribute and
    not by parsing device name.

    This patch also removes switchid member from struct rio_switch because it
    simply duplicates the component tag and does not have other use than in
    device name generation.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add RapidIO-specific modalias generation to enable udev notifications
    about RapidIO-specific events.

    The RapidIO modalias string format is shown below:

    "rapidio:vNNNNdNNNNavNNNNadNNNN"

    Where:
    v - Device Vendor ID (16 bit),
    d - Device ID (16 bit),
    av - Assembly Vendor ID (16 bit),
    ad - Assembly ID (16 bit),

    as they are reported in corresponding Capability Registers (CARs)
    of each RapidIO device.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add a configuration option to build RapidIO subsystem core code as a
    loadable kernel module. Currently this option is available only for
    x86-based platforms, with the additional patch for PowerPC planned to be
    provided later.

    This patch replaces kernel command line parameter "riohdid=" with its
    module-specific analog "rapidio.hdid=".

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • This patch adds an option to build device driver for Tsi721 PCIe-to-SRIO
    bridge device as a kernel module.

    Currently this module cannot be unloaded because the existing RapidIO
    subsystem code does not support dynamic removal of local RapidIO
    controllers (TODO).

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Update enumeration/discovery method registration mechanism to allow
    loading enumeration/discovery methods before all mports are registered.

    Existing statically linked RapidIO subsystem expects that all available
    RapidIO mport devices are initialized and registered before the
    enumeration/discovery method is registered. Switching to loadable mport
    device drivers creates situation when mport device driver can be loaded
    after enumeration/discovery method is attached (e.g., loadable mport
    driver in a system with statically linked RapidIO core and enumerator).
    This also will happen in a system with hot-pluggable RapidIO controllers.

    To remove the dependency on the initialization/registration order this
    patch introduces enumeration/discovery registration mechanism that
    supports arbitrary registration order of mports and enumerator/discovery
    methods.

    The following registration rules are implemented:
    - only one enumeration/discovery method can be registered for given mport ID
    (including RIO_MPORT_ANY);
    - when new enumeration/discovery methods tries to attach to the registered mport
    device, method with matching mport ID will replace a default method previously
    registered for given mport (if any);
    - enumeration/discovery method with target ID=RIO_MPORT_ANY will be attached
    only to mports that do not have another enumerator attached to them;
    - when new mport device is registered with RapidIO subsystem, registration
    routine searches for the enumeration/discovery method with the best matching
    mport ID;

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Rework RapidIO switch drivers to add an option to build them as loadable
    kernel modules.

    This patch removes RapidIO-specific vmlinux section and converts switch
    drivers to be compatible with LDM driver registration method. To simplify
    registration of device-specific callback routines this patch introduces
    rio_switch_ops data structure. The sw_sysfs() callback is removed from
    the list of device-specific operations because under the new structure its
    functions can be handled by switch driver's probe() and remove() routines.

    If a specific switch device driver is not loaded the RapidIO subsystem
    core will use default standard-based operations to configure a switch.
    Because the current implementation of RapidIO enumeration/discovery method
    relies on availability of device-specific operations for error management,
    switch device drivers must be loaded before the RapidIO
    enumeration/discovery starts.

    This patch also moves several common routines from enumeration/discovery
    module into the RapidIO core code to make switch-specific operations
    accessible to all components of RapidIO subsystem.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • sparse warnings:

    drivers/rapidio/rio-scan.c:1143:5: sparse: symbol 'rio_enum_mport' was not declared. Should it be static?
    drivers/rapidio/rio-scan.c:1246:5: sparse: symbol 'rio_disc_mport' was not declared. Should it be static?

    Signed-off-by: Fengguang Wu
    Cc: "Bounine, Alexandre"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • Remove the driver for Tsi500 Parallel RapidIO switch because this device
    has not been available for several years. Since the first introduction of
    Tsi500, the parallel RapidIO interface was replaced by the serial RapidIO
    (sRIO) and therefore there is no value in keeping this driver.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

20 Jun, 2013

1 commit

  • CC drivers/rapidio/switches/idt_gen2.o
    drivers/rapidio/switches/idt_gen2.c: In function ‘idtg2_show_errlog’:
    drivers/rapidio/switches/idt_gen2.c:379:30: error: ‘PAGE_SIZE’ undeclared (first use in this function)
    drivers/rapidio/switches/idt_gen2.c:379:30: note: each undeclared identifier is reported only once for each function it appears in

    Signed-off-by: Ralf Baechle
    Acked-by: Alexandre Bounine

    Ralf Baechle
     

25 May, 2013

3 commits

  • Fix bug in MSI interrupt handling which causes loss of event
    notifications.

    Typical indication of lost MSI interrupts are stalled message and
    doorbell transfers between RapidIO endpoints. To avoid loss of MSI
    interrupts all interrupts from the device must be disabled on entering
    the interrupt handler routine and re-enabled when exiting it.
    Re-enabling device interrupts will trigger new MSI message(s) if Tsi721
    registered new events since entering interrupt handler routine.

    This patch is applicable to kernel versions starting from v3.2.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add RapidIO enumeration/discovery start from user space. User space
    start allows to defer RapidIO fabric scan until the moment when all
    participating endpoints are initialized avoiding mandatory synchronized
    start of all endpoints (which may be challenging in systems with large
    number of RapidIO endpoints).

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Systems that use RapidIO fabric may need to implement their own
    enumeration and discovery methods which are better suitable for needs of
    a target application.

    The following set of patches is intended to simplify process of
    introduction of new RapidIO fabric enumeration/discovery methods.

    The first patch offers ability to add new RapidIO enumeration/discovery
    methods using kernel configuration options. This new configuration
    option mechanism allows to select statically linked or modular
    enumeration/discovery method(s) from the list of existing methods or use
    external module(s).

    This patch also updates the currently existing enumeration/discovery
    code to be used as a statically linked or modular method.

    The corresponding configuration option is named "Basic
    enumeration/discovery" method. This is the only one configuration
    option available today but new methods are expected to be introduced
    after adoption of provided patches.

    The second patch address a long time complaint of RapidIO subsystem
    users regarding fabric enumeration/discovery start sequence. Existing
    implementation offers only a boot-time enumeration/discovery start which
    requires synchronized boot of all endpoints in RapidIO network. While
    it works for small closed configurations with limited number of
    endpoints, using this approach in systems with large number of endpoints
    is quite challenging.

    To eliminate requirement for synchronized start the second patch
    introduces RapidIO enumeration/discovery start from user space.

    For compatibility with the existing RapidIO subsystem implementation,
    automatic boot time enumeration/discovery start can be configured in by
    specifying "rio-scan.scan=1" command line parameter if statically linked
    basic enumeration method is selected.

    This patch:

    Rework to implement RapidIO enumeration/discovery method selection
    combined with ability to use enumeration/discovery as a kernel module.

    This patch adds ability to introduce new RapidIO enumeration/discovery
    methods using kernel configuration options. Configuration option
    mechanism allows to select statically linked or modular
    enumeration/discovery method from the list of existing methods or use
    external modules. If a modular enumeration/discovery is selected each
    RapidIO mport device can have its own method attached to it.

    The existing enumeration/discovery code was updated to be used as
    statically linked or modular method. This configuration option is named
    "Basic enumeration/discovery" method.

    Several common routines have been moved from rio-scan.c to make them
    available to other enumeration methods and reduce number of exported
    symbols.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

12 Dec, 2012

1 commit

  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the large driver core updates for 3.8-rc1.

    The biggest thing here is the various __dev* marking removals. This
    is going to be a pain for the merge with different subsystem trees, I
    know, but all of the patches included here have been ACKed by their
    various subsystem maintainers, as they wanted them to go through here.

    If this is too much of a pain, I can pull all of them out of this tree
    and just send you one with the other fixes/updates and then, after
    3.8-rc1 is out, do the rest of the removals to ensure we catch them
    all, it's up to you. The merges should all be trivial, and Stephen
    has been doing them all in linux-next for a few weeks now quite
    easily.

    Other than the __dev* marking removals, there's nothing major here,
    some firmware loading updates and other minor things in the driver
    core.

    All of these have (much to Stephen's annoyance), been in linux-next
    for a while.

    Signed-off-by: Greg Kroah-Hartman "

    Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio
    update.

    * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits)
    modpost.c: Stop checking __dev* section mismatches
    init.h: Remove __dev* sections from the kernel
    acpi: remove use of __devinit
    PCI: Remove __dev* markings
    PCI: Always build setup-bus when PCI is enabled
    PCI: Move pci_uevent into pci-driver.c
    PCI: Remove CONFIG_HOTPLUG ifdefs
    unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs
    sh/PCI: Remove CONFIG_HOTPLUG ifdefs
    powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs
    mips/PCI: Remove CONFIG_HOTPLUG ifdefs
    microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs
    dma: remove use of __devinit
    dma: remove use of __devexit_p
    firewire: remove use of __devinitdata
    firewire: remove use of __devinit
    leds: remove use of __devexit
    leds: remove use of __devinit
    leds: remove use of __devexit_p
    mmc: remove use of __devexit
    ...

    Linus Torvalds
     

29 Nov, 2012

1 commit


17 Nov, 2012

1 commit

  • Fix rapidio kernel-doc warnings:

    Warning(drivers/rapidio/rio.c:415): No description found for parameter 'local'
    Warning(drivers/rapidio/rio.c:415): Excess function parameter 'lstart' description in 'rio_map_inb_region'
    Warning(include/linux/rio.h:290): No description found for parameter 'switches'
    Warning(include/linux/rio.h:290): No description found for parameter 'destid_table'

    Signed-off-by: Randy Dunlap
    Cc: Matt Porter
    Acked-by: Alexandre Bounine
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

11 Oct, 2012

3 commits

  • Address comments provided by Andrew Morton:
    https://lkml.org/lkml/2012/10/3/550

    - Keeps consistent kerneldoc compatible comments style for new static
    functions.
    - Removes unnecessary complexity from destination ID allocation
    routine.
    - Uses kcalloc() for code clarity.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Update discovery process initialization based on Andrew Morton's comments:
    https://lkml.org/lkml/2012/10/3/552.

    This update processes all enumerating mports first and schedules discovery
    work after that. If the initialization routine fails to allocate resources
    needed to execute discovery, it abandons discovery for all ports.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Use msleep() for code clarity as suggested by Andrew Morton in his
    comments for the original patch: https://lkml.org/lkml/2012/10/3/546.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     

06 Oct, 2012

7 commits

  • Replace the single global destination ID counter with per-net allocation
    mechanism to allow independent destID management for each available
    RapidIO network. Using bitmap based mechanism instead of counters allows
    destination ID release and reuse in systems that support hot-swap.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Modify mport initialization routine to run the RapidIO discovery process
    asynchronously. This allows to have an arbitrary order of enumerating and
    discovering ports in systems with multiple RapidIO controllers without
    creating a deadlock situation if enumerator port is registered after a
    discovering one.

    Making netID matching to mportID ensures consistent net ID assignment in
    multiport RapidIO systems with asynchronous discovery process (global
    counter implementation is affected by race between threads).

    [akpm@linux-foundation.org: tweak code layput]
    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Modify handling of device lists to resolve issues caused by using single
    global list of RIO devices during enumeration/discovery. The most common
    sign of existing issue is incorrect contents of switch routing tables in
    systems with multiple mport controllers while single-port configuration
    performs as expected.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • The following set of patches provides modifications targeting support of
    multiple RapidIO master port (mport) devices on a CPU-side of
    RapidIO-capable board. While the RapidIO subsystem code has definitions
    suitable for multi-controller/multi-net support, the existing
    implementation cannot be considered ready for multiple mport
    configurations.

    =========== NOTES: =============

    a) The patches below do not address RapidIO side view of multiport
    processing elements defined in Part 6 of RapidIO spec Rev.2.1 (section
    6.4.1). These devices have Base Device ID CSR (0x60) and Component Tag
    CSR (0x6C) shared by all SRIO ports. For example, Freescale's P4080,
    P3041 and P5020 have a dual-port SRIO controller implemented according
    the specification. Enumeration/discovery of such devices from RapidIO
    side may require device-specific fixups.

    b) Devices referenced above may also require implementation specific
    code to setup a host device ID for mport device. These operations are
    not addressed by patches in this package.

    =================================

    Details about provided patches:

    1. Fix blocking wait for discovery ready

    While it does not happen on PowerPC based platforms, there is
    possibility of stalled CPU warning dump on x86 based platforms that run
    RapidIO discovery process if they wait too long for being enumerated.

    Currently users can avoid it by disabling the soft-lockup detector
    using "nosoftlockup" kernel parameter OR by ensuring that enumeration
    is completed before soft-lockup is detected.

    This patch eliminates blocking wait and keeps a scheduler running.
    It also is required for patch 3 below which introduces asynchronous
    discovery process.

    2. Use device lists handling on per-net basis

    This patch allows to correctly support multiple RapidIO nets and
    resolves possible issues caused by using single global list of devices
    during RapidIO system enumeration/discovery. The most common sign of
    existing issue is incorrect contents of switch routing tables in
    systems with multiple mport controllers while single-port configuration
    performs as expected.

    The patch does not eliminate the global RapidIO device list but
    changes some routines in enumeration/discovery to use per-net device
    lists instead. This way compatibility with upper layer RIO routines is
    preserved.

    3. Run discovery as an asynchronous process

    This patch modifies RapidIO initialization routine to asynchronously
    run the discovery process for each corresponding mport. This allows
    having an arbitrary order of enumerating and discovering mports without
    creating a deadlock situation if an enumerator port was registered
    after a discovering one.

    On boards with multiple discovering mports it also eliminates order
    dependency between mports and may reduce total time of RapidIO
    subsystem initialization.

    Making netID matching to mportID ensures consistent netID assignment
    in multiport RapidIO systems with asynchronous discovery process
    (global counter implementation is affected by race between threads).

    4. Rework RIONET to support multiple RIO master ports

    In the current version of the driver rionet_probe() has comment "XXX
    Make multi-net safe". Now it is a good time to address this comment.

    This patch makes RIONET driver multi-net safe/capable by introducing
    per-net lists of RapidIO network peers. It also enables to register
    network adapters for all available mport devices.

    5. Add destination ID allocation mechanism

    The patch replaces a single global destination ID counter with
    per-net allocation mechanism to allow independent destID management for
    each available RapidIO network. Using bitmap based mechanism instead
    of counters allows destination ID release and reuse in systems that
    support hot-swap.

    This patch:

    Fix blocking wait loop in the RapidIO discovery routine to avoid warning
    dumps about stalled CPU on x86 platforms.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Apply port RX/TX enable operations only to active switch ports.

    RapidIO specification (Part 6: LP-Serial Physical Layer) recommends to
    keep Output Port Enable (TX) and Input Port Enable (RX) control bits in
    disabled state (0b0) after device reset. It also allows to have
    implementation specific reset state for these bits.

    This patch ensures that TX/RX enable action is applied only to active
    switch's ports while preserving an initial state of inactive ones.

    This patch is intended to keep inactive switch ports with inbound and
    outbound packet transfers disabled to block unexpected packets during hot
    insertion event. While it does not fix any visible malfunction it is
    intended to prevent such events in future.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add Tsi721 routines to support RapidIO subsystem's inbound memory mapping
    interface (RapidIO to system's local memory).

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add common inbound memory mapping/unmapping interface. This allows to make
    local memory space accessible from the RapidIO side using hardware mapping
    capabilities of RapidIO bridging devices. The new interface is intended to
    enable data transfers between RapidIO devices in combination with DMA engine
    support.

    This patch is based on patch submitted by Li Yang
    (https://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/071210.html)

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine