• Home
  • Raw
  • Download

Lines Matching refs:srb

358 static struct srb* qla4xxx_get_new_srb(struct scsi_qla_host *ha,  in qla4xxx_get_new_srb()
363 struct srb *srb; in qla4xxx_get_new_srb() local
365 srb = mempool_alloc(ha->srb_mempool, GFP_ATOMIC); in qla4xxx_get_new_srb()
366 if (!srb) in qla4xxx_get_new_srb()
367 return srb; in qla4xxx_get_new_srb()
369 atomic_set(&srb->ref_count, 1); in qla4xxx_get_new_srb()
370 srb->ha = ha; in qla4xxx_get_new_srb()
371 srb->ddb = ddb_entry; in qla4xxx_get_new_srb()
372 srb->cmd = cmd; in qla4xxx_get_new_srb()
373 srb->flags = 0; in qla4xxx_get_new_srb()
374 cmd->SCp.ptr = (void *)srb; in qla4xxx_get_new_srb()
377 return srb; in qla4xxx_get_new_srb()
380 static void qla4xxx_srb_free_dma(struct scsi_qla_host *ha, struct srb *srb) in qla4xxx_srb_free_dma() argument
382 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_srb_free_dma()
384 if (srb->flags & SRB_DMA_VALID) { in qla4xxx_srb_free_dma()
386 srb->flags &= ~SRB_DMA_VALID; in qla4xxx_srb_free_dma()
391 void qla4xxx_srb_compl(struct scsi_qla_host *ha, struct srb *srb) in qla4xxx_srb_compl() argument
393 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_srb_compl()
395 qla4xxx_srb_free_dma(ha, srb); in qla4xxx_srb_compl()
397 mempool_free(srb, ha->srb_mempool); in qla4xxx_srb_compl()
422 struct srb *srb; in qla4xxx_queuecommand() local
449 srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd, done); in qla4xxx_queuecommand()
450 if (!srb) in qla4xxx_queuecommand()
453 rval = qla4xxx_send_command_to_isp(ha, srb); in qla4xxx_queuecommand()
461 qla4xxx_srb_free_dma(ha, srb); in qla4xxx_queuecommand()
462 mempool_free(srb, ha->srb_mempool); in qla4xxx_queuecommand()
862 struct srb *srb; in qla4xxx_flush_active_srbs() local
868 srb = qla4xxx_del_from_active_array(ha, i); in qla4xxx_flush_active_srbs()
869 if (srb != NULL) { in qla4xxx_flush_active_srbs()
870 srb->cmd->result = DID_RESET << 16; in qla4xxx_flush_active_srbs()
871 qla4xxx_srb_compl(ha, srb); in qla4xxx_flush_active_srbs()
1413 struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, uint32_t index) in qla4xxx_del_from_active_array()
1415 struct srb *srb = NULL; in qla4xxx_del_from_active_array() local
1419 return srb; in qla4xxx_del_from_active_array()
1421 if (!(srb = (struct srb *)cmd->host_scribble)) in qla4xxx_del_from_active_array()
1422 return srb; in qla4xxx_del_from_active_array()
1425 if (srb->flags & SRB_DMA_VALID) { in qla4xxx_del_from_active_array()
1426 ha->req_q_count += srb->iocb_cnt; in qla4xxx_del_from_active_array()
1427 ha->iocb_cnt -= srb->iocb_cnt; in qla4xxx_del_from_active_array()
1428 if (srb->cmd) in qla4xxx_del_from_active_array()
1429 srb->cmd->host_scribble = NULL; in qla4xxx_del_from_active_array()
1431 return srb; in qla4xxx_del_from_active_array()
1446 struct srb *rp; in qla4xxx_eh_wait_on_command()
1451 rp = (struct srb *) cmd->SCp.ptr; in qla4xxx_eh_wait_on_command()
1530 struct srb *sp; in qla4xxx_eh_device_reset()
1533 sp = (struct srb *) cmd->SCp.ptr; in qla4xxx_eh_device_reset()
1707 srb_cachep = kmem_cache_create("qla4xxx_srbs", sizeof(struct srb), 0, in qla4xxx_module_init()