16 Sep, 2009

1 commit


15 Sep, 2009

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (209 commits)
    [SCSI] fix oops during scsi scanning
    [SCSI] libsrp: fix memory leak in srp_ring_free()
    [SCSI] libiscsi, bnx2i: make bound ep check common
    [SCSI] libiscsi: add completion function for drivers that do not need pdu processing
    [SCSI] scsi_dh_rdac: changes for rdac debug logging
    [SCSI] scsi_dh_rdac: changes to collect the rdac debug information during the initialization
    [SCSI] scsi_dh_rdac: move the init code from rdac_activate to rdac_bus_attach
    [SCSI] sg: fix oops in the error path in sg_build_indirect()
    [SCSI] mptsas : Bump version to 3.04.12
    [SCSI] mptsas : FW event thread and scsi mid layer deadlock in SYNCHRONIZE CACHE command
    [SCSI] mptsas : Send DID_NO_CONNECT for pending IOs of removed device
    [SCSI] mptsas : PAE Kernel more than 4 GB kernel panic
    [SCSI] mptsas : NULL pointer on big endian systems causing Expander not to tear off
    [SCSI] mptsas : Sanity check for phyinfo is added
    [SCSI] scsi_dh_rdac: Add support for Sun StorageTek ST2500, ST2510 and ST2530
    [SCSI] pmcraid: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller
    [SCSI] qla2xxx: Update version number to 8.03.01-k6.
    [SCSI] qla2xxx: Properly delete rports attached to a vport.
    [SCSI] qla2xxx: Correct various NPIV issues.
    [SCSI] qla2xxx: Correct qla2x00_eh_wait_on_command() to wait correctly.
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
    netxen: update copyright
    netxen: fix tx timeout recovery
    netxen: fix file firmware leak
    netxen: improve pci memory access
    netxen: change firmware write size
    tg3: Fix return ring size breakage
    netxen: build fix for INET=n
    cdc-phonet: autoconfigure Phonet address
    Phonet: back-end for autoconfigured addresses
    Phonet: fix netlink address dump error handling
    ipv6: Add IFA_F_DADFAILED flag
    net: Add DEVTYPE support for Ethernet based devices
    mv643xx_eth.c: remove unused txq_set_wrr()
    ucc_geth: Fix hangs after switching from full to half duplex
    ucc_geth: Rearrange some code to avoid forward declarations
    phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
    drivers/net/phy: introduce missing kfree
    drivers/net/wan: introduce missing kfree
    net: force bridge module(s) to be GPL
    Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
    ...

    Fixed up trivial conflicts:

    - arch/x86/include/asm/socket.h

    converted to in the x86 tree. The generic
    header has the same new #define's, so that works out fine.

    - drivers/net/tun.c

    fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
    switched over to using 'tun->socket.sk' instead of the redundantly
    available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
    to the TUN driver") which added a new 'tun->sk' use.

    Noted in 'next' by Stephen Rothwell.

    Linus Torvalds
     

11 Sep, 2009

