Lines Matching refs:rst_pkt
373 if (fc->rst_pkt) { in fcp_register()
374 if (fc->rst_pkt->eh_state == SCSI_STATE_UNUSED) in fcp_register()
375 kfree(fc->rst_pkt); in fcp_register()
572 fc->rst_pkt = NULL; /* kmalloc when first used */ in fcp_initialize()
930 fc->rst_pkt->eh_state = SCSI_STATE_FINISHED; in fcp_scsi_reset_done()
931 up(fc->rst_pkt->host->eh_action); in fcp_scsi_reset_done()
943 if (!fc->rst_pkt) { in fcp_scsi_dev_reset()
944 fc->rst_pkt = (Scsi_Cmnd *) kmalloc(sizeof(SCpnt), GFP_KERNEL); in fcp_scsi_dev_reset()
945 if (!fc->rst_pkt) return FAILED; in fcp_scsi_dev_reset()
947 fcmd = FCP_CMND(fc->rst_pkt); in fcp_scsi_dev_reset()
954 fc->rst_pkt->channel = SCpnt->channel; in fcp_scsi_dev_reset()
955 fc->rst_pkt->target = SCpnt->target; in fcp_scsi_dev_reset()
956 fc->rst_pkt->lun = 0; in fcp_scsi_dev_reset()
957 fc->rst_pkt->cmd_len = 0; in fcp_scsi_dev_reset()
969 fcmd = FCP_CMND(fc->rst_pkt); in fcp_scsi_dev_reset()
970 if (fc->rst_pkt->eh_state == SCSI_STATE_QUEUED) in fcp_scsi_dev_reset()
973 fc->rst_pkt->done = NULL; in fcp_scsi_dev_reset()
976 fc->rst_pkt->eh_state = SCSI_STATE_QUEUED; in fcp_scsi_dev_reset()
978 fc->rst_pkt->eh_timeout.data = (unsigned long) fc->rst_pkt; in fcp_scsi_dev_reset()
979 fc->rst_pkt->eh_timeout.expires = jiffies + FCP_RESET_TIMEOUT; in fcp_scsi_dev_reset()
980 fc->rst_pkt->eh_timeout.function = (void (*)(unsigned long))fcp_scsi_reset_done; in fcp_scsi_dev_reset()
982 add_timer(&fc->rst_pkt->eh_timeout); in fcp_scsi_dev_reset()
988 fc->rst_pkt->host->eh_action = &sem; in fcp_scsi_dev_reset()
989 fc->rst_pkt->request.rq_status = RQ_SCSI_BUSY; in fcp_scsi_dev_reset()
991 fc->rst_pkt->done = fcp_scsi_reset_done; in fcp_scsi_dev_reset()
992 fcp_scsi_queue_it(fc, fc->rst_pkt, fcmd, 0); in fcp_scsi_dev_reset()
996 fc->rst_pkt->host->eh_action = NULL; in fcp_scsi_dev_reset()
997 del_timer(&fc->rst_pkt->eh_timeout); in fcp_scsi_dev_reset()
1003 if (fc->rst_pkt->eh_state == SCSI_STATE_TIMEOUT ) { in fcp_scsi_dev_reset()
1004 fc->rst_pkt->eh_state = SCSI_STATE_UNUSED; in fcp_scsi_dev_reset()
1007 fc->rst_pkt->eh_state = SCSI_STATE_UNUSED; in fcp_scsi_dev_reset()