connection 282 arch/um/drivers/net_kern.c struct connection *conn = &lp->user; connection 47 arch/um/drivers/port_kern.c struct connection *conn = data; connection 78 arch/um/drivers/port_kern.c struct connection *conn; connection 95 arch/um/drivers/port_kern.c *conn = ((struct connection) connection 226 arch/um/drivers/port_kern.c struct connection *conn; connection 238 arch/um/drivers/port_kern.c conn = list_entry(port->connections.next, struct connection, connection 225 drivers/acpi/acpica/evregion.c context->connection = field_obj->field.resource_buffer; connection 234 drivers/acpi/acpica/evregion.c context->connection = field_obj->field.resource_buffer; connection 763 drivers/block/drbd/drbd_actlog.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 764 drivers/block/drbd/drbd_actlog.c if (connection->agreed_pro_version <= 95 || connection 302 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection, connection 311 drivers/block/drbd/drbd_debugfs.c list_for_each_entry(req, &connection->transfer_log, tl_requests) { connection 326 drivers/block/drbd/drbd_debugfs.c if (&req->tl_requests == &connection->transfer_log) connection 363 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection; connection 366 drivers/block/drbd/drbd_debugfs.c connection = first_connection(resource); connection 369 drivers/block/drbd/drbd_debugfs.c if (!connection || !kref_get_unless_zero(&connection->kref)) connection 386 drivers/block/drbd/drbd_debugfs.c if (connection->data.socket) { connection 388 drivers/block/drbd/drbd_debugfs.c struct tcp_sock *tp = tcp_sk(connection->data.socket->sk); connection 407 drivers/block/drbd/drbd_debugfs.c seq_print_resource_transfer_log_summary(m, resource, connection, jif); connection 413 drivers/block/drbd/drbd_debugfs.c kref_put(&connection->kref, drbd_destroy_connection); connection 539 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection = m->private; connection 546 drivers/block/drbd/drbd_debugfs.c seq_print_timing_details(m, "worker", connection->w_cb_nr, connection->w_timing_details, jif); connection 547 drivers/block/drbd/drbd_debugfs.c seq_print_timing_details(m, "receiver", connection->r_cb_nr, connection->r_timing_details, jif); connection 553 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection = inode->i_private; connection 554 drivers/block/drbd/drbd_debugfs.c return drbd_single_open(file, callback_history_show, connection, connection 555 drivers/block/drbd/drbd_debugfs.c &connection->kref, drbd_destroy_connection); connection 560 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection = inode->i_private; connection 561 drivers/block/drbd/drbd_debugfs.c kref_put(&connection->kref, drbd_destroy_connection); connection 575 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection = m->private; connection 582 drivers/block/drbd/drbd_debugfs.c spin_lock_irq(&connection->resource->req_lock); connection 583 drivers/block/drbd/drbd_debugfs.c r1 = connection->req_next; connection 586 drivers/block/drbd/drbd_debugfs.c r2 = connection->req_ack_pending; connection 591 drivers/block/drbd/drbd_debugfs.c r2 = connection->req_not_net_done; connection 594 drivers/block/drbd/drbd_debugfs.c spin_unlock_irq(&connection->resource->req_lock); connection 600 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection = inode->i_private; connection 601 drivers/block/drbd/drbd_debugfs.c return drbd_single_open(file, connection_oldest_requests_show, connection, connection 602 drivers/block/drbd/drbd_debugfs.c &connection->kref, drbd_destroy_connection); connection 607 drivers/block/drbd/drbd_debugfs.c struct drbd_connection *connection = inode->i_private; connection 608 drivers/block/drbd/drbd_debugfs.c kref_put(&connection->kref, drbd_destroy_connection); connection 620 drivers/block/drbd/drbd_debugfs.c void drbd_debugfs_connection_add(struct drbd_connection *connection) connection 622 drivers/block/drbd/drbd_debugfs.c struct dentry *conns_dir = connection->resource->debugfs_res_connections; connection 629 drivers/block/drbd/drbd_debugfs.c connection->debugfs_conn = dentry; connection 632 drivers/block/drbd/drbd_debugfs.c connection->debugfs_conn, connection, connection 634 drivers/block/drbd/drbd_debugfs.c connection->debugfs_conn_callback_history = dentry; connection 637 drivers/block/drbd/drbd_debugfs.c connection->debugfs_conn, connection, connection 639 drivers/block/drbd/drbd_debugfs.c connection->debugfs_conn_oldest_requests = dentry; connection 642 drivers/block/drbd/drbd_debugfs.c void drbd_debugfs_connection_cleanup(struct drbd_connection *connection) connection 644 drivers/block/drbd/drbd_debugfs.c drbd_debugfs_remove(&connection->debugfs_conn_callback_history); connection 645 drivers/block/drbd/drbd_debugfs.c drbd_debugfs_remove(&connection->debugfs_conn_oldest_requests); connection 646 drivers/block/drbd/drbd_debugfs.c drbd_debugfs_remove(&connection->debugfs_conn); connection 829 drivers/block/drbd/drbd_debugfs.c struct dentry *conn_dir = peer_device->connection->debugfs_conn; connection 15 drivers/block/drbd/drbd_debugfs.h void drbd_debugfs_connection_add(struct drbd_connection *connection); connection 16 drivers/block/drbd/drbd_debugfs.h void drbd_debugfs_connection_cleanup(struct drbd_connection *connection); connection 31 drivers/block/drbd/drbd_debugfs.h static inline void drbd_debugfs_connection_add(struct drbd_connection *connection) { } connection 32 drivers/block/drbd/drbd_debugfs.h static inline void drbd_debugfs_connection_cleanup(struct drbd_connection *connection) { } connection 85 drivers/block/drbd/drbd_int.h #define __drbd_printk_connection(level, connection, fmt, args...) \ connection 86 drivers/block/drbd/drbd_int.h printk(level "drbd %s: " fmt, (connection)->resource->name, ## args) connection 225 drivers/block/drbd/drbd_int.h extern unsigned int drbd_header_size(struct drbd_connection *connection); connection 242 drivers/block/drbd/drbd_int.h struct drbd_connection *connection; connection 365 drivers/block/drbd/drbd_int.h struct drbd_connection *connection; connection 775 drivers/block/drbd/drbd_int.h static inline bool has_net_conf(struct drbd_connection *connection) connection 780 drivers/block/drbd/drbd_int.h has_net_conf = rcu_dereference(connection->net_conf); connection 808 drivers/block/drbd/drbd_int.h struct drbd_connection *connection; connection 1008 drivers/block/drbd/drbd_int.h struct drbd_connection *connection; connection 1022 drivers/block/drbd/drbd_int.h conn_peer_device(struct drbd_connection *connection, int volume_number) connection 1024 drivers/block/drbd/drbd_int.h return idr_find(&connection->peer_devices, volume_number); connection 1036 drivers/block/drbd/drbd_int.h #define for_each_connection(connection, resource) \ connection 1037 drivers/block/drbd/drbd_int.h list_for_each_entry(connection, &resource->connections, connections) connection 1039 drivers/block/drbd/drbd_int.h #define for_each_connection_rcu(connection, resource) \ connection 1040 drivers/block/drbd/drbd_int.h list_for_each_entry_rcu(connection, &resource->connections, connections) connection 1042 drivers/block/drbd/drbd_int.h #define for_each_connection_safe(connection, tmp, resource) \ connection 1043 drivers/block/drbd/drbd_int.h list_for_each_entry_safe(connection, tmp, &resource->connections, connections) connection 1081 drivers/block/drbd/drbd_int.h extern void drbd_free_sock(struct drbd_connection *connection); connection 1082 drivers/block/drbd/drbd_int.h extern int drbd_send(struct drbd_connection *connection, struct socket *sock, connection 1087 drivers/block/drbd/drbd_int.h extern int __drbd_send_protocol(struct drbd_connection *connection, enum drbd_packet cmd); connection 1088 drivers/block/drbd/drbd_int.h extern int drbd_send_protocol(struct drbd_connection *connection); connection 1096 drivers/block/drbd/drbd_int.h extern void drbd_send_b_ack(struct drbd_connection *connection, u32 barrier_nr, connection 1119 drivers/block/drbd/drbd_int.h extern void conn_send_sr_reply(struct drbd_connection *connection, enum drbd_state_rv retcode); connection 1126 drivers/block/drbd/drbd_int.h extern void conn_md_sync(struct drbd_connection *connection); connection 1434 drivers/block/drbd/drbd_int.h extern int conn_lowest_minor(struct drbd_connection *connection); connection 1449 drivers/block/drbd/drbd_int.h extern void conn_free_crypto(struct drbd_connection *connection); connection 1484 drivers/block/drbd/drbd_int.h extern bool conn_try_outdate_peer(struct drbd_connection *connection); connection 1485 drivers/block/drbd/drbd_int.h extern void conn_try_outdate_peer_async(struct drbd_connection *connection); connection 1486 drivers/block/drbd/drbd_int.h extern enum drbd_peer_state conn_khelper(struct drbd_connection *connection, char *cmd); connection 1945 drivers/block/drbd/drbd_int.h struct drbd_connection *connection = connection 1946 drivers/block/drbd/drbd_int.h first_peer_device(device)->connection; connection 1947 drivers/block/drbd/drbd_int.h struct drbd_work_queue *q = &connection->sender_work; connection 1948 drivers/block/drbd/drbd_int.h if (!test_and_set_bit(DEVICE_WORK_PENDING, &connection->flags)) connection 1959 drivers/block/drbd/drbd_int.h static inline void wake_ack_receiver(struct drbd_connection *connection) connection 1961 drivers/block/drbd/drbd_int.h struct task_struct *task = connection->ack_receiver.task; connection 1962 drivers/block/drbd/drbd_int.h if (task && get_t_state(&connection->ack_receiver) == RUNNING) connection 1966 drivers/block/drbd/drbd_int.h static inline void request_ping(struct drbd_connection *connection) connection 1968 drivers/block/drbd/drbd_int.h set_bit(SEND_PING, &connection->flags); connection 1969 drivers/block/drbd/drbd_int.h wake_ack_receiver(connection); connection 1981 drivers/block/drbd/drbd_int.h extern int drbd_send_ping(struct drbd_connection *connection); connection 1982 drivers/block/drbd/drbd_int.h extern int drbd_send_ping_ack(struct drbd_connection *connection); connection 2172 drivers/block/drbd/drbd_int.h nc = rcu_dereference(first_peer_device(device)->connection->net_conf); connection 2215 drivers/block/drbd/drbd_int.h if (first_peer_device(device)->connection->agreed_pro_version < 96) connection 2318 drivers/block/drbd/drbd_int.h connection->sender_work, connection 2331 drivers/block/drbd/drbd_int.h return first_peer_device(device)->connection->agreed_pro_version >= 97 && connection 2332 drivers/block/drbd/drbd_int.h first_peer_device(device)->connection->agreed_pro_version != 100; connection 182 drivers/block/drbd/drbd_main.c void tl_release(struct drbd_connection *connection, unsigned int barrier_nr, connection 190 drivers/block/drbd/drbd_main.c spin_lock_irq(&connection->resource->req_lock); connection 194 drivers/block/drbd/drbd_main.c list_for_each_entry(r, &connection->transfer_log, tl_requests) { connection 219 drivers/block/drbd/drbd_main.c drbd_err(connection, "BAD! BarrierAck #%u received, but no epoch in tl!?\n", connection 224 drivers/block/drbd/drbd_main.c drbd_err(connection, "BAD! BarrierAck #%u received, expected #%u!\n", connection 230 drivers/block/drbd/drbd_main.c drbd_err(connection, "BAD! BarrierAck #%u received with n_writes=%u, expected n_writes=%u!\n", connection 239 drivers/block/drbd/drbd_main.c list_for_each_entry(req, &connection->transfer_log, tl_requests) connection 242 drivers/block/drbd/drbd_main.c list_for_each_entry_safe_from(req, r, &connection->transfer_log, tl_requests) { connection 247 drivers/block/drbd/drbd_main.c spin_unlock_irq(&connection->resource->req_lock); connection 252 drivers/block/drbd/drbd_main.c spin_unlock_irq(&connection->resource->req_lock); connection 253 drivers/block/drbd/drbd_main.c conn_request_state(connection, NS(conn, C_PROTOCOL_ERROR), CS_HARD); connection 266 drivers/block/drbd/drbd_main.c void _tl_restart(struct drbd_connection *connection, enum drbd_req_event what) connection 270 drivers/block/drbd/drbd_main.c list_for_each_entry_safe(req, r, &connection->transfer_log, tl_requests) connection 274 drivers/block/drbd/drbd_main.c void tl_restart(struct drbd_connection *connection, enum drbd_req_event what) connection 276 drivers/block/drbd/drbd_main.c spin_lock_irq(&connection->resource->req_lock); connection 277 drivers/block/drbd/drbd_main.c _tl_restart(connection, what); connection 278 drivers/block/drbd/drbd_main.c spin_unlock_irq(&connection->resource->req_lock); connection 289 drivers/block/drbd/drbd_main.c void tl_clear(struct drbd_connection *connection) connection 291 drivers/block/drbd/drbd_main.c tl_restart(connection, CONNECTION_LOST_WHILE_PENDING); connection 300 drivers/block/drbd/drbd_main.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 303 drivers/block/drbd/drbd_main.c spin_lock_irq(&connection->resource->req_lock); connection 304 drivers/block/drbd/drbd_main.c list_for_each_entry_safe(req, r, &connection->transfer_log, tl_requests) { connection 311 drivers/block/drbd/drbd_main.c spin_unlock_irq(&connection->resource->req_lock); connection 359 drivers/block/drbd/drbd_main.c if (thi->connection) connection 360 drivers/block/drbd/drbd_main.c kref_put(&thi->connection->kref, drbd_destroy_connection); connection 374 drivers/block/drbd/drbd_main.c thi->connection = NULL; connection 401 drivers/block/drbd/drbd_main.c if (thi->connection) connection 402 drivers/block/drbd/drbd_main.c kref_get(&thi->connection->kref); connection 416 drivers/block/drbd/drbd_main.c if (thi->connection) connection 417 drivers/block/drbd/drbd_main.c kref_put(&thi->connection->kref, drbd_destroy_connection); connection 479 drivers/block/drbd/drbd_main.c int conn_lowest_minor(struct drbd_connection *connection) connection 485 drivers/block/drbd/drbd_main.c peer_device = idr_get_next(&connection->peer_devices, &vnr); connection 560 drivers/block/drbd/drbd_main.c unsigned int drbd_header_size(struct drbd_connection *connection) connection 562 drivers/block/drbd/drbd_main.c if (connection->agreed_pro_version >= 100) { connection 600 drivers/block/drbd/drbd_main.c static unsigned int prepare_header(struct drbd_connection *connection, int vnr, connection 603 drivers/block/drbd/drbd_main.c if (connection->agreed_pro_version >= 100) connection 605 drivers/block/drbd/drbd_main.c else if (connection->agreed_pro_version >= 95 && connection 612 drivers/block/drbd/drbd_main.c static void *__conn_prepare_command(struct drbd_connection *connection, connection 617 drivers/block/drbd/drbd_main.c return sock->sbuf + drbd_header_size(connection); connection 620 drivers/block/drbd/drbd_main.c void *conn_prepare_command(struct drbd_connection *connection, struct drbd_socket *sock) connection 625 drivers/block/drbd/drbd_main.c p = __conn_prepare_command(connection, sock); connection 634 drivers/block/drbd/drbd_main.c return conn_prepare_command(peer_device->connection, sock); connection 637 drivers/block/drbd/drbd_main.c static int __send_command(struct drbd_connection *connection, int vnr, connection 654 drivers/block/drbd/drbd_main.c header_size += prepare_header(connection, vnr, sock->sbuf, cmd, connection 656 drivers/block/drbd/drbd_main.c err = drbd_send_all(connection, sock->socket, sock->sbuf, header_size, connection 659 drivers/block/drbd/drbd_main.c err = drbd_send_all(connection, sock->socket, data, size, 0); connection 668 drivers/block/drbd/drbd_main.c static int __conn_send_command(struct drbd_connection *connection, struct drbd_socket *sock, connection 672 drivers/block/drbd/drbd_main.c return __send_command(connection, 0, sock, cmd, header_size, data, size); connection 675 drivers/block/drbd/drbd_main.c int conn_send_command(struct drbd_connection *connection, struct drbd_socket *sock, connection 681 drivers/block/drbd/drbd_main.c err = __conn_send_command(connection, sock, cmd, header_size, data, size); connection 692 drivers/block/drbd/drbd_main.c err = __send_command(peer_device->connection, peer_device->device->vnr, connection 698 drivers/block/drbd/drbd_main.c int drbd_send_ping(struct drbd_connection *connection) connection 702 drivers/block/drbd/drbd_main.c sock = &connection->meta; connection 703 drivers/block/drbd/drbd_main.c if (!conn_prepare_command(connection, sock)) connection 705 drivers/block/drbd/drbd_main.c return conn_send_command(connection, sock, P_PING, 0, NULL, 0); connection 708 drivers/block/drbd/drbd_main.c int drbd_send_ping_ack(struct drbd_connection *connection) connection 712 drivers/block/drbd/drbd_main.c sock = &connection->meta; connection 713 drivers/block/drbd/drbd_main.c if (!conn_prepare_command(connection, sock)) connection 715 drivers/block/drbd/drbd_main.c return conn_send_command(connection, sock, P_PING_ACK, 0, NULL, 0); connection 723 drivers/block/drbd/drbd_main.c const int apv = peer_device->connection->agreed_pro_version; connection 728 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 734 drivers/block/drbd/drbd_main.c nc = rcu_dereference(peer_device->connection->net_conf); connection 772 drivers/block/drbd/drbd_main.c int __drbd_send_protocol(struct drbd_connection *connection, enum drbd_packet cmd) connection 779 drivers/block/drbd/drbd_main.c sock = &connection->data; connection 780 drivers/block/drbd/drbd_main.c p = __conn_prepare_command(connection, sock); connection 785 drivers/block/drbd/drbd_main.c nc = rcu_dereference(connection->net_conf); connection 787 drivers/block/drbd/drbd_main.c if (nc->tentative && connection->agreed_pro_version < 92) { connection 789 drivers/block/drbd/drbd_main.c drbd_err(connection, "--dry-run is not supported by peer"); connection 794 drivers/block/drbd/drbd_main.c if (connection->agreed_pro_version >= 87) connection 809 drivers/block/drbd/drbd_main.c if (connection->agreed_pro_version >= 87) connection 813 drivers/block/drbd/drbd_main.c return __conn_send_command(connection, sock, cmd, size, NULL, 0); connection 816 drivers/block/drbd/drbd_main.c int drbd_send_protocol(struct drbd_connection *connection) connection 820 drivers/block/drbd/drbd_main.c mutex_lock(&connection->data.mutex); connection 821 drivers/block/drbd/drbd_main.c err = __drbd_send_protocol(connection, P_PROTOCOL); connection 822 drivers/block/drbd/drbd_main.c mutex_unlock(&connection->data.mutex); connection 837 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 851 drivers/block/drbd/drbd_main.c uuid_flags |= rcu_dereference(peer_device->connection->net_conf)->discard_my_data ? 1 : 0; connection 907 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 950 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 956 drivers/block/drbd/drbd_main.c if (peer_device->connection->agreed_features & DRBD_FF_WSAME) connection 979 drivers/block/drbd/drbd_main.c if (peer_device->connection->agreed_pro_version <= 94) connection 981 drivers/block/drbd/drbd_main.c else if (peer_device->connection->agreed_pro_version < 100) connection 1003 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1026 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1039 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1048 drivers/block/drbd/drbd_main.c int conn_send_state_req(struct drbd_connection *connection, union drbd_state mask, union drbd_state val) connection 1054 drivers/block/drbd/drbd_main.c cmd = connection->agreed_pro_version < 100 ? P_STATE_CHG_REQ : P_CONN_ST_CHG_REQ; connection 1055 drivers/block/drbd/drbd_main.c sock = &connection->data; connection 1056 drivers/block/drbd/drbd_main.c p = conn_prepare_command(connection, sock); connection 1061 drivers/block/drbd/drbd_main.c return conn_send_command(connection, sock, cmd, sizeof(*p), NULL, 0); connection 1069 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->meta; connection 1077 drivers/block/drbd/drbd_main.c void conn_send_sr_reply(struct drbd_connection *connection, enum drbd_state_rv retcode) connection 1081 drivers/block/drbd/drbd_main.c enum drbd_packet cmd = connection->agreed_pro_version < 100 ? P_STATE_CHG_REPLY : P_CONN_ST_CHG_REPLY; connection 1083 drivers/block/drbd/drbd_main.c sock = &connection->meta; connection 1084 drivers/block/drbd/drbd_main.c p = conn_prepare_command(connection, sock); connection 1087 drivers/block/drbd/drbd_main.c conn_send_command(connection, sock, cmd, sizeof(*p), NULL, 0); connection 1123 drivers/block/drbd/drbd_main.c use_rle = rcu_dereference(first_peer_device(device)->connection->net_conf)->use_rle; connection 1125 drivers/block/drbd/drbd_main.c if (!use_rle || first_peer_device(device)->connection->agreed_pro_version < 90) connection 1214 drivers/block/drbd/drbd_main.c struct drbd_socket *sock = &first_peer_device(device)->connection->data; connection 1215 drivers/block/drbd/drbd_main.c unsigned int header_size = drbd_header_size(first_peer_device(device)->connection); connection 1226 drivers/block/drbd/drbd_main.c err = __send_command(first_peer_device(device)->connection, device->vnr, sock, connection 1247 drivers/block/drbd/drbd_main.c err = __send_command(first_peer_device(device)->connection, device->vnr, sock, P_BITMAP, len, NULL, 0); connection 1307 drivers/block/drbd/drbd_main.c struct drbd_socket *sock = &first_peer_device(device)->connection->data; connection 1317 drivers/block/drbd/drbd_main.c void drbd_send_b_ack(struct drbd_connection *connection, u32 barrier_nr, u32 set_size) connection 1322 drivers/block/drbd/drbd_main.c if (connection->cstate < C_WF_REPORT_PARAMS) connection 1325 drivers/block/drbd/drbd_main.c sock = &connection->meta; connection 1326 drivers/block/drbd/drbd_main.c p = conn_prepare_command(connection, sock); connection 1331 drivers/block/drbd/drbd_main.c conn_send_command(connection, sock, P_BARRIER_ACK, sizeof(*p), NULL, 0); connection 1351 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->meta; connection 1368 drivers/block/drbd/drbd_main.c if (peer_device->connection->peer_integrity_tfm) connection 1369 drivers/block/drbd/drbd_main.c data_size -= crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); connection 1412 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1428 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1446 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1461 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1475 drivers/block/drbd/drbd_main.c static int we_should_drop_the_connection(struct drbd_connection *connection, struct socket *sock) connection 1480 drivers/block/drbd/drbd_main.c drop_it = connection->meta.socket == sock connection 1481 drivers/block/drbd/drbd_main.c || !connection->ack_receiver.task connection 1482 drivers/block/drbd/drbd_main.c || get_t_state(&connection->ack_receiver) != RUNNING connection 1483 drivers/block/drbd/drbd_main.c || connection->cstate < C_WF_REPORT_PARAMS; connection 1488 drivers/block/drbd/drbd_main.c drop_it = !--connection->ko_count; connection 1490 drivers/block/drbd/drbd_main.c drbd_err(connection, "[%s/%d] sock_sendmsg time expired, ko = %u\n", connection 1491 drivers/block/drbd/drbd_main.c current->comm, current->pid, connection->ko_count); connection 1492 drivers/block/drbd/drbd_main.c request_ping(connection); connection 1498 drivers/block/drbd/drbd_main.c static void drbd_update_congested(struct drbd_connection *connection) connection 1500 drivers/block/drbd/drbd_main.c struct sock *sk = connection->data.socket->sk; connection 1502 drivers/block/drbd/drbd_main.c set_bit(NET_CONGESTED, &connection->flags); connection 1533 drivers/block/drbd/drbd_main.c socket = peer_device->connection->data.socket; connection 1535 drivers/block/drbd/drbd_main.c err = drbd_send_all(peer_device->connection, socket, addr, size, msg_flags); connection 1545 drivers/block/drbd/drbd_main.c struct socket *socket = peer_device->connection->data.socket; connection 1559 drivers/block/drbd/drbd_main.c drbd_update_congested(peer_device->connection); connection 1566 drivers/block/drbd/drbd_main.c if (we_should_drop_the_connection(peer_device->connection, socket)) connection 1579 drivers/block/drbd/drbd_main.c clear_bit(NET_CONGESTED, &peer_device->connection->flags); connection 1651 drivers/block/drbd/drbd_main.c static u32 bio_flags_to_wire(struct drbd_connection *connection, connection 1654 drivers/block/drbd/drbd_main.c if (connection->agreed_pro_version >= 95) connection 1661 drivers/block/drbd/drbd_main.c ((connection->agreed_features & DRBD_FF_WZEROES) ? connection 1683 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1685 drivers/block/drbd/drbd_main.c digest_size = peer_device->connection->integrity_tfm ? connection 1686 drivers/block/drbd/drbd_main.c crypto_shash_digestsize(peer_device->connection->integrity_tfm) : 0; connection 1693 drivers/block/drbd/drbd_main.c dp_flags = bio_flags_to_wire(peer_device->connection, req->master_bio); connection 1697 drivers/block/drbd/drbd_main.c if (peer_device->connection->agreed_pro_version >= 100) { connection 1712 drivers/block/drbd/drbd_main.c err = __send_command(peer_device->connection, device->vnr, sock, cmd, sizeof(*t), NULL, 0); connection 1728 drivers/block/drbd/drbd_main.c drbd_csum_bio(peer_device->connection->integrity_tfm, req->master_bio, digest_out); connection 1731 drivers/block/drbd/drbd_main.c __send_command(peer_device->connection, device->vnr, sock, P_WSAME, connection 1736 drivers/block/drbd/drbd_main.c __send_command(peer_device->connection, device->vnr, sock, P_DATA, connection 1760 drivers/block/drbd/drbd_main.c drbd_csum_bio(peer_device->connection->integrity_tfm, req->master_bio, digest); connection 1789 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1792 drivers/block/drbd/drbd_main.c digest_size = peer_device->connection->integrity_tfm ? connection 1793 drivers/block/drbd/drbd_main.c crypto_shash_digestsize(peer_device->connection->integrity_tfm) : 0; connection 1802 drivers/block/drbd/drbd_main.c drbd_csum_ee(peer_device->connection->integrity_tfm, peer_req, p + 1); connection 1803 drivers/block/drbd/drbd_main.c err = __send_command(peer_device->connection, device->vnr, sock, cmd, sizeof(*p) + digest_size, NULL, peer_req->i.size); connection 1816 drivers/block/drbd/drbd_main.c sock = &peer_device->connection->data; connection 1841 drivers/block/drbd/drbd_main.c int drbd_send(struct drbd_connection *connection, struct socket *sock, connection 1855 drivers/block/drbd/drbd_main.c if (sock == connection->data.socket) { connection 1857 drivers/block/drbd/drbd_main.c connection->ko_count = rcu_dereference(connection->net_conf)->ko_count; connection 1859 drivers/block/drbd/drbd_main.c drbd_update_congested(connection); connection 1864 drivers/block/drbd/drbd_main.c if (we_should_drop_the_connection(connection, sock)) connection 1878 drivers/block/drbd/drbd_main.c if (sock == connection->data.socket) connection 1879 drivers/block/drbd/drbd_main.c clear_bit(NET_CONGESTED, &connection->flags); connection 1883 drivers/block/drbd/drbd_main.c drbd_err(connection, "%s_sendmsg returned %d\n", connection 1884 drivers/block/drbd/drbd_main.c sock == connection->meta.socket ? "msock" : "sock", connection 1886 drivers/block/drbd/drbd_main.c conn_request_state(connection, NS(conn, C_BROKEN_PIPE), CS_HARD); connection 1888 drivers/block/drbd/drbd_main.c conn_request_state(connection, NS(conn, C_TIMEOUT), CS_HARD); connection 1899 drivers/block/drbd/drbd_main.c int drbd_send_all(struct drbd_connection *connection, struct socket *sock, void *buffer, connection 1904 drivers/block/drbd/drbd_main.c err = drbd_send(connection, sock, buffer, size, msg_flags); connection 1953 drivers/block/drbd/drbd_main.c &first_peer_device(device)->connection->sender_work, connection 2049 drivers/block/drbd/drbd_main.c if (first_peer_device(device)->connection->receiver.t_state != NONE) connection 2051 drivers/block/drbd/drbd_main.c first_peer_device(device)->connection->receiver.t_state); connection 2069 drivers/block/drbd/drbd_main.c D_ASSERT(device, first_peer_device(device)->connection->net_conf == NULL); connection 2089 drivers/block/drbd/drbd_main.c D_ASSERT(device, list_empty(&first_peer_device(device)->connection->sender_work.q)); connection 2263 drivers/block/drbd/drbd_main.c kref_put(&peer_device->connection->kref, drbd_destroy_connection); connection 2365 drivers/block/drbd/drbd_main.c struct drbd_connection *connection, *tmp; connection 2367 drivers/block/drbd/drbd_main.c for_each_connection_safe(connection, tmp, resource) { connection 2368 drivers/block/drbd/drbd_main.c list_del(&connection->connections); connection 2369 drivers/block/drbd/drbd_main.c drbd_debugfs_connection_cleanup(connection); connection 2370 drivers/block/drbd/drbd_main.c kref_put(&connection->kref, drbd_destroy_connection); connection 2438 drivers/block/drbd/drbd_main.c if (test_bit(CALLBACK_PENDING, &first_peer_device(device)->connection->flags)) { connection 2463 drivers/block/drbd/drbd_main.c test_bit(NET_CONGESTED, &first_peer_device(device)->connection->flags)) { connection 2528 drivers/block/drbd/drbd_main.c struct drbd_connection *connection; connection 2532 drivers/block/drbd/drbd_main.c for_each_connection_rcu(connection, resource) { connection 2533 drivers/block/drbd/drbd_main.c if (connection->my_addr_len == my_addr_len && connection 2534 drivers/block/drbd/drbd_main.c connection->peer_addr_len == peer_addr_len && connection 2535 drivers/block/drbd/drbd_main.c !memcmp(&connection->my_addr, my_addr, my_addr_len) && connection 2536 drivers/block/drbd/drbd_main.c !memcmp(&connection->peer_addr, peer_addr, peer_addr_len)) { connection 2537 drivers/block/drbd/drbd_main.c kref_get(&connection->kref); connection 2542 drivers/block/drbd/drbd_main.c connection = NULL; connection 2545 drivers/block/drbd/drbd_main.c return connection; connection 2565 drivers/block/drbd/drbd_main.c void conn_free_crypto(struct drbd_connection *connection) connection 2567 drivers/block/drbd/drbd_main.c drbd_free_sock(connection); connection 2569 drivers/block/drbd/drbd_main.c crypto_free_shash(connection->csums_tfm); connection 2570 drivers/block/drbd/drbd_main.c crypto_free_shash(connection->verify_tfm); connection 2571 drivers/block/drbd/drbd_main.c crypto_free_shash(connection->cram_hmac_tfm); connection 2572 drivers/block/drbd/drbd_main.c crypto_free_shash(connection->integrity_tfm); connection 2573 drivers/block/drbd/drbd_main.c crypto_free_shash(connection->peer_integrity_tfm); connection 2574 drivers/block/drbd/drbd_main.c kfree(connection->int_dig_in); connection 2575 drivers/block/drbd/drbd_main.c kfree(connection->int_dig_vv); connection 2577 drivers/block/drbd/drbd_main.c connection->csums_tfm = NULL; connection 2578 drivers/block/drbd/drbd_main.c connection->verify_tfm = NULL; connection 2579 drivers/block/drbd/drbd_main.c connection->cram_hmac_tfm = NULL; connection 2580 drivers/block/drbd/drbd_main.c connection->integrity_tfm = NULL; connection 2581 drivers/block/drbd/drbd_main.c connection->peer_integrity_tfm = NULL; connection 2582 drivers/block/drbd/drbd_main.c connection->int_dig_in = NULL; connection 2583 drivers/block/drbd/drbd_main.c connection->int_dig_vv = NULL; connection 2588 drivers/block/drbd/drbd_main.c struct drbd_connection *connection; connection 2624 drivers/block/drbd/drbd_main.c for_each_connection_rcu(connection, resource) { connection 2625 drivers/block/drbd/drbd_main.c connection->receiver.reset_cpu_mask = 1; connection 2626 drivers/block/drbd/drbd_main.c connection->ack_receiver.reset_cpu_mask = 1; connection 2627 drivers/block/drbd/drbd_main.c connection->worker.reset_cpu_mask = 1; connection 2673 drivers/block/drbd/drbd_main.c struct drbd_connection *connection; connection 2675 drivers/block/drbd/drbd_main.c connection = kzalloc(sizeof(struct drbd_connection), GFP_KERNEL); connection 2676 drivers/block/drbd/drbd_main.c if (!connection) connection 2679 drivers/block/drbd/drbd_main.c if (drbd_alloc_socket(&connection->data)) connection 2681 drivers/block/drbd/drbd_main.c if (drbd_alloc_socket(&connection->meta)) connection 2684 drivers/block/drbd/drbd_main.c connection->current_epoch = kzalloc(sizeof(struct drbd_epoch), GFP_KERNEL); connection 2685 drivers/block/drbd/drbd_main.c if (!connection->current_epoch) connection 2688 drivers/block/drbd/drbd_main.c INIT_LIST_HEAD(&connection->transfer_log); connection 2690 drivers/block/drbd/drbd_main.c INIT_LIST_HEAD(&connection->current_epoch->list); connection 2691 drivers/block/drbd/drbd_main.c connection->epochs = 1; connection 2692 drivers/block/drbd/drbd_main.c spin_lock_init(&connection->epoch_lock); connection 2694 drivers/block/drbd/drbd_main.c connection->send.seen_any_write_yet = false; connection 2695 drivers/block/drbd/drbd_main.c connection->send.current_epoch_nr = 0; connection 2696 drivers/block/drbd/drbd_main.c connection->send.current_epoch_writes = 0; connection 2702 drivers/block/drbd/drbd_main.c connection->cstate = C_STANDALONE; connection 2703 drivers/block/drbd/drbd_main.c mutex_init(&connection->cstate_mutex); connection 2704 drivers/block/drbd/drbd_main.c init_waitqueue_head(&connection->ping_wait); connection 2705 drivers/block/drbd/drbd_main.c idr_init(&connection->peer_devices); connection 2707 drivers/block/drbd/drbd_main.c drbd_init_workqueue(&connection->sender_work); connection 2708 drivers/block/drbd/drbd_main.c mutex_init(&connection->data.mutex); connection 2709 drivers/block/drbd/drbd_main.c mutex_init(&connection->meta.mutex); connection 2711 drivers/block/drbd/drbd_main.c drbd_thread_init(resource, &connection->receiver, drbd_receiver, "receiver"); connection 2712 drivers/block/drbd/drbd_main.c connection->receiver.connection = connection; connection 2713 drivers/block/drbd/drbd_main.c drbd_thread_init(resource, &connection->worker, drbd_worker, "worker"); connection 2714 drivers/block/drbd/drbd_main.c connection->worker.connection = connection; connection 2715 drivers/block/drbd/drbd_main.c drbd_thread_init(resource, &connection->ack_receiver, drbd_ack_receiver, "ack_recv"); connection 2716 drivers/block/drbd/drbd_main.c connection->ack_receiver.connection = connection; connection 2718 drivers/block/drbd/drbd_main.c kref_init(&connection->kref); connection 2720 drivers/block/drbd/drbd_main.c connection->resource = resource; connection 2726 drivers/block/drbd/drbd_main.c list_add_tail_rcu(&connection->connections, &resource->connections); connection 2727 drivers/block/drbd/drbd_main.c drbd_debugfs_connection_add(connection); connection 2728 drivers/block/drbd/drbd_main.c return connection; connection 2734 drivers/block/drbd/drbd_main.c kfree(connection->current_epoch); connection 2735 drivers/block/drbd/drbd_main.c drbd_free_socket(&connection->meta); connection 2736 drivers/block/drbd/drbd_main.c drbd_free_socket(&connection->data); connection 2737 drivers/block/drbd/drbd_main.c kfree(connection); connection 2743 drivers/block/drbd/drbd_main.c struct drbd_connection *connection = container_of(kref, struct drbd_connection, kref); connection 2744 drivers/block/drbd/drbd_main.c struct drbd_resource *resource = connection->resource; connection 2746 drivers/block/drbd/drbd_main.c if (atomic_read(&connection->current_epoch->epoch_size) != 0) connection 2747 drivers/block/drbd/drbd_main.c drbd_err(connection, "epoch_size:%d\n", atomic_read(&connection->current_epoch->epoch_size)); connection 2748 drivers/block/drbd/drbd_main.c kfree(connection->current_epoch); connection 2750 drivers/block/drbd/drbd_main.c idr_destroy(&connection->peer_devices); connection 2752 drivers/block/drbd/drbd_main.c drbd_free_socket(&connection->meta); connection 2753 drivers/block/drbd/drbd_main.c drbd_free_socket(&connection->data); connection 2754 drivers/block/drbd/drbd_main.c kfree(connection->int_dig_in); connection 2755 drivers/block/drbd/drbd_main.c kfree(connection->int_dig_vv); connection 2756 drivers/block/drbd/drbd_main.c memset(connection, 0xfc, sizeof(*connection)); connection 2757 drivers/block/drbd/drbd_main.c kfree(connection); connection 2778 drivers/block/drbd/drbd_main.c struct drbd_connection *connection; connection 2864 drivers/block/drbd/drbd_main.c for_each_connection(connection, resource) { connection 2868 drivers/block/drbd/drbd_main.c peer_device->connection = connection; connection 2874 drivers/block/drbd/drbd_main.c id = idr_alloc(&connection->peer_devices, peer_device, vnr, vnr + 1, GFP_KERNEL); connection 2880 drivers/block/drbd/drbd_main.c kref_get(&connection->kref); connection 2904 drivers/block/drbd/drbd_main.c idr_remove(&connection->peer_devices, vnr); connection 2906 drivers/block/drbd/drbd_main.c for_each_connection(connection, resource) { connection 2907 drivers/block/drbd/drbd_main.c peer_device = idr_remove(&connection->peer_devices, vnr); connection 2909 drivers/block/drbd/drbd_main.c kref_put(&connection->kref, drbd_destroy_connection); connection 2936 drivers/block/drbd/drbd_main.c struct drbd_connection *connection; connection 2943 drivers/block/drbd/drbd_main.c for_each_connection(connection, resource) { connection 2944 drivers/block/drbd/drbd_main.c idr_remove(&connection->peer_devices, device->vnr); connection 3046 drivers/block/drbd/drbd_main.c void drbd_free_sock(struct drbd_connection *connection) connection 3048 drivers/block/drbd/drbd_main.c if (connection->data.socket) connection 3049 drivers/block/drbd/drbd_main.c drbd_free_one_sock(&connection->data); connection 3050 drivers/block/drbd/drbd_main.c if (connection->meta.socket) connection 3051 drivers/block/drbd/drbd_main.c drbd_free_one_sock(&connection->meta); connection 3056 drivers/block/drbd/drbd_main.c void conn_md_sync(struct drbd_connection *connection) connection 3062 drivers/block/drbd/drbd_main.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 3620 drivers/block/drbd/drbd_main.c D_ASSERT(device, current == first_peer_device(device)->connection->worker.task); connection 3640 drivers/block/drbd/drbd_main.c drbd_queue_work(&first_peer_device(device)->connection->sender_work, connection 3662 drivers/block/drbd/drbd_main.c D_ASSERT(device, current != first_peer_device(device)->connection->worker.task); connection 3790 drivers/block/drbd/drbd_main.c nc = rcu_dereference(first_peer_device(device)->connection->net_conf); connection 216 drivers/block/drbd/drbd_nl.c nla_len(adm_ctx->my_addr) > sizeof(adm_ctx->connection->my_addr)) || connection 218 drivers/block/drbd/drbd_nl.c nla_len(adm_ctx->peer_addr) > sizeof(adm_ctx->connection->peer_addr))) { connection 258 drivers/block/drbd/drbd_nl.c adm_ctx->connection = conn_get_by_addrs(nla_data(adm_ctx->my_addr), connection 262 drivers/block/drbd/drbd_nl.c if (!adm_ctx->connection) { connection 291 drivers/block/drbd/drbd_nl.c : adm_ctx->connection ? adm_ctx->connection->resource : NULL; connection 311 drivers/block/drbd/drbd_nl.c if (adm_ctx->connection) { connection 312 drivers/block/drbd/drbd_nl.c kref_put(&adm_ctx->connection->kref, &drbd_destroy_connection); connection 313 drivers/block/drbd/drbd_nl.c adm_ctx->connection = NULL; connection 328 drivers/block/drbd/drbd_nl.c static void setup_khelper_env(struct drbd_connection *connection, char **envp) connection 333 drivers/block/drbd/drbd_nl.c if (connection->my_addr_len == 0 || connection->peer_addr_len == 0) connection 336 drivers/block/drbd/drbd_nl.c switch (((struct sockaddr *)&connection->peer_addr)->sa_family) { connection 340 drivers/block/drbd/drbd_nl.c &((struct sockaddr_in6 *)&connection->peer_addr)->sin6_addr); connection 345 drivers/block/drbd/drbd_nl.c &((struct sockaddr_in *)&connection->peer_addr)->sin_addr); connection 350 drivers/block/drbd/drbd_nl.c &((struct sockaddr_in *)&connection->peer_addr)->sin_addr); connection 365 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 369 drivers/block/drbd/drbd_nl.c if (current == connection->worker.task) connection 370 drivers/block/drbd/drbd_nl.c set_bit(CALLBACK_PENDING, &connection->flags); connection 373 drivers/block/drbd/drbd_nl.c setup_khelper_env(connection, envp); connection 383 drivers/block/drbd/drbd_nl.c notify_helper(NOTIFY_CALL, device, connection, cmd, 0); connection 396 drivers/block/drbd/drbd_nl.c notify_helper(NOTIFY_RESPONSE, device, connection, cmd, ret); connection 398 drivers/block/drbd/drbd_nl.c if (current == connection->worker.task) connection 399 drivers/block/drbd/drbd_nl.c clear_bit(CALLBACK_PENDING, &connection->flags); connection 407 drivers/block/drbd/drbd_nl.c enum drbd_peer_state conn_khelper(struct drbd_connection *connection, char *cmd) connection 415 drivers/block/drbd/drbd_nl.c char *resource_name = connection->resource->name; connection 419 drivers/block/drbd/drbd_nl.c setup_khelper_env(connection, envp); connection 420 drivers/block/drbd/drbd_nl.c conn_md_sync(connection); connection 422 drivers/block/drbd/drbd_nl.c drbd_info(connection, "helper command: %s %s %s\n", drbd_usermode_helper, cmd, resource_name); connection 424 drivers/block/drbd/drbd_nl.c notify_helper(NOTIFY_CALL, NULL, connection, cmd, 0); connection 428 drivers/block/drbd/drbd_nl.c drbd_warn(connection, "helper command: %s %s %s exit code %u (0x%x)\n", connection 432 drivers/block/drbd/drbd_nl.c drbd_info(connection, "helper command: %s %s %s exit code %u (0x%x)\n", connection 436 drivers/block/drbd/drbd_nl.c notify_helper(NOTIFY_RESPONSE, NULL, connection, cmd, ret); connection 444 drivers/block/drbd/drbd_nl.c static enum drbd_fencing_p highest_fencing_policy(struct drbd_connection *connection) connection 451 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 470 drivers/block/drbd/drbd_nl.c bool conn_try_outdate_peer(struct drbd_connection *connection) connection 472 drivers/block/drbd/drbd_nl.c struct drbd_resource * const resource = connection->resource; connection 481 drivers/block/drbd/drbd_nl.c if (connection->cstate >= C_WF_REPORT_PARAMS) { connection 482 drivers/block/drbd/drbd_nl.c drbd_err(connection, "Expected cstate < C_WF_REPORT_PARAMS\n"); connection 487 drivers/block/drbd/drbd_nl.c connect_cnt = connection->connect_cnt; connection 490 drivers/block/drbd/drbd_nl.c fp = highest_fencing_policy(connection); connection 493 drivers/block/drbd/drbd_nl.c drbd_warn(connection, "Not fencing peer, I'm not even Consistent myself.\n"); connection 495 drivers/block/drbd/drbd_nl.c if (connection->cstate < C_WF_REPORT_PARAMS) { connection 496 drivers/block/drbd/drbd_nl.c _conn_request_state(connection, connection 504 drivers/block/drbd/drbd_nl.c _tl_restart(connection, CONNECTION_LOST_WHILE_PENDING); connection 520 drivers/block/drbd/drbd_nl.c r = conn_khelper(connection, "fence-peer"); connection 534 drivers/block/drbd/drbd_nl.c if (conn_highest_disk(connection) == D_UP_TO_DATE) { connection 547 drivers/block/drbd/drbd_nl.c drbd_warn(connection, "Peer is primary, outdating myself.\n"); connection 555 drivers/block/drbd/drbd_nl.c drbd_err(connection, "fence-peer() = 7 && fencing != Stonith !!!\n"); connection 562 drivers/block/drbd/drbd_nl.c drbd_err(connection, "fence-peer helper broken, returned %d\n", (r>>8)&0xff); connection 566 drivers/block/drbd/drbd_nl.c drbd_info(connection, "fence-peer helper returned %d (%s)\n", connection 574 drivers/block/drbd/drbd_nl.c if (connection->cstate < C_WF_REPORT_PARAMS && !test_bit(STATE_SENT, &connection->flags)) { connection 575 drivers/block/drbd/drbd_nl.c if (connection->connect_cnt != connect_cnt) connection 578 drivers/block/drbd/drbd_nl.c drbd_info(connection, "Ignoring fence-peer exit code\n"); connection 580 drivers/block/drbd/drbd_nl.c _conn_request_state(connection, mask, val, CS_VERBOSE); connection 584 drivers/block/drbd/drbd_nl.c return conn_highest_pdsk(connection) <= D_OUTDATED; connection 589 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection = (struct drbd_connection *)data; connection 591 drivers/block/drbd/drbd_nl.c conn_try_outdate_peer(connection); connection 593 drivers/block/drbd/drbd_nl.c kref_put(&connection->kref, drbd_destroy_connection); connection 597 drivers/block/drbd/drbd_nl.c void conn_try_outdate_peer_async(struct drbd_connection *connection) connection 601 drivers/block/drbd/drbd_nl.c kref_get(&connection->kref); connection 608 drivers/block/drbd/drbd_nl.c opa = kthread_run(_try_outdate_peer_async, connection, "drbd_async_h"); connection 610 drivers/block/drbd/drbd_nl.c drbd_err(connection, "out of mem, failed to invoke fence-peer helper\n"); connection 611 drivers/block/drbd/drbd_nl.c kref_put(&connection->kref, drbd_destroy_connection); connection 619 drivers/block/drbd/drbd_nl.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; connection 628 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 633 drivers/block/drbd/drbd_nl.c for_each_connection(connection, device->resource) connection 634 drivers/block/drbd/drbd_nl.c request_ping(connection); connection 667 drivers/block/drbd/drbd_nl.c if (conn_try_outdate_peer(connection)) { connection 677 drivers/block/drbd/drbd_nl.c if (!conn_try_outdate_peer(connection) && force) { connection 692 drivers/block/drbd/drbd_nl.c nc = rcu_dereference(connection->net_conf); connection 726 drivers/block/drbd/drbd_nl.c nc = connection->net_conf; connection 1195 drivers/block/drbd/drbd_nl.c static unsigned int drbd_max_discard_sectors(struct drbd_connection *connection) connection 1199 drivers/block/drbd/drbd_nl.c if (connection->agreed_features & DRBD_FF_WSAME) connection 1214 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 1217 drivers/block/drbd/drbd_nl.c if (can_do && connection->cstate >= C_CONNECTED && !(connection->agreed_features & DRBD_FF_TRIM)) { connection 1219 drivers/block/drbd/drbd_nl.c drbd_info(connection, "peer DRBD too old, does not support TRIM: disabling discards\n"); connection 1229 drivers/block/drbd/drbd_nl.c q->limits.max_discard_sectors = drbd_max_discard_sectors(connection); connection 1231 drivers/block/drbd/drbd_nl.c q->limits.max_write_zeroes_sectors = drbd_max_discard_sectors(connection); connection 1258 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 1261 drivers/block/drbd/drbd_nl.c if (connection->agreed_features & DRBD_FF_WZEROES) connection 1273 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection = peer_device->connection; connection 1281 drivers/block/drbd/drbd_nl.c if (can_do && connection->cstate >= C_CONNECTED && !(connection->agreed_features & DRBD_FF_WSAME)) { connection 1398 drivers/block/drbd/drbd_nl.c if (first_peer_device(device)->connection->agreed_pro_version < 94) connection 1401 drivers/block/drbd/drbd_nl.c else if (first_peer_device(device)->connection->agreed_pro_version == 94) connection 1403 drivers/block/drbd/drbd_nl.c else if (first_peer_device(device)->connection->agreed_pro_version < 100) connection 1427 drivers/block/drbd/drbd_nl.c static void conn_reconfig_start(struct drbd_connection *connection) connection 1429 drivers/block/drbd/drbd_nl.c drbd_thread_start(&connection->worker); connection 1430 drivers/block/drbd/drbd_nl.c drbd_flush_workqueue(&connection->sender_work); connection 1434 drivers/block/drbd/drbd_nl.c static void conn_reconfig_done(struct drbd_connection *connection) connection 1437 drivers/block/drbd/drbd_nl.c spin_lock_irq(&connection->resource->req_lock); connection 1438 drivers/block/drbd/drbd_nl.c stop_threads = conn_all_vols_unconf(connection) && connection 1439 drivers/block/drbd/drbd_nl.c connection->cstate == C_STANDALONE; connection 1440 drivers/block/drbd/drbd_nl.c spin_unlock_irq(&connection->resource->req_lock); connection 1444 drivers/block/drbd/drbd_nl.c drbd_thread_stop(&connection->receiver); connection 1445 drivers/block/drbd/drbd_nl.c drbd_thread_stop(&connection->worker); connection 1795 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 1818 drivers/block/drbd/drbd_nl.c connection = peer_device->connection; connection 1819 drivers/block/drbd/drbd_nl.c conn_reconfig_start(connection); connection 1880 drivers/block/drbd/drbd_nl.c nc = rcu_dereference(connection->net_conf); connection 1971 drivers/block/drbd/drbd_nl.c drbd_flush_workqueue(&connection->sender_work); connection 2186 drivers/block/drbd/drbd_nl.c conn_reconfig_done(connection); connection 2197 drivers/block/drbd/drbd_nl.c conn_reconfig_done(connection); connection 2258 drivers/block/drbd/drbd_nl.c static bool conn_resync_running(struct drbd_connection *connection) connection 2265 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 2280 drivers/block/drbd/drbd_nl.c static bool conn_ov_running(struct drbd_connection *connection) connection 2287 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 2301 drivers/block/drbd/drbd_nl.c _check_net_options(struct drbd_connection *connection, struct net_conf *old_net_conf, struct net_conf *new_net_conf) connection 2306 drivers/block/drbd/drbd_nl.c if (old_net_conf && connection->cstate == C_WF_REPORT_PARAMS && connection->agreed_pro_version < 100) { connection 2318 drivers/block/drbd/drbd_nl.c conn_highest_role(connection) == R_PRIMARY && connection 2319 drivers/block/drbd/drbd_nl.c conn_highest_peer(connection) == R_PRIMARY) connection 2326 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { connection 2345 drivers/block/drbd/drbd_nl.c check_net_options(struct drbd_connection *connection, struct net_conf *new_net_conf) connection 2352 drivers/block/drbd/drbd_nl.c rv = _check_net_options(connection, rcu_dereference(connection->net_conf), new_net_conf); connection 2356 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { connection 2430 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 2443 drivers/block/drbd/drbd_nl.c connection = adm_ctx.connection; connection 2452 drivers/block/drbd/drbd_nl.c conn_reconfig_start(connection); connection 2454 drivers/block/drbd/drbd_nl.c mutex_lock(&connection->data.mutex); connection 2455 drivers/block/drbd/drbd_nl.c mutex_lock(&connection->resource->conf_update); connection 2456 drivers/block/drbd/drbd_nl.c old_net_conf = connection->net_conf; connection 2475 drivers/block/drbd/drbd_nl.c retcode = check_net_options(connection, new_net_conf); connection 2480 drivers/block/drbd/drbd_nl.c rsr = conn_resync_running(connection); connection 2487 drivers/block/drbd/drbd_nl.c ovr = conn_ov_running(connection); connection 2497 drivers/block/drbd/drbd_nl.c rcu_assign_pointer(connection->net_conf, new_net_conf); connection 2500 drivers/block/drbd/drbd_nl.c crypto_free_shash(connection->csums_tfm); connection 2501 drivers/block/drbd/drbd_nl.c connection->csums_tfm = crypto.csums_tfm; connection 2505 drivers/block/drbd/drbd_nl.c crypto_free_shash(connection->verify_tfm); connection 2506 drivers/block/drbd/drbd_nl.c connection->verify_tfm = crypto.verify_tfm; connection 2510 drivers/block/drbd/drbd_nl.c crypto_free_shash(connection->integrity_tfm); connection 2511 drivers/block/drbd/drbd_nl.c connection->integrity_tfm = crypto.integrity_tfm; connection 2512 drivers/block/drbd/drbd_nl.c if (connection->cstate >= C_WF_REPORT_PARAMS && connection->agreed_pro_version >= 100) connection 2514 drivers/block/drbd/drbd_nl.c __drbd_send_protocol(connection, P_PROTOCOL_UPDATE); connection 2516 drivers/block/drbd/drbd_nl.c crypto_free_shash(connection->cram_hmac_tfm); connection 2517 drivers/block/drbd/drbd_nl.c connection->cram_hmac_tfm = crypto.cram_hmac_tfm; connection 2519 drivers/block/drbd/drbd_nl.c mutex_unlock(&connection->resource->conf_update); connection 2520 drivers/block/drbd/drbd_nl.c mutex_unlock(&connection->data.mutex); connection 2524 drivers/block/drbd/drbd_nl.c if (connection->cstate >= C_WF_REPORT_PARAMS) { connection 2528 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) connection 2535 drivers/block/drbd/drbd_nl.c mutex_unlock(&connection->resource->conf_update); connection 2536 drivers/block/drbd/drbd_nl.c mutex_unlock(&connection->data.mutex); connection 2540 drivers/block/drbd/drbd_nl.c conn_reconfig_done(connection); connection 2549 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection) connection 2551 drivers/block/drbd/drbd_nl.c info->conn_connection_state = connection->cstate; connection 2552 drivers/block/drbd/drbd_nl.c info->conn_role = conn_highest_peer(connection); connection 2578 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 2599 drivers/block/drbd/drbd_nl.c for_each_connection(connection, resource) { connection 2600 drivers/block/drbd/drbd_nl.c if (nla_len(adm_ctx.my_addr) == connection->my_addr_len && connection 2601 drivers/block/drbd/drbd_nl.c !memcmp(nla_data(adm_ctx.my_addr), &connection->my_addr, connection 2602 drivers/block/drbd/drbd_nl.c connection->my_addr_len)) { connection 2607 drivers/block/drbd/drbd_nl.c if (nla_len(adm_ctx.peer_addr) == connection->peer_addr_len && connection 2608 drivers/block/drbd/drbd_nl.c !memcmp(nla_data(adm_ctx.peer_addr), &connection->peer_addr, connection 2609 drivers/block/drbd/drbd_nl.c connection->peer_addr_len)) { connection 2617 drivers/block/drbd/drbd_nl.c connection = first_connection(adm_ctx.resource); connection 2618 drivers/block/drbd/drbd_nl.c conn_reconfig_start(connection); connection 2620 drivers/block/drbd/drbd_nl.c if (connection->cstate > C_STANDALONE) { connection 2641 drivers/block/drbd/drbd_nl.c retcode = check_net_options(connection, new_net_conf); connection 2651 drivers/block/drbd/drbd_nl.c drbd_flush_workqueue(&connection->sender_work); connection 2654 drivers/block/drbd/drbd_nl.c old_net_conf = connection->net_conf; connection 2660 drivers/block/drbd/drbd_nl.c rcu_assign_pointer(connection->net_conf, new_net_conf); connection 2662 drivers/block/drbd/drbd_nl.c conn_free_crypto(connection); connection 2663 drivers/block/drbd/drbd_nl.c connection->cram_hmac_tfm = crypto.cram_hmac_tfm; connection 2664 drivers/block/drbd/drbd_nl.c connection->integrity_tfm = crypto.integrity_tfm; connection 2665 drivers/block/drbd/drbd_nl.c connection->csums_tfm = crypto.csums_tfm; connection 2666 drivers/block/drbd/drbd_nl.c connection->verify_tfm = crypto.verify_tfm; connection 2668 drivers/block/drbd/drbd_nl.c connection->my_addr_len = nla_len(adm_ctx.my_addr); connection 2669 drivers/block/drbd/drbd_nl.c memcpy(&connection->my_addr, nla_data(adm_ctx.my_addr), connection->my_addr_len); connection 2670 drivers/block/drbd/drbd_nl.c connection->peer_addr_len = nla_len(adm_ctx.peer_addr); connection 2671 drivers/block/drbd/drbd_nl.c memcpy(&connection->peer_addr, nla_data(adm_ctx.peer_addr), connection->peer_addr_len); connection 2673 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { connection 2677 drivers/block/drbd/drbd_nl.c connection_to_info(&connection_info, connection); connection 2680 drivers/block/drbd/drbd_nl.c notify_connection_state(NULL, 0, connection, &connection_info, NOTIFY_CREATE | flags); connection 2681 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { connection 2692 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { connection 2699 drivers/block/drbd/drbd_nl.c retcode = conn_request_state(connection, NS(conn, C_UNCONNECTED), CS_VERBOSE); connection 2701 drivers/block/drbd/drbd_nl.c conn_reconfig_done(connection); connection 2710 drivers/block/drbd/drbd_nl.c conn_reconfig_done(connection); connection 2717 drivers/block/drbd/drbd_nl.c static enum drbd_state_rv conn_try_disconnect(struct drbd_connection *connection, bool force) connection 2723 drivers/block/drbd/drbd_nl.c rv = conn_request_state(connection, NS(conn, C_DISCONNECTING), connection 2733 drivers/block/drbd/drbd_nl.c rv = conn_request_state(connection, NS2(conn, C_DISCONNECTING, pdsk, D_OUTDATED), 0); connection 2736 drivers/block/drbd/drbd_nl.c rv = conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_VERBOSE); connection 2740 drivers/block/drbd/drbd_nl.c spin_lock_irq(&connection->resource->req_lock); connection 2741 drivers/block/drbd/drbd_nl.c cstate = connection->cstate; connection 2742 drivers/block/drbd/drbd_nl.c spin_unlock_irq(&connection->resource->req_lock); connection 2746 drivers/block/drbd/drbd_nl.c rv = conn_request_state(connection, NS2(conn, C_DISCONNECTING, connection 2749 drivers/block/drbd/drbd_nl.c rv = conn_request_state(connection, NS(conn, C_DISCONNECTING), connection 2763 drivers/block/drbd/drbd_nl.c drbd_thread_stop(&connection->receiver); connection 2771 drivers/block/drbd/drbd_nl.c rv2 = conn_request_state(connection, NS(conn, C_STANDALONE), connection 2774 drivers/block/drbd/drbd_nl.c drbd_err(connection, connection 2787 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 2798 drivers/block/drbd/drbd_nl.c connection = adm_ctx.connection; connection 2810 drivers/block/drbd/drbd_nl.c rv = conn_try_disconnect(connection, parms.force_disconnect); connection 2829 drivers/block/drbd/drbd_nl.c iass = test_bit(RESOLVE_CONFLICTS, &first_peer_device(device)->connection->flags); connection 2886 drivers/block/drbd/drbd_nl.c if (rs.no_resync && first_peer_device(device)->connection->agreed_pro_version < 93) { connection 3037 drivers/block/drbd/drbd_nl.c drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work); connection 3114 drivers/block/drbd/drbd_nl.c drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work); connection 3238 drivers/block/drbd/drbd_nl.c tl_clear(first_peer_device(device)->connection); connection 3240 drivers/block/drbd/drbd_nl.c tl_restart(first_peer_device(device)->connection, FAIL_FROZEN_DISK_IO); connection 3256 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection, connection 3268 drivers/block/drbd/drbd_nl.c if (connection) { connection 3269 drivers/block/drbd/drbd_nl.c if (connection->my_addr_len && connection 3270 drivers/block/drbd/drbd_nl.c nla_put(skb, T_ctx_my_addr, connection->my_addr_len, &connection->my_addr)) connection 3272 drivers/block/drbd/drbd_nl.c if (connection->peer_addr_len && connection 3273 drivers/block/drbd/drbd_nl.c nla_put(skb, T_ctx_peer_addr, connection->peer_addr_len, &connection->peer_addr)) connection 3515 drivers/block/drbd/drbd_nl.c struct drbd_connection *uninitialized_var(connection); connection 3548 drivers/block/drbd/drbd_nl.c for_each_connection_rcu(connection, resource) connection 3549 drivers/block/drbd/drbd_nl.c if (connection == (struct drbd_connection *)cb->args[2]) connection 3554 drivers/block/drbd/drbd_nl.c connection = list_entry(&resource->connections, struct drbd_connection, connections); connection 3557 drivers/block/drbd/drbd_nl.c list_for_each_entry_continue_rcu(connection, &resource->connections, connections) { connection 3558 drivers/block/drbd/drbd_nl.c if (!has_net_conf(connection)) connection 3598 drivers/block/drbd/drbd_nl.c err = nla_put_drbd_cfg_context(skb, resource, connection, NULL); connection 3601 drivers/block/drbd/drbd_nl.c net_conf = rcu_dereference(connection->net_conf); connection 3607 drivers/block/drbd/drbd_nl.c connection_to_info(&connection_info, connection); connection 3611 drivers/block/drbd/drbd_nl.c connection_statistics.conn_congested = test_bit(NET_CONGESTED, &connection->flags); connection 3615 drivers/block/drbd/drbd_nl.c cb->args[2] = (long)connection; connection 3721 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) connection 3742 drivers/block/drbd/drbd_nl.c err = nla_put_drbd_cfg_context(skb, device->resource, peer_device->connection, device); connection 3820 drivers/block/drbd/drbd_nl.c nc = rcu_dereference(first_peer_device(device)->connection->net_conf); connection 4001 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 4005 drivers/block/drbd/drbd_nl.c connection = the_only_connection(resource); connection 4006 drivers/block/drbd/drbd_nl.c if (nla_put_drbd_cfg_context(skb, resource, connection, NULL)) connection 4008 drivers/block/drbd/drbd_nl.c if (connection) { connection 4011 drivers/block/drbd/drbd_nl.c nc = rcu_dereference(connection->net_conf); connection 4216 drivers/block/drbd/drbd_nl.c first_peer_device(device)->connection->agreed_pro_version >= 90 && connection 4285 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 4320 drivers/block/drbd/drbd_nl.c connection = conn_create(adm_ctx.resource_name, &res_opts); connection 4323 drivers/block/drbd/drbd_nl.c if (connection) { connection 4327 drivers/block/drbd/drbd_nl.c resource_to_info(&resource_info, connection->resource); connection 4328 drivers/block/drbd/drbd_nl.c notify_resource_state(NULL, 0, connection->resource, connection 4389 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) connection 4401 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) connection 4425 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection = connection 4434 drivers/block/drbd/drbd_nl.c if (get_t_state(&connection->worker) == RUNNING) connection 4435 drivers/block/drbd/drbd_nl.c drbd_flush_workqueue(&connection->sender_work); connection 4439 drivers/block/drbd/drbd_nl.c if (!has_net_conf(peer_device->connection)) connection 4474 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 4476 drivers/block/drbd/drbd_nl.c for_each_connection(connection, resource) { connection 4477 drivers/block/drbd/drbd_nl.c if (connection->cstate > C_STANDALONE) connection 4495 drivers/block/drbd/drbd_nl.c list_for_each_entry(connection, &resource->connections, connections) connection 4496 drivers/block/drbd/drbd_nl.c drbd_thread_stop(&connection->worker); connection 4506 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection; connection 4520 drivers/block/drbd/drbd_nl.c for_each_connection(connection, resource) { connection 4523 drivers/block/drbd/drbd_nl.c idr_for_each_entry(&connection->peer_devices, peer_device, i) { connection 4531 drivers/block/drbd/drbd_nl.c retcode = conn_try_disconnect(connection, 0); connection 4735 drivers/block/drbd/drbd_nl.c struct drbd_connection *connection, connection 4759 drivers/block/drbd/drbd_nl.c if (nla_put_drbd_cfg_context(skb, connection->resource, connection, NULL) || connection 4764 drivers/block/drbd/drbd_nl.c connection_statistics.conn_congested = test_bit(NET_CONGESTED, &connection->flags); connection 4778 drivers/block/drbd/drbd_nl.c drbd_err(connection, "Error %d while broadcasting event. Event seq:%u\n", connection 4809 drivers/block/drbd/drbd_nl.c if (nla_put_drbd_cfg_context(skb, resource, peer_device->connection, peer_device->device) || connection 4833 drivers/block/drbd/drbd_nl.c struct drbd_device *device, struct drbd_connection *connection, connection 4836 drivers/block/drbd/drbd_nl.c struct drbd_resource *resource = device ? device->resource : connection->resource; connection 4859 drivers/block/drbd/drbd_nl.c if (nla_put_drbd_cfg_context(skb, resource, connection, device) || connection 270 drivers/block/drbd/drbd_proc.c nc = rcu_dereference(first_peer_device(device)->connection->net_conf); connection 299 drivers/block/drbd/drbd_proc.c first_peer_device(device)->connection->epochs, connection 56 drivers/block/drbd/drbd_receiver.c static int drbd_do_features(struct drbd_connection *connection); connection 57 drivers/block/drbd/drbd_receiver.c static int drbd_do_auth(struct drbd_connection *connection); connection 59 drivers/block/drbd/drbd_receiver.c static void conn_wait_active_ee_empty(struct drbd_connection *connection); connection 220 drivers/block/drbd/drbd_receiver.c static void conn_reclaim_net_peer_reqs(struct drbd_connection *connection) connection 226 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 270 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(peer_device->connection->net_conf); connection 511 drivers/block/drbd/drbd_receiver.c static int drbd_recv(struct drbd_connection *connection, void *buf, size_t size) connection 515 drivers/block/drbd/drbd_receiver.c rv = drbd_recv_short(connection->data.socket, buf, size, 0); connection 519 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "sock was reset by peer\n"); connection 521 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "sock_recvmsg returned %d\n", rv); connection 523 drivers/block/drbd/drbd_receiver.c if (test_bit(DISCONNECT_SENT, &connection->flags)) { connection 526 drivers/block/drbd/drbd_receiver.c t = rcu_dereference(connection->net_conf)->ping_timeo * HZ/10; connection 529 drivers/block/drbd/drbd_receiver.c t = wait_event_timeout(connection->ping_wait, connection->cstate < C_WF_REPORT_PARAMS, t); connection 534 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "sock was shut down by peer\n"); connection 538 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_BROKEN_PIPE), CS_HARD); connection 544 drivers/block/drbd/drbd_receiver.c static int drbd_recv_all(struct drbd_connection *connection, void *buf, size_t size) connection 548 drivers/block/drbd/drbd_receiver.c err = drbd_recv(connection, buf, size); connection 557 drivers/block/drbd/drbd_receiver.c static int drbd_recv_all_warn(struct drbd_connection *connection, void *buf, size_t size) connection 561 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(connection, buf, size); connection 563 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "short read (expected size %d)\n", (int)size); connection 586 drivers/block/drbd/drbd_receiver.c static struct socket *drbd_try_connect(struct drbd_connection *connection) connection 598 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 608 drivers/block/drbd/drbd_receiver.c my_addr_len = min_t(int, connection->my_addr_len, sizeof(src_in6)); connection 609 drivers/block/drbd/drbd_receiver.c memcpy(&src_in6, &connection->my_addr, my_addr_len); connection 611 drivers/block/drbd/drbd_receiver.c if (((struct sockaddr *)&connection->my_addr)->sa_family == AF_INET6) connection 616 drivers/block/drbd/drbd_receiver.c peer_addr_len = min_t(int, connection->peer_addr_len, sizeof(src_in6)); connection 617 drivers/block/drbd/drbd_receiver.c memcpy(&peer_in6, &connection->peer_addr, peer_addr_len); connection 665 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "%s failed, err = %d\n", what, err); connection 668 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 675 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection; connection 693 drivers/block/drbd/drbd_receiver.c static int prepare_listen_socket(struct drbd_connection *connection, struct accept_wait_data *ad) connection 702 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 711 drivers/block/drbd/drbd_receiver.c my_addr_len = min_t(int, connection->my_addr_len, sizeof(struct sockaddr_in6)); connection 712 drivers/block/drbd/drbd_receiver.c memcpy(&my_addr, &connection->my_addr, my_addr_len); connection 748 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "%s failed, err = %d\n", what, err); connection 749 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 764 drivers/block/drbd/drbd_receiver.c static struct socket *drbd_wait_for_connect(struct drbd_connection *connection, struct accept_wait_data *ad) connection 771 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 790 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "accept failed, err = %d\n", err); connection 791 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 803 drivers/block/drbd/drbd_receiver.c static int send_first_packet(struct drbd_connection *connection, struct drbd_socket *sock, connection 806 drivers/block/drbd/drbd_receiver.c if (!conn_prepare_command(connection, sock)) connection 808 drivers/block/drbd/drbd_receiver.c return conn_send_command(connection, sock, cmd, 0, NULL, 0); connection 811 drivers/block/drbd/drbd_receiver.c static int receive_first_packet(struct drbd_connection *connection, struct socket *sock) connection 813 drivers/block/drbd/drbd_receiver.c unsigned int header_size = drbd_header_size(connection); connection 819 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 827 drivers/block/drbd/drbd_receiver.c err = drbd_recv_short(sock, connection->data.rbuf, header_size, 0); connection 833 drivers/block/drbd/drbd_receiver.c err = decode_header(connection, connection->data.rbuf, &pi); connection 862 drivers/block/drbd/drbd_receiver.c static bool connection_established(struct drbd_connection *connection, connection 874 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 895 drivers/block/drbd/drbd_receiver.c device->state_mutex = peer_device->connection->agreed_pro_version < 100 ? connection 896 drivers/block/drbd/drbd_receiver.c &peer_device->connection->cstate_mutex : connection 921 drivers/block/drbd/drbd_receiver.c static int conn_connect(struct drbd_connection *connection) connection 930 drivers/block/drbd/drbd_receiver.c .connection = connection, connection 934 drivers/block/drbd/drbd_receiver.c clear_bit(DISCONNECT_SENT, &connection->flags); connection 935 drivers/block/drbd/drbd_receiver.c if (conn_request_state(connection, NS(conn, C_WF_CONNECTION), CS_VERBOSE) < SS_SUCCESS) connection 939 drivers/block/drbd/drbd_receiver.c sock.sbuf = connection->data.sbuf; connection 940 drivers/block/drbd/drbd_receiver.c sock.rbuf = connection->data.rbuf; connection 943 drivers/block/drbd/drbd_receiver.c msock.sbuf = connection->meta.sbuf; connection 944 drivers/block/drbd/drbd_receiver.c msock.rbuf = connection->meta.rbuf; connection 948 drivers/block/drbd/drbd_receiver.c connection->agreed_pro_version = 80; connection 950 drivers/block/drbd/drbd_receiver.c if (prepare_listen_socket(connection, &ad)) connection 956 drivers/block/drbd/drbd_receiver.c s = drbd_try_connect(connection); connection 960 drivers/block/drbd/drbd_receiver.c send_first_packet(connection, &sock, P_INITIAL_DATA); connection 962 drivers/block/drbd/drbd_receiver.c clear_bit(RESOLVE_CONFLICTS, &connection->flags); connection 964 drivers/block/drbd/drbd_receiver.c send_first_packet(connection, &msock, P_INITIAL_META); connection 966 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Logic error in conn_connect()\n"); connection 971 drivers/block/drbd/drbd_receiver.c if (connection_established(connection, &sock.socket, &msock.socket)) connection 975 drivers/block/drbd/drbd_receiver.c s = drbd_wait_for_connect(connection, &ad); connection 977 drivers/block/drbd/drbd_receiver.c int fp = receive_first_packet(connection, s); connection 983 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "initial packet S crossed\n"); connection 991 drivers/block/drbd/drbd_receiver.c set_bit(RESOLVE_CONFLICTS, &connection->flags); connection 993 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "initial packet M crossed\n"); connection 1001 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "Error receiving initial packet\n"); connection 1009 drivers/block/drbd/drbd_receiver.c if (connection->cstate <= C_DISCONNECTING) connection 1014 drivers/block/drbd/drbd_receiver.c if (get_t_state(&connection->receiver) == EXITING) connection 1018 drivers/block/drbd/drbd_receiver.c ok = connection_established(connection, &sock.socket, &msock.socket); connection 1039 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 1056 drivers/block/drbd/drbd_receiver.c connection->data.socket = sock.socket; connection 1057 drivers/block/drbd/drbd_receiver.c connection->meta.socket = msock.socket; connection 1058 drivers/block/drbd/drbd_receiver.c connection->last_received = jiffies; connection 1060 drivers/block/drbd/drbd_receiver.c h = drbd_do_features(connection); connection 1064 drivers/block/drbd/drbd_receiver.c if (connection->cram_hmac_tfm) { connection 1066 drivers/block/drbd/drbd_receiver.c switch (drbd_do_auth(connection)) { connection 1068 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Authentication of peer failed\n"); connection 1071 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Authentication of peer failed, trying again.\n"); connection 1076 drivers/block/drbd/drbd_receiver.c connection->data.socket->sk->sk_sndtimeo = timeout; connection 1077 drivers/block/drbd/drbd_receiver.c connection->data.socket->sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT; connection 1079 drivers/block/drbd/drbd_receiver.c if (drbd_send_protocol(connection) == -EOPNOTSUPP) connection 1089 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) connection 1093 drivers/block/drbd/drbd_receiver.c spin_lock_irq(&connection->resource->req_lock); connection 1094 drivers/block/drbd/drbd_receiver.c set_bit(STATE_SENT, &connection->flags); connection 1095 drivers/block/drbd/drbd_receiver.c spin_unlock_irq(&connection->resource->req_lock); connection 1097 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) connection 1101 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 1117 drivers/block/drbd/drbd_receiver.c rv = conn_request_state(connection, NS(conn, C_WF_REPORT_PARAMS), CS_VERBOSE); connection 1118 drivers/block/drbd/drbd_receiver.c if (rv < SS_SUCCESS || connection->cstate != C_WF_REPORT_PARAMS) { connection 1119 drivers/block/drbd/drbd_receiver.c clear_bit(STATE_SENT, &connection->flags); connection 1123 drivers/block/drbd/drbd_receiver.c drbd_thread_start(&connection->ack_receiver); connection 1126 drivers/block/drbd/drbd_receiver.c connection->ack_sender = connection 1127 drivers/block/drbd/drbd_receiver.c alloc_ordered_workqueue("drbd_as_%s", WQ_MEM_RECLAIM, connection->resource->name); connection 1128 drivers/block/drbd/drbd_receiver.c if (!connection->ack_sender) { connection 1129 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Failed to create workqueue ack_sender\n"); connection 1133 drivers/block/drbd/drbd_receiver.c mutex_lock(&connection->resource->conf_update); connection 1138 drivers/block/drbd/drbd_receiver.c connection->net_conf->discard_my_data = 0; connection 1139 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->resource->conf_update); connection 1153 drivers/block/drbd/drbd_receiver.c static int decode_header(struct drbd_connection *connection, void *header, struct packet_info *pi) connection 1155 drivers/block/drbd/drbd_receiver.c unsigned int header_size = drbd_header_size(connection); connection 1161 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Header padding is not zero\n"); connection 1180 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Wrong magic value 0x%08x in protocol version %d\n", connection 1182 drivers/block/drbd/drbd_receiver.c connection->agreed_pro_version); connection 1189 drivers/block/drbd/drbd_receiver.c static void drbd_unplug_all_devices(struct drbd_connection *connection) connection 1191 drivers/block/drbd/drbd_receiver.c if (current->plug == &connection->receiver_plug) { connection 1192 drivers/block/drbd/drbd_receiver.c blk_finish_plug(&connection->receiver_plug); connection 1193 drivers/block/drbd/drbd_receiver.c blk_start_plug(&connection->receiver_plug); connection 1197 drivers/block/drbd/drbd_receiver.c static int drbd_recv_header(struct drbd_connection *connection, struct packet_info *pi) connection 1199 drivers/block/drbd/drbd_receiver.c void *buffer = connection->data.rbuf; connection 1202 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(connection, buffer, drbd_header_size(connection)); connection 1206 drivers/block/drbd/drbd_receiver.c err = decode_header(connection, buffer, pi); connection 1207 drivers/block/drbd/drbd_receiver.c connection->last_received = jiffies; connection 1212 drivers/block/drbd/drbd_receiver.c static int drbd_recv_header_maybe_unplug(struct drbd_connection *connection, struct packet_info *pi) connection 1214 drivers/block/drbd/drbd_receiver.c void *buffer = connection->data.rbuf; connection 1215 drivers/block/drbd/drbd_receiver.c unsigned int size = drbd_header_size(connection); connection 1218 drivers/block/drbd/drbd_receiver.c err = drbd_recv_short(connection->data.socket, buffer, size, MSG_NOSIGNAL|MSG_DONTWAIT); connection 1225 drivers/block/drbd/drbd_receiver.c drbd_tcp_quickack(connection->data.socket); connection 1226 drivers/block/drbd/drbd_receiver.c drbd_unplug_all_devices(connection); connection 1232 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(connection, buffer, size); connection 1237 drivers/block/drbd/drbd_receiver.c err = decode_header(connection, connection->data.rbuf, pi); connection 1238 drivers/block/drbd/drbd_receiver.c connection->last_received = jiffies; connection 1309 drivers/block/drbd/drbd_receiver.c static void drbd_flush(struct drbd_connection *connection) connection 1311 drivers/block/drbd/drbd_receiver.c if (connection->resource->write_ordering >= WO_BDEV_FLUSH) { connection 1321 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 1345 drivers/block/drbd/drbd_receiver.c drbd_bump_write_ordering(connection->resource, NULL, WO_DRAIN_IO); connection 1356 drivers/block/drbd/drbd_receiver.c static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connection, connection 1364 drivers/block/drbd/drbd_receiver.c spin_lock(&connection->epoch_lock); connection 1386 drivers/block/drbd/drbd_receiver.c spin_unlock(&connection->epoch_lock); connection 1387 drivers/block/drbd/drbd_receiver.c drbd_send_b_ack(epoch->connection, epoch->barrier_nr, epoch_size); connection 1388 drivers/block/drbd/drbd_receiver.c spin_lock(&connection->epoch_lock); connection 1394 drivers/block/drbd/drbd_receiver.c dec_unacked(epoch->connection); connection 1397 drivers/block/drbd/drbd_receiver.c if (connection->current_epoch != epoch) { connection 1401 drivers/block/drbd/drbd_receiver.c connection->epochs--; connection 1421 drivers/block/drbd/drbd_receiver.c spin_unlock(&connection->epoch_lock); connection 1659 drivers/block/drbd/drbd_receiver.c conn_wait_active_ee_empty(peer_req->peer_device->connection); connection 1751 drivers/block/drbd/drbd_receiver.c static void conn_wait_active_ee_empty(struct drbd_connection *connection) connection 1757 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 1769 drivers/block/drbd/drbd_receiver.c static int receive_Barrier(struct drbd_connection *connection, struct packet_info *pi) connection 1778 drivers/block/drbd/drbd_receiver.c connection->current_epoch->barrier_nr = p->barrier; connection 1779 drivers/block/drbd/drbd_receiver.c connection->current_epoch->connection = connection; connection 1780 drivers/block/drbd/drbd_receiver.c rv = drbd_may_finish_epoch(connection, connection->current_epoch, EV_GOT_BARRIER_NR); connection 1787 drivers/block/drbd/drbd_receiver.c switch (connection->resource->write_ordering) { connection 1798 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "Allocation of an epoch failed, slowing down\n"); connection 1803 drivers/block/drbd/drbd_receiver.c conn_wait_active_ee_empty(connection); connection 1804 drivers/block/drbd/drbd_receiver.c drbd_flush(connection); connection 1806 drivers/block/drbd/drbd_receiver.c if (atomic_read(&connection->current_epoch->epoch_size)) { connection 1814 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Strangeness in connection->write_ordering %d\n", connection 1815 drivers/block/drbd/drbd_receiver.c connection->resource->write_ordering); connection 1823 drivers/block/drbd/drbd_receiver.c spin_lock(&connection->epoch_lock); connection 1824 drivers/block/drbd/drbd_receiver.c if (atomic_read(&connection->current_epoch->epoch_size)) { connection 1825 drivers/block/drbd/drbd_receiver.c list_add(&epoch->list, &connection->current_epoch->list); connection 1826 drivers/block/drbd/drbd_receiver.c connection->current_epoch = epoch; connection 1827 drivers/block/drbd/drbd_receiver.c connection->epochs++; connection 1832 drivers/block/drbd/drbd_receiver.c spin_unlock(&connection->epoch_lock); connection 1867 drivers/block/drbd/drbd_receiver.c void *dig_in = peer_device->connection->int_dig_in; connection 1868 drivers/block/drbd/drbd_receiver.c void *dig_vv = peer_device->connection->int_dig_vv; connection 1875 drivers/block/drbd/drbd_receiver.c if (!trim && peer_device->connection->peer_integrity_tfm) { connection 1876 drivers/block/drbd/drbd_receiver.c digest_size = crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); connection 1881 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, dig_in, digest_size); connection 1954 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, data, len); connection 1968 drivers/block/drbd/drbd_receiver.c drbd_csum_ee_size(peer_device->connection->peer_integrity_tfm, peer_req, dig_vv, data_size); connection 1998 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, data, len); connection 2015 drivers/block/drbd/drbd_receiver.c void *dig_in = peer_device->connection->int_dig_in; connection 2016 drivers/block/drbd/drbd_receiver.c void *dig_vv = peer_device->connection->int_dig_vv; connection 2019 drivers/block/drbd/drbd_receiver.c if (peer_device->connection->peer_integrity_tfm) { connection 2020 drivers/block/drbd/drbd_receiver.c digest_size = crypto_shash_digestsize(peer_device->connection->peer_integrity_tfm); connection 2021 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, dig_in, digest_size); connection 2037 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(peer_device->connection, mapped, expect); connection 2045 drivers/block/drbd/drbd_receiver.c drbd_csum_bio(peer_device->connection->peer_integrity_tfm, bio, dig_vv); connection 2142 drivers/block/drbd/drbd_receiver.c static int receive_DataReply(struct drbd_connection *connection, struct packet_info *pi) connection 2151 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 2177 drivers/block/drbd/drbd_receiver.c static int receive_RSDataReply(struct drbd_connection *connection, struct packet_info *pi) connection 2185 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 2272 drivers/block/drbd/drbd_receiver.c drbd_may_finish_epoch(peer_device->connection, peer_req->epoch, EV_PUT + (cancel ? EV_CLEANUP : 0)); connection 2299 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = peer_req->peer_device->connection; connection 2301 drivers/block/drbd/drbd_receiver.c return e_send_ack(w, connection->agreed_pro_version >= 100 ? connection 2325 drivers/block/drbd/drbd_receiver.c if (test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)) { connection 2388 drivers/block/drbd/drbd_receiver.c if (!test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)) connection 2404 drivers/block/drbd/drbd_receiver.c tp = rcu_dereference(peer_device->connection->net_conf)->two_primaries; connection 2414 drivers/block/drbd/drbd_receiver.c timeout = rcu_dereference(peer_device->connection->net_conf)->ping_timeo*HZ/10; connection 2479 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = peer_req->peer_device->connection; connection 2480 drivers/block/drbd/drbd_receiver.c bool resolve_conflicts = test_bit(RESOLVE_CONFLICTS, &connection->flags); connection 2534 drivers/block/drbd/drbd_receiver.c queue_work(connection->ack_sender, &peer_req->peer_device->send_acks_work); connection 2563 drivers/block/drbd/drbd_receiver.c _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_HARD); connection 2585 drivers/block/drbd/drbd_receiver.c static int receive_Data(struct drbd_connection *connection, struct packet_info *pi) connection 2598 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 2608 drivers/block/drbd/drbd_receiver.c atomic_inc(&connection->current_epoch->epoch_size); connection 2641 drivers/block/drbd/drbd_receiver.c if (0 == (connection->agreed_features & DRBD_FF_WZEROES)) connection 2658 drivers/block/drbd/drbd_receiver.c spin_lock(&connection->epoch_lock); connection 2659 drivers/block/drbd/drbd_receiver.c peer_req->epoch = connection->current_epoch; connection 2662 drivers/block/drbd/drbd_receiver.c spin_unlock(&connection->epoch_lock); connection 2665 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(peer_device->connection->net_conf); connection 2667 drivers/block/drbd/drbd_receiver.c if (peer_device->connection->agreed_pro_version < 100) { connection 2749 drivers/block/drbd/drbd_receiver.c drbd_may_finish_epoch(connection, peer_req->epoch, EV_PUT | EV_CLEANUP); connection 2835 drivers/block/drbd/drbd_receiver.c static int receive_DataRequest(struct drbd_connection *connection, struct packet_info *pi) connection 2847 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 2940 drivers/block/drbd/drbd_receiver.c if (drbd_recv_all(peer_device->connection, di->digest, pi->size)) connection 2944 drivers/block/drbd/drbd_receiver.c D_ASSERT(device, peer_device->connection->agreed_pro_version >= 89); connection 2963 drivers/block/drbd/drbd_receiver.c peer_device->connection->agreed_pro_version >= 90) { connection 3016 drivers/block/drbd/drbd_receiver.c update_receiver_timing_details(connection, drbd_rs_should_slow_down); connection 3020 drivers/block/drbd/drbd_receiver.c update_receiver_timing_details(connection, drbd_rs_begin_io); connection 3028 drivers/block/drbd/drbd_receiver.c update_receiver_timing_details(connection, drbd_submit_peer_request); connection 3065 drivers/block/drbd/drbd_receiver.c after_sb_0p = rcu_dereference(peer_device->connection->net_conf)->after_sb_0p; connection 3101 drivers/block/drbd/drbd_receiver.c rv = test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) connection 3118 drivers/block/drbd/drbd_receiver.c rv = test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) connection 3141 drivers/block/drbd/drbd_receiver.c after_sb_1p = rcu_dereference(peer_device->connection->net_conf)->after_sb_1p; connection 3198 drivers/block/drbd/drbd_receiver.c after_sb_2p = rcu_dereference(peer_device->connection->net_conf)->after_sb_2p; connection 3271 drivers/block/drbd/drbd_receiver.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; connection 3297 drivers/block/drbd/drbd_receiver.c if (connection->agreed_pro_version < 91) connection 3320 drivers/block/drbd/drbd_receiver.c if (connection->agreed_pro_version < 91) connection 3360 drivers/block/drbd/drbd_receiver.c if (!(connection->agreed_features & DRBD_FF_WSAME)) { connection 3384 drivers/block/drbd/drbd_receiver.c dc = test_bit(RESOLVE_CONFLICTS, &connection->flags); connection 3397 drivers/block/drbd/drbd_receiver.c if (connection->agreed_pro_version < 96 ? connection 3404 drivers/block/drbd/drbd_receiver.c if (connection->agreed_pro_version < 91) connection 3434 drivers/block/drbd/drbd_receiver.c if (connection->agreed_pro_version < 96 ? connection 3441 drivers/block/drbd/drbd_receiver.c if (connection->agreed_pro_version < 91) connection 3544 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(peer_device->connection->net_conf); connection 3620 drivers/block/drbd/drbd_receiver.c if (tentative || test_bit(CONN_DRY_RUN, &peer_device->connection->flags)) { connection 3666 drivers/block/drbd/drbd_receiver.c static int receive_protocol(struct drbd_connection *connection, struct packet_info *pi) connection 3684 drivers/block/drbd/drbd_receiver.c if (connection->agreed_pro_version >= 87) { connection 3689 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(connection, integrity_alg, pi->size); connection 3696 drivers/block/drbd/drbd_receiver.c clear_bit(CONN_DRY_RUN, &connection->flags); connection 3699 drivers/block/drbd/drbd_receiver.c set_bit(CONN_DRY_RUN, &connection->flags); connection 3702 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 3705 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible %s settings\n", "protocol"); connection 3710 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible %s settings\n", "after-sb-0pri"); connection 3715 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible %s settings\n", "after-sb-1pri"); connection 3720 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible %s settings\n", "after-sb-2pri"); connection 3725 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible %s settings\n", "discard-my-data"); connection 3730 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible %s settings\n", "allow-two-primaries"); connection 3735 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible %s settings\n", "data-integrity-alg"); connection 3757 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "peer data-integrity-alg %s not supported\n", connection 3766 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Allocation of buffers for data integrity checking failed\n"); connection 3773 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Allocation of new net_conf failed\n"); connection 3777 drivers/block/drbd/drbd_receiver.c mutex_lock(&connection->data.mutex); connection 3778 drivers/block/drbd/drbd_receiver.c mutex_lock(&connection->resource->conf_update); connection 3779 drivers/block/drbd/drbd_receiver.c old_net_conf = connection->net_conf; connection 3788 drivers/block/drbd/drbd_receiver.c rcu_assign_pointer(connection->net_conf, new_net_conf); connection 3789 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->resource->conf_update); connection 3790 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->data.mutex); connection 3792 drivers/block/drbd/drbd_receiver.c crypto_free_shash(connection->peer_integrity_tfm); connection 3793 drivers/block/drbd/drbd_receiver.c kfree(connection->int_dig_in); connection 3794 drivers/block/drbd/drbd_receiver.c kfree(connection->int_dig_vv); connection 3795 drivers/block/drbd/drbd_receiver.c connection->peer_integrity_tfm = peer_integrity_tfm; connection 3796 drivers/block/drbd/drbd_receiver.c connection->int_dig_in = int_dig_in; connection 3797 drivers/block/drbd/drbd_receiver.c connection->int_dig_vv = int_dig_vv; connection 3800 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "peer data-integrity-alg: %s\n", connection 3813 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 3840 drivers/block/drbd/drbd_receiver.c static int ignore_remaining_packet(struct drbd_connection *connection, struct packet_info *pi) connection 3842 drivers/block/drbd/drbd_receiver.c void *buffer = connection->data.rbuf; connection 3847 drivers/block/drbd/drbd_receiver.c s = drbd_recv(connection, buffer, s); connection 3871 drivers/block/drbd/drbd_receiver.c static int config_unknown_volume(struct drbd_connection *connection, struct packet_info *pi) connection 3873 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "%s packet received for volume %u, which is not configured locally\n", connection 3875 drivers/block/drbd/drbd_receiver.c return ignore_remaining_packet(connection, pi); connection 3878 drivers/block/drbd/drbd_receiver.c static int receive_SyncParam(struct drbd_connection *connection, struct packet_info *pi) connection 3888 drivers/block/drbd/drbd_receiver.c const int apv = connection->agreed_pro_version; connection 3893 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 3895 drivers/block/drbd/drbd_receiver.c return config_unknown_volume(connection, pi); connection 3927 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p, header_size); connection 3931 drivers/block/drbd/drbd_receiver.c mutex_lock(&connection->resource->conf_update); connection 3932 drivers/block/drbd/drbd_receiver.c old_net_conf = peer_device->connection->net_conf; connection 3937 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->resource->conf_update); connection 3958 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p->verify_alg, data_size); connection 4032 drivers/block/drbd/drbd_receiver.c crypto_free_shash(peer_device->connection->verify_tfm); connection 4033 drivers/block/drbd/drbd_receiver.c peer_device->connection->verify_tfm = verify_tfm; connection 4039 drivers/block/drbd/drbd_receiver.c crypto_free_shash(peer_device->connection->csums_tfm); connection 4040 drivers/block/drbd/drbd_receiver.c peer_device->connection->csums_tfm = csums_tfm; connection 4043 drivers/block/drbd/drbd_receiver.c rcu_assign_pointer(connection->net_conf, new_net_conf); connection 4057 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->resource->conf_update); connection 4071 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->resource->conf_update); connection 4080 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->resource->conf_update); connection 4086 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 4103 drivers/block/drbd/drbd_receiver.c static int receive_sizes(struct drbd_connection *connection, struct packet_info *pi) connection 4108 drivers/block/drbd/drbd_receiver.c struct o_qlim *o = (connection->agreed_features & DRBD_FF_WSAME) ? p->qlim : NULL; connection 4115 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 4117 drivers/block/drbd/drbd_receiver.c return config_unknown_volume(connection, pi); connection 4153 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 4168 drivers/block/drbd/drbd_receiver.c mutex_lock(&connection->resource->conf_update); connection 4174 drivers/block/drbd/drbd_receiver.c mutex_unlock(&connection->resource->conf_update); connection 4228 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 4276 drivers/block/drbd/drbd_receiver.c static int receive_uuids(struct drbd_connection *connection, struct packet_info *pi) connection 4284 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 4286 drivers/block/drbd/drbd_receiver.c return config_unknown_volume(connection, pi); connection 4307 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 4314 drivers/block/drbd/drbd_receiver.c peer_device->connection->agreed_pro_version >= 90 && connection 4383 drivers/block/drbd/drbd_receiver.c static int receive_req_state(struct drbd_connection *connection, struct packet_info *pi) connection 4391 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 4399 drivers/block/drbd/drbd_receiver.c if (test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags) && connection 4416 drivers/block/drbd/drbd_receiver.c static int receive_req_conn_state(struct drbd_connection *connection, struct packet_info *pi) connection 4425 drivers/block/drbd/drbd_receiver.c if (test_bit(RESOLVE_CONFLICTS, &connection->flags) && connection 4426 drivers/block/drbd/drbd_receiver.c mutex_is_locked(&connection->cstate_mutex)) { connection 4427 drivers/block/drbd/drbd_receiver.c conn_send_sr_reply(connection, SS_CONCURRENT_ST_CHG); connection 4434 drivers/block/drbd/drbd_receiver.c rv = conn_request_state(connection, mask, val, CS_VERBOSE | CS_LOCAL_ONLY | CS_IGN_OUTD_FAIL); connection 4435 drivers/block/drbd/drbd_receiver.c conn_send_sr_reply(connection, rv); connection 4440 drivers/block/drbd/drbd_receiver.c static int receive_state(struct drbd_connection *connection, struct packet_info *pi) connection 4450 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 4452 drivers/block/drbd/drbd_receiver.c return config_unknown_volume(connection, pi); connection 4579 drivers/block/drbd/drbd_receiver.c if (test_and_clear_bit(CONN_DRY_RUN, &peer_device->connection->flags)) connection 4582 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 4604 drivers/block/drbd/drbd_receiver.c tl_clear(peer_device->connection); connection 4607 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS2(conn, C_PROTOCOL_ERROR, susp, 0), CS_HARD); connection 4615 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 4637 drivers/block/drbd/drbd_receiver.c static int receive_sync_uuid(struct drbd_connection *connection, struct packet_info *pi) connection 4643 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 4683 drivers/block/drbd/drbd_receiver.c drbd_header_size(peer_device->connection); connection 4695 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p, want); connection 4813 drivers/block/drbd/drbd_receiver.c conn_request_state(peer_device->connection, NS(conn, C_PROTOCOL_ERROR), CS_HARD); connection 4821 drivers/block/drbd/drbd_receiver.c unsigned int header_size = drbd_header_size(first_peer_device(device)->connection); connection 4861 drivers/block/drbd/drbd_receiver.c static int receive_bitmap(struct drbd_connection *connection, struct packet_info *pi) connection 4868 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 4890 drivers/block/drbd/drbd_receiver.c if (pi->size > DRBD_SOCKET_BUFFER_SIZE - drbd_header_size(connection)) { connection 4900 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all(peer_device->connection, p, pi->size); connection 4911 drivers/block/drbd/drbd_receiver.c c.bytes[pi->cmd == P_BITMAP] += drbd_header_size(connection) + pi->size; connection 4918 drivers/block/drbd/drbd_receiver.c err = drbd_recv_header(peer_device->connection, pi); connection 4949 drivers/block/drbd/drbd_receiver.c static int receive_skip(struct drbd_connection *connection, struct packet_info *pi) connection 4951 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "skipping unknown optional packet type %d, l: %d!\n", connection 4954 drivers/block/drbd/drbd_receiver.c return ignore_remaining_packet(connection, pi); connection 4957 drivers/block/drbd/drbd_receiver.c static int receive_UnplugRemote(struct drbd_connection *connection, struct packet_info *pi) connection 4961 drivers/block/drbd/drbd_receiver.c drbd_tcp_quickack(connection->data.socket); connection 4966 drivers/block/drbd/drbd_receiver.c static int receive_out_of_sync(struct drbd_connection *connection, struct packet_info *pi) connection 4972 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 4992 drivers/block/drbd/drbd_receiver.c static int receive_rs_deallocated(struct drbd_connection *connection, struct packet_info *pi) connection 5000 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5096 drivers/block/drbd/drbd_receiver.c static void drbdd(struct drbd_connection *connection) connection 5102 drivers/block/drbd/drbd_receiver.c while (get_t_state(&connection->receiver) == RUNNING) { connection 5105 drivers/block/drbd/drbd_receiver.c drbd_thread_current_set_cpu(&connection->receiver); connection 5106 drivers/block/drbd/drbd_receiver.c update_receiver_timing_details(connection, drbd_recv_header_maybe_unplug); connection 5107 drivers/block/drbd/drbd_receiver.c if (drbd_recv_header_maybe_unplug(connection, &pi)) connection 5112 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Unexpected data packet %s (0x%04x)", connection 5118 drivers/block/drbd/drbd_receiver.c if (pi.cmd == P_SIZES && connection->agreed_features & DRBD_FF_WSAME) connection 5121 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "No payload expected %s l:%d\n", connection 5126 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "%s: unexpected packet size, expected:%d received:%d\n", connection 5132 drivers/block/drbd/drbd_receiver.c update_receiver_timing_details(connection, drbd_recv_all_warn); connection 5133 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(connection, pi.data, shs); connection 5139 drivers/block/drbd/drbd_receiver.c update_receiver_timing_details(connection, cmd->fn); connection 5140 drivers/block/drbd/drbd_receiver.c err = cmd->fn(connection, &pi); connection 5142 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "error receiving %s, e: %d l: %d!\n", connection 5150 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_PROTOCOL_ERROR), CS_HARD); connection 5153 drivers/block/drbd/drbd_receiver.c static void conn_disconnect(struct drbd_connection *connection) connection 5159 drivers/block/drbd/drbd_receiver.c if (connection->cstate == C_STANDALONE) connection 5167 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); connection 5170 drivers/block/drbd/drbd_receiver.c drbd_thread_stop(&connection->ack_receiver); connection 5171 drivers/block/drbd/drbd_receiver.c if (connection->ack_sender) { connection 5172 drivers/block/drbd/drbd_receiver.c destroy_workqueue(connection->ack_sender); connection 5173 drivers/block/drbd/drbd_receiver.c connection->ack_sender = NULL; connection 5175 drivers/block/drbd/drbd_receiver.c drbd_free_sock(connection); connection 5178 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 5188 drivers/block/drbd/drbd_receiver.c if (!list_empty(&connection->current_epoch->list)) connection 5189 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "ASSERTION FAILED: connection->current_epoch->list not empty\n"); connection 5191 drivers/block/drbd/drbd_receiver.c atomic_set(&connection->current_epoch->epoch_size, 0); connection 5192 drivers/block/drbd/drbd_receiver.c connection->send.seen_any_write_yet = false; connection 5194 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "Connection closed\n"); connection 5196 drivers/block/drbd/drbd_receiver.c if (conn_highest_role(connection) == R_PRIMARY && conn_highest_pdsk(connection) >= D_UNKNOWN) connection 5197 drivers/block/drbd/drbd_receiver.c conn_try_outdate_peer_async(connection); connection 5199 drivers/block/drbd/drbd_receiver.c spin_lock_irq(&connection->resource->req_lock); connection 5200 drivers/block/drbd/drbd_receiver.c oc = connection->cstate; connection 5202 drivers/block/drbd/drbd_receiver.c _conn_request_state(connection, NS(conn, C_UNCONNECTED), CS_VERBOSE); connection 5204 drivers/block/drbd/drbd_receiver.c spin_unlock_irq(&connection->resource->req_lock); connection 5207 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_STANDALONE), CS_VERBOSE | CS_HARD); connection 5244 drivers/block/drbd/drbd_receiver.c drbd_flush_workqueue(&peer_device->connection->sender_work); connection 5251 drivers/block/drbd/drbd_receiver.c drbd_flush_workqueue(&peer_device->connection->sender_work); connection 5261 drivers/block/drbd/drbd_receiver.c tl_clear(peer_device->connection); connection 5305 drivers/block/drbd/drbd_receiver.c static int drbd_send_features(struct drbd_connection *connection) connection 5310 drivers/block/drbd/drbd_receiver.c sock = &connection->data; connection 5311 drivers/block/drbd/drbd_receiver.c p = conn_prepare_command(connection, sock); connection 5318 drivers/block/drbd/drbd_receiver.c return conn_send_command(connection, sock, P_CONNECTION_FEATURES, sizeof(*p), NULL, 0); connection 5328 drivers/block/drbd/drbd_receiver.c static int drbd_do_features(struct drbd_connection *connection) connection 5336 drivers/block/drbd/drbd_receiver.c err = drbd_send_features(connection); connection 5340 drivers/block/drbd/drbd_receiver.c err = drbd_recv_header(connection, &pi); connection 5345 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "expected ConnectionFeatures packet, received: %s (0x%04x)\n", connection 5351 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "expected ConnectionFeatures length: %u, received: %u\n", connection 5357 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(connection, p, expect); connection 5370 drivers/block/drbd/drbd_receiver.c connection->agreed_pro_version = min_t(int, PRO_VERSION_MAX, p->protocol_max); connection 5371 drivers/block/drbd/drbd_receiver.c connection->agreed_features = PRO_FEATURES & be32_to_cpu(p->feature_flags); connection 5373 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "Handshake successful: " connection 5374 drivers/block/drbd/drbd_receiver.c "Agreed network protocol version %d\n", connection->agreed_pro_version); connection 5376 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "Feature flags enabled on protocol level: 0x%x%s%s%s%s.\n", connection 5377 drivers/block/drbd/drbd_receiver.c connection->agreed_features, connection 5378 drivers/block/drbd/drbd_receiver.c connection->agreed_features & DRBD_FF_TRIM ? " TRIM" : "", connection 5379 drivers/block/drbd/drbd_receiver.c connection->agreed_features & DRBD_FF_THIN_RESYNC ? " THIN_RESYNC" : "", connection 5380 drivers/block/drbd/drbd_receiver.c connection->agreed_features & DRBD_FF_WSAME ? " WRITE_SAME" : "", connection 5381 drivers/block/drbd/drbd_receiver.c connection->agreed_features & DRBD_FF_WZEROES ? " WRITE_ZEROES" : connection 5382 drivers/block/drbd/drbd_receiver.c connection->agreed_features ? "" : " none"); connection 5387 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "incompatible DRBD dialects: " connection 5395 drivers/block/drbd/drbd_receiver.c static int drbd_do_auth(struct drbd_connection *connection) connection 5397 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "This kernel was build without CONFIG_CRYPTO_HMAC.\n"); connection 5398 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "You need to disable 'cram-hmac-alg' in drbd.conf.\n"); connection 5410 drivers/block/drbd/drbd_receiver.c static int drbd_do_auth(struct drbd_connection *connection) connection 5428 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 5434 drivers/block/drbd/drbd_receiver.c crypto_shash_descsize(connection->cram_hmac_tfm), connection 5440 drivers/block/drbd/drbd_receiver.c desc->tfm = connection->cram_hmac_tfm; connection 5442 drivers/block/drbd/drbd_receiver.c rv = crypto_shash_setkey(connection->cram_hmac_tfm, (u8 *)secret, key_len); connection 5444 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "crypto_shash_setkey() failed with %d\n", rv); connection 5451 drivers/block/drbd/drbd_receiver.c sock = &connection->data; connection 5452 drivers/block/drbd/drbd_receiver.c if (!conn_prepare_command(connection, sock)) { connection 5456 drivers/block/drbd/drbd_receiver.c rv = !conn_send_command(connection, sock, P_AUTH_CHALLENGE, 0, connection 5461 drivers/block/drbd/drbd_receiver.c err = drbd_recv_header(connection, &pi); connection 5468 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "expected AuthChallenge packet, received: %s (0x%04x)\n", connection 5475 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "expected AuthChallenge payload too big.\n"); connection 5481 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "AuthChallenge payload too small.\n"); connection 5488 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "kmalloc of peers_ch failed\n"); connection 5493 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(connection, peers_ch, pi.size); connection 5500 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Peer presented the same challenge!\n"); connection 5505 drivers/block/drbd/drbd_receiver.c resp_size = crypto_shash_digestsize(connection->cram_hmac_tfm); connection 5508 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "kmalloc of response failed\n"); connection 5515 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "crypto_hash_digest() failed with %d\n", rv); connection 5520 drivers/block/drbd/drbd_receiver.c if (!conn_prepare_command(connection, sock)) { connection 5524 drivers/block/drbd/drbd_receiver.c rv = !conn_send_command(connection, sock, P_AUTH_RESPONSE, 0, connection 5529 drivers/block/drbd/drbd_receiver.c err = drbd_recv_header(connection, &pi); connection 5536 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "expected AuthResponse packet, received: %s (0x%04x)\n", connection 5543 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "expected AuthResponse payload of wrong size\n"); connection 5548 drivers/block/drbd/drbd_receiver.c err = drbd_recv_all_warn(connection, response , resp_size); connection 5556 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "kmalloc of right_response failed\n"); connection 5564 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "crypto_hash_digest() failed with %d\n", rv); connection 5572 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "Peer authenticated using %d bytes HMAC\n", connection 5592 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = thi->connection; connection 5595 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "receiver (re)started\n"); connection 5598 drivers/block/drbd/drbd_receiver.c h = conn_connect(connection); connection 5600 drivers/block/drbd/drbd_receiver.c conn_disconnect(connection); connection 5604 drivers/block/drbd/drbd_receiver.c drbd_warn(connection, "Discarding network configuration.\n"); connection 5605 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 5610 drivers/block/drbd/drbd_receiver.c blk_start_plug(&connection->receiver_plug); connection 5611 drivers/block/drbd/drbd_receiver.c drbdd(connection); connection 5612 drivers/block/drbd/drbd_receiver.c blk_finish_plug(&connection->receiver_plug); connection 5615 drivers/block/drbd/drbd_receiver.c conn_disconnect(connection); connection 5617 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "receiver terminated\n"); connection 5623 drivers/block/drbd/drbd_receiver.c static int got_conn_RqSReply(struct drbd_connection *connection, struct packet_info *pi) connection 5629 drivers/block/drbd/drbd_receiver.c set_bit(CONN_WD_ST_CHG_OKAY, &connection->flags); connection 5631 drivers/block/drbd/drbd_receiver.c set_bit(CONN_WD_ST_CHG_FAIL, &connection->flags); connection 5632 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Requested state change failed by peer: %s (%d)\n", connection 5635 drivers/block/drbd/drbd_receiver.c wake_up(&connection->ping_wait); connection 5640 drivers/block/drbd/drbd_receiver.c static int got_RqSReply(struct drbd_connection *connection, struct packet_info *pi) connection 5647 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5652 drivers/block/drbd/drbd_receiver.c if (test_bit(CONN_WD_ST_CHG_REQ, &connection->flags)) { connection 5653 drivers/block/drbd/drbd_receiver.c D_ASSERT(device, connection->agreed_pro_version < 100); connection 5654 drivers/block/drbd/drbd_receiver.c return got_conn_RqSReply(connection, pi); connection 5669 drivers/block/drbd/drbd_receiver.c static int got_Ping(struct drbd_connection *connection, struct packet_info *pi) connection 5671 drivers/block/drbd/drbd_receiver.c return drbd_send_ping_ack(connection); connection 5675 drivers/block/drbd/drbd_receiver.c static int got_PingAck(struct drbd_connection *connection, struct packet_info *pi) connection 5678 drivers/block/drbd/drbd_receiver.c connection->meta.socket->sk->sk_rcvtimeo = connection->net_conf->ping_int*HZ; connection 5679 drivers/block/drbd/drbd_receiver.c if (!test_and_set_bit(GOT_PING_ACK, &connection->flags)) connection 5680 drivers/block/drbd/drbd_receiver.c wake_up(&connection->ping_wait); connection 5685 drivers/block/drbd/drbd_receiver.c static int got_IsInSync(struct drbd_connection *connection, struct packet_info *pi) connection 5693 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5698 drivers/block/drbd/drbd_receiver.c D_ASSERT(device, peer_device->connection->agreed_pro_version >= 89); connection 5737 drivers/block/drbd/drbd_receiver.c static int got_BlockAck(struct drbd_connection *connection, struct packet_info *pi) connection 5746 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5783 drivers/block/drbd/drbd_receiver.c static int got_NegAck(struct drbd_connection *connection, struct packet_info *pi) connection 5792 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5819 drivers/block/drbd/drbd_receiver.c static int got_NegDReply(struct drbd_connection *connection, struct packet_info *pi) connection 5826 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5841 drivers/block/drbd/drbd_receiver.c static int got_NegRSDReply(struct drbd_connection *connection, struct packet_info *pi) connection 5849 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5877 drivers/block/drbd/drbd_receiver.c static int got_BarrierAck(struct drbd_connection *connection, struct packet_info *pi) connection 5883 drivers/block/drbd/drbd_receiver.c tl_release(connection, p->barrier, be32_to_cpu(p->set_size)); connection 5886 drivers/block/drbd/drbd_receiver.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 5901 drivers/block/drbd/drbd_receiver.c static int got_OVResult(struct drbd_connection *connection, struct packet_info *pi) connection 5910 drivers/block/drbd/drbd_receiver.c peer_device = conn_peer_device(connection, pi->vnr); connection 5942 drivers/block/drbd/drbd_receiver.c drbd_queue_work(&peer_device->connection->sender_work, &dw->w); connection 5953 drivers/block/drbd/drbd_receiver.c static int got_skip(struct drbd_connection *connection, struct packet_info *pi) connection 5960 drivers/block/drbd/drbd_receiver.c int (*fn)(struct drbd_connection *connection, struct packet_info *); connection 5963 drivers/block/drbd/drbd_receiver.c static void set_rcvtimeo(struct drbd_connection *connection, bool ping_timeout) connection 5969 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 5977 drivers/block/drbd/drbd_receiver.c connection->meta.socket->sk->sk_rcvtimeo = t; connection 5980 drivers/block/drbd/drbd_receiver.c static void set_ping_timeout(struct drbd_connection *connection) connection 5982 drivers/block/drbd/drbd_receiver.c set_rcvtimeo(connection, 1); connection 5985 drivers/block/drbd/drbd_receiver.c static void set_idle_timeout(struct drbd_connection *connection) connection 5987 drivers/block/drbd/drbd_receiver.c set_rcvtimeo(connection, 0); connection 6012 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = thi->connection; connection 6017 drivers/block/drbd/drbd_receiver.c void *buf = connection->meta.rbuf; connection 6019 drivers/block/drbd/drbd_receiver.c unsigned int header_size = drbd_header_size(connection); connection 6026 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "drbd_ack_receiver: ERROR set priority, ret=%d\n", rv); connection 6031 drivers/block/drbd/drbd_receiver.c conn_reclaim_net_peer_reqs(connection); connection 6033 drivers/block/drbd/drbd_receiver.c if (test_and_clear_bit(SEND_PING, &connection->flags)) { connection 6034 drivers/block/drbd/drbd_receiver.c if (drbd_send_ping(connection)) { connection 6035 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "drbd_send_ping has failed\n"); connection 6038 drivers/block/drbd/drbd_receiver.c set_ping_timeout(connection); connection 6043 drivers/block/drbd/drbd_receiver.c rv = drbd_recv_short(connection->meta.socket, buf, expect-received, 0); connection 6059 drivers/block/drbd/drbd_receiver.c if (test_bit(DISCONNECT_SENT, &connection->flags)) { connection 6062 drivers/block/drbd/drbd_receiver.c t = rcu_dereference(connection->net_conf)->ping_timeo * HZ/10; connection 6065 drivers/block/drbd/drbd_receiver.c t = wait_event_timeout(connection->ping_wait, connection 6066 drivers/block/drbd/drbd_receiver.c connection->cstate < C_WF_REPORT_PARAMS, connection 6071 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "meta connection shut down by peer.\n"); connection 6076 drivers/block/drbd/drbd_receiver.c if (time_after(connection->last_received, pre_recv_jif)) connection 6079 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "PingAck did not arrive in time.\n"); connection 6082 drivers/block/drbd/drbd_receiver.c set_bit(SEND_PING, &connection->flags); connection 6091 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "sock_recvmsg returned %d\n", rv); connection 6096 drivers/block/drbd/drbd_receiver.c if (decode_header(connection, connection->meta.rbuf, &pi)) connection 6100 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Unexpected meta packet %s (0x%04x)\n", connection 6106 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "Wrong packet size on meta (c: %d, l: %d)\n", connection 6114 drivers/block/drbd/drbd_receiver.c err = cmd->fn(connection, &pi); connection 6116 drivers/block/drbd/drbd_receiver.c drbd_err(connection, "%ps failed\n", cmd->fn); connection 6120 drivers/block/drbd/drbd_receiver.c connection->last_received = jiffies; connection 6123 drivers/block/drbd/drbd_receiver.c set_idle_timeout(connection); connection 6127 drivers/block/drbd/drbd_receiver.c buf = connection->meta.rbuf; connection 6136 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); connection 6137 drivers/block/drbd/drbd_receiver.c conn_md_sync(connection); connection 6141 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 6144 drivers/block/drbd/drbd_receiver.c drbd_info(connection, "ack_receiver terminated\n"); connection 6153 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = peer_device->connection; connection 6159 drivers/block/drbd/drbd_receiver.c nc = rcu_dereference(connection->net_conf); connection 6164 drivers/block/drbd/drbd_receiver.c drbd_tcp_cork(connection->meta.socket); connection 6172 drivers/block/drbd/drbd_receiver.c conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); connection 6177 drivers/block/drbd/drbd_receiver.c drbd_tcp_uncork(connection->meta.socket); connection 178 drivers/block/drbd/drbd_req.c static void wake_all_senders(struct drbd_connection *connection) connection 180 drivers/block/drbd/drbd_req.c wake_up(&connection->sender_work.q_wait); connection 184 drivers/block/drbd/drbd_req.c void start_new_tl_epoch(struct drbd_connection *connection) connection 187 drivers/block/drbd/drbd_req.c if (connection->current_tle_writes == 0) connection 190 drivers/block/drbd/drbd_req.c connection->current_tle_writes = 0; connection 191 drivers/block/drbd/drbd_req.c atomic_inc(&connection->current_tle_nr); connection 192 drivers/block/drbd/drbd_req.c wake_all_senders(connection); connection 262 drivers/block/drbd/drbd_req.c req->epoch == atomic_read(&first_peer_device(device)->connection->current_tle_nr)) connection 263 drivers/block/drbd/drbd_req.c start_new_tl_epoch(first_peer_device(device)->connection); connection 340 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 341 drivers/block/drbd/drbd_req.c if (!connection) connection 343 drivers/block/drbd/drbd_req.c if (connection->req_next == NULL) connection 344 drivers/block/drbd/drbd_req.c connection->req_next = req; connection 349 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 350 drivers/block/drbd/drbd_req.c if (!connection) connection 352 drivers/block/drbd/drbd_req.c if (connection->req_next != req) connection 354 drivers/block/drbd/drbd_req.c list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { connection 359 drivers/block/drbd/drbd_req.c if (&req->tl_requests == &connection->transfer_log) connection 361 drivers/block/drbd/drbd_req.c connection->req_next = req; connection 366 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 367 drivers/block/drbd/drbd_req.c if (!connection) connection 369 drivers/block/drbd/drbd_req.c if (connection->req_ack_pending == NULL) connection 370 drivers/block/drbd/drbd_req.c connection->req_ack_pending = req; connection 375 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 376 drivers/block/drbd/drbd_req.c if (!connection) connection 378 drivers/block/drbd/drbd_req.c if (connection->req_ack_pending != req) connection 380 drivers/block/drbd/drbd_req.c list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { connection 385 drivers/block/drbd/drbd_req.c if (&req->tl_requests == &connection->transfer_log) connection 387 drivers/block/drbd/drbd_req.c connection->req_ack_pending = req; connection 392 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 393 drivers/block/drbd/drbd_req.c if (!connection) connection 395 drivers/block/drbd/drbd_req.c if (connection->req_not_net_done == NULL) connection 396 drivers/block/drbd/drbd_req.c connection->req_not_net_done = req; connection 401 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 402 drivers/block/drbd/drbd_req.c if (!connection) connection 404 drivers/block/drbd/drbd_req.c if (connection->req_not_net_done != req) connection 406 drivers/block/drbd/drbd_req.c list_for_each_entry_continue(req, &connection->transfer_log, tl_requests) { connection 411 drivers/block/drbd/drbd_req.c if (&req->tl_requests == &connection->transfer_log) connection 413 drivers/block/drbd/drbd_req.c connection->req_not_net_done = req; connection 570 drivers/block/drbd/drbd_req.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; connection 593 drivers/block/drbd/drbd_req.c nc = rcu_dereference(connection->net_conf); connection 665 drivers/block/drbd/drbd_req.c drbd_queue_work(&connection->sender_work, connection 701 drivers/block/drbd/drbd_req.c drbd_queue_work(&connection->sender_work, connection 706 drivers/block/drbd/drbd_req.c nc = rcu_dereference(connection->net_conf); connection 709 drivers/block/drbd/drbd_req.c if (connection->current_tle_writes >= p) connection 710 drivers/block/drbd/drbd_req.c start_new_tl_epoch(connection); connection 717 drivers/block/drbd/drbd_req.c drbd_queue_work(&connection->sender_work, connection 828 drivers/block/drbd/drbd_req.c drbd_queue_work(&connection->sender_work, connection 851 drivers/block/drbd/drbd_req.c drbd_queue_work(&connection->sender_work, connection 884 drivers/block/drbd/drbd_req.c start_new_tl_epoch(connection); connection 992 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 998 drivers/block/drbd/drbd_req.c nc = rcu_dereference(connection->net_conf); connection 1002 drivers/block/drbd/drbd_req.c connection->agreed_pro_version < 96) connection 1028 drivers/block/drbd/drbd_req.c start_new_tl_epoch(first_peer_device(device)->connection); connection 1364 drivers/block/drbd/drbd_req.c req->epoch = atomic_read(&first_peer_device(device)->connection->current_tle_nr); connection 1370 drivers/block/drbd/drbd_req.c first_peer_device(device)->connection->current_tle_writes++; connection 1372 drivers/block/drbd/drbd_req.c list_add_tail(&req->tl_requests, &first_peer_device(device)->connection->transfer_log); connection 1635 drivers/block/drbd/drbd_req.c struct drbd_connection *connection, connection 1644 drivers/block/drbd/drbd_req.c if (time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) connection 1657 drivers/block/drbd/drbd_req.c if (net_req->epoch == connection->send.current_epoch_nr) { connection 1680 drivers/block/drbd/drbd_req.c if (time_after(now, connection->send.last_sent_barrier_jif + ent)) { connection 1682 drivers/block/drbd/drbd_req.c connection->send.last_sent_barrier_jif, now, connection 1683 drivers/block/drbd/drbd_req.c jiffies_to_msecs(now - connection->send.last_sent_barrier_jif), ko_count, timeout); connection 1709 drivers/block/drbd/drbd_req.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 1718 drivers/block/drbd/drbd_req.c nc = rcu_dereference(connection->net_conf); connection 1752 drivers/block/drbd/drbd_req.c req_peer = connection->req_ack_pending; connection 1758 drivers/block/drbd/drbd_req.c req_peer = connection->req_not_net_done; connection 1775 drivers/block/drbd/drbd_req.c if (ent && req_peer && net_timeout_reached(req_peer, connection, now, ent, ko_count, timeout)) connection 1776 drivers/block/drbd/drbd_req.c _conn_request_state(connection, NS(conn, C_TIMEOUT), CS_VERBOSE | CS_HARD); connection 279 drivers/block/drbd/drbd_req.h extern void start_new_tl_epoch(struct drbd_connection *connection); connection 288 drivers/block/drbd/drbd_req.h extern void tl_restart(struct drbd_connection *connection, enum drbd_req_event what); connection 289 drivers/block/drbd/drbd_req.h extern void _tl_restart(struct drbd_connection *connection, enum drbd_req_event what); connection 46 drivers/block/drbd/drbd_state.c struct drbd_connection *connection; connection 54 drivers/block/drbd/drbd_state.c for_each_connection(connection, resource) connection 79 drivers/block/drbd/drbd_state.c state_change->connections[n].connection = NULL; connection 88 drivers/block/drbd/drbd_state.c struct drbd_connection *connection; connection 112 drivers/block/drbd/drbd_state.c for_each_connection(connection, resource) { connection 113 drivers/block/drbd/drbd_state.c kref_get(&connection->kref); connection 114 drivers/block/drbd/drbd_state.c connection_state_change->connection = connection; connection 116 drivers/block/drbd/drbd_state.c connection->cstate; connection 118 drivers/block/drbd/drbd_state.c conn_highest_peer(connection); connection 131 drivers/block/drbd/drbd_state.c for_each_connection(connection, resource) { connection 134 drivers/block/drbd/drbd_state.c peer_device = conn_peer_device(connection, device->vnr); connection 184 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = connection 185 drivers/block/drbd/drbd_state.c connection_state_change->connection; connection 187 drivers/block/drbd/drbd_state.c connection_state_change->cstate[NEW] = connection->cstate; connection 189 drivers/block/drbd/drbd_state.c conn_highest_peer(connection); connection 270 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = connection 271 drivers/block/drbd/drbd_state.c state_change->connections[n].connection; connection 273 drivers/block/drbd/drbd_state.c if (connection) connection 274 drivers/block/drbd/drbd_state.c kref_put(&connection->kref, drbd_destroy_connection); connection 294 drivers/block/drbd/drbd_state.c bool conn_all_vols_unconf(struct drbd_connection *connection) connection 301 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 335 drivers/block/drbd/drbd_state.c enum drbd_role conn_highest_role(struct drbd_connection *connection) connection 342 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 351 drivers/block/drbd/drbd_state.c enum drbd_role conn_highest_peer(struct drbd_connection *connection) connection 358 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 367 drivers/block/drbd/drbd_state.c enum drbd_disk_state conn_highest_disk(struct drbd_connection *connection) connection 374 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 383 drivers/block/drbd/drbd_state.c enum drbd_disk_state conn_lowest_disk(struct drbd_connection *connection) connection 390 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 399 drivers/block/drbd/drbd_state.c enum drbd_disk_state conn_highest_pdsk(struct drbd_connection *connection) connection 406 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 415 drivers/block/drbd/drbd_state.c enum drbd_conns conn_lowest_conn(struct drbd_connection *connection) connection 422 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 431 drivers/block/drbd/drbd_state.c static bool no_peer_wf_report_params(struct drbd_connection *connection) connection 438 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) connection 448 drivers/block/drbd/drbd_state.c static void wake_up_all_devices(struct drbd_connection *connection) connection 454 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) connection 542 drivers/block/drbd/drbd_state.c rv = is_valid_soft_transition(os, ns, first_peer_device(device)->connection); connection 591 drivers/block/drbd/drbd_state.c rv = is_valid_soft_transition(os, ns, first_peer_device(device)->connection); connection 625 drivers/block/drbd/drbd_state.c D_ASSERT(device, current != first_peer_device(device)->connection->worker.task); connection 799 drivers/block/drbd/drbd_state.c static void conn_pr_state_change(struct drbd_connection *connection, union drbd_state os, union drbd_state ns, connection 813 drivers/block/drbd/drbd_state.c drbd_info(connection, "%s\n", pb); connection 838 drivers/block/drbd/drbd_state.c nc = rcu_dereference(first_peer_device(device)->connection->net_conf); connection 843 drivers/block/drbd/drbd_state.c else if (conn_highest_peer(first_peer_device(device)->connection) == R_PRIMARY) connection 884 drivers/block/drbd/drbd_state.c first_peer_device(device)->connection->agreed_pro_version < 88) connection 912 drivers/block/drbd/drbd_state.c is_valid_soft_transition(union drbd_state os, union drbd_state ns, struct drbd_connection *connection) connection 937 drivers/block/drbd/drbd_state.c if (test_bit(STATE_SENT, &connection->flags) && connection 1227 drivers/block/drbd/drbd_state.c if (first_peer_device(device)->connection->agreed_pro_version < 90) connection 1265 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 1292 drivers/block/drbd/drbd_state.c rv = is_valid_soft_transition(os, ns, connection); connection 1294 drivers/block/drbd/drbd_state.c rv = is_valid_soft_transition(os, ns, connection); connection 1311 drivers/block/drbd/drbd_state.c conn_pr_state_change(connection, os, ns, connection 1343 drivers/block/drbd/drbd_state.c start_new_tl_epoch(connection); connection 1350 drivers/block/drbd/drbd_state.c no_peer_wf_report_params(connection)) { connection 1351 drivers/block/drbd/drbd_state.c clear_bit(STATE_SENT, &connection->flags); connection 1352 drivers/block/drbd/drbd_state.c wake_up_all_devices(connection); connection 1357 drivers/block/drbd/drbd_state.c wake_up(&connection->ping_wait); connection 1445 drivers/block/drbd/drbd_state.c drbd_thread_stop_nowait(&connection->receiver); connection 1449 drivers/block/drbd/drbd_state.c drbd_thread_stop_nowait(&connection->receiver); connection 1454 drivers/block/drbd/drbd_state.c drbd_thread_restart_nowait(&connection->receiver); connection 1459 drivers/block/drbd/drbd_state.c connection->connect_cnt++; connection 1478 drivers/block/drbd/drbd_state.c drbd_queue_work(&connection->sender_work, connection 1526 drivers/block/drbd/drbd_state.c D_ASSERT(device, current == first_peer_device(device)->connection->worker.task); connection 1561 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = connection_state_change->connection; connection 1567 drivers/block/drbd/drbd_state.c notify_connection_state(skb, seq, connection, &connection_info, type); connection 1706 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 1736 drivers/block/drbd/drbd_state.c if (os.conn < C_CONNECTED && conn_lowest_conn(connection) >= C_CONNECTED) connection 1740 drivers/block/drbd/drbd_state.c conn_lowest_disk(connection) == D_UP_TO_DATE) connection 1744 drivers/block/drbd/drbd_state.c _tl_restart(connection, what); connection 1745 drivers/block/drbd/drbd_state.c _conn_request_state(connection, connection 1755 drivers/block/drbd/drbd_state.c if (resource->susp_fen && conn_lowest_conn(connection) >= C_CONNECTED) { connection 1761 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) connection 1771 drivers/block/drbd/drbd_state.c _tl_restart(connection, RESEND); connection 1772 drivers/block/drbd/drbd_state.c _conn_request_state(connection, connection 1786 drivers/block/drbd/drbd_state.c connection->agreed_pro_version >= 96 && get_ldev(device)) { connection 2033 drivers/block/drbd/drbd_state.c struct drbd_connection *connection; connection 2041 drivers/block/drbd/drbd_state.c struct drbd_connection *connection = acscw->connection; connection 2053 drivers/block/drbd/drbd_state.c drbd_thread_start(&connection->receiver); connection 2059 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) connection 2062 drivers/block/drbd/drbd_state.c notify_connection_state(NULL, 0, connection, NULL, NOTIFY_DESTROY); connection 2065 drivers/block/drbd/drbd_state.c mutex_lock(&connection->resource->conf_update); connection 2066 drivers/block/drbd/drbd_state.c old_conf = connection->net_conf; connection 2067 drivers/block/drbd/drbd_state.c connection->my_addr_len = 0; connection 2068 drivers/block/drbd/drbd_state.c connection->peer_addr_len = 0; connection 2069 drivers/block/drbd/drbd_state.c RCU_INIT_POINTER(connection->net_conf, NULL); connection 2070 drivers/block/drbd/drbd_state.c conn_free_crypto(connection); connection 2071 drivers/block/drbd/drbd_state.c mutex_unlock(&connection->resource->conf_update); connection 2081 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 2089 drivers/block/drbd/drbd_state.c spin_lock_irq(&connection->resource->req_lock); connection 2090 drivers/block/drbd/drbd_state.c _tl_restart(connection, CONNECTION_LOST_WHILE_PENDING); connection 2091 drivers/block/drbd/drbd_state.c _conn_request_state(connection, connection 2095 drivers/block/drbd/drbd_state.c spin_unlock_irq(&connection->resource->req_lock); connection 2098 drivers/block/drbd/drbd_state.c conn_md_sync(connection); connection 2099 drivers/block/drbd/drbd_state.c kref_put(&connection->kref, drbd_destroy_connection); connection 2104 drivers/block/drbd/drbd_state.c static void conn_old_common_state(struct drbd_connection *connection, union drbd_state *pcs, enum chg_state_flags *pf) connection 2112 drivers/block/drbd/drbd_state.c .conn = connection->cstate, connection 2118 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 2151 drivers/block/drbd/drbd_state.c conn_is_valid_transition(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, connection 2160 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 2177 drivers/block/drbd/drbd_state.c rv = is_valid_soft_transition(os, ns, connection); connection 2179 drivers/block/drbd/drbd_state.c rv = is_valid_soft_transition(os, ns, connection); connection 2194 drivers/block/drbd/drbd_state.c conn_set_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, connection 2213 drivers/block/drbd/drbd_state.c if (connection->cstate != C_WF_REPORT_PARAMS && val.conn == C_WF_REPORT_PARAMS) connection 2214 drivers/block/drbd/drbd_state.c connection->last_reconnect_jif = jiffies; connection 2216 drivers/block/drbd/drbd_state.c connection->cstate = val.conn; connection 2220 drivers/block/drbd/drbd_state.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 2257 drivers/block/drbd/drbd_state.c ns_min.susp = ns_max.susp = connection->resource->susp; connection 2258 drivers/block/drbd/drbd_state.c ns_min.susp_nod = ns_max.susp_nod = connection->resource->susp_nod; connection 2259 drivers/block/drbd/drbd_state.c ns_min.susp_fen = ns_max.susp_fen = connection->resource->susp_fen; connection 2266 drivers/block/drbd/drbd_state.c _conn_rq_cond(struct drbd_connection *connection, union drbd_state mask, union drbd_state val) connection 2270 drivers/block/drbd/drbd_state.c if (test_and_clear_bit(CONN_WD_ST_CHG_OKAY, &connection->flags)) connection 2273 drivers/block/drbd/drbd_state.c if (test_and_clear_bit(CONN_WD_ST_CHG_FAIL, &connection->flags)) connection 2276 drivers/block/drbd/drbd_state.c err = conn_is_valid_transition(connection, mask, val, 0); connection 2277 drivers/block/drbd/drbd_state.c if (err == SS_SUCCESS && connection->cstate == C_WF_REPORT_PARAMS) connection 2284 drivers/block/drbd/drbd_state.c _conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, connection 2289 drivers/block/drbd/drbd_state.c enum drbd_conns oc = connection->cstate; connection 2300 drivers/block/drbd/drbd_state.c rv = conn_is_valid_transition(connection, mask, val, flags); connection 2310 drivers/block/drbd/drbd_state.c spin_unlock_irq(&connection->resource->req_lock); connection 2311 drivers/block/drbd/drbd_state.c mutex_lock(&connection->cstate_mutex); connection 2314 drivers/block/drbd/drbd_state.c set_bit(CONN_WD_ST_CHG_REQ, &connection->flags); connection 2315 drivers/block/drbd/drbd_state.c if (conn_send_state_req(connection, mask, val)) { connection 2317 drivers/block/drbd/drbd_state.c clear_bit(CONN_WD_ST_CHG_REQ, &connection->flags); connection 2324 drivers/block/drbd/drbd_state.c set_bit(DISCONNECT_SENT, &connection->flags); connection 2329 drivers/block/drbd/drbd_state.c spin_lock_irq(&connection->resource->req_lock); connection 2330 drivers/block/drbd/drbd_state.c wait_event_lock_irq(connection->ping_wait, connection 2331 drivers/block/drbd/drbd_state.c (rv = _conn_rq_cond(connection, mask, val)), connection 2332 drivers/block/drbd/drbd_state.c connection->resource->req_lock); connection 2333 drivers/block/drbd/drbd_state.c clear_bit(CONN_WD_ST_CHG_REQ, &connection->flags); connection 2338 drivers/block/drbd/drbd_state.c state_change = remember_old_state(connection->resource, GFP_ATOMIC); connection 2339 drivers/block/drbd/drbd_state.c conn_old_common_state(connection, &os, &flags); connection 2341 drivers/block/drbd/drbd_state.c conn_set_state(connection, mask, val, &ns_min, &ns_max, flags); connection 2342 drivers/block/drbd/drbd_state.c conn_pr_state_change(connection, os, ns_max, flags); connection 2352 drivers/block/drbd/drbd_state.c kref_get(&connection->kref); connection 2353 drivers/block/drbd/drbd_state.c acscw->connection = connection; connection 2355 drivers/block/drbd/drbd_state.c drbd_queue_work(&connection->sender_work, &acscw->w); connection 2357 drivers/block/drbd/drbd_state.c drbd_err(connection, "Could not kmalloc an acscw\n"); connection 2364 drivers/block/drbd/drbd_state.c spin_unlock_irq(&connection->resource->req_lock); connection 2366 drivers/block/drbd/drbd_state.c mutex_unlock(&connection->cstate_mutex); connection 2367 drivers/block/drbd/drbd_state.c spin_lock_irq(&connection->resource->req_lock); connection 2370 drivers/block/drbd/drbd_state.c drbd_err(connection, "State change failed: %s\n", drbd_set_st_err_str(rv)); connection 2371 drivers/block/drbd/drbd_state.c drbd_err(connection, " mask = 0x%x val = 0x%x\n", mask.i, val.i); connection 2372 drivers/block/drbd/drbd_state.c drbd_err(connection, " old_conn:%s wanted_conn:%s\n", drbd_conn_str(oc), drbd_conn_str(val.conn)); connection 2378 drivers/block/drbd/drbd_state.c conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, connection 2383 drivers/block/drbd/drbd_state.c spin_lock_irq(&connection->resource->req_lock); connection 2384 drivers/block/drbd/drbd_state.c rv = _conn_request_state(connection, mask, val, flags); connection 2385 drivers/block/drbd/drbd_state.c spin_unlock_irq(&connection->resource->req_lock); connection 137 drivers/block/drbd/drbd_state.h _conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, connection 141 drivers/block/drbd/drbd_state.h conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, connection 145 drivers/block/drbd/drbd_state.h extern bool conn_all_vols_unconf(struct drbd_connection *connection); connection 167 drivers/block/drbd/drbd_state.h enum drbd_role conn_highest_role(struct drbd_connection *connection); connection 168 drivers/block/drbd/drbd_state.h enum drbd_role conn_highest_peer(struct drbd_connection *connection); connection 169 drivers/block/drbd/drbd_state.h enum drbd_disk_state conn_highest_disk(struct drbd_connection *connection); connection 170 drivers/block/drbd/drbd_state.h enum drbd_disk_state conn_lowest_disk(struct drbd_connection *connection); connection 171 drivers/block/drbd/drbd_state.h enum drbd_disk_state conn_highest_pdsk(struct drbd_connection *connection); connection 172 drivers/block/drbd/drbd_state.h enum drbd_conns conn_lowest_conn(struct drbd_connection *connection); connection 19 drivers/block/drbd/drbd_state_change.h struct drbd_connection *connection; connection 95 drivers/block/drbd/drbd_worker.c drbd_queue_work(&peer_device->connection->sender_work, &peer_req->w); connection 106 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device->connection; connection 148 drivers/block/drbd/drbd_worker.c if (connection->cstate >= C_WF_REPORT_PARAMS) { connection 150 drivers/block/drbd/drbd_worker.c if (!queue_work(connection->ack_sender, &peer_device->send_acks_work)) connection 357 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->csums_tfm); connection 362 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->csums_tfm, peer_req, digest); connection 452 drivers/block/drbd/drbd_worker.c &first_peer_device(device)->connection->sender_work, connection 590 drivers/block/drbd/drbd_worker.c struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; connection 618 drivers/block/drbd/drbd_worker.c if (connection->agreed_features & DRBD_FF_THIN_RESYNC) { connection 632 drivers/block/drbd/drbd_worker.c mutex_lock(&connection->data.mutex); connection 633 drivers/block/drbd/drbd_worker.c if (connection->data.socket) { connection 634 drivers/block/drbd/drbd_worker.c struct sock *sk = connection->data.socket->sk; connection 644 drivers/block/drbd/drbd_worker.c mutex_unlock(&connection->data.mutex); connection 845 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 847 drivers/block/drbd/drbd_worker.c clear_bit(GOT_PING_ACK, &connection->flags); connection 848 drivers/block/drbd/drbd_worker.c request_ping(connection); connection 849 drivers/block/drbd/drbd_worker.c wait_event(connection->ping_wait, connection 850 drivers/block/drbd/drbd_worker.c test_bit(GOT_PING_ACK, &connection->flags) || device->state.conn < C_CONNECTED); connection 855 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = first_peer_device(device)->connection; connection 877 drivers/block/drbd/drbd_worker.c drbd_queue_work(&connection->sender_work, &dw->w); connection 1003 drivers/block/drbd/drbd_worker.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 1011 drivers/block/drbd/drbd_worker.c conn_khelper(connection, "unfence-peer"); connection 1194 drivers/block/drbd/drbd_worker.c if (peer_device->connection->csums_tfm) { connection 1195 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->csums_tfm); connection 1200 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->csums_tfm, peer_req, digest); connection 1245 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->verify_tfm); connection 1253 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->verify_tfm, peer_req, digest); connection 1317 drivers/block/drbd/drbd_worker.c digest_size = crypto_shash_digestsize(peer_device->connection->verify_tfm); connection 1320 drivers/block/drbd/drbd_worker.c drbd_csum_ee(peer_device->connection->verify_tfm, peer_req, digest); connection 1366 drivers/block/drbd/drbd_worker.c static int drbd_send_barrier(struct drbd_connection *connection) connection 1371 drivers/block/drbd/drbd_worker.c sock = &connection->data; connection 1372 drivers/block/drbd/drbd_worker.c p = conn_prepare_command(connection, sock); connection 1375 drivers/block/drbd/drbd_worker.c p->barrier = connection->send.current_epoch_nr; connection 1377 drivers/block/drbd/drbd_worker.c connection->send.current_epoch_writes = 0; connection 1378 drivers/block/drbd/drbd_worker.c connection->send.last_sent_barrier_jif = jiffies; connection 1380 drivers/block/drbd/drbd_worker.c return conn_send_command(connection, sock, P_BARRIER, sizeof(*p), NULL, 0); connection 1385 drivers/block/drbd/drbd_worker.c struct drbd_socket *sock = &pd->connection->data; connection 1401 drivers/block/drbd/drbd_worker.c static void re_init_if_first_write(struct drbd_connection *connection, unsigned int epoch) connection 1403 drivers/block/drbd/drbd_worker.c if (!connection->send.seen_any_write_yet) { connection 1404 drivers/block/drbd/drbd_worker.c connection->send.seen_any_write_yet = true; connection 1405 drivers/block/drbd/drbd_worker.c connection->send.current_epoch_nr = epoch; connection 1406 drivers/block/drbd/drbd_worker.c connection->send.current_epoch_writes = 0; connection 1407 drivers/block/drbd/drbd_worker.c connection->send.last_sent_barrier_jif = jiffies; connection 1411 drivers/block/drbd/drbd_worker.c static void maybe_send_barrier(struct drbd_connection *connection, unsigned int epoch) connection 1414 drivers/block/drbd/drbd_worker.c if (!connection->send.seen_any_write_yet) connection 1416 drivers/block/drbd/drbd_worker.c if (connection->send.current_epoch_nr != epoch) { connection 1417 drivers/block/drbd/drbd_worker.c if (connection->send.current_epoch_writes) connection 1418 drivers/block/drbd/drbd_worker.c drbd_send_barrier(connection); connection 1419 drivers/block/drbd/drbd_worker.c connection->send.current_epoch_nr = epoch; connection 1428 drivers/block/drbd/drbd_worker.c struct drbd_connection *const connection = peer_device->connection; connection 1441 drivers/block/drbd/drbd_worker.c maybe_send_barrier(connection, req->epoch); connection 1459 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device->connection; connection 1469 drivers/block/drbd/drbd_worker.c re_init_if_first_write(connection, req->epoch); connection 1470 drivers/block/drbd/drbd_worker.c maybe_send_barrier(connection, req->epoch); connection 1471 drivers/block/drbd/drbd_worker.c connection->send.current_epoch_writes++; connection 1492 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device->connection; connection 1504 drivers/block/drbd/drbd_worker.c maybe_send_barrier(connection, req->epoch); connection 1712 drivers/block/drbd/drbd_worker.c static bool use_checksum_based_resync(struct drbd_connection *connection, struct drbd_device *device) connection 1716 drivers/block/drbd/drbd_worker.c csums_after_crash_only = rcu_dereference(connection->net_conf)->csums_after_crash_only; connection 1718 drivers/block/drbd/drbd_worker.c return connection->agreed_pro_version >= 89 && /* supported? */ connection 1719 drivers/block/drbd/drbd_worker.c connection->csums_tfm && /* configured? */ connection 1735 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = peer_device ? peer_device->connection : NULL; connection 1744 drivers/block/drbd/drbd_worker.c if (!connection) { connection 1759 drivers/block/drbd/drbd_worker.c conn_request_state(connection, NS(conn, C_DISCONNECTING), CS_HARD); connection 1772 drivers/block/drbd/drbd_worker.c conn_request_state(connection, connection 1780 drivers/block/drbd/drbd_worker.c if (current == connection->worker.task) { connection 1858 drivers/block/drbd/drbd_worker.c device->use_csums = use_checksum_based_resync(connection, device); connection 1870 drivers/block/drbd/drbd_worker.c if (side == C_SYNC_SOURCE && connection->agreed_pro_version < 96) connection 1873 drivers/block/drbd/drbd_worker.c if (connection->agreed_pro_version < 95 && device->rs_total == 0) { connection 1889 drivers/block/drbd/drbd_worker.c nc = rcu_dereference(connection->net_conf); connection 2048 drivers/block/drbd/drbd_worker.c static void do_unqueued_work(struct drbd_connection *connection) connection 2054 drivers/block/drbd/drbd_worker.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 2077 drivers/block/drbd/drbd_worker.c static void wait_for_work(struct drbd_connection *connection, struct list_head *work_list) connection 2083 drivers/block/drbd/drbd_worker.c dequeue_work_batch(&connection->sender_work, work_list); connection 2094 drivers/block/drbd/drbd_worker.c nc = rcu_dereference(connection->net_conf); connection 2098 drivers/block/drbd/drbd_worker.c mutex_lock(&connection->data.mutex); connection 2099 drivers/block/drbd/drbd_worker.c if (connection->data.socket) connection 2100 drivers/block/drbd/drbd_worker.c drbd_tcp_uncork(connection->data.socket); connection 2101 drivers/block/drbd/drbd_worker.c mutex_unlock(&connection->data.mutex); connection 2106 drivers/block/drbd/drbd_worker.c prepare_to_wait(&connection->sender_work.q_wait, &wait, TASK_INTERRUPTIBLE); connection 2107 drivers/block/drbd/drbd_worker.c spin_lock_irq(&connection->resource->req_lock); connection 2108 drivers/block/drbd/drbd_worker.c spin_lock(&connection->sender_work.q_lock); /* FIXME get rid of this one? */ connection 2109 drivers/block/drbd/drbd_worker.c if (!list_empty(&connection->sender_work.q)) connection 2110 drivers/block/drbd/drbd_worker.c list_splice_tail_init(&connection->sender_work.q, work_list); connection 2111 drivers/block/drbd/drbd_worker.c spin_unlock(&connection->sender_work.q_lock); /* FIXME get rid of this one? */ connection 2113 drivers/block/drbd/drbd_worker.c spin_unlock_irq(&connection->resource->req_lock); connection 2125 drivers/block/drbd/drbd_worker.c atomic_read(&connection->current_tle_nr) != connection 2126 drivers/block/drbd/drbd_worker.c connection->send.current_epoch_nr; connection 2127 drivers/block/drbd/drbd_worker.c spin_unlock_irq(&connection->resource->req_lock); connection 2130 drivers/block/drbd/drbd_worker.c maybe_send_barrier(connection, connection 2131 drivers/block/drbd/drbd_worker.c connection->send.current_epoch_nr + 1); connection 2133 drivers/block/drbd/drbd_worker.c if (test_bit(DEVICE_WORK_PENDING, &connection->flags)) connection 2137 drivers/block/drbd/drbd_worker.c if (get_t_state(&connection->worker) != RUNNING) connection 2145 drivers/block/drbd/drbd_worker.c finish_wait(&connection->sender_work.q_wait, &wait); connection 2149 drivers/block/drbd/drbd_worker.c nc = rcu_dereference(connection->net_conf); connection 2152 drivers/block/drbd/drbd_worker.c mutex_lock(&connection->data.mutex); connection 2153 drivers/block/drbd/drbd_worker.c if (connection->data.socket) { connection 2155 drivers/block/drbd/drbd_worker.c drbd_tcp_cork(connection->data.socket); connection 2157 drivers/block/drbd/drbd_worker.c drbd_tcp_uncork(connection->data.socket); connection 2159 drivers/block/drbd/drbd_worker.c mutex_unlock(&connection->data.mutex); connection 2164 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = thi->connection; connection 2174 drivers/block/drbd/drbd_worker.c update_worker_timing_details(connection, wait_for_work); connection 2175 drivers/block/drbd/drbd_worker.c wait_for_work(connection, &work_list); connection 2178 drivers/block/drbd/drbd_worker.c if (test_and_clear_bit(DEVICE_WORK_PENDING, &connection->flags)) { connection 2179 drivers/block/drbd/drbd_worker.c update_worker_timing_details(connection, do_unqueued_work); connection 2180 drivers/block/drbd/drbd_worker.c do_unqueued_work(connection); connection 2186 drivers/block/drbd/drbd_worker.c drbd_warn(connection, "Worker got an unexpected signal\n"); connection 2198 drivers/block/drbd/drbd_worker.c update_worker_timing_details(connection, w->cb); connection 2199 drivers/block/drbd/drbd_worker.c if (w->cb(w, connection->cstate < C_WF_REPORT_PARAMS) == 0) connection 2201 drivers/block/drbd/drbd_worker.c if (connection->cstate >= C_WF_REPORT_PARAMS) connection 2202 drivers/block/drbd/drbd_worker.c conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); connection 2207 drivers/block/drbd/drbd_worker.c if (test_and_clear_bit(DEVICE_WORK_PENDING, &connection->flags)) { connection 2208 drivers/block/drbd/drbd_worker.c update_worker_timing_details(connection, do_unqueued_work); connection 2209 drivers/block/drbd/drbd_worker.c do_unqueued_work(connection); connection 2214 drivers/block/drbd/drbd_worker.c update_worker_timing_details(connection, w->cb); connection 2217 drivers/block/drbd/drbd_worker.c dequeue_work_batch(&connection->sender_work, &work_list); connection 2218 drivers/block/drbd/drbd_worker.c } while (!list_empty(&work_list) || test_bit(DEVICE_WORK_PENDING, &connection->flags)); connection 2221 drivers/block/drbd/drbd_worker.c idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { connection 983 drivers/gpio/gpiolib-acpi.c status = acpi_buffer_to_resource(achip->conn_info.connection, connection 2170 drivers/gpu/drm/drm_connector.c out_resp->connection = connector->status; connection 213 drivers/gpu/drm/exynos/exynos_drm_vidi.c static DEVICE_ATTR(connection, 0644, vidi_show_connection, connection 228 drivers/gpu/drm/exynos/exynos_drm_vidi.c if (vidi->connection > 1) { connection 234 drivers/gpu/drm/exynos/exynos_drm_vidi.c if (ctx->connected == vidi->connection) { connection 240 drivers/gpu/drm/exynos/exynos_drm_vidi.c if (vidi->connection) { connection 267 drivers/gpu/drm/exynos/exynos_drm_vidi.c ctx->connected = vidi->connection; connection 94 drivers/greybus/bundle.c struct gb_connection *connection; connection 96 drivers/greybus/bundle.c list_for_each_entry(connection, &bundle->connections, bundle_links) connection 97 drivers/greybus/bundle.c gb_connection_disable(connection); connection 102 drivers/greybus/bundle.c struct gb_connection *connection; connection 104 drivers/greybus/bundle.c list_for_each_entry(connection, &bundle->connections, bundle_links) connection 105 drivers/greybus/bundle.c gb_connection_enable(connection); connection 25 drivers/greybus/connection.c struct gb_connection *connection; connection 27 drivers/greybus/connection.c list_for_each_entry(connection, &hd->connections, hd_links) { connection 28 drivers/greybus/connection.c if (connection->intf == intf && connection 29 drivers/greybus/connection.c connection->intf_cport_id == cport_id) connection 36 drivers/greybus/connection.c static void gb_connection_get(struct gb_connection *connection) connection 38 drivers/greybus/connection.c kref_get(&connection->kref); connection 40 drivers/greybus/connection.c trace_gb_connection_get(connection); connection 43 drivers/greybus/connection.c static void gb_connection_put(struct gb_connection *connection) connection 45 drivers/greybus/connection.c trace_gb_connection_put(connection); connection 47 drivers/greybus/connection.c kref_put(&connection->kref, gb_connection_kref_release); connection 56 drivers/greybus/connection.c struct gb_connection *connection; connection 60 drivers/greybus/connection.c list_for_each_entry(connection, &hd->connections, hd_links) connection 61 drivers/greybus/connection.c if (connection->hd_cport_id == cport_id) { connection 62 drivers/greybus/connection.c gb_connection_get(connection); connection 65 drivers/greybus/connection.c connection = NULL; connection 69 drivers/greybus/connection.c return connection; connection 79 drivers/greybus/connection.c struct gb_connection *connection; connection 83 drivers/greybus/connection.c connection = gb_connection_hd_find(hd, cport_id); connection 84 drivers/greybus/connection.c if (!connection) { connection 89 drivers/greybus/connection.c gb_connection_recv(connection, data, length); connection 90 drivers/greybus/connection.c gb_connection_put(connection); connection 96 drivers/greybus/connection.c struct gb_connection *connection; connection 98 drivers/greybus/connection.c connection = container_of(kref, struct gb_connection, kref); connection 100 drivers/greybus/connection.c trace_gb_connection_release(connection); connection 102 drivers/greybus/connection.c kfree(connection); connection 105 drivers/greybus/connection.c static void gb_connection_init_name(struct gb_connection *connection) connection 107 drivers/greybus/connection.c u16 hd_cport_id = connection->hd_cport_id; connection 111 drivers/greybus/connection.c if (connection->intf) { connection 112 drivers/greybus/connection.c intf_id = connection->intf->interface_id; connection 113 drivers/greybus/connection.c cport_id = connection->intf_cport_id; connection 116 drivers/greybus/connection.c snprintf(connection->name, sizeof(connection->name), connection 150 drivers/greybus/connection.c struct gb_connection *connection; connection 168 drivers/greybus/connection.c connection = kzalloc(sizeof(*connection), GFP_KERNEL); connection 169 drivers/greybus/connection.c if (!connection) { connection 174 drivers/greybus/connection.c connection->hd_cport_id = hd_cport_id; connection 175 drivers/greybus/connection.c connection->intf_cport_id = cport_id; connection 176 drivers/greybus/connection.c connection->hd = hd; connection 177 drivers/greybus/connection.c connection->intf = intf; connection 178 drivers/greybus/connection.c connection->bundle = bundle; connection 179 drivers/greybus/connection.c connection->handler = handler; connection 180 drivers/greybus/connection.c connection->flags = flags; connection 182 drivers/greybus/connection.c connection->flags |= GB_CONNECTION_FLAG_NO_FLOWCTRL; connection 183 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_DISABLED; connection 185 drivers/greybus/connection.c atomic_set(&connection->op_cycle, 0); connection 186 drivers/greybus/connection.c mutex_init(&connection->mutex); connection 187 drivers/greybus/connection.c spin_lock_init(&connection->lock); connection 188 drivers/greybus/connection.c INIT_LIST_HEAD(&connection->operations); connection 190 drivers/greybus/connection.c connection->wq = alloc_workqueue("%s:%d", WQ_UNBOUND, 1, connection 192 drivers/greybus/connection.c if (!connection->wq) { connection 197 drivers/greybus/connection.c kref_init(&connection->kref); connection 199 drivers/greybus/connection.c gb_connection_init_name(connection); connection 202 drivers/greybus/connection.c list_add(&connection->hd_links, &hd->connections); connection 205 drivers/greybus/connection.c list_add(&connection->bundle_links, &bundle->connections); connection 207 drivers/greybus/connection.c INIT_LIST_HEAD(&connection->bundle_links); connection 213 drivers/greybus/connection.c trace_gb_connection_create(connection); connection 215 drivers/greybus/connection.c return connection; connection 218 drivers/greybus/connection.c kfree(connection); connection 279 drivers/greybus/connection.c static int gb_connection_hd_cport_enable(struct gb_connection *connection) connection 281 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 287 drivers/greybus/connection.c ret = hd->driver->cport_enable(hd, connection->hd_cport_id, connection 288 drivers/greybus/connection.c connection->flags); connection 291 drivers/greybus/connection.c connection->name, ret); connection 298 drivers/greybus/connection.c static void gb_connection_hd_cport_disable(struct gb_connection *connection) connection 300 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 306 drivers/greybus/connection.c ret = hd->driver->cport_disable(hd, connection->hd_cport_id); connection 309 drivers/greybus/connection.c connection->name, ret); connection 313 drivers/greybus/connection.c static int gb_connection_hd_cport_connected(struct gb_connection *connection) connection 315 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 321 drivers/greybus/connection.c ret = hd->driver->cport_connected(hd, connection->hd_cport_id); connection 324 drivers/greybus/connection.c connection->name, ret); connection 331 drivers/greybus/connection.c static int gb_connection_hd_cport_flush(struct gb_connection *connection) connection 333 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 339 drivers/greybus/connection.c ret = hd->driver->cport_flush(hd, connection->hd_cport_id); connection 342 drivers/greybus/connection.c connection->name, ret); connection 349 drivers/greybus/connection.c static int gb_connection_hd_cport_quiesce(struct gb_connection *connection) connection 351 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 361 drivers/greybus/connection.c if (connection->mode_switch) connection 367 drivers/greybus/connection.c ret = hd->driver->cport_quiesce(hd, connection->hd_cport_id, connection 372 drivers/greybus/connection.c connection->name, ret); connection 379 drivers/greybus/connection.c static int gb_connection_hd_cport_clear(struct gb_connection *connection) connection 381 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 387 drivers/greybus/connection.c ret = hd->driver->cport_clear(hd, connection->hd_cport_id); connection 390 drivers/greybus/connection.c connection->name, ret); connection 402 drivers/greybus/connection.c gb_connection_svc_connection_create(struct gb_connection *connection) connection 404 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 409 drivers/greybus/connection.c if (gb_connection_is_static(connection)) connection 412 drivers/greybus/connection.c intf = connection->intf; connection 418 drivers/greybus/connection.c if (gb_connection_flow_control_disabled(connection)) { connection 420 drivers/greybus/connection.c } else if (gb_connection_e2efc_enabled(connection)) { connection 427 drivers/greybus/connection.c connection->hd_cport_id, connection 429 drivers/greybus/connection.c connection->intf_cport_id, connection 432 drivers/greybus/connection.c dev_err(&connection->hd->dev, connection 434 drivers/greybus/connection.c connection->name, ret); connection 442 drivers/greybus/connection.c gb_connection_svc_connection_destroy(struct gb_connection *connection) connection 444 drivers/greybus/connection.c if (gb_connection_is_static(connection)) connection 447 drivers/greybus/connection.c gb_svc_connection_destroy(connection->hd->svc, connection 448 drivers/greybus/connection.c connection->hd->svc->ap_intf_id, connection 449 drivers/greybus/connection.c connection->hd_cport_id, connection 450 drivers/greybus/connection.c connection->intf->interface_id, connection 451 drivers/greybus/connection.c connection->intf_cport_id); connection 455 drivers/greybus/connection.c static int gb_connection_control_connected(struct gb_connection *connection) connection 458 drivers/greybus/connection.c u16 cport_id = connection->intf_cport_id; connection 461 drivers/greybus/connection.c if (gb_connection_is_static(connection)) connection 464 drivers/greybus/connection.c if (gb_connection_is_control(connection)) connection 467 drivers/greybus/connection.c control = connection->intf->control; connection 471 drivers/greybus/connection.c dev_err(&connection->bundle->dev, connection 480 drivers/greybus/connection.c gb_connection_control_disconnecting(struct gb_connection *connection) connection 483 drivers/greybus/connection.c u16 cport_id = connection->intf_cport_id; connection 486 drivers/greybus/connection.c if (gb_connection_is_static(connection)) connection 489 drivers/greybus/connection.c control = connection->intf->control; connection 493 drivers/greybus/connection.c dev_err(&connection->hd->dev, connection 495 drivers/greybus/connection.c connection->name, ret); connection 500 drivers/greybus/connection.c gb_connection_control_disconnected(struct gb_connection *connection) connection 503 drivers/greybus/connection.c u16 cport_id = connection->intf_cport_id; connection 506 drivers/greybus/connection.c if (gb_connection_is_static(connection)) connection 509 drivers/greybus/connection.c control = connection->intf->control; connection 511 drivers/greybus/connection.c if (gb_connection_is_control(connection)) { connection 512 drivers/greybus/connection.c if (connection->mode_switch) { connection 528 drivers/greybus/connection.c dev_warn(&connection->bundle->dev, connection 533 drivers/greybus/connection.c static int gb_connection_shutdown_operation(struct gb_connection *connection, connection 540 drivers/greybus/connection.c operation = gb_operation_create_core(connection, connection 557 drivers/greybus/connection.c static int gb_connection_cport_shutdown(struct gb_connection *connection, connection 560 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 564 drivers/greybus/connection.c if (gb_connection_is_static(connection)) connection 567 drivers/greybus/connection.c if (gb_connection_is_offloaded(connection)) { connection 571 drivers/greybus/connection.c ret = drv->cport_shutdown(hd, connection->hd_cport_id, phase, connection 574 drivers/greybus/connection.c ret = gb_connection_shutdown_operation(connection, phase); connection 579 drivers/greybus/connection.c connection->name, phase, ret); connection 587 drivers/greybus/connection.c gb_connection_cport_shutdown_phase_1(struct gb_connection *connection) connection 589 drivers/greybus/connection.c return gb_connection_cport_shutdown(connection, 1); connection 593 drivers/greybus/connection.c gb_connection_cport_shutdown_phase_2(struct gb_connection *connection) connection 595 drivers/greybus/connection.c return gb_connection_cport_shutdown(connection, 2); connection 604 drivers/greybus/connection.c static void gb_connection_cancel_operations(struct gb_connection *connection, connection 606 drivers/greybus/connection.c __must_hold(&connection->lock) connection 610 drivers/greybus/connection.c while (!list_empty(&connection->operations)) { connection 611 drivers/greybus/connection.c operation = list_last_entry(&connection->operations, connection 614 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 623 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 633 drivers/greybus/connection.c gb_connection_flush_incoming_operations(struct gb_connection *connection, connection 635 drivers/greybus/connection.c __must_hold(&connection->lock) connection 640 drivers/greybus/connection.c while (!list_empty(&connection->operations)) { connection 642 drivers/greybus/connection.c list_for_each_entry(operation, &connection->operations, connection 654 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 660 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 674 drivers/greybus/connection.c static int _gb_connection_enable(struct gb_connection *connection, bool rx) connection 679 drivers/greybus/connection.c if (connection->state == GB_CONNECTION_STATE_ENABLED_TX) { connection 680 drivers/greybus/connection.c if (!(connection->handler && rx)) connection 683 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 684 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_ENABLED; connection 685 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 690 drivers/greybus/connection.c ret = gb_connection_hd_cport_enable(connection); connection 694 drivers/greybus/connection.c ret = gb_connection_svc_connection_create(connection); connection 698 drivers/greybus/connection.c ret = gb_connection_hd_cport_connected(connection); connection 702 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 703 drivers/greybus/connection.c if (connection->handler && rx) connection 704 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_ENABLED; connection 706 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_ENABLED_TX; connection 707 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 709 drivers/greybus/connection.c ret = gb_connection_control_connected(connection); connection 716 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 717 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_DISCONNECTING; connection 718 drivers/greybus/connection.c gb_connection_cancel_operations(connection, -ESHUTDOWN); connection 719 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 722 drivers/greybus/connection.c gb_connection_hd_cport_flush(connection); connection 724 drivers/greybus/connection.c gb_connection_control_disconnecting(connection); connection 725 drivers/greybus/connection.c gb_connection_cport_shutdown_phase_1(connection); connection 726 drivers/greybus/connection.c gb_connection_hd_cport_quiesce(connection); connection 727 drivers/greybus/connection.c gb_connection_cport_shutdown_phase_2(connection); connection 728 drivers/greybus/connection.c gb_connection_control_disconnected(connection); connection 729 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_DISABLED; connection 731 drivers/greybus/connection.c gb_connection_svc_connection_destroy(connection); connection 733 drivers/greybus/connection.c gb_connection_hd_cport_clear(connection); connection 735 drivers/greybus/connection.c gb_connection_hd_cport_disable(connection); connection 740 drivers/greybus/connection.c int gb_connection_enable(struct gb_connection *connection) connection 744 drivers/greybus/connection.c mutex_lock(&connection->mutex); connection 746 drivers/greybus/connection.c if (connection->state == GB_CONNECTION_STATE_ENABLED) connection 749 drivers/greybus/connection.c ret = _gb_connection_enable(connection, true); connection 751 drivers/greybus/connection.c trace_gb_connection_enable(connection); connection 754 drivers/greybus/connection.c mutex_unlock(&connection->mutex); connection 760 drivers/greybus/connection.c int gb_connection_enable_tx(struct gb_connection *connection) connection 764 drivers/greybus/connection.c mutex_lock(&connection->mutex); connection 766 drivers/greybus/connection.c if (connection->state == GB_CONNECTION_STATE_ENABLED) { connection 771 drivers/greybus/connection.c if (connection->state == GB_CONNECTION_STATE_ENABLED_TX) connection 774 drivers/greybus/connection.c ret = _gb_connection_enable(connection, false); connection 776 drivers/greybus/connection.c trace_gb_connection_enable(connection); connection 779 drivers/greybus/connection.c mutex_unlock(&connection->mutex); connection 785 drivers/greybus/connection.c void gb_connection_disable_rx(struct gb_connection *connection) connection 787 drivers/greybus/connection.c mutex_lock(&connection->mutex); connection 789 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 790 drivers/greybus/connection.c if (connection->state != GB_CONNECTION_STATE_ENABLED) { connection 791 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 794 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_ENABLED_TX; connection 795 drivers/greybus/connection.c gb_connection_flush_incoming_operations(connection, -ESHUTDOWN); connection 796 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 798 drivers/greybus/connection.c trace_gb_connection_disable(connection); connection 801 drivers/greybus/connection.c mutex_unlock(&connection->mutex); connection 805 drivers/greybus/connection.c void gb_connection_mode_switch_prepare(struct gb_connection *connection) connection 807 drivers/greybus/connection.c connection->mode_switch = true; connection 810 drivers/greybus/connection.c void gb_connection_mode_switch_complete(struct gb_connection *connection) connection 812 drivers/greybus/connection.c gb_connection_svc_connection_destroy(connection); connection 813 drivers/greybus/connection.c gb_connection_hd_cport_clear(connection); connection 815 drivers/greybus/connection.c gb_connection_hd_cport_disable(connection); connection 817 drivers/greybus/connection.c connection->mode_switch = false; connection 820 drivers/greybus/connection.c void gb_connection_disable(struct gb_connection *connection) connection 822 drivers/greybus/connection.c mutex_lock(&connection->mutex); connection 824 drivers/greybus/connection.c if (connection->state == GB_CONNECTION_STATE_DISABLED) connection 827 drivers/greybus/connection.c trace_gb_connection_disable(connection); connection 829 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 830 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_DISCONNECTING; connection 831 drivers/greybus/connection.c gb_connection_cancel_operations(connection, -ESHUTDOWN); connection 832 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 834 drivers/greybus/connection.c gb_connection_hd_cport_flush(connection); connection 836 drivers/greybus/connection.c gb_connection_control_disconnecting(connection); connection 837 drivers/greybus/connection.c gb_connection_cport_shutdown_phase_1(connection); connection 838 drivers/greybus/connection.c gb_connection_hd_cport_quiesce(connection); connection 839 drivers/greybus/connection.c gb_connection_cport_shutdown_phase_2(connection); connection 840 drivers/greybus/connection.c gb_connection_control_disconnected(connection); connection 842 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_DISABLED; connection 845 drivers/greybus/connection.c if (!connection->mode_switch) { connection 846 drivers/greybus/connection.c gb_connection_svc_connection_destroy(connection); connection 847 drivers/greybus/connection.c gb_connection_hd_cport_clear(connection); connection 849 drivers/greybus/connection.c gb_connection_hd_cport_disable(connection); connection 853 drivers/greybus/connection.c mutex_unlock(&connection->mutex); connection 858 drivers/greybus/connection.c void gb_connection_disable_forced(struct gb_connection *connection) connection 860 drivers/greybus/connection.c mutex_lock(&connection->mutex); connection 862 drivers/greybus/connection.c if (connection->state == GB_CONNECTION_STATE_DISABLED) connection 865 drivers/greybus/connection.c trace_gb_connection_disable(connection); connection 867 drivers/greybus/connection.c spin_lock_irq(&connection->lock); connection 868 drivers/greybus/connection.c connection->state = GB_CONNECTION_STATE_DISABLED; connection 869 drivers/greybus/connection.c gb_connection_cancel_operations(connection, -ESHUTDOWN); connection 870 drivers/greybus/connection.c spin_unlock_irq(&connection->lock); connection 872 drivers/greybus/connection.c gb_connection_hd_cport_flush(connection); connection 874 drivers/greybus/connection.c gb_connection_svc_connection_destroy(connection); connection 875 drivers/greybus/connection.c gb_connection_hd_cport_clear(connection); connection 877 drivers/greybus/connection.c gb_connection_hd_cport_disable(connection); connection 879 drivers/greybus/connection.c mutex_unlock(&connection->mutex); connection 884 drivers/greybus/connection.c void gb_connection_destroy(struct gb_connection *connection) connection 886 drivers/greybus/connection.c if (!connection) connection 889 drivers/greybus/connection.c if (WARN_ON(connection->state != GB_CONNECTION_STATE_DISABLED)) connection 890 drivers/greybus/connection.c gb_connection_disable(connection); connection 895 drivers/greybus/connection.c list_del(&connection->bundle_links); connection 896 drivers/greybus/connection.c list_del(&connection->hd_links); connection 899 drivers/greybus/connection.c destroy_workqueue(connection->wq); connection 901 drivers/greybus/connection.c gb_hd_cport_release(connection->hd, connection->hd_cport_id); connection 902 drivers/greybus/connection.c connection->hd_cport_id = CPORT_ID_BAD; connection 906 drivers/greybus/connection.c gb_connection_put(connection); connection 910 drivers/greybus/connection.c void gb_connection_latency_tag_enable(struct gb_connection *connection) connection 912 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 918 drivers/greybus/connection.c ret = hd->driver->latency_tag_enable(hd, connection->hd_cport_id); connection 920 drivers/greybus/connection.c dev_err(&connection->hd->dev, connection 922 drivers/greybus/connection.c connection->name, ret); connection 927 drivers/greybus/connection.c void gb_connection_latency_tag_disable(struct gb_connection *connection) connection 929 drivers/greybus/connection.c struct gb_host_device *hd = connection->hd; connection 935 drivers/greybus/connection.c ret = hd->driver->latency_tag_disable(hd, connection->hd_cport_id); connection 937 drivers/greybus/connection.c dev_err(&connection->hd->dev, connection 939 drivers/greybus/connection.c connection->name, ret); connection 20 drivers/greybus/control.c struct gb_interface *intf = control->connection->intf; connection 28 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 58 drivers/greybus/control.c struct gb_interface *intf = control->connection->intf; connection 65 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 87 drivers/greybus/control.c struct gb_interface *intf = control->connection->intf; connection 107 drivers/greybus/control.c struct gb_connection *connection = intf->control->connection; connection 110 drivers/greybus/control.c ret = gb_operation_sync(connection, GB_CONTROL_TYPE_GET_MANIFEST_SIZE, connection 113 drivers/greybus/control.c dev_err(&connection->intf->dev, connection 125 drivers/greybus/control.c struct gb_connection *connection = intf->control->connection; connection 127 drivers/greybus/control.c return gb_operation_sync(connection, GB_CONTROL_TYPE_GET_MANIFEST, connection 136 drivers/greybus/control.c return gb_operation_sync(control->connection, GB_CONTROL_TYPE_CONNECTED, connection 145 drivers/greybus/control.c return gb_operation_sync(control->connection, connection 157 drivers/greybus/control.c operation = gb_operation_create_core(control->connection, connection 183 drivers/greybus/control.c operation = gb_operation_create_core(control->connection, connection 222 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 247 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 272 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 301 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 337 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 360 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 383 drivers/greybus/control.c ret = gb_operation_sync(control->connection, connection 431 drivers/greybus/control.c gb_connection_destroy(control->connection); connection 446 drivers/greybus/control.c struct gb_connection *connection; connection 455 drivers/greybus/control.c connection = gb_connection_create_control(intf); connection 456 drivers/greybus/control.c if (IS_ERR(connection)) { connection 459 drivers/greybus/control.c PTR_ERR(connection)); connection 461 drivers/greybus/control.c return ERR_CAST(connection); connection 464 drivers/greybus/control.c control->connection = connection; connection 474 drivers/greybus/control.c gb_connection_set_data(control->connection, control); connection 483 drivers/greybus/control.c dev_dbg(&control->connection->intf->dev, "%s\n", __func__); connection 485 drivers/greybus/control.c ret = gb_connection_enable_tx(control->connection); connection 487 drivers/greybus/control.c dev_err(&control->connection->intf->dev, connection 507 drivers/greybus/control.c gb_connection_disable(control->connection); connection 514 drivers/greybus/control.c dev_dbg(&control->connection->intf->dev, "%s\n", __func__); connection 517 drivers/greybus/control.c gb_connection_disable_forced(control->connection); connection 519 drivers/greybus/control.c gb_connection_disable(control->connection); connection 524 drivers/greybus/control.c gb_connection_disable(control->connection); connection 533 drivers/greybus/control.c ret = gb_connection_enable_tx(control->connection); connection 535 drivers/greybus/control.c dev_err(&control->connection->intf->dev, connection 578 drivers/greybus/control.c gb_connection_mode_switch_prepare(control->connection); connection 583 drivers/greybus/control.c gb_connection_mode_switch_complete(control->connection); connection 229 drivers/greybus/core.c struct gb_connection *connection; connection 241 drivers/greybus/core.c list_for_each_entry(connection, &bundle->connections, bundle_links) { connection 242 drivers/greybus/core.c if (gb_connection_is_offloaded(connection)) connection 246 drivers/greybus/core.c gb_connection_disable_forced(connection); connection 248 drivers/greybus/core.c gb_connection_disable_rx(connection); connection 455 drivers/greybus/es2.c struct gb_host_device *hd = message->operation->connection->hd; connection 862 drivers/greybus/es2.c struct gb_host_device *hd = message->operation->connection->hd; connection 107 drivers/greybus/greybus_trace.h __entry->cport_id = operation->connection->hd_cport_id; connection 165 drivers/greybus/greybus_trace.h TP_PROTO(struct gb_connection *connection), connection 167 drivers/greybus/greybus_trace.h TP_ARGS(connection), connection 173 drivers/greybus/greybus_trace.h __dynamic_array(char, name, sizeof(connection->name)) connection 179 drivers/greybus/greybus_trace.h __entry->hd_bus_id = connection->hd->bus_id; connection 180 drivers/greybus/greybus_trace.h __entry->bundle_id = connection->bundle ? connection 181 drivers/greybus/greybus_trace.h connection->bundle->id : BUNDLE_ID_NONE; connection 182 drivers/greybus/greybus_trace.h memcpy(__get_str(name), connection->name, connection 183 drivers/greybus/greybus_trace.h sizeof(connection->name)); connection 184 drivers/greybus/greybus_trace.h __entry->state = connection->state; connection 185 drivers/greybus/greybus_trace.h __entry->flags = connection->flags; connection 195 drivers/greybus/greybus_trace.h TP_PROTO(struct gb_connection *connection), \ connection 196 drivers/greybus/greybus_trace.h TP_ARGS(connection)) connection 44 drivers/greybus/operation.c struct gb_connection *connection = operation->connection; connection 47 drivers/greybus/operation.c spin_lock_irqsave(&connection->lock, flags); connection 48 drivers/greybus/operation.c switch (connection->state) { connection 64 drivers/greybus/operation.c list_add_tail(&operation->links, &connection->operations); connection 68 drivers/greybus/operation.c spin_unlock_irqrestore(&connection->lock, flags); connection 73 drivers/greybus/operation.c spin_unlock_irqrestore(&connection->lock, flags); connection 81 drivers/greybus/operation.c struct gb_connection *connection = operation->connection; connection 84 drivers/greybus/operation.c spin_lock_irqsave(&connection->lock, flags); connection 93 drivers/greybus/operation.c spin_unlock_irqrestore(&connection->lock, flags); connection 98 drivers/greybus/operation.c struct gb_connection *connection = operation->connection; connection 102 drivers/greybus/operation.c spin_lock_irqsave(&connection->lock, flags); connection 104 drivers/greybus/operation.c spin_unlock_irqrestore(&connection->lock, flags); connection 196 drivers/greybus/operation.c gb_operation_find_outgoing(struct gb_connection *connection, u16 operation_id) connection 202 drivers/greybus/operation.c spin_lock_irqsave(&connection->lock, flags); connection 203 drivers/greybus/operation.c list_for_each_entry(operation, &connection->operations, links) connection 210 drivers/greybus/operation.c spin_unlock_irqrestore(&connection->lock, flags); connection 217 drivers/greybus/operation.c struct gb_connection *connection = message->operation->connection; connection 220 drivers/greybus/operation.c return connection->hd->driver->message_send(connection->hd, connection 221 drivers/greybus/operation.c connection->hd_cport_id, connection 231 drivers/greybus/operation.c struct gb_host_device *hd = message->operation->connection->hd; connection 238 drivers/greybus/operation.c struct gb_connection *connection = operation->connection; connection 242 drivers/greybus/operation.c if (connection->handler) { connection 243 drivers/greybus/operation.c status = connection->handler(operation); connection 245 drivers/greybus/operation.c dev_err(&connection->hd->dev, connection 247 drivers/greybus/operation.c connection->name, operation->type); connection 254 drivers/greybus/operation.c dev_err(&connection->hd->dev, connection 256 drivers/greybus/operation.c connection->name, status, operation->type, ret); connection 471 drivers/greybus/operation.c struct gb_host_device *hd = operation->connection->hd; connection 519 drivers/greybus/operation.c gb_operation_create_common(struct gb_connection *connection, u8 type, connection 523 drivers/greybus/operation.c struct gb_host_device *hd = connection->hd; connection 529 drivers/greybus/operation.c operation->connection = connection; connection 575 drivers/greybus/operation.c gb_operation_create_flags(struct gb_connection *connection, connection 590 drivers/greybus/operation.c operation = gb_operation_create_common(connection, type, connection 601 drivers/greybus/operation.c gb_operation_create_core(struct gb_connection *connection, connection 610 drivers/greybus/operation.c operation = gb_operation_create_common(connection, type, connection 621 drivers/greybus/operation.c size_t gb_operation_get_payload_size_max(struct gb_connection *connection) connection 623 drivers/greybus/operation.c struct gb_host_device *hd = connection->hd; connection 630 drivers/greybus/operation.c gb_operation_create_incoming(struct gb_connection *connection, u16 id, connection 643 drivers/greybus/operation.c operation = gb_operation_create_common(connection, type, connection 725 drivers/greybus/operation.c struct gb_connection *connection = operation->connection; connection 730 drivers/greybus/operation.c if (gb_connection_is_offloaded(connection)) connection 750 drivers/greybus/operation.c cycle = (unsigned int)atomic_inc_return(&connection->op_cycle); connection 826 drivers/greybus/operation.c struct gb_connection *connection = operation->connection; connection 837 drivers/greybus/operation.c dev_err(&connection->hd->dev, "request result already set\n"); connection 875 drivers/greybus/operation.c struct gb_connection *connection = operation->connection; connection 890 drivers/greybus/operation.c dev_err(&connection->hd->dev, connection 892 drivers/greybus/operation.c connection->name, operation->type, status); connection 913 drivers/greybus/operation.c static void gb_connection_recv_request(struct gb_connection *connection, connection 925 drivers/greybus/operation.c operation = gb_operation_create_incoming(connection, operation_id, connection 928 drivers/greybus/operation.c dev_err(&connection->hd->dev, connection 930 drivers/greybus/operation.c connection->name); connection 946 drivers/greybus/operation.c queue_work(connection->wq, &operation->work); connection 957 drivers/greybus/operation.c static void gb_connection_recv_response(struct gb_connection *connection, connection 970 drivers/greybus/operation.c dev_err_ratelimited(&connection->hd->dev, connection 972 drivers/greybus/operation.c connection->name); connection 976 drivers/greybus/operation.c operation = gb_operation_find_outgoing(connection, operation_id); connection 978 drivers/greybus/operation.c dev_err_ratelimited(&connection->hd->dev, connection 980 drivers/greybus/operation.c connection->name, operation_id); connection 988 drivers/greybus/operation.c dev_err_ratelimited(&connection->hd->dev, connection 990 drivers/greybus/operation.c connection->name, header->type, connection 997 drivers/greybus/operation.c dev_err_ratelimited(&connection->hd->dev, connection 999 drivers/greybus/operation.c connection->name, header->type, connection 1026 drivers/greybus/operation.c void gb_connection_recv(struct gb_connection *connection, connection 1030 drivers/greybus/operation.c struct device *dev = &connection->hd->dev; connection 1033 drivers/greybus/operation.c if (connection->state == GB_CONNECTION_STATE_DISABLED || connection 1034 drivers/greybus/operation.c gb_connection_is_offloaded(connection)) { connection 1036 drivers/greybus/operation.c connection->name, size); connection 1042 drivers/greybus/operation.c connection->name); connection 1052 drivers/greybus/operation.c connection->name, connection 1059 drivers/greybus/operation.c gb_connection_recv_response(connection, &header, data, connection 1062 drivers/greybus/operation.c gb_connection_recv_request(connection, &header, data, connection 1138 drivers/greybus/operation.c int gb_operation_sync_timeout(struct gb_connection *connection, int type, connection 1150 drivers/greybus/operation.c operation = gb_operation_create(connection, type, connection 1161 drivers/greybus/operation.c dev_err(&connection->hd->dev, connection 1163 drivers/greybus/operation.c connection->name, operation->id, type, ret); connection 1191 drivers/greybus/operation.c int gb_operation_unidirectional_timeout(struct gb_connection *connection, connection 1202 drivers/greybus/operation.c operation = gb_operation_create_flags(connection, type, connection 1214 drivers/greybus/operation.c dev_err(&connection->hd->dev, connection 1216 drivers/greybus/operation.c connection->name, type, ret); connection 135 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, connection 154 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, connection 182 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_PWRMON_SAMPLE_GET, connection 219 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, connection 264 drivers/greybus/svc.c return gb_operation_sync(svc->connection, GB_SVC_TYPE_INTF_DEVICE_ID, connection 279 drivers/greybus/svc.c ret = gb_operation_sync_timeout(svc->connection, connection 304 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, type, connection 327 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, type, connection 350 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, type, connection 368 drivers/greybus/svc.c ret = gb_operation_sync_timeout(svc->connection, connection 394 drivers/greybus/svc.c ret = gb_operation_sync_timeout(svc->connection, connection 426 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_DME_PEER_GET, connection 461 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_DME_PEER_SET, connection 494 drivers/greybus/svc.c return gb_operation_sync(svc->connection, GB_SVC_TYPE_CONN_CREATE, connection 502 drivers/greybus/svc.c struct gb_connection *connection = svc->connection; connection 510 drivers/greybus/svc.c ret = gb_operation_sync(connection, GB_SVC_TYPE_CONN_DESTROY, connection 529 drivers/greybus/svc.c return gb_operation_sync(svc->connection, GB_SVC_TYPE_ROUTE_CREATE, connection 542 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_ROUTE_DESTROY, connection 582 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_INTF_SET_PWRM, connection 612 drivers/greybus/svc.c ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_INTF_SET_PWRM, connection 635 drivers/greybus/svc.c return gb_operation_sync_timeout(svc->connection, GB_SVC_TYPE_PING, connection 642 drivers/greybus/svc.c struct gb_connection *connection = op->connection; connection 643 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 839 drivers/greybus/svc.c struct gb_connection *connection = op->connection; connection 840 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 913 drivers/greybus/svc.c struct gb_connection *connection = operation->connection; connection 914 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 946 drivers/greybus/svc.c struct gb_connection *connection = operation->connection; connection 947 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 994 drivers/greybus/svc.c struct gb_connection *connection = operation->connection; connection 995 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 1022 drivers/greybus/svc.c struct gb_connection *connection = operation->connection; connection 1023 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 1053 drivers/greybus/svc.c struct gb_connection *connection = operation->connection; connection 1054 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 1087 drivers/greybus/svc.c svc = gb_connection_get_data(operation->connection); connection 1116 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(operation->connection); connection 1135 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(op->connection); connection 1153 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(op->connection); connection 1172 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(op->connection); connection 1191 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(op->connection); connection 1205 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(op->connection); connection 1223 drivers/greybus/svc.c struct gb_connection *connection = op->connection; connection 1224 drivers/greybus/svc.c struct gb_svc *svc = gb_connection_get_data(connection); connection 1290 drivers/greybus/svc.c if (svc->connection) connection 1291 drivers/greybus/svc.c gb_connection_destroy(svc->connection); connection 1329 drivers/greybus/svc.c svc->connection = gb_connection_create_static(hd, GB_SVC_CPORT_ID, connection 1331 drivers/greybus/svc.c if (IS_ERR(svc->connection)) { connection 1333 drivers/greybus/svc.c PTR_ERR(svc->connection)); connection 1337 drivers/greybus/svc.c gb_connection_set_data(svc->connection, svc); connection 1355 drivers/greybus/svc.c ret = gb_connection_enable(svc->connection); connection 1376 drivers/greybus/svc.c gb_connection_disable_rx(svc->connection); connection 1391 drivers/greybus/svc.c gb_connection_disable(svc->connection); connection 602 drivers/i2c/i2c-core-acpi.c ret = acpi_buffer_to_resource(info->connection, info->length, &ares); connection 213 drivers/net/plip/plip.c enum plip_connection_state connection; connection 369 drivers/net/plip/plip.c f = connection_state_table[nl->connection]; connection 410 drivers/net/plip/plip.c if (nl->connection == PLIP_CN_SEND) { connection 427 drivers/net/plip/plip.c } else if (nl->connection == PLIP_CN_RECEIVE) { connection 462 drivers/net/plip/plip.c nl->connection = PLIP_CN_ERROR; connection 606 drivers/net/plip/plip.c nl->connection = PLIP_CN_SEND; connection 683 drivers/net/plip/plip.c nl->connection = PLIP_CN_SEND; connection 690 drivers/net/plip/plip.c nl->connection = PLIP_CN_NONE; connection 775 drivers/net/plip/plip.c if (nl->connection == PLIP_CN_RECEIVE) { connection 786 drivers/net/plip/plip.c if (nl->connection == PLIP_CN_RECEIVE) { connection 857 drivers/net/plip/plip.c nl->connection = PLIP_CN_CLOSING; connection 872 drivers/net/plip/plip.c if (nl->connection == PLIP_CN_CLOSING) { connection 873 drivers/net/plip/plip.c nl->connection = PLIP_CN_NONE; connection 895 drivers/net/plip/plip.c nl->connection = PLIP_CN_NONE; connection 935 drivers/net/plip/plip.c switch (nl->connection) { connection 942 drivers/net/plip/plip.c nl->connection = PLIP_CN_RECEIVE; connection 992 drivers/net/plip/plip.c if (nl->connection == PLIP_CN_NONE) { connection 993 drivers/net/plip/plip.c nl->connection = PLIP_CN_SEND; connection 1086 drivers/net/plip/plip.c nl->connection = PLIP_CN_NONE; connection 1140 drivers/net/plip/plip.c nl->connection = PLIP_CN_NONE; connection 1171 drivers/net/plip/plip.c if (nl->connection != PLIP_CN_NONE) { connection 2069 drivers/s390/net/netiucv.c static DRIVER_ATTR_WO(connection); connection 12 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_set_config(struct gb_connection *connection, connection 24 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 29 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_register_cport(struct gb_connection *connection, connection 41 drivers/staging/greybus/audio_apbridgea.c ret = gb_pm_runtime_get_sync(connection->bundle); connection 45 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 50 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_unregister_cport(struct gb_connection *connection, connection 62 drivers/staging/greybus/audio_apbridgea.c ret = gb_hd_output(connection->hd, &req, sizeof(req), connection 65 drivers/staging/greybus/audio_apbridgea.c gb_pm_runtime_put_autosuspend(connection->bundle); connection 71 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_set_tx_data_size(struct gb_connection *connection, connection 80 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 85 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_prepare_tx(struct gb_connection *connection, connection 93 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 98 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_start_tx(struct gb_connection *connection, connection 107 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 112 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_stop_tx(struct gb_connection *connection, __u16 i2s_port) connection 119 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 124 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_shutdown_tx(struct gb_connection *connection, connection 132 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 137 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_set_rx_data_size(struct gb_connection *connection, connection 146 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 151 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_prepare_rx(struct gb_connection *connection, connection 159 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 164 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_start_rx(struct gb_connection *connection, connection 172 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 177 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_stop_rx(struct gb_connection *connection, __u16 i2s_port) connection 184 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 189 drivers/staging/greybus/audio_apbridgea.c int gb_audio_apbridgea_shutdown_rx(struct gb_connection *connection, connection 197 drivers/staging/greybus/audio_apbridgea.c return gb_hd_output(connection->hd, &req, sizeof(req), connection 71 drivers/staging/greybus/audio_codec.c cportid = data->connection->hd_cport_id; connection 72 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_register_cport(data->connection, connection 91 drivers/staging/greybus/audio_codec.c data_cport = data->connection->intf_cport_id; connection 106 drivers/staging/greybus/audio_codec.c data_cport = data->connection->intf_cport_id; connection 146 drivers/staging/greybus/audio_codec.c data_cport = data->connection->intf_cport_id; connection 161 drivers/staging/greybus/audio_codec.c cportid = data->connection->hd_cport_id; connection 162 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_unregister_cport(data->connection, connection 206 drivers/staging/greybus/audio_codec.c cportid = data->connection->hd_cport_id; connection 207 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_register_cport(data->connection, connection 226 drivers/staging/greybus/audio_codec.c data_cport = data->connection->intf_cport_id; connection 241 drivers/staging/greybus/audio_codec.c data_cport = data->connection->intf_cport_id; connection 281 drivers/staging/greybus/audio_codec.c data_cport = data->connection->intf_cport_id; connection 296 drivers/staging/greybus/audio_codec.c cportid = data->connection->hd_cport_id; connection 297 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_unregister_cport(data->connection, connection 485 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_set_config(data->connection, 0, connection 559 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_set_tx_data_size(data->connection, 0, connection 563 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_set_rx_data_size(data->connection, 0, connection 635 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_prepare_tx(data->connection, connection 638 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_start_tx(data->connection, connection 642 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_prepare_rx(data->connection, connection 645 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_start_rx(data->connection, connection 649 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_stop_tx(data->connection, 0); connection 651 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_shutdown_tx(data->connection, connection 655 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_stop_rx(data->connection, 0); connection 657 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_shutdown_rx(data->connection, connection 871 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_stop_tx(data->connection, 0); connection 874 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_shutdown_tx(data->connection, connection 880 drivers/staging/greybus/audio_codec.c cportid = data->connection->hd_cport_id; connection 881 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_unregister_cport(data->connection, connection 893 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_stop_rx(data->connection, 0); connection 896 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_shutdown_rx(data->connection, connection 902 drivers/staging/greybus/audio_codec.c cportid = data->connection->hd_cport_id; connection 903 drivers/staging/greybus/audio_codec.c ret = gb_audio_apbridgea_unregister_cport(data->connection, connection 94 drivers/staging/greybus/audio_codec.h struct gb_connection *connection; connection 174 drivers/staging/greybus/audio_codec.h int gb_audio_gb_get_topology(struct gb_connection *connection, connection 176 drivers/staging/greybus/audio_codec.h int gb_audio_gb_get_control(struct gb_connection *connection, connection 179 drivers/staging/greybus/audio_codec.h int gb_audio_gb_set_control(struct gb_connection *connection, connection 182 drivers/staging/greybus/audio_codec.h int gb_audio_gb_enable_widget(struct gb_connection *connection, connection 184 drivers/staging/greybus/audio_codec.h int gb_audio_gb_disable_widget(struct gb_connection *connection, connection 186 drivers/staging/greybus/audio_codec.h int gb_audio_gb_get_pcm(struct gb_connection *connection, connection 190 drivers/staging/greybus/audio_codec.h int gb_audio_gb_set_pcm(struct gb_connection *connection, connection 194 drivers/staging/greybus/audio_codec.h int gb_audio_gb_set_tx_data_size(struct gb_connection *connection, connection 196 drivers/staging/greybus/audio_codec.h int gb_audio_gb_activate_tx(struct gb_connection *connection, connection 198 drivers/staging/greybus/audio_codec.h int gb_audio_gb_deactivate_tx(struct gb_connection *connection, connection 200 drivers/staging/greybus/audio_codec.h int gb_audio_gb_set_rx_data_size(struct gb_connection *connection, connection 202 drivers/staging/greybus/audio_codec.h int gb_audio_gb_activate_rx(struct gb_connection *connection, connection 204 drivers/staging/greybus/audio_codec.h int gb_audio_gb_deactivate_rx(struct gb_connection *connection, connection 206 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_set_config(struct gb_connection *connection, connection 209 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_register_cport(struct gb_connection *connection, connection 212 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_unregister_cport(struct gb_connection *connection, connection 215 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_set_tx_data_size(struct gb_connection *connection, connection 217 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_prepare_tx(struct gb_connection *connection, connection 219 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_start_tx(struct gb_connection *connection, connection 221 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_stop_tx(struct gb_connection *connection, connection 223 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_shutdown_tx(struct gb_connection *connection, connection 225 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_set_rx_data_size(struct gb_connection *connection, connection 227 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_prepare_rx(struct gb_connection *connection, connection 229 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_start_rx(struct gb_connection *connection, connection 231 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_stop_rx(struct gb_connection *connection, connection 233 drivers/staging/greybus/audio_codec.h int gb_audio_apbridgea_shutdown_rx(struct gb_connection *connection, connection 12 drivers/staging/greybus/audio_gb.c int gb_audio_gb_get_topology(struct gb_connection *connection, connection 20 drivers/staging/greybus/audio_gb.c ret = gb_operation_sync(connection, GB_AUDIO_TYPE_GET_TOPOLOGY_SIZE, connection 33 drivers/staging/greybus/audio_gb.c ret = gb_operation_sync(connection, GB_AUDIO_TYPE_GET_TOPOLOGY, NULL, 0, connection 46 drivers/staging/greybus/audio_gb.c int gb_audio_gb_get_control(struct gb_connection *connection, connection 57 drivers/staging/greybus/audio_gb.c ret = gb_operation_sync(connection, GB_AUDIO_TYPE_GET_CONTROL, connection 68 drivers/staging/greybus/audio_gb.c int gb_audio_gb_set_control(struct gb_connection *connection, connection 78 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_SET_CONTROL, connection 83 drivers/staging/greybus/audio_gb.c int gb_audio_gb_enable_widget(struct gb_connection *connection, connection 90 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_ENABLE_WIDGET, connection 95 drivers/staging/greybus/audio_gb.c int gb_audio_gb_disable_widget(struct gb_connection *connection, connection 102 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_DISABLE_WIDGET, connection 107 drivers/staging/greybus/audio_gb.c int gb_audio_gb_get_pcm(struct gb_connection *connection, u16 data_cport, connection 117 drivers/staging/greybus/audio_gb.c ret = gb_operation_sync(connection, GB_AUDIO_TYPE_GET_PCM, connection 131 drivers/staging/greybus/audio_gb.c int gb_audio_gb_set_pcm(struct gb_connection *connection, u16 data_cport, connection 143 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_SET_PCM, connection 148 drivers/staging/greybus/audio_gb.c int gb_audio_gb_set_tx_data_size(struct gb_connection *connection, connection 156 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_SET_TX_DATA_SIZE, connection 161 drivers/staging/greybus/audio_gb.c int gb_audio_gb_activate_tx(struct gb_connection *connection, connection 168 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_ACTIVATE_TX, connection 173 drivers/staging/greybus/audio_gb.c int gb_audio_gb_deactivate_tx(struct gb_connection *connection, connection 180 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_DEACTIVATE_TX, connection 185 drivers/staging/greybus/audio_gb.c int gb_audio_gb_set_rx_data_size(struct gb_connection *connection, connection 193 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_SET_RX_DATA_SIZE, connection 198 drivers/staging/greybus/audio_gb.c int gb_audio_gb_activate_rx(struct gb_connection *connection, connection 205 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_ACTIVATE_RX, connection 210 drivers/staging/greybus/audio_gb.c int gb_audio_gb_deactivate_rx(struct gb_connection *connection, connection 217 drivers/staging/greybus/audio_gb.c return gb_operation_sync(connection, GB_AUDIO_TYPE_DEACTIVATE_RX, connection 143 drivers/staging/greybus/audio_module.c struct gb_connection *connection = op->connection; connection 145 drivers/staging/greybus/audio_module.c greybus_get_drvdata(connection->bundle); connection 169 drivers/staging/greybus/audio_module.c dev_err_ratelimited(&connection->bundle->dev, connection 181 drivers/staging/greybus/audio_module.c struct gb_connection *connection; connection 190 drivers/staging/greybus/audio_module.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 192 drivers/staging/greybus/audio_module.c if (IS_ERR(connection)) connection 193 drivers/staging/greybus/audio_module.c return PTR_ERR(connection); connection 196 drivers/staging/greybus/audio_module.c gbmodule->mgmt_connection = connection; connection 205 drivers/staging/greybus/audio_module.c struct gb_connection *connection; connection 212 drivers/staging/greybus/audio_module.c connection = gb_connection_create_offloaded(bundle, connection 215 drivers/staging/greybus/audio_module.c if (IS_ERR(connection)) { connection 217 drivers/staging/greybus/audio_module.c return PTR_ERR(connection); connection 222 drivers/staging/greybus/audio_module.c dai->data_cport = connection->intf_cport_id; connection 223 drivers/staging/greybus/audio_module.c dai->connection = connection; connection 327 drivers/staging/greybus/audio_module.c ret = gb_connection_enable(dai->connection); connection 360 drivers/staging/greybus/audio_module.c gb_connection_disable(dai->connection); connection 372 drivers/staging/greybus/audio_module.c gb_connection_destroy(dai->connection); connection 403 drivers/staging/greybus/audio_module.c gb_connection_disable(dai->connection); connection 404 drivers/staging/greybus/audio_module.c gb_connection_destroy(dai->connection); connection 428 drivers/staging/greybus/audio_module.c gb_connection_disable(dai->connection); connection 449 drivers/staging/greybus/audio_module.c ret = gb_connection_enable(dai->connection); connection 28 drivers/staging/greybus/authentication.c struct gb_connection *connection; connection 86 drivers/staging/greybus/authentication.c struct gb_connection *connection = cap->connection; connection 90 drivers/staging/greybus/authentication.c ret = gb_operation_sync(connection, GB_CAP_TYPE_GET_ENDPOINT_UID, NULL, connection 105 drivers/staging/greybus/authentication.c struct gb_connection *connection = cap->connection; connection 108 drivers/staging/greybus/authentication.c size_t max_size = gb_operation_get_payload_size_max(connection); connection 112 drivers/staging/greybus/authentication.c op = gb_operation_create_flags(connection, connection 144 drivers/staging/greybus/authentication.c struct gb_connection *connection = cap->connection; connection 147 drivers/staging/greybus/authentication.c size_t max_size = gb_operation_get_payload_size_max(connection); connection 151 drivers/staging/greybus/authentication.c op = gb_operation_create_flags(connection, GB_CAP_TYPE_AUTHENTICATE, connection 265 drivers/staging/greybus/authentication.c struct gb_bundle *bundle = cap->connection->bundle; connection 298 drivers/staging/greybus/authentication.c int gb_cap_connection_init(struct gb_connection *connection) connection 303 drivers/staging/greybus/authentication.c if (!connection) connection 310 drivers/staging/greybus/authentication.c cap->parent = &connection->bundle->dev; connection 311 drivers/staging/greybus/authentication.c cap->connection = connection; connection 313 drivers/staging/greybus/authentication.c gb_connection_set_data(connection, cap); connection 320 drivers/staging/greybus/authentication.c ret = gb_connection_enable(connection); connection 353 drivers/staging/greybus/authentication.c gb_connection_disable(connection); connection 364 drivers/staging/greybus/authentication.c void gb_cap_connection_exit(struct gb_connection *connection) connection 368 drivers/staging/greybus/authentication.c if (!connection) connection 371 drivers/staging/greybus/authentication.c cap = gb_connection_get_data(connection); connection 386 drivers/staging/greybus/authentication.c gb_connection_disable(cap->connection); connection 34 drivers/staging/greybus/bootrom.c struct gb_connection *connection; connection 57 drivers/staging/greybus/bootrom.c struct device *dev = &bootrom->connection->bundle->dev; connection 114 drivers/staging/greybus/bootrom.c struct gb_connection *connection = bootrom->connection; connection 115 drivers/staging/greybus/bootrom.c struct gb_interface *intf = connection->bundle->intf; connection 121 drivers/staging/greybus/bootrom.c ret = gb_operation_sync(connection, GB_BOOTROM_TYPE_GET_VID_PID, connection 124 drivers/staging/greybus/bootrom.c dev_err(&connection->bundle->dev, connection 139 drivers/staging/greybus/bootrom.c dev_dbg(&connection->bundle->dev, "Bootrom got vid (0x%x)/pid (0x%x)\n", connection 146 drivers/staging/greybus/bootrom.c struct gb_connection *connection = bootrom->connection; connection 147 drivers/staging/greybus/bootrom.c struct gb_interface *intf = connection->bundle->intf; connection 156 drivers/staging/greybus/bootrom.c dev_err(&connection->bundle->dev, "Invalid boot stage: %u\n", connection 175 drivers/staging/greybus/bootrom.c dev_info(&connection->bundle->dev, "Firmware file '%s' requested\n", connection 179 drivers/staging/greybus/bootrom.c &connection->bundle->dev); connection 181 drivers/staging/greybus/bootrom.c dev_err(&connection->bundle->dev, connection 190 drivers/staging/greybus/bootrom.c struct gb_bootrom *bootrom = gb_connection_get_data(op->connection); connection 194 drivers/staging/greybus/bootrom.c struct device *dev = &op->connection->bundle->dev; connection 243 drivers/staging/greybus/bootrom.c struct gb_bootrom *bootrom = gb_connection_get_data(op->connection); connection 247 drivers/staging/greybus/bootrom.c struct device *dev = &op->connection->bundle->dev; connection 313 drivers/staging/greybus/bootrom.c struct gb_connection *connection = op->connection; connection 314 drivers/staging/greybus/bootrom.c struct gb_bootrom *bootrom = gb_connection_get_data(connection); connection 316 drivers/staging/greybus/bootrom.c struct device *dev = &connection->bundle->dev; connection 369 drivers/staging/greybus/bootrom.c dev_err(&op->connection->bundle->dev, connection 377 drivers/staging/greybus/bootrom.c struct gb_bundle *bundle = bootrom->connection->bundle; connection 385 drivers/staging/greybus/bootrom.c ret = gb_operation_sync(bootrom->connection, connection 416 drivers/staging/greybus/bootrom.c struct gb_connection *connection; connection 431 drivers/staging/greybus/bootrom.c connection = gb_connection_create(bundle, connection 434 drivers/staging/greybus/bootrom.c if (IS_ERR(connection)) { connection 435 drivers/staging/greybus/bootrom.c ret = PTR_ERR(connection); connection 439 drivers/staging/greybus/bootrom.c gb_connection_set_data(connection, bootrom); connection 441 drivers/staging/greybus/bootrom.c bootrom->connection = connection; connection 447 drivers/staging/greybus/bootrom.c ret = gb_connection_enable_tx(connection); connection 457 drivers/staging/greybus/bootrom.c ret = gb_connection_enable(connection); connection 466 drivers/staging/greybus/bootrom.c ret = gb_operation_sync(connection, GB_BOOTROM_TYPE_AP_READY, NULL, 0, connection 469 drivers/staging/greybus/bootrom.c dev_err(&connection->bundle->dev, connection 481 drivers/staging/greybus/bootrom.c gb_connection_disable(connection); connection 483 drivers/staging/greybus/bootrom.c gb_connection_destroy(connection); connection 496 drivers/staging/greybus/bootrom.c gb_connection_disable(bootrom->connection); connection 509 drivers/staging/greybus/bootrom.c gb_connection_destroy(bootrom->connection); connection 52 drivers/staging/greybus/camera.c struct gb_connection *connection; connection 187 drivers/staging/greybus/camera.c static int gb_camera_operation_sync_flags(struct gb_connection *connection, connection 195 drivers/staging/greybus/camera.c operation = gb_operation_create_flags(connection, type, request_size, connection 206 drivers/staging/greybus/camera.c dev_err(&connection->hd->dev, connection 208 drivers/staging/greybus/camera.c connection->name, type, ret); connection 308 drivers/staging/greybus/camera.c struct gb_svc *svc = gcam->connection->hd->svc; connection 338 drivers/staging/greybus/camera.c struct gb_interface *intf = gcam->connection->intf; connection 339 drivers/staging/greybus/camera.c struct gb_svc *svc = gcam->connection->hd->svc; connection 435 drivers/staging/greybus/camera.c ret = gb_hd_output(gcam->connection->hd, &csi_cfg, connection 469 drivers/staging/greybus/camera.c ret = gb_hd_output(gcam->connection->hd, &csi_cfg, connection 500 drivers/staging/greybus/camera.c if (!gcam->connection) { connection 505 drivers/staging/greybus/camera.c ret = gb_camera_operation_sync_flags(gcam->connection, connection 568 drivers/staging/greybus/camera.c if (!gcam->connection) { connection 573 drivers/staging/greybus/camera.c ret = gb_camera_operation_sync_flags(gcam->connection, connection 632 drivers/staging/greybus/camera.c gb_operation_sync(gcam->connection, connection 678 drivers/staging/greybus/camera.c if (!gcam->connection) { connection 683 drivers/staging/greybus/camera.c ret = gb_operation_sync(gcam->connection, GB_CAMERA_TYPE_CAPTURE, connection 700 drivers/staging/greybus/camera.c if (!gcam->connection) { connection 705 drivers/staging/greybus/camera.c ret = gb_operation_sync(gcam->connection, GB_CAMERA_TYPE_FLUSH, NULL, 0, connection 722 drivers/staging/greybus/camera.c struct gb_camera *gcam = gb_connection_get_data(op->connection); connection 1166 drivers/staging/greybus/camera.c struct gb_connection *connection = gcam->connection; connection 1173 drivers/staging/greybus/camera.c snprintf(dirname, 27, "camera-%u.%u", connection->intf->interface_id, connection 1220 drivers/staging/greybus/camera.c if (gcam->connection) { connection 1221 drivers/staging/greybus/camera.c gb_connection_disable(gcam->connection); connection 1222 drivers/staging/greybus/camera.c gb_connection_destroy(gcam->connection); connection 1223 drivers/staging/greybus/camera.c gcam->connection = NULL; connection 1287 drivers/staging/greybus/camera.c gcam->connection = conn; connection 1300 drivers/staging/greybus/camera.c gcam->module.interface_id = gcam->connection->intf->interface_id; connection 1345 drivers/staging/greybus/camera.c gb_connection_disable(gcam->connection); connection 1356 drivers/staging/greybus/camera.c ret = gb_connection_enable(gcam->connection); connection 27 drivers/staging/greybus/firmware.h int gb_fw_mgmt_connection_init(struct gb_connection *connection); connection 28 drivers/staging/greybus/firmware.h void gb_fw_mgmt_connection_exit(struct gb_connection *connection); connection 32 drivers/staging/greybus/firmware.h int gb_fw_download_connection_init(struct gb_connection *connection); connection 33 drivers/staging/greybus/firmware.h void gb_fw_download_connection_exit(struct gb_connection *connection); connection 38 drivers/staging/greybus/firmware.h int gb_cap_connection_init(struct gb_connection *connection); connection 39 drivers/staging/greybus/firmware.h void gb_cap_connection_exit(struct gb_connection *connection); connection 31 drivers/staging/greybus/fw-core.c static int gb_fw_spi_connection_init(struct gb_connection *connection) connection 35 drivers/staging/greybus/fw-core.c if (!connection) connection 38 drivers/staging/greybus/fw-core.c ret = gb_connection_enable(connection); connection 42 drivers/staging/greybus/fw-core.c ret = gb_spilib_master_init(connection, &connection->bundle->dev, connection 45 drivers/staging/greybus/fw-core.c gb_connection_disable(connection); connection 52 drivers/staging/greybus/fw-core.c static void gb_fw_spi_connection_exit(struct gb_connection *connection) connection 54 drivers/staging/greybus/fw-core.c if (!connection) connection 57 drivers/staging/greybus/fw-core.c gb_spilib_master_exit(connection); connection 58 drivers/staging/greybus/fw-core.c gb_connection_disable(connection); connection 65 drivers/staging/greybus/fw-core.c struct gb_connection *connection; connection 91 drivers/staging/greybus/fw-core.c connection = gb_connection_create(bundle, cport_id, connection 93 drivers/staging/greybus/fw-core.c if (IS_ERR(connection)) { connection 94 drivers/staging/greybus/fw-core.c ret = PTR_ERR(connection); connection 101 drivers/staging/greybus/fw-core.c fw_core->mgmt_connection = connection; connection 112 drivers/staging/greybus/fw-core.c connection = gb_connection_create(bundle, cport_id, connection 114 drivers/staging/greybus/fw-core.c if (IS_ERR(connection)) { connection 116 drivers/staging/greybus/fw-core.c PTR_ERR(connection)); connection 118 drivers/staging/greybus/fw-core.c fw_core->download_connection = connection; connection 131 drivers/staging/greybus/fw-core.c connection = gb_connection_create(bundle, cport_id, connection 133 drivers/staging/greybus/fw-core.c if (IS_ERR(connection)) { connection 135 drivers/staging/greybus/fw-core.c PTR_ERR(connection)); connection 137 drivers/staging/greybus/fw-core.c fw_core->spi_connection = connection; connection 149 drivers/staging/greybus/fw-core.c connection = gb_connection_create(bundle, cport_id, connection 151 drivers/staging/greybus/fw-core.c if (IS_ERR(connection)) { connection 153 drivers/staging/greybus/fw-core.c PTR_ERR(connection)); connection 155 drivers/staging/greybus/fw-core.c fw_core->cap_connection = connection; connection 38 drivers/staging/greybus/fw-download.c struct gb_connection *connection; connection 165 drivers/staging/greybus/fw-download.c struct gb_interface *intf = fw_download->connection->bundle->intf; connection 224 drivers/staging/greybus/fw-download.c struct gb_connection *connection = op->connection; connection 225 drivers/staging/greybus/fw-download.c struct fw_download *fw_download = gb_connection_get_data(connection); connection 271 drivers/staging/greybus/fw-download.c struct gb_connection *connection = op->connection; connection 272 drivers/staging/greybus/fw-download.c struct fw_download *fw_download = gb_connection_get_data(connection); connection 354 drivers/staging/greybus/fw-download.c struct gb_connection *connection = op->connection; connection 355 drivers/staging/greybus/fw-download.c struct fw_download *fw_download = gb_connection_get_data(connection); connection 399 drivers/staging/greybus/fw-download.c dev_err(&op->connection->bundle->dev, connection 405 drivers/staging/greybus/fw-download.c int gb_fw_download_connection_init(struct gb_connection *connection) connection 410 drivers/staging/greybus/fw-download.c if (!connection) connection 417 drivers/staging/greybus/fw-download.c fw_download->parent = &connection->bundle->dev; connection 420 drivers/staging/greybus/fw-download.c gb_connection_set_data(connection, fw_download); connection 421 drivers/staging/greybus/fw-download.c fw_download->connection = connection; connection 424 drivers/staging/greybus/fw-download.c ret = gb_connection_enable(connection); connection 437 drivers/staging/greybus/fw-download.c void gb_fw_download_connection_exit(struct gb_connection *connection) connection 442 drivers/staging/greybus/fw-download.c if (!connection) connection 445 drivers/staging/greybus/fw-download.c fw_download = gb_connection_get_data(connection); connection 446 drivers/staging/greybus/fw-download.c gb_connection_disable(fw_download->connection); connection 25 drivers/staging/greybus/fw-management.c struct gb_connection *connection; connection 107 drivers/staging/greybus/fw-management.c struct gb_connection *connection = fw_mgmt->connection; connection 111 drivers/staging/greybus/fw-management.c ret = gb_operation_sync(connection, connection 176 drivers/staging/greybus/fw-management.c ret = gb_operation_sync(fw_mgmt->connection, connection 194 drivers/staging/greybus/fw-management.c struct gb_connection *connection = op->connection; connection 195 drivers/staging/greybus/fw-management.c struct fw_mgmt *fw_mgmt = gb_connection_get_data(connection); connection 245 drivers/staging/greybus/fw-management.c struct gb_connection *connection = fw_mgmt->connection; connection 262 drivers/staging/greybus/fw-management.c ret = gb_operation_sync(connection, connection 326 drivers/staging/greybus/fw-management.c ret = gb_operation_sync(fw_mgmt->connection, connection 344 drivers/staging/greybus/fw-management.c struct gb_connection *connection = op->connection; connection 345 drivers/staging/greybus/fw-management.c struct fw_mgmt *fw_mgmt = gb_connection_get_data(connection); connection 518 drivers/staging/greybus/fw-management.c ret = gb_interface_request_mode_switch(fw_mgmt->connection->intf); connection 536 drivers/staging/greybus/fw-management.c struct gb_bundle *bundle = fw_mgmt->connection->bundle; connection 581 drivers/staging/greybus/fw-management.c dev_err(&op->connection->bundle->dev, connection 587 drivers/staging/greybus/fw-management.c int gb_fw_mgmt_connection_init(struct gb_connection *connection) connection 592 drivers/staging/greybus/fw-management.c if (!connection) connection 599 drivers/staging/greybus/fw-management.c fw_mgmt->parent = &connection->bundle->dev; connection 601 drivers/staging/greybus/fw-management.c fw_mgmt->connection = connection; connection 603 drivers/staging/greybus/fw-management.c gb_connection_set_data(connection, fw_mgmt); connection 613 drivers/staging/greybus/fw-management.c ret = gb_connection_enable(connection); connection 647 drivers/staging/greybus/fw-management.c gb_connection_disable(connection); connection 658 drivers/staging/greybus/fw-management.c void gb_fw_mgmt_connection_exit(struct gb_connection *connection) connection 662 drivers/staging/greybus/fw-management.c if (!connection) connection 665 drivers/staging/greybus/fw-management.c fw_mgmt = gb_connection_get_data(connection); connection 680 drivers/staging/greybus/fw-management.c gb_connection_disable(fw_mgmt->connection); connection 36 drivers/staging/greybus/gpio.c struct gb_connection *connection; connection 53 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_LINE_COUNT, connection 71 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_ACTIVATE, connection 92 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_DEACTIVATE, connection 115 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_GET_DIRECTION, connection 137 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_DIRECTION_IN, connection 152 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_DIRECTION_OUT, connection 169 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_GET_VALUE, connection 201 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_VALUE, connection 219 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_DEBOUNCE, connection 233 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, connection 247 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, connection 264 drivers/staging/greybus/gpio.c ret = gb_operation_sync(ggc->connection, connection 361 drivers/staging/greybus/gpio.c struct gb_connection *connection = op->connection; connection 362 drivers/staging/greybus/gpio.c struct gb_gpio_controller *ggc = gb_connection_get_data(connection); connection 507 drivers/staging/greybus/gpio.c struct gb_connection *connection; connection 517 drivers/staging/greybus/gpio.c connection = connection 521 drivers/staging/greybus/gpio.c if (IS_ERR(connection)) { connection 522 drivers/staging/greybus/gpio.c ret = PTR_ERR(connection); connection 526 drivers/staging/greybus/gpio.c ggc->connection = connection; connection 527 drivers/staging/greybus/gpio.c gb_connection_set_data(connection, ggc); connection 531 drivers/staging/greybus/gpio.c ret = gb_connection_enable_tx(connection); connection 567 drivers/staging/greybus/gpio.c ret = gb_connection_enable(connection); connection 592 drivers/staging/greybus/gpio.c gb_connection_disable(connection); connection 594 drivers/staging/greybus/gpio.c gb_connection_destroy(connection); connection 603 drivers/staging/greybus/gpio.c struct gb_connection *connection = ggc->connection; connection 610 drivers/staging/greybus/gpio.c gb_connection_disable_rx(connection); connection 612 drivers/staging/greybus/gpio.c gb_connection_disable(connection); connection 613 drivers/staging/greybus/gpio.c gb_connection_destroy(connection); connection 20 drivers/staging/greybus/hid.c struct gb_connection *connection; connection 38 drivers/staging/greybus/hid.c return gb_operation_sync(ghid->connection, GB_HID_TYPE_GET_DESC, NULL, connection 50 drivers/staging/greybus/hid.c ret = gb_operation_sync(ghid->connection, GB_HID_TYPE_GET_REPORT_DESC, connection 67 drivers/staging/greybus/hid.c ret = gb_operation_sync(ghid->connection, type, NULL, 0, NULL, 0); connection 87 drivers/staging/greybus/hid.c ret = gb_operation_sync(ghid->connection, GB_HID_TYPE_GET_REPORT, connection 106 drivers/staging/greybus/hid.c operation = gb_operation_create(ghid->connection, connection 121 drivers/staging/greybus/hid.c dev_err(&operation->connection->bundle->dev, connection 135 drivers/staging/greybus/hid.c struct gb_connection *connection = op->connection; connection 136 drivers/staging/greybus/hid.c struct gb_hid *ghid = gb_connection_get_data(connection); connection 140 drivers/staging/greybus/hid.c dev_err(&connection->bundle->dev, connection 366 drivers/staging/greybus/hid.c dev_err(&ghid->connection->bundle->dev, connection 411 drivers/staging/greybus/hid.c hid->dev.parent = &ghid->connection->bundle->dev; connection 416 drivers/staging/greybus/hid.c dev_name(&ghid->connection->bundle->dev), connection 426 drivers/staging/greybus/hid.c struct gb_connection *connection; connection 442 drivers/staging/greybus/hid.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 444 drivers/staging/greybus/hid.c if (IS_ERR(connection)) { connection 445 drivers/staging/greybus/hid.c ret = PTR_ERR(connection); connection 449 drivers/staging/greybus/hid.c gb_connection_set_data(connection, ghid); connection 450 drivers/staging/greybus/hid.c ghid->connection = connection; connection 463 drivers/staging/greybus/hid.c ret = gb_connection_enable(connection); connection 482 drivers/staging/greybus/hid.c gb_connection_disable(connection); connection 486 drivers/staging/greybus/hid.c gb_connection_destroy(connection); connection 501 drivers/staging/greybus/hid.c gb_connection_disable(ghid->connection); connection 502 drivers/staging/greybus/hid.c gb_connection_destroy(ghid->connection); connection 18 drivers/staging/greybus/i2c.c struct gb_connection *connection; connection 47 drivers/staging/greybus/i2c.c ret = gb_operation_sync(gb_i2c_dev->connection, connection 78 drivers/staging/greybus/i2c.c gb_i2c_operation_create(struct gb_connection *connection, connection 81 drivers/staging/greybus/i2c.c struct gb_i2c_device *gb_i2c_dev = gb_connection_get_data(connection); connection 116 drivers/staging/greybus/i2c.c operation = gb_operation_create(connection, GB_I2C_TYPE_TRANSFER, connection 176 drivers/staging/greybus/i2c.c struct gb_connection *connection = gb_i2c_dev->connection; connection 181 drivers/staging/greybus/i2c.c operation = gb_i2c_operation_create(connection, msgs, msg_count); connection 248 drivers/staging/greybus/i2c.c struct gb_connection *connection; connection 257 drivers/staging/greybus/i2c.c connection = connection 261 drivers/staging/greybus/i2c.c if (IS_ERR(connection)) { connection 262 drivers/staging/greybus/i2c.c ret = PTR_ERR(connection); connection 266 drivers/staging/greybus/i2c.c gb_i2c_dev->connection = connection; connection 267 drivers/staging/greybus/i2c.c gb_connection_set_data(connection, gb_i2c_dev); connection 271 drivers/staging/greybus/i2c.c ret = gb_connection_enable(connection); connection 298 drivers/staging/greybus/i2c.c gb_connection_disable(connection); connection 300 drivers/staging/greybus/i2c.c gb_connection_destroy(connection); connection 310 drivers/staging/greybus/i2c.c struct gb_connection *connection = gb_i2c_dev->connection; connection 318 drivers/staging/greybus/i2c.c gb_connection_disable(connection); connection 319 drivers/staging/greybus/i2c.c gb_connection_destroy(connection); connection 63 drivers/staging/greybus/light.c struct gb_connection *connection; connection 73 drivers/staging/greybus/light.c return channel->light->glights->connection; connection 78 drivers/staging/greybus/light.c return light->glights->connection; connection 117 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 118 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 133 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_SET_FLASH_INTENSITY, connection 320 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 321 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 336 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_SET_FADE, connection 346 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 347 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 361 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_SET_COLOR, connection 372 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 373 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 388 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_SET_BRIGHTNESS, connection 454 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 455 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 478 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_SET_BLINK, &req, connection 533 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_light(light); connection 534 drivers/staging/greybus/light.c struct device *dev = &connection->bundle->dev; connection 593 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_light(light); connection 595 drivers/staging/greybus/light.c dev_err(&connection->bundle->dev, "no support for v4l2 subdevices\n"); connection 635 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 636 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 651 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_SET_FLASH_STROBE, connection 676 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 677 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 692 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_SET_FLASH_TIMEOUT, connection 707 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 708 drivers/staging/greybus/light.c struct gb_bundle *bundle = connection->bundle; connection 723 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_GET_FLASH_FAULT, connection 769 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 806 drivers/staging/greybus/light.c ret = led_classdev_flash_register(&connection->bundle->dev, fled); connection 827 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 836 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, connection 870 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 872 drivers/staging/greybus/light.c dev_err(&connection->bundle->dev, "no support for flash devices\n"); connection 889 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_channel(channel); connection 893 drivers/staging/greybus/light.c ret = led_classdev_register(&connection->bundle->dev, cdev); connection 949 drivers/staging/greybus/light.c struct gb_connection *connection = get_conn_from_light(light); connection 957 drivers/staging/greybus/light.c ret = gb_operation_sync(connection, GB_LIGHTS_TYPE_GET_CHANNEL_CONFIG, connection 1016 drivers/staging/greybus/light.c ret = gb_operation_sync(glights->connection, connection 1143 drivers/staging/greybus/light.c ret = gb_operation_sync(glights->connection, GB_LIGHTS_TYPE_GET_LIGHTS, connection 1158 drivers/staging/greybus/light.c struct gb_connection *connection = glights->connection; connection 1177 drivers/staging/greybus/light.c dev_err(&connection->bundle->dev, connection 1190 drivers/staging/greybus/light.c struct gb_connection *connection = glights->connection; connection 1198 drivers/staging/greybus/light.c dev_err(&connection->bundle->dev, connection 1210 drivers/staging/greybus/light.c struct gb_connection *connection = op->connection; connection 1211 drivers/staging/greybus/light.c struct device *dev = &connection->bundle->dev; connection 1212 drivers/staging/greybus/light.c struct gb_lights *glights = gb_connection_get_data(connection); connection 1265 drivers/staging/greybus/light.c struct gb_connection *connection; connection 1282 drivers/staging/greybus/light.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 1284 drivers/staging/greybus/light.c if (IS_ERR(connection)) { connection 1285 drivers/staging/greybus/light.c ret = PTR_ERR(connection); connection 1289 drivers/staging/greybus/light.c glights->connection = connection; connection 1290 drivers/staging/greybus/light.c gb_connection_set_data(connection, glights); connection 1295 drivers/staging/greybus/light.c ret = gb_connection_enable_tx(connection); connection 1308 drivers/staging/greybus/light.c ret = gb_connection_enable(connection); connection 1322 drivers/staging/greybus/light.c gb_connection_disable(connection); connection 1324 drivers/staging/greybus/light.c gb_connection_destroy(connection); connection 1337 drivers/staging/greybus/light.c gb_connection_disable(glights->connection); connection 1338 drivers/staging/greybus/light.c gb_connection_destroy(glights->connection); connection 15 drivers/staging/greybus/log.c struct gb_connection *connection; connection 20 drivers/staging/greybus/log.c struct gb_connection *connection = op->connection; connection 21 drivers/staging/greybus/log.c struct device *dev = &connection->bundle->dev; connection 69 drivers/staging/greybus/log.c struct gb_connection *connection; connection 84 drivers/staging/greybus/log.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 86 drivers/staging/greybus/log.c if (IS_ERR(connection)) { connection 87 drivers/staging/greybus/log.c retval = PTR_ERR(connection); connection 91 drivers/staging/greybus/log.c log->connection = connection; connection 94 drivers/staging/greybus/log.c retval = gb_connection_enable(connection); connection 101 drivers/staging/greybus/log.c gb_connection_destroy(connection); connection 110 drivers/staging/greybus/log.c struct gb_connection *connection = log->connection; connection 112 drivers/staging/greybus/log.c gb_connection_disable(connection); connection 113 drivers/staging/greybus/log.c gb_connection_destroy(connection); connection 60 drivers/staging/greybus/loopback.c struct gb_connection *connection; connection 379 drivers/staging/greybus/loopback.c operation = gb_operation_create(gb->connection, type, request_size, connection 389 drivers/staging/greybus/loopback.c dev_err(&gb->connection->bundle->dev, connection 397 drivers/staging/greybus/loopback.c dev_err(&gb->connection->bundle->dev, connection 453 drivers/staging/greybus/loopback.c dev_dbg(&gb->connection->bundle->dev, "complete operation %d\n", connection 478 drivers/staging/greybus/loopback.c operation = gb_operation_create(gb->connection, type, request_size, connection 554 drivers/staging/greybus/loopback.c dev_err(&gb->connection->bundle->dev, connection 608 drivers/staging/greybus/loopback.c dev_err(&gb->connection->bundle->dev, connection 655 drivers/staging/greybus/loopback.c struct gb_connection *connection = operation->connection; connection 658 drivers/staging/greybus/loopback.c struct device *dev = &connection->bundle->dev; connection 843 drivers/staging/greybus/loopback.c struct gb_bundle *bundle = gb->connection->bundle; connection 978 drivers/staging/greybus/loopback.c struct gb_connection *connection; connection 996 drivers/staging/greybus/loopback.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 998 drivers/staging/greybus/loopback.c if (IS_ERR(connection)) { connection 999 drivers/staging/greybus/loopback.c retval = PTR_ERR(connection); connection 1003 drivers/staging/greybus/loopback.c gb->connection = connection; connection 1017 drivers/staging/greybus/loopback.c gb_dev.size_max = gb_operation_get_payload_size_max(connection); connection 1028 drivers/staging/greybus/loopback.c dev_name(&connection->bundle->dev)); connection 1038 drivers/staging/greybus/loopback.c retval = gb_connection_enable(connection); connection 1043 drivers/staging/greybus/loopback.c &connection->bundle->dev, connection 1070 drivers/staging/greybus/loopback.c gb_connection_latency_tag_enable(connection); connection 1081 drivers/staging/greybus/loopback.c gb_connection_disable(connection); connection 1087 drivers/staging/greybus/loopback.c gb_connection_destroy(connection); connection 1104 drivers/staging/greybus/loopback.c gb_connection_disable(gb->connection); connection 1110 drivers/staging/greybus/loopback.c gb_connection_latency_tag_disable(gb->connection); connection 1127 drivers/staging/greybus/loopback.c gb_connection_destroy(gb->connection); connection 50 drivers/staging/greybus/power_supply.c struct gb_connection *connection; connection 312 drivers/staging/greybus/power_supply.c return gbpsy->supplies->connection; connection 361 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 372 drivers/staging/greybus/power_supply.c ret = gb_pm_runtime_get_sync(connection->bundle); connection 374 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, connection 380 drivers/staging/greybus/power_supply.c ret = gb_pm_runtime_put_autosuspend(connection->bundle); connection 382 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, connection 476 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 483 drivers/staging/greybus/power_supply.c ret = gb_operation_sync(connection, connection 508 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 520 drivers/staging/greybus/power_supply.c op = gb_operation_create(connection, connection 541 drivers/staging/greybus/power_supply.c dev_warn(&connection->bundle->dev, connection 592 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 605 drivers/staging/greybus/power_supply.c ret = gb_operation_sync(connection, GB_POWER_SUPPLY_TYPE_GET_PROPERTY, connection 661 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 674 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, "get property %u\n", psp); connection 697 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 704 drivers/staging/greybus/power_supply.c ret = gb_pm_runtime_get_sync(connection->bundle); connection 718 drivers/staging/greybus/power_supply.c gb_pm_runtime_put_autosuspend(connection->bundle); connection 768 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 773 drivers/staging/greybus/power_supply.c ret = gb_pm_runtime_get_sync(connection->bundle); connection 787 drivers/staging/greybus/power_supply.c ret = gb_operation_sync(connection, GB_POWER_SUPPLY_TYPE_SET_PROPERTY, connection 796 drivers/staging/greybus/power_supply.c gb_pm_runtime_put_autosuspend(connection->bundle); connection 819 drivers/staging/greybus/power_supply.c struct gb_connection *connection = get_conn_from_psy(gbpsy); connection 832 drivers/staging/greybus/power_supply.c gbpsy->psy = power_supply_register(&connection->bundle->dev, connection 878 drivers/staging/greybus/power_supply.c ret = gb_operation_sync(supplies->connection, connection 935 drivers/staging/greybus/power_supply.c struct gb_connection *connection = supplies->connection; connection 957 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, connection 969 drivers/staging/greybus/power_supply.c struct gb_connection *connection = supplies->connection; connection 978 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, connection 990 drivers/staging/greybus/power_supply.c struct gb_connection *connection = op->connection; connection 991 drivers/staging/greybus/power_supply.c struct gb_power_supplies *supplies = gb_connection_get_data(connection); connection 1000 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, connection 1008 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, connection 1019 drivers/staging/greybus/power_supply.c dev_err(&connection->bundle->dev, connection 1056 drivers/staging/greybus/power_supply.c struct gb_connection *connection; connection 1071 drivers/staging/greybus/power_supply.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 1073 drivers/staging/greybus/power_supply.c if (IS_ERR(connection)) { connection 1074 drivers/staging/greybus/power_supply.c ret = PTR_ERR(connection); connection 1078 drivers/staging/greybus/power_supply.c supplies->connection = connection; connection 1079 drivers/staging/greybus/power_supply.c gb_connection_set_data(connection, supplies); connection 1086 drivers/staging/greybus/power_supply.c ret = gb_connection_enable_tx(connection); connection 1095 drivers/staging/greybus/power_supply.c ret = gb_connection_enable(connection); connection 1107 drivers/staging/greybus/power_supply.c gb_connection_disable(connection); connection 1109 drivers/staging/greybus/power_supply.c gb_connection_destroy(connection); connection 1119 drivers/staging/greybus/power_supply.c gb_connection_disable(supplies->connection); connection 1120 drivers/staging/greybus/power_supply.c gb_connection_destroy(supplies->connection); connection 18 drivers/staging/greybus/pwm.c struct gb_connection *connection; connection 33 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_PWM_COUNT, connection 58 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_ACTIVATE, connection 83 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_DEACTIVATE, connection 110 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_CONFIG, connection 136 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_POLARITY, connection 161 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_ENABLE, connection 181 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_DISABLE, connection 250 drivers/staging/greybus/pwm.c struct gb_connection *connection; connection 259 drivers/staging/greybus/pwm.c connection = gb_connection_create(gbphy_dev->bundle, connection 262 drivers/staging/greybus/pwm.c if (IS_ERR(connection)) { connection 263 drivers/staging/greybus/pwm.c ret = PTR_ERR(connection); connection 267 drivers/staging/greybus/pwm.c pwmc->connection = connection; connection 268 drivers/staging/greybus/pwm.c gb_connection_set_data(connection, pwmc); connection 271 drivers/staging/greybus/pwm.c ret = gb_connection_enable(connection); connection 298 drivers/staging/greybus/pwm.c gb_connection_disable(connection); connection 300 drivers/staging/greybus/pwm.c gb_connection_destroy(connection); connection 309 drivers/staging/greybus/pwm.c struct gb_connection *connection = pwmc->connection; connection 317 drivers/staging/greybus/pwm.c gb_connection_disable(connection); connection 318 drivers/staging/greybus/pwm.c gb_connection_destroy(connection); connection 19 drivers/staging/greybus/raw.c struct gb_connection *connection; connection 58 drivers/staging/greybus/raw.c struct device *dev = &raw->connection->bundle->dev; connection 91 drivers/staging/greybus/raw.c struct gb_connection *connection = op->connection; connection 92 drivers/staging/greybus/raw.c struct device *dev = &connection->bundle->dev; connection 93 drivers/staging/greybus/raw.c struct gb_raw *raw = greybus_get_drvdata(connection->bundle); connection 125 drivers/staging/greybus/raw.c struct gb_connection *connection = raw->connection; connection 140 drivers/staging/greybus/raw.c retval = gb_operation_sync(connection, GB_RAW_TYPE_SEND, connection 152 drivers/staging/greybus/raw.c struct gb_connection *connection; connection 168 drivers/staging/greybus/raw.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 170 drivers/staging/greybus/raw.c if (IS_ERR(connection)) { connection 171 drivers/staging/greybus/raw.c retval = PTR_ERR(connection); connection 178 drivers/staging/greybus/raw.c raw->connection = connection; connection 190 drivers/staging/greybus/raw.c retval = gb_connection_enable(connection); connection 198 drivers/staging/greybus/raw.c raw->device = device_create(raw_class, &connection->bundle->dev, connection 211 drivers/staging/greybus/raw.c gb_connection_disable(connection); connection 217 drivers/staging/greybus/raw.c gb_connection_destroy(connection); connection 227 drivers/staging/greybus/raw.c struct gb_connection *connection = raw->connection; connection 234 drivers/staging/greybus/raw.c gb_connection_disable(connection); connection 236 drivers/staging/greybus/raw.c gb_connection_destroy(connection); connection 20 drivers/staging/greybus/sdio.c struct gb_connection *connection; connection 127 drivers/staging/greybus/sdio.c ret = gb_operation_sync(host->connection, GB_SDIO_TYPE_GET_CAPABILITIES, connection 136 drivers/staging/greybus/sdio.c data_max = gb_operation_get_payload_size_max(host->connection); connection 207 drivers/staging/greybus/sdio.c struct gb_sdio_host *host = gb_connection_get_data(op->connection); connection 248 drivers/staging/greybus/sdio.c ret = gb_operation_sync(host->connection, GB_SDIO_TYPE_SET_IOS, request, connection 271 drivers/staging/greybus/sdio.c operation = gb_operation_create(host->connection, GB_SDIO_TYPE_TRANSFER, connection 325 drivers/staging/greybus/sdio.c operation = gb_operation_create(host->connection, GB_SDIO_TYPE_TRANSFER, connection 472 drivers/staging/greybus/sdio.c ret = gb_operation_sync(host->connection, GB_SDIO_TYPE_COMMAND, connection 763 drivers/staging/greybus/sdio.c struct gb_connection *connection; connection 772 drivers/staging/greybus/sdio.c connection = gb_connection_create(gbphy_dev->bundle, connection 775 drivers/staging/greybus/sdio.c if (IS_ERR(connection)) { connection 776 drivers/staging/greybus/sdio.c ret = PTR_ERR(connection); connection 784 drivers/staging/greybus/sdio.c host->connection = connection; connection 785 drivers/staging/greybus/sdio.c gb_connection_set_data(connection, host); connection 789 drivers/staging/greybus/sdio.c ret = gb_connection_enable_tx(connection); connection 815 drivers/staging/greybus/sdio.c ret = gb_connection_enable(connection); connection 833 drivers/staging/greybus/sdio.c gb_connection_disable(connection); connection 835 drivers/staging/greybus/sdio.c gb_connection_destroy(connection); connection 845 drivers/staging/greybus/sdio.c struct gb_connection *connection = host->connection; connection 856 drivers/staging/greybus/sdio.c gb_connection_set_data(connection, NULL); connection 861 drivers/staging/greybus/sdio.c gb_connection_disable_rx(connection); connection 863 drivers/staging/greybus/sdio.c gb_connection_disable(connection); connection 864 drivers/staging/greybus/sdio.c gb_connection_destroy(connection); connection 20 drivers/staging/greybus/spi.c struct gb_connection *connection; connection 23 drivers/staging/greybus/spi.c connection = gb_connection_create(gbphy_dev->bundle, connection 26 drivers/staging/greybus/spi.c if (IS_ERR(connection)) connection 27 drivers/staging/greybus/spi.c return PTR_ERR(connection); connection 29 drivers/staging/greybus/spi.c ret = gb_connection_enable(connection); connection 33 drivers/staging/greybus/spi.c ret = gb_spilib_master_init(connection, &gbphy_dev->dev, spilib_ops); connection 37 drivers/staging/greybus/spi.c gb_gbphy_set_data(gbphy_dev, connection); connection 43 drivers/staging/greybus/spi.c gb_connection_disable(connection); connection 45 drivers/staging/greybus/spi.c gb_connection_destroy(connection); connection 52 drivers/staging/greybus/spi.c struct gb_connection *connection = gb_gbphy_get_data(gbphy_dev); connection 59 drivers/staging/greybus/spi.c gb_spilib_master_exit(connection); connection 60 drivers/staging/greybus/spi.c gb_connection_disable(connection); connection 61 drivers/staging/greybus/spi.c gb_connection_destroy(connection); connection 19 drivers/staging/greybus/spilib.c struct gb_connection *connection; connection 47 drivers/staging/greybus/spilib.c return gb_connection_get_data(spi->connection); connection 163 drivers/staging/greybus/spilib.c struct gb_connection *connection, struct spi_message *msg) connection 177 drivers/staging/greybus/spilib.c data_max = gb_operation_get_payload_size_max(connection); connection 232 drivers/staging/greybus/spilib.c operation = gb_operation_create(connection, GB_SPI_TYPE_TRANSFER, connection 327 drivers/staging/greybus/spilib.c struct gb_connection *connection = spi->connection; connection 344 drivers/staging/greybus/spilib.c operation = gb_spi_operation_create(spi, connection, msg); connection 417 drivers/staging/greybus/spilib.c ret = gb_operation_sync(spi->connection, GB_SPI_TYPE_MASTER_CONFIG, connection 449 drivers/staging/greybus/spilib.c ret = gb_operation_sync(spi->connection, GB_SPI_TYPE_DEVICE_CONFIG, connection 481 drivers/staging/greybus/spilib.c int gb_spilib_master_init(struct gb_connection *connection, struct device *dev, connection 497 drivers/staging/greybus/spilib.c spi->connection = connection; connection 498 drivers/staging/greybus/spilib.c gb_connection_set_data(connection, master); connection 558 drivers/staging/greybus/spilib.c void gb_spilib_master_exit(struct gb_connection *connection) connection 560 drivers/staging/greybus/spilib.c struct spi_master *master = gb_connection_get_data(connection); connection 22 drivers/staging/greybus/spilib.h int gb_spilib_master_init(struct gb_connection *connection, connection 24 drivers/staging/greybus/spilib.h void gb_spilib_master_exit(struct gb_connection *connection); connection 56 drivers/staging/greybus/uart.c struct gb_connection *connection; connection 83 drivers/staging/greybus/uart.c struct gb_connection *connection = op->connection; connection 84 drivers/staging/greybus/uart.c struct gb_tty *gb_tty = gb_connection_get_data(connection); connection 139 drivers/staging/greybus/uart.c struct gb_connection *connection = op->connection; connection 140 drivers/staging/greybus/uart.c struct gb_tty *gb_tty = gb_connection_get_data(connection); connection 159 drivers/staging/greybus/uart.c struct gb_connection *connection = op->connection; connection 160 drivers/staging/greybus/uart.c struct gb_tty *gb_tty = gb_connection_get_data(connection); connection 209 drivers/staging/greybus/uart.c struct gb_connection *connection = op->connection; connection 210 drivers/staging/greybus/uart.c struct gb_tty *gb_tty = gb_connection_get_data(connection); connection 265 drivers/staging/greybus/uart.c ret = gb_operation_sync(gb_tty->connection, connection 295 drivers/staging/greybus/uart.c return gb_operation_sync(tty->connection, GB_UART_TYPE_SET_LINE_CODING, connection 304 drivers/staging/greybus/uart.c return gb_operation_sync(gb_tty->connection, connection 320 drivers/staging/greybus/uart.c return gb_operation_sync(gb_tty->connection, GB_UART_TYPE_SEND_BREAK, connection 347 drivers/staging/greybus/uart.c return gb_operation_sync(gb_tty->connection, GB_UART_TYPE_FLUSH_FIFOS, connection 821 drivers/staging/greybus/uart.c struct gb_connection *connection; connection 832 drivers/staging/greybus/uart.c connection = gb_connection_create(gbphy_dev->bundle, connection 835 drivers/staging/greybus/uart.c if (IS_ERR(connection)) { connection 836 drivers/staging/greybus/uart.c retval = PTR_ERR(connection); connection 840 drivers/staging/greybus/uart.c max_payload = gb_operation_get_payload_size_max(connection); connection 886 drivers/staging/greybus/uart.c gb_tty->connection = connection; connection 888 drivers/staging/greybus/uart.c gb_connection_set_data(connection, gb_tty); connection 891 drivers/staging/greybus/uart.c retval = gb_connection_enable_tx(connection); connection 904 drivers/staging/greybus/uart.c retval = gb_connection_enable(connection); connection 919 drivers/staging/greybus/uart.c gb_connection_disable(connection); connection 927 drivers/staging/greybus/uart.c gb_connection_destroy(connection); connection 937 drivers/staging/greybus/uart.c struct gb_connection *connection = gb_tty->connection; connection 957 drivers/staging/greybus/uart.c gb_connection_disable_rx(connection); connection 962 drivers/staging/greybus/uart.c gb_connection_disable(connection); connection 964 drivers/staging/greybus/uart.c gb_connection_destroy(connection); connection 34 drivers/staging/greybus/usb.c struct gb_connection *connection; connection 53 drivers/staging/greybus/usb.c ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_STOP, connection 65 drivers/staging/greybus/usb.c ret = gb_operation_sync(dev->connection, GB_USB_TYPE_HCD_START, connection 111 drivers/staging/greybus/usb.c operation = gb_operation_create(dev->connection, connection 161 drivers/staging/greybus/usb.c struct gb_connection *connection; connection 171 drivers/staging/greybus/usb.c connection = gb_connection_create(gbphy_dev->bundle, connection 174 drivers/staging/greybus/usb.c if (IS_ERR(connection)) { connection 175 drivers/staging/greybus/usb.c retval = PTR_ERR(connection); connection 180 drivers/staging/greybus/usb.c gb_usb_dev->connection = connection; connection 181 drivers/staging/greybus/usb.c gb_connection_set_data(connection, gb_usb_dev); connection 187 drivers/staging/greybus/usb.c retval = gb_connection_enable(connection); connection 210 drivers/staging/greybus/usb.c gb_connection_disable(connection); connection 212 drivers/staging/greybus/usb.c gb_connection_destroy(connection); connection 222 drivers/staging/greybus/usb.c struct gb_connection *connection = gb_usb_dev->connection; connection 226 drivers/staging/greybus/usb.c gb_connection_disable(connection); connection 227 drivers/staging/greybus/usb.c gb_connection_destroy(connection); connection 19 drivers/staging/greybus/vibrator.c struct gb_connection *connection; connection 31 drivers/staging/greybus/vibrator.c struct gb_bundle *bundle = vib->connection->bundle; connection 34 drivers/staging/greybus/vibrator.c ret = gb_operation_sync(vib->connection, GB_VIBRATOR_TYPE_OFF, connection 44 drivers/staging/greybus/vibrator.c struct gb_bundle *bundle = vib->connection->bundle; connection 55 drivers/staging/greybus/vibrator.c ret = gb_operation_sync(vib->connection, GB_VIBRATOR_TYPE_ON, connection 120 drivers/staging/greybus/vibrator.c struct gb_connection *connection; connection 136 drivers/staging/greybus/vibrator.c connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), connection 138 drivers/staging/greybus/vibrator.c if (IS_ERR(connection)) { connection 139 drivers/staging/greybus/vibrator.c retval = PTR_ERR(connection); connection 142 drivers/staging/greybus/vibrator.c gb_connection_set_data(connection, vib); connection 144 drivers/staging/greybus/vibrator.c vib->connection = connection; connection 148 drivers/staging/greybus/vibrator.c retval = gb_connection_enable(connection); connection 179 drivers/staging/greybus/vibrator.c gb_connection_disable(connection); connection 181 drivers/staging/greybus/vibrator.c gb_connection_destroy(connection); connection 202 drivers/staging/greybus/vibrator.c gb_connection_disable(vib->connection); connection 203 drivers/staging/greybus/vibrator.c gb_connection_destroy(vib->connection); connection 4403 drivers/usb/core/hub.c unsigned connection = 0xffff; connection 4413 drivers/usb/core/hub.c (portstatus & USB_PORT_STAT_CONNECTION) == connection) { connection 4415 drivers/usb/core/hub.c (connection == USB_PORT_STAT_CONNECTION)) connection 4421 drivers/usb/core/hub.c connection = portstatus & USB_PORT_STAT_CONNECTION; connection 115 fs/dlm/lowcomms.c int (*rx_action) (struct connection *); /* What to do when active */ connection 116 fs/dlm/lowcomms.c void (*connect_action) (struct connection *); /* What to do to connect */ connection 122 fs/dlm/lowcomms.c struct connection *othercon; connection 126 fs/dlm/lowcomms.c #define sock2con(x) ((struct connection *)(x)->sk_user_data) connection 136 fs/dlm/lowcomms.c struct connection *con; connection 181 fs/dlm/lowcomms.c static struct connection *__find_con(int nodeid) connection 184 fs/dlm/lowcomms.c struct connection *con; connection 199 fs/dlm/lowcomms.c static struct connection *__nodeid2con(int nodeid, gfp_t alloc) connection 201 fs/dlm/lowcomms.c struct connection *con = NULL; connection 224 fs/dlm/lowcomms.c struct connection *zerocon = __find_con(0); connection 235 fs/dlm/lowcomms.c static void foreach_conn(void (*conn_func)(struct connection *c)) connection 239 fs/dlm/lowcomms.c struct connection *con; connection 247 fs/dlm/lowcomms.c static struct connection *nodeid2con(int nodeid, gfp_t allocation) connection 249 fs/dlm/lowcomms.c struct connection *con; connection 412 fs/dlm/lowcomms.c struct connection *con; connection 423 fs/dlm/lowcomms.c struct connection *con; connection 442 fs/dlm/lowcomms.c static inline void lowcomms_connect_sock(struct connection *con) connection 467 fs/dlm/lowcomms.c struct connection *con; connection 481 fs/dlm/lowcomms.c struct connection *con; connection 551 fs/dlm/lowcomms.c static void add_sock(struct socket *sock, struct connection *con) connection 588 fs/dlm/lowcomms.c static void close_connection(struct connection *con, bool and_other, connection 623 fs/dlm/lowcomms.c static int receive_from_sock(struct connection *con) connection 727 fs/dlm/lowcomms.c static int tcp_accept_from_sock(struct connection *con) connection 734 fs/dlm/lowcomms.c struct connection *newcon; connection 735 fs/dlm/lowcomms.c struct connection *addcon; connection 789 fs/dlm/lowcomms.c struct connection *othercon = newcon->othercon; connection 855 fs/dlm/lowcomms.c static int sctp_accept_from_sock(struct connection *con) connection 862 fs/dlm/lowcomms.c struct connection *newcon; connection 863 fs/dlm/lowcomms.c struct connection *addcon; connection 909 fs/dlm/lowcomms.c struct connection *othercon = newcon->othercon; connection 999 fs/dlm/lowcomms.c static int sctp_bind_addrs(struct connection *con, uint16_t port) connection 1031 fs/dlm/lowcomms.c static void sctp_connect_to_sock(struct connection *con) connection 1130 fs/dlm/lowcomms.c static void tcp_connect_to_sock(struct connection *con) connection 1222 fs/dlm/lowcomms.c static struct socket *tcp_create_listen_sock(struct connection *con, connection 1311 fs/dlm/lowcomms.c struct connection *con = nodeid2con(0, GFP_NOFS); connection 1370 fs/dlm/lowcomms.c struct connection *con = nodeid2con(0, GFP_NOFS); connection 1399 fs/dlm/lowcomms.c static struct writequeue_entry *new_writequeue_entry(struct connection *con, connection 1425 fs/dlm/lowcomms.c struct connection *con; connection 1467 fs/dlm/lowcomms.c struct connection *con = e->con; connection 1486 fs/dlm/lowcomms.c static void send_to_sock(struct connection *con) connection 1558 fs/dlm/lowcomms.c static void clean_one_writequeue(struct connection *con) connection 1574 fs/dlm/lowcomms.c struct connection *con; connection 1601 fs/dlm/lowcomms.c struct connection *con = container_of(work, struct connection, rwork); connection 1613 fs/dlm/lowcomms.c struct connection *con = container_of(work, struct connection, swork); connection 1657 fs/dlm/lowcomms.c static void _stop_conn(struct connection *con, bool and_other) connection 1673 fs/dlm/lowcomms.c static void stop_conn(struct connection *con) connection 1678 fs/dlm/lowcomms.c static void free_conn(struct connection *con) connection 1692 fs/dlm/lowcomms.c struct connection *con; connection 1740 fs/dlm/lowcomms.c struct connection *con; connection 1754 fs/dlm/lowcomms.c con_cache = kmem_cache_create("dlm_conn", sizeof(struct connection), connection 1755 fs/dlm/lowcomms.c __alignof__(struct connection), 0, connection 1095 include/acpi/actypes.h u8 *connection; connection 77 include/linux/greybus/connection.h void gb_connection_destroy(struct gb_connection *connection); connection 79 include/linux/greybus/connection.h static inline bool gb_connection_is_static(struct gb_connection *connection) connection 81 include/linux/greybus/connection.h return !connection->intf; connection 84 include/linux/greybus/connection.h int gb_connection_enable(struct gb_connection *connection); connection 85 include/linux/greybus/connection.h int gb_connection_enable_tx(struct gb_connection *connection); connection 86 include/linux/greybus/connection.h void gb_connection_disable_rx(struct gb_connection *connection); connection 87 include/linux/greybus/connection.h void gb_connection_disable(struct gb_connection *connection); connection 88 include/linux/greybus/connection.h void gb_connection_disable_forced(struct gb_connection *connection); connection 90 include/linux/greybus/connection.h void gb_connection_mode_switch_prepare(struct gb_connection *connection); connection 91 include/linux/greybus/connection.h void gb_connection_mode_switch_complete(struct gb_connection *connection); connection 96 include/linux/greybus/connection.h void gb_connection_latency_tag_enable(struct gb_connection *connection); connection 97 include/linux/greybus/connection.h void gb_connection_latency_tag_disable(struct gb_connection *connection); connection 99 include/linux/greybus/connection.h static inline bool gb_connection_e2efc_enabled(struct gb_connection *connection) connection 101 include/linux/greybus/connection.h return !(connection->flags & GB_CONNECTION_FLAG_CSD); connection 105 include/linux/greybus/connection.h gb_connection_flow_control_disabled(struct gb_connection *connection) connection 107 include/linux/greybus/connection.h return connection->flags & GB_CONNECTION_FLAG_NO_FLOWCTRL; connection 110 include/linux/greybus/connection.h static inline bool gb_connection_is_offloaded(struct gb_connection *connection) connection 112 include/linux/greybus/connection.h return connection->flags & GB_CONNECTION_FLAG_OFFLOADED; connection 115 include/linux/greybus/connection.h static inline bool gb_connection_is_control(struct gb_connection *connection) connection 117 include/linux/greybus/connection.h return connection->flags & GB_CONNECTION_FLAG_CONTROL; connection 120 include/linux/greybus/connection.h static inline void *gb_connection_get_data(struct gb_connection *connection) connection 122 include/linux/greybus/connection.h return connection->private; connection 125 include/linux/greybus/connection.h static inline void gb_connection_set_data(struct gb_connection *connection, connection 128 include/linux/greybus/connection.h connection->private = data; connection 19 include/linux/greybus/control.h struct gb_connection *connection; connection 93 include/linux/greybus/operation.h struct gb_connection *connection; connection 139 include/linux/greybus/operation.h void gb_connection_recv(struct gb_connection *connection, connection 144 include/linux/greybus/operation.h size_t gb_operation_get_payload_size_max(struct gb_connection *connection); connection 146 include/linux/greybus/operation.h gb_operation_create_flags(struct gb_connection *connection, connection 152 include/linux/greybus/operation.h gb_operation_create(struct gb_connection *connection, connection 156 include/linux/greybus/operation.h return gb_operation_create_flags(connection, type, request_size, connection 161 include/linux/greybus/operation.h gb_operation_create_core(struct gb_connection *connection, connection 191 include/linux/greybus/operation.h int gb_operation_sync_timeout(struct gb_connection *connection, int type, connection 195 include/linux/greybus/operation.h int gb_operation_unidirectional_timeout(struct gb_connection *connection, connection 199 include/linux/greybus/operation.h static inline int gb_operation_sync(struct gb_connection *connection, int type, connection 203 include/linux/greybus/operation.h return gb_operation_sync_timeout(connection, type, connection 208 include/linux/greybus/operation.h static inline int gb_operation_unidirectional(struct gb_connection *connection, connection 211 include/linux/greybus/operation.h return gb_operation_unidirectional_timeout(connection, type, connection 43 include/linux/greybus/svc.h struct gb_connection *connection; connection 382 include/uapi/drm/drm_mode.h __u32 connection; connection 77 include/uapi/drm/exynos_drm.h __u32 connection; connection 60 include/uapi/sound/asound_fm.h unsigned char connection; /* 0 for serial, 1 for parallel */ connection 284 sound/drivers/opl3/opl3_midi.c unsigned char connection; connection 437 sound/drivers/opl3/opl3_midi.c connection = fm->feedback_connection[0] & 0x01; connection 439 sound/drivers/opl3/opl3_midi.c connection <<= 1; connection 440 sound/drivers/opl3/opl3_midi.c connection |= fm->feedback_connection[1] & 0x01; connection 443 sound/drivers/opl3/opl3_midi.c switch (connection) { connection 455 sound/drivers/opl3/opl3_midi.c if (connection) connection 64 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection); connection 518 sound/drivers/opl3/opl3_synth.c if (voice->connection) connection 591 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection) connection 599 sound/drivers/opl3/opl3_synth.c reg_val = connection & (OPL3_RIGHT_4OP_0 | OPL3_RIGHT_4OP_1 | OPL3_RIGHT_4OP_2 | connection 38 sound/firewire/cmp.h int cmp_connection_init(struct cmp_connection *connection, connection 42 sound/firewire/cmp.h int cmp_connection_check_used(struct cmp_connection *connection, bool *used); connection 43 sound/firewire/cmp.h void cmp_connection_destroy(struct cmp_connection *connection); connection 45 sound/firewire/cmp.h int cmp_connection_reserve(struct cmp_connection *connection, connection 47 sound/firewire/cmp.h void cmp_connection_release(struct cmp_connection *connection); connection 49 sound/firewire/cmp.h int cmp_connection_establish(struct cmp_connection *connection); connection 50 sound/firewire/cmp.h int cmp_connection_update(struct cmp_connection *connection); connection 51 sound/firewire/cmp.h void cmp_connection_break(struct cmp_connection *connection);