29 Jan, 2014

1 commit

  • I observed that there are for_each macros that do an extra memory access
    beyond the defined area.
    Normally this does not cause problems.
    But, this can cause exceptions. For example: if the area is allocated at
    the end of a page and the next page is not accessible.

    For correctness, I suggest changing the arguments of the 'for loop' like
    others 'for_each' do in the kernel.

    Signed-off-by: Jose Alonso
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Jose Alonso
     

27 Jun, 2013

2 commits

  • Move the code to issue the set adapter device controls command to
    chsc.c and make it accessible for the qdio code via the wrapper
    chsc_sadc.

    Reviewed-by: Ursula Braun
    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Cleanup the function qdio_setup_get_ssqd. Fix some possible
    memleaks and an unchecked allocation and create a wrapper
    for SSQD in chsc.c .

    Reviewed-by: Ursula Braun
    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     

20 Jul, 2012

1 commit

  • Remove the file name from the comment at top of many files. In most
    cases the file name was wrong anyway, so it's rather pointless.

    Also unify the IBM copyright statement. We did have a lot of sightly
    different statements and wanted to change them one after another
    whenever a file gets touched. However that never happened. Instead
    people start to take the old/"wrong" statements to use as a template
    for new files.
    So unify all of them in one go.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

30 Oct, 2011

3 commits

  • A kernel panic may occur during sending or receiving network packets
    on a machine without adapter interrupts since commit d36deae.
    The bug is triggered by writing to the shared indicator address which
    is set to 0 if the machine doesn't have adapter interrupts.

    Make the reading and setting of the shared indicator dependent on the
    adapter interrupt feature and while at it move the code to the
    file containing the adapter interrupt related code.

    Thanks to Jan Jaeger for tracking this down.

    Reported-by: Jan Jaeger
    Tested-by: Jan Jaeger
    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • The multicast poll check for the outbound queue is redundant since
    3d6c76f "[S390] qdio: outbound tasklet scan threshold". Remove the check.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Add a timestamp per queue and update the timestamp when the queue is
    scanned. Add the queue timestamps and the timestamp of the last
    adapter interrupt to the debugfs output. The timestamps are useful
    for debugging stall conditions.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

13 Aug, 2011

2 commits


03 Aug, 2011

1 commit

  • The SIGA-W may return with the busy bit set which means the device was
    blocked. The busy loop which retries the SIGA-W for 100us may not be
    long enough when running under a heavily loaded hypervisor.

    Extend the retry mechanism by adding a longer second stage which retries
    the SIGA-W for up to 10s. In difference to the first retry loop the second
    stage is using mdelay to stop the cpu between the retries and thereby
    avoid additional preassure in on the hypervisor.
    If the second stage retry is successfull a device reset is avoided.

    Signed-off-by: Jan Glauber
    Signed-off-by: Heiko Carstens

    Jan Glauber
     

05 Jan, 2011

6 commits

  • Simplify the SIGA sync code and add unlikely annotations. In polling mode
    SBALs may be accessed without interrupt, so call SIGA sync before every scan.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • HiperSocket devices only use one SBAL per qdio call without the enhanced SIGA
    feature. Since that feature is currently not used remove it from the qdio code
    so the compiler can generate better code for the HiperSocket outbound path.
    While at it mark the SIGA error conditions as unlikely.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • If QIOASSIST is enabled for a qdio device the SIGA instruction requires
    a modified function code. This function code modifier was missing for
    SIGA-R and SIGA-S which can lead to a kernel panic caused by an
    operand exception.

    Cc: stable@kernel.org
    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Add a counter for outbound queue full events to the qdio statistics.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Introduce a scan treshold for the qdio outbound queues. By setting the
    threshold the driver can tell qdio after how much used SBALs qdio
    should schedule the outbound tasklet that scans the queue for finished
    SBALs. The threshold is specific by the drivers because a
    Hipersockets device is much faster in utilizing outbound buffers than a
    ZFCP or OSA device.

    The default values after how many used SBALs the tasklet should run are:

    OSA: > 31 SBALs
    Hipersockets: > 7 SBALs
    zfcp: > 55 SBALs

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • If the shared indicator is used the following race leads to
    an inbound stall:

    Device CPU0 CPU1
    ========================================================

    non-shared DSCI =>1
    ALSI => 1
    Thin INT
    ALSI => 0

    non-shared DSCI
    tasklets scheduled

    shared DSCI => 1
    ALSI => 1

    shared DSCI => 0
    ALSI ? -> set
    Thin INT
    ALSI => 0
    ALSI was set,
    shared DSCI => 1

    After that no more interrupts occur because the DSCI is still set.
    Fix that race by only resetting the shared DSCI if it was actually
    set so the tasklets for all shared devices are scheduled and will
    run after the interrupt.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

