Lines Matching refs:t

228 	struct fcp_transaction t;  in fcp_avc_transaction()  local
231 t.unit = unit; in fcp_avc_transaction()
232 t.response_buffer = response; in fcp_avc_transaction()
233 t.response_size = response_size; in fcp_avc_transaction()
234 t.response_match_bytes = response_match_bytes; in fcp_avc_transaction()
235 t.state = STATE_PENDING; in fcp_avc_transaction()
236 init_waitqueue_head(&t.wait); in fcp_avc_transaction()
239 t.deferrable = true; in fcp_avc_transaction()
242 list_add_tail(&t.list, &transactions); in fcp_avc_transaction()
248 ret = snd_fw_transaction(t.unit, tcode, in fcp_avc_transaction()
254 wait_event_timeout(t.wait, t.state != STATE_PENDING, in fcp_avc_transaction()
257 if (t.state == STATE_DEFERRED) { in fcp_avc_transaction()
265 t.state = STATE_PENDING; in fcp_avc_transaction()
267 } else if (t.state == STATE_COMPLETE) { in fcp_avc_transaction()
268 ret = t.response_size; in fcp_avc_transaction()
270 } else if (t.state == STATE_BUS_RESET) { in fcp_avc_transaction()
273 dev_err(&t.unit->device, "FCP command timed out\n"); in fcp_avc_transaction()
280 list_del(&t.list); in fcp_avc_transaction()
297 struct fcp_transaction *t; in fcp_bus_reset() local
300 list_for_each_entry(t, &transactions, list) { in fcp_bus_reset()
301 if (t->unit == unit && in fcp_bus_reset()
302 (t->state == STATE_PENDING || in fcp_bus_reset()
303 t->state == STATE_DEFERRED)) { in fcp_bus_reset()
304 t->state = STATE_BUS_RESET; in fcp_bus_reset()
305 wake_up(&t->wait); in fcp_bus_reset()
339 struct fcp_transaction *t; in fcp_response() local
346 list_for_each_entry(t, &transactions, list) { in fcp_response()
347 struct fw_device *device = fw_parent_device(t->unit); in fcp_response()
355 if (t->state == STATE_PENDING && in fcp_response()
356 is_matching_response(t, data, length)) { in fcp_response()
357 if (t->deferrable && *(const u8 *)data == 0x0f) { in fcp_response()
358 t->state = STATE_DEFERRED; in fcp_response()
360 t->state = STATE_COMPLETE; in fcp_response()
361 t->response_size = min_t(unsigned int, length, in fcp_response()
362 t->response_size); in fcp_response()
363 memcpy(t->response_buffer, data, in fcp_response()
364 t->response_size); in fcp_response()
366 wake_up(&t->wait); in fcp_response()