]> git.baikalelectronics.ru Git - kernel.git/commit
IB/qib: Fix debugfs ordering issue with multiple HCAs
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Fri, 7 Mar 2014 13:32:31 +0000 (08:32 -0500)
committerRoland Dreier <roland@purestorage.com>
Mon, 17 Mar 2014 23:16:51 +0000 (16:16 -0700)
commit2b6c1d012f66226459889dc2312ea00dc5949267
tree65a722aaa9409d9a320ece375e85d3118c80ec8a
parentafc1b12870b2693dfc5ec79f1c9a55ad77c688f6
IB/qib: Fix debugfs ordering issue with multiple HCAs

The debugfs init code was incorrectly called before the idr mechanism
is used to get the unit number, so the dd->unit hasn't been
initialized.  This caused the unit relative directory creation to fail
after the first.

This patch moves the init for the debugfs stuff until after all of the
failures and after the unit number has been determined.

A bug in unwind code in qib_alloc_devdata() is also fixed.

Cc: <stable@vger.kernel.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/qib/qib_init.c