diff options
author | 2011-10-06 09:33:35 -0700 | |
---|---|---|
committer | 2011-10-06 09:33:35 -0700 | |
commit | 53ab1c6498371723c31b18400fab10a902a15a63 (patch) | |
tree | df710c8c65b897c6738263f976da825d00e406af /kernel/irq/manage.c | |
parent | Linux 3.1-rc9 (diff) | |
download | wireguard-linux-53ab1c6498371723c31b18400fab10a902a15a63.tar.xz wireguard-linux-53ab1c6498371723c31b18400fab10a902a15a63.zip |
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@qlogic.com>
Reviewed-by: Ram Vepa <ram.vepa@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'kernel/irq/manage.c')
0 files changed, 0 insertions, 0 deletions