29 commits

  • For messages from the tape core that is shared between the 3590 and 34xx
    tape disciplines, we want to have the "tape" prefix instead of "tape_3590"
    or "tape_34xx". In order to fix this, we now use the pr_xxx printk macros.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • Merge cpuid.h header file into cpu.h.
    While at it convert from typedef to struct declaration and also
    convert cio code to use proper lowcore structure instead of casts.

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

    Heiko Carstens
     
  • Currently, when a tape device is set online and no cartridge is loaded, we
    get the messages "The tape cartridge has been successfully unloaded" and
    "Determining the size of the recorded area". These messages are not correct.
    To fix this, we now print the "cartridge loaded/unloaded" messages only,
    when the load/unload event really occurs. In addition to that, the message
    "Determining the size of the recorded area" is only printed, if a cartridge
    is loaded.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • Use a console_initcall() to initialize the s390 virtio console and
    clean up s390 console initialization in setup.c.

    Signed-off-by: Hendrik Brueckner
    Tested-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Hendrik Brueckner
     
  • Fix the order of goto labels in tape_generic_online.

    Signed-off-by: Roel Kluin

    Roel Kluin
     
  • If dev_set_name fails during scanning the AP bus, the reserved memory
    has to be freed.

    Signed-off-by: Felix Beck
    Signed-off-by: Martin Schwidefsky

    Felix Beck
     
  • Fix lock dependency warning.

    inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
    bash/1442 [HC0[0]:SC0[0]:HE1:SE1] takes:
    (&ap_dev->lock){+.?...}, at: [] __ap_poll_device+0x40/0x3e8 [ap]
    {IN-SOFTIRQ-W} state was registered at:
    [] __lock_acquire+0xb78/0x182c
    [] lock_acquire+0x146/0x178
    [] _spin_lock+0x5a/0x98
    [] __ap_poll_device+0x40/0x3e8 [ap]
    [] ap_poll_all+0xaa/0x1a4 [ap]
    [] tasklet_action+0xfe/0x1f4
    [] __do_softirq+0x116/0x284
    [] do_softirq+0xe4/0xe8
    [] irq_exit+0xba/0xd8
    [] do_IRQ+0x176/0x1fc
    [] io_return+0x0/0x8
    [] 0x4bfbfd2c0e

    Signed-off-by: Felix Beck
    Signed-off-by: Martin Schwidefsky

    Felix Beck
     
  • Currently in the suspend process checksums for the XPRAM partitions are
    created and stored. During the resume process it is checked,
    if the checksums are still the same. If this is not the case, a kernel panic
    is triggered. Unfortunately this prevents XPRAM from beeing used as suspend
    device, because in this case after the checksum has been created, the
    memory image is written to XPRAM and therefore the contents of the suspend
    partition is changed. In order to allow XPRAM to be used as suspend device,
    this patch removes the checksum validation.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • The vmur class is allocated after the CCW driver is registered
    and it is destroyed before the CCW driver is unregistered.
    This is not the correct sequence, because the vmur class can be used
    via driver core callbacks that are triggered during the CCW driver
    deregistration. For Example:

    1. vmur device is online
    2. vmur module is unloaded

    This leads to the following function call stack:

    [] device_destroy+0x36/0x5c
    [] ur_set_offline_force+0x9c/0x10c [vmur]
    [] ur_remove+0x64/0xbc [vmur]
    [] ccw_device_remove+0x42/0x1ac
    [] __device_release_driver+0x9a/0xe4
    [] driver_detach+0xe6/0xec
    [] bus_remove_driver+0xc0/0x108
    [] ur_exit+0x52/0x84 [vmur]

    In device_destroy() the vmur class is used. Since it is already freed,
    this can lead to a kernel panic.

    To fix the problem, the vmur class has to be allocated before the CCW
    driver is registered and destroyed after the CCW driver has ben unregistered.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • Signed-off-by: Hans-Joachim Picht
    Signed-off-by: Martin Schwidefsky

    Hans-Joachim Picht
     
  • With CONFIG_DEBUG_OBJECTS_TIMERS=y "chccwdev --online" for a tape device
    will fail with message "ODEBUG: object is on stack, but not annotated".
    We now use init_timer_on_stack.

    Signed-off-by: Frank Munzert
    Signed-off-by: Martin Schwidefsky

    Frank Munzert
     
  • Don't use kfree directly after device registration started.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • This patch fixes message naming so that generic dasd messages do not
    contain the device discipline. For this purpose the dev_ makros are
    replaced by pr_ makros for generic dasd messages.

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky

    Stefan Haberland
     
  • remove unnecessary dbf call, remove string operations for magic

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky

    Stefan Haberland
     
  • A DASD device that is not ready or online has no defined disk layout,
    so all requests that arrive in such a state need to be returned as
    failed.

    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     
  • We used the init_name to set the console ccw_device's name early
    at the boot stage. This patch moves the name setting (for all ccw
    devices) to the point where we actually register the device. At this
    time we can do dynamic allocations and therefore use dev_set_name.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • We use a test_and_clear_bit to prevent a device from being
    unregistered twice. Unfortunately in this cases the "final"
    put_device (from device_initialize) was issued more than once,
    resulting in an use after free error. Fix this by moving this
    put_device to ccw_device_unregister.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • We used the init_name to set the console subchannels name early
    at the boot stage. With the patch cio: fix memleak in subchannel validation
    we moved the name setting to the point where we actually register the
    console subchannel. At this time we can do dynamic allocations and therefore
    use dev_set_name.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • When scanning for new subchannels we have a code path where we allocate
    memory for a struct subchannel, set the device name (which is dynamically
    allocated now) and do a check if the underlying device is blacklisted - if
    so we free the subchannel structure.
    Since we have not set up refcounting at this stage, the device name's memory
    is lost. Fix this by moving the dev_set_name after the blacklist test.

    Note: With this patch the init_name for the console subchannel becomes
    virtually obsolete.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • When using s390dbf with "%s" in sprintf format strings the string itself
    is not copied to the dbf buffer.
    Since in this case only pointers are stored in the s390dbf, we should
    not use dev_name - which is bound to the lifetime of the device.
    Reading this entry from s390dbf after the device was released will cause
    an use after free error.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • The number of qdio debugfs entries was limited. Remove this limit
    and group the queue files in a per device directory.

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

    Jan Glauber
     
  • When unit checks trigger sensing the device state is set to W4SENSE
    until sense completion; then the device state is set back to
    ONLINE. If a unit check occurs while set online or set offline
    requests are processed then it might happen that the device's
    temporary W4SENSE state causes these functions to terminate,
    leaving the device in an inconsistent state when the state is set
    back to ONLINE later on so that the device cannot be set online or
    offline any longer.
    To solve this, set online/offline and related rollback or error
    routines are processed only if the device is in a final or
    DISCONNECTED state.

    Signed-off-by: Michael Ernst
    Signed-off-by: Martin Schwidefsky

    Michael Ernst
     
  • Ensure to always hold an extra device reference for scheduling a
    subchannel deregistration, by moving the get_device to
    ccw_device_schedule_sch_unregister. This fixes an use after free
    error in ccw_device_call_sch_unregister where put_device was called
    on an already freed device structure.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • With commit c38f96080955854e54df9cb392bc674e1ae330e1 polling was
    stopped for the queue even if new data is available.

    Return immediately after scheduling the queue tasklet if the queue
    is not done.

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

    Jan Glauber
     
  • Move debug traces for start I/O and interrupt events to exclusive
    trace levels. Also change tracing in hot-path from sprintf (costly)
    to hex.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • If online/offline processing of a ccw device fails, resulting in not
    operational state, notify the driver and unregister the device in case
    the driver dosn't want to keep it.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Ensure that the hardware interruption parameter for a subchannel is
    reset when the associated subchannel data structure is freed.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     
  • All scsw helper functions are very short and usage of them shouldn't
    result in function calls. Therefore we move them to a separate header
    file.
    Also saves a lot of EXPORT_SYMBOLs.

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

    Heiko Carstens
     
  • Path verification events occurring for offline devices are currently
    ignored. As a result, offline devices are not removed, even though
    they might no longer be accessible (for example because the last path
    to the device was varied offline). Fix this by scheduling a status
    evaluation for the affected subchannel when a path verification event
    occurs.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     

