03 Apr, 2009

1 commit

  • It is a fairly common operation to have a pointer to a work and to need a
    pointer to the delayed work it is contained in. In particular, all
    delayed works which want to rearm themselves will have to do that. So it
    would seem fair to offer a helper function for this operation.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Jean Delvare
    Acked-by: Ingo Molnar
    Cc: "David S. Miller"
    Cc: Herbert Xu
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Greg KH
    Cc: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

02 Apr, 2009

1 commit

  • Commit 64ef8957986f6a04f61e7c95fa6ffeb3a86a6661 ("qeth: remove EDDP")
    removed the qeth_core_offl.[hc] files, but ended up doing so by just
    patching them to zero size, rather than removing them properly.

    Actually remove the files.

    Reported-by: Andrew Price
    Cc: Frank Blaschka
    Cc: David S. Miller
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

01 Apr, 2009

5 commits


31 Mar, 2009

1 commit

  • Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
    as correctly noted at bug #12454. Someone can lookup entry with NULL
    ->owner, thus not pinning enything, and release it later resulting
    in module refcount underflow.

    We can keep ->owner and supply it at registration time like ->proc_fops
    and ->data.

    But this leaves ->owner as easy-manipulative field (just one C assignment)
    and somebody will forget to unpin previous/pin current module when
    switching ->owner. ->proc_fops is declared as "const" which should give
    some thoughts.

    ->read_proc/->write_proc were just fixed to not require ->owner for
    protection.

    rmmod'ed directories will be empty and return "." and ".." -- no harm.
    And directories with tricky enough readdir and lookup shouldn't be modular.
    We definitely don't want such modular code.

    Removing ->owner will also make PDE smaller.

    So, let's nuke it.

    Kudos to Jeff Layton for reminding about this, let's say, oversight.

    http://bugzilla.kernel.org/show_bug.cgi?id=12454

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     

29 Mar, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (119 commits)
    [SCSI] scsi_dh_rdac: Retry for NOT_READY check condition
    [SCSI] mpt2sas: make global symbols unique
    [SCSI] sd: Make revalidate less chatty
    [SCSI] sd: Try READ CAPACITY 16 first for SBC-2 devices
    [SCSI] sd: Refactor sd_read_capacity()
    [SCSI] mpt2sas v00.100.11.15
    [SCSI] mpt2sas: add MPT2SAS_MINOR(221) to miscdevice.h
    [SCSI] ch: Add scsi type modalias
    [SCSI] 3w-9xxx: add power management support
    [SCSI] bsg: add linux/types.h include to bsg.h
    [SCSI] cxgb3i: fix function descriptions
    [SCSI] libiscsi: fix possbile null ptr session command cleanup
    [SCSI] iscsi class: remove host no argument from session creation callout
    [SCSI] libiscsi: pass session failure a session struct
    [SCSI] iscsi lib: remove qdepth param from iscsi host allocation
    [SCSI] iscsi lib: have lib create work queue for transmitting IO
    [SCSI] iscsi class: fix lock dep warning on logout
    [SCSI] libiscsi: don't cap queue depth in iscsi modules
    [SCSI] iscsi_tcp: replace scsi_debug/tcp_debug logging with iscsi conn logging
    [SCSI] libiscsi_tcp: replace tcp_debug/scsi_debug logging with session/conn logging
    ...

    Linus Torvalds
     

27 Mar, 2009

2 commits

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (81 commits)
    [S390] remove duplicated #includes
    [S390] cpumask: use mm_cpumask() wrapper
    [S390] cpumask: Use accessors code.
    [S390] cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.
    [S390] cpumask: remove cpu_coregroup_map
    [S390] fix clock comparator save area usage
    [S390] Add hwcap flag for the etf3 enhancement facility
    [S390] Ensure that ipl panic notifier is called late.
    [S390] fix dfp elf hwcap/facility bit detection
    [S390] smp: perform initial cpu reset before starting a cpu
    [S390] smp: fix memory leak on __cpu_up
    [S390] ipl: Improve checking logic and remove switch defaults.
    [S390] s390dbf: Remove needless check for NULL pointer.
    [S390] s390dbf: Remove redundant initilizations.
    [S390] use kzfree()
    [S390] BUG to BUG_ON changes
    [S390] zfcpdump: Prevent zcore from beeing built as a kernel module.
    [S390] Use csum_partial in checksum.h
    [S390] cleanup lowcore.h
    [S390] eliminate ipl_device from lowcore
    ...

    Linus Torvalds
     
  • Conflicts:
    drivers/net/wimax/i2400m/usb-notif.c

    David S. Miller
     

