Lines Matching refs:srb

4002 static struct srb* qla4xxx_get_new_srb(struct scsi_qla_host *ha,  in qla4xxx_get_new_srb()
4006 struct srb *srb; in qla4xxx_get_new_srb() local
4008 srb = mempool_alloc(ha->srb_mempool, GFP_ATOMIC); in qla4xxx_get_new_srb()
4009 if (!srb) in qla4xxx_get_new_srb()
4010 return srb; in qla4xxx_get_new_srb()
4012 kref_init(&srb->srb_ref); in qla4xxx_get_new_srb()
4013 srb->ha = ha; in qla4xxx_get_new_srb()
4014 srb->ddb = ddb_entry; in qla4xxx_get_new_srb()
4015 srb->cmd = cmd; in qla4xxx_get_new_srb()
4016 srb->flags = 0; in qla4xxx_get_new_srb()
4017 CMD_SP(cmd) = (void *)srb; in qla4xxx_get_new_srb()
4019 return srb; in qla4xxx_get_new_srb()
4022 static void qla4xxx_srb_free_dma(struct scsi_qla_host *ha, struct srb *srb) in qla4xxx_srb_free_dma() argument
4024 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_srb_free_dma()
4026 if (srb->flags & SRB_DMA_VALID) { in qla4xxx_srb_free_dma()
4028 srb->flags &= ~SRB_DMA_VALID; in qla4xxx_srb_free_dma()
4035 struct srb *srb = container_of(ref, struct srb, srb_ref); in qla4xxx_srb_compl() local
4036 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_srb_compl()
4037 struct scsi_qla_host *ha = srb->ha; in qla4xxx_srb_compl()
4039 qla4xxx_srb_free_dma(ha, srb); in qla4xxx_srb_compl()
4041 mempool_free(srb, ha->srb_mempool); in qla4xxx_srb_compl()
4064 struct srb *srb; in qla4xxx_queuecommand() local
4099 srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd); in qla4xxx_queuecommand()
4100 if (!srb) in qla4xxx_queuecommand()
4103 rval = qla4xxx_send_command_to_isp(ha, srb); in qla4xxx_queuecommand()
4110 qla4xxx_srb_free_dma(ha, srb); in qla4xxx_queuecommand()
4111 mempool_free(srb, ha->srb_mempool); in qla4xxx_queuecommand()
4765 struct srb *srb; in qla4xxx_abort_active_cmds() local
4771 srb = qla4xxx_del_from_active_array(ha, i); in qla4xxx_abort_active_cmds()
4772 if (srb != NULL) { in qla4xxx_abort_active_cmds()
4773 srb->cmd->result = res; in qla4xxx_abort_active_cmds()
4774 kref_put(&srb->srb_ref, qla4xxx_srb_compl); in qla4xxx_abort_active_cmds()
9073 struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha, in qla4xxx_del_from_active_array()
9076 struct srb *srb = NULL; in qla4xxx_del_from_active_array() local
9081 return srb; in qla4xxx_del_from_active_array()
9083 srb = (struct srb *)CMD_SP(cmd); in qla4xxx_del_from_active_array()
9084 if (!srb) in qla4xxx_del_from_active_array()
9085 return srb; in qla4xxx_del_from_active_array()
9088 if (srb->flags & SRB_DMA_VALID) { in qla4xxx_del_from_active_array()
9089 ha->iocb_cnt -= srb->iocb_cnt; in qla4xxx_del_from_active_array()
9090 if (srb->cmd) in qla4xxx_del_from_active_array()
9091 srb->cmd->host_scribble = in qla4xxx_del_from_active_array()
9094 return srb; in qla4xxx_del_from_active_array()
9109 struct srb *rp; in qla4xxx_eh_wait_on_command()
9125 rp = (struct srb *) CMD_SP(cmd); in qla4xxx_eh_wait_on_command()
9204 struct srb *srb = NULL; in qla4xxx_eh_abort() local
9212 srb = (struct srb *) CMD_SP(cmd); in qla4xxx_eh_abort()
9213 if (!srb) { in qla4xxx_eh_abort()
9219 kref_get(&srb->srb_ref); in qla4xxx_eh_abort()
9222 if (qla4xxx_abort_task(ha, srb) != QLA_SUCCESS) { in qla4xxx_eh_abort()
9232 kref_put(&srb->srb_ref, qla4xxx_srb_compl); in qla4xxx_eh_abort()
9869 srb_cachep = kmem_cache_create("qla4xxx_srbs", sizeof(struct srb), 0, in qla4xxx_module_init()