Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360233
b: refs/heads/master
c: b00ee7d
h: refs/heads/master
i:
  360231: 90eb219
v: v3
  • Loading branch information
Chad Dupuis authored and James Bottomley committed Feb 22, 2013
1 parent 3307096 commit ca92cec
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 619d5a0ded06f6d46092205a68a92f7c3a01dd44
refs/heads/master: b00ee7d770abbe1e63df74eada0376c75ceb2daf
10 changes: 5 additions & 5 deletions trunk/drivers/scsi/qla2xxx/qla_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void
qla2x00_bsg_sp_free(void *data, void *ptr)
{
srb_t *sp = (srb_t *)ptr;
struct scsi_qla_host *vha = (scsi_qla_host_t *)data;
struct scsi_qla_host *vha = sp->fcport->vha;
struct fc_bsg_job *bsg_job = sp->u.bsg_job;
struct qla_hw_data *ha = vha->hw;

Expand All @@ -40,7 +40,7 @@ qla2x00_bsg_sp_free(void *data, void *ptr)
if (sp->type == SRB_CT_CMD ||
sp->type == SRB_ELS_CMD_HST)
kfree(sp->fcport);
mempool_free(sp, vha->hw->srb_mempool);
qla2x00_rel_sp(vha, sp);
}

int
Expand Down Expand Up @@ -368,7 +368,7 @@ qla2x00_process_els(struct fc_bsg_job *bsg_job)
if (rval != QLA_SUCCESS) {
ql_log(ql_log_warn, vha, 0x700e,
"qla2x00_start_sp failed = %d\n", rval);
mempool_free(sp, ha->srb_mempool);
qla2x00_rel_sp(vha, sp);
rval = -EIO;
goto done_unmap_sg;
}
Expand Down Expand Up @@ -515,7 +515,7 @@ qla2x00_process_ct(struct fc_bsg_job *bsg_job)
if (rval != QLA_SUCCESS) {
ql_log(ql_log_warn, vha, 0x7017,
"qla2x00_start_sp failed=%d.\n", rval);
mempool_free(sp, ha->srb_mempool);
qla2x00_rel_sp(vha, sp);
rval = -EIO;
goto done_free_fcport;
}
Expand Down Expand Up @@ -1995,6 +1995,6 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job)
spin_unlock_irqrestore(&ha->hardware_lock, flags);
if (bsg_job->request->msgcode == FC_BSG_HST_CT)
kfree(sp->fcport);
mempool_free(sp, ha->srb_mempool);
qla2x00_rel_sp(vha, sp);
return 0;
}
4 changes: 1 addition & 3 deletions trunk/drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ qla2x00_sp_free(void *data, void *ptr)
struct scsi_qla_host *vha = (scsi_qla_host_t *)data;

del_timer(&iocb->timer);
mempool_free(sp, vha->hw->srb_mempool);

QLA_VHA_MARK_NOT_BUSY(vha);
qla2x00_rel_sp(vha, sp);
}

/* Asynchronous Login/Logout Routines -------------------------------------- */
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ qla2x00_get_sp(scsi_qla_host_t *vha, fc_port_t *fcport, gfp_t flag)
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)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ qla2x00_sp_free_dma(void *vha, void *ptr)
}

CMD_SP(cmd) = NULL;
mempool_free(sp, ha->srb_mempool);
qla2x00_rel_sp(sp->fcport->vha, sp);
}

static void
Expand Down Expand Up @@ -718,7 +718,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
goto qc24_target_busy;
}

sp = qla2x00_get_sp(base_vha, fcport, GFP_ATOMIC);
sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC);
if (!sp) {
set_bit(HOST_RAMP_DOWN_QUEUE_DEPTH, &vha->dpc_flags);
goto qc24_host_busy;
Expand Down

0 comments on commit ca92cec

Please sign in to comment.