26 Mar, 2009

29 commits

  • Use kzfree() instead of memset() + kfree().

    Signed-off-by: Johannes Weiner
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Johannes Weiner
     
  • Signed-off-by: Stoyan Gaydarov
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Stoyan Gaydarov
     
  • The cksm function in system.h is duplicate to csum_partial in checksum.h.
    Remove cksm and use csum_partial instead.

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

    Frank Munzert
     
  • Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Trivial cleanup, list_del(); list_add{,_tail}() is equivalent
    to list_move{,_tail}(). Semantic patch for coccinelle can be
    found at www.cccmz.de/~snakebyte/list_move_tail.spatch

    Signed-off-by: Eric Sesterhenn
    Signed-off-by: Martin Schwidefsky

    Eric Sesterhenn
     
  • This is a cleanup of all the messages this driver prints. It uses the
    dev_message macros now.

    Signed-off-by: Carsten Otte
    Signed-off-by: Martin Schwidefsky

    Carsten Otte
     
  • 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
     
  • If the qdio module is unloaded the tiqdio tasklet must be terminated
    by tasklet_kill. Move the tasklet_kill after the unregistration of
    the adapter interrupt so the tiqdio tasklet will not be scheduled
    anymore before calling tasklet_kill.

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

    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
     
  • The ACKnowledgement state should be set on the newest SBAL so an
    adapter interrupt surpression check needs to scan fewer SBALs.

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

    Jan Glauber
     
  • qdio_cleanup is a wrapper function that should call qdio_shutdown and
    qdio_free. qdio_free was not called if an error occured in qdio_shutdown
    resulting in a missing free of allocated resources.

    Call qdio_free regardless of the return value of qdio_shutdown.

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

    Jan Glauber
     
  • The queue tasklets were stopped with tasklet_disable. Although tasklet_disable
    prevents the tasklet from beeing executed it is still possible that a tasklet
    is scheduled on a CPU at that point. A following qdio_establish calls
    tasklet_init which clears the tasklet count and the tasklet state leading to
    the following Oops:

    kernel BUG at kernel/softirq.c:392!
    illegal operation: 0001 [#1] SMP
    Modules linked in: iptable_filter ip_tables x_tables dm_round_robin dm_multipath scsi_dh sg sd_mod crc_t10dif nfs lockd nfs
    _acl sunrpc fuse loop dm_mod qeth_l3 ipv6 zfcp qeth scsi_transport_fc qdio scsi_tgt scsi_mod chsc_sch ccwgroup dasd_eckd_mod dasdm
    od ext3 mbcache jbd
    Supported: Yes
    CPU: 0 Not tainted 2.6.27.13-1.1.mz13-default #1
    Process blast.LzS_64 (pid: 16445, task: 000000006cc02538, ksp: 000000006cb67998)
    Krnl PSW : 0704c00180000000 00000000001399f4 (tasklet_action+0xc8/0x1d4)
    R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3
    Krnl GPRS: ffffffff00000030 0000000000000002 0000000000000002 fffffffffffffffe
    000000000013aabe 00000000003b6a18 fffffffffffffffd 0000000000000000
    00000000006705a8 000000007d0914a8 000000007d0914b0 000000007fecfd30
    0000000000000000 00000000003b63e8 000000007fecfd90 000000007fecfd30
    Krnl Code: 00000000001399e8: b9200021 cgr %r2,%r1
    00000000001399ec: a7740004 brc 7,1399f4
    00000000001399f0: a7f40001 brc 15,1399f2
    >00000000001399f4: c0100027e8ee larl %r1,636bd0
    00000000001399fa: bf1f1008 icm %r1,15,8(%r1)
    00000000001399fe: a7840019 brc 8,139a30
    0000000000139a02: c0300027e8ef larl %r3,636be0
    0000000000139a08: e3c030000004 lg %r12,0(%r3)
    Call Trace:
    ([] tasklet_hi_action+0x112/0x1d4)
    [] __do_softirq+0xde/0x1c4
    [] do_softirq+0x96/0xb0
    [] irq_exit+0x70/0xcc
    [] do_extint+0xf0/0x110
    [] ext_no_vtime+0x16/0x1a
    [] ext3_dirty_inode+0xe6/0xe8 [ext3]
    ([] __mark_inode_dirty+0x52/0x1d4)
    [] ext3_ordered_write_end+0x138/0x190 [ext3]
    [] generic_perform_write+0x174/0x230
    [] generic_file_buffered_write+0xb4/0x194
    [] __generic_file_aio_write_nolock+0x418/0x454
    [] generic_file_aio_write+0x76/0xe4
    [] ext3_file_write+0x3e/0xc8 [ext3]
    [] do_sync_write+0xd6/0x120
    [] vfs_write+0xac/0x184
    [] SyS_write+0x68/0xe0
    [] sysc_noemu+0x10/0x16
    [] 0x20000043188
    Last Breaking-Event-Address:
    [] tasklet_action+0xc4/0x1d4
    qdio: 0.0.c61b ZFCP on SC f67 using AI:1 QEBSM:0 PCI:1 TDD:1 SIGA: W AOP
    Kernel panic - not syncing: Fatal exception in interrupt

    Use tasklet_kill instead of tasklet_disbale. Since tasklet_schedule must not be
    called after tasklet_kill use the QDIO_IRQ_STATE_STOPPED to inidicate that a
    queue is going down and prevent further tasklet schedules in that case.

    Remove superflous tasklet_schedule from input queue setup, at that time
    the queues are not ready so the schedule results in a NOP.

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

    Jan Glauber
     
  • Remove the call to qdio_shutdown from qdio_activate since the upper-layer
    drivers are responsible to call qdio_shutdown when qdio_activate returns
    with an error.

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

    Jan Glauber
     
  • Add a mutex to protect the tiq_list. Although reading the list is done
    using RCU adding and removing elements from the list must still
    happen locked since multiple qdio devices may change the list in parallel
    otherwise.

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

    Jan Glauber
     
  • Subchannel reprobing can block the kslowcrw workqueue indefinitely
    while waiting for device recognition to finish which is also scheduled
    to run on kslowcrw. Prevent this deadlock by moving the waiting
    portion of subchannel reprobing to the cio workqueue.

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

    Peter Oberparleiter
     
  • Remove unused subchannel pointer in io_subchannel_recog_done.

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

    Sebastian Ott
     
  • Fix incorrect check for active I/O in interrogate function.

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

    Peter Oberparleiter
     
  • In some situations a rc in __chsc_do_secm will be overwritten
    by another one. This shouldn't do harm since todays callers
    don't check for _specific_ errors but fix it for the sake of
    correctness.

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

    Sebastian Ott
     
  • Writing only spaces to /proc/cio_ignore will cause a buffer overflow
    since the size_t value i will not become negative and so buf[-1UL] is
    accessed. Change the value of i to ssize_t.

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

    Sebastian Ott
     
  • For a ccw group device unbinding it from its driver should do the
    same as a call to ungroup, since this virtual device can not exist
    without a driver.

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

    Sebastian Ott
     
  • Some sanity checks in the ccw group driver test the output of
    container_of macros to be !NULL. Test the input parameters instead.

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

    Sebastian Ott
     
  • In case the ccw group driver refuses to set a device [on|off]line,
    we should transmit the return code to the caller.

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

    Sebastian Ott
     
  • MAX_ISC is a valid isc number, so arrays with an index of isc
    need to have a length of MAX_ISC+1

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

    Sebastian Ott
     
  • Since some callers rely on for_each_subchannel_staged to not fail,
    fall back to brute force scanning using get_subchannel_by_schid in
    case of a oom situation.

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

    Sebastian Ott
     
  • Add barrier to prevent compiler from reloading pointer to irq handler.

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

    Heiko Carstens
     
  • The crw_unregister_handler uses xchg + synchronize_sched when
    unregistering a crw_handler.
    This doesn't protect crw_collect_info to potentially jump to NULL since
    it has unlocked code like this:

    if (crw_handlers[i])
    crw_handlers[i](NULL, NULL, 1);

    So add a mutex which protects the crw handler array for changes.

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

    Heiko Carstens
     
  • In case the ccw driver refuses to set a device offline, we should
    transmit the return code to the caller.

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

    Sebastian Ott
     
  • Use ccw_device_set_notoper() (which also deletes the device
    timer and disables the subchannel) instead of simply setting
    the state to DEV_STATE_NOT_OPER in the generic not operational
    handling code. This prevents unexpected interrupts popping up
    for devices that are deemed not operational.

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

    Cornelia Huck