ipr_cmd           586 drivers/scsi/ipr.c static void ipr_trc_hook(struct ipr_cmnd *ipr_cmd,
ipr_cmd           590 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd           596 drivers/scsi/ipr.c 	trace_entry->op_code = ipr_cmd->ioarcb.cmd_pkt.cdb[0];
ipr_cmd           598 drivers/scsi/ipr.c 	if (ipr_cmd->ioa_cfg->sis64)
ipr_cmd           599 drivers/scsi/ipr.c 		trace_entry->ata_op_code = ipr_cmd->i.ata_ioadl.regs.command;
ipr_cmd           601 drivers/scsi/ipr.c 		trace_entry->ata_op_code = ipr_cmd->ioarcb.u.add_data.u.regs.command;
ipr_cmd           602 drivers/scsi/ipr.c 	trace_entry->cmd_index = ipr_cmd->cmd_index & 0xff;
ipr_cmd           603 drivers/scsi/ipr.c 	trace_entry->res_handle = ipr_cmd->ioarcb.res_handle;
ipr_cmd           608 drivers/scsi/ipr.c #define ipr_trc_hook(ipr_cmd, type, add_data) do { } while (0)
ipr_cmd           618 drivers/scsi/ipr.c static void ipr_lock_and_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd           621 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd           624 drivers/scsi/ipr.c 	ipr_cmd->done(ipr_cmd);
ipr_cmd           635 drivers/scsi/ipr.c static void ipr_reinit_ipr_cmnd(struct ipr_cmnd *ipr_cmd)
ipr_cmd           637 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd           638 drivers/scsi/ipr.c 	struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
ipr_cmd           639 drivers/scsi/ipr.c 	struct ipr_ioasa64 *ioasa64 = &ipr_cmd->s.ioasa64;
ipr_cmd           640 drivers/scsi/ipr.c 	dma_addr_t dma_addr = ipr_cmd->dma_addr;
ipr_cmd           651 drivers/scsi/ipr.c 	if (ipr_cmd->ioa_cfg->sis64) {
ipr_cmd           664 drivers/scsi/ipr.c 	ipr_cmd->scsi_cmd = NULL;
ipr_cmd           665 drivers/scsi/ipr.c 	ipr_cmd->qc = NULL;
ipr_cmd           666 drivers/scsi/ipr.c 	ipr_cmd->sense_buffer[0] = 0;
ipr_cmd           667 drivers/scsi/ipr.c 	ipr_cmd->dma_use_sg = 0;
ipr_cmd           677 drivers/scsi/ipr.c static void ipr_init_ipr_cmnd(struct ipr_cmnd *ipr_cmd,
ipr_cmd           680 drivers/scsi/ipr.c 	ipr_reinit_ipr_cmnd(ipr_cmd);
ipr_cmd           681 drivers/scsi/ipr.c 	ipr_cmd->u.scratch = 0;
ipr_cmd           682 drivers/scsi/ipr.c 	ipr_cmd->sibling = NULL;
ipr_cmd           683 drivers/scsi/ipr.c 	ipr_cmd->eh_comp = NULL;
ipr_cmd           684 drivers/scsi/ipr.c 	ipr_cmd->fast_done = fast_done;
ipr_cmd           685 drivers/scsi/ipr.c 	timer_setup(&ipr_cmd->timer, NULL, 0);
ipr_cmd           698 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd = NULL;
ipr_cmd           701 drivers/scsi/ipr.c 		ipr_cmd = list_entry(hrrq->hrrq_free_q.next,
ipr_cmd           703 drivers/scsi/ipr.c 		list_del(&ipr_cmd->queue);
ipr_cmd           707 drivers/scsi/ipr.c 	return ipr_cmd;
ipr_cmd           720 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd =
ipr_cmd           722 drivers/scsi/ipr.c 	ipr_init_ipr_cmnd(ipr_cmd, ipr_lock_and_done);
ipr_cmd           723 drivers/scsi/ipr.c 	return ipr_cmd;
ipr_cmd           819 drivers/scsi/ipr.c static void __ipr_sata_eh_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd           821 drivers/scsi/ipr.c 	struct ata_queued_cmd *qc = ipr_cmd->qc;
ipr_cmd           827 drivers/scsi/ipr.c 	if (ipr_cmd->eh_comp)
ipr_cmd           828 drivers/scsi/ipr.c 		complete(ipr_cmd->eh_comp);
ipr_cmd           829 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd           842 drivers/scsi/ipr.c static void ipr_sata_eh_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd           844 drivers/scsi/ipr.c 	struct ipr_hrr_queue *hrrq = ipr_cmd->hrrq;
ipr_cmd           848 drivers/scsi/ipr.c 	__ipr_sata_eh_done(ipr_cmd);
ipr_cmd           862 drivers/scsi/ipr.c static void __ipr_scsi_eh_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd           864 drivers/scsi/ipr.c 	struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
ipr_cmd           868 drivers/scsi/ipr.c 	scsi_dma_unmap(ipr_cmd->scsi_cmd);
ipr_cmd           870 drivers/scsi/ipr.c 	if (ipr_cmd->eh_comp)
ipr_cmd           871 drivers/scsi/ipr.c 		complete(ipr_cmd->eh_comp);
ipr_cmd           872 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd           885 drivers/scsi/ipr.c static void ipr_scsi_eh_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd           888 drivers/scsi/ipr.c 	struct ipr_hrr_queue *hrrq = ipr_cmd->hrrq;
ipr_cmd           891 drivers/scsi/ipr.c 	__ipr_scsi_eh_done(ipr_cmd);
ipr_cmd           906 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd, *temp;
ipr_cmd           912 drivers/scsi/ipr.c 		list_for_each_entry_safe(ipr_cmd,
ipr_cmd           914 drivers/scsi/ipr.c 			list_del(&ipr_cmd->queue);
ipr_cmd           916 drivers/scsi/ipr.c 			ipr_cmd->s.ioasa.hdr.ioasc =
ipr_cmd           918 drivers/scsi/ipr.c 			ipr_cmd->s.ioasa.hdr.ilid =
ipr_cmd           921 drivers/scsi/ipr.c 			if (ipr_cmd->scsi_cmd)
ipr_cmd           922 drivers/scsi/ipr.c 				ipr_cmd->done = __ipr_scsi_eh_done;
ipr_cmd           923 drivers/scsi/ipr.c 			else if (ipr_cmd->qc)
ipr_cmd           924 drivers/scsi/ipr.c 				ipr_cmd->done = __ipr_sata_eh_done;
ipr_cmd           926 drivers/scsi/ipr.c 			ipr_trc_hook(ipr_cmd, IPR_TRACE_FINISH,
ipr_cmd           928 drivers/scsi/ipr.c 			del_timer(&ipr_cmd->timer);
ipr_cmd           929 drivers/scsi/ipr.c 			ipr_cmd->done(ipr_cmd);
ipr_cmd           947 drivers/scsi/ipr.c static void ipr_send_command(struct ipr_cmnd *ipr_cmd)
ipr_cmd           949 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd           950 drivers/scsi/ipr.c 	dma_addr_t send_dma_addr = ipr_cmd->dma_addr;
ipr_cmd           958 drivers/scsi/ipr.c 		if (ipr_cmd->dma_use_sg * sizeof(struct ipr_ioadl64_desc) > 128 )
ipr_cmd           978 drivers/scsi/ipr.c static void ipr_do_req(struct ipr_cmnd *ipr_cmd,
ipr_cmd           982 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
ipr_cmd           984 drivers/scsi/ipr.c 	ipr_cmd->done = done;
ipr_cmd           986 drivers/scsi/ipr.c 	ipr_cmd->timer.expires = jiffies + timeout;
ipr_cmd           987 drivers/scsi/ipr.c 	ipr_cmd->timer.function = timeout_func;
ipr_cmd           989 drivers/scsi/ipr.c 	add_timer(&ipr_cmd->timer);
ipr_cmd           991 drivers/scsi/ipr.c 	ipr_trc_hook(ipr_cmd, IPR_TRACE_START, 0);
ipr_cmd           993 drivers/scsi/ipr.c 	ipr_send_command(ipr_cmd);
ipr_cmd          1006 drivers/scsi/ipr.c static void ipr_internal_cmd_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          1008 drivers/scsi/ipr.c 	if (ipr_cmd->sibling)
ipr_cmd          1009 drivers/scsi/ipr.c 		ipr_cmd->sibling = NULL;
ipr_cmd          1011 drivers/scsi/ipr.c 		complete(&ipr_cmd->completion);
ipr_cmd          1027 drivers/scsi/ipr.c static void ipr_init_ioadl(struct ipr_cmnd *ipr_cmd, dma_addr_t dma_addr,
ipr_cmd          1030 drivers/scsi/ipr.c 	struct ipr_ioadl_desc *ioadl = ipr_cmd->i.ioadl;
ipr_cmd          1031 drivers/scsi/ipr.c 	struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ioadl64;
ipr_cmd          1033 drivers/scsi/ipr.c 	ipr_cmd->dma_use_sg = 1;
ipr_cmd          1035 drivers/scsi/ipr.c 	if (ipr_cmd->ioa_cfg->sis64) {
ipr_cmd          1040 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.ioadl_len =
ipr_cmd          1042 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.data_transfer_length = cpu_to_be32(len);
ipr_cmd          1048 drivers/scsi/ipr.c 			ipr_cmd->ioarcb.read_ioadl_len =
ipr_cmd          1050 drivers/scsi/ipr.c 			ipr_cmd->ioarcb.read_data_transfer_length = cpu_to_be32(len);
ipr_cmd          1052 drivers/scsi/ipr.c 			ipr_cmd->ioarcb.ioadl_len =
ipr_cmd          1054 drivers/scsi/ipr.c 			ipr_cmd->ioarcb.data_transfer_length = cpu_to_be32(len);
ipr_cmd          1068 drivers/scsi/ipr.c static void ipr_send_blocking_cmd(struct ipr_cmnd *ipr_cmd,
ipr_cmd          1072 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          1074 drivers/scsi/ipr.c 	init_completion(&ipr_cmd->completion);
ipr_cmd          1075 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_internal_cmd_done, timeout_func, timeout);
ipr_cmd          1078 drivers/scsi/ipr.c 	wait_for_completion(&ipr_cmd->completion);
ipr_cmd          1111 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          1115 drivers/scsi/ipr.c 		ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
ipr_cmd          1116 drivers/scsi/ipr.c 		list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
ipr_cmd          1119 drivers/scsi/ipr.c 		ipr_cmd->u.hostrcb = hostrcb;
ipr_cmd          1120 drivers/scsi/ipr.c 		ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          1129 drivers/scsi/ipr.c 		ipr_init_ioadl(ipr_cmd, hostrcb->hostrcb_dma,
ipr_cmd          1133 drivers/scsi/ipr.c 			ipr_cmd->done = ipr_process_ccn;
ipr_cmd          1135 drivers/scsi/ipr.c 			ipr_cmd->done = ipr_process_error;
ipr_cmd          1137 drivers/scsi/ipr.c 		ipr_trc_hook(ipr_cmd, IPR_TRACE_START, IPR_IOA_RES_ADDR);
ipr_cmd          1139 drivers/scsi/ipr.c 		ipr_send_command(ipr_cmd);
ipr_cmd          1498 drivers/scsi/ipr.c static void ipr_process_ccn(struct ipr_cmnd *ipr_cmd)
ipr_cmd          1500 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          1501 drivers/scsi/ipr.c 	struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb;
ipr_cmd          1502 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          1505 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          2636 drivers/scsi/ipr.c static void ipr_process_error(struct ipr_cmnd *ipr_cmd)
ipr_cmd          2638 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          2639 drivers/scsi/ipr.c 	struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb;
ipr_cmd          2640 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          2649 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          2680 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd = from_timer(ipr_cmd, t, timer);
ipr_cmd          2682 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          2694 drivers/scsi/ipr.c 	if (!ioa_cfg->in_reset_reload || ioa_cfg->reset_cmd == ipr_cmd)
ipr_cmd          2713 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd = from_timer(ipr_cmd, t, timer);
ipr_cmd          2715 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          2727 drivers/scsi/ipr.c 	if (!ioa_cfg->in_reset_reload || ioa_cfg->reset_cmd == ipr_cmd) {
ipr_cmd          3950 drivers/scsi/ipr.c static void ipr_build_ucode_ioadl64(struct ipr_cmnd *ipr_cmd,
ipr_cmd          3953 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          3954 drivers/scsi/ipr.c 	struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ioadl64;
ipr_cmd          3959 drivers/scsi/ipr.c 	ipr_cmd->dma_use_sg = sglist->num_dma_sg;
ipr_cmd          3964 drivers/scsi/ipr.c 		cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          3965 drivers/scsi/ipr.c 	for_each_sg(scatterlist, sg, ipr_cmd->dma_use_sg, i) {
ipr_cmd          3982 drivers/scsi/ipr.c static void ipr_build_ucode_ioadl(struct ipr_cmnd *ipr_cmd,
ipr_cmd          3985 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          3986 drivers/scsi/ipr.c 	struct ipr_ioadl_desc *ioadl = ipr_cmd->i.ioadl;
ipr_cmd          3991 drivers/scsi/ipr.c 	ipr_cmd->dma_use_sg = sglist->num_dma_sg;
ipr_cmd          3996 drivers/scsi/ipr.c 		cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          3998 drivers/scsi/ipr.c 	for_each_sg(scatterlist, sg, ipr_cmd->dma_use_sg, i) {
ipr_cmd          5054 drivers/scsi/ipr.c static int ipr_match_lun(struct ipr_cmnd *ipr_cmd, void *device)
ipr_cmd          5056 drivers/scsi/ipr.c 	if (ipr_cmd->scsi_cmd && ipr_cmd->scsi_cmd->device == device)
ipr_cmd          5068 drivers/scsi/ipr.c static bool ipr_cmnd_is_free(struct ipr_cmnd *ipr_cmd)
ipr_cmd          5072 drivers/scsi/ipr.c 	list_for_each_entry(loop_cmd, &ipr_cmd->hrrq->hrrq_free_q, queue) {
ipr_cmd          5073 drivers/scsi/ipr.c 		if (loop_cmd == ipr_cmd)
ipr_cmd          5088 drivers/scsi/ipr.c static int ipr_match_res(struct ipr_cmnd *ipr_cmd, void *resource)
ipr_cmd          5092 drivers/scsi/ipr.c 	if (res && ipr_cmd->ioarcb.res_handle == res->res_handle)
ipr_cmd          5109 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          5123 drivers/scsi/ipr.c 				ipr_cmd = ioa_cfg->ipr_cmnd_list[i];
ipr_cmd          5124 drivers/scsi/ipr.c 				if (!ipr_cmnd_is_free(ipr_cmd)) {
ipr_cmd          5125 drivers/scsi/ipr.c 					if (match(ipr_cmd, device)) {
ipr_cmd          5126 drivers/scsi/ipr.c 						ipr_cmd->eh_comp = ∁
ipr_cmd          5143 drivers/scsi/ipr.c 						ipr_cmd = ioa_cfg->ipr_cmnd_list[i];
ipr_cmd          5144 drivers/scsi/ipr.c 						if (!ipr_cmnd_is_free(ipr_cmd)) {
ipr_cmd          5145 drivers/scsi/ipr.c 							if (match(ipr_cmd, device)) {
ipr_cmd          5146 drivers/scsi/ipr.c 								ipr_cmd->eh_comp = NULL;
ipr_cmd          5218 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          5225 drivers/scsi/ipr.c 	ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
ipr_cmd          5226 drivers/scsi/ipr.c 	ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          5229 drivers/scsi/ipr.c 	if (ipr_cmd->ioa_cfg->sis64) {
ipr_cmd          5230 drivers/scsi/ipr.c 		regs = &ipr_cmd->i.ata_ioadl.regs;
ipr_cmd          5244 drivers/scsi/ipr.c 	ipr_send_blocking_cmd(ipr_cmd, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT);
ipr_cmd          5245 drivers/scsi/ipr.c 	ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          5246 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          5248 drivers/scsi/ipr.c 		if (ipr_cmd->ioa_cfg->sis64)
ipr_cmd          5249 drivers/scsi/ipr.c 			memcpy(&res->sata_port->ioasa, &ipr_cmd->s.ioasa64.u.gata,
ipr_cmd          5252 drivers/scsi/ipr.c 			memcpy(&res->sata_port->ioasa, &ipr_cmd->s.ioasa.u.gata,
ipr_cmd          5321 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          5345 drivers/scsi/ipr.c 			ipr_cmd = ioa_cfg->ipr_cmnd_list[i];
ipr_cmd          5347 drivers/scsi/ipr.c 			if (ipr_cmd->ioarcb.res_handle == res->res_handle) {
ipr_cmd          5348 drivers/scsi/ipr.c 				if (!ipr_cmd->qc)
ipr_cmd          5350 drivers/scsi/ipr.c 				if (ipr_cmnd_is_free(ipr_cmd))
ipr_cmd          5353 drivers/scsi/ipr.c 				ipr_cmd->done = ipr_sata_eh_done;
ipr_cmd          5354 drivers/scsi/ipr.c 				if (!(ipr_cmd->qc->flags & ATA_QCFLAG_FAILED)) {
ipr_cmd          5355 drivers/scsi/ipr.c 					ipr_cmd->qc->err_mask |= AC_ERR_TIMEOUT;
ipr_cmd          5356 drivers/scsi/ipr.c 					ipr_cmd->qc->flags |= ATA_QCFLAG_FAILED;
ipr_cmd          5414 drivers/scsi/ipr.c static void ipr_bus_reset_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          5416 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          5422 drivers/scsi/ipr.c 			if (res->res_handle == ipr_cmd->ioarcb.res_handle) {
ipr_cmd          5432 drivers/scsi/ipr.c 	if (ipr_cmd->sibling->sibling)
ipr_cmd          5433 drivers/scsi/ipr.c 		ipr_cmd->sibling->sibling = NULL;
ipr_cmd          5435 drivers/scsi/ipr.c 		ipr_cmd->sibling->done(ipr_cmd->sibling);
ipr_cmd          5437 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          5454 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd = from_timer(ipr_cmd, t, timer);
ipr_cmd          5456 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          5462 drivers/scsi/ipr.c 	if (ipr_cmd->completion.done || ioa_cfg->in_reset_reload) {
ipr_cmd          5467 drivers/scsi/ipr.c 	sdev_printk(KERN_ERR, ipr_cmd->u.sdev, "Abort timed out. Resetting bus.\n");
ipr_cmd          5469 drivers/scsi/ipr.c 	ipr_cmd->sibling = reset_cmd;
ipr_cmd          5470 drivers/scsi/ipr.c 	reset_cmd->sibling = ipr_cmd;
ipr_cmd          5471 drivers/scsi/ipr.c 	reset_cmd->ioarcb.res_handle = ipr_cmd->ioarcb.res_handle;
ipr_cmd          5493 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          5541 drivers/scsi/ipr.c 	ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
ipr_cmd          5542 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.res_handle = res->res_handle;
ipr_cmd          5543 drivers/scsi/ipr.c 	cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
ipr_cmd          5546 drivers/scsi/ipr.c 	ipr_cmd->u.sdev = scsi_cmd->device;
ipr_cmd          5550 drivers/scsi/ipr.c 	ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_CANCEL_ALL_TIMEOUT);
ipr_cmd          5551 drivers/scsi/ipr.c 	ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          5562 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          5719 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          5742 drivers/scsi/ipr.c 		ipr_cmd = ioa_cfg->ipr_cmnd_list[cmd_index];
ipr_cmd          5743 drivers/scsi/ipr.c 		ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          5745 drivers/scsi/ipr.c 		ipr_trc_hook(ipr_cmd, IPR_TRACE_FINISH, ioasc);
ipr_cmd          5747 drivers/scsi/ipr.c 		list_move_tail(&ipr_cmd->queue, doneq);
ipr_cmd          5767 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd, *temp;
ipr_cmd          5782 drivers/scsi/ipr.c 	list_for_each_entry_safe(ipr_cmd, temp, &doneq, queue) {
ipr_cmd          5783 drivers/scsi/ipr.c 		list_del(&ipr_cmd->queue);
ipr_cmd          5784 drivers/scsi/ipr.c 		del_timer(&ipr_cmd->timer);
ipr_cmd          5785 drivers/scsi/ipr.c 		ipr_cmd->fast_done(ipr_cmd);
ipr_cmd          5807 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd, *temp;
ipr_cmd          5851 drivers/scsi/ipr.c 	list_for_each_entry_safe(ipr_cmd, temp, &doneq, queue) {
ipr_cmd          5852 drivers/scsi/ipr.c 		list_del(&ipr_cmd->queue);
ipr_cmd          5853 drivers/scsi/ipr.c 		del_timer(&ipr_cmd->timer);
ipr_cmd          5854 drivers/scsi/ipr.c 		ipr_cmd->fast_done(ipr_cmd);
ipr_cmd          5872 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd, *temp;
ipr_cmd          5901 drivers/scsi/ipr.c 	list_for_each_entry_safe(ipr_cmd, temp, &doneq, queue) {
ipr_cmd          5902 drivers/scsi/ipr.c 		list_del(&ipr_cmd->queue);
ipr_cmd          5903 drivers/scsi/ipr.c 		del_timer(&ipr_cmd->timer);
ipr_cmd          5904 drivers/scsi/ipr.c 		ipr_cmd->fast_done(ipr_cmd);
ipr_cmd          5918 drivers/scsi/ipr.c 			     struct ipr_cmnd *ipr_cmd)
ipr_cmd          5924 drivers/scsi/ipr.c 	struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
ipr_cmd          5925 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          5926 drivers/scsi/ipr.c 	struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ioadl64;
ipr_cmd          5939 drivers/scsi/ipr.c 	ipr_cmd->dma_use_sg = nseg;
ipr_cmd          5943 drivers/scsi/ipr.c 		cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          5951 drivers/scsi/ipr.c 	scsi_for_each_sg(scsi_cmd, sg, ipr_cmd->dma_use_sg, i) {
ipr_cmd          5970 drivers/scsi/ipr.c 			   struct ipr_cmnd *ipr_cmd)
ipr_cmd          5976 drivers/scsi/ipr.c 	struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
ipr_cmd          5977 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          5978 drivers/scsi/ipr.c 	struct ipr_ioadl_desc *ioadl = ipr_cmd->i.ioadl;
ipr_cmd          5990 drivers/scsi/ipr.c 	ipr_cmd->dma_use_sg = nseg;
ipr_cmd          5997 drivers/scsi/ipr.c 			cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          6002 drivers/scsi/ipr.c 			cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          6005 drivers/scsi/ipr.c 	if (ipr_cmd->dma_use_sg <= ARRAY_SIZE(ioarcb->u.add_data.u.ioadl)) {
ipr_cmd          6007 drivers/scsi/ipr.c 		ioarcb->write_ioadl_addr = cpu_to_be32((ipr_cmd->dma_addr) +
ipr_cmd          6012 drivers/scsi/ipr.c 	scsi_for_each_sg(scsi_cmd, sg, ipr_cmd->dma_use_sg, i) {
ipr_cmd          6032 drivers/scsi/ipr.c static void __ipr_erp_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6034 drivers/scsi/ipr.c 	struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
ipr_cmd          6036 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          6043 drivers/scsi/ipr.c 		memcpy(scsi_cmd->sense_buffer, ipr_cmd->sense_buffer,
ipr_cmd          6052 drivers/scsi/ipr.c 	scsi_dma_unmap(ipr_cmd->scsi_cmd);
ipr_cmd          6054 drivers/scsi/ipr.c 	if (ipr_cmd->eh_comp)
ipr_cmd          6055 drivers/scsi/ipr.c 		complete(ipr_cmd->eh_comp);
ipr_cmd          6056 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          6069 drivers/scsi/ipr.c static void ipr_erp_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6071 drivers/scsi/ipr.c 	struct ipr_hrr_queue *hrrq = ipr_cmd->hrrq;
ipr_cmd          6075 drivers/scsi/ipr.c 	__ipr_erp_done(ipr_cmd);
ipr_cmd          6086 drivers/scsi/ipr.c static void ipr_reinit_ipr_cmnd_for_erp(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6088 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          6089 drivers/scsi/ipr.c 	struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
ipr_cmd          6090 drivers/scsi/ipr.c 	dma_addr_t dma_addr = ipr_cmd->dma_addr;
ipr_cmd          6100 drivers/scsi/ipr.c 	if (ipr_cmd->ioa_cfg->sis64)
ipr_cmd          6120 drivers/scsi/ipr.c static void __ipr_erp_request_sense(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6122 drivers/scsi/ipr.c 	struct ipr_cmd_pkt *cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
ipr_cmd          6123 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          6126 drivers/scsi/ipr.c 		__ipr_erp_done(ipr_cmd);
ipr_cmd          6130 drivers/scsi/ipr.c 	ipr_reinit_ipr_cmnd_for_erp(ipr_cmd);
ipr_cmd          6139 drivers/scsi/ipr.c 	ipr_init_ioadl(ipr_cmd, ipr_cmd->sense_buffer_dma,
ipr_cmd          6142 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_erp_done, ipr_timeout,
ipr_cmd          6156 drivers/scsi/ipr.c static void ipr_erp_request_sense(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6158 drivers/scsi/ipr.c 	struct ipr_hrr_queue *hrrq = ipr_cmd->hrrq;
ipr_cmd          6162 drivers/scsi/ipr.c 	__ipr_erp_request_sense(ipr_cmd);
ipr_cmd          6178 drivers/scsi/ipr.c static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6180 drivers/scsi/ipr.c 	struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
ipr_cmd          6186 drivers/scsi/ipr.c 	ipr_reinit_ipr_cmnd_for_erp(ipr_cmd);
ipr_cmd          6189 drivers/scsi/ipr.c 		__ipr_erp_request_sense(ipr_cmd);
ipr_cmd          6193 drivers/scsi/ipr.c 	cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
ipr_cmd          6197 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_erp_request_sense, ipr_timeout,
ipr_cmd          6215 drivers/scsi/ipr.c 			   struct ipr_cmnd *ipr_cmd, struct ipr_resource_entry *res)
ipr_cmd          6220 drivers/scsi/ipr.c 	struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
ipr_cmd          6277 drivers/scsi/ipr.c static void ipr_gen_sense(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6280 drivers/scsi/ipr.c 	u8 *sense_buf = ipr_cmd->scsi_cmd->sense_buffer;
ipr_cmd          6281 drivers/scsi/ipr.c 	struct ipr_resource_entry *res = ipr_cmd->scsi_cmd->device->hostdata;
ipr_cmd          6282 drivers/scsi/ipr.c 	struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
ipr_cmd          6290 drivers/scsi/ipr.c 	ipr_cmd->scsi_cmd->result = SAM_STAT_CHECK_CONDITION;
ipr_cmd          6370 drivers/scsi/ipr.c static int ipr_get_autosense(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6372 drivers/scsi/ipr.c 	struct ipr_ioasa *ioasa = &ipr_cmd->s.ioasa;
ipr_cmd          6373 drivers/scsi/ipr.c 	struct ipr_ioasa64 *ioasa64 = &ipr_cmd->s.ioasa64;
ipr_cmd          6378 drivers/scsi/ipr.c 	if (ipr_cmd->ioa_cfg->sis64)
ipr_cmd          6379 drivers/scsi/ipr.c 		memcpy(ipr_cmd->scsi_cmd->sense_buffer, ioasa64->auto_sense.data,
ipr_cmd          6383 drivers/scsi/ipr.c 		memcpy(ipr_cmd->scsi_cmd->sense_buffer, ioasa->auto_sense.data,
ipr_cmd          6401 drivers/scsi/ipr.c 			      struct ipr_cmnd *ipr_cmd)
ipr_cmd          6403 drivers/scsi/ipr.c 	struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
ipr_cmd          6405 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          6409 drivers/scsi/ipr.c 		__ipr_scsi_eh_done(ipr_cmd);
ipr_cmd          6414 drivers/scsi/ipr.c 		ipr_gen_sense(ipr_cmd);
ipr_cmd          6416 drivers/scsi/ipr.c 	ipr_dump_ioasa(ioa_cfg, ipr_cmd, res);
ipr_cmd          6463 drivers/scsi/ipr.c 			if (!ipr_get_autosense(ipr_cmd)) {
ipr_cmd          6465 drivers/scsi/ipr.c 					ipr_erp_cancel_all(ipr_cmd);
ipr_cmd          6490 drivers/scsi/ipr.c 	scsi_dma_unmap(ipr_cmd->scsi_cmd);
ipr_cmd          6492 drivers/scsi/ipr.c 	if (ipr_cmd->eh_comp)
ipr_cmd          6493 drivers/scsi/ipr.c 		complete(ipr_cmd->eh_comp);
ipr_cmd          6494 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          6507 drivers/scsi/ipr.c static void ipr_scsi_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6509 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          6510 drivers/scsi/ipr.c 	struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd;
ipr_cmd          6511 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          6514 drivers/scsi/ipr.c 	scsi_set_resid(scsi_cmd, be32_to_cpu(ipr_cmd->s.ioasa.hdr.residual_data_len));
ipr_cmd          6519 drivers/scsi/ipr.c 		spin_lock_irqsave(ipr_cmd->hrrq->lock, lock_flags);
ipr_cmd          6521 drivers/scsi/ipr.c 		if (ipr_cmd->eh_comp)
ipr_cmd          6522 drivers/scsi/ipr.c 			complete(ipr_cmd->eh_comp);
ipr_cmd          6523 drivers/scsi/ipr.c 		list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          6524 drivers/scsi/ipr.c 		spin_unlock_irqrestore(ipr_cmd->hrrq->lock, lock_flags);
ipr_cmd          6527 drivers/scsi/ipr.c 		spin_lock(&ipr_cmd->hrrq->_lock);
ipr_cmd          6528 drivers/scsi/ipr.c 		ipr_erp_start(ioa_cfg, ipr_cmd);
ipr_cmd          6529 drivers/scsi/ipr.c 		spin_unlock(&ipr_cmd->hrrq->_lock);
ipr_cmd          6552 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          6593 drivers/scsi/ipr.c 	ipr_cmd = __ipr_get_free_ipr_cmnd(hrrq);
ipr_cmd          6594 drivers/scsi/ipr.c 	if (ipr_cmd == NULL) {
ipr_cmd          6600 drivers/scsi/ipr.c 	ipr_init_ipr_cmnd(ipr_cmd, ipr_scsi_done);
ipr_cmd          6601 drivers/scsi/ipr.c 	ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          6604 drivers/scsi/ipr.c 	ipr_cmd->scsi_cmd = scsi_cmd;
ipr_cmd          6605 drivers/scsi/ipr.c 	ipr_cmd->done = ipr_scsi_eh_done;
ipr_cmd          6639 drivers/scsi/ipr.c 		rc = ipr_build_ioadl64(ioa_cfg, ipr_cmd);
ipr_cmd          6641 drivers/scsi/ipr.c 		rc = ipr_build_ioadl(ioa_cfg, ipr_cmd);
ipr_cmd          6645 drivers/scsi/ipr.c 		list_add_tail(&ipr_cmd->queue, &hrrq->hrrq_free_q);
ipr_cmd          6653 drivers/scsi/ipr.c 		list_add_tail(&ipr_cmd->queue, &hrrq->hrrq_free_q);
ipr_cmd          6664 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &hrrq->hrrq_pending_q);
ipr_cmd          6665 drivers/scsi/ipr.c 	ipr_trc_hook(ipr_cmd, IPR_TRACE_START, IPR_GET_RES_PHYS_LOC(res));
ipr_cmd          6666 drivers/scsi/ipr.c 	ipr_send_command(ipr_cmd);
ipr_cmd          6803 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          6816 drivers/scsi/ipr.c 		list_for_each_entry(ipr_cmd, &hrrq->hrrq_pending_q, queue) {
ipr_cmd          6817 drivers/scsi/ipr.c 			if (ipr_cmd->qc == qc) {
ipr_cmd          6863 drivers/scsi/ipr.c static void ipr_sata_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          6865 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          6866 drivers/scsi/ipr.c 	struct ata_queued_cmd *qc = ipr_cmd->qc;
ipr_cmd          6869 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          6871 drivers/scsi/ipr.c 	spin_lock(&ipr_cmd->hrrq->_lock);
ipr_cmd          6872 drivers/scsi/ipr.c 	if (ipr_cmd->ioa_cfg->sis64)
ipr_cmd          6873 drivers/scsi/ipr.c 		memcpy(&sata_port->ioasa, &ipr_cmd->s.ioasa64.u.gata,
ipr_cmd          6876 drivers/scsi/ipr.c 		memcpy(&sata_port->ioasa, &ipr_cmd->s.ioasa.u.gata,
ipr_cmd          6878 drivers/scsi/ipr.c 	ipr_dump_ioasa(ioa_cfg, ipr_cmd, res);
ipr_cmd          6880 drivers/scsi/ipr.c 	if (be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc_specific) & IPR_ATA_DEVICE_WAS_RESET)
ipr_cmd          6887 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          6888 drivers/scsi/ipr.c 	spin_unlock(&ipr_cmd->hrrq->_lock);
ipr_cmd          6898 drivers/scsi/ipr.c static void ipr_build_ata_ioadl64(struct ipr_cmnd *ipr_cmd,
ipr_cmd          6902 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          6903 drivers/scsi/ipr.c 	struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ata_ioadl.ioadl64;
ipr_cmd          6908 drivers/scsi/ipr.c 	dma_addr_t dma_addr = ipr_cmd->dma_addr;
ipr_cmd          6921 drivers/scsi/ipr.c 		cpu_to_be32(sizeof(struct ipr_ioadl64_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          6944 drivers/scsi/ipr.c static void ipr_build_ata_ioadl(struct ipr_cmnd *ipr_cmd,
ipr_cmd          6948 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          6949 drivers/scsi/ipr.c 	struct ipr_ioadl_desc *ioadl = ipr_cmd->i.ioadl;
ipr_cmd          6963 drivers/scsi/ipr.c 			cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          6968 drivers/scsi/ipr.c 			cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg);
ipr_cmd          6995 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          7014 drivers/scsi/ipr.c 	ipr_cmd = __ipr_get_free_ipr_cmnd(hrrq);
ipr_cmd          7015 drivers/scsi/ipr.c 	if (ipr_cmd == NULL) {
ipr_cmd          7020 drivers/scsi/ipr.c 	qc->lldd_task = ipr_cmd;
ipr_cmd          7038 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          7045 drivers/scsi/ipr.c 	ipr_cmd = qc->lldd_task;
ipr_cmd          7046 drivers/scsi/ipr.c 	if (ipr_cmd == NULL)
ipr_cmd          7050 drivers/scsi/ipr.c 	spin_lock(&ipr_cmd->hrrq->_lock);
ipr_cmd          7051 drivers/scsi/ipr.c 	if (unlikely(!ipr_cmd->hrrq->allow_cmds ||
ipr_cmd          7052 drivers/scsi/ipr.c 			ipr_cmd->hrrq->ioa_is_dead)) {
ipr_cmd          7053 drivers/scsi/ipr.c 		list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          7054 drivers/scsi/ipr.c 		spin_unlock(&ipr_cmd->hrrq->_lock);
ipr_cmd          7058 drivers/scsi/ipr.c 	ipr_init_ipr_cmnd(ipr_cmd, ipr_lock_and_done);
ipr_cmd          7059 drivers/scsi/ipr.c 	ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7062 drivers/scsi/ipr.c 		regs = &ipr_cmd->i.ata_ioadl.regs;
ipr_cmd          7070 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
ipr_cmd          7071 drivers/scsi/ipr.c 	ipr_cmd->qc = qc;
ipr_cmd          7072 drivers/scsi/ipr.c 	ipr_cmd->done = ipr_sata_done;
ipr_cmd          7073 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.res_handle = res->res_handle;
ipr_cmd          7077 drivers/scsi/ipr.c 	ipr_cmd->dma_use_sg = qc->n_elem;
ipr_cmd          7080 drivers/scsi/ipr.c 		ipr_build_ata_ioadl64(ipr_cmd, qc);
ipr_cmd          7082 drivers/scsi/ipr.c 		ipr_build_ata_ioadl(ipr_cmd, qc);
ipr_cmd          7087 drivers/scsi/ipr.c 	ipr_trc_hook(ipr_cmd, IPR_TRACE_START, IPR_GET_RES_PHYS_LOC(res));
ipr_cmd          7110 drivers/scsi/ipr.c 		spin_unlock(&ipr_cmd->hrrq->_lock);
ipr_cmd          7114 drivers/scsi/ipr.c 	ipr_send_command(ipr_cmd);
ipr_cmd          7115 drivers/scsi/ipr.c 	spin_unlock(&ipr_cmd->hrrq->_lock);
ipr_cmd          7218 drivers/scsi/ipr.c static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7220 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7239 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          7257 drivers/scsi/ipr.c static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7259 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7298 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          7335 drivers/scsi/ipr.c static int ipr_set_supported_devs(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7337 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7339 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7340 drivers/scsi/ipr.c 	struct ipr_resource_entry *res = ipr_cmd->u.res;
ipr_cmd          7342 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioa_reset_done;
ipr_cmd          7348 drivers/scsi/ipr.c 		ipr_cmd->u.res = res;
ipr_cmd          7360 drivers/scsi/ipr.c 		ipr_init_ioadl(ipr_cmd,
ipr_cmd          7366 drivers/scsi/ipr.c 		ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout,
ipr_cmd          7370 drivers/scsi/ipr.c 			ipr_cmd->job_step = ipr_set_supported_devs;
ipr_cmd          7536 drivers/scsi/ipr.c static void ipr_build_mode_select(struct ipr_cmnd *ipr_cmd,
ipr_cmd          7540 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7549 drivers/scsi/ipr.c 	ipr_init_ioadl(ipr_cmd, dma_addr, xfer_len, IPR_IOADL_FLAGS_WRITE_LAST);
ipr_cmd          7562 drivers/scsi/ipr.c static int ipr_ioafp_mode_select_page28(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7564 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7575 drivers/scsi/ipr.c 	ipr_build_mode_select(ipr_cmd, cpu_to_be32(IPR_IOA_RES_HANDLE), 0x11,
ipr_cmd          7579 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_set_supported_devs;
ipr_cmd          7580 drivers/scsi/ipr.c 	ipr_cmd->u.res = list_entry(ioa_cfg->used_res_q.next,
ipr_cmd          7582 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout, IPR_INTERNAL_TIMEOUT);
ipr_cmd          7599 drivers/scsi/ipr.c static void ipr_build_mode_sense(struct ipr_cmnd *ipr_cmd,
ipr_cmd          7603 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7611 drivers/scsi/ipr.c 	ipr_init_ioadl(ipr_cmd, dma_addr, xfer_len, IPR_IOADL_FLAGS_READ_LAST);
ipr_cmd          7623 drivers/scsi/ipr.c static int ipr_reset_cmd_failed(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7625 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7626 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          7630 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.cdb[0], ioasc);
ipr_cmd          7633 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          7647 drivers/scsi/ipr.c static int ipr_reset_mode_sense_failed(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7649 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7650 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          7653 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_set_supported_devs;
ipr_cmd          7654 drivers/scsi/ipr.c 		ipr_cmd->u.res = list_entry(ioa_cfg->used_res_q.next,
ipr_cmd          7659 drivers/scsi/ipr.c 	return ipr_reset_cmd_failed(ipr_cmd);
ipr_cmd          7672 drivers/scsi/ipr.c static int ipr_ioafp_mode_sense_page28(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7674 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7677 drivers/scsi/ipr.c 	ipr_build_mode_sense(ipr_cmd, cpu_to_be32(IPR_IOA_RES_HANDLE),
ipr_cmd          7682 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_mode_select_page28;
ipr_cmd          7683 drivers/scsi/ipr.c 	ipr_cmd->job_step_failed = ipr_reset_mode_sense_failed;
ipr_cmd          7685 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout, IPR_INTERNAL_TIMEOUT);
ipr_cmd          7700 drivers/scsi/ipr.c static int ipr_ioafp_mode_select_page24(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7702 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7717 drivers/scsi/ipr.c 	ipr_build_mode_select(ipr_cmd, cpu_to_be32(IPR_IOA_RES_HANDLE), 0x11,
ipr_cmd          7721 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_mode_sense_page28;
ipr_cmd          7722 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout, IPR_INTERNAL_TIMEOUT);
ipr_cmd          7738 drivers/scsi/ipr.c static int ipr_reset_mode_sense_page24_failed(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7740 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          7743 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_ioafp_mode_sense_page28;
ipr_cmd          7747 drivers/scsi/ipr.c 	return ipr_reset_cmd_failed(ipr_cmd);
ipr_cmd          7760 drivers/scsi/ipr.c static int ipr_ioafp_mode_sense_page24(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7762 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7765 drivers/scsi/ipr.c 	ipr_build_mode_sense(ipr_cmd, cpu_to_be32(IPR_IOA_RES_HANDLE),
ipr_cmd          7770 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_mode_select_page24;
ipr_cmd          7771 drivers/scsi/ipr.c 	ipr_cmd->job_step_failed = ipr_reset_mode_sense_page24_failed;
ipr_cmd          7773 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout, IPR_INTERNAL_TIMEOUT);
ipr_cmd          7791 drivers/scsi/ipr.c static int ipr_init_res_table(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7793 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7864 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_ioafp_mode_sense_page24;
ipr_cmd          7866 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_ioafp_mode_sense_page28;
ipr_cmd          7882 drivers/scsi/ipr.c static int ipr_ioafp_query_ioa_cfg(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7884 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7885 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7903 drivers/scsi/ipr.c 	ipr_init_ioadl(ipr_cmd, ioa_cfg->cfg_table_dma, ioa_cfg->cfg_table_size,
ipr_cmd          7906 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_init_res_table;
ipr_cmd          7908 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout, IPR_INTERNAL_TIMEOUT);
ipr_cmd          7914 drivers/scsi/ipr.c static int ipr_ioa_service_action_failed(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7916 drivers/scsi/ipr.c 	u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          7921 drivers/scsi/ipr.c 	return ipr_reset_cmd_failed(ipr_cmd);
ipr_cmd          7924 drivers/scsi/ipr.c static void ipr_build_ioa_service_action(struct ipr_cmnd *ipr_cmd,
ipr_cmd          7927 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7942 drivers/scsi/ipr.c static int ipr_ioafp_set_caching_parameters(struct ipr_cmnd *ipr_cmd)
ipr_cmd          7944 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7945 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          7950 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_query_ioa_cfg;
ipr_cmd          7953 drivers/scsi/ipr.c 		ipr_build_ioa_service_action(ipr_cmd,
ipr_cmd          7959 drivers/scsi/ipr.c 		ipr_cmd->job_step_failed = ipr_ioa_service_action_failed;
ipr_cmd          7960 drivers/scsi/ipr.c 		ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout,
ipr_cmd          7980 drivers/scsi/ipr.c static void ipr_ioafp_inquiry(struct ipr_cmnd *ipr_cmd, u8 flags, u8 page,
ipr_cmd          7983 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          7994 drivers/scsi/ipr.c 	ipr_init_ioadl(ipr_cmd, dma_addr, xfer_len, IPR_IOADL_FLAGS_READ_LAST);
ipr_cmd          7996 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout, IPR_INTERNAL_TIMEOUT);
ipr_cmd          8031 drivers/scsi/ipr.c static int ipr_ioafp_pageC4_inquiry(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8033 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8038 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_set_caching_parameters;
ipr_cmd          8042 drivers/scsi/ipr.c 		ipr_ioafp_inquiry(ipr_cmd, 1, 0xC4,
ipr_cmd          8064 drivers/scsi/ipr.c static int ipr_ioafp_cap_inquiry(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8066 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8071 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_pageC4_inquiry;
ipr_cmd          8075 drivers/scsi/ipr.c 		ipr_ioafp_inquiry(ipr_cmd, 1, 0xD0,
ipr_cmd          8095 drivers/scsi/ipr.c static int ipr_ioafp_page3_inquiry(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8097 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8101 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_cap_inquiry;
ipr_cmd          8103 drivers/scsi/ipr.c 	ipr_ioafp_inquiry(ipr_cmd, 1, 3,
ipr_cmd          8121 drivers/scsi/ipr.c static int ipr_ioafp_page0_inquiry(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8123 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8140 drivers/scsi/ipr.c 			list_add_tail(&ipr_cmd->queue,
ipr_cmd          8146 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_page3_inquiry;
ipr_cmd          8148 drivers/scsi/ipr.c 	ipr_ioafp_inquiry(ipr_cmd, 1, 0,
ipr_cmd          8165 drivers/scsi/ipr.c static int ipr_ioafp_std_inquiry(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8167 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8170 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_page0_inquiry;
ipr_cmd          8172 drivers/scsi/ipr.c 	ipr_ioafp_inquiry(ipr_cmd, 0, 0,
ipr_cmd          8190 drivers/scsi/ipr.c static int ipr_ioafp_identify_hrrq(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8192 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8193 drivers/scsi/ipr.c 	struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          8197 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_std_inquiry;
ipr_cmd          8248 drivers/scsi/ipr.c 		ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout,
ipr_cmd          8252 drivers/scsi/ipr.c 			ipr_cmd->job_step = ipr_ioafp_identify_hrrq;
ipr_cmd          8277 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd = from_timer(ipr_cmd, t, timer);
ipr_cmd          8278 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8283 drivers/scsi/ipr.c 	if (ioa_cfg->reset_cmd == ipr_cmd) {
ipr_cmd          8284 drivers/scsi/ipr.c 		list_del(&ipr_cmd->queue);
ipr_cmd          8285 drivers/scsi/ipr.c 		ipr_cmd->done(ipr_cmd);
ipr_cmd          8305 drivers/scsi/ipr.c static void ipr_reset_start_timer(struct ipr_cmnd *ipr_cmd,
ipr_cmd          8310 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
ipr_cmd          8311 drivers/scsi/ipr.c 	ipr_cmd->done = ipr_reset_ioa_job;
ipr_cmd          8313 drivers/scsi/ipr.c 	ipr_cmd->timer.expires = jiffies + timeout;
ipr_cmd          8314 drivers/scsi/ipr.c 	ipr_cmd->timer.function = ipr_reset_timer_done;
ipr_cmd          8315 drivers/scsi/ipr.c 	add_timer(&ipr_cmd->timer);
ipr_cmd          8359 drivers/scsi/ipr.c static int ipr_reset_next_stage(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8364 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8385 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_ioafp_identify_hrrq;
ipr_cmd          8389 drivers/scsi/ipr.c 			ipr_cmd->job_step = ipr_ioafp_identify_hrrq;
ipr_cmd          8398 drivers/scsi/ipr.c 	ipr_cmd->timer.expires = jiffies + stage_time * HZ;
ipr_cmd          8399 drivers/scsi/ipr.c 	ipr_cmd->timer.function = ipr_oper_timeout;
ipr_cmd          8400 drivers/scsi/ipr.c 	ipr_cmd->done = ipr_reset_ioa_job;
ipr_cmd          8401 drivers/scsi/ipr.c 	add_timer(&ipr_cmd->timer);
ipr_cmd          8403 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
ipr_cmd          8418 drivers/scsi/ipr.c static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8420 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8426 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioafp_identify_hrrq;
ipr_cmd          8464 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_next_stage;
ipr_cmd          8468 drivers/scsi/ipr.c 	ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ);
ipr_cmd          8469 drivers/scsi/ipr.c 	ipr_cmd->timer.function = ipr_oper_timeout;
ipr_cmd          8470 drivers/scsi/ipr.c 	ipr_cmd->done = ipr_reset_ioa_job;
ipr_cmd          8471 drivers/scsi/ipr.c 	add_timer(&ipr_cmd->timer);
ipr_cmd          8472 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
ipr_cmd          8488 drivers/scsi/ipr.c static int ipr_reset_wait_for_dump(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8490 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8498 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_alert;
ipr_cmd          8594 drivers/scsi/ipr.c static int ipr_reset_get_unit_check_job(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8596 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8601 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_alert;
ipr_cmd          8602 drivers/scsi/ipr.c 	ipr_reset_start_timer(ipr_cmd, 0);
ipr_cmd          8608 drivers/scsi/ipr.c static int ipr_dump_mailbox_wait(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8610 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8617 drivers/scsi/ipr.c 	if (!ioa_cfg->sis64 || !ipr_cmd->u.time_left ||
ipr_cmd          8621 drivers/scsi/ipr.c 		if (!ipr_cmd->u.time_left)
ipr_cmd          8628 drivers/scsi/ipr.c 			ipr_reset_start_timer(ipr_cmd, IPR_SIS64_DUMP_TIMEOUT);
ipr_cmd          8630 drivers/scsi/ipr.c 			ipr_reset_start_timer(ipr_cmd, IPR_SIS32_DUMP_TIMEOUT);
ipr_cmd          8631 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_wait_for_dump;
ipr_cmd          8635 drivers/scsi/ipr.c 		ipr_cmd->u.time_left -= IPR_CHECK_FOR_RESET_TIMEOUT;
ipr_cmd          8636 drivers/scsi/ipr.c 		ipr_reset_start_timer(ipr_cmd,
ipr_cmd          8655 drivers/scsi/ipr.c static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8657 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8665 drivers/scsi/ipr.c 		ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
ipr_cmd          8679 drivers/scsi/ipr.c 			ipr_cmd->job_step = ipr_reset_get_unit_check_job;
ipr_cmd          8680 drivers/scsi/ipr.c 			ipr_reset_start_timer(ipr_cmd, IPR_DUMP_DELAY_TIMEOUT);
ipr_cmd          8685 drivers/scsi/ipr.c 			ipr_cmd->job_step = ipr_reset_alert;
ipr_cmd          8686 drivers/scsi/ipr.c 			ipr_reset_start_timer(ipr_cmd, 0);
ipr_cmd          8692 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_ioa_bringdown_done;
ipr_cmd          8694 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_dump_mailbox_wait;
ipr_cmd          8695 drivers/scsi/ipr.c 		ipr_cmd->u.time_left = IPR_WAIT_FOR_MAILBOX;
ipr_cmd          8697 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_enable_ioa;
ipr_cmd          8713 drivers/scsi/ipr.c static int ipr_reset_bist_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8715 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8721 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_restore_cfg_space;
ipr_cmd          8735 drivers/scsi/ipr.c static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8737 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8748 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_bist_done;
ipr_cmd          8749 drivers/scsi/ipr.c 		ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT);
ipr_cmd          8753 drivers/scsi/ipr.c 			pci_cfg_access_unlock(ipr_cmd->ioa_cfg->pdev);
ipr_cmd          8755 drivers/scsi/ipr.c 		ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
ipr_cmd          8772 drivers/scsi/ipr.c static int ipr_reset_slot_reset_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8775 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_bist_done;
ipr_cmd          8776 drivers/scsi/ipr.c 	ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT);
ipr_cmd          8790 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd = container_of(work, struct ipr_cmnd, work);
ipr_cmd          8791 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8801 drivers/scsi/ipr.c 	if (ioa_cfg->reset_cmd == ipr_cmd)
ipr_cmd          8802 drivers/scsi/ipr.c 		ipr_reset_ioa_job(ipr_cmd);
ipr_cmd          8816 drivers/scsi/ipr.c static int ipr_reset_slot_reset(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8818 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8821 drivers/scsi/ipr.c 	INIT_WORK(&ipr_cmd->work, ipr_reset_reset_work);
ipr_cmd          8822 drivers/scsi/ipr.c 	queue_work(ioa_cfg->reset_work_q, &ipr_cmd->work);
ipr_cmd          8823 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_slot_reset_done;
ipr_cmd          8837 drivers/scsi/ipr.c static int ipr_reset_block_config_access_wait(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8839 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8844 drivers/scsi/ipr.c 		ipr_cmd->job_step = ioa_cfg->reset;
ipr_cmd          8846 drivers/scsi/ipr.c 		if (ipr_cmd->u.time_left) {
ipr_cmd          8848 drivers/scsi/ipr.c 			ipr_cmd->u.time_left -= IPR_CHECK_FOR_RESET_TIMEOUT;
ipr_cmd          8849 drivers/scsi/ipr.c 			ipr_reset_start_timer(ipr_cmd,
ipr_cmd          8852 drivers/scsi/ipr.c 			ipr_cmd->job_step = ioa_cfg->reset;
ipr_cmd          8870 drivers/scsi/ipr.c static int ipr_reset_block_config_access(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8872 drivers/scsi/ipr.c 	ipr_cmd->ioa_cfg->cfg_locked = 0;
ipr_cmd          8873 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_block_config_access_wait;
ipr_cmd          8874 drivers/scsi/ipr.c 	ipr_cmd->u.time_left = IPR_WAIT_FOR_RESET_TIMEOUT;
ipr_cmd          8908 drivers/scsi/ipr.c static int ipr_reset_wait_to_start_bist(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8910 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8913 drivers/scsi/ipr.c 	if (!ipr_reset_allowed(ioa_cfg) && ipr_cmd->u.time_left) {
ipr_cmd          8914 drivers/scsi/ipr.c 		ipr_cmd->u.time_left -= IPR_CHECK_FOR_RESET_TIMEOUT;
ipr_cmd          8915 drivers/scsi/ipr.c 		ipr_reset_start_timer(ipr_cmd, IPR_CHECK_FOR_RESET_TIMEOUT);
ipr_cmd          8917 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_block_config_access;
ipr_cmd          8936 drivers/scsi/ipr.c static int ipr_reset_alert(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8938 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8948 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_wait_to_start_bist;
ipr_cmd          8950 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_block_config_access;
ipr_cmd          8953 drivers/scsi/ipr.c 	ipr_cmd->u.time_left = IPR_WAIT_FOR_RESET_TIMEOUT;
ipr_cmd          8954 drivers/scsi/ipr.c 	ipr_reset_start_timer(ipr_cmd, IPR_CHECK_FOR_RESET_TIMEOUT);
ipr_cmd          8969 drivers/scsi/ipr.c static int ipr_reset_quiesce_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8971 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8974 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_ioa_bringdown_done;
ipr_cmd          8990 drivers/scsi/ipr.c static int ipr_reset_cancel_hcam_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          8992 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          8999 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_quiesce_done;
ipr_cmd          9006 drivers/scsi/ipr.c 			list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          9029 drivers/scsi/ipr.c static int ipr_reset_cancel_hcam(struct ipr_cmnd *ipr_cmd)
ipr_cmd          9031 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          9038 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_cancel_hcam_done;
ipr_cmd          9046 drivers/scsi/ipr.c 				ipr_cmd->ioarcb.res_handle = cpu_to_be32(IPR_IOA_RES_HANDLE);
ipr_cmd          9047 drivers/scsi/ipr.c 				ipr_cmd->ioarcb.cmd_pkt.request_type = IPR_RQTYPE_IOACMD;
ipr_cmd          9048 drivers/scsi/ipr.c 				cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
ipr_cmd          9061 drivers/scsi/ipr.c 				ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout,
ipr_cmd          9065 drivers/scsi/ipr.c 				ipr_cmd->job_step = ipr_reset_cancel_hcam;
ipr_cmd          9070 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_alert;
ipr_cmd          9085 drivers/scsi/ipr.c static int ipr_reset_ucode_download_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          9087 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          9093 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_alert;
ipr_cmd          9107 drivers/scsi/ipr.c static int ipr_reset_ucode_download(struct ipr_cmnd *ipr_cmd)
ipr_cmd          9109 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          9113 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_alert;
ipr_cmd          9118 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.res_handle = cpu_to_be32(IPR_IOA_RES_HANDLE);
ipr_cmd          9119 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.cmd_pkt.request_type = IPR_RQTYPE_SCSICDB;
ipr_cmd          9120 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.cmd_pkt.cdb[0] = WRITE_BUFFER;
ipr_cmd          9121 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.cmd_pkt.cdb[1] = IPR_WR_BUF_DOWNLOAD_AND_SAVE;
ipr_cmd          9122 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.cmd_pkt.cdb[6] = (sglist->buffer_len & 0xff0000) >> 16;
ipr_cmd          9123 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.cmd_pkt.cdb[7] = (sglist->buffer_len & 0x00ff00) >> 8;
ipr_cmd          9124 drivers/scsi/ipr.c 	ipr_cmd->ioarcb.cmd_pkt.cdb[8] = sglist->buffer_len & 0x0000ff;
ipr_cmd          9127 drivers/scsi/ipr.c 		ipr_build_ucode_ioadl64(ipr_cmd, sglist);
ipr_cmd          9129 drivers/scsi/ipr.c 		ipr_build_ucode_ioadl(ipr_cmd, sglist);
ipr_cmd          9130 drivers/scsi/ipr.c 	ipr_cmd->job_step = ipr_reset_ucode_download_done;
ipr_cmd          9132 drivers/scsi/ipr.c 	ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout,
ipr_cmd          9150 drivers/scsi/ipr.c static int ipr_reset_shutdown_ioa(struct ipr_cmnd *ipr_cmd)
ipr_cmd          9152 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          9153 drivers/scsi/ipr.c 	enum ipr_shutdown_type shutdown_type = ipr_cmd->u.shutdown_type;
ipr_cmd          9159 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_cancel_hcam;
ipr_cmd          9162 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.res_handle = cpu_to_be32(IPR_IOA_RES_HANDLE);
ipr_cmd          9163 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.request_type = IPR_RQTYPE_IOACMD;
ipr_cmd          9164 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.cdb[0] = IPR_IOA_SHUTDOWN;
ipr_cmd          9165 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.cdb[1] = shutdown_type;
ipr_cmd          9176 drivers/scsi/ipr.c 		ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout, timeout);
ipr_cmd          9179 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_ucode_download;
ipr_cmd          9181 drivers/scsi/ipr.c 		ipr_cmd->job_step = ipr_reset_alert;
ipr_cmd          9196 drivers/scsi/ipr.c static void ipr_reset_ioa_job(struct ipr_cmnd *ipr_cmd)
ipr_cmd          9199 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          9202 drivers/scsi/ipr.c 		ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
ipr_cmd          9204 drivers/scsi/ipr.c 		if (ioa_cfg->reset_cmd != ipr_cmd) {
ipr_cmd          9209 drivers/scsi/ipr.c 			list_add_tail(&ipr_cmd->queue,
ipr_cmd          9210 drivers/scsi/ipr.c 					&ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          9215 drivers/scsi/ipr.c 			rc = ipr_cmd->job_step_failed(ipr_cmd);
ipr_cmd          9220 drivers/scsi/ipr.c 		ipr_reinit_ipr_cmnd(ipr_cmd);
ipr_cmd          9221 drivers/scsi/ipr.c 		ipr_cmd->job_step_failed = ipr_reset_cmd_failed;
ipr_cmd          9222 drivers/scsi/ipr.c 		rc = ipr_cmd->job_step(ipr_cmd);
ipr_cmd          9244 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          9260 drivers/scsi/ipr.c 	ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
ipr_cmd          9261 drivers/scsi/ipr.c 	ioa_cfg->reset_cmd = ipr_cmd;
ipr_cmd          9262 drivers/scsi/ipr.c 	ipr_cmd->job_step = job_step;
ipr_cmd          9263 drivers/scsi/ipr.c 	ipr_cmd->u.shutdown_type = shutdown_type;
ipr_cmd          9265 drivers/scsi/ipr.c 	ipr_reset_ioa_job(ipr_cmd);
ipr_cmd          9336 drivers/scsi/ipr.c static int ipr_reset_freeze(struct ipr_cmnd *ipr_cmd)
ipr_cmd          9338 drivers/scsi/ipr.c 	struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
ipr_cmd          9348 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
ipr_cmd          9349 drivers/scsi/ipr.c 	ipr_cmd->done = ipr_reset_ioa_job;
ipr_cmd          9630 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          9685 drivers/scsi/ipr.c 		ipr_cmd = dma_pool_zalloc(ioa_cfg->ipr_cmd_pool,
ipr_cmd          9688 drivers/scsi/ipr.c 		if (!ipr_cmd) {
ipr_cmd          9693 drivers/scsi/ipr.c 		ioa_cfg->ipr_cmnd_list[i] = ipr_cmd;
ipr_cmd          9696 drivers/scsi/ipr.c 		ioarcb = &ipr_cmd->ioarcb;
ipr_cmd          9697 drivers/scsi/ipr.c 		ipr_cmd->dma_addr = dma_addr;
ipr_cmd          9717 drivers/scsi/ipr.c 		ipr_cmd->cmd_index = i;
ipr_cmd          9718 drivers/scsi/ipr.c 		ipr_cmd->ioa_cfg = ioa_cfg;
ipr_cmd          9719 drivers/scsi/ipr.c 		ipr_cmd->sense_buffer_dma = dma_addr +
ipr_cmd          9722 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.hrrq_id = hrrq_id;
ipr_cmd          9723 drivers/scsi/ipr.c 		ipr_cmd->hrrq = &ioa_cfg->hrrq[hrrq_id];
ipr_cmd          9724 drivers/scsi/ipr.c 		list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          10790 drivers/scsi/ipr.c static void ipr_halt_done(struct ipr_cmnd *ipr_cmd)
ipr_cmd          10792 drivers/scsi/ipr.c 	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
ipr_cmd          10803 drivers/scsi/ipr.c 	struct ipr_cmnd *ipr_cmd;
ipr_cmd          10820 drivers/scsi/ipr.c 		ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
ipr_cmd          10821 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.res_handle = cpu_to_be32(IPR_IOA_RES_HANDLE);
ipr_cmd          10822 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.request_type = IPR_RQTYPE_IOACMD;
ipr_cmd          10823 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.cdb[0] = IPR_IOA_SHUTDOWN;
ipr_cmd          10824 drivers/scsi/ipr.c 		ipr_cmd->ioarcb.cmd_pkt.cdb[1] = IPR_SHUTDOWN_PREPARE_FOR_NORMAL;
ipr_cmd          10826 drivers/scsi/ipr.c 		ipr_do_req(ipr_cmd, ipr_halt_done, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT);