[ewg] IB/qib: Correct nfreectxts for multiple HCAs

Mike Marciniszyn mike.marciniszyn at qlogic.com
Wed Sep 21 09:52:48 PDT 2011


Vlad,

Please pull the following patches from
git.openfabrics.org/~mmarciniszyn/scm/linux-2.6.to_ofed

Thanks!
Mike

commit 6d13d18acfea76fbfa823b4c7f3bf57a1da2f39e
Author: Mike Marciniszyn <mike.marciniszyn at qlogic.com>
Date:   Wed Sep 21 12:31:12 2011 -0400

    IB/qib: Correct nfreectxts for multiple HCAs

    The code that was recently introduced to report the number
    of free contexts is flawed for multiple HCAs:

           /* Return the number of free user ports (contexts) available. */
            return scnprintf(buf, PAGE_SIZE, "%u\n", dd->cfgctxts -
                    dd->first_user_ctxt - (u32)qib_stats.sps_ctxts);

    The qib_stats is global to the module, not per HCA, so the code is broken
    for multiple HCAs.

    This patch adds a qib_devdata field, freectxts, that reflects the free
    contexts for this HCA.

    Signed-off-by: Mike Marciniszyn <mike.marciniszyn at qlogic.com>
    Reviewed-by: Ram Vepa <ram.vepa at qlogic.com>

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.




More information about the ewg mailing list