09 Sep, 2010

1 commit

  • Extend the qdio API to allow polling in the upper-layer driver. This
    is needed by qeth to use NAPI.

    To use the new interface the upper-layer driver must specify the
    queue_start_poll(). This callback is used to signal the upper-layer
    driver that is has initiative and must process the inbound queue by
    calling qdio_get_next_buffers(). If the upper-layer driver wants to
    stop polling it calls qdio_start_irq().

    Since adapter interrupts are not completely stoppable qdio implements
    a software bit QDIO_QUEUE_IRQS_DISABLED to safely disable interrupts for an
    input queue.

    The old interface is preserved and will be used as is by zfcp.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Jan Glauber
     

17 May, 2010

2 commits


27 Feb, 2010

2 commits

  • Remove a memset hack that relied on the internal layout of the
    qdio_irq struct and move the per device statistics data into an own
    cache line to avoid cache line bashing between the inbound and the
    outbound queue tasklets. Also reduce the number of allocated queues
    from 32 to 4 which is the current maximum. That saves a cache line
    in struct qdio_irq.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Add counters for the number of processed SBALs. The numbers summarize
    how many SBALs were processed at each queue scan and indicate the
    utilization of the queue. Furthermore the number of unsuccessfull
    queue scans, SBAL errors and the total number of processed
    SBALs are accounted.

    Also regroup struct qdio_q to move read-mostly and write-mostly data
    into different cachelines.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

04 Jan, 2010

1 commit

  • Revamp the qdio performance statistics and move them from procfs to
    debugfs using the seq_file interface. Since the statistics are not
    intended for the general user the removal of /proc/qdio_perf should
    not surprise anyone.

    The per device statistics are disabled by default, writing 1 to
    //qdio//statistics enables the
    statistics for the given device.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

11 Sep, 2009

1 commit


22 Jun, 2009

1 commit


26 Mar, 2009

3 commits

  • The inbound and outbound handlers are nearly identical if the outbound
    handler uses first_to_check as end index instead of last_move. Since both
    values are identical at that point the handlers can be merged.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Errors from SIGA instructions are stored in the per queue qdio_error
    and reported back when the queue handler is called. That opens a race
    when multiple error conditions occur simultanously.

    Report SIGA errors immediately in the return value of do_QDIO so the
    upper layer can react and SIGA errors no longer interfere with other
    errors.

    Move the SIGA error handling in qeth from the outbound handler to
    qeth_flush_buffers.

    Signed-off-by: Jan Glauber

    Jan Glauber
     
  • The index value that indicated that the input queue moved was also used to
    store the index of the first acknowledged buffer. For non-qebsm only the
    newest buffer is acknowledged which may be different from the last move index
    so two seperate values are needed to track the input queue.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

25 Dec, 2008

