02 Dec, 2008

4 commits

  • Roland Dreier
     
  • When resizing a CQ, MTTs associated with the old CQE buffer were not
    freed. As a result, if any app used resize CQ repeatedly, all MTTs
    were eventually exhausted, which led to all memory registration
    operations failing until the driver is reloaded.

    Once the RESIZE_CQ command returns successfully from FW, FW no longer
    accesses the old CQ buffer, so it is safe to deallocate the MTT
    entries used by the old CQ buffer.

    Finally, if the RESIZE_CQ command fails, the MTTs allocated for the
    new CQEs buffer also need to be de-allocated.

    This fixes .

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

    Jack Morgenstein
     
  • This fix enables ehca device driver to generate flush work completions
    even if the application doesn't request completions for all work
    requests. The current implementation of ehca will generate flush work
    completions for the wrong work requests if an application uses non
    signaled work completions.

    Signed-off-by: Stefan Roscher
    Signed-off-by: Roland Dreier

    Stefan Roscher
     
  • The error message printed when the eHCA driver prevents memory hotplug
    is misleading -- the user might think that hot-removing the lhca,
    hotplugging memory, then hot-adding the lhca again will work, but it
    actually doesn't.

    Signed-off-by: Joachim Fenkes
    Signed-off-by: Roland Dreier

    Joachim Fenkes
     

13 Nov, 2008

