evt_struct        581 drivers/scsi/ibmvscsi/ibmvscsi.c static void init_event_struct(struct srp_event_struct *evt_struct,
evt_struct        586 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->cmnd = NULL;
evt_struct        587 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->cmnd_done = NULL;
evt_struct        588 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->sync_srp = NULL;
evt_struct        589 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->crq.format = format;
evt_struct        590 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->crq.timeout = cpu_to_be16(timeout);
evt_struct        591 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->done = done;
evt_struct        637 drivers/scsi/ibmvscsi/ibmvscsi.c 			   struct srp_event_struct *evt_struct,
evt_struct        648 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->cmnd)
evt_struct        649 drivers/scsi/ibmvscsi/ibmvscsi.c 		scsi_dma_unmap(evt_struct->cmnd);
evt_struct        679 drivers/scsi/ibmvscsi/ibmvscsi.c 		       struct srp_event_struct *evt_struct,
evt_struct        717 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (!evt_struct->ext_list) {
evt_struct        718 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->ext_list = (struct srp_direct_buf *)
evt_struct        721 drivers/scsi/ibmvscsi/ibmvscsi.c 					   &evt_struct->ext_list_token, 0);
evt_struct        722 drivers/scsi/ibmvscsi/ibmvscsi.c 		if (!evt_struct->ext_list) {
evt_struct        732 drivers/scsi/ibmvscsi/ibmvscsi.c 	total_length = map_sg_list(cmd, sg_mapped, evt_struct->ext_list);
evt_struct        735 drivers/scsi/ibmvscsi/ibmvscsi.c 	indirect->table_desc.va = cpu_to_be64(evt_struct->ext_list_token);
evt_struct        738 drivers/scsi/ibmvscsi/ibmvscsi.c 	memcpy(indirect->desc_list, evt_struct->ext_list,
evt_struct        753 drivers/scsi/ibmvscsi/ibmvscsi.c 				struct srp_event_struct *evt_struct,
evt_struct        773 drivers/scsi/ibmvscsi/ibmvscsi.c 	return map_sg_data(cmd, evt_struct, srp_cmd, dev);
evt_struct        829 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_event_struct *evt_struct = from_timer(evt_struct, t, timer);
evt_struct        830 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct ibmvscsi_host_data *hostdata = evt_struct->hostdata;
evt_struct        833 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->iu.srp.cmd.opcode);
evt_struct        851 drivers/scsi/ibmvscsi/ibmvscsi.c static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
evt_struct        855 drivers/scsi/ibmvscsi/ibmvscsi.c 	__be64 *crq_as_u64 = (__be64 *)&evt_struct->crq;
evt_struct        866 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->crq.format == VIOSRP_SRP_FORMAT) {
evt_struct        881 drivers/scsi/ibmvscsi/ibmvscsi.c 		         evt_struct->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
evt_struct        888 drivers/scsi/ibmvscsi/ibmvscsi.c 		         evt_struct->iu.srp.cmd.opcode != SRP_TSK_MGMT) {
evt_struct        909 drivers/scsi/ibmvscsi/ibmvscsi.c 	*evt_struct->xfer_iu = evt_struct->iu;
evt_struct        910 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->xfer_iu->srp.rsp.tag = (u64)evt_struct;
evt_struct        916 drivers/scsi/ibmvscsi/ibmvscsi.c 	list_add_tail(&evt_struct->list, &hostdata->sent);
evt_struct        918 drivers/scsi/ibmvscsi/ibmvscsi.c 	timer_setup(&evt_struct->timer, ibmvscsi_timeout, 0);
evt_struct        920 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->timer.expires = jiffies + (timeout * HZ);
evt_struct        921 drivers/scsi/ibmvscsi/ibmvscsi.c 		add_timer(&evt_struct->timer);
evt_struct        927 drivers/scsi/ibmvscsi/ibmvscsi.c 		list_del(&evt_struct->list);
evt_struct        928 drivers/scsi/ibmvscsi/ibmvscsi.c 		del_timer(&evt_struct->timer);
evt_struct        949 drivers/scsi/ibmvscsi/ibmvscsi.c 	unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev);
evt_struct        951 drivers/scsi/ibmvscsi/ibmvscsi.c 	free_event_struct(&hostdata->pool, evt_struct);
evt_struct        957 drivers/scsi/ibmvscsi/ibmvscsi.c 	unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev);
evt_struct        959 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->cmnd != NULL) {
evt_struct        960 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->cmnd->result = DID_ERROR << 16;
evt_struct        961 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->cmnd_done(evt_struct->cmnd);
evt_struct        962 drivers/scsi/ibmvscsi/ibmvscsi.c 	} else if (evt_struct->done)
evt_struct        963 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->done(evt_struct);
evt_struct        965 drivers/scsi/ibmvscsi/ibmvscsi.c 	free_event_struct(&hostdata->pool, evt_struct);
evt_struct        976 drivers/scsi/ibmvscsi/ibmvscsi.c static void handle_cmd_rsp(struct srp_event_struct *evt_struct)
evt_struct        978 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_rsp *rsp = &evt_struct->xfer_iu->srp.rsp;
evt_struct        979 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct scsi_cmnd *cmnd = evt_struct->cmnd;
evt_struct        983 drivers/scsi/ibmvscsi/ibmvscsi.c 			dev_warn(evt_struct->hostdata->dev,
evt_struct        993 drivers/scsi/ibmvscsi/ibmvscsi.c 		unmap_cmd_data(&evt_struct->iu.srp.cmd, 
evt_struct        994 drivers/scsi/ibmvscsi/ibmvscsi.c 			       evt_struct, 
evt_struct        995 drivers/scsi/ibmvscsi/ibmvscsi.c 			       evt_struct->hostdata->dev);
evt_struct       1004 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->cmnd_done)
evt_struct       1005 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->cmnd_done(cmnd);
evt_struct       1027 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_event_struct *evt_struct;
evt_struct       1034 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct = get_event_struct(&hostdata->pool);
evt_struct       1035 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (!evt_struct)
evt_struct       1039 drivers/scsi/ibmvscsi/ibmvscsi.c 	srp_cmd = &evt_struct->iu.srp.cmd;
evt_struct       1045 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (!map_data_for_srp_cmd(cmnd, evt_struct, srp_cmd, hostdata->dev)) {
evt_struct       1049 drivers/scsi/ibmvscsi/ibmvscsi.c 		free_event_struct(&hostdata->pool, evt_struct);
evt_struct       1053 drivers/scsi/ibmvscsi/ibmvscsi.c 	init_event_struct(evt_struct,
evt_struct       1058 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->cmnd = cmnd;
evt_struct       1059 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct->cmnd_done = done;
evt_struct       1069 drivers/scsi/ibmvscsi/ibmvscsi.c 			cpu_to_be64(be64_to_cpu(evt_struct->crq.IU_data_ptr) +
evt_struct       1074 drivers/scsi/ibmvscsi/ibmvscsi.c 	return ibmvscsi_send_srp_event(evt_struct, hostdata, 0);
evt_struct       1137 drivers/scsi/ibmvscsi/ibmvscsi.c static void login_rsp(struct srp_event_struct *evt_struct)
evt_struct       1139 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct ibmvscsi_host_data *hostdata = evt_struct->hostdata;
evt_struct       1140 drivers/scsi/ibmvscsi/ibmvscsi.c 	switch (evt_struct->xfer_iu->srp.login_rsp.opcode) {
evt_struct       1145 drivers/scsi/ibmvscsi/ibmvscsi.c 			 evt_struct->xfer_iu->srp.login_rej.reason);
evt_struct       1151 drivers/scsi/ibmvscsi/ibmvscsi.c 			evt_struct->xfer_iu->srp.login_rsp.opcode);
evt_struct       1165 drivers/scsi/ibmvscsi/ibmvscsi.c 		   be32_to_cpu(evt_struct->xfer_iu->srp.login_rsp.req_lim_delta));
evt_struct       1183 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_event_struct *evt_struct = get_event_struct(&hostdata->pool);
evt_struct       1185 drivers/scsi/ibmvscsi/ibmvscsi.c 	BUG_ON(!evt_struct);
evt_struct       1186 drivers/scsi/ibmvscsi/ibmvscsi.c 	init_event_struct(evt_struct, login_rsp,
evt_struct       1189 drivers/scsi/ibmvscsi/ibmvscsi.c 	login = &evt_struct->iu.srp.login_req;
evt_struct       1203 drivers/scsi/ibmvscsi/ibmvscsi.c 	rc = ibmvscsi_send_srp_event(evt_struct, hostdata, login_timeout * 2);
evt_struct       1215 drivers/scsi/ibmvscsi/ibmvscsi.c static void capabilities_rsp(struct srp_event_struct *evt_struct)
evt_struct       1217 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct ibmvscsi_host_data *hostdata = evt_struct->hostdata;
evt_struct       1219 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->xfer_iu->mad.capabilities.common.status) {
evt_struct       1221 drivers/scsi/ibmvscsi/ibmvscsi.c 			evt_struct->xfer_iu->mad.capabilities.common.status);
evt_struct       1247 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_event_struct *evt_struct;
evt_struct       1252 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct = get_event_struct(&hostdata->pool);
evt_struct       1253 drivers/scsi/ibmvscsi/ibmvscsi.c 	BUG_ON(!evt_struct);
evt_struct       1255 drivers/scsi/ibmvscsi/ibmvscsi.c 	init_event_struct(evt_struct, capabilities_rsp,
evt_struct       1258 drivers/scsi/ibmvscsi/ibmvscsi.c 	req = &evt_struct->iu.mad.capabilities;
evt_struct       1299 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (ibmvscsi_send_srp_event(evt_struct, hostdata, info_timeout * 2))
evt_struct       1311 drivers/scsi/ibmvscsi/ibmvscsi.c static void fast_fail_rsp(struct srp_event_struct *evt_struct)
evt_struct       1313 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct ibmvscsi_host_data *hostdata = evt_struct->hostdata;
evt_struct       1314 drivers/scsi/ibmvscsi/ibmvscsi.c 	u16 status = be16_to_cpu(evt_struct->xfer_iu->mad.fast_fail.common.status);
evt_struct       1337 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_event_struct *evt_struct;
evt_struct       1344 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct = get_event_struct(&hostdata->pool);
evt_struct       1345 drivers/scsi/ibmvscsi/ibmvscsi.c 	BUG_ON(!evt_struct);
evt_struct       1347 drivers/scsi/ibmvscsi/ibmvscsi.c 	init_event_struct(evt_struct, fast_fail_rsp, VIOSRP_MAD_FORMAT, info_timeout);
evt_struct       1349 drivers/scsi/ibmvscsi/ibmvscsi.c 	fast_fail_mad = &evt_struct->iu.mad.fast_fail;
evt_struct       1355 drivers/scsi/ibmvscsi/ibmvscsi.c 	rc = ibmvscsi_send_srp_event(evt_struct, hostdata, info_timeout * 2);
evt_struct       1367 drivers/scsi/ibmvscsi/ibmvscsi.c static void adapter_info_rsp(struct srp_event_struct *evt_struct)
evt_struct       1369 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct ibmvscsi_host_data *hostdata = evt_struct->hostdata;
evt_struct       1371 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->xfer_iu->mad.adapter_info.common.status) {
evt_struct       1373 drivers/scsi/ibmvscsi/ibmvscsi.c 			evt_struct->xfer_iu->mad.adapter_info.common.status);
evt_struct       1417 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_event_struct *evt_struct;
evt_struct       1420 drivers/scsi/ibmvscsi/ibmvscsi.c 	evt_struct = get_event_struct(&hostdata->pool);
evt_struct       1421 drivers/scsi/ibmvscsi/ibmvscsi.c 	BUG_ON(!evt_struct);
evt_struct       1423 drivers/scsi/ibmvscsi/ibmvscsi.c 	init_event_struct(evt_struct,
evt_struct       1428 drivers/scsi/ibmvscsi/ibmvscsi.c 	req = &evt_struct->iu.mad.adapter_info;
evt_struct       1436 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (ibmvscsi_send_srp_event(evt_struct, hostdata, info_timeout * 2))
evt_struct       1456 drivers/scsi/ibmvscsi/ibmvscsi.c static void sync_completion(struct srp_event_struct *evt_struct)
evt_struct       1459 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->sync_srp)
evt_struct       1460 drivers/scsi/ibmvscsi/ibmvscsi.c 		*evt_struct->sync_srp = *evt_struct->xfer_iu;
evt_struct       1462 drivers/scsi/ibmvscsi/ibmvscsi.c 	complete(&evt_struct->comp);
evt_struct       1753 drivers/scsi/ibmvscsi/ibmvscsi.c 	struct srp_event_struct *evt_struct =
evt_struct       1808 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (!valid_event_struct(&hostdata->pool, evt_struct)) {
evt_struct       1810 drivers/scsi/ibmvscsi/ibmvscsi.c 		       evt_struct);
evt_struct       1814 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (atomic_read(&evt_struct->free)) {
evt_struct       1816 drivers/scsi/ibmvscsi/ibmvscsi.c 			evt_struct);
evt_struct       1821 drivers/scsi/ibmvscsi/ibmvscsi.c 		atomic_add(be32_to_cpu(evt_struct->xfer_iu->srp.rsp.req_lim_delta),
evt_struct       1824 drivers/scsi/ibmvscsi/ibmvscsi.c 	del_timer(&evt_struct->timer);
evt_struct       1826 drivers/scsi/ibmvscsi/ibmvscsi.c 	if ((crq->status != VIOSRP_OK && crq->status != VIOSRP_OK2) && evt_struct->cmnd)
evt_struct       1827 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->cmnd->result = DID_ERROR << 16;
evt_struct       1828 drivers/scsi/ibmvscsi/ibmvscsi.c 	if (evt_struct->done)
evt_struct       1829 drivers/scsi/ibmvscsi/ibmvscsi.c 		evt_struct->done(evt_struct);
evt_struct       1837 drivers/scsi/ibmvscsi/ibmvscsi.c 	spin_lock_irqsave(evt_struct->hostdata->host->host_lock, flags);
evt_struct       1838 drivers/scsi/ibmvscsi/ibmvscsi.c 	list_del(&evt_struct->list);
evt_struct       1839 drivers/scsi/ibmvscsi/ibmvscsi.c 	free_event_struct(&evt_struct->hostdata->pool, evt_struct);
evt_struct       1840 drivers/scsi/ibmvscsi/ibmvscsi.c 	spin_unlock_irqrestore(evt_struct->hostdata->host->host_lock, flags);