From b00ee7d770abbe1e63df74eada0376c75ceb2daf Mon Sep 17 00:00:00 2001 From: Chad Dupuis Date: Fri, 8 Feb 2013 01:57:50 -0500 Subject: [SCSI] qla2xxx: Unload hangs after issuing BSG commands to vport. BSG code path increments ref count in the send path, but does not decrement in the return path leading to hang during unload of the driver. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_inline.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/scsi/qla2xxx/qla_inline.h') diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index deb8618d1b8..130f6f3c2a9 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -197,6 +197,13 @@ done: return sp; } +static inline void +qla2x00_rel_sp(scsi_qla_host_t *vha, srb_t *sp) +{ + mempool_free(sp, vha->hw->srb_mempool); + QLA_VHA_MARK_NOT_BUSY(vha); +} + static inline void qla2x00_init_timer(srb_t *sp, unsigned long tmo) { -- cgit v1.2.3-70-g09d2