4 commits

  • Hipersocket connections can encounter temporary busy conditions.
    In case of the busy bit set we retry the SIGA operation immediatelly.
    If the busy condition still persists after 100 ms we fail and report
    the error to the upper layer. The second stage retry logic is removed.
    In case of ongoing busy conditions the upper layer needs to reset the
    connection.

    The reporting of a SIGA error is now done synchronously to allow the
    network driver to requeue the buffers. Also no error trace is created
    for the temporary SIGA errors so the error message view is not flooded.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • - Use automatic acknowledgement of incoming buffers in QEBSM mode
    - Move ACK for non-QEBSM mode always to the newest buffer to prevent
    a race with qdio_stop_polling
    - Remove the polling spinlock, the upper layer drivers return new buffers
    in the same code path and could not run in parallel
    - Don't flood the error log in case of no-target-buffer-empty
    - In handle_inbound we check if we would overwrite an ACK'ed buffer, if so
    advance the pointer to the oldest ACK'ed buffer so we don't overwrite an
    empty buffer in qdio_stop_polling

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • - make qdio_trace a per device view
    - remove s390dbf exceptions
    - remove CONFIG_QDIO_DEBUG, not needed anymore if we check for the level
    before calling sprintf
    - use snprintf for dbf entries
    - add start markers to see if the dbf view wrapped
    - add a global error view for all queues

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • qeth needs to get the port count information before
    qdio has allocated a page for the chsc operation.
    Extend qdio_get_ssqd_desc() to store the data in the
    specified structure.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

11 Oct, 2008

2 commits

  • Add support for z10 HiperSockets multiwrite SBALs on output
    queues. This is used on LPAR with EDDP enabled devices.

    Signed-off-by: Klaus-Dieter Wacker
    Signed-off-by: Martin Schwidefsky

    Klaus-Dieter Wacker
     
  • If an asynchronous HiperSockets queue runs full, no further packet
    can be sent. In this case the next initiative to give transmitted
    skbs back to the stack is triggered only by a 10-seconds qdio timer.
    This timer has been introduced for low multicast traffic scenarios
    to guarantee freeing of skbs in a limited amount of time. For high
    HiperSocket multicast traffic scenarios progress checking on the
    outbound queue should be enforced by tasklet rescheduling.

    Signed-off-by: Ursula Braun
    Signed-off-by: Martin Schwidefsky

    Ursula Braun
     

17 Jul, 2008

1 commit

  • List of major changes:
    - split qdio driver into several files
    - seperation of thin interrupt code
    - improved handling for multiple thin interrupt devices
    - inbound and outbound processing now always runs in tasklet context
    - significant less tasklet schedules per interrupt needed
    - merged qebsm with non-qebsm handling
    - cleanup qdio interface and added kerneldoc
    - coding style

    Reviewed-by: Cornelia Huck
    Reviewed-by: Utz Bacher
    Reviewed-by: Ursula Braun
    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Jan Glauber
     

14 Jul, 2008

2 commits

  • This patch adds a driver for subchannels of type chsc.

    A device /dev/chsc is created which may be used to issue ioctls to:
    - obtain information about the machine's I/O configuration
    - dynamically change the machine's I/O configuration via
    asynchronous chsc commands

    Signed-off-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Cornelia Huck
     
  • Replace the numeric values for I/O interruption subclass usage
    with abstract definitions and collect them all in asm/isc.h.
    This gives us a better overview of which iscs are actually used
    and makes it possible to better spread out isc usage in the
    future.

    Signed-off-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Cornelia Huck
     

17 Apr, 2008

1 commit


19 Feb, 2008

1 commit

  • Current code in qdio_activate waits for at least 5 seconds
    until it returns. It may return earlier if an error occurs,
    but not if everything is ok. This large timeout value
    became visible with commit dfa77f611ff295598e218aa0eb6efa73a5cf26d0
    "qdio: set QDIO_ACTIVATE_TIMEOUT to 5s", which intended to
    fix the timeout value which was zero. In turn setting an
    FCP adapter online took 5 seconds.

    In practice waiting for 5ms before continuing is sufficient
    as pointed out by Utz Bacher and Cornelia Huck.

    Cc: Utz Bacher
    Cc: Jan Glauber
    Cc: Ursula Braun
    Cc: Martin Peschke
    Acked-by: Cornelia Huck
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

26 Jan, 2008

1 commit


08 May, 2007

1 commit