diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-07-24 09:36:50 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-07-24 09:36:50 -0700 |
commit | 8fdf679fdb00f588b65abb9c775c178098a05aeb (patch) | |
tree | d6fc3c5a1d6e695ec46bac9c55a89019fe456b4f /drivers | |
parent | 8a7f752125a930a83f4d8dfe37fa5a081ab19d31 (diff) | |
download | op-kernel-dev-8fdf679fdb00f588b65abb9c775c178098a05aeb.zip op-kernel-dev-8fdf679fdb00f588b65abb9c775c178098a05aeb.tar.gz |
IB/mthca: Initialize max_cmds before debug code prints it
Read the max_cmds value from the response to the QUERY_FW command
before printing out the value, so that the real value goes into the
debug output.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index d0f7731..deabc14 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c @@ -778,11 +778,12 @@ int mthca_QUERY_FW(struct mthca_dev *dev, u8 *status) ((dev->fw_ver & 0xffff0000ull) >> 16) | ((dev->fw_ver & 0x0000ffffull) << 16); + MTHCA_GET(lg, outbox, QUERY_FW_MAX_CMD_OFFSET); + dev->cmd.max_cmds = 1 << lg; + mthca_dbg(dev, "FW version %012llx, max commands %d\n", (unsigned long long) dev->fw_ver, dev->cmd.max_cmds); - MTHCA_GET(lg, outbox, QUERY_FW_MAX_CMD_OFFSET); - dev->cmd.max_cmds = 1 << lg; MTHCA_GET(dev->catas_err.addr, outbox, QUERY_FW_ERR_START_OFFSET); MTHCA_GET(dev->catas_err.size, outbox, QUERY_FW_ERR_SIZE_OFFSET); |