05 Sep, 2009

8 commits

  • Remove expensive ktime_get()/ktime_us_delta() functions from the hot
    path and use get_clock_monotonic() instead. This elimates seven
    function calls and avoids a lot of unnecessary calculations.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Heiko Carstens
     
  • The timestamp calculation used for s390dbf output is the same in a
    private zfcp function and in debug.c. Replace both with a common
    inline function.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • dev_set_name tries to allocate memory, so check the return value for
    allocation failures. After dev_set_name succeeds, call device_register
    as next step to be able to use put_device during error handling.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Don't use kfree directly after device registration started.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Sebastian Ott
     
  • The config semaphore is only used as a mutex, so replace it with a
    simple mutex.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • So far, zfcp allocated all resources required for FCP
    adapters/subchannels when the device was discovered in the ccw_probe
    callback. If there are lots of unused FCP subchannels attached to a
    system, this is a waste of resources. To alleviate this, defer the
    resource allocation to the first call to ccw_set_online. To avoid
    disruptions during possible following calls to ccw_set_offline and
    then ccw_set_online, keep the adapter resources until the device is
    finally being removed via ccw_remove. While doing this, also manage
    the zfcp erp thread together with all other adapter resources in
    zfcp_adapter_enqueue/dequeue.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • The recommendation for a timeout of 2 * R_A_TOV is the same for ct/gs
    and els requests, so set it in the common function used for
    initializing both request types. Besides, the timer inside zfcp should
    only run longer than the timeout set for the channel, so 10 seconds
    more should be enough (instead of 60 seconds).

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Switch the creation of the zfcp erp thread from the deprecated
    kernel_thread API to the kthread API. This allows also the removal of
    some flags in zfcp since the kthread API handles thread creation and
    shutdown internally. To allow the usage of the kthread_stop function,
    replace the erp ready semaphore with a waitqueue for waiting until erp
    actions arrive on the ready queue.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt