in operation.c [913:947]
static void gb_connection_recv_request(struct gb_connection *connection,
const struct gb_operation_msg_hdr *header,
void *data, size_t size)
{
struct gb_operation *operation;
u16 operation_id;
u8 type;
int ret;
operation_id = le16_to_cpu(header->operation_id);
type = header->type;
operation = gb_operation_create_incoming(connection, operation_id,
type, data, size);
if (!operation) {
dev_err(&connection->hd->dev,
"%s: can't create incoming operation\n",
connection->name);
return;
}
ret = gb_operation_get_active(operation);
if (ret) {
gb_operation_put(operation);
return;
}
trace_gb_message_recv_request(operation->request);
/*
* The initial reference to the operation will be dropped when the
* request handler returns.
*/
if (gb_operation_result_set(operation, -EINPROGRESS))
queue_work(connection->wq, &operation->work);
}