12 Oct, 2009

2 commits

  • After m68k's task_thread_info() doesn't refer to current,
    it's possible to remove sched.h from interrupt.h and not break m68k!
    Many thanks to Heiko Carstens for allowing this.

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (34 commits)
    [SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create
    [SCSI] st: fix possible memory use after free after MTSETBLK ioctl
    [SCSI] be2iscsi: Moving to pci_pools v3
    [SCSI] libiscsi: iscsi_session_setup to allow for private space
    [SCSI] be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver
    [SCSI] zfcp: Fix hang when offlining device with offline chpid
    [SCSI] zfcp: Fix lockdep warning when offlining device with offline chpid
    [SCSI] zfcp: Fix oops during shutdown of offline device
    [SCSI] zfcp: Fix initial device and cfdc for delayed adapter allocation
    [SCSI] zfcp: correctly initialize unchained requests
    [SCSI] mpt2sas: Bump version 02.100.03.00
    [SCSI] mpt2sas: Support dev remove when phy status is MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT
    [SCSI] mpt2sas: Timeout occurred within the HANDSHAKE logic while waiting on firmware to ACK.
    [SCSI] mpt2sas: Call init_completion on a per request basis.
    [SCSI] mpt2sas: Target Reset will be issued from Interrupt context.
    [SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to support multiple TM
    [SCSI] mpt2sas: Copyright change to 2009.
    [SCSI] mpt2sas: Added mpi2_history.txt for MPI2 headers.
    [SCSI] mpt2sas: Update driver to MPI2 REV K headers.
    [SCSI] bfa: Brocade BFA FC SCSI driver
    ...

    Linus Torvalds
     

08 Oct, 2009

4 commits


05 Oct, 2009

1 commit


03 Oct, 2009

1 commit


28 Sep, 2009

1 commit


25 Sep, 2009

5 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IPoIB: Don't turn on carrier for a non-active port
    IB/mthca: Fix access to freed memory in catastrophic event handling
    mlx4_core: Pass cache line size to device FW
    RDMA/nes: Remove duplicate .ndo_set_mac_address field initialization
    IB/mad: Fix lock-lock-timer deadlock in RMPP code

    Linus Torvalds
     
  • Roland Dreier
     
  • Multicast joins can succeed even if the IB port is down. This happens
    when the SM runs on the same port with the requesting port. However,
    IPoIB calls netif_carrier_on() when the join of the broadcast group
    succeeds, without caring about the state of the IB port. The result
    is an IPoIB interface in RUNNING state but without an active IB port
    to support it.

    If a bonding interface uses this IPoIB interface as a slave it might
    not detect that this slave is almost useless and failover
    functionality will be damaged. The fix checks the state of the IB
    port in the carrier_task before calling netif_carrier_on().

    Adresses: https://bugs.openfabrics.org/show_bug.cgi?id=1726
    Signed-off-by: Moni Shoua
    Signed-off-by: Roland Dreier

    Moni Shoua
     
  • catas_reset() uses a pointer to mthca_dev, but mthca_dev is not valid
    after the call to __mthca_restart_one().

    Based on a similar patch for mlx4 (634354d7, "mlx4: Fix access to
    freed memory") by Vitaliy Gusev

    Signed-off-by: Jack Morgenstein
    Signed-off-by: Roland Dreier

    Jack Morgenstein
     
  • The definition of nes_netdev_ops has initializations of a local function
    and eth_mac_addr for its ndo_set_mac_address field. This change uses only
    the local function.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    identifier I, s, fld;
    position p0,p;
    expression E;
    @@

    struct I s =@p0 { ... .fld@p = E, ...};

    @s@
    identifier I, s, r.fld;
    position r.p0,p;
    expression E;
    @@

    struct I s =@p0 { ... .fld@p = E, ...};

    @script:python@
    p0 << r.p0;
    fld << r.fld;
    ps << s.p;
    pr << r.p;
    @@

    if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column):
    cocci.print_main(fld,p0)
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Roland Dreier

    Julia Lawall
     

24 Sep, 2009

1 commit

  • Holding agent->lock across cancel_delayed_work() (which does
    del_timer_sync()) in ib_cancel_rmpp_recvs() leads to lockdep reports of
    possible lock-timer deadlocks if a consumer ever does something that
    connects agent->lock to a lock taken in IRQ context (cf
    http://marc.info/?l=linux-rdma&m=125243699026045).

    Fix this by changing the list items to a new state "CANCELING" while
    holding the lock, and then canceling the delayed work without holding
    the lock. If the delayed work runs after the lock is dropped, it will
    see the state is CANCELING and return immediately, so the list will
    stay stable while we traverse it with the lock not held.

    Reviewed-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Roland Dreier
     

23 Sep, 2009

1 commit

  • Originally, walk_memory_resource() was introduced to traverse all memory
    of "System RAM" for detecting memory hotplug/unplug range. For doing so,
    flags of IORESOUCE_MEM|IORESOURCE_BUSY was used and this was enough for
    memory hotplug.

    But for using other purpose, /proc/kcore, this may includes some firmware
    area marked as IORESOURCE_BUSY | IORESOUCE_MEM. This patch makes the
    check strict to find out busy "System RAM".

    Note: PPC64 keeps their own walk_memory_resouce(), which walk through
    ppc64's lmb informaton. Because old kclist_add() is called per lmb, this
    patch makes no difference in behavior, finally.

    And this patch removes CONFIG_MEMORY_HOTPLUG check from this function.
    Because pfn_valid() just show "there is memmap or not* and cannot be used
    for "there is physical memory or not", this function is useful in generic
    to scan physical memory range.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: WANG Cong
    Cc: Américo Wang
    Cc: David Rientjes
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

21 Sep, 2009

1 commit


16 Sep, 2009

1 commit


15 Sep, 2009

1 commit

  • * 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

2 commits


10 Sep, 2009

3 commits


07 Sep, 2009

2 commits

  • MADs are UD and can be dropped if there are no receives posted, so
    allow receive queue size to be set with a module parameter in case the
    queue needs to be lengthened. Send side tuning is done for symmetry
    with receive.

    Signed-off-by: Hal Rosenstock
    Signed-off-by: Roland Dreier

    Hal Rosenstock
     
  • Lockdep reported a possible deadlock with cm_id_priv->lock,
    mad_agent_priv->lock and mad_agent_priv->timed_work.timer; this
    happens because the mad module does

    cancel_delayed_work(&mad_agent_priv->timed_work);

    while holding mad_agent_priv->lock. cancel_delayed_work() internally
    does del_timer_sync(&mad_agent_priv->timed_work.timer).

    This can turn into a deadlock because mad_agent_priv->lock is taken
    inside cm_id_priv->lock, so we can get the following set of contexts
    that deadlock each other:

    A: holding cm_id_priv->lock, waiting for mad_agent_priv->lock
    B: holding mad_agent_priv->lock, waiting for del_timer_sync()
    C: interrupt during mad_agent_priv->timed_work.timer that takes
    cm_id_priv->lock

    Fix this by using the new __cancel_delayed_work() interface (which
    internally does del_timer() instead of del_timer_sync()) in all the
    places where we are holding a lock.

    Addresses: http://bugzilla.kernel.org/show_bug.cgi?id=13757
    Reported-by: Bart Van Assche
    Signed-off-by: Roland Dreier

    Roland Dreier
     

06 Sep, 2009

14 commits

  • Old query_port code reports static MTU and link state values.
    Instead, map actual MTU to next largest IB_MTU_* constant and
    correctly report link state.

    Cc: Steve Wise
    Reported-by: Jeff Squyres
    Signed-off-by: Chien Tung
    Signed-off-by: Roland Dreier

    Chien Tung
     
  • The disconn routine has been reworked to acoomodate the terminate and
    flushing changes. The routine has been reorganized to make all the
    decisions at the start then it performs all the required operations.
    This simplified the lock handling and is easier to follow.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • Use the flush status to fill in cqe status when a specific error has
    been identified. Subsequent flushed completions still use the flushed
    value.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • When a flush request is given to the hw, it will place one cqe marked
    as flushed (unless there is nothing to flush). An application that is
    waiting for all wqe's to complete will be left hanging. This modifies
    poll_cq to return the correct number of flushes for the pending
    elements on the wq.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • When an asynchronous event occurs that requires a terminate, it is
    sometimes possible to identify the wqe in error. This change uses
    flush to get this information to the poll routine. The flush
    operation puts the status into the cqe. If this information is not
    available, it continues to use the more generic flush code as before.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • Implement the sending and receiving of Terminate packets.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • CQ errors are not being handled correctly. Put in the the upcall for
    CQ errors.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • When a QP is destroyed, unprocessed CQ entries could still reference
    the QP. This change zeroes the context value at QP destroy time. By
    skipping over cqe's with a zero context, poll_cq no longer processes a
    cqe for a destroyed QP.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • The routine to allocate a cqp request is not called from process
    context code. Since it is not OK to sleep, it needs to use GFP_ATOMIC
    not GFP_KERNEL.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • The code currently has a work structure in the QP. This requires a
    lock and a pending flag to ensure there is never more than one request
    active. When two events happen quickly (such as FIN and LLP CLOSE),
    it causes unnecessary timeouts since the second one is dropped.

    This fix allocates memory for the work request so the second one can
    be queued. A lock is removed since it is no longer needed.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • During termination, it is possible for the refcnt to go to zero while
    the worker thread is posting events upward. This fix increments the
    refcnt before the request is passed to the worker thread. The thread
    decrements the refcnt when the request is completed.

    Signed-off-by: Don Wood
    Signed-off-by: Roland Dreier

    Don Wood
     
  • Userspace apps are supposed to release all ib device resources if they
    receive a fatal async event (IBV_EVENT_DEVICE_FATAL). However, the
    app has no way of knowing when the device has come back up, except to
    repeatedly attempt ibv_open_device() until it succeeds.

    However, currently there is no protection against the open succeeding
    while the device is in being removed following the fatal event. In
    this case, the open will succeed, but as a result the device waits in
    the middle of its removal until the new app releases its resources --
    and the new app will not do so, since the open succeeded at a point
    following the fatal event generation.

    This patch adds an "active" flag to the device. The active flag is set
    to false (in the fatal event flow) before the "fatal" event is
    generated, so any subsequent ibv_dev_open() call to the device will
    fail until the device comes back up, thus preventing the above
    deadlock.

    Signed-off-by: Jack Morgenstein
    Signed-off-by: Roland Dreier

    Jack Morgenstein
     
  • When the mthca driver uses the same name for interrupts for every
    device in the system. This can make it very confusing trying to work
    out exactly which device MSI-X interrupts are for. Change the driver
    to add the PCI name of the device to the interrupt name.

    Signed-off-by: Arputham Benjamin
    Signed-off-by: Roland Dreier

    Arputham Benjamin
     
  • mthca_ib_lock_cqs()/mthca_ib_unlock_cqs() are helper functions that
    lock/unlock both CQs attached to a QP in the proper order to avoid
    AB-BA deadlocks. Annotate this so sparse can understand what's going
    on (and warn us if we misuse these functions).

    Signed-off-by: Roland Dreier

    Roland Dreier