@@ -1769,7 +1769,6 @@ csio_hw_use_fwconfig(struct csio_hw *hw, int reset, u32 *fw_cfg_param)
goto bye;
}
- mempool_free(mbp, hw->mb_mempool);
if (finicsum != cfcsum) {
csio_warn(hw,
"Config File checksum mismatch: csum=%#x, computed=%#x\n",
@@ -1805,6 +1804,7 @@ csio_hw_use_fwconfig(struct csio_hw *hw, int reset, u32 *fw_cfg_param)
csio_info(hw, "Successfully configure using Firmware "
"Configuration File %s, version %#x, computed checksum %#x\n",
config_name, finiver, cfcsum);
+ mempool_free(mbp, hw->mb_mempool);
return 0;
/*
@@ -873,7 +873,7 @@ csio_handle_link_up(struct csio_hw *hw, uint8_t portid, uint32_t fcfi,
if (ln->vnp_flowid != CSIO_INVALID_IDX) {
/* New VN-Port */
spin_unlock_irq(&hw->lock);
- csio_lnode_alloc(hw);
+ ln = csio_lnode_alloc(hw);
spin_lock_irq(&hw->lock);
if (!ln) {
csio_err(hw,
In case of multiple FCFs, the newly allocated lnode by csio_lnode_alloc() is completely ignored during link up event. Fix it. This patch also fixes mbox memory reference after free. Signed-off-by: Praveen Madhavan <praveenm@chelsio.com> --- drivers/scsi/csiostor/csio_hw.c | 2 +- drivers/scsi/csiostor/csio_lnode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)