6 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IPoIB: Fix crash in path_rec_completion()
    IPoIB: Fix hang in ipoib_flush_paths()
    IPoIB: Don't enable NAPI when it's already enabled
    RDMA/cxgb3: Fix deadlock in iw_cxgb3 (hang when configuring interface)
    IB/ehca: Remove reference to special QP in case of port activation failure
    IB/mlx4: Set umem field to NULL in mlx4_ib_alloc_fast_reg_mr()
    mlx4_core: Fix unused variable warning
    RDMA/nes: Mitigate compatibility issue regarding PCIe write credits
    RDMA/nes: Fix CQ allocation scheme for multicast receive queue apps
    RDMA/nes: Correct handling of PBL resources
    RDMA/nes: Reindent mis-indented spinlocks
    RDMA/cxgb3: Fix too-big reserved field zeroing in iwch_post_zb_read()
    IB/ipath: Fix RDMA write with immediate copy of last packet

    Linus Torvalds
     
  • Roland Dreier
     
  • Fix a crash in path_rec_completion() during an SM up/down loop. If
    more than one path record request is issued, the first completion
    releases path->done, allowing ipoib_flush_paths() to free the path,
    and thus corrupting it for the second completion.

    Commit ee1e2c82 ("IPoIB: Refresh paths instead of flushing them on SM
    change events") added the field path->valid and changed the test "if
    (!path)" to "if (!path || !path->valid)". This change made it
    possible for a path with an outstanding query to pass the test and
    issue another query on the same path. Having two queries on the same
    path leads to a crash.

    This fixes .

    Signed-off-by: Yossi Etigin
    Signed-off-by: Roland Dreier

    Yossi Etigin
     
  • ipoib_flush_paths() can hang during an SM up/down loop: if
    path_rec_start() fails (for instance, because there is no sm_ah), the
    path is still added to the path list by neigh_add_path(). Then,
    ipoib_flush_paths() will wait for path->done, but it will never
    complete because the request was not issued at all. Fix this by
    completing path->done if issuing the query fails.

    This fixes .

    Signed-off-by: Yossi Etigin
    Signed-off-by: Roland Dreier

    Yossi Etigin
     
  • If a P_Key is not present when an interface is created, ipoib_open()
    will return after doing napi_enable(). ipoib_open() will be called
    again from ipoib_pkey_poll() when the P_Key appears, after NAPI has
    already been enabled, and try to enable it again. This triggers a
    BUG_ON() in napi_enable().

    Fix this by moving the call to napi_enable() to after the test for
    P_Key presence.

    Signed-off-by: Yossi Etigin
    Signed-off-by: Roland Dreier

    Yossi Etigin
     
  • When the iw_cxgb3 module's cxgb3_client "add" func gets called by the
    cxgb3 module, the iwarp driver ends up calling the ethtool ops
    get_drvinfo function in cxgb3 to get the fw version and other info.
    Currently the iwarp driver grabs the rtnl lock around this down call
    to serialize. As of 2.6.27 or so, things changed such that the rtnl
    lock is held around the call to the netdev driver open function. Also
    the cxgb3_client "add" function doesn't get called if the device is
    down.

    So, if you load cxgb3, then load iw_cxgb3, then ifconfig up the
    device, the iw_cxgb3 add func gets called with the rtnl_lock held. If
    you load cxgb3, ifconfig up the device, then load iw_cxgb3, the add
    func gets called without the rtnl_lock held. The former causes the
    deadlock, the latter does not.

    In addition, there are iw_cxgb3 sysfs handlers that also can call down
    into cxgb3 to gather the fw and hw versions. These can be called
    concurrently on different processors and at any time. Thus we need to
    push this serialization down in the cxgb3 driver get_drvinfo func.

    The fix is to remove rtnl lock usage, and use a per-device lock in cxgb3.

    Signed-off-by: Steve Wise
    Acked-by: Divy Le Ray
    Signed-off-by: Roland Dreier

    Steve Wise
     

12 Nov, 2008

1 commit


06 Nov, 2008

1 commit


03 Nov, 2008

4 commits


02 Nov, 2008

2 commits

  • The array wqe->read.reserved has only two entries, but
    iwch_post_zb_read() sets [0], [1], and [2], which is one too many.
    This is harmless since it runs into the next field, rem_stag, which is
    initialized correctly immediately after, but we might as well get
    things right, especially since it makes the code smaller.

    This was spotted by the Coverity checker (CID 2475).

    Signed-off-by: Roland Dreier
    Acked-by: Steve Wise

    Roland Dreier
     
  • As it is, all instances of ->release() for files that have ->fasync()
    need to remember to evict file from fasync lists; forgetting that
    creates a hole and we actually have a bunch that *does* forget.

    So let's keep our lives simple - let __fput() check FASYNC in
    file->f_flags and call ->fasync() there if it's been set. And lose that
    crap in ->release() instances - leaving it there is still valid, but we
    don't have to bother anymore.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

28 Oct, 2008

1 commit


23 Oct, 2008

7 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IB/ehca: Reject dynamic memory add/remove when ehca adapter is present
    IB/ehca: Fix reported max number of QPs and CQs in systems with >1 adapter
    IPoIB: Set netdev offload features properly for child (VLAN) interfaces
    IPoIB: Clean up ethtool support
    mlx4_core: Add Ethernet PCI device IDs
    mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC
    mlx4_core: Multiple port type support
    mlx4_core: Ethernet MAC/VLAN management
    mlx4_core: Get ethernet MTU and default address from firmware
    mlx4_core: Support multiple pre-reserved QP regions
    Update NetEffect maintainer emails to Intel emails
    RDMA/cxgb3: Remove cmid reference on tid allocation failures
    IB/mad: Use krealloc() to resize snoop table
    IPoIB: Always initialize poll_timer to avoid crash on unload
    IB/ehca: Don't allow creating UC QP with SRQ
    mlx4_core: Add QP range reservation support
    RDMA/ucma: Test ucma_alloc_multicast() return against NULL, not with IS_ERR()

    Linus Torvalds
     
  • Roland Dreier
     
  • Since the ehca device driver does not support dynamic memory add and
    remove operations, the driver must explicitly reject such requests in
    order to prevent unpredictable behaviors related to existing memory
    regions that cover all of memory being used by InfiniBand protocols in
    the kernel.

    The solution (for now at least) is to add a memory notifier to the
    ehca device driver and if a request for dynamic memory add or remove
    comes in, ehca will always reject it. The user can add or remove
    memory by hot-removing the ehca adapter, performing the memory
    operation, and then hot-adding the ehca adapter back.

    Signed-off-by: Stefan Roscher
    Signed-off-by: Roland Dreier

    Stefan Roscher
     
  • Because ehca adapters can differ in the maximum number of QPs and CQs
    we have to save the maximum number of these ressources per adapter and
    not globally per ehca driver. This fix introduces 2 new members to the
    shca structure to store the maximum value for QPs and CQs per adapter.

    The module parameters are now used as initial values for those
    variables. If a user selects an invalid number of CQs or QPs we don't
    print an error any longer, instead we will inform the user with a
    warning and set the values to the respective maximum supported by the
    HW.

    Signed-off-by: Stefan Roscher
    Signed-off-by: Roland Dreier

    Stefan Roscher
     
  • Child devices were created without any offload features set, fix this by
    moving the code that computes the features into generic function which is
    now called through non-child and child device creation.

    Signed-off-by: Or Gerlitz

    -- v1 has a bug where the 'result' flag in ipoib_vlan_add may be used uninitialized
    Signed-off-by: Roland Dreier

    Or Gerlitz
     
  • Add a get_rx_csum method. Remove the driver's own get_tso method, as
    the ethtool kernel code uses the default one if nothing is provided.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Or Gerlitz
     
  • Multi-protocol adapters support different port types. Each consumer
    of mlx4_core queries for supported port types; in particular mlx4_ib
    can no longer assume that all physical ports belong to it. Port type
    is configured through a sysfs interface. When the type of a port is
    changed, all mlx4 interfaces are unregistered, and then registered
    again with the new port types.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     

20 Oct, 2008

1 commit

  • Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs
    attribute->owner unnecessary. But the field was left in the structure to
    ease the merge. It's been over a year since that change and it is now
    time to start killing attribute->owner along with its users - one arch at
    a time!

    This patch is attempt #1 to get rid of attribute->owner only for
    CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on
    as and when possible - avr32 will be the next since that is something I
    can test. Compile (make allyesconfig / make allmodconfig / custom config)
    and boot tested.

    akpm: the idea is that we put the declaration of sttribute.owner inside
    `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because
    new usages kept on turning up in subsystem trees.

    [akpm: remove the ifdef for now]
    Signed-off-by: Parag Warudkar
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Tejun Heo
    Cc: Len Brown
    Cc: Jens Axboe
    Cc: Jean Delvare
    Cc: Roland Dreier
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Parag Warudkar
     

18 Oct, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (39 commits)
    [SCSI] sd: fix compile failure with CONFIG_BLK_DEV_INTEGRITY=n
    libiscsi: fix locking in iscsi_eh_device_reset
    libiscsi: check reason why we are stopping iscsi session to determine error value
    [SCSI] iscsi_tcp: return a descriptive error value during connection errors
    [SCSI] libiscsi: rename host reset to target reset
    [SCSI] iscsi class: fix endpoint id handling
    [SCSI] libiscsi: Support drivers initiating session removal
    [SCSI] libiscsi: fix data corruption when target has to resend data-in packets
    [SCSI] sd: Switch kernel printing level for DIF messages
    [SCSI] sd: Correctly handle all combinations of DIF and DIX
    [SCSI] sd: Always print actual protection_type
    [SCSI] sd: Issue correct protection operation
    [SCSI] scsi_error: fix target reset handling
    [SCSI] lpfc 8.2.8 v2 : Add statistical reporting control and additional fc vendor events
    [SCSI] lpfc 8.2.8 v2 : Add sysfs control of target queue depth handling
    [SCSI] lpfc 8.2.8 v2 : Revert target busy in favor of transport disrupted
    [SCSI] scsi_dh_alua: remove REQ_NOMERGE
    [SCSI] lpfc 8.2.8 : update driver version to 8.2.8
    [SCSI] lpfc 8.2.8 : Add MSI-X support
    [SCSI] lpfc 8.2.8 : Update driver to use new Host byte error code DID_TRANSPORT_DISRUPTED
    ...

    Linus Torvalds
     

17 Oct, 2008

1 commit


16 Oct, 2008

1 commit


15 Oct, 2008

1 commit

  • Use krealloc() instead of kmalloc() followed by memcpy() when resizing
    the MAD module's snoop table.

    Also put parentheses around the new table size to avoid calculating
    the wrong size to allocate, which fixes a bug pointed out by Haven
    Hash .

    Signed-off-by: Roland Dreier

    Roland Dreier
     

14 Oct, 2008

1 commit

  • This is a much better version of a previous patch to make the parser
    tables constant. Rather than changing the typedef, we put the "const" in
    all the various places where its required, allowing the __initconst
    exception for nfsroot which was the cause of the previous trouble.

    This was posted for review some time ago and I believe its been in -mm
    since then.

    Signed-off-by: Steven Whitehouse
    Cc: Alexander Viro
    Signed-off-by: Linus Torvalds

    Steven Whitehouse
     

13 Oct, 2008

2 commits

  • I had this in my patchset to add target reset support, but
    it got dropped due to patching conflicts. This initial patch
    just renames the function and users. We are actually just
    dropping the session, and so this does not have anything to do
    with the host exactly. It does for software iscsi because
    we allocate a host per session, but for cxgb3i this makes no
    sense.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • If the driver knows when hardware is removed like with cxgb3i,
    bnx2i, qla4xxx and iser then we will want to remove the sessions/devices
    that are bound to that device before removing the host.

    cxgb3i and in the future bnx2i will remove the host and that will
    remove all the sessions on the hba. iser can call iscsi_kill_session
    when it gets an event that indicates that a hca is removed.
    And when qla4xxx is hooked in to the lib (it is only hooked into
    the class right now) it can call iscsi remove host like the
    partial offload card drivers.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

11 Oct, 2008

4 commits

  • ipoib_ib_dev_stop() does del_timer_sync(&priv->poll_timer), but if a
    P_key for an interface is not found, poll_timer is not initialized, so
    this leads to a crash or hang. Fix this by moving where poll_timer is
    initialized to ipoib_ib_dev_init(), which is always called.

    This fixes .

    Debugged-by: Yosef Etigin
    Signed-off-by: Roland Dreier

    Roland Dreier
     
  • This patch prevents a UC QP to be created attached to an SRQ, since
    current firmware does not support this feature.

    Signed-off-by: Michael Faath
    Signed-off-by: Roland Dreier

    Hoang-Nam Nguyen
     
  • To allow allocating an aligned range of consecutive QP numbers, add an
    interface to reserve an aligned range of QP numbers and have the QP
    allocation function always take a QP number.

    This will be used for RSS support in the mlx4_en Ethernet driver and
    also potentially by IPoIB RSS support.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: Roland Dreier

    Yevgeny Petrilin
     
  • In case of error, the function ucma_alloc_multicast() returns a NULL
    pointer, but never returns an ERR pointer. So after a call to this
    function, an IS_ERR test should be replaced by a NULL test.

    The semantic match that finds this problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @match bad_is_err_test@
    expression x, E;
    @@

    x = ucma_alloc_multicast(...)
    ... when != x = E
    IS_ERR(x)
    //

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

    Julien Brunel
     

10 Oct, 2008

2 commits