12 Nov, 2010

1 commit

  • The size calculation is done incorrectly here because it should include
    both the start and end (end - start + 1). It's easiest to just use
    resource_size() which does the right thing.

    I was worried there was something non-standard going on because the
    printk() subtracts "end - 1", but the rest of the file uses the normal
    resource size calculations. This function is only called from
    fsl_rio_setup() in arch/powerpc/sysdev/fsl_rio.c and the calculation
    there is also:

    port->iores.start = law_start;
    port->iores.end = law_start + law_size - 1;

    So I think this is the correct fix.

    Signed-off-by: Dan Carpenter
    Cc: Alexandre Bounine
    Acked-by: Li Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

28 Oct, 2010

12 commits

  • Replace possibly damaging broadcast writes into the per-port SP_MODE
    registers with individual writes for each port. This will preserve
    individual port configurations in case if ports are configured
    differently.

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

    Alexandre Bounine
     
  • Replace hardcoded maximum port number with actual reported number of
    switch ports.

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

    Alexandre Bounine
     
  • RapidIO spec v.2.1 adds Idle Sequence 2 into LP-Serial Physical Layer.
    The fix ensures that corresponding bits are not corrupted during error
    handling.

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

    Alexandre Bounine
     
  • Detects RIO link to the already enumerated device and properly sets links
    between device objects. Changes to the enumeration/discovery logic:

    1. Use Master Enable bit to signal end of the enumeration - agents may
    start their discovery process as soon as they see this bit set
    (Component Tag register was used before for this purpose).

    2. Enumerator sets Component Tag (!= 0) immediately during device
    setup. This allows to identify the device if the redundant route
    exists in a RIO system.

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

    Alexandre Bounine
     
  • Add the RIO switch driver and definitions for IDT CPS-1848 and CPS-1616
    Gen2 devices.

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

    Alexandre Bounine
     
  • Add explicit device access check before performing device enumeration.
    This gives a chance to clear possible link error conditions by issuing
    safe maintenance read request(s).

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

    Alexandre Bounine
     
  • Add check for access to port-write (PW) message source device before
    processing the PW message. If source RIO device is not available (power
    down or RIO link failure) trace back to a last available switch/port on
    the PW message route and service failure at that point.

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

    Alexandre Bounine
     
  • 1. Change to create attribute "routes" only for switches.

    2. Add a switch-specific callback to create/remove proprietary attributes.

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

    Alexandre Bounine
     
  • The default error-stopped state handler provides recovery mechanism as
    defined by RIO specification.

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

    Alexandre Bounine
     
  • Create back and forward links between RIO devices. These links are
    intended for use by error management and hot-plug extensions. Links for
    redundant RIO connections between switches are not set (will be fixed in a
    separate patch).

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

    Alexandre Bounine
     
  • The switch port information is obtained and stored during RIO device
    setup. Therefore repeated reads from Switch Port Information CAR may be
    removed.

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

    Alexandre Bounine
     
  • This set of RapidIO patches extends support for standard error recovery
    mechanism and adds new IDT Gen2 sRIO switch devices - CPS-1848 and
    CPS-1616. Implementation of the standard error-stopped state recovery
    mechanism (as defined by the RapidIO specification) is required for the
    new switches.

    Version 2 of this set of patches addresses received comments and fixes an
    error notification setup issue found in the idt_gen2.c after the first
    version was released.

    This patch:

    Make RapidIO devices appear in /sys/devices/rapidio directory instead of
    top of /sys/devices directory.

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

    Alexandre Bounine
     

17 Jun, 2010

1 commit


31 May, 2010

1 commit

  • 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: Randy Dunlap
    Cc: Alexandre Bounine
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

28 May, 2010

9 commits

  • Fix to use correct default value for routing table entries.

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

    Alexandre Bounine
     
  • Add switch specific domain routines required for 16-bit routing support in
    switches with hierarchical implementation of routing tables.

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

    Alexandre Bounine
     
  • Modify the way how RapidIO switch operations are declared. Multiple
    assignments through the linker script replaced by single initialization
    call.

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

    Alexandre Bounine
     
  • Add debug configuration option for RapidIO subsystem.

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

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

    Alexandre Bounine
     
  • Add the functionality to enable Input receiver and Output transmitter of
    every port, to allow non-maintenance traffic.

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

    Thomas Moll
     
  • Add RapidIO Port-Write message handling in the context of Error
    Management Extensions Specification Rev.1.3.

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

    Alexandre Bounine
     
  • Add switch access locking during RapidIO discovery. Access lock is
    required when reading switch routing table contents due to indexed
    mechanism of RT addressing.

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

    Alexandre Bounine
     
  • Extentions to RapidIO switch support:

    1. modify switch route operation declarations to allow using single
    switch-specific file for family of switches that share the same route
    table operations.

    2. add standard route table operations for switches that that support
    route table manipulation registers as defined in the Rev.1.3 of RapidIO
    specification.

    3. add clear-route-table operation for switches

    4. add CPSxx and TSIxxx families of RapidIO switches

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

    Alexandre Bounine
     

22 May, 2010

1 commit


16 Jun, 2009

1 commit

  • Adding failure path for the following two cases.

    warning: ignoring return value of 'device_add', declared with attribute warn_unused_result
    warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result

    Signed-off-by: Li Yang
    Signed-off-by: Kumar Gala

    Yang Li
     

19 May, 2009

1 commit


07 Apr, 2009

1 commit


25 Mar, 2009

1 commit


07 Jan, 2009

1 commit

  • Remove excess kernel-doc notation from rio header and driver:

    Warning(include/linux/rio_drv.h:399): Excess function parameter or struct member 'buffer' description in 'rio_get_inb_message'

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

    Randy Dunlap
     

16 Dec, 2008

1 commit


01 Dec, 2008

1 commit


11 Jul, 2008

1 commit


29 Apr, 2008

2 commits

  • The RapidIO system size will auto probe in RIO setup. The route table
    and rionet_active in rionet.c are changed to be allocated dynamically
    according to the size of the system.

    Signed-off-by: Zhang Wei
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Zhang Wei
     
  • The original RapidIO driver suppose there is only one mpc85xx RIO controller
    in system. So, some data structures are defined as mpc85xx_rio global, such
    as 'regs_win', 'dbell_ring', 'msg_tx_ring'. Now, I changed them to mport's
    private members. And you can define multi RIO OF-nodes in dts file for multi
    RapidIO controller in one processor, such as PCI/PCI-Ex host controllers in
    Freescale's silicon. And the mport operation function declaration should be
    changed to know which RapidIO controller is target.

    Signed-off-by: Zhang Wei
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Zhang Wei
     

04 Mar, 2008

1 commit


31 Jan, 2008

1 commit


29 Jan, 2008

1 commit


24 Jan, 2008

1 commit

  • drivers/rapidio/rio.c: In function 'rio_get_asm':
    drivers/rapidio/rio.c:413: error: implicit declaration of function 'in_interrupt'
    drivers/rapidio/rio.c: In function 'rio_init_mports':
    drivers/rapidio/rio.c:480: warning: format '%8.8lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t'
    drivers/rapidio/rio.c:480: warning: format '%8.8lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'

    Signed-off-by: Kumar Gala

    Kumar Gala
     

20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau