1. 23 3月, 2016 4 次提交
  2. 26 5月, 2015 1 次提交
  3. 08 4月, 2014 1 次提交
    • A
      rapidio: rework device hierarchy and introduce mport class of devices · 2aaf308b
      Alexandre Bounine 提交于
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com>
      Cc: Stef van Os <stef.van.os@prodrive-technologies.com>
      Cc: Jerry Jacobs <jerry.jacobs@prodrive-technologies.com>
      Cc: Arno Tiemersma <arno.tiemersma@prodrive-technologies.com>
      Cc: Rob Landley <rob@landley.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2aaf308b
  4. 04 7月, 2013 4 次提交
    • A
      rapidio: change endpoint device name format · 6ca40c25
      Alexandre Bounine 提交于
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Cc: Stef van Os <stef.van.os@Prodrive.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6ca40c25
    • A
      rapidio: update enumerator registration mechanism · 9edbc30b
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Cc: Stef van Os <stef.van.os@Prodrive.nl>
      Cc: Jean Delvare <jdelvare@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9edbc30b
    • A
      rapidio: convert switch drivers to modules · 2ec3ba69
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Cc: Stef van Os <stef.van.os@Prodrive.nl>
      Cc: Jean Delvare <jdelvare@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2ec3ba69
    • W
      drivers/rapidio/rio-scan.c: make functions static · 36f0efbb
      Wu Fengguang 提交于
      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: NFengguang Wu <fengguang.wu@intel.com>
      Cc: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      36f0efbb
  5. 25 5月, 2013 2 次提交
    • A
      rapidio: add enumeration/discovery start from user space · bc8fcfea
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bc8fcfea
    • A
      rapidio: make enumeration/discovery configurable · a11650e1
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
      Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a11650e1
  6. 29 11月, 2012 1 次提交
  7. 11 10月, 2012 2 次提交
  8. 06 10月, 2012 5 次提交
    • A
      rapidio: add destination ID allocation mechanism · de74e00a
      Alexandre Bounine 提交于
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      de74e00a
    • A
      rapidio: run discovery as an asynchronous process · 005842ef
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      005842ef
    • A
      rapidio: use device lists handling on per-net basis · a7071efc
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a7071efc
    • A
      rapidio: fix blocking wait for discovery ready · fa3dbaa0
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa3dbaa0
    • A
      rapidio: apply RX/TX enable to active switch ports only · 8d4630dc
      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: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d4630dc
  9. 03 11月, 2011 2 次提交
  10. 26 8月, 2011 1 次提交
    • A
      rapidio: fix use of non-compatible registers · 284fb68d
      Alexandre Bounine 提交于
      Replace/remove use of RIO v.1.2 registers/bits that are not
      forward-compatible with newer versions of RapidIO specification.
      
      RapidIO specification v.1.3 removed Write Port CSR, Doorbell CSR,
      Mailbox CSR and Mailbox and Doorbell bits of the PEF CAR.
      
      Use of removed (since RIO v.1.3) register bits affects users of
      currently available 1.3 and 2.x compliant devices who may use not so
      recent kernel versions.
      
      Removing checks for unsupported bits makes corresponding routines
      compatible with all versions of RapidIO specification.  Therefore,
      backporting makes stable kernel versions compliant with RIO v.1.3 and
      later as well.
      Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Thomas Moll <thomas.moll@sysgo.com>
      Cc: Chul Kim <chul.kim@idt.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      284fb68d
  11. 31 3月, 2011 1 次提交
  12. 24 3月, 2011 1 次提交
  13. 23 1月, 2011 1 次提交
  14. 14 1月, 2011 4 次提交
  15. 28 10月, 2010 5 次提交
  16. 31 5月, 2010 1 次提交
    • R
      rapidio: fix new kernel-doc warnings · 97ef6f74
      Randy Dunlap 提交于
      Fix a bunch of new rapidio kernel-doc warnings:
      
      Warning(include/linux/rio.h:123): No description found for parameter 'comp_tag'
      Warning(include/linux/rio.h:123): No description found for parameter 'phys_efptr'
      Warning(include/linux/rio.h:123): No description found for parameter 'em_efptr'
      Warning(include/linux/rio.h:123): No description found for parameter 'pwcback'
      Warning(include/linux/rio.h:247): No description found for parameter 'set_domain'
      Warning(include/linux/rio.h:247): No description found for parameter 'get_domain'
      Warning(drivers/rapidio/rio-scan.c:1133): No description found for parameter 'rdev'
      Warning(drivers/rapidio/rio-scan.c:1133): Excess function parameter 'port' description in 'rio_init_em'
      Warning(drivers/rapidio/rio.c:349): No description found for parameter 'rdev'
      Warning(drivers/rapidio/rio.c:349): Excess function parameter 'mport' description in 'rio_request_inb_pwrite'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'port'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'local'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'destid'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'hopcount'
      Warning(drivers/rapidio/rio.c:393): Excess function parameter 'rdev' description in 'rio_mport_get_physefb'
      Warning(drivers/rapidio/rio.c:845): Excess function parameter 'local' description in 'rio_std_route_clr_table'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Alexandre Bounine <alexandre.bounine@idt.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97ef6f74
  17. 28 5月, 2010 4 次提交